summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2007-12-17 16:39:40 +0000
committer Aaron Giles <aaron@aarongiles.com>2007-12-17 16:39:40 +0000
commitdf34329a478833efbd542a424ce1813a11214d4a (patch)
tree97960620a0153b267478c8f9ae93e55582ecaefa
parentc82a966b3b72d79ac3ce394980d6b5806e752160 (diff)
Changes for MAME 0.121u3.mame0121u3
-rw-r--r--.gitattributes3
-rw-r--r--makefile8
-rw-r--r--src/emu/audio/generic.c1
-rw-r--r--src/emu/audit.c4
-rw-r--r--src/emu/clifront.c2
-rw-r--r--src/emu/cpu/adsp2100/2100dasm.c36
-rw-r--r--src/emu/cpu/adsp2100/2100ops.c2
-rw-r--r--src/emu/cpu/alph8201/8201dasm.c2
-rw-r--r--src/emu/cpu/arm/armdasm.c8
-rw-r--r--src/emu/cpu/arm7/arm7dasm.c8
-rw-r--r--src/emu/cpu/asap/asapdasm.c6
-rw-r--r--src/emu/cpu/cop400/cop410.c4
-rw-r--r--src/emu/cpu/cop400/cop420.c4
-rw-r--r--src/emu/cpu/cpu.mak3
-rw-r--r--src/emu/cpu/dsp32/dsp32.c2
-rw-r--r--src/emu/cpu/dsp32/dsp32dis.c18
-rw-r--r--src/emu/cpu/dsp32/dsp32ops.c4
-rw-r--r--src/emu/cpu/e132xs/32xsdasm.c6
-rw-r--r--src/emu/cpu/e132xs/e132xsop.c2
-rw-r--r--src/emu/cpu/f8/f8dasm.c2
-rw-r--r--src/emu/cpu/g65816/g65816.c20
-rw-r--r--src/emu/cpu/g65816/g65816cm.h12
-rw-r--r--src/emu/cpu/g65816/g65816ds.c2
-rw-r--r--src/emu/cpu/g65816/g65816op.h10
-rw-r--r--src/emu/cpu/h6280/6280dasm.c2
-rw-r--r--src/emu/cpu/h6280/h6280.c1
-rw-r--r--src/emu/cpu/h83002/h8disasm.c14
-rw-r--r--src/emu/cpu/hd6309/6309dasm.c10
-rw-r--r--src/emu/cpu/hd6309/6309tbl.c26
-rw-r--r--src/emu/cpu/hd6309/hd6309.c8
-rw-r--r--src/emu/cpu/i386/cycles.h2
-rw-r--r--src/emu/cpu/i386/i386dasm.c8
-rw-r--r--src/emu/cpu/i8039/8039dasm.c5
-rw-r--r--src/emu/cpu/i8039/i8039.c13
-rw-r--r--src/emu/cpu/i8051/i8051.c2
-rw-r--r--src/emu/cpu/i8085/i8085daa.h2
-rw-r--r--src/emu/cpu/i86/table186.h2
-rw-r--r--src/emu/cpu/i86/table286.h2
-rw-r--r--src/emu/cpu/i86/table86.h2
-rw-r--r--src/emu/cpu/i86/tablev30.h2
-rw-r--r--src/emu/cpu/i8x41/i8x41.c2
-rw-r--r--src/emu/cpu/i960/i960.c2
-rw-r--r--src/emu/cpu/i960/i960dis.c4
-rw-r--r--src/emu/cpu/jaguar/jagdasm.c2
-rw-r--r--src/emu/cpu/jaguar/jaguar.c6
-rw-r--r--src/emu/cpu/konami/knmidasm.c10
-rw-r--r--src/emu/cpu/konami/konami.c6
-rw-r--r--src/emu/cpu/lh5801/5801dasm.c4
-rw-r--r--src/emu/cpu/m37710/m37710.c46
-rw-r--r--src/emu/cpu/m37710/m37710cm.h20
-rw-r--r--src/emu/cpu/m37710/m37710op.h24
-rw-r--r--src/emu/cpu/m37710/m7700ds.c10
-rw-r--r--src/emu/cpu/m6502/6502dasm.c2
-rw-r--r--src/emu/cpu/m6502/m4510.c2
-rw-r--r--src/emu/cpu/m6502/m6502.c4
-rw-r--r--src/emu/cpu/m6502/m6509.c2
-rw-r--r--src/emu/cpu/m6502/t6502.c2
-rw-r--r--src/emu/cpu/m6502/t6509.c2
-rw-r--r--src/emu/cpu/m6502/t65c02.c2
-rw-r--r--src/emu/cpu/m6502/t65ce02.c4
-rw-r--r--src/emu/cpu/m6502/t65sc02.c2
-rw-r--r--src/emu/cpu/m6502/tdeco16.c2
-rw-r--r--src/emu/cpu/m6502/tn2a03.c3
-rw-r--r--src/emu/cpu/m6800/6800dasm.c4
-rw-r--r--src/emu/cpu/m6800/6800tbl.c8
-rw-r--r--src/emu/cpu/m6805/6805dasm.c4
-rw-r--r--src/emu/cpu/m6805/m6805.c4
-rw-r--r--src/emu/cpu/m6809/6809dasm.c4
-rw-r--r--src/emu/cpu/m6809/m6809.c6
-rw-r--r--src/emu/cpu/mc68hc11/hc11dasm.c10
-rw-r--r--src/emu/cpu/mc68hc11/hc11ops.h2
-rw-r--r--src/emu/cpu/minx/minxd.c2
-rw-r--r--src/emu/cpu/minx/minxopce.h4
-rw-r--r--src/emu/cpu/minx/minxopcf.h4
-rw-r--r--src/emu/cpu/minx/minxops.h4
-rw-r--r--src/emu/cpu/mips/dismips.c4
-rw-r--r--src/emu/cpu/mips/mdrc64.c2
-rw-r--r--src/emu/cpu/mips/mips3.c2
-rw-r--r--src/emu/cpu/mips/mips3dsm.c10
-rw-r--r--src/emu/cpu/mips/mipsdasm.c22
-rw-r--r--src/emu/cpu/mips/psx.c34
-rw-r--r--src/emu/cpu/mips/r3kdasm.c6
-rw-r--r--src/emu/cpu/nec/nec.c2
-rw-r--r--src/emu/cpu/nec/necdasm.c6
-rw-r--r--src/emu/cpu/pic16c5x/16c5xdsm.c9
-rw-r--r--src/emu/cpu/powerpc/drc_ops.c12
-rw-r--r--src/emu/cpu/powerpc/drc_ops.h2
-rw-r--r--src/emu/cpu/powerpc/ppc.c789
-rw-r--r--src/emu/cpu/powerpc/ppc.h4
-rw-r--r--src/emu/cpu/powerpc/ppc403.c10
-rw-r--r--src/emu/cpu/powerpc/ppc602.c10
-rw-r--r--src/emu/cpu/powerpc/ppc603.c10
-rw-r--r--src/emu/cpu/powerpc/ppc_dasm.c4
-rw-r--r--src/emu/cpu/powerpc/ppcdrc.c786
-rw-r--r--src/emu/cpu/rsp/rsp_dasm.c10
-rw-r--r--src/emu/cpu/s2650/2650dasm.c6
-rw-r--r--src/emu/cpu/s2650/s2650.c2
-rw-r--r--src/emu/cpu/saturn/saturnds.c10
-rw-r--r--src/emu/cpu/sh2/sh2dasm.c2
-rw-r--r--src/emu/cpu/sh4/sh4dasm.c2
-rw-r--r--src/emu/cpu/sm8500/sm8500.c2
-rw-r--r--src/emu/cpu/sm8500/sm8500d.c4
-rw-r--r--src/emu/cpu/spc700/spc700ds.c6
-rw-r--r--src/emu/cpu/ssp1610/ssp1610d.c16
-rw-r--r--src/emu/cpu/t11/t11dasm.c2
-rw-r--r--src/emu/cpu/t11/t11table.c2
-rw-r--r--src/emu/cpu/tlcs90/tlcs90.c10
-rw-r--r--src/emu/cpu/tms32010/32010dsm.c9
-rw-r--r--src/emu/cpu/tms32010/tms32010.c4
-rw-r--r--src/emu/cpu/tms32025/32025dsm.c11
-rw-r--r--src/emu/cpu/tms32025/tms32025.c6
-rw-r--r--src/emu/cpu/tms32031/32031ops.c10
-rw-r--r--src/emu/cpu/tms32031/dis32031.c4
-rw-r--r--src/emu/cpu/tms32051/32051ops.h6
-rw-r--r--src/emu/cpu/tms32051/dis32051.c6
-rw-r--r--src/emu/cpu/tms34010/34010fld.c4
-rw-r--r--src/emu/cpu/tms34010/34010gfx.c14
-rw-r--r--src/emu/cpu/tms34010/34010tbl.c2
-rw-r--r--src/emu/cpu/tms34010/dis34010.c2
-rw-r--r--src/emu/cpu/tms34010/tms34010.c10
-rw-r--r--src/emu/cpu/tms7000/7000dasm.c4
-rw-r--r--src/emu/cpu/tms9900/99xxcore.h6
-rw-r--r--src/emu/cpu/upd7810/7810dasm.c32
-rw-r--r--src/emu/cpu/upd7810/7810tbl.c18
-rw-r--r--src/emu/cpu/v30mz/v30mz.c2
-rw-r--r--src/emu/cpu/v60/v60.c2
-rw-r--r--src/emu/cpu/v60/v60.h2
-rw-r--r--src/emu/cpu/v810/v810.c2
-rw-r--r--src/emu/cpu/v810/v810dasm.c3
-rw-r--r--src/emu/cpu/x86drc.c4
-rw-r--r--src/emu/cpu/z180/z180.c12
-rw-r--r--src/emu/cpu/z180/z180daa.h2
-rw-r--r--src/emu/cpu/z180/z180dasm.c14
-rw-r--r--src/emu/cpu/z180/z180tbl.h22
-rw-r--r--src/emu/cpu/z80/z80dasm.c2
-rw-r--r--src/emu/cpu/z8000/8000dasm.c6
-rw-r--r--src/emu/cpu/z8000/makedab.c2
-rw-r--r--src/emu/cpu/z8000/z8000dab.h2
-rw-r--r--src/emu/cpu/z8000/z8000tbl.c4
-rw-r--r--src/emu/cpu/z80gb/z80gb.c4
-rw-r--r--src/emu/cpu/z80gb/z80gbd.c8
-rw-r--r--src/emu/cpuexec.h1
-rw-r--r--src/emu/cpuintrf.c4
-rw-r--r--src/emu/emu.mak1
-rw-r--r--src/emu/info.c8
-rw-r--r--src/emu/machine/8257dma.c378
-rw-r--r--src/emu/machine/8257dma.h67
-rw-r--r--src/emu/machine/at28c16.c52
-rw-r--r--src/emu/machine/at28c16.h1
-rw-r--r--src/emu/machine/eeprom.c8
-rw-r--r--src/emu/machine/eeprom.h6
-rw-r--r--src/emu/memory.c36
-rw-r--r--src/emu/sound/k054539.c27
-rw-r--r--src/emu/sound/samples.c10
-rw-r--r--src/emu/sound/samples.h8
-rw-r--r--src/emu/sound/scsp.c45
-rw-r--r--src/emu/sound/sn76477.c2
-rw-r--r--src/emu/sound/votrax.c2
-rw-r--r--src/mame/audio/8080bw.c6
-rw-r--r--src/mame/audio/astinvad.c4
-rw-r--r--src/mame/audio/astrof.c6
-rw-r--r--src/mame/audio/blockade.c4
-rw-r--r--src/mame/audio/carnival.c4
-rw-r--r--src/mame/audio/cclimber.c2
-rw-r--r--src/mame/audio/cinemat.c56
-rw-r--r--src/mame/audio/circus.c16
-rw-r--r--src/mame/audio/depthch.c4
-rw-r--r--src/mame/audio/dkong.c632
-rw-r--r--src/mame/audio/galaxian.c10
-rw-r--r--src/mame/audio/gorf.c6
-rw-r--r--src/mame/audio/gottlieb.c2
-rw-r--r--src/mame/audio/invinco.c4
-rw-r--r--src/mame/audio/meadows.c6
-rw-r--r--src/mame/audio/mw8080bw.c36
-rw-r--r--src/mame/audio/n8080.c4
-rw-r--r--src/mame/audio/polyplay.c4
-rw-r--r--src/mame/audio/pulsar.c4
-rw-r--r--src/mame/audio/rockola.c6
-rw-r--r--src/mame/audio/segag80r.c16
-rw-r--r--src/mame/audio/spacefb.c4
-rw-r--r--src/mame/audio/targ.c2
-rw-r--r--src/mame/audio/triplhnt.c4
-rw-r--r--src/mame/audio/turbo.c12
-rw-r--r--src/mame/audio/vicdual.c4
-rw-r--r--src/mame/audio/wow.c6
-rw-r--r--src/mame/audio/zaxxon.c8
-rw-r--r--src/mame/drivers/20pacgal.c2
-rw-r--r--src/mame/drivers/ashnojoe.c84
-rw-r--r--src/mame/drivers/asterix.c2
-rw-r--r--src/mame/drivers/asteroid.c4
-rw-r--r--src/mame/drivers/astrocde.c8
-rw-r--r--src/mame/drivers/bfcobra.c30
-rw-r--r--src/mame/drivers/bmcbowl.c36
-rw-r--r--src/mame/drivers/cave.c18
-rw-r--r--src/mame/drivers/cbasebal.c2
-rw-r--r--src/mame/drivers/clayshoo.c2
-rw-r--r--src/mame/drivers/cosmic.c8
-rw-r--r--src/mame/drivers/couple.c2
-rw-r--r--src/mame/drivers/cps1.c4
-rw-r--r--src/mame/drivers/cps2.c2
-rw-r--r--src/mame/drivers/crbaloon.c2
-rw-r--r--src/mame/drivers/darkhors.c2
-rw-r--r--src/mame/drivers/deco32.c2
-rw-r--r--src/mame/drivers/dkong.c1471
-rw-r--r--src/mame/drivers/dribling.c2
-rw-r--r--src/mame/drivers/drw80pkr.c274
-rw-r--r--src/mame/drivers/eolith.c2
-rw-r--r--src/mame/drivers/eolith16.c2
-rw-r--r--src/mame/drivers/epos.c2
-rw-r--r--src/mame/drivers/exidy.c4
-rw-r--r--src/mame/drivers/filetto.c2
-rw-r--r--src/mame/drivers/findout.c2
-rw-r--r--src/mame/drivers/freekick.c2
-rw-r--r--src/mame/drivers/galaga.c4
-rw-r--r--src/mame/drivers/gaplus.c4
-rw-r--r--src/mame/drivers/getrivia.c4
-rw-r--r--src/mame/drivers/gijoe.c2
-rw-r--r--src/mame/drivers/gottlieb.c8
-rw-r--r--src/mame/drivers/gotya.c4
-rw-r--r--src/mame/drivers/gridlee.c4
-rw-r--r--src/mame/drivers/groundfx.c2
-rw-r--r--src/mame/drivers/gticlub.c2
-rw-r--r--src/mame/drivers/gunbustr.c2
-rw-r--r--src/mame/drivers/homerun.c2
-rw-r--r--src/mame/drivers/imolagp.c2
-rw-r--r--src/mame/drivers/iqblock.c2
-rw-r--r--src/mame/drivers/jack.c10
-rw-r--r--src/mame/drivers/kickgoal.c4
-rw-r--r--src/mame/drivers/konamigq.c2
-rw-r--r--src/mame/drivers/laserbat.c2
-rw-r--r--src/mame/drivers/lethal.c4
-rw-r--r--src/mame/drivers/lordgun.c2
-rw-r--r--src/mame/drivers/m72.c38
-rw-r--r--src/mame/drivers/malzak.c2
-rw-r--r--src/mame/drivers/mario.c4
-rw-r--r--src/mame/drivers/mcr.c4
-rw-r--r--src/mame/drivers/meadows.c6
-rw-r--r--src/mame/drivers/megatech.c25
-rw-r--r--src/mame/drivers/merit.c2
-rw-r--r--src/mame/drivers/mitchell.c2
-rw-r--r--src/mame/drivers/model3.c2
-rw-r--r--src/mame/drivers/moo.c2
-rw-r--r--src/mame/drivers/mpu4drvr.c4
-rw-r--r--src/mame/drivers/mystwarr.c4
-rw-r--r--src/mame/drivers/namcond1.c15
-rw-r--r--src/mame/drivers/namcos11.c2
-rw-r--r--src/mame/drivers/namcos12.c2
-rw-r--r--src/mame/drivers/ninjakd2.c2
-rw-r--r--src/mame/drivers/omegrace.c2
-rw-r--r--src/mame/drivers/othunder.c4
-rw-r--r--src/mame/drivers/overdriv.c4
-rw-r--r--src/mame/drivers/pipeline.c2
-rw-r--r--src/mame/drivers/pirates.c2
-rw-r--r--src/mame/drivers/playmark.c2
-rw-r--r--src/mame/drivers/plygonet.c2
-rw-r--r--src/mame/drivers/pntnpuzl.c2
-rw-r--r--src/mame/drivers/policetr.c2
-rw-r--r--src/mame/drivers/polyplay.c2
-rw-r--r--src/mame/drivers/powerbal.c2
-rw-r--r--src/mame/drivers/psikyo.c6
-rw-r--r--src/mame/drivers/psikyo4.c2
-rw-r--r--src/mame/drivers/psikyosh.c12
-rw-r--r--src/mame/drivers/rallyx.c4
-rw-r--r--src/mame/drivers/rockola.c26
-rw-r--r--src/mame/drivers/route16.c2
-rw-r--r--src/mame/drivers/rungun.c2
-rw-r--r--src/mame/drivers/segag80r.c2
-rw-r--r--src/mame/drivers/segag80v.c12
-rw-r--r--src/mame/drivers/segahang.c2
-rw-r--r--src/mame/drivers/segaorun.c2
-rw-r--r--src/mame/drivers/segas16a.c2
-rw-r--r--src/mame/drivers/seibuspi.c2
-rw-r--r--src/mame/drivers/senjyo.c2
-rw-r--r--src/mame/drivers/simpl156.c12
-rw-r--r--src/mame/drivers/smstrv.c2
-rw-r--r--src/mame/drivers/starcrus.c4
-rw-r--r--src/mame/drivers/statriv2.c4
-rw-r--r--src/mame/drivers/stlforce.c6
-rw-r--r--src/mame/drivers/stv.c135
-rw-r--r--src/mame/drivers/stvinit.c10
-rw-r--r--src/mame/drivers/suna8.c2
-rw-r--r--src/mame/drivers/superchs.c4
-rw-r--r--src/mame/drivers/superqix.c2
-rw-r--r--src/mame/drivers/system1.c260
-rw-r--r--src/mame/drivers/taito_b.c2
-rw-r--r--src/mame/drivers/taito_z.c4
-rw-r--r--src/mame/drivers/tankbatt.c4
-rw-r--r--src/mame/drivers/taxidrvr.c2
-rw-r--r--src/mame/drivers/tcl.c2
-rw-r--r--src/mame/drivers/thief.c12
-rw-r--r--src/mame/drivers/tmnt.c6
-rw-r--r--src/mame/drivers/tnzs.c2
-rw-r--r--src/mame/drivers/toaplan2.c4
-rw-r--r--src/mame/drivers/toratora.c2
-rw-r--r--src/mame/drivers/turbo.c6
-rw-r--r--src/mame/drivers/tx1.c4
-rw-r--r--src/mame/drivers/undrfire.c4
-rw-r--r--src/mame/drivers/unico.c2
-rw-r--r--src/mame/drivers/vamphalf.c4
-rw-r--r--src/mame/drivers/vegaeo.c2
-rw-r--r--src/mame/drivers/vendetta.c2
-rw-r--r--src/mame/drivers/vroulet.c2
-rw-r--r--src/mame/drivers/wilytowr.c2
-rw-r--r--src/mame/drivers/xexex.c2
-rw-r--r--src/mame/drivers/xmen.c2
-rw-r--r--src/mame/drivers/zaccaria.c2
-rw-r--r--src/mame/drivers/zn.c36
-rw-r--r--src/mame/includes/8080bw.h4
-rw-r--r--src/mame/includes/astinvad.h2
-rw-r--r--src/mame/includes/astrocde.h4
-rw-r--r--src/mame/includes/blockade.h2
-rw-r--r--src/mame/includes/cclimber.h2
-rw-r--r--src/mame/includes/circus.h8
-rw-r--r--src/mame/includes/dkong.h93
-rw-r--r--src/mame/includes/galaxian.h2
-rw-r--r--src/mame/includes/triplhnt.h2
-rw-r--r--src/mame/machine/asteroid.c7
-rw-r--r--src/mame/machine/chaknpop.c2
-rw-r--r--src/mame/machine/drakton.c4
-rw-r--r--src/mame/machine/exctsccr.c32
-rw-r--r--src/mame/machine/flstory.c2
-rw-r--r--src/mame/machine/gaelco2.c2
-rw-r--r--src/mame/machine/kanekotb.h160
-rw-r--r--src/mame/machine/leland.c4
-rw-r--r--src/mame/machine/scramble.c6
-rw-r--r--src/mame/machine/simpsons.c2
-rw-r--r--src/mame/machine/slapstic.c36
-rw-r--r--src/mame/machine/steppers.c62
-rw-r--r--src/mame/machine/steppers.h8
-rw-r--r--src/mame/machine/strtheat.c3
-rw-r--r--src/mame/mame.mak1
-rw-r--r--src/mame/mamedriv.c14
-rw-r--r--src/mame/video/atari.c4
-rw-r--r--src/mame/video/avgdvg.c155
-rw-r--r--src/mame/video/cps1.c6
-rw-r--r--src/mame/video/dkong.c412
-rw-r--r--src/mame/video/midzeus.c364
-rw-r--r--src/osd/windows/drawd3d.c35
-rw-r--r--src/osd/windows/winprefix.h2
-rw-r--r--src/tools/src2html.c139
-rw-r--r--src/version.c2
341 files changed, 4964 insertions, 3485 deletions
diff --git a/.gitattributes b/.gitattributes
index 1be719539ee..c921495c58e 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -565,6 +565,8 @@ src/emu/machine/8237dma.c svneol=native#text/plain
src/emu/machine/8237dma.h svneol=native#text/plain
src/emu/machine/8255ppi.c svneol=native#text/plain
src/emu/machine/8255ppi.h svneol=native#text/plain
+src/emu/machine/8257dma.c svneol=native#text/plain
+src/emu/machine/8257dma.h svneol=native#text/plain
src/emu/machine/adc083x.c svneol=native#text/plain
src/emu/machine/adc083x.h svneol=native#text/plain
src/emu/machine/adc1213x.c svneol=native#text/plain
@@ -1359,6 +1361,7 @@ src/mame/drivers/drgnmst.c svneol=native#text/plain
src/mame/drivers/dribling.c svneol=native#text/plain
src/mame/drivers/drmicro.c svneol=native#text/plain
src/mame/drivers/drtomy.c svneol=native#text/plain
+src/mame/drivers/drw80pkr.c svneol=native#text/plain
src/mame/drivers/dunhuang.c svneol=native#text/plain
src/mame/drivers/dwarfd.c svneol=native#text/plain
src/mame/drivers/dynadice.c svneol=native#text/plain
diff --git a/makefile b/makefile
index 96f25af4107..fff99618e4d 100644
--- a/makefile
+++ b/makefile
@@ -105,9 +105,6 @@ X86_MIPS3_DRC = 1
# uncomment next line to use DRC PowerPC engine
X86_PPC_DRC = 1
-# uncomment next line to use DRC Voodoo rasterizers
-# X86_VOODOO_DRC = 1
-
#-------------------------------------------------
@@ -272,11 +269,6 @@ ifdef PROFILER
DEFS += -DMAME_PROFILER
endif
-# define VOODOO_DRC if we are building the DRC Voodoo engine
-ifdef X86_VOODOO_DRC
-DEFS += -DVOODOO_DRC
-endif
-
#-------------------------------------------------
diff --git a/src/emu/audio/generic.c b/src/emu/audio/generic.c
index 4edd9d4f5c0..17f81810487 100644
--- a/src/emu/audio/generic.c
+++ b/src/emu/audio/generic.c
@@ -158,5 +158,6 @@ WRITE8_HANDLER( soundlatch4_clear_w ) { latch_clear(3); }
void soundlatch_setclearedvalue(int value)
{
+ assert_always(mame_get_phase(Machine) == MAME_PHASE_INIT, "Can only call soundlatch_setclearedvalue at init time!");
latch_clear_value = value;
}
diff --git a/src/emu/audit.c b/src/emu/audit.c
index e72cf7604b5..bf7cb30eebc 100644
--- a/src/emu/audit.c
+++ b/src/emu/audit.c
@@ -131,7 +131,7 @@ int audit_samples(core_options *options, const game_driver *gamedrv, audit_recor
for (sndnum = 0; sndnum < ARRAY_LENGTH(config.sound); sndnum++)
if (config.sound[sndnum].type == SOUND_SAMPLES)
{
- struct Samplesinterface *intf = (struct Samplesinterface *)config.sound[sndnum].config;
+ const struct Samplesinterface *intf = (const struct Samplesinterface *)config.sound[sndnum].config;
if (intf->samplenames != NULL)
{
@@ -156,7 +156,7 @@ int audit_samples(core_options *options, const game_driver *gamedrv, audit_recor
for (sndnum = 0; sndnum < ARRAY_LENGTH(config.sound); sndnum++)
if (config.sound[sndnum].type == SOUND_SAMPLES)
{
- struct Samplesinterface *intf = (struct Samplesinterface *)config.sound[sndnum].config;
+ const struct Samplesinterface *intf = (const struct Samplesinterface *)config.sound[sndnum].config;
const char *sharedname = NULL;
if (intf->samplenames != NULL)
diff --git a/src/emu/clifront.c b/src/emu/clifront.c
index 15717b824bd..66852e7a3cd 100644
--- a/src/emu/clifront.c
+++ b/src/emu/clifront.c
@@ -566,7 +566,7 @@ int cli_info_listsamples(core_options *options, const char *gamename)
for (sndnum = 0; sndnum < MAX_SOUND && drv.sound[sndnum].type != SOUND_DUMMY; sndnum++)
if (drv.sound[sndnum].type == SOUND_SAMPLES)
{
- const char **samplenames = ((struct Samplesinterface *)drv.sound[sndnum].config)->samplenames;
+ const char *const *samplenames = ((const struct Samplesinterface *)drv.sound[sndnum].config)->samplenames;
int sampnum;
/* if the list is legit, walk it and print the sample info */
diff --git a/src/emu/cpu/adsp2100/2100dasm.c b/src/emu/cpu/adsp2100/2100dasm.c
index 74bcc73c621..07e22a31a95 100644
--- a/src/emu/cpu/adsp2100/2100dasm.c
+++ b/src/emu/cpu/adsp2100/2100dasm.c
@@ -1,29 +1,29 @@
#include "adsp2100.h"
-static const char *flag_change[] = { "", "TOGGLE %s ", "RESET %s ", "SET %s " };
-static const char *mode_change[] = { "", "", "DIS %s ", "ENA %s " };
+static const char *const flag_change[] = { "", "TOGGLE %s ", "RESET %s ", "SET %s " };
+static const char *const mode_change[] = { "", "", "DIS %s ", "ENA %s " };
-static const char *alu_xop[] = { "AX0", "AX1", "AR", "MR0", "MR1", "MR2", "SR0", "SR1" };
-static const char *alu_yop[] = { "AY0", "AY1", "AF", "0" };
-static const char *alu_dst[] = { "AR", "AF", "NONE" };
+static const char *const alu_xop[] = { "AX0", "AX1", "AR", "MR0", "MR1", "MR2", "SR0", "SR1" };
+static const char *const alu_yop[] = { "AY0", "AY1", "AF", "0" };
+static const char *const alu_dst[] = { "AR", "AF", "NONE" };
-static const char *mac_xop[] = { "MX0", "MX1", "AR", "MR0", "MR1", "MR2", "SR0", "SR1" };
-static const char *mac_yop[] = { "MY0", "MY1", "MF", "0" };
-static const char *mac_dst[] = { "MR", "MF" };
+static const char *const mac_xop[] = { "MX0", "MX1", "AR", "MR0", "MR1", "MR2", "SR0", "SR1" };
+static const char *const mac_yop[] = { "MY0", "MY1", "MF", "0" };
+static const char *const mac_dst[] = { "MR", "MF" };
-static const char *shift_xop[] = { "SI", "??", "AR", "MR0", "MR1", "MR2", "SR0", "SR1" };
+static const char *const shift_xop[] = { "SI", "??", "AR", "MR0", "MR1", "MR2", "SR0", "SR1" };
-static const char *reg_grp[][16] =
+static const char *const reg_grp[][16] =
{
{ "AX0", "AX1", "MX0", "MX1", "AY0", "AY1", "MY0", "MY1", "SI", "SE", "AR", "MR0", "MR1", "MR2", "SR0", "SR1" },
{ "I0", "I1", "I2", "I3", "M0", "M1", "M2", "M3", "L0", "L1", "L2", "L3", "??", "??", "??", "??" },
{ "I4", "I5", "I6", "I7", "M4", "M5", "M6", "M7", "L4", "L5", "L6", "L7", "??", "??", "??", "??" },
{ "ASTAT", "MSTAT", "SSTAT", "IMASK", "ICNTL", "CNTR", "SB", "PX", "RX0", "TX0", "RX1", "TX1", "IFC", "OWRCNTR", "??", "??" }
};
-static const char *dual_xreg[] = { "AX0", "AX1", "MX0", "MX1" };
-static const char *dual_yreg[] = { "AY0", "AY1", "MY0", "MY1" };
+static const char *const dual_xreg[] = { "AX0", "AX1", "MX0", "MX1" };
+static const char *const dual_yreg[] = { "AY0", "AY1", "MY0", "MY1" };
-static const char *condition[] =
+static const char *const condition[] =
{
"IF EQ ",
"IF NE ",
@@ -43,7 +43,7 @@ static const char *condition[] =
""
};
-static const char *do_condition[] =
+static const char *const do_condition[] =
{
"NE",
"EQ",
@@ -63,7 +63,7 @@ static const char *do_condition[] =
"FOREVER"
};
-static const char *alumac_op[][2] =
+static const char *const alumac_op[][2] =
{
{ "", "" },
{ "%s = %s * %s (RND)", "%s = %s * %s (RND)" },
@@ -100,7 +100,7 @@ static const char *alumac_op[][2] =
{ "%s = ABS %s", "%s = ABS %s" }
};
-static const char *shift_op[] =
+static const char *const shift_op[] =
{
"SR = LSHIFT %s (HI)",
"SR = SR OR LSHIFT %s (HI)",
@@ -120,7 +120,7 @@ static const char *shift_op[] =
"SB = EXPADJ %s",
};
-static const char *shift_by_op[] =
+static const char *const shift_by_op[] =
{
"SR = LSHIFT %s BY %d (HI)",
"SR = SR OR LSHIFT %s BY %d (HI)",
@@ -140,7 +140,7 @@ static const char *shift_by_op[] =
"???"
};
-static const char *constants[] =
+static const char *const constants[] =
{
"$0001",
"$FFFE",
diff --git a/src/emu/cpu/adsp2100/2100ops.c b/src/emu/cpu/adsp2100/2100ops.c
index 22e1e2b8cd7..0d50f217bcf 100644
--- a/src/emu/cpu/adsp2100/2100ops.c
+++ b/src/emu/cpu/adsp2100/2100ops.c
@@ -501,7 +501,7 @@ static INT32 rd_stacktop(void) { return pc_stack_pop_val(); }
#define READ_REG(grp,reg) ((*rd_reg[grp][reg])())
-static INT32 (*rd_reg[4][16])(void) =
+static INT32 (*const rd_reg[4][16])(void) =
{
{
rd_ax0, rd_ax1, rd_mx0, rd_mx1, rd_ay0, rd_ay1, rd_my0, rd_my1,
diff --git a/src/emu/cpu/alph8201/8201dasm.c b/src/emu/cpu/alph8201/8201dasm.c
index 4555beac533..956e0f291af 100644
--- a/src/emu/cpu/alph8201/8201dasm.c
+++ b/src/emu/cpu/alph8201/8201dasm.c
@@ -15,7 +15,7 @@ typedef unsigned char byte;
#define FMT(a,b) a, b
#define PTRS_PER_FORMAT 2
-static const char *Formats[] = {
+static const char *const Formats[] = {
FMT("0000_0000", "NOP"), // 00
FMT("0000_0001", "RRCA"), // 01
FMT("0000_0010", "RLCA"), // 02
diff --git a/src/emu/cpu/arm/armdasm.c b/src/emu/cpu/arm/armdasm.c
index 21ae9b57c57..aa17861e374 100644
--- a/src/emu/cpu/arm/armdasm.c
+++ b/src/emu/cpu/arm/armdasm.c
@@ -22,7 +22,7 @@ static char *WriteImmediateOperand( char *pBuf, UINT32 opcode )
static char *WriteDataProcessingOperand( char *pBuf, UINT32 opcode, int printOp0, int printOp1, int printOp2 )
{
/* ccccctttmmmm */
- static const char *pRegOp[4] = { "LSL","LSR","ASR","ROR" };
+ static const char *const pRegOp[4] = { "LSL","LSR","ASR","ROR" };
if (printOp0)
pBuf += sprintf(pBuf,"R%d, ", (opcode>>12)&0xf);
@@ -55,7 +55,7 @@ static char *WriteDataProcessingOperand( char *pBuf, UINT32 opcode, int printOp0
static char *WriteRegisterOperand1( char *pBuf, UINT32 opcode )
{
/* ccccctttmmmm */
- static const char *pRegOp[4] = { "LSL","LSR","ASR","ROR" };
+ static const char *const pRegOp[4] = { "LSL","LSR","ASR","ROR" };
pBuf += sprintf(
pBuf,
@@ -103,14 +103,14 @@ UINT32 arm_disasm( char *pBuf, UINT32 pc, UINT32 opcode )
{
const char *pBuf0;
- static const char *pConditionCodeTable[16] =
+ static const char *const pConditionCodeTable[16] =
{
"EQ","NE","CS","CC",
"MI","PL","VS","VC",
"HI","LS","GE","LT",
"GT","LE","","NV"
};
- static const char *pOperation[16] =
+ static const char *const pOperation[16] =
{
"AND","EOR","SUB","RSB",
"ADD","ADC","SBC","RSC",
diff --git a/src/emu/cpu/arm7/arm7dasm.c b/src/emu/cpu/arm7/arm7dasm.c
index f3340afa148..ed524f6fdd0 100644
--- a/src/emu/cpu/arm7/arm7dasm.c
+++ b/src/emu/cpu/arm7/arm7dasm.c
@@ -119,7 +119,7 @@ static char *WriteImmediateOperand( char *pBuf, UINT32 opcode )
static char *WriteDataProcessingOperand( char *pBuf, UINT32 opcode, int printOp0, int printOp1, int printOp2 )
{
/* ccccctttmmmm */
- static const char *pRegOp[4] = { "LSL","LSR","ASR","ROR" };
+ static const char *const pRegOp[4] = { "LSL","LSR","ASR","ROR" };
if (printOp0)
pBuf += sprintf(pBuf,"R%d, ", (opcode>>12)&0xf);
@@ -158,7 +158,7 @@ static char *WriteDataProcessingOperand( char *pBuf, UINT32 opcode, int printOp0
static char *WriteRegisterOperand1( char *pBuf, UINT32 opcode )
{
/* ccccctttmmmm */
- static const char *pRegOp[4] = { "LSL","LSR","ASR","ROR" };
+ static const char *const pRegOp[4] = { "LSL","LSR","ASR","ROR" };
pBuf += sprintf(
pBuf,
@@ -202,14 +202,14 @@ UINT32 arm7_disasm( char *pBuf, UINT32 pc, UINT32 opcode )
{
const char *pBuf0;
- static const char *pConditionCodeTable[16] =
+ static const char *const pConditionCodeTable[16] =
{
"EQ","NE","CS","CC",
"MI","PL","VS","VC",
"HI","LS","GE","LT",
"GT","LE","","NV"
};
- static const char *pOperation[16] =
+ static const char *const pOperation[16] =
{
"AND","EOR","SUB","RSB",
"ADD","ADC","SBC","RSC",
diff --git a/src/emu/cpu/asap/asapdasm.c b/src/emu/cpu/asap/asapdasm.c
index 43f25e6fcea..4397dc56fb7 100644
--- a/src/emu/cpu/asap/asapdasm.c
+++ b/src/emu/cpu/asap/asapdasm.c
@@ -9,7 +9,7 @@
#include "asap.h"
-static const char *reg[32] =
+static const char *const reg[32] =
{
"0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
"r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
@@ -17,12 +17,12 @@ static const char *reg[32] =
"r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31"
};
-static const char *setcond[2] =
+static const char *const setcond[2] =
{
" ", ".c"
};
-static const char *condition[16] =
+static const char *const condition[16] =
{
"sp", "mz", "gt", "le", "ge", "lt", "hi", "ls", "cc", "cs", "pl", "mi", "ne", "eq", "vc", "vs"
};
diff --git a/src/emu/cpu/cop400/cop410.c b/src/emu/cpu/cop400/cop410.c
index 95c0e2e8bf5..14007c64f11 100644
--- a/src/emu/cpu/cop400/cop410.c
+++ b/src/emu/cpu/cop400/cop410.c
@@ -53,7 +53,7 @@ static int LBIops[256];
#include "410ops.c"
-static s_opcode cop410_opcode_op33[256]=
+static const s_opcode cop410_opcode_op33[256]=
{
{1, illegal },{1, skgbz0 },{1, illegal },{1, skgbz2 },{1, illegal },{1, illegal },{1, illegal },{1, illegal },
{1, illegal },{1, illegal },{1, illegal },{1, illegal },{1, illegal },{1, illegal },{1, illegal },{1, illegal },
@@ -94,7 +94,7 @@ static void cop410_op33(void)
(*(cop410_opcode_op33[ROM(PC++)].function))();
}
-static s_opcode cop410_opcode_main[256]=
+static const s_opcode cop410_opcode_main[256]=
{
{1, clra },{1, skmbz0 },{1, xor },{1, skmbz2 },{1, xis0 },{1, ld0 },{1, x0 },{1, xds0 },
{1, lbi0_9 },{1, lbi0_10 },{1, lbi0_11 },{1, lbi0_12 },{1, lbi0_13 },{1, lbi0_14 },{1, lbi0_15 },{1, lbi0_0 },
diff --git a/src/emu/cpu/cop400/cop420.c b/src/emu/cpu/cop400/cop420.c
index 12f0d0d793f..dc60392c1a4 100644
--- a/src/emu/cpu/cop400/cop420.c
+++ b/src/emu/cpu/cop400/cop420.c
@@ -57,7 +57,7 @@ static int LBIops33[256];
#include "420ops.c"
-static s_opcode cop420_opcode_op33[256]=
+static const s_opcode cop420_opcode_op33[256]=
{
{1, inil },{1, skgbz0 },{1, illegal },{1, skgbz2 },{1, illegal },{1, illegal },{1, illegal },{1, illegal },
{1, illegal },{1, illegal },{1, illegal },{1, illegal },{1, illegal },{1, illegal },{1, illegal },{1, illegal },
@@ -98,7 +98,7 @@ static void cop420_op33(void)
(*(cop420_opcode_op33[ROM(PC++)].function))();
}
-static s_opcode cop420_opcode_main[256]=
+static const s_opcode cop420_opcode_main[256]=
{
{1, clra },{1, skmbz0 },{1, xor },{1, skmbz2 },{1, xis0 },{1, ld0 },{1, x0 },{1, xds0 },
{1, lbi0_9 },{1, lbi0_10 },{1, lbi0_11 },{1, lbi0_12 },{1, lbi0_13 },{1, lbi0_14 },{1, lbi0_15 },{1, lbi0_0 },
diff --git a/src/emu/cpu/cpu.mak b/src/emu/cpu/cpu.mak
index bb398a1c734..2ccc8f2b45b 100644
--- a/src/emu/cpu/cpu.mak
+++ b/src/emu/cpu/cpu.mak
@@ -1085,9 +1085,10 @@ CPUDEFS += -DHAS_PPC403=$(if $(filter PPC403,$(CPUS)),1,0)
CPUDEFS += -DHAS_PPC601=$(if $(filter PPC601,$(CPUS)),1,0)
CPUDEFS += -DHAS_PPC602=$(if $(filter PPC602,$(CPUS)),1,0)
CPUDEFS += -DHAS_PPC603=$(if $(filter PPC603,$(CPUS)),1,0)
+CPUDEFS += -DHAS_PPC604=$(if $(filter PPC604,$(CPUS)),1,0)
CPUDEFS += -DHAS_MPC8240=$(if $(filter MPC8240,$(CPUS)),1,0)
-ifneq ($(filter PPC403 PPC601 PPC602 PPC603 MPC8240,$(CPUS)),)
+ifneq ($(filter PPC403 PPC601 PPC602 PPC603 PPC604 MPC8240,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/powerpc
DBGOBJS += $(CPUOBJ)/powerpc/ppc_dasm.o
diff --git a/src/emu/cpu/dsp32/dsp32.c b/src/emu/cpu/dsp32/dsp32.c
index 1c65533a8bd..4214c2c5c05 100644
--- a/src/emu/cpu/dsp32/dsp32.c
+++ b/src/emu/cpu/dsp32/dsp32.c
@@ -458,7 +458,7 @@ INLINE dsp32_regs *FINDCONTEXT(int cpu)
return context;
}
-static UINT32 regmap[4][16] =
+static const UINT32 regmap[4][16] =
{
{ /* DSP32 compatible mode */
PIO_PAR|LOWER, PIO_PAR|UPPER, PIO_PDR|LOWER, PIO_PDR|UPPER,
diff --git a/src/emu/cpu/dsp32/dsp32dis.c b/src/emu/cpu/dsp32/dsp32dis.c
index 29eed18bf47..d748df49f95 100644
--- a/src/emu/cpu/dsp32/dsp32dis.c
+++ b/src/emu/cpu/dsp32/dsp32dis.c
@@ -22,17 +22,17 @@
CODE CODE
***************************************************************************/
-static const char *sizesuffix[] = { "", "e" };
-static const char *unarysign[] = { "", "-" };
-static const char *sign[] = { "+", "-" };
-static const char *aMvals[] = { "a0", "a1", "a2", "a3", "0.0", "1.0", "Format 4", "Reserved" };
-static const char *memsuffix[] = { "h", "l", "", "e" };
-static const char *functable[] =
+static const char *const sizesuffix[] = { "", "e" };
+static const char *const unarysign[] = { "", "-" };
+static const char *const sign[] = { "+", "-" };
+static const char *const aMvals[] = { "a0", "a1", "a2", "a3", "0.0", "1.0", "Format 4", "Reserved" };
+static const char *const memsuffix[] = { "h", "l", "", "e" };
+static const char *const functable[] =
{
"ic", "oc", "float", "int", "round", "ifalt", "ifaeq", "ifagt",
"reserved8", "reserved9", "float24", "int24", "ieee", "dsp", "seed", "reservedf"
};
-static const char *condtable[] =
+static const char *const condtable[] =
{
"false", "true",
"pl", "mi",
@@ -67,14 +67,14 @@ static const char *condtable[] =
"!?1e", "?1e",
"!?1f", "?1f"
};
-static const char *regname[] =
+static const char *const regname[] =
{
"0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
"r8", "r9", "r10", "r11", "r12", "r13", "r14", "pc",
"0", "r15", "r16", "r17", "r18", "r19", "-1", "1",
"r20", "r21", "dauc", "ioc", "res1c", "r22", "pcsh", "res1f"
};
-static const char *regnamee[] =
+static const char *const regnamee[] =
{
"0", "r1e", "r2e", "r3e", "r4e", "r5e", "r6e", "r7e",
"r8e", "r9e", "r10e", "r11e", "r12e", "r13e", "r14e", "pce",
diff --git a/src/emu/cpu/dsp32/dsp32ops.c b/src/emu/cpu/dsp32/dsp32ops.c
index fce00795ccb..6c0ddde8e79 100644
--- a/src/emu/cpu/dsp32/dsp32ops.c
+++ b/src/emu/cpu/dsp32/dsp32ops.c
@@ -96,7 +96,7 @@
FORWARD DECLARATIONS
***************************************************************************/
-extern void (*dsp32ops[])(void);
+extern void (*const dsp32ops[])(void);
@@ -2534,7 +2534,7 @@ static void d5_seed(void)
FUNCTION TABLE
***************************************************************************/
-void (*dsp32ops[])(void) =
+void (*const dsp32ops[])(void) =
{
nop, goto_t, goto_pl, goto_mi, goto_ne, goto_eq, goto_vc, goto_vs, /* 00 */
goto_cc, goto_cs, goto_ge, goto_lt, goto_gt, goto_le, goto_hi, goto_ls,
diff --git a/src/emu/cpu/e132xs/32xsdasm.c b/src/emu/cpu/e132xs/32xsdasm.c
index fc5a373f13d..d34fd5a59bc 100644
--- a/src/emu/cpu/e132xs/32xsdasm.c
+++ b/src/emu/cpu/e132xs/32xsdasm.c
@@ -9,7 +9,7 @@
#include "debugger.h"
#include "e132xs.h"
-static const char *L_REG[] =
+static const char *const L_REG[] =
{
"L0", "L1", "L2", "L3", "L4", "L5", "L6", "L7", "L8", "L9",
"L10", "L11", "L12", "L13", "L14", "L15", "L16", "L17", "L18", "L19",
@@ -20,7 +20,7 @@ static const char *L_REG[] =
"L60", "L61", "L62", "L63"
};
-static const char *G_REG[] =
+static const char *const G_REG[] =
{
"PC", "SR", "FER", "G03", "G04", "G05", "G06", "G07", "G08", "G09",
"G10", "G11", "G12", "G13", "G14", "G15", "G16", "G17", "SP", "UB",
@@ -28,7 +28,7 @@ static const char *G_REG[] =
"G30", "G31"
};
-static const char *SETxx[] =
+static const char *const SETxx[] =
{
"SETADR", "Reserved", "SET1", "SET0", "SETLE", "SETGT", "SETLT", "SETGE",
"SETSE", "SETHT", "SETST", "SETHE", "SETE", "SETNE", "SETV", "SETNV",
diff --git a/src/emu/cpu/e132xs/e132xsop.c b/src/emu/cpu/e132xs/e132xsop.c
index 5c610189632..a0d297052ad 100644
--- a/src/emu/cpu/e132xs/e132xsop.c
+++ b/src/emu/cpu/e132xs/e132xsop.c
@@ -1842,7 +1842,7 @@ static void hyperstone_opff(UINT16 opcode)
}
-static void (*hyperstone_op[0x100])(UINT16 opcode) =
+static void (*const hyperstone_op[0x100])(UINT16 opcode) =
{
hyperstone_op00, hyperstone_op01, hyperstone_op02, hyperstone_op03,
hyperstone_op04, hyperstone_op05, hyperstone_op06, hyperstone_op07,
diff --git a/src/emu/cpu/f8/f8dasm.c b/src/emu/cpu/f8/f8dasm.c
index c8f1f4ae8b7..2c226a41e7a 100644
--- a/src/emu/cpu/f8/f8dasm.c
+++ b/src/emu/cpu/f8/f8dasm.c
@@ -2,7 +2,7 @@
#include "debugger.h"
#include "f8.h"
-static const char *rname[16] = {
+static const char *const rname[16] = {
"R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7",
"R8", "J", "HU", "HL", "KU", "KL", "QU", "QL"
};
diff --git a/src/emu/cpu/g65816/g65816.c b/src/emu/cpu/g65816/g65816.c
index 4503eb91cac..496f9a060d4 100644
--- a/src/emu/cpu/g65816/g65816.c
+++ b/src/emu/cpu/g65816/g65816.c
@@ -102,37 +102,37 @@ static int g65816_readop(UINT32 offset, int size, UINT64 *value)
return 1;
}
-extern void (*g65816i_opcodes_M0X0[])(void);
+extern void (*const g65816i_opcodes_M0X0[])(void);
extern uint g65816i_get_reg_M0X0(int regnum);
extern void g65816i_set_reg_M0X0(int regnum, uint val);
extern void g65816i_set_line_M0X0(int line, int state);
extern int g65816i_execute_M0X0(int cycles);
-extern void (*g65816i_opcodes_M0X1[])(void);
+extern void (*const g65816i_opcodes_M0X1[])(void);
extern uint g65816i_get_reg_M0X1(int regnum);
extern void g65816i_set_reg_M0X1(int regnum, uint val);
extern void g65816i_set_line_M0X1(int line, int state);
extern int g65816i_execute_M0X1(int cycles);
-extern void (*g65816i_opcodes_M1X0[])(void);
+extern void (*const g65816i_opcodes_M1X0[])(void);
extern uint g65816i_get_reg_M1X0(int regnum);
extern void g65816i_set_reg_M1X0(int regnum, uint val);
extern void g65816i_set_line_M1X0(int line, int state);
extern int g65816i_execute_M1X0(int cycles);
-extern void (*g65816i_opcodes_M1X1[])(void);
+extern void (*const g65816i_opcodes_M1X1[])(void);
extern uint g65816i_get_reg_M1X1(int regnum);
extern void g65816i_set_reg_M1X1(int regnum, uint val);
extern void g65816i_set_line_M1X1(int line, int state);
extern int g65816i_execute_M1X1(int cycles);
-extern void (*g65816i_opcodes_E[])(void);
+extern void (*const g65816i_opcodes_E[])(void);
extern uint g65816i_get_reg_E(int regnum);
extern void g65816i_set_reg_E(int regnum, uint val);
extern void g65816i_set_line_E(int line, int state);
extern int g65816i_execute_E(int cycles);
-void (**g65816i_opcodes[5])(void) =
+void (*const *const g65816i_opcodes[5])(void) =
{
g65816i_opcodes_M0X0,
g65816i_opcodes_M0X1,
@@ -141,7 +141,7 @@ void (**g65816i_opcodes[5])(void) =
g65816i_opcodes_E
};
-uint (*g65816i_get_reg[5])(int regnum) =
+uint (*const g65816i_get_reg[5])(int regnum) =
{
g65816i_get_reg_M0X0,
g65816i_get_reg_M0X1,
@@ -150,7 +150,7 @@ uint (*g65816i_get_reg[5])(int regnum) =
g65816i_get_reg_E
};
-void (*g65816i_set_reg[5])(int regnum, uint val) =
+void (*const g65816i_set_reg[5])(int regnum, uint val) =
{
g65816i_set_reg_M0X0,
g65816i_set_reg_M0X1,
@@ -159,7 +159,7 @@ void (*g65816i_set_reg[5])(int regnum, uint val) =
g65816i_set_reg_E
};
-void (*g65816i_set_line[5])(int line, int state) =
+void (*const g65816i_set_line[5])(int line, int state) =
{
g65816i_set_line_M0X0,
g65816i_set_line_M0X1,
@@ -168,7 +168,7 @@ void (*g65816i_set_line[5])(int line, int state) =
g65816i_set_line_E
};
-int (*g65816i_execute[5])(int cycles) =
+int (*const g65816i_execute[5])(int cycles) =
{
g65816i_execute_M0X0,
g65816i_execute_M0X1,
diff --git a/src/emu/cpu/g65816/g65816cm.h b/src/emu/cpu/g65816/g65816cm.h
index 0b9dda5e88e..e1aaef6058c 100644
--- a/src/emu/cpu/g65816/g65816cm.h
+++ b/src/emu/cpu/g65816/g65816cm.h
@@ -89,7 +89,7 @@ typedef struct
int (*int_ack)(int); /* Interrupt Acknowledge */
read8_handler read_vector; /* Read vector override */
uint stopped; /* Sets how the CPU is stopped */
- void (**opcodes)(void);
+ void (*const *opcodes)(void);
uint (*get_reg)(int regnum);
void (*set_reg)(int regnum, uint val);
void (*set_line)(int line, int state);
@@ -101,11 +101,11 @@ extern int g65816_ICount;
extern uint g65816i_source;
extern uint g65816i_destination;
-extern void (**g65816i_opcodes[])(void);
-extern uint (*g65816i_get_reg[])(int regnum);
-extern void (*g65816i_set_reg[])(int regnum, uint val);
-extern void (*g65816i_set_line[])(int line, int state);
-extern int (*g65816i_execute[])(int cycles);
+extern void (*const *const g65816i_opcodes[])(void);
+extern uint (*const g65816i_get_reg[])(int regnum);
+extern void (*const g65816i_set_reg[])(int regnum, uint val);
+extern void (*const g65816i_set_line[])(int line, int state);
+extern int (*const g65816i_execute[])(int cycles);
#define REGISTER_A g65816i_cpu.a /* Accumulator */
#define REGISTER_B g65816i_cpu.b /* Accumulator hi byte */
diff --git a/src/emu/cpu/g65816/g65816ds.c b/src/emu/cpu/g65816/g65816ds.c
index ad3570043d9..255bedf5fa6 100644
--- a/src/emu/cpu/g65816/g65816ds.c
+++ b/src/emu/cpu/g65816/g65816ds.c
@@ -63,7 +63,7 @@ enum
TYA , TYX , WAI , WDM , XBA , XCE
};
-static const char* g_opnames[] =
+static const char *const g_opnames[] =
{
"ADC", "AND", "ASL", "BCC", "BCS", "BEQ", "BIT", "BMI", "BNE", "BPL", "BRA",
"BRK", "BRL", "BVC", "BVS", "CLC", "CLD", "CLI", "CLV", "CMP", "COP", "CPX",
diff --git a/src/emu/cpu/g65816/g65816op.h b/src/emu/cpu/g65816/g65816op.h
index 2e3ce3b8f8d..dc4b1bfcad8 100644
--- a/src/emu/cpu/g65816/g65816op.h
+++ b/src/emu/cpu/g65816/g65816op.h
@@ -1954,7 +1954,7 @@ INLINE uint EA_SIY(void) {return MAKE_UINT_16(read_16_SIY(REGISTER_S + OPER_8_
#if FLAG_SET_E
#define OP(CODE, OPERATION) static void g65816i_ ## CODE ## _E(void) {OPERATION;}
#define O(CODE) g65816i_ ## CODE ## _E
-#define TABLE_OPCODES void (*g65816i_opcodes_E[256])(void)
+#define TABLE_OPCODES void (*const g65816i_opcodes_E[256])(void)
#define TABLE_FUNCTION(RTYPE, NAME, ARGS) RTYPE g65816i_ ## NAME ## _E ARGS
#else
@@ -1962,28 +1962,28 @@ INLINE uint EA_SIY(void) {return MAKE_UINT_16(read_16_SIY(REGISTER_S + OPER_8_
#if !FLAG_SET_M && !FLAG_SET_X
#define OP(CODE, OPERATION) static void g65816i_ ## CODE ## _M0X0(void) {OPERATION;}
#define O(CODE) g65816i_ ## CODE ## _M0X0
-#define TABLE_OPCODES void (*g65816i_opcodes_M0X0[256])(void)
+#define TABLE_OPCODES void (*const g65816i_opcodes_M0X0[256])(void)
#define TABLE_FUNCTION(RTYPE, NAME, ARGS) RTYPE g65816i_ ## NAME ## _M0X0 ARGS
#elif !FLAG_SET_M && FLAG_SET_X
#define OP(CODE, OPERATION) static void g65816i_ ## CODE ## _M0X1(void) {OPERATION;}
#define O(CODE) g65816i_ ## CODE ## _M0X1
-#define TABLE_OPCODES void (*g65816i_opcodes_M0X1[256])(void)
+#define TABLE_OPCODES void (*const g65816i_opcodes_M0X1[256])(void)
#define TABLE_FUNCTION(RTYPE, NAME, ARGS) RTYPE g65816i_ ## NAME ## _M0X1 ARGS
#elif FLAG_SET_M && !FLAG_SET_X
#define OP(CODE, OPERATION) static void g65816i_ ## CODE ## _M1X0(void) {OPERATION;}
#define O(CODE) g65816i_ ## CODE ## _M1X0
-#define TABLE_OPCODES void (*g65816i_opcodes_M1X0[256])(void)
+#define TABLE_OPCODES void (*const g65816i_opcodes_M1X0[256])(void)
#define TABLE_FUNCTION(RTYPE, NAME, ARGS) RTYPE g65816i_ ## NAME ## _M1X0 ARGS
#elif FLAG_SET_M && FLAG_SET_X
#define OP(CODE, OPERATION) static void g65816i_ ## CODE ## _M1X1(void) {OPERATION;}
#define O(CODE) g65816i_ ## CODE ## _M1X1
-#define TABLE_OPCODES void (*g65816i_opcodes_M1X1[256])(void)
+#define TABLE_OPCODES void (*const g65816i_opcodes_M1X1[256])(void)
#define TABLE_FUNCTION(RTYPE, NAME, ARGS) RTYPE g65816i_ ## NAME ## _M1X1 ARGS
#endif
diff --git a/src/emu/cpu/h6280/6280dasm.c b/src/emu/cpu/h6280/6280dasm.c
index e70d808e683..b3596fc7c21 100644
--- a/src/emu/cpu/h6280/6280dasm.c
+++ b/src/emu/cpu/h6280/6280dasm.c
@@ -76,7 +76,7 @@ enum opcodes {
};
-static const char *token[]=
+static const char *const token[]=
{
/* 6502 opcodes */
"adc", "and", "asl", "bcc", "bcs", "beq", "bit", "bmi",
diff --git a/src/emu/cpu/h6280/h6280.c b/src/emu/cpu/h6280/h6280.c
index 99e98e64992..592f60f08d8 100644
--- a/src/emu/cpu/h6280/h6280.c
+++ b/src/emu/cpu/h6280/h6280.c
@@ -213,6 +213,7 @@ static void h6280_reset(void)
/* timer off by default */
h6280.timer_status=0;
+ h6280.timer_load = 128 * 1024;
/* clear pending interrupts */
for (i = 0; i < 3; i++)
diff --git a/src/emu/cpu/h83002/h8disasm.c b/src/emu/cpu/h83002/h8disasm.c
index d4cbabf523f..99ae25b216e 100644
--- a/src/emu/cpu/h83002/h8disasm.c
+++ b/src/emu/cpu/h83002/h8disasm.c
@@ -11,13 +11,13 @@
#include "debugger.h"
#include "h83002.h"
-static const char *bit_instr[8] = {"bset", "bnot", "bclr", "btst", "bor", "bxor", "band", "bld"};
-static const char *bit_instr2[8] = {"bset", "bnot", "bclr", "btst", "bior", "bixor", "biand", "bild"};
-static const char *imm32l_instr[8] = {"mov", "add", "cmp", "sub", "or", "xor", "and", "?"};
-static const char *branch_instr[16] = {"bt", "bf", "bhi", "bls", "bcc", "bcs", "bne", "beq", "bvc", "bvs", "bpl", "bmi", "bge", "blt", "bgt", "ble"};
-static const char *reg_names32[8] = {"ER0", "ER1", "ER2", "ER3", "ER4", "ER5", "ER6", "SP"};
-static const char *reg_names16[16] = {"R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7", "E0", "E1", "E2", "E3", "E4", "E5", "E6", "E7"};
-static const char *reg_names8[16] = {"R0H", "R1H", "R2H", "R3H", "R4H", "R5H", "R6H", "R7H","R0L", "R1L", "R2L", "R3L", "R4L", "R5L", "R6L", "R7L"};
+static const char *const bit_instr[8] = {"bset", "bnot", "bclr", "btst", "bor", "bxor", "band", "bld"};
+static const char *const bit_instr2[8] = {"bset", "bnot", "bclr", "btst", "bior", "bixor", "biand", "bild"};
+static const char *const imm32l_instr[8] = {"mov", "add", "cmp", "sub", "or", "xor", "and", "?"};
+static const char *const branch_instr[16] = {"bt", "bf", "bhi", "bls", "bcc", "bcs", "bne", "beq", "bvc", "bvs", "bpl", "bmi", "bge", "blt", "bgt", "ble"};
+static const char *const reg_names32[8] = {"ER0", "ER1", "ER2", "ER3", "ER4", "ER5", "ER6", "SP"};
+static const char *const reg_names16[16] = {"R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7", "E0", "E1", "E2", "E3", "E4", "E5", "E6", "E7"};
+static const char *const reg_names8[16] = {"R0H", "R1H", "R2H", "R3H", "R4H", "R5H", "R6H", "R7H","R0L", "R1L", "R2L", "R3L", "R4L", "R5L", "R6L", "R7L"};
static UINT32 h8disasm_0(UINT32 address, UINT32 opcode, char *output, const UINT8 *oprom);
static UINT32 h8disasm_1(UINT32 address, UINT32 opcode, char *output, const UINT8 *oprom);
diff --git a/src/emu/cpu/hd6309/6309dasm.c b/src/emu/cpu/hd6309/6309dasm.c
index 13579e86a90..f558de9a633 100644
--- a/src/emu/cpu/hd6309/6309dasm.c
+++ b/src/emu/cpu/hd6309/6309dasm.c
@@ -586,22 +586,22 @@ static const int hd6309_numops[3] =
sizeof(hd6309_pg2opcodes) / sizeof(hd6309_pg2opcodes[0])
};
-static const char *hd6309_regs[5] = { "X", "Y", "U", "S", "PC" };
+static const char *const hd6309_regs[5] = { "X", "Y", "U", "S", "PC" };
-static const char *hd6309_btwregs[5] = { "CC", "A", "B", "inv" };
+static const char *const hd6309_btwregs[5] = { "CC", "A", "B", "inv" };
-static const char *hd6309_teregs[16] =
+static const char *const hd6309_teregs[16] =
{
"D", "X", "Y", "U", "S", "PC", "W", "V",
"A", "B", "CC", "DP", "0", "0", "E", "F"
};
-static const char *hd6309_tfmregs[16] = {
+static const char *const hd6309_tfmregs[16] = {
"D", "X", "Y", "U", "S", "inv", "inv", "inv",
"inv", "inv", "inv", "inv", "inv", "inv", "inv", "inv"
};
-static const char *tfm_s[] = { "%s+,%s+", "%s-,%s-", "%s+,%s", "%s,%s+" };
+static const char *const tfm_s[] = { "%s+,%s+", "%s-,%s-", "%s+,%s", "%s,%s+" };
offs_t hd6309_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram)
{
diff --git a/src/emu/cpu/hd6309/6309tbl.c b/src/emu/cpu/hd6309/6309tbl.c
index 2c0d78815a8..bc531bcccd5 100644
--- a/src/emu/cpu/hd6309/6309tbl.c
+++ b/src/emu/cpu/hd6309/6309tbl.c
@@ -439,7 +439,7 @@ INLINE void sts_ex( void );
INLINE void pref10( void );
INLINE void pref11( void );
-static UINT8 flags8i[256]= /* increment */
+static const UINT8 flags8i[256]= /* increment */
{
CC_Z,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
@@ -458,7 +458,7 @@ CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,
CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,
CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N
};
-static UINT8 flags8d[256]= /* decrement */
+static const UINT8 flags8d[256]= /* decrement */
{
CC_Z,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
@@ -478,7 +478,7 @@ CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,
CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N
};
-static UINT8 index_cycle_em[256] = { /* Index Loopup cycle counts, emulated 6809 */
+static const UINT8 index_cycle_em[256] = { /* Index Loopup cycle counts, emulated 6809 */
/* 0xX0, 0xX1, 0xX2, 0xX3, 0xX4, 0xX5, 0xX6, 0xX7, 0xX8, 0xX9, 0xXA, 0xXB, 0xXC, 0xXD, 0xXE, 0xXF */
/* 0x0X */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -499,7 +499,7 @@ static UINT8 index_cycle_em[256] = { /* Index Loopup cycle counts, emulat
/* 0xFX */ 4, 6, 20, 6, 3, 4, 4, 4, 4, 7, 4, 7, 4, 8, 7, 20
};
-static UINT8 index_cycle_na[256] = { /* Index Loopup cycle counts,
+static const UINT8 index_cycle_na[256] = { /* Index Loopup cycle counts,
native 6309 */
/* X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, XA, XB, XC, XD, XE, XF */
@@ -524,7 +524,7 @@ native 6309 */
#define IIP0 19 /* Illegal instruction cycle count page 0 */
#define IIP1 20 /* Illegal instruction cycle count page 01 & 11 */
-static UINT8 ccounts_page0_em[256] = /* Cycle Counts Page zero, Emulated 6809 */
+static const UINT8 ccounts_page0_em[256] = /* Cycle Counts Page zero, Emulated 6809 */
{
/* 0xX0, 0xX1, 0xX2, 0xX3, 0xX4, 0xX5, 0xX6, 0xX7, 0xX8, 0xX9, 0xXA, 0xXB, 0xXC, 0xXD, 0xXE, 0xXF */
/* 0x0X */ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 6,
@@ -545,7 +545,7 @@ static UINT8 ccounts_page0_em[256] = /* Cycle Counts Page zero, Emulated 6809
/* 0xFX */ 5, 5, 5, 7, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6
};
-static UINT8 ccounts_page0_na[256] = /* Cycle Counts Page zero, Native 6309 */
+static const UINT8 ccounts_page0_na[256] = /* Cycle Counts Page zero, Native 6309 */
{
/* 0xX0, 0xX1, 0xX2, 0xX3, 0xX4, 0xX5, 0xX6, 0xX7, 0xX8, 0xX9, 0xXA, 0xXB, 0xXC, 0xXD, 0xXE, 0xXF */
/* 0x0X */ 5, 6, 6, 5, 5, 6, 5, 5, 5, 5, 5, 6, 5, 4, 2, 5,
@@ -566,7 +566,7 @@ static UINT8 ccounts_page0_na[256] = /* Cycle Counts Page zero, Native 6309 */
/* 0xFX */ 4, 4, 4, 5, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5
};
-static UINT8 ccounts_page01_em[256] = /* Cycle Counts Page 01, Emulated 6809 */
+static const UINT8 ccounts_page01_em[256] = /* Cycle Counts Page 01, Emulated 6809 */
{
/* 0xX0, 0xX1, 0xX2, 0xX3, 0xX4, 0xX5, 0xX6, 0xX7, 0xX8, 0xX9, 0xXA, 0xXB, 0xXC, 0xXD, 0xXE, 0xXF */
/* 0x0X */ IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1,
@@ -587,7 +587,7 @@ static UINT8 ccounts_page01_em[256] = /* Cycle Counts Page 01, Emulated 6809
/* 0xFX */ IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, 9, 9, 7, 7
};
-static UINT8 ccounts_page01_na[256] = /* Cycle Counts Page 01, Native 6309 */
+static const UINT8 ccounts_page01_na[256] = /* Cycle Counts Page 01, Native 6309 */
{
/* 0xX0, 0xX1, 0xX2, 0xX3, 0xX4, 0xX5, 0xX6, 0xX7, 0xX8, 0xX9, 0xXA, 0xXB, 0xXC, 0xXD, 0xXE, 0xXF */
/* 0x0X */ IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1,
@@ -608,7 +608,7 @@ static UINT8 ccounts_page01_na[256] = /* Cycle Counts Page 01, Native 6309 */
/* 0xFX */ IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, 8, 8, 6, 6
};
-static UINT8 ccounts_page11_em[256] = /* Cycle Counts Page 11, Emulated 6809 */
+static const UINT8 ccounts_page11_em[256] = /* Cycle Counts Page 11, Emulated 6809 */
{
/* 0xX0, 0xX1, 0xX2, 0xX3, 0xX4, 0xX5, 0xX6, 0xX7, 0xX8, 0xX9, 0xXA, 0xXB, 0xXC, 0xXD, 0xXE, 0xXF */
/* 0x0X */ IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1,
@@ -629,7 +629,7 @@ static UINT8 ccounts_page11_em[256] = /* Cycle Counts Page 11, Emulated 6809
/* 0xFX */ 6, 6, IIP1, IIP1, IIP1, IIP1, 6, 6, IIP1, IIP1, IIP1, 6, IIP1, IIP1, IIP1, IIP1
};
-static UINT8 ccounts_page11_na[256] = /* Cycle Counts Page 11, Native 6309 */
+static const UINT8 ccounts_page11_na[256] = /* Cycle Counts Page 11, Native 6309 */
{
/* 0xX0, 0xX1, 0xX2, 0xX3, 0xX4, 0xX5, 0xX6, 0xX7, 0xX8, 0xX9, 0xXA, 0xXB, 0xXC, 0xXD, 0xXE, 0xXF */
/* 0x0X */ IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1, IIP1,
@@ -652,7 +652,7 @@ static UINT8 ccounts_page11_na[256] = /* Cycle Counts Page 11, Native 6309 */
#ifndef BIG_SWITCH
-static void (*hd6309_main[0x100])(void) = {
+static void (*const hd6309_main[0x100])(void) = {
/* 0xX0, 0xX1, 0xX2, 0xX3, 0xX4, 0xX5, 0xX6, 0xX7,
0xX8, 0xX9, 0xXA, 0xXB, 0xXC, 0xXD, 0xXE, 0xXF */
@@ -705,7 +705,7 @@ static void (*hd6309_main[0x100])(void) = {
eorb_ex, adcb_ex, orb_ex, addb_ex, ldd_ex, std_ex, ldu_ex, stu_ex
};
-static void (*hd6309_page01[0x100])(void) = {
+static void (*const hd6309_page01[0x100])(void) = {
/* 0xX0, 0xX1, 0xX2, 0xX3, 0xX4, 0xX5, 0xX6, 0xX7,
0xX8, 0xX9, 0xXA, 0xXB, 0xXC, 0xXD, 0xXE, 0xXF */
@@ -757,7 +757,7 @@ static void (*hd6309_page01[0x100])(void) = {
/* 0xFX */ IIError, IIError, IIError, IIError, IIError, IIError, IIError, IIError,
IIError, IIError, IIError, IIError, ldq_ex, stq_ex, lds_ex, sts_ex
};
-static void (*hd6309_page11[0x100])(void) = {
+static void (*const hd6309_page11[0x100])(void) = {
/* 0xX0, 0xX1, 0xX2, 0xX3, 0xX4, 0xX5, 0xX6, 0xX7,
0xX8, 0xX9, 0xXA, 0xXB, 0xXC, 0xXD, 0xXE, 0xXF */
diff --git a/src/emu/cpu/hd6309/hd6309.c b/src/emu/cpu/hd6309/hd6309.c
index a9105ff3de9..0c9ff68904e 100644
--- a/src/emu/cpu/hd6309/hd6309.c
+++ b/src/emu/cpu/hd6309/hd6309.c
@@ -277,10 +277,10 @@ static int hd6309_ICount;
#define SET_FLAGS8I(a) {CC|=flags8i[(a)&0xff];}
#define SET_FLAGS8D(a) {CC|=flags8d[(a)&0xff];}
-static UINT8 *cycle_counts_page0;
-static UINT8 *cycle_counts_page01;
-static UINT8 *cycle_counts_page11;
-static UINT8 *index_cycle;
+static UINT8 const *cycle_counts_page0;
+static UINT8 const *cycle_counts_page01;
+static UINT8 const *cycle_counts_page11;
+static UINT8 const *index_cycle;
/* combos */
#define SET_NZ8(a) {SET_N8(a);SET_Z(a);}
diff --git a/src/emu/cpu/i386/cycles.h b/src/emu/cpu/i386/cycles.h
index 1d7681e5f47..7f0844a22c1 100644
--- a/src/emu/cpu/i386/cycles.h
+++ b/src/emu/cpu/i386/cycles.h
@@ -337,7 +337,7 @@ typedef struct
UINT8 cpu_cycles[X86_NUM_CPUS][2];
} X86_CYCLE_TABLE;
-static X86_CYCLE_TABLE x86_cycle_table[] =
+static const X86_CYCLE_TABLE x86_cycle_table[] =
{
// opcode rm/pmode
// i386 i486 pentium mediagx
diff --git a/src/emu/cpu/i386/i386dasm.c b/src/emu/cpu/i386/i386dasm.c
index 8d88f34bbd2..9a695655389 100644
--- a/src/emu/cpu/i386/i386dasm.c
+++ b/src/emu/cpu/i386/i386dasm.c
@@ -1079,16 +1079,16 @@ static const GROUP_OP group_op_table[] =
-static const char *i386_reg[3][16] =
+static const char *const i386_reg[3][16] =
{
{"ax", "cx", "dx", "bx", "sp", "bp", "si", "di", "r8w", "r9w", "r10w","r11w","r12w","r13w","r14w","r15w"},
{"eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi", "r8d", "r9d", "r10d","r11d","r12d","r13d","r14d","r15d"},
{"rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"}
};
-static const char *i386_reg8[8] = {"al", "cl", "dl", "bl", "ah", "ch", "dh", "bh"};
-static const char *i386_reg8rex[16] = {"al", "cl", "dl", "bl", "spl", "bpl", "sil", "dil", "r8l", "r9l", "r10l", "r11l", "r12l", "r13l", "r14l", "r15l"};
-static const char *i386_sreg[8] = {"es", "cs", "ss", "ds", "fs", "gs", "???", "???"};
+static const char *const i386_reg8[8] = {"al", "cl", "dl", "bl", "ah", "ch", "dh", "bh"};
+static const char *const i386_reg8rex[16] = {"al", "cl", "dl", "bl", "spl", "bpl", "sil", "dil", "r8l", "r9l", "r10l", "r11l", "r12l", "r13l", "r14l", "r15l"};
+static const char *const i386_sreg[8] = {"es", "cs", "ss", "ds", "fs", "gs", "???", "???"};
static int address_size;
static int operand_size;
diff --git a/src/emu/cpu/i8039/8039dasm.c b/src/emu/cpu/i8039/8039dasm.c
index e138cf8ff15..3d33dad76af 100644
--- a/src/emu/cpu/i8039/8039dasm.c
+++ b/src/emu/cpu/i8039/8039dasm.c
@@ -29,7 +29,7 @@ typedef unsigned char byte;
#define FMT(a,b) a, b
#define PTRS_PER_FORMAT 2
-static const char *Formats[] = {
+static const char *const Formats[] = {
FMT("00000011dddddddd", "add a,#$%X"),
FMT("01101rrr", "add a,%R"),
FMT("0110000r", "add a,@%R"),
@@ -148,7 +148,8 @@ static int OpInizialized = 0;
static void InitDasm8039(void)
{
- const char *p, **ops;
+ const char *p;
+ const char *const *ops;
byte mask, bits;
int bit;
int i;
diff --git a/src/emu/cpu/i8039/i8039.c b/src/emu/cpu/i8039/i8039.c
index 05c7be91ac7..2680c6d50d0 100644
--- a/src/emu/cpu/i8039/i8039.c
+++ b/src/emu/cpu/i8039/i8039.c
@@ -93,12 +93,12 @@ typedef struct
UINT16 A11;
UINT8 irq_state, irq_extra_cycles;
int (*irq_callback)(int irqline);
+ UINT8 Old_T1;
} I8039_Regs;
static I8039_Regs R;
static int i8039_ICount;
static int inst_cycles;
-static UINT8 Old_T1;
/* The opcode table now is a combination of cycle counts and function pointers */
typedef struct {
@@ -106,8 +106,8 @@ typedef struct {
void (*function) (void);
} s_opcode;
-#define POSITIVE_EDGE_T1 (( (int)(T1-Old_T1) > 0) ? 1 : 0)
-#define NEGATIVE_EDGE_T1 (( (int)(Old_T1-T1) > 0) ? 1 : 0)
+#define POSITIVE_EDGE_T1 (( (int)(T1-R.Old_T1) > 0) ? 1 : 0)
+#define NEGATIVE_EDGE_T1 (( (int)(R.Old_T1-T1) > 0) ? 1 : 0)
#define M_Cy ((R.PSW & C_FLAG) >> 7)
#define M_Cn (!M_Cy)
@@ -462,7 +462,7 @@ static void sel_mb1(void) { R.A11 = 0x800; }
static void sel_rb0(void) { CLR(B_FLAG); regPTR = 0; }
static void sel_rb1(void) { SET(B_FLAG); regPTR = 24; }
static void stop_tcnt(void) { R.timerON = R.countON = 0; }
-static void strt_cnt(void) { R.countON = 1; R.timerON = 0; Old_T1 = test_r(1); } /* NS990113 */
+static void strt_cnt(void) { R.countON = 1; R.timerON = 0; R.Old_T1 = test_r(1); } /* NS990113 */
static void strt_t(void) { R.timerON = 1; R.countON = 0; R.masterClock = 0; } /* NS990113 */
static void swap_a(void) { UINT8 i=R.A >> 4; R.A <<= 4; R.A |= i; }
static void xch_a_r0(void) { UINT8 i=R.A; R.A=R0; R0=i; }
@@ -489,7 +489,7 @@ static void xrl_a_r7(void) { R.A ^= R7; }
static void xrl_a_xr0(void) { R.A ^= intRAM[R0 & 0x7f]; }
static void xrl_a_xr1(void) { R.A ^= intRAM[R1 & 0x7f]; }
-static s_opcode opcode_main[256]=
+static const s_opcode opcode_main[256]=
{
{1, nop },{0, illegal },{2, outl_bus_a },{2, add_a_n },{2, jmp },{1, en_i },{0, illegal },{1, dec_a },
{2, ins_a_bus },{2, in_a_p1 },{2, in_a_p2 },{0, illegal },{2, movd_a_p4 },{2, movd_a_p5 },{2, movd_a_p6 },{2, movd_a_p7 },
@@ -558,6 +558,7 @@ static void i8039_init (int index, int clock, const void *config, int (*irqcallb
state_save_register_item("i8039", index, R.A11);
state_save_register_item("i8039", index, R.irq_state);
state_save_register_item("i8039", index, R.irq_extra_cycles);
+ state_save_register_item("i8039", index, R.Old_T1);
}
/****************************************************************************
@@ -690,7 +691,7 @@ static int i8039_execute(int cycles)
i8039_ICount -= count;
}
}
- Old_T1 = T1;
+ R.Old_T1 = T1;
}
}
diff --git a/src/emu/cpu/i8051/i8051.c b/src/emu/cpu/i8051/i8051.c
index 158da7f2b70..b915cbaf673 100644
--- a/src/emu/cpu/i8051/i8051.c
+++ b/src/emu/cpu/i8051/i8051.c
@@ -456,7 +456,7 @@ static READ32_HANDLER((*hold_eram_iaddr_callback));
#define R_B i8051.b
/* # of oscilations each opcode requires*/
-static UINT8 i8051_cycles[] = {
+static const UINT8 i8051_cycles[] = {
12,24,24,12,12,12,12,12,12,12,12,12,12,12,12,12,
24,24,24,12,12,12,12,12,12,12,12,12,12,12,12,12,
24,24,24,12,12,12,12,12,12,12,12,12,12,12,12,12,
diff --git a/src/emu/cpu/i8085/i8085daa.h b/src/emu/cpu/i8085/i8085daa.h
index 891c7222fd5..bd6533b2dce 100644
--- a/src/emu/cpu/i8085/i8085daa.h
+++ b/src/emu/cpu/i8085/i8085daa.h
@@ -1,4 +1,4 @@
-static UINT16 DAA[2048] = {
+static const UINT16 DAA[2048] = {
(0x00<<8) +ZF +VF ,
(0x01<<8) ,
(0x02<<8) ,
diff --git a/src/emu/cpu/i86/table186.h b/src/emu/cpu/i86/table186.h
index 5835d4fa21a..9a415558f0f 100644
--- a/src/emu/cpu/i86/table186.h
+++ b/src/emu/cpu/i86/table186.h
@@ -1,4 +1,4 @@
-static void (*PREFIX186(_instruction)[256])(void) =
+static void (*const PREFIX186(_instruction)[256])(void) =
{
PREFIX86(_add_br8), /* 0x00 */
PREFIX86(_add_wr16), /* 0x01 */
diff --git a/src/emu/cpu/i86/table286.h b/src/emu/cpu/i86/table286.h
index 941c635fd62..6b79dcfaedc 100644
--- a/src/emu/cpu/i86/table286.h
+++ b/src/emu/cpu/i86/table286.h
@@ -3,7 +3,7 @@
* at the time the same like table186.h
*/
-static void (*PREFIX286(_instruction)[256])(void) =
+static void (*const PREFIX286(_instruction)[256])(void) =
{
PREFIX86(_add_br8), /* 0x00 */
PREFIX86(_add_wr16), /* 0x01 */
diff --git a/src/emu/cpu/i86/table86.h b/src/emu/cpu/i86/table86.h
index 2acd4347477..1038501bd03 100644
--- a/src/emu/cpu/i86/table86.h
+++ b/src/emu/cpu/i86/table86.h
@@ -1,4 +1,4 @@
-static void (*PREFIX86(_instruction)[256])(void) =
+static void (*const PREFIX86(_instruction)[256])(void) =
{
PREFIX86(_add_br8), /* 0x00 */
PREFIX86(_add_wr16), /* 0x01 */
diff --git a/src/emu/cpu/i86/tablev30.h b/src/emu/cpu/i86/tablev30.h
index 25a5cb0f226..3c29bf85678 100644
--- a/src/emu/cpu/i86/tablev30.h
+++ b/src/emu/cpu/i86/tablev30.h
@@ -1,7 +1,7 @@
// special nec instructions missing
// at the time the same like table186.h
-static void (*PREFIXV30(_instruction)[256])(void) =
+static void (*const PREFIXV30(_instruction)[256])(void) =
{
PREFIX86(_add_br8), /* 0x00 */
PREFIX86(_add_wr16), /* 0x01 */
diff --git a/src/emu/cpu/i8x41/i8x41.c b/src/emu/cpu/i8x41/i8x41.c
index dbdb5e739c6..5ef7b544a21 100644
--- a/src/emu/cpu/i8x41/i8x41.c
+++ b/src/emu/cpu/i8x41/i8x41.c
@@ -1282,7 +1282,7 @@ INLINE void xrl_i(void)
* Cycle Timings
***********************************************************************/
-static UINT8 i8x41_cycles[] = {
+static const UINT8 i8x41_cycles[] = {
1,1,1,2,2,1,1,1,2,2,2,2,2,2,2,2,
1,1,2,2,2,1,2,1,1,1,1,1,1,1,1,1,
1,1,1,2,2,1,2,1,1,1,1,1,1,1,1,1,
diff --git a/src/emu/cpu/i960/i960.c b/src/emu/cpu/i960/i960.c
index 60662190142..9471fac4b45 100644
--- a/src/emu/cpu/i960/i960.c
+++ b/src/emu/cpu/i960/i960.c
@@ -396,7 +396,7 @@ INLINE void test(UINT32 opcode, int mask)
static const char *i960_get_strflags(void)
{
- static const char *conditions[8] =
+ static const char *const conditions[8] =
{
"no", "g", "e", "ge", "l", "ne", "le", "o"
};
diff --git a/src/emu/cpu/i960/i960dis.c b/src/emu/cpu/i960/i960dis.c
index 67837f21cf5..76b1c1c08d6 100644
--- a/src/emu/cpu/i960/i960dis.c
+++ b/src/emu/cpu/i960/i960dis.c
@@ -90,13 +90,13 @@ static const mnemonic_t mnem_reg[100] =
{ "ending_code",0 }
};
-static const char *constnames[32] =
+static const char *const constnames[32] =
{
"0x0", "0x1", "0x2", "0x3", "0x4", "0x5", "0x6", "0x7", "0x8", "0x9", "0xa", "0xb", "0xc", "0xd", "0xe", "0xf",
"0x10", "0x11", "0x12", "0x13", "0x14", "0x15", "0x16", "0x17", "0x18", "0x19", "0x1a", "0x1b", "0x1c", "0x1d", "0x1e", "0x1f"
};
-static const char *regnames[32] =
+static const char *const regnames[32] =
{
"pfp","sp","rip","r3", "r4","r5","r6","r7", "r8","r9","r10","r11", "r12","r13","r14","r15",
"g0","g1","g2","g3", "g4","g5","g6","g7", "g8","g9","g10","g11", "g12","g13","g14","fp",
diff --git a/src/emu/cpu/jaguar/jagdasm.c b/src/emu/cpu/jaguar/jagdasm.c
index 7fea6be4e08..94934a3539b 100644
--- a/src/emu/cpu/jaguar/jagdasm.c
+++ b/src/emu/cpu/jaguar/jagdasm.c
@@ -23,7 +23,7 @@
static const UINT8 convert_zero[32] =
{ 32,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 };
-static const char *condition[32] =
+static const char *const condition[32] =
{
"",
"nz,",
diff --git a/src/emu/cpu/jaguar/jaguar.c b/src/emu/cpu/jaguar/jaguar.c
index 1fc18b71269..6161f66a66f 100644
--- a/src/emu/cpu/jaguar/jaguar.c
+++ b/src/emu/cpu/jaguar/jaguar.c
@@ -92,7 +92,7 @@ typedef struct
int isdsp;
int op;
int interrupt_cycles;
- void (**table)(void);
+ void (*const *table)(void);
int (*irq_callback)(int irqline);
void (*cpu_interrupt)(void);
} jaguar_regs;
@@ -197,7 +197,7 @@ static void subqmod_n_rn(void); /* DSP only */
static void subqt_n_rn(void);
static void xor_rn_rn(void);
-static void (*gpu_op_table[64])(void) =
+static void (*const gpu_op_table[64])(void) =
{
/* 00-03 */ add_rn_rn, addc_rn_rn, addq_n_rn, addqt_n_rn,
/* 04-07 */ sub_rn_rn, subc_rn_rn, subq_n_rn, subqt_n_rn,
@@ -217,7 +217,7 @@ static void (*gpu_op_table[64])(void) =
/* 60-63 */ store_rn_r14rn, store_rn_r15rn, sat24_rn, pack_rn
};
-static void (*dsp_op_table[64])(void) =
+static void (*const dsp_op_table[64])(void) =
{
/* 00-03 */ add_rn_rn, addc_rn_rn, addq_n_rn, addqt_n_rn,
/* 04-07 */ sub_rn_rn, subc_rn_rn, subq_n_rn, subqt_n_rn,
diff --git a/src/emu/cpu/konami/knmidasm.c b/src/emu/cpu/konami/knmidasm.c
index 6fcffd0843a..6d42110ae84 100644
--- a/src/emu/cpu/konami/knmidasm.c
+++ b/src/emu/cpu/konami/knmidasm.c
@@ -296,7 +296,7 @@ static unsigned char get_next_byte( void ) {
}
/* Table for indexed operations */
-static char index_reg[8][3] = {
+static const char index_reg[8][3] = {
"?", /* 0 - extended mode */
"?", /* 1 */
"x", /* 2 */
@@ -308,7 +308,7 @@ static char index_reg[8][3] = {
};
/* Table for tfr/exg operations */
-static char tfrexg_reg[8][3] = {
+static const char tfrexg_reg[8][3] = {
"a", /* 0 */
"b", /* 1 */
"x", /* 2 */
@@ -320,7 +320,7 @@ static char tfrexg_reg[8][3] = {
};
/* Table for stack S operations */
-static char stack_reg_s[8][3] = {
+static const char stack_reg_s[8][3] = {
"cc",
"a",
"b",
@@ -332,7 +332,7 @@ static char stack_reg_s[8][3] = {
};
/* Table for stack U operations */
-static char stack_reg_u[8][3] = {
+static const char stack_reg_u[8][3] = {
"cc",
"a",
"b",
@@ -1585,7 +1585,7 @@ typedef struct {
int confirmed;
} konami_opcode_def;
-static konami_opcode_def op_table[256] = {
+static const konami_opcode_def op_table[256] = {
/* 00 */ { illegal, 0 },
/* 01 */ { illegal, 0 },
/* 02 */ { illegal, 0 },
diff --git a/src/emu/cpu/konami/konami.c b/src/emu/cpu/konami/konami.c
index b9568c4dea4..83c71f03f78 100644
--- a/src/emu/cpu/konami/konami.c
+++ b/src/emu/cpu/konami/konami.c
@@ -213,7 +213,7 @@ static int konami_ICount=50000;
#define SET_V8(a,b,r) CC|=(((a^b^r^(r>>1))&0x80)>>6)
#define SET_V16(a,b,r) CC|=(((a^b^r^(r>>1))&0x8000)>>14)
-static UINT8 flags8i[256]= /* increment */
+static const UINT8 flags8i[256]= /* increment */
{
CC_Z,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
@@ -232,7 +232,7 @@ CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,
CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,
CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N
};
-static UINT8 flags8d[256]= /* decrement */
+static const UINT8 flags8d[256]= /* decrement */
{
CC_Z,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
@@ -332,7 +332,7 @@ CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N
}
/* opcode timings */
-static UINT8 cycles1[] =
+static const UINT8 cycles1[] =
{
/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
/*0*/ 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 5, 5, 5, 5,
diff --git a/src/emu/cpu/lh5801/5801dasm.c b/src/emu/cpu/lh5801/5801dasm.c
index d94882c5233..ae6516a3c0b 100644
--- a/src/emu/cpu/lh5801/5801dasm.c
+++ b/src/emu/cpu/lh5801/5801dasm.c
@@ -54,7 +54,7 @@ typedef enum {
P, S
} Regs;
-static const char *RegNames[]= {
+static const char *const RegNames[]= {
0, "A", "XL", "XH", "X", "YL", "YH", "Y", "UL", "UH", "U", "P", "S"
};
@@ -92,7 +92,7 @@ typedef enum {
RPV, SPV,// flip flop pv off
} Ins;
-static const char *InsNames[]={
+static const char *const InsNames[]={
"ILL", "ILL", 0, "NOP",
"LDA", "STA", "LDI", "LDX", "STX",
"LDE", "SDE", "LIN", "SIN",
diff --git a/src/emu/cpu/m37710/m37710.c b/src/emu/cpu/m37710/m37710.c
index c80c474dfea..d9e91045be4 100644
--- a/src/emu/cpu/m37710/m37710.c
+++ b/src/emu/cpu/m37710/m37710.c
@@ -70,7 +70,7 @@ uint m37710i_destination;
/* interrupt control mapping */
-int m37710_irq_levels[M37710_LINE_MAX] =
+const int m37710_irq_levels[M37710_LINE_MAX] =
{
// maskable
0x70, // ADC
@@ -98,7 +98,7 @@ int m37710_irq_levels[M37710_LINE_MAX] =
0, // reset
};
-static int m37710_irq_vectors[M37710_LINE_MAX] =
+static const int m37710_irq_vectors[M37710_LINE_MAX] =
{
// maskable C74
0xffd6, // A-D converter c68b
@@ -129,7 +129,7 @@ static int m37710_irq_vectors[M37710_LINE_MAX] =
// M37710 internal peripherals
#if M37710_DEBUG
-static const char *m37710_rnames[128] =
+static const char *const m37710_rnames[128] =
{
"",
"",
@@ -261,7 +261,7 @@ static const char *m37710_rnames[128] =
"INT2 IRQ ctrl",
};
-static const char *m37710_tnames[8] =
+static const char *const m37710_tnames[8] =
{
"A0", "A1", "A2", "A3", "A4", "B0", "B1", "B2"
};
@@ -684,39 +684,39 @@ static WRITE16_HANDLER( m37710_internal_word_w )
}
}
-extern void (*m37710i_opcodes_M0X0[])(void);
-extern void (*m37710i_opcodes42_M0X0[])(void);
-extern void (*m37710i_opcodes89_M0X0[])(void);
+extern void (*const m37710i_opcodes_M0X0[])(void);
+extern void (*const m37710i_opcodes42_M0X0[])(void);
+extern void (*const m37710i_opcodes89_M0X0[])(void);
extern uint m37710i_get_reg_M0X0(int regnum);
extern void m37710i_set_reg_M0X0(int regnum, uint val);
extern void m37710i_set_line_M0X0(int line, int state);
extern int m37710i_execute_M0X0(int cycles);
-extern void (*m37710i_opcodes_M0X1[])(void);
-extern void (*m37710i_opcodes42_M0X1[])(void);
-extern void (*m37710i_opcodes89_M0X1[])(void);
+extern void (*const m37710i_opcodes_M0X1[])(void);
+extern void (*const m37710i_opcodes42_M0X1[])(void);
+extern void (*const m37710i_opcodes89_M0X1[])(void);
extern uint m37710i_get_reg_M0X1(int regnum);
extern void m37710i_set_reg_M0X1(int regnum, uint val);
extern void m37710i_set_line_M0X1(int line, int state);
extern int m37710i_execute_M0X1(int cycles);
-extern void (*m37710i_opcodes_M1X0[])(void);
-extern void (*m37710i_opcodes42_M1X0[])(void);
-extern void (*m37710i_opcodes89_M1X0[])(void);
+extern void (*const m37710i_opcodes_M1X0[])(void);
+extern void (*const m37710i_opcodes42_M1X0[])(void);
+extern void (*const m37710i_opcodes89_M1X0[])(void);
extern uint m37710i_get_reg_M1X0(int regnum);
extern void m37710i_set_reg_M1X0(int regnum, uint val);
extern void m37710i_set_line_M1X0(int line, int state);
extern int m37710i_execute_M1X0(int cycles);
-extern void (*m37710i_opcodes_M1X1[])(void);
-extern void (*m37710i_opcodes42_M1X1[])(void);
-extern void (*m37710i_opcodes89_M1X1[])(void);
+extern void (*const m37710i_opcodes_M1X1[])(void);
+extern void (*const m37710i_opcodes42_M1X1[])(void);
+extern void (*const m37710i_opcodes89_M1X1[])(void);
extern uint m37710i_get_reg_M1X1(int regnum);
extern void m37710i_set_reg_M1X1(int regnum, uint val);
extern void m37710i_set_line_M1X1(int line, int state);
extern int m37710i_execute_M1X1(int cycles);
-void (**m37710i_opcodes[4])(void) =
+void (*const *const m37710i_opcodes[4])(void) =
{
m37710i_opcodes_M0X0,
m37710i_opcodes_M0X1,
@@ -724,7 +724,7 @@ void (**m37710i_opcodes[4])(void) =
m37710i_opcodes_M1X1,
};
-void (**m37710i_opcodes2[4])(void) =
+void (*const *const m37710i_opcodes2[4])(void) =
{
m37710i_opcodes42_M0X0,
m37710i_opcodes42_M0X1,
@@ -732,7 +732,7 @@ void (**m37710i_opcodes2[4])(void) =
m37710i_opcodes42_M1X1,
};
-void (**m37710i_opcodes3[4])(void) =
+void (*const *const m37710i_opcodes3[4])(void) =
{
m37710i_opcodes89_M0X0,
m37710i_opcodes89_M0X1,
@@ -740,7 +740,7 @@ void (**m37710i_opcodes3[4])(void) =
m37710i_opcodes89_M1X1,
};
-uint (*m37710i_get_reg[4])(int regnum) =
+uint (*const m37710i_get_reg[4])(int regnum) =
{
m37710i_get_reg_M0X0,
m37710i_get_reg_M0X1,
@@ -748,7 +748,7 @@ uint (*m37710i_get_reg[4])(int regnum) =
m37710i_get_reg_M1X1,
};
-void (*m37710i_set_reg[4])(int regnum, uint val) =
+void (*const m37710i_set_reg[4])(int regnum, uint val) =
{
m37710i_set_reg_M0X0,
m37710i_set_reg_M0X1,
@@ -756,7 +756,7 @@ void (*m37710i_set_reg[4])(int regnum, uint val) =
m37710i_set_reg_M1X1,
};
-void (*m37710i_set_line[4])(int line, int state) =
+void (*const m37710i_set_line[4])(int line, int state) =
{
m37710i_set_line_M0X0,
m37710i_set_line_M0X1,
@@ -764,7 +764,7 @@ void (*m37710i_set_line[4])(int line, int state) =
m37710i_set_line_M1X1,
};
-int (*m37710i_execute[4])(int cycles) =
+int (*const m37710i_execute[4])(int cycles) =
{
m37710i_execute_M0X0,
m37710i_execute_M0X1,
diff --git a/src/emu/cpu/m37710/m37710cm.h b/src/emu/cpu/m37710/m37710cm.h
index 59568c624ba..1c429a8685e 100644
--- a/src/emu/cpu/m37710/m37710cm.h
+++ b/src/emu/cpu/m37710/m37710cm.h
@@ -95,9 +95,9 @@ typedef struct
uint irq_level; /* irq level */
int (*int_ack)(int); /* Interrupt Acknowledge */
uint stopped; /* Sets how the CPU is stopped */
- void (**opcodes)(void); /* opcodes with no prefix */
- void (**opcodes42)(void); /* opcodes with 0x42 prefix */
- void (**opcodes89)(void); /* opcodes with 0x89 prefix */
+ void (*const *opcodes)(void); /* opcodes with no prefix */
+ void (*const *opcodes42)(void); /* opcodes with 0x42 prefix */
+ void (*const *opcodes89)(void); /* opcodes with 0x89 prefix */
uint (*get_reg)(int regnum);
void (*set_reg)(int regnum, uint val);
void (*set_line)(int line, int state);
@@ -116,13 +116,13 @@ extern uint m37710i_destination;
extern uint m37710i_adc_tbl[];
extern uint m37710i_sbc_tbl[];
-extern void (**m37710i_opcodes[])(void);
-extern void (**m37710i_opcodes2[])(void);
-extern void (**m37710i_opcodes3[])(void);
-extern uint (*m37710i_get_reg[])(int regnum);
-extern void (*m37710i_set_reg[])(int regnum, uint val);
-extern void (*m37710i_set_line[])(int line, int state);
-extern int (*m37710i_execute[])(int cycles);
+extern void (*const *const m37710i_opcodes[])(void);
+extern void (*const *const m37710i_opcodes2[])(void);
+extern void (*const *const m37710i_opcodes3[])(void);
+extern uint (*const m37710i_get_reg[])(int regnum);
+extern void (*const m37710i_set_reg[])(int regnum, uint val);
+extern void (*const m37710i_set_line[])(int line, int state);
+extern int (*const m37710i_execute[])(int cycles);
#define REG_A m37710i_cpu.a /* Accumulator */
#define REG_B m37710i_cpu.b /* Accumulator hi byte */
diff --git a/src/emu/cpu/m37710/m37710op.h b/src/emu/cpu/m37710/m37710op.h
index 5939b385cef..83e0c9a8198 100644
--- a/src/emu/cpu/m37710/m37710op.h
+++ b/src/emu/cpu/m37710/m37710op.h
@@ -2335,36 +2335,36 @@ INLINE uint EA_SIY(void) {return MAKE_UINT_16(read_16_SIY(REG_S + OPER_8_IMM()
#if !FLAG_SET_M && !FLAG_SET_X
#define OP(CODE, OPERATION) static void m37710i_ ## CODE ## _M0X0(void) {OPERATION;}
#define O(CODE) m37710i_ ## CODE ## _M0X0
-#define TABLE_OPCODES void (*m37710i_opcodes_M0X0[256])(void)
-#define TABLE_OPCODES2 void (*m37710i_opcodes42_M0X0[256])(void)
-#define TABLE_OPCODES3 void (*m37710i_opcodes89_M0X0[256])(void)
+#define TABLE_OPCODES void (*const m37710i_opcodes_M0X0[256])(void)
+#define TABLE_OPCODES2 void (*const m37710i_opcodes42_M0X0[256])(void)
+#define TABLE_OPCODES3 void (*const m37710i_opcodes89_M0X0[256])(void)
#define TABLE_FUNCTION(RTYPE, NAME, ARGS) RTYPE m37710i_ ## NAME ## _M0X0 ARGS
#elif !FLAG_SET_M && FLAG_SET_X
#define OP(CODE, OPERATION) static void m37710i_ ## CODE ## _M0X1(void) {OPERATION;}
#define O(CODE) m37710i_ ## CODE ## _M0X1
-#define TABLE_OPCODES void (*m37710i_opcodes_M0X1[256])(void)
-#define TABLE_OPCODES2 void (*m37710i_opcodes42_M0X1[256])(void)
-#define TABLE_OPCODES3 void (*m37710i_opcodes89_M0X1[256])(void)
+#define TABLE_OPCODES void (*const m37710i_opcodes_M0X1[256])(void)
+#define TABLE_OPCODES2 void (*const m37710i_opcodes42_M0X1[256])(void)
+#define TABLE_OPCODES3 void (*const m37710i_opcodes89_M0X1[256])(void)
#define TABLE_FUNCTION(RTYPE, NAME, ARGS) RTYPE m37710i_ ## NAME ## _M0X1 ARGS
#elif FLAG_SET_M && !FLAG_SET_X
#define OP(CODE, OPERATION) static void m37710i_ ## CODE ## _M1X0(void) {OPERATION;}
#define O(CODE) m37710i_ ## CODE ## _M1X0
-#define TABLE_OPCODES void (*m37710i_opcodes_M1X0[256])(void)
-#define TABLE_OPCODES2 void (*m37710i_opcodes42_M1X0[256])(void)
-#define TABLE_OPCODES3 void (*m37710i_opcodes89_M1X0[256])(void)
+#define TABLE_OPCODES void (*const m37710i_opcodes_M1X0[256])(void)
+#define TABLE_OPCODES2 void (*const m37710i_opcodes42_M1X0[256])(void)
+#define TABLE_OPCODES3 void (*const m37710i_opcodes89_M1X0[256])(void)
#define TABLE_FUNCTION(RTYPE, NAME, ARGS) RTYPE m37710i_ ## NAME ## _M1X0 ARGS
#elif FLAG_SET_M && FLAG_SET_X
#define OP(CODE, OPERATION) static void m37710i_ ## CODE ## _M1X1(void) {OPERATION;}
#define O(CODE) m37710i_ ## CODE ## _M1X1
-#define TABLE_OPCODES void (*m37710i_opcodes_M1X1[256])(void)
-#define TABLE_OPCODES2 void (*m37710i_opcodes42_M1X1[256])(void)
-#define TABLE_OPCODES3 void (*m37710i_opcodes89_M1X1[256])(void)
+#define TABLE_OPCODES void (*const m37710i_opcodes_M1X1[256])(void)
+#define TABLE_OPCODES2 void (*const m37710i_opcodes42_M1X1[256])(void)
+#define TABLE_OPCODES3 void (*const m37710i_opcodes89_M1X1[256])(void)
#define TABLE_FUNCTION(RTYPE, NAME, ARGS) RTYPE m37710i_ ## NAME ## _M1X1 ARGS
#endif
diff --git a/src/emu/cpu/m37710/m7700ds.c b/src/emu/cpu/m37710/m7700ds.c
index 05fe804dda7..03b7ec0cc40 100644
--- a/src/emu/cpu/m37710/m7700ds.c
+++ b/src/emu/cpu/m37710/m7700ds.c
@@ -58,7 +58,7 @@ enum
BBC, BBS, TBY, ANDB, PUL , PSH , PLAB, XAB , PHB
};
-static const char* g_opnames[] =
+static const char *const g_opnames[] =
{
"ADC", "AND", "ASL", "BCC", "BCS", "BEQ", "BIT", "BMI", "BNE", "BPL", "BRA",
"BRK", "BRL", "BVC", "BVS", "CLC", "CLD", "CLI", "CLV", "CMP", "COP", "CPX",
@@ -74,7 +74,7 @@ static const char* g_opnames[] =
"BBC", "BBS", "TBY", "ANDB","PUL", "PSH", "PLB", "XAB", "PHB",
};
-static opcode_struct g_opcodes[256] =
+static const opcode_struct g_opcodes[256] =
{
{BRK, I, SIG }, {ORA, M, DXI }, {UNK, I, SIG }, {ORA, M, S },
{SEB, M, LDM4 }, {ORA, M, D }, {ASL, M, D }, {ORA, M, DLI },
@@ -157,7 +157,7 @@ static opcode_struct g_opcodes[256] =
{JSR, I, AXI }, {SBC, M, AX }, {INC, M, AX }, {SBC, M, ALX }
};
-static opcode_struct g_opcodes_prefix42[256] =
+static const opcode_struct g_opcodes_prefix42[256] =
{
{BRK, I, SIG }, {ORB, M, DXI }, {COP, I, SIG }, {ORB, M, S },
{TSB, M, D }, {ORB, M, D }, {ASL, M, D }, {ORB, M, DLI },
@@ -240,7 +240,7 @@ static opcode_struct g_opcodes_prefix42[256] =
{JSR, I, AXI }, {SBCB, M, AX }, {INC, M, AX }, {SBCB, M, ALX }
};
-static opcode_struct g_opcodes_prefix89[256] =
+static const opcode_struct g_opcodes_prefix89[256] =
{
{BRK, I, SIG }, {MPY, M, DXI }, {COP, I, SIG }, {MPY, M, S },
{TSB, M, D }, {MPY, M, D }, {ASL, M, D }, {MPY, M, DLI },
@@ -373,7 +373,7 @@ INLINE char* int_16_str(unsigned int val)
int m7700_disassemble(char* buff, unsigned int pc, unsigned int pb, const UINT8 *oprom, int m_flag, int x_flag)
{
unsigned int instruction;
- opcode_struct *opcode;
+ const opcode_struct *opcode;
char* ptr;
int var;
signed char varS;
diff --git a/src/emu/cpu/m6502/6502dasm.c b/src/emu/cpu/m6502/6502dasm.c
index e89067237c5..c887338d5f5 100644
--- a/src/emu/cpu/m6502/6502dasm.c
+++ b/src/emu/cpu/m6502/6502dasm.c
@@ -97,7 +97,7 @@ enum opcodes {
};
-static const char *token[]=
+static const char *const token[]=
{
"adc", "and", "asl", "bcc", "bcs", "beq", "bit", "bmi",
"bne", "bpl", "m6502_brk", "bvc", "bvs", "clc", "cld", "cli",
diff --git a/src/emu/cpu/m6502/m4510.c b/src/emu/cpu/m6502/m4510.c
index b5a3adc8bef..ae45f9ff382 100644
--- a/src/emu/cpu/m6502/m4510.c
+++ b/src/emu/cpu/m6502/m4510.c
@@ -125,7 +125,7 @@ z: xxxx address bits a19 .. a16 for memory accesses with a15 1 ?
typedef struct {
- void (**insn)(void); /* pointer to the function pointer table */
+ void (*const *insn)(void); /* pointer to the function pointer table */
PAIR ppc; /* previous program counter */
PAIR pc; /* program counter */
PAIR sp; /* stack pointer (always 100 - 1FF) */
diff --git a/src/emu/cpu/m6502/m6502.c b/src/emu/cpu/m6502/m6502.c
index ff8d63a7716..b97790c5184 100644
--- a/src/emu/cpu/m6502/m6502.c
+++ b/src/emu/cpu/m6502/m6502.c
@@ -59,7 +59,7 @@
typedef struct
{
UINT8 subtype; /* currently selected cpu sub type */
- void (**insn)(void); /* pointer to the function pointer table */
+ void (*const *insn)(void); /* pointer to the function pointer table */
PAIR ppc; /* previous program counter */
PAIR pc; /* program counter */
PAIR sp; /* stack pointer (always 100 - 1FF) */
@@ -127,7 +127,7 @@ static m6502_Regs m6502;
*
*****************************************************************************/
-static void m6502_common_init(int index, int clock, const void *config, int (*irqcallback)(int), UINT8 subtype, void (**insn)(void), const char *type)
+static void m6502_common_init(int index, int clock, const void *config, int (*irqcallback)(int), UINT8 subtype, void (*const *insn)(void), const char *type)
{
memset(&m6502, 0, sizeof(m6502));
m6502.irq_callback = irqcallback;
diff --git a/src/emu/cpu/m6502/m6509.c b/src/emu/cpu/m6502/m6509.c
index 49b66b9a006..a6a7ad482d3 100644
--- a/src/emu/cpu/m6502/m6509.c
+++ b/src/emu/cpu/m6502/m6509.c
@@ -62,7 +62,7 @@ addresses take place.
typedef struct {
UINT8 subtype; /* currently selected cpu sub type */
- void (**insn)(void); /* pointer to the function pointer table */
+ void (*const *insn)(void); /* pointer to the function pointer table */
PAIR ppc; /* previous program counter */
/* pc.w.h contains the current page pc_bank.w.h for better speed */
PAIR pc; /* program counter */
diff --git a/src/emu/cpu/m6502/t6502.c b/src/emu/cpu/m6502/t6502.c
index 806b63379f4..f171f4143c8 100644
--- a/src/emu/cpu/m6502/t6502.c
+++ b/src/emu/cpu/m6502/t6502.c
@@ -323,7 +323,7 @@ OP(ff) { int tmp; RD_ABX_NP; WB_EA; ISB; WB_EA; } /* 7 ISB ABX */
/* and here's the array of function pointers */
-static void (*insn6502[0x100])(void) = {
+static void (*const insn6502[0x100])(void) = {
m6502_00,m6502_01,m6502_02,m6502_03,m6502_04,m6502_05,m6502_06,m6502_07,
m6502_08,m6502_09,m6502_0a,m6502_0b,m6502_0c,m6502_0d,m6502_0e,m6502_0f,
m6502_10,m6502_11,m6502_12,m6502_13,m6502_14,m6502_15,m6502_16,m6502_17,
diff --git a/src/emu/cpu/m6502/t6509.c b/src/emu/cpu/m6502/t6509.c
index 71bcade3b42..58b7fe291fb 100644
--- a/src/emu/cpu/m6502/t6509.c
+++ b/src/emu/cpu/m6502/t6509.c
@@ -314,7 +314,7 @@ OP(bf) { int tmp; RD_ABY_P; LAX; } /* 4 LAX ABY page penalty */
OP(df) { int tmp; RD_ABX_NP; WB_EA; DCP; WB_EA; } /* 7 DCP ABX */
OP(ff) { int tmp; RD_ABX_NP; WB_EA; ISB; WB_EA; } /* 7 ISB ABX */
-static void (*insn6509[0x100])(void) = {
+static void (*const insn6509[0x100])(void) = {
m6509_00,m6509_01,m6509_02,m6509_03,m6509_04,m6509_05,m6509_06,m6509_07,
m6509_08,m6509_09,m6509_0a,m6509_0b,m6509_0c,m6509_0d,m6509_0e,m6509_0f,
m6509_10,m6509_11,m6509_12,m6509_13,m6509_14,m6509_15,m6509_16,m6509_17,
diff --git a/src/emu/cpu/m6502/t65c02.c b/src/emu/cpu/m6502/t65c02.c
index a40876e3c76..9566e3d0548 100644
--- a/src/emu/cpu/m6502/t65c02.c
+++ b/src/emu/cpu/m6502/t65c02.c
@@ -326,7 +326,7 @@ OP(bf) { int tmp; RD_ZPG; BBS(3); } /* 5-7 BBS3 ZPG */
OP(df) { int tmp; RD_ZPG; BBS(5); } /* 5-7 BBS5 ZPG */
OP(ff) { int tmp; RD_ZPG; BBS(7); } /* 5-7 BBS7 ZPG */
-static void (*insn65c02[0x100])(void) = {
+static void (*const insn65c02[0x100])(void) = {
m65c02_00,m65c02_01,m65c02_02,m65c02_03,m65c02_04,m65c02_05,m65c02_06,m65c02_07,
m65c02_08,m65c02_09,m65c02_0a,m65c02_0b,m65c02_0c,m65c02_0d,m65c02_0e,m65c02_0f,
m65c02_10,m65c02_11,m65c02_12,m65c02_13,m65c02_14,m65c02_15,m65c02_16,m65c02_17,
diff --git a/src/emu/cpu/m6502/t65ce02.c b/src/emu/cpu/m6502/t65ce02.c
index 4ae71dec749..d43fdc0fce1 100644
--- a/src/emu/cpu/m6502/t65ce02.c
+++ b/src/emu/cpu/m6502/t65ce02.c
@@ -326,7 +326,7 @@ OP(df) { int tmp; RD_ZPG; BBS(5); } /* 4 BBS5 ZPG */
OP(ff) { int tmp; RD_ZPG; BBS(7); } /* 4 BBS7 ZPG */
#ifdef M4510
-static void (*insn4510[0x100])(void) = {
+static void (*const insn4510[0x100])(void) = {
m4510_00,m4510_01,m4510_02,m4510_03,m4510_04,m4510_05,m4510_06,m4510_07,
m4510_08,m4510_09,m4510_0a,m4510_0b,m4510_0c,m4510_0d,m4510_0e,m4510_0f,
m4510_10,m4510_11,m4510_12,m4510_13,m4510_14,m4510_15,m4510_16,m4510_17,
@@ -361,7 +361,7 @@ static void (*insn4510[0x100])(void) = {
m4510_f8,m4510_f9,m4510_fa,m4510_fb,m4510_fc,m4510_fd,m4510_fe,m4510_ff
};
#else
-static void (*insn65ce02[0x100])(void) = {
+static void (*const insn65ce02[0x100])(void) = {
m65ce02_00,m65ce02_01,m65ce02_02,m65ce02_03,m65ce02_04,m65ce02_05,m65ce02_06,m65ce02_07,
m65ce02_08,m65ce02_09,m65ce02_0a,m65ce02_0b,m65ce02_0c,m65ce02_0d,m65ce02_0e,m65ce02_0f,
m65ce02_10,m65ce02_11,m65ce02_12,m65ce02_13,m65ce02_14,m65ce02_15,m65ce02_16,m65ce02_17,
diff --git a/src/emu/cpu/m6502/t65sc02.c b/src/emu/cpu/m6502/t65sc02.c
index aab67064035..bfc2f589fe6 100644
--- a/src/emu/cpu/m6502/t65sc02.c
+++ b/src/emu/cpu/m6502/t65sc02.c
@@ -43,7 +43,7 @@
* op temp cycles rdmem opc wrmem ********************/
OP(63) { BSR; } /* 5? BSR */
-static void (*insn65sc02[0x100])(void) = {
+static void (*const insn65sc02[0x100])(void) = {
m65c02_00,m65c02_01,m65c02_02,m65c02_03,m65c02_04,m65c02_05,m65c02_06,m65c02_07,
m65c02_08,m65c02_09,m65c02_0a,m65c02_0b,m65c02_0c,m65c02_0d,m65c02_0e,m65c02_0f,
m65c02_10,m65c02_11,m65c02_12,m65c02_13,m65c02_14,m65c02_15,m65c02_16,m65c02_17,
diff --git a/src/emu/cpu/m6502/tdeco16.c b/src/emu/cpu/m6502/tdeco16.c
index f1802ad1b03..949301129c4 100644
--- a/src/emu/cpu/m6502/tdeco16.c
+++ b/src/emu/cpu/m6502/tdeco16.c
@@ -393,7 +393,7 @@ OP(bf) { RD_DUM; ILL; } /* 2 ILL / 5 BBS3 ZPG ?? */
OP(df) { RD_DUM; ILL; } /* 2 ILL / 5 BBS5 ZPG ?? */
OP(ff) { RD_DUM; ILL; } /* 2 ILL / 5 BBS7 ZPG ?? */
-static void (*insndeco16[0x100])(void) = {
+static void (*const insndeco16[0x100])(void) = {
deco16_00,deco16_01,deco16_02,deco16_03,deco16_04,deco16_05,deco16_06,deco16_07,
deco16_08,deco16_09,deco16_0a,deco16_0b,deco16_0c,deco16_0d,deco16_0e,deco16_0f,
deco16_10,deco16_11,deco16_12,deco16_13,deco16_14,deco16_15,deco16_16,deco16_17,
diff --git a/src/emu/cpu/m6502/tn2a03.c b/src/emu/cpu/m6502/tn2a03.c
index 2a74f088105..6e5975f637a 100644
--- a/src/emu/cpu/m6502/tn2a03.c
+++ b/src/emu/cpu/m6502/tn2a03.c
@@ -60,7 +60,7 @@ OP(ed) { int tmp; RD_ABS; SBC_NES; } /* 4 SBC ABS */
OP(7d) { int tmp; RD_ABX_P; ADC_NES; } /* 4 ADC ABX page penalty */
OP(fd) { int tmp; RD_ABX_P; SBC_NES; } /* 4 SBC ABX page penalty */
-static void (*insn2a03[0x100])(void) = {
+static void (*const insn2a03[0x100])(void) = {
m6502_00,m6502_01,m6502_02,m6502_03,m6502_04,m6502_05,m6502_06,m6502_07,
m6502_08,m6502_09,m6502_0a,m6502_0b,m6502_0c,m6502_0d,m6502_0e,m6502_0f,
m6502_10,m6502_11,m6502_12,m6502_13,m6502_14,m6502_15,m6502_16,m6502_17,
@@ -94,4 +94,3 @@ static void (*insn2a03[0x100])(void) = {
m6502_f0,n2a03_f1,m6502_f2,m6502_f3,m6502_f4,n2a03_f5,m6502_f6,m6502_f7,
m6502_f8,n2a03_f9,m6502_fa,m6502_fb,m6502_fc,n2a03_fd,m6502_fe,m6502_ff
};
-
diff --git a/src/emu/cpu/m6800/6800dasm.c b/src/emu/cpu/m6800/6800dasm.c
index 467fe1adee6..5caa6c6a9a4 100644
--- a/src/emu/cpu/m6800/6800dasm.c
+++ b/src/emu/cpu/m6800/6800dasm.c
@@ -52,7 +52,7 @@ enum op_names {
tstb, tsx, txs, asx1, asx2, xgdx, addx, adcx
};
-static const char *op_name_str[] = {
+static const char *const op_name_str[] = {
"aba", "abx", "adca", "adcb", "adda", "addb", "addd", "aim",
"anda", "andb", "asl", "asla", "aslb", "asld", "asr", "asra",
"asrb", "bcc", "bcs", "beq", "bge", "bgt", "bhi", "bita",
@@ -79,7 +79,7 @@ static const char *op_name_str[] = {
* 2 invalid opcode for 1:6800/6802/6808, 2:6801/6803, 4:HD63701
*/
-static UINT8 table[0x102][3] = {
+static const UINT8 table[0x102][3] = {
{ill, inh,7},{nop, inh,0},{ill, inh,7},{ill, inh,7},/* 00 */
{lsrd,inh,1},{asld,inh,1},{tap, inh,0},{tpa, inh,0},
{inx, inh,0},{dex, inh,0},{clv, inh,0},{sev, inh,0},
diff --git a/src/emu/cpu/m6800/6800tbl.c b/src/emu/cpu/m6800/6800tbl.c
index 26795c0c9e5..a7f7e5cbb57 100644
--- a/src/emu/cpu/m6800/6800tbl.c
+++ b/src/emu/cpu/m6800/6800tbl.c
@@ -251,7 +251,7 @@ INLINE void cpx_ix(void);
static void trap(void);
#endif
-static void (*m6800_insn[0x100])(void) = {
+static void (*const m6800_insn[0x100])(void) = {
illegal,nop, illegal,illegal,illegal,illegal,tap, tpa,
inx, dex, clv, sev, clc, sec, cli, sei,
sba, cba, illegal,illegal,illegal,illegal,tab, tba,
@@ -287,7 +287,7 @@ eorb_ex,adcb_ex,orb_ex, addb_ex,illegal,illegal,ldx_ex, stx_ex
};
#if (HAS_M6801||HAS_M6803)
-static void (*m6803_insn[0x100])(void) = {
+static void (*const m6803_insn[0x100])(void) = {
illegal,nop, illegal,illegal,lsrd, asld, tap, tpa,
inx, dex, clv, sev, clc, sec, cli, sei,
sba, cba, illegal,illegal,illegal,illegal,tab, tba,
@@ -324,7 +324,7 @@ eorb_ex,adcb_ex,orb_ex, addb_ex,ldd_ex, std_ex, ldx_ex, stx_ex
#endif
#if (HAS_HD63701)
-static void (*hd63701_insn[0x100])(void) = {
+static void (*const hd63701_insn[0x100])(void) = {
trap ,nop, trap ,trap ,lsrd, asld, tap, tpa,
inx, dex, clv, sev, clc, sec, cli, sei,
sba, cba, undoc1, undoc2, trap ,trap ,tab, tba,
@@ -361,7 +361,7 @@ eorb_ex,adcb_ex,orb_ex, addb_ex,ldd_ex, std_ex, ldx_ex, stx_ex
#endif
#if (HAS_NSC8105)
-static void (*nsc8105_insn[0x100])(void) = {
+static void (*const nsc8105_insn[0x100])(void) = {
illegal,illegal,nop, illegal,illegal,tap, illegal,tpa,
inx, clv, dex, sev, clc, cli, sec, sei,
sba, illegal,cba, illegal,illegal,tab, illegal,tba,
diff --git a/src/emu/cpu/m6805/6805dasm.c b/src/emu/cpu/m6805/6805dasm.c
index 79ea4c24868..079c5f0370c 100644
--- a/src/emu/cpu/m6805/6805dasm.c
+++ b/src/emu/cpu/m6805/6805dasm.c
@@ -38,7 +38,7 @@ enum op_names {
tstx, txa
};
-static const char *op_name_str[] = {
+static const char *const op_name_str[] = {
"adca", "adda", "anda", "asl", "asla", "aslx", "asr", "asra",
"asrx", "bcc", "bclr", "bcs", "beq", "bhcc", "bhcs", "bhi",
"bih", "bil", "bita", "bls", "bmc", "bmi", "bms", "bne",
@@ -120,7 +120,7 @@ static const unsigned char disasm[0x100][2] = {
};
#if 0
-static char *opcode_strings[0x0100] =
+static const char *const opcode_strings[0x0100] =
{
"brset0", "brclr0", "brset1", "brclr1", "brset2", "brclr2", "brset3", "brclr3", /*00*/
"brset4", "brclr4", "brset5", "brclr5", "brset6", "brclr6", "brset7", "brclr7",
diff --git a/src/emu/cpu/m6805/m6805.c b/src/emu/cpu/m6805/m6805.c
index 6d4f4efc19b..22eafd6420e 100644
--- a/src/emu/cpu/m6805/m6805.c
+++ b/src/emu/cpu/m6805/m6805.c
@@ -121,7 +121,7 @@ static int m6805_ICount=50000;
#define SET_H(a,b,r) CC|=((a^b^r)&0x10)
#define SET_C8(a) CC|=((a&0x100)>>8)
-static UINT8 flags8i[256]= /* increment */
+static const UINT8 flags8i[256]= /* increment */
{
0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
@@ -140,7 +140,7 @@ static UINT8 flags8i[256]= /* increment */
0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04
};
-static UINT8 flags8d[256]= /* decrement */
+static const UINT8 flags8d[256]= /* decrement */
{
0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
diff --git a/src/emu/cpu/m6809/6809dasm.c b/src/emu/cpu/m6809/6809dasm.c
index e5f94619d34..08c19724477 100644
--- a/src/emu/cpu/m6809/6809dasm.c
+++ b/src/emu/cpu/m6809/6809dasm.c
@@ -354,9 +354,9 @@ static const int m6809_numops[3] =
sizeof(m6809_pg2opcodes) / sizeof(m6809_pg2opcodes[0])
};
-static const char *m6809_regs[5] = { "X", "Y", "U", "S", "PC" };
+static const char *const m6809_regs[5] = { "X", "Y", "U", "S", "PC" };
-static const char *m6809_regs_te[16] =
+static const char *const m6809_regs_te[16] =
{
"D", "X", "Y", "U", "S", "PC", "inv", "inv",
"A", "B", "CC", "DP", "inv", "inv", "inv", "inv"
diff --git a/src/emu/cpu/m6809/m6809.c b/src/emu/cpu/m6809/m6809.c
index f5cb1b5b8a9..86bf1503d62 100644
--- a/src/emu/cpu/m6809/m6809.c
+++ b/src/emu/cpu/m6809/m6809.c
@@ -258,7 +258,7 @@ static int m6809_ICount;
#define SET_V8(a,b,r) CC|=(((a^b^r^(r>>1))&0x80)>>6)
#define SET_V16(a,b,r) CC|=(((a^b^r^(r>>1))&0x8000)>>14)
-static UINT8 flags8i[256]= /* increment */
+static const UINT8 flags8i[256]= /* increment */
{
CC_Z,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
@@ -277,7 +277,7 @@ CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,
CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,
CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N
};
-static UINT8 flags8d[256]= /* decrement */
+static const UINT8 flags8d[256]= /* decrement */
{
CC_Z,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
@@ -360,7 +360,7 @@ CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N,CC_N
#if (!BIG_SWITCH)
/* timings for 1-byte opcodes */
-static UINT8 cycles1[] =
+static const UINT8 cycles1[] =
{
/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
/*0*/ 6, 0, 0, 6, 6, 0, 6, 6, 6, 6, 6, 0, 6, 6, 3, 6,
diff --git a/src/emu/cpu/mc68hc11/hc11dasm.c b/src/emu/cpu/mc68hc11/hc11dasm.c
index 062ab81d3b6..b2d7c6750c2 100644
--- a/src/emu/cpu/mc68hc11/hc11dasm.c
+++ b/src/emu/cpu/mc68hc11/hc11dasm.c
@@ -31,7 +31,7 @@ typedef struct {
int address_mode;
} M68HC11_OPCODE;
-static M68HC11_OPCODE opcode_table[256] =
+static const M68HC11_OPCODE opcode_table[256] =
{
/* 0x00 - 0x0f */
{ "test", 0, },
@@ -311,7 +311,7 @@ static M68HC11_OPCODE opcode_table[256] =
/*****************************************************************************/
-static M68HC11_OPCODE opcode_table_page2[256] =
+static const M68HC11_OPCODE opcode_table_page2[256] =
{
/* 0x00 - 0x0f */
{ "?", 0, },
@@ -591,7 +591,7 @@ static M68HC11_OPCODE opcode_table_page2[256] =
/*****************************************************************************/
-static M68HC11_OPCODE opcode_table_page3[256] =
+static const M68HC11_OPCODE opcode_table_page3[256] =
{
/* 0x00 - 0x0f */
{ "?", 0, },
@@ -871,7 +871,7 @@ static M68HC11_OPCODE opcode_table_page3[256] =
/*****************************************************************************/
-static M68HC11_OPCODE opcode_table_page4[256] =
+static const M68HC11_OPCODE opcode_table_page4[256] =
{
/* 0x00 - 0x0f */
{ "?", 0, },
@@ -1175,7 +1175,7 @@ static UINT16 fetch16(void)
return w;
}
-static UINT32 decode_opcode(UINT32 pc, M68HC11_OPCODE *op_table)
+static UINT32 decode_opcode(UINT32 pc, const M68HC11_OPCODE *op_table)
{
UINT8 imm8, mask;
INT8 rel8;
diff --git a/src/emu/cpu/mc68hc11/hc11ops.h b/src/emu/cpu/mc68hc11/hc11ops.h
index 3c8b2e4aba1..4aab7ee2813 100644
--- a/src/emu/cpu/mc68hc11/hc11ops.h
+++ b/src/emu/cpu/mc68hc11/hc11ops.h
@@ -4,7 +4,7 @@ typedef struct {
void (*handler)(void);
} HC11_OPCODE_LIST;
-static HC11_OPCODE_LIST hc11_opcode_list[] =
+static const HC11_OPCODE_LIST hc11_opcode_list[] =
{
/* page opcode handler */
{ 0, 0x1b, HC11OP(aba) },
diff --git a/src/emu/cpu/minx/minxd.c b/src/emu/cpu/minx/minxd.c
index 479b5ff9b4b..d8490c52afc 100644
--- a/src/emu/cpu/minx/minxd.c
+++ b/src/emu/cpu/minx/minxd.c
@@ -59,7 +59,7 @@ enum e_operand {
OP, OP1
};
-static const char *s_mnemonic[] = {
+static const char *const s_mnemonic[] = {
"add", "addc", "and", "bcdd", "bcde", "bcdx", "call", "callc", "callg", "callge", "calll",
"callle", "calln", "callnc", "callno", "callnz", "callo", "callp", "callnx0",
"callnx1", "callnx2", "callnx3", "callx0", "callx1", "callx2", "callx3", "callz",
diff --git a/src/emu/cpu/minx/minxopce.h b/src/emu/cpu/minx/minxopce.h
index 5059582123c..7e2aa3251a7 100644
--- a/src/emu/cpu/minx/minxopce.h
+++ b/src/emu/cpu/minx/minxopce.h
@@ -274,7 +274,7 @@ OP(FD) { INT8 d8 = rdop(); if ( ( regs.E & EXEC_X1 ) ) { CALL( regs.PC + d8 - 1
OP(FE) { INT8 d8 = rdop(); if ( ( regs.E & EXEC_X2 ) ) { CALL( regs.PC + d8 - 1 ); } }
OP(FF) { INT8 d8 = rdop(); if ( ( regs.E & EXEC_DZ ) ) { CALL( regs.PC + d8 - 1 ); } }
-static void (*insnminx_CE[256])(void) = {
+static void (*const insnminx_CE[256])(void) = {
minx_CE_00, minx_CE_01, minx_CE_02, minx_CE_03, minx_CE_04, minx_CE_05, minx_CE_06, minx_CE_07,
minx_CE_08, minx_CE_09, minx_CE_0A, minx_CE_0B, minx_CE_0C, minx_CE_0D, minx_CE_0E, minx_CE_0F,
minx_CE_10, minx_CE_11, minx_CE_12, minx_CE_13, minx_CE_14, minx_CE_15, minx_CE_16, minx_CE_17,
@@ -309,7 +309,7 @@ static void (*insnminx_CE[256])(void) = {
minx_CE_F8, minx_CE_F9, minx_CE_FA, minx_CE_FB, minx_CE_FC, minx_CE_FD, minx_CE_FE, minx_CE_FF
};
-static int insnminx_cycles_CE[256] = {
+static const int insnminx_cycles_CE[256] = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
diff --git a/src/emu/cpu/minx/minxopcf.h b/src/emu/cpu/minx/minxopcf.h
index 19c8b3f3256..fefea13354f 100644
--- a/src/emu/cpu/minx/minxopcf.h
+++ b/src/emu/cpu/minx/minxopcf.h
@@ -274,7 +274,7 @@ OP(FD) { /* illegal instruction? */ }
OP(FE) { regs.Y = regs.SP; }
OP(FF) { /* illegal instruction? */ }
-static void (*insnminx_CF[256])(void) = {
+static void (*const insnminx_CF[256])(void) = {
minx_CF_00, minx_CF_01, minx_CF_02, minx_CF_03, minx_CF_04, minx_CF_05, minx_CF_06, minx_CF_07,
minx_CF_08, minx_CF_09, minx_CF_0A, minx_CF_0B, minx_CF_0C, minx_CF_0D, minx_CF_0E, minx_CF_0F,
minx_CF_10, minx_CF_11, minx_CF_12, minx_CF_13, minx_CF_14, minx_CF_15, minx_CF_16, minx_CF_17,
@@ -309,7 +309,7 @@ static void (*insnminx_CF[256])(void) = {
minx_CF_F8, minx_CF_F9, minx_CF_FA, minx_CF_FB, minx_CF_FC, minx_CF_FD, minx_CF_FE, minx_CF_FF
};
-static int insnminx_cycles_CF[256] = {
+static const int insnminx_cycles_CF[256] = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
diff --git a/src/emu/cpu/minx/minxops.h b/src/emu/cpu/minx/minxops.h
index 9c297ada835..68a0bac5ab4 100644
--- a/src/emu/cpu/minx/minxops.h
+++ b/src/emu/cpu/minx/minxops.h
@@ -274,7 +274,7 @@ OP(FD) { UINT16 i = rdop() << 1; JMP( i ); /* PUSH8( regs.F );?? */ }
OP(FE) { /* illegal operation? */ }
OP(FF) { }
-static void (*insnminx[256])(void) = {
+static void (*const insnminx[256])(void) = {
minx_00, minx_01, minx_02, minx_03, minx_04, minx_05, minx_06, minx_07,
minx_08, minx_09, minx_0A, minx_0B, minx_0C, minx_0D, minx_0E, minx_0F,
minx_10, minx_11, minx_12, minx_13, minx_14, minx_15, minx_16, minx_17,
@@ -309,7 +309,7 @@ static void (*insnminx[256])(void) = {
minx_F8, minx_F9, minx_FA, minx_FB, minx_FC, minx_FD, minx_FE, minx_FF
};
-static int insnminx_cycles[256] = {
+static const int insnminx_cycles[256] = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
diff --git a/src/emu/cpu/mips/dismips.c b/src/emu/cpu/mips/dismips.c
index 10ce5b89963..1a7a22df27d 100644
--- a/src/emu/cpu/mips/dismips.c
+++ b/src/emu/cpu/mips/dismips.c
@@ -42,9 +42,9 @@ static struct
static UINT8 *filebuf;
static UINT32 offset;
-static UINT8 order[] = { 0, 1, 2, 3 };
+static const UINT8 order[] = { 0, 1, 2, 3 };
-static char *Options[]=
+static const char *const Options[]=
{
"begin", "end", "offset", "order", "format", "cpu", 0
};
diff --git a/src/emu/cpu/mips/mdrc64.c b/src/emu/cpu/mips/mdrc64.c
index c2dca50e074..8d2d42ea1ee 100644
--- a/src/emu/cpu/mips/mdrc64.c
+++ b/src/emu/cpu/mips/mdrc64.c
@@ -351,7 +351,7 @@ static int compile_store_double_partial(drc_core *drc, compiler_state *compiler,
static const UINT8 nvreg[] = { REG_NV0, REG_NV1, REG_NV2, REG_NV3, REG_NV4, REG_NV5, REG_NV6 };
-static const char *x86regname[] = {"rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"};
+static const char *const x86regname[] = {"rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"};
diff --git a/src/emu/cpu/mips/mips3.c b/src/emu/cpu/mips/mips3.c
index efec9518412..8fe4f17ea39 100644
--- a/src/emu/cpu/mips/mips3.c
+++ b/src/emu/cpu/mips/mips3.c
@@ -136,7 +136,7 @@ static void ldr_le(UINT32 op);
static void sdl_le(UINT32 op);
static void sdr_le(UINT32 op);
-static UINT8 fcc_shift[8] = { 23, 25, 26, 27, 28, 29, 30, 31 };
+static const UINT8 fcc_shift[8] = { 23, 25, 26, 27, 28, 29, 30, 31 };
diff --git a/src/emu/cpu/mips/mips3dsm.c b/src/emu/cpu/mips/mips3dsm.c
index b7896a9f9cd..a3f4cc6aeb2 100644
--- a/src/emu/cpu/mips/mips3dsm.c
+++ b/src/emu/cpu/mips/mips3dsm.c
@@ -9,7 +9,7 @@
#include "cpuintrf.h"
-static const char *reg[32] =
+static const char *const reg[32] =
{
"0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
"r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
@@ -18,7 +18,7 @@ static const char *reg[32] =
};
-static const char *cpreg[4][32] =
+static const char *const cpreg[4][32] =
{
{
"Index","Random","EntryLo0","EntryLo1","Context","PageMask","Wired","Error",
@@ -47,7 +47,7 @@ static const char *cpreg[4][32] =
};
-static const char *ccreg[4][32] =
+static const char *const ccreg[4][32] =
{
{
"ccr0", "ccr1", "ccr2", "ccr3", "ccr4", "ccr5", "ccr6", "ccr7",
@@ -148,7 +148,7 @@ static UINT32 dasm_cop0(UINT32 pc, UINT32 op, char *buffer)
static UINT32 dasm_cop1(UINT32 pc, UINT32 op, char *buffer)
{
- static const char *format_table[] =
+ static const char *const format_table[] =
{
"?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?",
"s","d","?","?","w","l","?","?","?","?","?","?","?","?","?","?"
@@ -231,7 +231,7 @@ static UINT32 dasm_cop1(UINT32 pc, UINT32 op, char *buffer)
static UINT32 dasm_cop1x(UINT32 pc, UINT32 op, char *buffer)
{
- static const char *format3_table[] =
+ static const char *const format3_table[] =
{
"s","d","?","?","w","l","?","?"
};
diff --git a/src/emu/cpu/mips/mipsdasm.c b/src/emu/cpu/mips/mipsdasm.c
index 10297b8e439..406d4e58a3d 100644
--- a/src/emu/cpu/mips/mipsdasm.c
+++ b/src/emu/cpu/mips/mipsdasm.c
@@ -21,7 +21,7 @@ static char *make_signed_hex_str_16( UINT32 value )
return s_hex;
}
-static const char *s_cpugenreg[] =
+static const char *const s_cpugenreg[] =
{
"zero", "at", "v0", "v1", "a0", "a1", "a2", "a3",
"t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7",
@@ -29,7 +29,7 @@ static const char *s_cpugenreg[] =
"t8", "t9", "k0", "k1", "gp", "sp", "fp", "ra"
};
-static const char *s_cp0genreg[] =
+static const char *const s_cp0genreg[] =
{
"Index", "Random", "EntryLo", "cp0r3", "Context", "cp0r5", "cp0r6", "cp0r7",
"BadVAddr", "cp0r9", "EntryHi", "cp0r11", "SR", "Cause", "EPC", "PRId",
@@ -37,7 +37,7 @@ static const char *s_cp0genreg[] =
"cp0r24", "cp0r25", "cp0r26", "cp0r27", "cp0r28", "cp0r29", "cp0r30", "cp0r31"
};
-static const char *s_cp1genreg[] =
+static const char *const s_cp1genreg[] =
{
"cp1r0", "cp1r1", "cp1r2", "cp1r3", "cp1r4", "cp1r5", "cp1r6", "cp1r7",
"cp1r8", "cp1r9", "cp1r10", "cp1r11", "cp1r12", "cp1r13", "cp1r14", "cp1r15",
@@ -45,7 +45,7 @@ static const char *s_cp1genreg[] =
"cp1r23", "cp1r24", "cp1r25", "cp1r26", "cp1r27", "cp1r28", "cp1r29", "cp1r30"
};
-static const char *s_cp1ctlreg[] =
+static const char *const s_cp1ctlreg[] =
{
"cp1cr0", "cp1cr1", "cp1cr2", "cp1cr3", "cp1cr4", "cp1cr5", "cp1cr6", "cp1cr7",
"cp1cr8", "cp1cr9", "cp1cr10", "cp1cr11", "cp1cr12", "cp1cr13", "cp1cr14", "cp1cr15",
@@ -53,7 +53,7 @@ static const char *s_cp1ctlreg[] =
"cp1cr24", "cp1cr25", "cp1cr26", "cp1cr27", "cp1cr28", "cp1cr29", "cp1cr30", "cp1cr31"
};
-static const char *s_cp2genreg[] =
+static const char *const s_cp2genreg[] =
{
"vxy0", "vz0", "vxy1", "vz1", "vxy2", "vz2", "rgb", "otz",
"ir0", "ir1", "ir2", "ir3", "sxy0", "sxy1", "sxy2", "sxyp",
@@ -61,7 +61,7 @@ static const char *s_cp2genreg[] =
"mac0", "mac1", "mac2", "mac3", "irgb", "orgb", "lzcs", "lzcr"
};
-static const char *s_cp2ctlreg[] =
+static const char *const s_cp2ctlreg[] =
{
"r11r12", "r13r21", "r22r23", "r31r32", "r33", "trx", "try", "trz",
"l11l12", "l13l21", "l22l23", "l31l32", "l33", "rbk", "gbk", "bbk",
@@ -69,27 +69,27 @@ static const char *s_cp2ctlreg[] =
"ofx", "ofy", "h", "dqa", "dqb", "zsf3", "zsf4", "flag"
};
-static const char *s_gtesf[] =
+static const char *const s_gtesf[] =
{
"0", "12"
};
-static const char *s_gtemx[] =
+static const char *const s_gtemx[] =
{
"rm", "lm", "cm", "0"
};
-static const char *s_gtev[] =
+static const char *const s_gtev[] =
{
"v0", "v1", "v2", "ir"
};
-static const char *s_gtecv[] =
+static const char *const s_gtecv[] =
{
"tr", "bk", "fc", "0"
};
-static const char *s_gtelm[] =
+static const char *const s_gtelm[] =
{
"0", "1"
};
diff --git a/src/emu/cpu/mips/psx.c b/src/emu/cpu/mips/psx.c
index 4b304da268f..fd0c9582c4b 100644
--- a/src/emu/cpu/mips/psx.c
+++ b/src/emu/cpu/mips/psx.c
@@ -62,7 +62,7 @@
#define CAUSE_CE2 ( 2L << 28 )
#define CAUSE_BD ( 1L << 31 )
-static const char *delayn[] =
+static const char *const delayn[] =
{
"pc", "at", "v0", "v1", "a0", "a1", "a2", "a3",
"t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7",
@@ -92,7 +92,7 @@ static mips_cpu_context mipscpu;
static int mips_ICount = 0;
-static UINT32 mips_mtc0_writemask[]=
+static const UINT32 mips_mtc0_writemask[]=
{
0xffffffff, /* INDEX */
0x00000000, /* RANDOM */
@@ -2513,23 +2513,23 @@ static void docop2( int gteop )
UINT16 n_v1;
UINT16 n_v2;
UINT16 n_v3;
- const UINT16 **p_n_mx;
- const UINT32 **p_n_cv;
+ const UINT16 *const *p_n_mx;
+ const UINT32 *const *p_n_cv;
static const UINT16 n_zm = 0;
static const UINT32 n_zc = 0;
- static const UINT16 *p_n_vx[] = { &VX0, &VX1, &VX2 };
- static const UINT16 *p_n_vy[] = { &VY0, &VY1, &VY2 };
- static const UINT16 *p_n_vz[] = { &VZ0, &VZ1, &VZ2 };
- static const UINT16 *p_n_rm[] = { &R11, &R12, &R13, &R21, &R22, &R23, &R31, &R32, &R33 };
- static const UINT16 *p_n_lm[] = { &L11, &L12, &L13, &L21, &L22, &L23, &L31, &L32, &L33 };
- static const UINT16 *p_n_cm[] = { &LR1, &LR2, &LR3, &LG1, &LG2, &LG3, &LB1, &LB2, &LB3 };
- static const UINT16 *p_n_zm[] = { &n_zm, &n_zm, &n_zm, &n_zm, &n_zm, &n_zm, &n_zm, &n_zm, &n_zm };
- static const UINT16 **p_p_n_mx[] = { p_n_rm, p_n_lm, p_n_cm, p_n_zm };
- static const UINT32 *p_n_tr[] = { &TRX, &TRY, &TRZ };
- static const UINT32 *p_n_bk[] = { &RBK, &GBK, &BBK };
- static const UINT32 *p_n_fc[] = { &RFC, &GFC, &BFC };
- static const UINT32 *p_n_zc[] = { &n_zc, &n_zc, &n_zc };
- static const UINT32 **p_p_n_cv[] = { p_n_tr, p_n_bk, p_n_fc, p_n_zc };
+ static const UINT16 *const p_n_vx[] = { &VX0, &VX1, &VX2 };
+ static const UINT16 *const p_n_vy[] = { &VY0, &VY1, &VY2 };
+ static const UINT16 *const p_n_vz[] = { &VZ0, &VZ1, &VZ2 };
+ static const UINT16 *const p_n_rm[] = { &R11, &R12, &R13, &R21, &R22, &R23, &R31, &R32, &R33 };
+ static const UINT16 *const p_n_lm[] = { &L11, &L12, &L13, &L21, &L22, &L23, &L31, &L32, &L33 };
+ static const UINT16 *const p_n_cm[] = { &LR1, &LR2, &LR3, &LG1, &LG2, &LG3, &LB1, &LB2, &LB3 };
+ static const UINT16 *const p_n_zm[] = { &n_zm, &n_zm, &n_zm, &n_zm, &n_zm, &n_zm, &n_zm, &n_zm, &n_zm };
+ static const UINT16 *const *p_p_n_mx[] = { p_n_rm, p_n_lm, p_n_cm, p_n_zm };
+ static const UINT32 *const p_n_tr[] = { &TRX, &TRY, &TRZ };
+ static const UINT32 *const p_n_bk[] = { &RBK, &GBK, &BBK };
+ static const UINT32 *const p_n_fc[] = { &RFC, &GFC, &BFC };
+ static const UINT32 *const p_n_zc[] = { &n_zc, &n_zc, &n_zc };
+ static const UINT32 *const *p_p_n_cv[] = { p_n_tr, p_n_bk, p_n_fc, p_n_zc };
switch( GTE_FUNCT( gteop ) )
{
diff --git a/src/emu/cpu/mips/r3kdasm.c b/src/emu/cpu/mips/r3kdasm.c
index f695fcf7dc4..62c8f250ca4 100644
--- a/src/emu/cpu/mips/r3kdasm.c
+++ b/src/emu/cpu/mips/r3kdasm.c
@@ -9,7 +9,7 @@
#include "cpuintrf.h"
-static const char *reg[32] =
+static const char *const reg[32] =
{
"0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
"r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
@@ -18,7 +18,7 @@ static const char *reg[32] =
};
-static const char *cpreg[4][32] =
+static const char *const cpreg[4][32] =
{
{
"Index","Random","EntryLo","cpr3", "Context", "cpr5", "cpr6", "cpr7",
@@ -47,7 +47,7 @@ static const char *cpreg[4][32] =
};
-static const char *ccreg[4][32] =
+static const char *const ccreg[4][32] =
{
{
"ccr0", "ccr1", "ccr2", "ccr3", "ccr4", "ccr5", "ccr6", "ccr7",
diff --git a/src/emu/cpu/nec/nec.c b/src/emu/cpu/nec/nec.c
index cecab37285f..583c79e271a 100644
--- a/src/emu/cpu/nec/nec.c
+++ b/src/emu/cpu/nec/nec.c
@@ -1006,7 +1006,7 @@ static offs_t nec_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8
static void nec_init(int index, int clock, const void *config, int (*irqcallback)(int), int type)
{
- static const char *names[]={"V20","V30","V33"};
+ static const char *const names[]={"V20","V30","V33"};
state_save_register_item_array(names[type], index, I.regs.w);
state_save_register_item_array(names[type], index, I.sregs);
diff --git a/src/emu/cpu/nec/necdasm.c b/src/emu/cpu/nec/necdasm.c
index 9869d12fdcd..b6b0750916f 100644
--- a/src/emu/cpu/nec/necdasm.c
+++ b/src/emu/cpu/nec/necdasm.c
@@ -802,9 +802,9 @@ static const GROUP_OP group_op_table[] =
-static const char *nec_reg[8] = { "aw", "cw", "dw", "bw", "sp", "bp", "ix", "iy" };
-static const char *neg_reg8[8] = { "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh" };
-static const char *nec_sreg[8] = { "ds1", "ps", "ss", "ds0", "???", "???", "???", "???" };
+static const char *const nec_reg[8] = { "aw", "cw", "dw", "bw", "sp", "bp", "ix", "iy" };
+static const char *const neg_reg8[8] = { "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh" };
+static const char *const nec_sreg[8] = { "ds1", "ps", "ss", "ds0", "???", "???", "???", "???" };
static UINT32 pc;
static UINT8 modrm;
diff --git a/src/emu/cpu/pic16c5x/16c5xdsm.c b/src/emu/cpu/pic16c5x/16c5xdsm.c
index 3094347b9e4..b6e810cc5b5 100644
--- a/src/emu/cpu/pic16c5x/16c5xdsm.c
+++ b/src/emu/cpu/pic16c5x/16c5xdsm.c
@@ -52,14 +52,14 @@ typedef unsigned short int word;
#define FMT(a,b) a, b
#define PTRS_PER_FORMAT 2
-static const char *regfile[32] = { "Reg$00 (IND)", "Reg$01 (TMR)", "Reg$02 (PCL)", "Reg$03 (ST)", "Reg$04 (FSR)", "Reg$05 (PTA)", "Reg$06 (PTB)", "Reg$07 (PTC)",
+static const char *const regfile[32] = { "Reg$00 (IND)", "Reg$01 (TMR)", "Reg$02 (PCL)", "Reg$03 (ST)", "Reg$04 (FSR)", "Reg$05 (PTA)", "Reg$06 (PTB)", "Reg$07 (PTC)",
"Reg$08", "Reg$09", "Reg$0A", "Reg$0B", "Reg$0C", "Reg$0D", "Reg$0E", "Reg$0F",
"Reg$10", "Reg$11", "Reg$12", "Reg$13", "Reg$14", "Reg$15", "Reg$16", "Reg$17",
"Reg$18", "Reg$19", "Reg$1A", "Reg$1B", "Reg$1C", "Reg$1D", "Reg$1E", "Reg$1F" };
-static const char *dest[2] = { "W", "Reg" };
+static const char *const dest[2] = { "W", "Reg" };
-static const char *PIC16C5xFormats[] = {
+static const char *const PIC16C5xFormats[] = {
FMT("000000000000", "nop"),
FMT("000000000010", "option"),
FMT("000000000011", "sleep"),
@@ -113,7 +113,8 @@ static int OpInizialized = 0;
static void InitDasm16C5x(void)
{
- const char *p, **ops;
+ const char *p;
+ const char *const *ops;
word mask, bits;
int bit;
int i;
diff --git a/src/emu/cpu/powerpc/drc_ops.c b/src/emu/cpu/powerpc/drc_ops.c
index 4dea2b561e5..b77e570aa74 100644
--- a/src/emu/cpu/powerpc/drc_ops.c
+++ b/src/emu/cpu/powerpc/drc_ops.c
@@ -295,11 +295,11 @@ static UINT32 recompile_instruction(drc_core *drc, UINT32 pc, UINT32 *opptr)
if (opcode != 0) { // this is a little workaround for VF3
switch(opcode >> 26)
{
- case 19: return optable19[(opcode >> 1) & 0x3ff](drc, opcode);
- case 31: return optable31[(opcode >> 1) & 0x3ff](drc, opcode);
- case 59: return optable59[(opcode >> 1) & 0x3ff](drc, opcode);
- case 63: return optable63[(opcode >> 1) & 0x3ff](drc, opcode);
- default: return optable[opcode >> 26](drc, opcode);
+ case 19: return ppc.optable19[(opcode >> 1) & 0x3ff](drc, opcode);
+ case 31: return ppc.optable31[(opcode >> 1) & 0x3ff](drc, opcode);
+ case 59: return ppc.optable59[(opcode >> 1) & 0x3ff](drc, opcode);
+ case 63: return ppc.optable63[(opcode >> 1) & 0x3ff](drc, opcode);
+ default: return ppc.optable[opcode >> 26](drc, opcode);
}
}
return RECOMPILE_SUCCESSFUL | RECOMPILE_END_OF_STRING;
@@ -484,7 +484,7 @@ static void append_branch_or_dispatch(drc_core *drc, UINT32 newpc, int cycles)
/*
// this table translates x86 SF and ZF flags to PPC CR values
-static UINT8 condition_table[4] =
+static const UINT8 condition_table[4] =
{
0x4, // x86 SF == 0, ZF == 0 --> PPC GT (positive)
0x2, // x86 SF == 0, ZF == 1 --> PPC EQ (zero)
diff --git a/src/emu/cpu/powerpc/drc_ops.h b/src/emu/cpu/powerpc/drc_ops.h
index 1bb7b29c517..ad9fe332994 100644
--- a/src/emu/cpu/powerpc/drc_ops.h
+++ b/src/emu/cpu/powerpc/drc_ops.h
@@ -1,4 +1,4 @@
-static PPC_OPCODE ppcdrc_opcode_common[] =
+static const PPC_OPCODE ppcdrc_opcode_common[] =
{
/*code subcode handler */
{ 31, 266, recompile_addx },
diff --git a/src/emu/cpu/powerpc/ppc.c b/src/emu/cpu/powerpc/ppc.c
index a3a4aded42a..8b672d21322 100644
--- a/src/emu/cpu/powerpc/ppc.c
+++ b/src/emu/cpu/powerpc/ppc.c
@@ -4,7 +4,7 @@
#include "ppc.h"
#include "debugger.h"
-#if (HAS_PPC603 || HAS_PPC601)
+#if (HAS_PPC603 || HAS_PPC601 || HAS_PPC604)
void ppc603_exception(int exception);
#endif
#if (HAS_PPC602)
@@ -71,7 +71,7 @@ static void ppc403_spu_w(UINT32 a, UINT8 d);
if((ppc.msr & 0x2000) == 0){ \
}
-#if (HAS_PPC601||HAS_PPC602||HAS_PPC603||HAS_MPC8240)
+#if (HAS_PPC601||HAS_PPC602||HAS_PPC603||HAS_PPC604||HAS_MPC8240)
static UINT32 ppc_field_xlat[256];
#endif
@@ -249,7 +249,7 @@ typedef struct {
FPR fpr[32];
UINT32 sr[16];
-#if HAS_PPC603 || HAS_PPC601 || HAS_MPC8240
+#if HAS_PPC603 || HAS_PPC601 || HAS_MPC8240 || HAS_PPC604
int is603;
#endif
#if HAS_PPC602
@@ -281,6 +281,12 @@ typedef struct {
void (*write16_unaligned)(offs_t address, UINT16 data);
void (*write32_unaligned)(offs_t address, UINT32 data);
void (*write64_unaligned)(offs_t address, UINT64 data);
+
+ void (* optable19[1024])(UINT32);
+ void (* optable31[1024])(UINT32);
+ void (* optable59[1024])(UINT32);
+ void (* optable63[1024])(UINT32);
+ void (* optable[64])(UINT32);
} PPC_REGS;
@@ -317,7 +323,7 @@ INLINE int IS_PPC602(void)
INLINE int IS_PPC603(void)
{
-#if HAS_PPC603 || HAS_PPC601
+#if HAS_PPC603 || HAS_PPC601 || HAS_PPC604
return ppc.is603;
#else
return 0;
@@ -480,7 +486,7 @@ INLINE void ppc_set_spr(int spr, UINT32 value)
case SPR_PVR: return;
}
-#if (HAS_PPC603 || HAS_PPC602 || HAS_PPC601)
+#if (HAS_PPC603 || HAS_PPC602 || HAS_PPC601 || HAS_PPC604)
if(IS_PPC602() || IS_PPC603()) {
switch(spr)
{
@@ -492,7 +498,7 @@ INLINE void ppc_set_spr(int spr, UINT32 value)
if (IS_PPC602())
ppc602_exception(EXCEPTION_DECREMENTER);
#endif
-#if HAS_PPC603 || HAS_PPC601
+#if HAS_PPC603 || HAS_PPC601 || HAS_PPC604
if (IS_PPC603())
ppc603_exception(EXCEPTION_DECREMENTER);
#endif
@@ -691,7 +697,7 @@ INLINE UINT32 ppc_get_spr(int spr)
}
#endif
-#if (HAS_PPC603 || HAS_PPC602 || HAS_PPC601)
+#if (HAS_PPC603 || HAS_PPC602 || HAS_PPC601 || HAS_PPC604)
if (IS_PPC603() || IS_PPC602())
{
switch (spr)
@@ -817,12 +823,6 @@ INLINE void ppc_exception(int exception_type)
/***********************************************************************/
-static void (* optable19[1024])(UINT32);
-static void (* optable31[1024])(UINT32);
-static void (* optable59[1024])(UINT32);
-static void (* optable63[1024])(UINT32);
-static void (* optable[64])(UINT32);
-
#include "ppc_mem.c"
#if (HAS_PPC403)
@@ -833,7 +833,7 @@ static void (* optable[64])(UINT32);
#include "ppc602.c"
#endif
-#if (HAS_PPC603 || HAS_PPC601 || HAS_MPC8240)
+#if (HAS_PPC603 || HAS_PPC601 || HAS_MPC8240 || HAS_PPC604)
#include "ppc603.c"
#endif
@@ -851,13 +851,13 @@ void ppc_init(void)
memset(&ppc, 0, sizeof(ppc));
for( i=0; i < 64; i++ ) {
- optable[i] = ppc_invalid;
+ ppc.optable[i] = ppc_invalid;
}
for( i=0; i < 1024; i++ ) {
- optable19[i] = ppc_invalid;
- optable31[i] = ppc_invalid;
- optable59[i] = ppc_invalid;
- optable63[i] = ppc_invalid;
+ ppc.optable19[i] = ppc_invalid;
+ ppc.optable31[i] = ppc_invalid;
+ ppc.optable59[i] = ppc_invalid;
+ ppc.optable63[i] = ppc_invalid;
}
/* Fill the opcode tables */
@@ -866,11 +866,11 @@ void ppc_init(void)
switch(ppc_opcode_common[i].code)
{
case 19:
- optable19[ppc_opcode_common[i].subcode] = ppc_opcode_common[i].handler;
+ ppc.optable19[ppc_opcode_common[i].subcode] = ppc_opcode_common[i].handler;
break;
case 31:
- optable31[ppc_opcode_common[i].subcode] = ppc_opcode_common[i].handler;
+ ppc.optable31[ppc_opcode_common[i].subcode] = ppc_opcode_common[i].handler;
break;
case 59:
@@ -878,7 +878,7 @@ void ppc_init(void)
break;
default:
- optable[ppc_opcode_common[i].code] = ppc_opcode_common[i].handler;
+ ppc.optable[ppc_opcode_common[i].code] = ppc_opcode_common[i].handler;
}
}
@@ -908,18 +908,18 @@ static void ppc403_init(int index, int clock, const void *_config, int (*irqcall
ppc_init();
/* PPC403 specific opcodes */
- optable31[454] = ppc_dccci;
- optable31[486] = ppc_dcread;
- optable31[262] = ppc_icbt;
- optable31[966] = ppc_iccci;
- optable31[998] = ppc_icread;
- optable31[323] = ppc_mfdcr;
- optable31[451] = ppc_mtdcr;
- optable31[131] = ppc_wrtee;
- optable31[163] = ppc_wrteei;
+ ppc.optable31[454] = ppc_dccci;
+ ppc.optable31[486] = ppc_dcread;
+ ppc.optable31[262] = ppc_icbt;
+ ppc.optable31[966] = ppc_iccci;
+ ppc.optable31[998] = ppc_icread;
+ ppc.optable31[323] = ppc_mfdcr;
+ ppc.optable31[451] = ppc_mtdcr;
+ ppc.optable31[131] = ppc_wrtee;
+ ppc.optable31[163] = ppc_wrteei;
// !!! why is rfci here !!!
- optable19[51] = ppc_rfci;
+ ppc.optable19[51] = ppc_rfci;
ppc.spu.rx_timer = timer_alloc(ppc403_spu_rx_callback, NULL);
ppc.spu.tx_timer = timer_alloc(ppc403_spu_tx_callback, NULL);
@@ -957,78 +957,80 @@ static void ppc603_init(int index, int clock, const void *_config, int (*irqcall
ppc_init() ;
- optable[48] = ppc_lfs;
- optable[49] = ppc_lfsu;
- optable[50] = ppc_lfd;
- optable[51] = ppc_lfdu;
- optable[52] = ppc_stfs;
- optable[53] = ppc_stfsu;
- optable[54] = ppc_stfd;
- optable[55] = ppc_stfdu;
- optable31[631] = ppc_lfdux;
- optable31[599] = ppc_lfdx;
- optable31[567] = ppc_lfsux;
- optable31[535] = ppc_lfsx;
- optable31[595] = ppc_mfsr;
- optable31[659] = ppc_mfsrin;
- optable31[371] = ppc_mftb;
- optable31[210] = ppc_mtsr;
- optable31[242] = ppc_mtsrin;
- optable31[758] = ppc_dcba;
- optable31[759] = ppc_stfdux;
- optable31[727] = ppc_stfdx;
- optable31[983] = ppc_stfiwx;
- optable31[695] = ppc_stfsux;
- optable31[663] = ppc_stfsx;
- optable31[370] = ppc_tlbia;
- optable31[306] = ppc_tlbie;
- optable31[566] = ppc_tlbsync;
- optable31[310] = ppc_eciwx;
- optable31[438] = ppc_ecowx;
-
- optable63[264] = ppc_fabsx;
- optable63[21] = ppc_faddx;
- optable63[32] = ppc_fcmpo;
- optable63[0] = ppc_fcmpu;
- optable63[14] = ppc_fctiwx;
- optable63[15] = ppc_fctiwzx;
- optable63[18] = ppc_fdivx;
- optable63[72] = ppc_fmrx;
- optable63[136] = ppc_fnabsx;
- optable63[40] = ppc_fnegx;
- optable63[12] = ppc_frspx;
- optable63[26] = ppc_frsqrtex;
- optable63[22] = ppc_fsqrtx;
- optable63[20] = ppc_fsubx;
- optable63[583] = ppc_mffsx;
- optable63[70] = ppc_mtfsb0x;
- optable63[38] = ppc_mtfsb1x;
- optable63[711] = ppc_mtfsfx;
- optable63[134] = ppc_mtfsfix;
- optable63[64] = ppc_mcrfs;
-
- optable59[21] = ppc_faddsx;
- optable59[18] = ppc_fdivsx;
- optable59[24] = ppc_fresx;
- optable59[22] = ppc_fsqrtsx;
- optable59[20] = ppc_fsubsx;
+ ppc.optable[48] = ppc_lfs;
+ ppc.optable[49] = ppc_lfsu;
+ ppc.optable[50] = ppc_lfd;
+ ppc.optable[51] = ppc_lfdu;
+ ppc.optable[52] = ppc_stfs;
+ ppc.optable[53] = ppc_stfsu;
+ ppc.optable[54] = ppc_stfd;
+ ppc.optable[55] = ppc_stfdu;
+ ppc.optable31[631] = ppc_lfdux;
+ ppc.optable31[599] = ppc_lfdx;
+ ppc.optable31[567] = ppc_lfsux;
+ ppc.optable31[535] = ppc_lfsx;
+ ppc.optable31[595] = ppc_mfsr;
+ ppc.optable31[659] = ppc_mfsrin;
+ ppc.optable31[371] = ppc_mftb;
+ ppc.optable31[210] = ppc_mtsr;
+ ppc.optable31[242] = ppc_mtsrin;
+ ppc.optable31[758] = ppc_dcba;
+ ppc.optable31[759] = ppc_stfdux;
+ ppc.optable31[727] = ppc_stfdx;
+ ppc.optable31[983] = ppc_stfiwx;
+ ppc.optable31[695] = ppc_stfsux;
+ ppc.optable31[663] = ppc_stfsx;
+ ppc.optable31[370] = ppc_tlbia;
+ ppc.optable31[306] = ppc_tlbie;
+ ppc.optable31[566] = ppc_tlbsync;
+ ppc.optable31[310] = ppc_eciwx;
+ ppc.optable31[438] = ppc_ecowx;
+
+ ppc.optable63[264] = ppc_fabsx;
+ ppc.optable63[21] = ppc_faddx;
+ ppc.optable63[32] = ppc_fcmpo;
+ ppc.optable63[0] = ppc_fcmpu;
+ ppc.optable63[14] = ppc_fctiwx;
+ ppc.optable63[15] = ppc_fctiwzx;
+ ppc.optable63[18] = ppc_fdivx;
+ ppc.optable63[72] = ppc_fmrx;
+ ppc.optable63[136] = ppc_fnabsx;
+ ppc.optable63[40] = ppc_fnegx;
+ ppc.optable63[12] = ppc_frspx;
+ ppc.optable63[26] = ppc_frsqrtex;
+ ppc.optable63[22] = ppc_fsqrtx;
+ ppc.optable63[20] = ppc_fsubx;
+ ppc.optable63[583] = ppc_mffsx;
+ ppc.optable63[70] = ppc_mtfsb0x;
+ ppc.optable63[38] = ppc_mtfsb1x;
+ ppc.optable63[711] = ppc_mtfsfx;
+ ppc.optable63[134] = ppc_mtfsfix;
+ ppc.optable63[64] = ppc_mcrfs;
+
+ ppc.optable59[21] = ppc_faddsx;
+ ppc.optable59[18] = ppc_fdivsx;
+ ppc.optable59[24] = ppc_fresx;
+ ppc.optable59[22] = ppc_fsqrtsx;
+ ppc.optable59[20] = ppc_fsubsx;
for(i = 0; i < 32; i++)
{
- optable63[i * 32 | 29] = ppc_fmaddx;
- optable63[i * 32 | 28] = ppc_fmsubx;
- optable63[i * 32 | 25] = ppc_fmulx;
- optable63[i * 32 | 31] = ppc_fnmaddx;
- optable63[i * 32 | 30] = ppc_fnmsubx;
- optable63[i * 32 | 23] = ppc_fselx;
-
- optable59[i * 32 | 29] = ppc_fmaddsx;
- optable59[i * 32 | 28] = ppc_fmsubsx;
- optable59[i * 32 | 25] = ppc_fmulsx;
- optable59[i * 32 | 31] = ppc_fnmaddsx;
- optable59[i * 32 | 30] = ppc_fnmsubsx;
+ ppc.optable63[i * 32 | 29] = ppc_fmaddx;
+ ppc.optable63[i * 32 | 28] = ppc_fmsubx;
+ ppc.optable63[i * 32 | 25] = ppc_fmulx;
+ ppc.optable63[i * 32 | 31] = ppc_fnmaddx;
+ ppc.optable63[i * 32 | 30] = ppc_fnmsubx;
+ ppc.optable63[i * 32 | 23] = ppc_fselx;
+
+ ppc.optable59[i * 32 | 29] = ppc_fmaddsx;
+ ppc.optable59[i * 32 | 28] = ppc_fmsubsx;
+ ppc.optable59[i * 32 | 25] = ppc_fmulsx;
+ ppc.optable59[i * 32 | 31] = ppc_fnmaddsx;
+ ppc.optable59[i * 32 | 30] = ppc_fnmsubsx;
}
+ ppc.optable31[978] = ppc_tlbld;
+
for(i = 0; i < 256; i++)
{
ppc_field_xlat[i] =
@@ -1099,76 +1101,76 @@ static void ppc602_init(int index, int clock, const void *_config, int (*irqcall
ppc_init() ;
- optable[48] = ppc_lfs;
- optable[49] = ppc_lfsu;
- optable[50] = ppc_lfd;
- optable[51] = ppc_lfdu;
- optable[52] = ppc_stfs;
- optable[53] = ppc_stfsu;
- optable[54] = ppc_stfd;
- optable[55] = ppc_stfdu;
- optable31[631] = ppc_lfdux;
- optable31[599] = ppc_lfdx;
- optable31[567] = ppc_lfsux;
- optable31[535] = ppc_lfsx;
- optable31[595] = ppc_mfsr;
- optable31[659] = ppc_mfsrin;
- optable31[371] = ppc_mftb;
- optable31[210] = ppc_mtsr;
- optable31[242] = ppc_mtsrin;
- optable31[758] = ppc_dcba;
- optable31[759] = ppc_stfdux;
- optable31[727] = ppc_stfdx;
- optable31[983] = ppc_stfiwx;
- optable31[695] = ppc_stfsux;
- optable31[663] = ppc_stfsx;
- optable31[370] = ppc_tlbia;
- optable31[306] = ppc_tlbie;
- optable31[566] = ppc_tlbsync;
- optable31[310] = ppc_eciwx;
- optable31[438] = ppc_ecowx;
-
- optable63[264] = ppc_fabsx;
- optable63[21] = ppc_faddx;
- optable63[32] = ppc_fcmpo;
- optable63[0] = ppc_fcmpu;
- optable63[14] = ppc_fctiwx;
- optable63[15] = ppc_fctiwzx;
- optable63[18] = ppc_fdivx;
- optable63[72] = ppc_fmrx;
- optable63[136] = ppc_fnabsx;
- optable63[40] = ppc_fnegx;
- optable63[12] = ppc_frspx;
- optable63[26] = ppc_frsqrtex;
- optable63[22] = ppc_fsqrtx;
- optable63[20] = ppc_fsubx;
- optable63[583] = ppc_mffsx;
- optable63[70] = ppc_mtfsb0x;
- optable63[38] = ppc_mtfsb1x;
- optable63[711] = ppc_mtfsfx;
- optable63[134] = ppc_mtfsfix;
- optable63[64] = ppc_mcrfs;
-
- optable59[21] = ppc_faddsx;
- optable59[18] = ppc_fdivsx;
- optable59[24] = ppc_fresx;
- optable59[22] = ppc_fsqrtsx;
- optable59[20] = ppc_fsubsx;
+ ppc.optable[48] = ppc_lfs;
+ ppc.optable[49] = ppc_lfsu;
+ ppc.optable[50] = ppc_lfd;
+ ppc.optable[51] = ppc_lfdu;
+ ppc.optable[52] = ppc_stfs;
+ ppc.optable[53] = ppc_stfsu;
+ ppc.optable[54] = ppc_stfd;
+ ppc.optable[55] = ppc_stfdu;
+ ppc.optable31[631] = ppc_lfdux;
+ ppc.optable31[599] = ppc_lfdx;
+ ppc.optable31[567] = ppc_lfsux;
+ ppc.optable31[535] = ppc_lfsx;
+ ppc.optable31[595] = ppc_mfsr;
+ ppc.optable31[659] = ppc_mfsrin;
+ ppc.optable31[371] = ppc_mftb;
+ ppc.optable31[210] = ppc_mtsr;
+ ppc.optable31[242] = ppc_mtsrin;
+ ppc.optable31[758] = ppc_dcba;
+ ppc.optable31[759] = ppc_stfdux;
+ ppc.optable31[727] = ppc_stfdx;
+ ppc.optable31[983] = ppc_stfiwx;
+ ppc.optable31[695] = ppc_stfsux;
+ ppc.optable31[663] = ppc_stfsx;
+ ppc.optable31[370] = ppc_tlbia;
+ ppc.optable31[306] = ppc_tlbie;
+ ppc.optable31[566] = ppc_tlbsync;
+ ppc.optable31[310] = ppc_eciwx;
+ ppc.optable31[438] = ppc_ecowx;
+
+ ppc.optable63[264] = ppc_fabsx;
+ ppc.optable63[21] = ppc_faddx;
+ ppc.optable63[32] = ppc_fcmpo;
+ ppc.optable63[0] = ppc_fcmpu;
+ ppc.optable63[14] = ppc_fctiwx;
+ ppc.optable63[15] = ppc_fctiwzx;
+ ppc.optable63[18] = ppc_fdivx;
+ ppc.optable63[72] = ppc_fmrx;
+ ppc.optable63[136] = ppc_fnabsx;
+ ppc.optable63[40] = ppc_fnegx;
+ ppc.optable63[12] = ppc_frspx;
+ ppc.optable63[26] = ppc_frsqrtex;
+ ppc.optable63[22] = ppc_fsqrtx;
+ ppc.optable63[20] = ppc_fsubx;
+ ppc.optable63[583] = ppc_mffsx;
+ ppc.optable63[70] = ppc_mtfsb0x;
+ ppc.optable63[38] = ppc_mtfsb1x;
+ ppc.optable63[711] = ppc_mtfsfx;
+ ppc.optable63[134] = ppc_mtfsfix;
+ ppc.optable63[64] = ppc_mcrfs;
+
+ ppc.optable59[21] = ppc_faddsx;
+ ppc.optable59[18] = ppc_fdivsx;
+ ppc.optable59[24] = ppc_fresx;
+ ppc.optable59[22] = ppc_fsqrtsx;
+ ppc.optable59[20] = ppc_fsubsx;
for(i = 0; i < 32; i++)
{
- optable63[i * 32 | 29] = ppc_fmaddx;
- optable63[i * 32 | 28] = ppc_fmsubx;
- optable63[i * 32 | 25] = ppc_fmulx;
- optable63[i * 32 | 31] = ppc_fnmaddx;
- optable63[i * 32 | 30] = ppc_fnmsubx;
- optable63[i * 32 | 23] = ppc_fselx;
-
- optable59[i * 32 | 29] = ppc_fmaddsx;
- optable59[i * 32 | 28] = ppc_fmsubsx;
- optable59[i * 32 | 25] = ppc_fmulsx;
- optable59[i * 32 | 31] = ppc_fnmaddsx;
- optable59[i * 32 | 30] = ppc_fnmsubsx;
+ ppc.optable63[i * 32 | 29] = ppc_fmaddx;
+ ppc.optable63[i * 32 | 28] = ppc_fmsubx;
+ ppc.optable63[i * 32 | 25] = ppc_fmulx;
+ ppc.optable63[i * 32 | 31] = ppc_fnmaddx;
+ ppc.optable63[i * 32 | 30] = ppc_fnmsubx;
+ ppc.optable63[i * 32 | 23] = ppc_fselx;
+
+ ppc.optable59[i * 32 | 29] = ppc_fmaddsx;
+ ppc.optable59[i * 32 | 28] = ppc_fmsubsx;
+ ppc.optable59[i * 32 | 25] = ppc_fmulsx;
+ ppc.optable59[i * 32 | 31] = ppc_fnmaddsx;
+ ppc.optable59[i * 32 | 30] = ppc_fnmsubsx;
}
for(i = 0; i < 256; i++)
@@ -1185,10 +1187,10 @@ static void ppc602_init(int index, int clock, const void *_config, int (*irqcall
}
// PPC602 specific opcodes
- optable31[596] = ppc_esa;
- optable31[628] = ppc_dsa;
- optable31[1010] = ppc_tlbli;
- optable31[978] = ppc_tlbld;
+ ppc.optable31[596] = ppc_esa;
+ ppc.optable31[628] = ppc_dsa;
+ ppc.optable31[1010] = ppc_tlbli;
+ ppc.optable31[978] = ppc_tlbld;
ppc.is602 = 1;
@@ -1243,76 +1245,76 @@ static void mpc8240_init(int index, int clock, const void *_config, int (*irqcal
ppc_init();
- optable[48] = ppc_lfs;
- optable[49] = ppc_lfsu;
- optable[50] = ppc_lfd;
- optable[51] = ppc_lfdu;
- optable[52] = ppc_stfs;
- optable[53] = ppc_stfsu;
- optable[54] = ppc_stfd;
- optable[55] = ppc_stfdu;
- optable31[631] = ppc_lfdux;
- optable31[599] = ppc_lfdx;
- optable31[567] = ppc_lfsux;
- optable31[535] = ppc_lfsx;
- optable31[595] = ppc_mfsr;
- optable31[659] = ppc_mfsrin;
- optable31[371] = ppc_mftb;
- optable31[210] = ppc_mtsr;
- optable31[242] = ppc_mtsrin;
- optable31[758] = ppc_dcba;
- optable31[759] = ppc_stfdux;
- optable31[727] = ppc_stfdx;
- optable31[983] = ppc_stfiwx;
- optable31[695] = ppc_stfsux;
- optable31[663] = ppc_stfsx;
- optable31[370] = ppc_tlbia;
- optable31[306] = ppc_tlbie;
- optable31[566] = ppc_tlbsync;
- optable31[310] = ppc_eciwx;
- optable31[438] = ppc_ecowx;
-
- optable63[264] = ppc_fabsx;
- optable63[21] = ppc_faddx;
- optable63[32] = ppc_fcmpo;
- optable63[0] = ppc_fcmpu;
- optable63[14] = ppc_fctiwx;
- optable63[15] = ppc_fctiwzx;
- optable63[18] = ppc_fdivx;
- optable63[72] = ppc_fmrx;
- optable63[136] = ppc_fnabsx;
- optable63[40] = ppc_fnegx;
- optable63[12] = ppc_frspx;
- optable63[26] = ppc_frsqrtex;
- optable63[22] = ppc_fsqrtx;
- optable63[20] = ppc_fsubx;
- optable63[583] = ppc_mffsx;
- optable63[70] = ppc_mtfsb0x;
- optable63[38] = ppc_mtfsb1x;
- optable63[711] = ppc_mtfsfx;
- optable63[134] = ppc_mtfsfix;
- optable63[64] = ppc_mcrfs;
-
- optable59[21] = ppc_faddsx;
- optable59[18] = ppc_fdivsx;
- optable59[24] = ppc_fresx;
- optable59[22] = ppc_fsqrtsx;
- optable59[20] = ppc_fsubsx;
+ ppc.optable[48] = ppc_lfs;
+ ppc.optable[49] = ppc_lfsu;
+ ppc.optable[50] = ppc_lfd;
+ ppc.optable[51] = ppc_lfdu;
+ ppc.optable[52] = ppc_stfs;
+ ppc.optable[53] = ppc_stfsu;
+ ppc.optable[54] = ppc_stfd;
+ ppc.optable[55] = ppc_stfdu;
+ ppc.optable31[631] = ppc_lfdux;
+ ppc.optable31[599] = ppc_lfdx;
+ ppc.optable31[567] = ppc_lfsux;
+ ppc.optable31[535] = ppc_lfsx;
+ ppc.optable31[595] = ppc_mfsr;
+ ppc.optable31[659] = ppc_mfsrin;
+ ppc.optable31[371] = ppc_mftb;
+ ppc.optable31[210] = ppc_mtsr;
+ ppc.optable31[242] = ppc_mtsrin;
+ ppc.optable31[758] = ppc_dcba;
+ ppc.optable31[759] = ppc_stfdux;
+ ppc.optable31[727] = ppc_stfdx;
+ ppc.optable31[983] = ppc_stfiwx;
+ ppc.optable31[695] = ppc_stfsux;
+ ppc.optable31[663] = ppc_stfsx;
+ ppc.optable31[370] = ppc_tlbia;
+ ppc.optable31[306] = ppc_tlbie;
+ ppc.optable31[566] = ppc_tlbsync;
+ ppc.optable31[310] = ppc_eciwx;
+ ppc.optable31[438] = ppc_ecowx;
+
+ ppc.optable63[264] = ppc_fabsx;
+ ppc.optable63[21] = ppc_faddx;
+ ppc.optable63[32] = ppc_fcmpo;
+ ppc.optable63[0] = ppc_fcmpu;
+ ppc.optable63[14] = ppc_fctiwx;
+ ppc.optable63[15] = ppc_fctiwzx;
+ ppc.optable63[18] = ppc_fdivx;
+ ppc.optable63[72] = ppc_fmrx;
+ ppc.optable63[136] = ppc_fnabsx;
+ ppc.optable63[40] = ppc_fnegx;
+ ppc.optable63[12] = ppc_frspx;
+ ppc.optable63[26] = ppc_frsqrtex;
+ ppc.optable63[22] = ppc_fsqrtx;
+ ppc.optable63[20] = ppc_fsubx;
+ ppc.optable63[583] = ppc_mffsx;
+ ppc.optable63[70] = ppc_mtfsb0x;
+ ppc.optable63[38] = ppc_mtfsb1x;
+ ppc.optable63[711] = ppc_mtfsfx;
+ ppc.optable63[134] = ppc_mtfsfix;
+ ppc.optable63[64] = ppc_mcrfs;
+
+ ppc.optable59[21] = ppc_faddsx;
+ ppc.optable59[18] = ppc_fdivsx;
+ ppc.optable59[24] = ppc_fresx;
+ ppc.optable59[22] = ppc_fsqrtsx;
+ ppc.optable59[20] = ppc_fsubsx;
for(i = 0; i < 32; i++)
{
- optable63[i * 32 | 29] = ppc_fmaddx;
- optable63[i * 32 | 28] = ppc_fmsubx;
- optable63[i * 32 | 25] = ppc_fmulx;
- optable63[i * 32 | 31] = ppc_fnmaddx;
- optable63[i * 32 | 30] = ppc_fnmsubx;
- optable63[i * 32 | 23] = ppc_fselx;
-
- optable59[i * 32 | 29] = ppc_fmaddsx;
- optable59[i * 32 | 28] = ppc_fmsubsx;
- optable59[i * 32 | 25] = ppc_fmulsx;
- optable59[i * 32 | 31] = ppc_fnmaddsx;
- optable59[i * 32 | 30] = ppc_fnmsubsx;
+ ppc.optable63[i * 32 | 29] = ppc_fmaddx;
+ ppc.optable63[i * 32 | 28] = ppc_fmsubx;
+ ppc.optable63[i * 32 | 25] = ppc_fmulx;
+ ppc.optable63[i * 32 | 31] = ppc_fnmaddx;
+ ppc.optable63[i * 32 | 30] = ppc_fnmsubx;
+ ppc.optable63[i * 32 | 23] = ppc_fselx;
+
+ ppc.optable59[i * 32 | 29] = ppc_fmaddsx;
+ ppc.optable59[i * 32 | 28] = ppc_fmsubsx;
+ ppc.optable59[i * 32 | 25] = ppc_fmulsx;
+ ppc.optable59[i * 32 | 31] = ppc_fnmaddsx;
+ ppc.optable59[i * 32 | 30] = ppc_fnmsubsx;
}
for(i = 0; i < 256; i++)
@@ -1329,8 +1331,8 @@ static void mpc8240_init(int index, int clock, const void *_config, int (*irqcal
}
// MPC8240 specific opcodes
- optable31[978] = mpc8240_tlbld;
- optable31[1010] = mpc8240_tlbli;
+ ppc.optable31[978] = mpc8240_tlbld;
+ ppc.optable31[1010] = mpc8240_tlbli;
ppc.is603 = 1;
@@ -1374,76 +1376,76 @@ static void ppc601_init(int index, int clock, const void *_config, int (*irqcall
ppc_init() ;
- optable[48] = ppc_lfs;
- optable[49] = ppc_lfsu;
- optable[50] = ppc_lfd;
- optable[51] = ppc_lfdu;
- optable[52] = ppc_stfs;
- optable[53] = ppc_stfsu;
- optable[54] = ppc_stfd;
- optable[55] = ppc_stfdu;
- optable31[631] = ppc_lfdux;
- optable31[599] = ppc_lfdx;
- optable31[567] = ppc_lfsux;
- optable31[535] = ppc_lfsx;
- optable31[595] = ppc_mfsr;
- optable31[659] = ppc_mfsrin;
- optable31[371] = ppc_mftb;
- optable31[210] = ppc_mtsr;
- optable31[242] = ppc_mtsrin;
- optable31[758] = ppc_dcba;
- optable31[759] = ppc_stfdux;
- optable31[727] = ppc_stfdx;
- optable31[983] = ppc_stfiwx;
- optable31[695] = ppc_stfsux;
- optable31[663] = ppc_stfsx;
- optable31[370] = ppc_tlbia;
- optable31[306] = ppc_tlbie;
- optable31[566] = ppc_tlbsync;
- optable31[310] = ppc_eciwx;
- optable31[438] = ppc_ecowx;
-
- optable63[264] = ppc_fabsx;
- optable63[21] = ppc_faddx;
- optable63[32] = ppc_fcmpo;
- optable63[0] = ppc_fcmpu;
- optable63[14] = ppc_fctiwx;
- optable63[15] = ppc_fctiwzx;
- optable63[18] = ppc_fdivx;
- optable63[72] = ppc_fmrx;
- optable63[136] = ppc_fnabsx;
- optable63[40] = ppc_fnegx;
- optable63[12] = ppc_frspx;
- optable63[26] = ppc_frsqrtex;
- optable63[22] = ppc_fsqrtx;
- optable63[20] = ppc_fsubx;
- optable63[583] = ppc_mffsx;
- optable63[70] = ppc_mtfsb0x;
- optable63[38] = ppc_mtfsb1x;
- optable63[711] = ppc_mtfsfx;
- optable63[134] = ppc_mtfsfix;
- optable63[64] = ppc_mcrfs;
-
- optable59[21] = ppc_faddsx;
- optable59[18] = ppc_fdivsx;
- optable59[24] = ppc_fresx;
- optable59[22] = ppc_fsqrtsx;
- optable59[20] = ppc_fsubsx;
+ ppc.optable[48] = ppc_lfs;
+ ppc.optable[49] = ppc_lfsu;
+ ppc.optable[50] = ppc_lfd;
+ ppc.optable[51] = ppc_lfdu;
+ ppc.optable[52] = ppc_stfs;
+ ppc.optable[53] = ppc_stfsu;
+ ppc.optable[54] = ppc_stfd;
+ ppc.optable[55] = ppc_stfdu;
+ ppc.optable31[631] = ppc_lfdux;
+ ppc.optable31[599] = ppc_lfdx;
+ ppc.optable31[567] = ppc_lfsux;
+ ppc.optable31[535] = ppc_lfsx;
+ ppc.optable31[595] = ppc_mfsr;
+ ppc.optable31[659] = ppc_mfsrin;
+ ppc.optable31[371] = ppc_mftb;
+ ppc.optable31[210] = ppc_mtsr;
+ ppc.optable31[242] = ppc_mtsrin;
+ ppc.optable31[758] = ppc_dcba;
+ ppc.optable31[759] = ppc_stfdux;
+ ppc.optable31[727] = ppc_stfdx;
+ ppc.optable31[983] = ppc_stfiwx;
+ ppc.optable31[695] = ppc_stfsux;
+ ppc.optable31[663] = ppc_stfsx;
+ ppc.optable31[370] = ppc_tlbia;
+ ppc.optable31[306] = ppc_tlbie;
+ ppc.optable31[566] = ppc_tlbsync;
+ ppc.optable31[310] = ppc_eciwx;
+ ppc.optable31[438] = ppc_ecowx;
+
+ ppc.optable63[264] = ppc_fabsx;
+ ppc.optable63[21] = ppc_faddx;
+ ppc.optable63[32] = ppc_fcmpo;
+ ppc.optable63[0] = ppc_fcmpu;
+ ppc.optable63[14] = ppc_fctiwx;
+ ppc.optable63[15] = ppc_fctiwzx;
+ ppc.optable63[18] = ppc_fdivx;
+ ppc.optable63[72] = ppc_fmrx;
+ ppc.optable63[136] = ppc_fnabsx;
+ ppc.optable63[40] = ppc_fnegx;
+ ppc.optable63[12] = ppc_frspx;
+ ppc.optable63[26] = ppc_frsqrtex;
+ ppc.optable63[22] = ppc_fsqrtx;
+ ppc.optable63[20] = ppc_fsubx;
+ ppc.optable63[583] = ppc_mffsx;
+ ppc.optable63[70] = ppc_mtfsb0x;
+ ppc.optable63[38] = ppc_mtfsb1x;
+ ppc.optable63[711] = ppc_mtfsfx;
+ ppc.optable63[134] = ppc_mtfsfix;
+ ppc.optable63[64] = ppc_mcrfs;
+
+ ppc.optable59[21] = ppc_faddsx;
+ ppc.optable59[18] = ppc_fdivsx;
+ ppc.optable59[24] = ppc_fresx;
+ ppc.optable59[22] = ppc_fsqrtsx;
+ ppc.optable59[20] = ppc_fsubsx;
for(i = 0; i < 32; i++)
{
- optable63[i * 32 | 29] = ppc_fmaddx;
- optable63[i * 32 | 28] = ppc_fmsubx;
- optable63[i * 32 | 25] = ppc_fmulx;
- optable63[i * 32 | 31] = ppc_fnmaddx;
- optable63[i * 32 | 30] = ppc_fnmsubx;
- optable63[i * 32 | 23] = ppc_fselx;
-
- optable59[i * 32 | 29] = ppc_fmaddsx;
- optable59[i * 32 | 28] = ppc_fmsubsx;
- optable59[i * 32 | 25] = ppc_fmulsx;
- optable59[i * 32 | 31] = ppc_fnmaddsx;
- optable59[i * 32 | 30] = ppc_fnmsubsx;
+ ppc.optable63[i * 32 | 29] = ppc_fmaddx;
+ ppc.optable63[i * 32 | 28] = ppc_fmsubx;
+ ppc.optable63[i * 32 | 25] = ppc_fmulx;
+ ppc.optable63[i * 32 | 31] = ppc_fnmaddx;
+ ppc.optable63[i * 32 | 30] = ppc_fnmsubx;
+ ppc.optable63[i * 32 | 23] = ppc_fselx;
+
+ ppc.optable59[i * 32 | 29] = ppc_fmaddsx;
+ ppc.optable59[i * 32 | 28] = ppc_fmsubsx;
+ ppc.optable59[i * 32 | 25] = ppc_fmulsx;
+ ppc.optable59[i * 32 | 31] = ppc_fnmaddsx;
+ ppc.optable59[i * 32 | 30] = ppc_fnmsubsx;
}
for(i = 0; i < 256; i++)
@@ -1493,6 +1495,136 @@ static void ppc601_exit(void)
}
#endif
+#if (HAS_PPC604)
+static void ppc604_init(int index, int clock, const void *_config, int (*irqcallback)(int))
+{
+ const ppc_config *config = _config;
+ float multiplier;
+ int i ;
+
+ ppc_init() ;
+
+ ppc.optable[48] = ppc_lfs;
+ ppc.optable[49] = ppc_lfsu;
+ ppc.optable[50] = ppc_lfd;
+ ppc.optable[51] = ppc_lfdu;
+ ppc.optable[52] = ppc_stfs;
+ ppc.optable[53] = ppc_stfsu;
+ ppc.optable[54] = ppc_stfd;
+ ppc.optable[55] = ppc_stfdu;
+ ppc.optable31[631] = ppc_lfdux;
+ ppc.optable31[599] = ppc_lfdx;
+ ppc.optable31[567] = ppc_lfsux;
+ ppc.optable31[535] = ppc_lfsx;
+ ppc.optable31[595] = ppc_mfsr;
+ ppc.optable31[659] = ppc_mfsrin;
+ ppc.optable31[371] = ppc_mftb;
+ ppc.optable31[210] = ppc_mtsr;
+ ppc.optable31[242] = ppc_mtsrin;
+ ppc.optable31[758] = ppc_dcba;
+ ppc.optable31[759] = ppc_stfdux;
+ ppc.optable31[727] = ppc_stfdx;
+ ppc.optable31[983] = ppc_stfiwx;
+ ppc.optable31[695] = ppc_stfsux;
+ ppc.optable31[663] = ppc_stfsx;
+ ppc.optable31[370] = ppc_tlbia;
+ ppc.optable31[306] = ppc_tlbie;
+ ppc.optable31[566] = ppc_tlbsync;
+ ppc.optable31[310] = ppc_eciwx;
+ ppc.optable31[438] = ppc_ecowx;
+
+ ppc.optable63[264] = ppc_fabsx;
+ ppc.optable63[21] = ppc_faddx;
+ ppc.optable63[32] = ppc_fcmpo;
+ ppc.optable63[0] = ppc_fcmpu;
+ ppc.optable63[14] = ppc_fctiwx;
+ ppc.optable63[15] = ppc_fctiwzx;
+ ppc.optable63[18] = ppc_fdivx;
+ ppc.optable63[72] = ppc_fmrx;
+ ppc.optable63[136] = ppc_fnabsx;
+ ppc.optable63[40] = ppc_fnegx;
+ ppc.optable63[12] = ppc_frspx;
+ ppc.optable63[26] = ppc_frsqrtex;
+ ppc.optable63[22] = ppc_fsqrtx;
+ ppc.optable63[20] = ppc_fsubx;
+ ppc.optable63[583] = ppc_mffsx;
+ ppc.optable63[70] = ppc_mtfsb0x;
+ ppc.optable63[38] = ppc_mtfsb1x;
+ ppc.optable63[711] = ppc_mtfsfx;
+ ppc.optable63[134] = ppc_mtfsfix;
+ ppc.optable63[64] = ppc_mcrfs;
+
+ ppc.optable59[21] = ppc_faddsx;
+ ppc.optable59[18] = ppc_fdivsx;
+ ppc.optable59[24] = ppc_fresx;
+ ppc.optable59[22] = ppc_fsqrtsx;
+ ppc.optable59[20] = ppc_fsubsx;
+
+ for(i = 0; i < 32; i++)
+ {
+ ppc.optable63[i * 32 | 29] = ppc_fmaddx;
+ ppc.optable63[i * 32 | 28] = ppc_fmsubx;
+ ppc.optable63[i * 32 | 25] = ppc_fmulx;
+ ppc.optable63[i * 32 | 31] = ppc_fnmaddx;
+ ppc.optable63[i * 32 | 30] = ppc_fnmsubx;
+ ppc.optable63[i * 32 | 23] = ppc_fselx;
+
+ ppc.optable59[i * 32 | 29] = ppc_fmaddsx;
+ ppc.optable59[i * 32 | 28] = ppc_fmsubsx;
+ ppc.optable59[i * 32 | 25] = ppc_fmulsx;
+ ppc.optable59[i * 32 | 31] = ppc_fnmaddsx;
+ ppc.optable59[i * 32 | 30] = ppc_fnmsubsx;
+ }
+
+ ppc.optable31[978] = ppc_tlbld;
+
+ for(i = 0; i < 256; i++)
+ {
+ ppc_field_xlat[i] =
+ ((i & 0x80) ? 0xF0000000 : 0) |
+ ((i & 0x40) ? 0x0F000000 : 0) |
+ ((i & 0x20) ? 0x00F00000 : 0) |
+ ((i & 0x10) ? 0x000F0000 : 0) |
+ ((i & 0x08) ? 0x0000F000 : 0) |
+ ((i & 0x04) ? 0x00000F00 : 0) |
+ ((i & 0x02) ? 0x000000F0 : 0) |
+ ((i & 0x01) ? 0x0000000F : 0);
+ }
+
+ ppc.is603 = 1;
+
+ ppc.read8 = program_read_byte_64be;
+ ppc.read16 = program_read_word_64be;
+ ppc.read32 = program_read_dword_64be;
+ ppc.read64 = program_read_qword_64be;
+ ppc.write8 = program_write_byte_64be;
+ ppc.write16 = program_write_word_64be;
+ ppc.write32 = program_write_dword_64be;
+ ppc.write64 = program_write_qword_64be;
+ ppc.read16_unaligned = ppc_read16_unaligned;
+ ppc.read32_unaligned = ppc_read32_unaligned;
+ ppc.read64_unaligned = ppc_read64_unaligned;
+ ppc.write16_unaligned = ppc_write16_unaligned;
+ ppc.write32_unaligned = ppc_write32_unaligned;
+ ppc.write64_unaligned = ppc_write64_unaligned;
+
+ ppc.irq_callback = irqcallback;
+
+ ppc.pvr = config->pvr;
+
+ multiplier = (float)((config->bus_frequency_multiplier >> 4) & 0xf) +
+ (float)(config->bus_frequency_multiplier & 0xf) / 10.0f;
+ bus_freq_multiplier = (int)(multiplier * 2);
+
+ ppc.hid1 = 0;
+}
+
+static void ppc604_exit(void)
+{
+
+}
+#endif
+
static void ppc_get_context(void *dst)
@@ -1936,3 +2068,48 @@ void ppc601_get_info(UINT32 state, cpuinfo *info)
}
}
#endif
+
+/* PPC604 */
+
+#if (HAS_PPC604)
+static void ppc604_set_info(UINT32 state, cpuinfo *info)
+{
+ if (state >= CPUINFO_INT_INPUT_STATE && state <= CPUINFO_INT_INPUT_STATE + 5)
+ {
+ ppc603_set_irq_line(state-CPUINFO_INT_INPUT_STATE, info->i);
+ return;
+ }
+ switch(state)
+ {
+ default: ppc_set_info(state, info); break;
+ }
+}
+
+void ppc604_get_info(UINT32 state, cpuinfo *info)
+{
+ switch(state)
+ {
+ /* --- the following bits of info are returned as 64-bit signed integers --- */
+ case CPUINFO_INT_INPUT_LINES: info->i = 5; break;
+ case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break;
+
+ case CPUINFO_INT_DATABUS_WIDTH + ADDRESS_SPACE_PROGRAM: info->i = 64; break;
+ case CPUINFO_INT_ADDRBUS_WIDTH + ADDRESS_SPACE_PROGRAM: info->i = 32; break;
+
+ /* --- the following bits of info are returned as pointers to data or functions --- */
+ case CPUINFO_PTR_SET_INFO: info->setinfo = ppc604_set_info; break;
+ case CPUINFO_PTR_INIT: info->init = ppc604_init; break;
+ case CPUINFO_PTR_RESET: info->reset = ppc603_reset; break;
+ case CPUINFO_PTR_EXIT: info->exit = ppc604_exit; break;
+ case CPUINFO_PTR_EXECUTE: info->execute = ppc603_execute; break;
+ case CPUINFO_PTR_READ: info->read = ppc_read; break;
+ case CPUINFO_PTR_WRITE: info->write = ppc_write; break;
+ case CPUINFO_PTR_READOP: info->readop = ppc_readop; break;
+
+ /* --- the following bits of info are returned as NULL-terminated strings --- */
+ case CPUINFO_STR_NAME: strcpy(info->s, "PPC604"); break;
+
+ default: ppc_get_info(state, info); break;
+ }
+}
+#endif
diff --git a/src/emu/cpu/powerpc/ppc.h b/src/emu/cpu/powerpc/ppc.h
index 0a3ab6640f2..70982008008 100644
--- a/src/emu/cpu/powerpc/ppc.h
+++ b/src/emu/cpu/powerpc/ppc.h
@@ -360,6 +360,10 @@ void mpc8240_get_info(UINT32 state, cpuinfo *info);
void ppc601_get_info(UINT32 state, cpuinfo *info);
#endif
+#if (HAS_PPC604)
+void ppc604_get_info(UINT32 state, cpuinfo *info);
+#endif
+
#ifdef MAME_DEBUG
extern offs_t ppc_dasm_one(char *buffer, offs_t pc, UINT32 op);
#endif
diff --git a/src/emu/cpu/powerpc/ppc403.c b/src/emu/cpu/powerpc/ppc403.c
index aa57f1a2ef6..6bebc01cb1f 100644
--- a/src/emu/cpu/powerpc/ppc403.c
+++ b/src/emu/cpu/powerpc/ppc403.c
@@ -184,11 +184,11 @@ static int ppc403_execute(int cycles)
switch(opcode >> 26)
{
- case 19: optable19[(opcode >> 1) & 0x3ff](opcode); break;
- case 31: optable31[(opcode >> 1) & 0x3ff](opcode); break;
- case 59: optable59[(opcode >> 1) & 0x3ff](opcode); break;
- case 63: optable63[(opcode >> 1) & 0x3ff](opcode); break;
- default: optable[opcode >> 26](opcode); break;
+ case 19: ppc.optable19[(opcode >> 1) & 0x3ff](opcode); break;
+ case 31: ppc.optable31[(opcode >> 1) & 0x3ff](opcode); break;
+ case 59: ppc.optable59[(opcode >> 1) & 0x3ff](opcode); break;
+ case 63: ppc.optable63[(opcode >> 1) & 0x3ff](opcode); break;
+ default: ppc.optable[opcode >> 26](opcode); break;
}
ppc_icount--;
diff --git a/src/emu/cpu/powerpc/ppc602.c b/src/emu/cpu/powerpc/ppc602.c
index a53b08850af..6bfee3a756a 100644
--- a/src/emu/cpu/powerpc/ppc602.c
+++ b/src/emu/cpu/powerpc/ppc602.c
@@ -264,11 +264,11 @@ static int ppc602_execute(int cycles)
ppc.npc = ppc.pc + 4;
switch(opcode >> 26)
{
- case 19: optable19[(opcode >> 1) & 0x3ff](opcode); break;
- case 31: optable31[(opcode >> 1) & 0x3ff](opcode); break;
- case 59: optable59[(opcode >> 1) & 0x3ff](opcode); break;
- case 63: optable63[(opcode >> 1) & 0x3ff](opcode); break;
- default: optable[opcode >> 26](opcode); break;
+ case 19: ppc.optable19[(opcode >> 1) & 0x3ff](opcode); break;
+ case 31: ppc.optable31[(opcode >> 1) & 0x3ff](opcode); break;
+ case 59: ppc.optable59[(opcode >> 1) & 0x3ff](opcode); break;
+ case 63: ppc.optable63[(opcode >> 1) & 0x3ff](opcode); break;
+ default: ppc.optable[opcode >> 26](opcode); break;
}
ppc_icount--;
diff --git a/src/emu/cpu/powerpc/ppc603.c b/src/emu/cpu/powerpc/ppc603.c
index b03affe7062..8d27831028e 100644
--- a/src/emu/cpu/powerpc/ppc603.c
+++ b/src/emu/cpu/powerpc/ppc603.c
@@ -272,11 +272,11 @@ static int ppc603_execute(int cycles)
ppc.npc = ppc.pc + 4;
switch(opcode >> 26)
{
- case 19: optable19[(opcode >> 1) & 0x3ff](opcode); break;
- case 31: optable31[(opcode >> 1) & 0x3ff](opcode); break;
- case 59: optable59[(opcode >> 1) & 0x3ff](opcode); break;
- case 63: optable63[(opcode >> 1) & 0x3ff](opcode); break;
- default: optable[opcode >> 26](opcode); break;
+ case 19: ppc.optable19[(opcode >> 1) & 0x3ff](opcode); break;
+ case 31: ppc.optable31[(opcode >> 1) & 0x3ff](opcode); break;
+ case 59: ppc.optable59[(opcode >> 1) & 0x3ff](opcode); break;
+ case 63: ppc.optable63[(opcode >> 1) & 0x3ff](opcode); break;
+ default: ppc.optable[opcode >> 26](opcode); break;
}
ppc_icount--;
diff --git a/src/emu/cpu/powerpc/ppc_dasm.c b/src/emu/cpu/powerpc/ppc_dasm.c
index 4d30f9987d1..2f24713bab8 100644
--- a/src/emu/cpu/powerpc/ppc_dasm.c
+++ b/src/emu/cpu/powerpc/ppc_dasm.c
@@ -208,7 +208,7 @@ typedef struct
* and print instructions.
*/
-static IDESCR itab[] =
+static const IDESCR itab[] =
{
{ "add", D_OP(31)|D_XO(266), M_RT|M_RA|M_RB|M_OE|M_RC, F_RT_RA_RB, FL_OE|FL_RC },
{ "addc", D_OP(31)|D_XO(10), M_RT|M_RA|M_RB|M_OE|M_RC, F_RT_RA_RB, FL_OE|FL_RC },
@@ -423,7 +423,7 @@ static IDESCR itab[] =
* Use an index of BI&3 into this table to obtain the CR field bit name.
*/
-static char crbit[][4] = { "lt", "gt", "eq", "so" };
+static const char *const crbit[4] = { "lt", "gt", "eq", "so" };
/*
diff --git a/src/emu/cpu/powerpc/ppcdrc.c b/src/emu/cpu/powerpc/ppcdrc.c
index 77948103c42..98decf6fdc7 100644
--- a/src/emu/cpu/powerpc/ppcdrc.c
+++ b/src/emu/cpu/powerpc/ppcdrc.c
@@ -20,7 +20,7 @@
static void ppcdrc603_init(int index, int clock, const void *_config, int (*irqcallback)(int));
static void ppcdrc603_exit(void);
#endif
-#if (HAS_PPC601 || HAS_PPC603 || HAS_MPC8240)
+#if (HAS_PPC601 || HAS_PPC603 || HAS_MPC8240 || HAS_PPC604)
static void ppcdrc603_reset(void);
static int ppcdrc603_execute(int cycles);
static void ppcdrc603_set_irq_line(int irqline, int state);
@@ -102,7 +102,7 @@ static void ppcdrc_entrygen(drc_core *drc);
if((ppc.msr & 0x2000) == 0){ \
}
-#if (HAS_PPC601||HAS_PPC602||HAS_PPC603||HAS_MPC8240)
+#if (HAS_PPC601||HAS_PPC602||HAS_PPC603||HAS_PPC604||HAS_MPC8240)
static UINT32 ppc_field_xlat[256];
#endif
@@ -317,6 +317,12 @@ typedef struct {
/* saved ESP when entering entry point */
UINT32 host_esp;
+
+ UINT32 (* optable19[1024])(drc_core *, UINT32);
+ UINT32 (* optable31[1024])(drc_core *, UINT32);
+ UINT32 (* optable59[1024])(drc_core *, UINT32);
+ UINT32 (* optable63[1024])(drc_core *, UINT32);
+ UINT32 (* optable[64])(drc_core *, UINT32);
} PPC_REGS;
@@ -522,7 +528,7 @@ INLINE void ppc_set_spr(int spr, UINT32 value)
case SPR_PVR: return;
}
-#if (HAS_PPC603 || HAS_PPC602 || HAS_PPC601)
+#if (HAS_PPC603 || HAS_PPC602 || HAS_PPC601 || HAS_PPC604)
if(ppc.is603 || ppc.is602) {
switch(spr)
{
@@ -735,7 +741,7 @@ INLINE UINT32 ppc_get_spr(int spr)
}
#endif
-#if (HAS_PPC603 || HAS_PPC602 || HAS_PPC601)
+#if (HAS_PPC603 || HAS_PPC602 || HAS_PPC601 || HAS_PPC604)
if (ppc.is603 || ppc.is602)
{
switch (spr)
@@ -861,12 +867,6 @@ static void log_code(drc_core *drc)
/***********************************************************************/
-static UINT32 (* optable19[1024])(drc_core *, UINT32);
-static UINT32 (* optable31[1024])(drc_core *, UINT32);
-static UINT32 (* optable59[1024])(drc_core *, UINT32);
-static UINT32 (* optable63[1024])(drc_core *, UINT32);
-static UINT32 (* optable[64])(drc_core *, UINT32);
-
#include "ppc_mem.c"
#if (HAS_PPC403)
@@ -1007,13 +1007,13 @@ static void ppc_init(void)
int i,j;
for( i=0; i < 64; i++ ) {
- optable[i] = recompile_invalid;
+ ppc.optable[i] = recompile_invalid;
}
for( i=0; i < 1024; i++ ) {
- optable19[i] = recompile_invalid;
- optable31[i] = recompile_invalid;
- optable59[i] = recompile_invalid;
- optable63[i] = recompile_invalid;
+ ppc.optable19[i] = recompile_invalid;
+ ppc.optable31[i] = recompile_invalid;
+ ppc.optable59[i] = recompile_invalid;
+ ppc.optable63[i] = recompile_invalid;
}
/* Fill the opcode tables */
@@ -1022,11 +1022,11 @@ static void ppc_init(void)
switch(ppcdrc_opcode_common[i].code)
{
case 19:
- optable19[ppcdrc_opcode_common[i].subcode] = ppcdrc_opcode_common[i].handler;
+ ppc.optable19[ppcdrc_opcode_common[i].subcode] = ppcdrc_opcode_common[i].handler;
break;
case 31:
- optable31[ppcdrc_opcode_common[i].subcode] = ppcdrc_opcode_common[i].handler;
+ ppc.optable31[ppcdrc_opcode_common[i].subcode] = ppcdrc_opcode_common[i].handler;
break;
case 59:
@@ -1034,7 +1034,7 @@ static void ppc_init(void)
break;
default:
- optable[ppcdrc_opcode_common[i].code] = ppcdrc_opcode_common[i].handler;
+ ppc.optable[ppcdrc_opcode_common[i].code] = ppcdrc_opcode_common[i].handler;
}
}
@@ -1063,16 +1063,16 @@ static void ppcdrc403_init(int index, int clock, const void *_config, int (*irqc
ppcdrc_init();
/* PPC403 specific opcodes */
- optable31[454] = recompile_dccci;
- optable31[486] = recompile_dcread;
- optable31[262] = recompile_icbt;
- optable31[966] = recompile_iccci;
- optable31[998] = recompile_icread;
- optable31[323] = recompile_mfdcr;
- optable31[451] = recompile_mtdcr;
- optable31[131] = recompile_wrtee;
- optable31[163] = recompile_wrteei;
- optable19[51] = recompile_rfci;
+ ppc.optable31[454] = recompile_dccci;
+ ppc.optable31[486] = recompile_dcread;
+ ppc.optable31[262] = recompile_icbt;
+ ppc.optable31[966] = recompile_iccci;
+ ppc.optable31[998] = recompile_icread;
+ ppc.optable31[323] = recompile_mfdcr;
+ ppc.optable31[451] = recompile_mtdcr;
+ ppc.optable31[131] = recompile_wrtee;
+ ppc.optable31[163] = recompile_wrteei;
+ ppc.optable19[51] = recompile_rfci;
ppc.spu.rx_timer = timer_alloc(ppc403_spu_rx_callback, NULL);
ppc.spu.tx_timer = timer_alloc(ppc403_spu_tx_callback, NULL);
@@ -1208,78 +1208,80 @@ static void ppcdrc603_init(int index, int clock, const void *_config, int (*irqc
ppc_init();
ppcdrc_init();
- optable[48] = recompile_lfs;
- optable[49] = recompile_lfsu;
- optable[50] = recompile_lfd;
- optable[51] = recompile_lfdu;
- optable[52] = recompile_stfs;
- optable[53] = recompile_stfsu;
- optable[54] = recompile_stfd;
- optable[55] = recompile_stfdu;
- optable31[631] = recompile_lfdux;
- optable31[599] = recompile_lfdx;
- optable31[567] = recompile_lfsux;
- optable31[535] = recompile_lfsx;
- optable31[595] = recompile_mfsr;
- optable31[659] = recompile_mfsrin;
- optable31[371] = recompile_mftb;
- optable31[210] = recompile_mtsr;
- optable31[242] = recompile_mtsrin;
- optable31[758] = recompile_dcba;
- optable31[759] = recompile_stfdux;
- optable31[727] = recompile_stfdx;
- optable31[983] = recompile_stfiwx;
- optable31[695] = recompile_stfsux;
- optable31[663] = recompile_stfsx;
- optable31[370] = recompile_tlbia;
- optable31[306] = recompile_tlbie;
- optable31[566] = recompile_tlbsync;
- optable31[310] = recompile_eciwx;
- optable31[438] = recompile_ecowx;
-
- optable63[264] = recompile_fabsx;
- optable63[21] = recompile_faddx;
- optable63[32] = recompile_fcmpo;
- optable63[0] = recompile_fcmpu;
- optable63[14] = recompile_fctiwx;
- optable63[15] = recompile_fctiwzx;
- optable63[18] = recompile_fdivx;
- optable63[72] = recompile_fmrx;
- optable63[136] = recompile_fnabsx;
- optable63[40] = recompile_fnegx;
- optable63[12] = recompile_frspx;
- optable63[26] = recompile_frsqrtex;
- optable63[22] = recompile_fsqrtx;
- optable63[20] = recompile_fsubx;
- optable63[583] = recompile_mffsx;
- optable63[70] = recompile_mtfsb0x;
- optable63[38] = recompile_mtfsb1x;
- optable63[711] = recompile_mtfsfx;
- optable63[134] = recompile_mtfsfix;
- optable63[64] = recompile_mcrfs;
-
- optable59[21] = recompile_faddsx;
- optable59[18] = recompile_fdivsx;
- optable59[24] = recompile_fresx;
- optable59[22] = recompile_fsqrtsx;
- optable59[20] = recompile_fsubsx;
+ ppc.optable[48] = recompile_lfs;
+ ppc.optable[49] = recompile_lfsu;
+ ppc.optable[50] = recompile_lfd;
+ ppc.optable[51] = recompile_lfdu;
+ ppc.optable[52] = recompile_stfs;
+ ppc.optable[53] = recompile_stfsu;
+ ppc.optable[54] = recompile_stfd;
+ ppc.optable[55] = recompile_stfdu;
+ ppc.optable31[631] = recompile_lfdux;
+ ppc.optable31[599] = recompile_lfdx;
+ ppc.optable31[567] = recompile_lfsux;
+ ppc.optable31[535] = recompile_lfsx;
+ ppc.optable31[595] = recompile_mfsr;
+ ppc.optable31[659] = recompile_mfsrin;
+ ppc.optable31[371] = recompile_mftb;
+ ppc.optable31[210] = recompile_mtsr;
+ ppc.optable31[242] = recompile_mtsrin;
+ ppc.optable31[758] = recompile_dcba;
+ ppc.optable31[759] = recompile_stfdux;
+ ppc.optable31[727] = recompile_stfdx;
+ ppc.optable31[983] = recompile_stfiwx;
+ ppc.optable31[695] = recompile_stfsux;
+ ppc.optable31[663] = recompile_stfsx;
+ ppc.optable31[370] = recompile_tlbia;
+ ppc.optable31[306] = recompile_tlbie;
+ ppc.optable31[566] = recompile_tlbsync;
+ ppc.optable31[310] = recompile_eciwx;
+ ppc.optable31[438] = recompile_ecowx;
+
+ ppc.optable63[264] = recompile_fabsx;
+ ppc.optable63[21] = recompile_faddx;
+ ppc.optable63[32] = recompile_fcmpo;
+ ppc.optable63[0] = recompile_fcmpu;
+ ppc.optable63[14] = recompile_fctiwx;
+ ppc.optable63[15] = recompile_fctiwzx;
+ ppc.optable63[18] = recompile_fdivx;
+ ppc.optable63[72] = recompile_fmrx;
+ ppc.optable63[136] = recompile_fnabsx;
+ ppc.optable63[40] = recompile_fnegx;
+ ppc.optable63[12] = recompile_frspx;
+ ppc.optable63[26] = recompile_frsqrtex;
+ ppc.optable63[22] = recompile_fsqrtx;
+ ppc.optable63[20] = recompile_fsubx;
+ ppc.optable63[583] = recompile_mffsx;
+ ppc.optable63[70] = recompile_mtfsb0x;
+ ppc.optable63[38] = recompile_mtfsb1x;
+ ppc.optable63[711] = recompile_mtfsfx;
+ ppc.optable63[134] = recompile_mtfsfix;
+ ppc.optable63[64] = recompile_mcrfs;
+
+ ppc.optable59[21] = recompile_faddsx;
+ ppc.optable59[18] = recompile_fdivsx;
+ ppc.optable59[24] = recompile_fresx;
+ ppc.optable59[22] = recompile_fsqrtsx;
+ ppc.optable59[20] = recompile_fsubsx;
for(i = 0; i < 32; i++)
{
- optable63[i * 32 | 29] = recompile_fmaddx;
- optable63[i * 32 | 28] = recompile_fmsubx;
- optable63[i * 32 | 25] = recompile_fmulx;
- optable63[i * 32 | 31] = recompile_fnmaddx;
- optable63[i * 32 | 30] = recompile_fnmsubx;
- optable63[i * 32 | 23] = recompile_fselx;
-
- optable59[i * 32 | 29] = recompile_fmaddsx;
- optable59[i * 32 | 28] = recompile_fmsubsx;
- optable59[i * 32 | 25] = recompile_fmulsx;
- optable59[i * 32 | 31] = recompile_fnmaddsx;
- optable59[i * 32 | 30] = recompile_fnmsubsx;
+ ppc.optable63[i * 32 | 29] = recompile_fmaddx;
+ ppc.optable63[i * 32 | 28] = recompile_fmsubx;
+ ppc.optable63[i * 32 | 25] = recompile_fmulx;
+ ppc.optable63[i * 32 | 31] = recompile_fnmaddx;
+ ppc.optable63[i * 32 | 30] = recompile_fnmsubx;
+ ppc.optable63[i * 32 | 23] = recompile_fselx;
+
+ ppc.optable59[i * 32 | 29] = recompile_fmaddsx;
+ ppc.optable59[i * 32 | 28] = recompile_fmsubsx;
+ ppc.optable59[i * 32 | 25] = recompile_fmulsx;
+ ppc.optable59[i * 32 | 31] = recompile_fnmaddsx;
+ ppc.optable59[i * 32 | 30] = recompile_fnmsubsx;
}
+ ppc.optable31[978] = recompile_tlbld;
+
for(i = 0; i < 256; i++)
{
ppc_field_xlat[i] =
@@ -1343,7 +1345,7 @@ static void ppcdrc603_exit(void)
}
#endif
-#if (HAS_PPC601 || HAS_PPC603 || HAS_MPC8240)
+#if (HAS_PPC601 || HAS_PPC603 || HAS_MPC8240 || HAS_PPC604)
static void ppcdrc603_reset(void)
{
ppc.pc = ppc.npc = 0xfff00100;
@@ -1407,76 +1409,76 @@ static void ppcdrc602_init(int index, int clock, const void *_config, int (*irqc
ppc_init();
ppcdrc_init();
- optable[48] = recompile_lfs;
- optable[49] = recompile_lfsu;
- optable[50] = recompile_lfd;
- optable[51] = recompile_lfdu;
- optable[52] = recompile_stfs;
- optable[53] = recompile_stfsu;
- optable[54] = recompile_stfd;
- optable[55] = recompile_stfdu;
- optable31[631] = recompile_lfdux;
- optable31[599] = recompile_lfdx;
- optable31[567] = recompile_lfsux;
- optable31[535] = recompile_lfsx;
- optable31[595] = recompile_mfsr;
- optable31[659] = recompile_mfsrin;
- optable31[371] = recompile_mftb;
- optable31[210] = recompile_mtsr;
- optable31[242] = recompile_mtsrin;
- optable31[758] = recompile_dcba;
- optable31[759] = recompile_stfdux;
- optable31[727] = recompile_stfdx;
- optable31[983] = recompile_stfiwx;
- optable31[695] = recompile_stfsux;
- optable31[663] = recompile_stfsx;
- optable31[370] = recompile_tlbia;
- optable31[306] = recompile_tlbie;
- optable31[566] = recompile_tlbsync;
- optable31[310] = recompile_eciwx;
- optable31[438] = recompile_ecowx;
-
- optable63[264] = recompile_fabsx;
- optable63[21] = recompile_faddx;
- optable63[32] = recompile_fcmpo;
- optable63[0] = recompile_fcmpu;
- optable63[14] = recompile_fctiwx;
- optable63[15] = recompile_fctiwzx;
- optable63[18] = recompile_fdivx;
- optable63[72] = recompile_fmrx;
- optable63[136] = recompile_fnabsx;
- optable63[40] = recompile_fnegx;
- optable63[12] = recompile_frspx;
- optable63[26] = recompile_frsqrtex;
- optable63[22] = recompile_fsqrtx;
- optable63[20] = recompile_fsubx;
- optable63[583] = recompile_mffsx;
- optable63[70] = recompile_mtfsb0x;
- optable63[38] = recompile_mtfsb1x;
- optable63[711] = recompile_mtfsfx;
- optable63[134] = recompile_mtfsfix;
- optable63[64] = recompile_mcrfs;
-
- optable59[21] = recompile_faddsx;
- optable59[18] = recompile_fdivsx;
- optable59[24] = recompile_fresx;
- optable59[22] = recompile_fsqrtsx;
- optable59[20] = recompile_fsubsx;
+ ppc.optable[48] = recompile_lfs;
+ ppc.optable[49] = recompile_lfsu;
+ ppc.optable[50] = recompile_lfd;
+ ppc.optable[51] = recompile_lfdu;
+ ppc.optable[52] = recompile_stfs;
+ ppc.optable[53] = recompile_stfsu;
+ ppc.optable[54] = recompile_stfd;
+ ppc.optable[55] = recompile_stfdu;
+ ppc.optable31[631] = recompile_lfdux;
+ ppc.optable31[599] = recompile_lfdx;
+ ppc.optable31[567] = recompile_lfsux;
+ ppc.optable31[535] = recompile_lfsx;
+ ppc.optable31[595] = recompile_mfsr;
+ ppc.optable31[659] = recompile_mfsrin;
+ ppc.optable31[371] = recompile_mftb;
+ ppc.optable31[210] = recompile_mtsr;
+ ppc.optable31[242] = recompile_mtsrin;
+ ppc.optable31[758] = recompile_dcba;
+ ppc.optable31[759] = recompile_stfdux;
+ ppc.optable31[727] = recompile_stfdx;
+ ppc.optable31[983] = recompile_stfiwx;
+ ppc.optable31[695] = recompile_stfsux;
+ ppc.optable31[663] = recompile_stfsx;
+ ppc.optable31[370] = recompile_tlbia;
+ ppc.optable31[306] = recompile_tlbie;
+ ppc.optable31[566] = recompile_tlbsync;
+ ppc.optable31[310] = recompile_eciwx;
+ ppc.optable31[438] = recompile_ecowx;
+
+ ppc.optable63[264] = recompile_fabsx;
+ ppc.optable63[21] = recompile_faddx;
+ ppc.optable63[32] = recompile_fcmpo;
+ ppc.optable63[0] = recompile_fcmpu;
+ ppc.optable63[14] = recompile_fctiwx;
+ ppc.optable63[15] = recompile_fctiwzx;
+ ppc.optable63[18] = recompile_fdivx;
+ ppc.optable63[72] = recompile_fmrx;
+ ppc.optable63[136] = recompile_fnabsx;
+ ppc.optable63[40] = recompile_fnegx;
+ ppc.optable63[12] = recompile_frspx;
+ ppc.optable63[26] = recompile_frsqrtex;
+ ppc.optable63[22] = recompile_fsqrtx;
+ ppc.optable63[20] = recompile_fsubx;
+ ppc.optable63[583] = recompile_mffsx;
+ ppc.optable63[70] = recompile_mtfsb0x;
+ ppc.optable63[38] = recompile_mtfsb1x;
+ ppc.optable63[711] = recompile_mtfsfx;
+ ppc.optable63[134] = recompile_mtfsfix;
+ ppc.optable63[64] = recompile_mcrfs;
+
+ ppc.optable59[21] = recompile_faddsx;
+ ppc.optable59[18] = recompile_fdivsx;
+ ppc.optable59[24] = recompile_fresx;
+ ppc.optable59[22] = recompile_fsqrtsx;
+ ppc.optable59[20] = recompile_fsubsx;
for(i = 0; i < 32; i++)
{
- optable63[i * 32 | 29] = recompile_fmaddx;
- optable63[i * 32 | 28] = recompile_fmsubx;
- optable63[i * 32 | 25] = recompile_fmulx;
- optable63[i * 32 | 31] = recompile_fnmaddx;
- optable63[i * 32 | 30] = recompile_fnmsubx;
- optable63[i * 32 | 23] = recompile_fselx;
-
- optable59[i * 32 | 29] = recompile_fmaddsx;
- optable59[i * 32 | 28] = recompile_fmsubsx;
- optable59[i * 32 | 25] = recompile_fmulsx;
- optable59[i * 32 | 31] = recompile_fnmaddsx;
- optable59[i * 32 | 30] = recompile_fnmsubsx;
+ ppc.optable63[i * 32 | 29] = recompile_fmaddx;
+ ppc.optable63[i * 32 | 28] = recompile_fmsubx;
+ ppc.optable63[i * 32 | 25] = recompile_fmulx;
+ ppc.optable63[i * 32 | 31] = recompile_fnmaddx;
+ ppc.optable63[i * 32 | 30] = recompile_fnmsubx;
+ ppc.optable63[i * 32 | 23] = recompile_fselx;
+
+ ppc.optable59[i * 32 | 29] = recompile_fmaddsx;
+ ppc.optable59[i * 32 | 28] = recompile_fmsubsx;
+ ppc.optable59[i * 32 | 25] = recompile_fmulsx;
+ ppc.optable59[i * 32 | 31] = recompile_fnmaddsx;
+ ppc.optable59[i * 32 | 30] = recompile_fnmsubsx;
}
for(i = 0; i < 256; i++)
@@ -1493,10 +1495,10 @@ static void ppcdrc602_init(int index, int clock, const void *_config, int (*irqc
}
// PPC602 specific opcodes
- optable31[596] = recompile_esa;
- optable31[628] = recompile_dsa;
- optable31[1010] = recompile_tlbli;
- optable31[978] = recompile_tlbld;
+ ppc.optable31[596] = recompile_esa;
+ ppc.optable31[628] = recompile_dsa;
+ ppc.optable31[1010] = recompile_tlbli;
+ ppc.optable31[978] = recompile_tlbld;
ppc.is603 = 0;
ppc.is602 = 1;
@@ -1597,76 +1599,76 @@ static void mpc8240drc_init(int index, int clock, const void *_config, int (*irq
ppc_init();
ppcdrc_init();
- optable[48] = recompile_lfs;
- optable[49] = recompile_lfsu;
- optable[50] = recompile_lfd;
- optable[51] = recompile_lfdu;
- optable[52] = recompile_stfs;
- optable[53] = recompile_stfsu;
- optable[54] = recompile_stfd;
- optable[55] = recompile_stfdu;
- optable31[631] = recompile_lfdux;
- optable31[599] = recompile_lfdx;
- optable31[567] = recompile_lfsux;
- optable31[535] = recompile_lfsx;
- optable31[595] = recompile_mfsr;
- optable31[659] = recompile_mfsrin;
- optable31[371] = recompile_mftb;
- optable31[210] = recompile_mtsr;
- optable31[242] = recompile_mtsrin;
- optable31[758] = recompile_dcba;
- optable31[759] = recompile_stfdux;
- optable31[727] = recompile_stfdx;
- optable31[983] = recompile_stfiwx;
- optable31[695] = recompile_stfsux;
- optable31[663] = recompile_stfsx;
- optable31[370] = recompile_tlbia;
- optable31[306] = recompile_tlbie;
- optable31[566] = recompile_tlbsync;
- optable31[310] = recompile_eciwx;
- optable31[438] = recompile_ecowx;
-
- optable63[264] = recompile_fabsx;
- optable63[21] = recompile_faddx;
- optable63[32] = recompile_fcmpo;
- optable63[0] = recompile_fcmpu;
- optable63[14] = recompile_fctiwx;
- optable63[15] = recompile_fctiwzx;
- optable63[18] = recompile_fdivx;
- optable63[72] = recompile_fmrx;
- optable63[136] = recompile_fnabsx;
- optable63[40] = recompile_fnegx;
- optable63[12] = recompile_frspx;
- optable63[26] = recompile_frsqrtex;
- optable63[22] = recompile_fsqrtx;
- optable63[20] = recompile_fsubx;
- optable63[583] = recompile_mffsx;
- optable63[70] = recompile_mtfsb0x;
- optable63[38] = recompile_mtfsb1x;
- optable63[711] = recompile_mtfsfx;
- optable63[134] = recompile_mtfsfix;
- optable63[64] = recompile_mcrfs;
-
- optable59[21] = recompile_faddsx;
- optable59[18] = recompile_fdivsx;
- optable59[24] = recompile_fresx;
- optable59[22] = recompile_fsqrtsx;
- optable59[20] = recompile_fsubsx;
+ ppc.optable[48] = recompile_lfs;
+ ppc.optable[49] = recompile_lfsu;
+ ppc.optable[50] = recompile_lfd;
+ ppc.optable[51] = recompile_lfdu;
+ ppc.optable[52] = recompile_stfs;
+ ppc.optable[53] = recompile_stfsu;
+ ppc.optable[54] = recompile_stfd;
+ ppc.optable[55] = recompile_stfdu;
+ ppc.optable31[631] = recompile_lfdux;
+ ppc.optable31[599] = recompile_lfdx;
+ ppc.optable31[567] = recompile_lfsux;
+ ppc.optable31[535] = recompile_lfsx;
+ ppc.optable31[595] = recompile_mfsr;
+ ppc.optable31[659] = recompile_mfsrin;
+ ppc.optable31[371] = recompile_mftb;
+ ppc.optable31[210] = recompile_mtsr;
+ ppc.optable31[242] = recompile_mtsrin;
+ ppc.optable31[758] = recompile_dcba;
+ ppc.optable31[759] = recompile_stfdux;
+ ppc.optable31[727] = recompile_stfdx;
+ ppc.optable31[983] = recompile_stfiwx;
+ ppc.optable31[695] = recompile_stfsux;
+ ppc.optable31[663] = recompile_stfsx;
+ ppc.optable31[370] = recompile_tlbia;
+ ppc.optable31[306] = recompile_tlbie;
+ ppc.optable31[566] = recompile_tlbsync;
+ ppc.optable31[310] = recompile_eciwx;
+ ppc.optable31[438] = recompile_ecowx;
+
+ ppc.optable63[264] = recompile_fabsx;
+ ppc.optable63[21] = recompile_faddx;
+ ppc.optable63[32] = recompile_fcmpo;
+ ppc.optable63[0] = recompile_fcmpu;
+ ppc.optable63[14] = recompile_fctiwx;
+ ppc.optable63[15] = recompile_fctiwzx;
+ ppc.optable63[18] = recompile_fdivx;
+ ppc.optable63[72] = recompile_fmrx;
+ ppc.optable63[136] = recompile_fnabsx;
+ ppc.optable63[40] = recompile_fnegx;
+ ppc.optable63[12] = recompile_frspx;
+ ppc.optable63[26] = recompile_frsqrtex;
+ ppc.optable63[22] = recompile_fsqrtx;
+ ppc.optable63[20] = recompile_fsubx;
+ ppc.optable63[583] = recompile_mffsx;
+ ppc.optable63[70] = recompile_mtfsb0x;
+ ppc.optable63[38] = recompile_mtfsb1x;
+ ppc.optable63[711] = recompile_mtfsfx;
+ ppc.optable63[134] = recompile_mtfsfix;
+ ppc.optable63[64] = recompile_mcrfs;
+
+ ppc.optable59[21] = recompile_faddsx;
+ ppc.optable59[18] = recompile_fdivsx;
+ ppc.optable59[24] = recompile_fresx;
+ ppc.optable59[22] = recompile_fsqrtsx;
+ ppc.optable59[20] = recompile_fsubsx;
for(i = 0; i < 32; i++)
{
- optable63[i * 32 | 29] = recompile_fmaddx;
- optable63[i * 32 | 28] = recompile_fmsubx;
- optable63[i * 32 | 25] = recompile_fmulx;
- optable63[i * 32 | 31] = recompile_fnmaddx;
- optable63[i * 32 | 30] = recompile_fnmsubx;
- optable63[i * 32 | 23] = recompile_fselx;
-
- optable59[i * 32 | 29] = recompile_fmaddsx;
- optable59[i * 32 | 28] = recompile_fmsubsx;
- optable59[i * 32 | 25] = recompile_fmulsx;
- optable59[i * 32 | 31] = recompile_fnmaddsx;
- optable59[i * 32 | 30] = recompile_fnmsubsx;
+ ppc.optable63[i * 32 | 29] = recompile_fmaddx;
+ ppc.optable63[i * 32 | 28] = recompile_fmsubx;
+ ppc.optable63[i * 32 | 25] = recompile_fmulx;
+ ppc.optable63[i * 32 | 31] = recompile_fnmaddx;
+ ppc.optable63[i * 32 | 30] = recompile_fnmsubx;
+ ppc.optable63[i * 32 | 23] = recompile_fselx;
+
+ ppc.optable59[i * 32 | 29] = recompile_fmaddsx;
+ ppc.optable59[i * 32 | 28] = recompile_fmsubsx;
+ ppc.optable59[i * 32 | 25] = recompile_fmulsx;
+ ppc.optable59[i * 32 | 31] = recompile_fnmaddsx;
+ ppc.optable59[i * 32 | 30] = recompile_fnmsubsx;
}
for(i = 0; i < 256; i++)
@@ -1683,8 +1685,8 @@ static void mpc8240drc_init(int index, int clock, const void *_config, int (*irq
}
// MPC8240 specific opcodes
- optable31[978] = recompile_tlbld;
- optable31[1010] = recompile_tlbli;
+ ppc.optable31[978] = recompile_tlbld;
+ ppc.optable31[1010] = recompile_tlbli;
ppc.is603 = 1;
@@ -1730,76 +1732,76 @@ static void ppc601drc_init(int index, int clock, const void *_config, int (*irqc
ppc_init();
ppcdrc_init();
- optable[48] = recompile_lfs;
- optable[49] = recompile_lfsu;
- optable[50] = recompile_lfd;
- optable[51] = recompile_lfdu;
- optable[52] = recompile_stfs;
- optable[53] = recompile_stfsu;
- optable[54] = recompile_stfd;
- optable[55] = recompile_stfdu;
- optable31[631] = recompile_lfdux;
- optable31[599] = recompile_lfdx;
- optable31[567] = recompile_lfsux;
- optable31[535] = recompile_lfsx;
- optable31[595] = recompile_mfsr;
- optable31[659] = recompile_mfsrin;
- optable31[371] = recompile_mftb;
- optable31[210] = recompile_mtsr;
- optable31[242] = recompile_mtsrin;
- optable31[758] = recompile_dcba;
- optable31[759] = recompile_stfdux;
- optable31[727] = recompile_stfdx;
- optable31[983] = recompile_stfiwx;
- optable31[695] = recompile_stfsux;
- optable31[663] = recompile_stfsx;
- optable31[370] = recompile_tlbia;
- optable31[306] = recompile_tlbie;
- optable31[566] = recompile_tlbsync;
- optable31[310] = recompile_eciwx;
- optable31[438] = recompile_ecowx;
-
- optable63[264] = recompile_fabsx;
- optable63[21] = recompile_faddx;
- optable63[32] = recompile_fcmpo;
- optable63[0] = recompile_fcmpu;
- optable63[14] = recompile_fctiwx;
- optable63[15] = recompile_fctiwzx;
- optable63[18] = recompile_fdivx;
- optable63[72] = recompile_fmrx;
- optable63[136] = recompile_fnabsx;
- optable63[40] = recompile_fnegx;
- optable63[12] = recompile_frspx;
- optable63[26] = recompile_frsqrtex;
- optable63[22] = recompile_fsqrtx;
- optable63[20] = recompile_fsubx;
- optable63[583] = recompile_mffsx;
- optable63[70] = recompile_mtfsb0x;
- optable63[38] = recompile_mtfsb1x;
- optable63[711] = recompile_mtfsfx;
- optable63[134] = recompile_mtfsfix;
- optable63[64] = recompile_mcrfs;
-
- optable59[21] = recompile_faddsx;
- optable59[18] = recompile_fdivsx;
- optable59[24] = recompile_fresx;
- optable59[22] = recompile_fsqrtsx;
- optable59[20] = recompile_fsubsx;
+ ppc.optable[48] = recompile_lfs;
+ ppc.optable[49] = recompile_lfsu;
+ ppc.optable[50] = recompile_lfd;
+ ppc.optable[51] = recompile_lfdu;
+ ppc.optable[52] = recompile_stfs;
+ ppc.optable[53] = recompile_stfsu;
+ ppc.optable[54] = recompile_stfd;
+ ppc.optable[55] = recompile_stfdu;
+ ppc.optable31[631] = recompile_lfdux;
+ ppc.optable31[599] = recompile_lfdx;
+ ppc.optable31[567] = recompile_lfsux;
+ ppc.optable31[535] = recompile_lfsx;
+ ppc.optable31[595] = recompile_mfsr;
+ ppc.optable31[659] = recompile_mfsrin;
+ ppc.optable31[371] = recompile_mftb;
+ ppc.optable31[210] = recompile_mtsr;
+ ppc.optable31[242] = recompile_mtsrin;
+ ppc.optable31[758] = recompile_dcba;
+ ppc.optable31[759] = recompile_stfdux;
+ ppc.optable31[727] = recompile_stfdx;
+ ppc.optable31[983] = recompile_stfiwx;
+ ppc.optable31[695] = recompile_stfsux;
+ ppc.optable31[663] = recompile_stfsx;
+ ppc.optable31[370] = recompile_tlbia;
+ ppc.optable31[306] = recompile_tlbie;
+ ppc.optable31[566] = recompile_tlbsync;
+ ppc.optable31[310] = recompile_eciwx;
+ ppc.optable31[438] = recompile_ecowx;
+
+ ppc.optable63[264] = recompile_fabsx;
+ ppc.optable63[21] = recompile_faddx;
+ ppc.optable63[32] = recompile_fcmpo;
+ ppc.optable63[0] = recompile_fcmpu;
+ ppc.optable63[14] = recompile_fctiwx;
+ ppc.optable63[15] = recompile_fctiwzx;
+ ppc.optable63[18] = recompile_fdivx;
+ ppc.optable63[72] = recompile_fmrx;
+ ppc.optable63[136] = recompile_fnabsx;
+ ppc.optable63[40] = recompile_fnegx;
+ ppc.optable63[12] = recompile_frspx;
+ ppc.optable63[26] = recompile_frsqrtex;
+ ppc.optable63[22] = recompile_fsqrtx;
+ ppc.optable63[20] = recompile_fsubx;
+ ppc.optable63[583] = recompile_mffsx;
+ ppc.optable63[70] = recompile_mtfsb0x;
+ ppc.optable63[38] = recompile_mtfsb1x;
+ ppc.optable63[711] = recompile_mtfsfx;
+ ppc.optable63[134] = recompile_mtfsfix;
+ ppc.optable63[64] = recompile_mcrfs;
+
+ ppc.optable59[21] = recompile_faddsx;
+ ppc.optable59[18] = recompile_fdivsx;
+ ppc.optable59[24] = recompile_fresx;
+ ppc.optable59[22] = recompile_fsqrtsx;
+ ppc.optable59[20] = recompile_fsubsx;
for(i = 0; i < 32; i++)
{
- optable63[i * 32 | 29] = recompile_fmaddx;
- optable63[i * 32 | 28] = recompile_fmsubx;
- optable63[i * 32 | 25] = recompile_fmulx;
- optable63[i * 32 | 31] = recompile_fnmaddx;
- optable63[i * 32 | 30] = recompile_fnmsubx;
- optable63[i * 32 | 23] = recompile_fselx;
-
- optable59[i * 32 | 29] = recompile_fmaddsx;
- optable59[i * 32 | 28] = recompile_fmsubsx;
- optable59[i * 32 | 25] = recompile_fmulsx;
- optable59[i * 32 | 31] = recompile_fnmaddsx;
- optable59[i * 32 | 30] = recompile_fnmsubsx;
+ ppc.optable63[i * 32 | 29] = recompile_fmaddx;
+ ppc.optable63[i * 32 | 28] = recompile_fmsubx;
+ ppc.optable63[i * 32 | 25] = recompile_fmulx;
+ ppc.optable63[i * 32 | 31] = recompile_fnmaddx;
+ ppc.optable63[i * 32 | 30] = recompile_fnmsubx;
+ ppc.optable63[i * 32 | 23] = recompile_fselx;
+
+ ppc.optable59[i * 32 | 29] = recompile_fmaddsx;
+ ppc.optable59[i * 32 | 28] = recompile_fmsubsx;
+ ppc.optable59[i * 32 | 25] = recompile_fmulsx;
+ ppc.optable59[i * 32 | 31] = recompile_fnmaddsx;
+ ppc.optable59[i * 32 | 30] = recompile_fnmsubsx;
}
for(i = 0; i < 256; i++)
@@ -1866,6 +1868,139 @@ static void ppc601drc_exit(void)
#endif
+#if (HAS_PPC604)
+static void ppc604drc_init(int index, int clock, const void *_config, int (*irqcallback)(int))
+{
+ float multiplier;
+ const ppc_config *config = _config;
+ int i;
+
+ ppc_init();
+ ppcdrc_init();
+
+ ppc.optable[48] = recompile_lfs;
+ ppc.optable[49] = recompile_lfsu;
+ ppc.optable[50] = recompile_lfd;
+ ppc.optable[51] = recompile_lfdu;
+ ppc.optable[52] = recompile_stfs;
+ ppc.optable[53] = recompile_stfsu;
+ ppc.optable[54] = recompile_stfd;
+ ppc.optable[55] = recompile_stfdu;
+ ppc.optable31[631] = recompile_lfdux;
+ ppc.optable31[599] = recompile_lfdx;
+ ppc.optable31[567] = recompile_lfsux;
+ ppc.optable31[535] = recompile_lfsx;
+ ppc.optable31[595] = recompile_mfsr;
+ ppc.optable31[659] = recompile_mfsrin;
+ ppc.optable31[371] = recompile_mftb;
+ ppc.optable31[210] = recompile_mtsr;
+ ppc.optable31[242] = recompile_mtsrin;
+ ppc.optable31[758] = recompile_dcba;
+ ppc.optable31[759] = recompile_stfdux;
+ ppc.optable31[727] = recompile_stfdx;
+ ppc.optable31[983] = recompile_stfiwx;
+ ppc.optable31[695] = recompile_stfsux;
+ ppc.optable31[663] = recompile_stfsx;
+ ppc.optable31[370] = recompile_tlbia;
+ ppc.optable31[306] = recompile_tlbie;
+ ppc.optable31[566] = recompile_tlbsync;
+ ppc.optable31[310] = recompile_eciwx;
+ ppc.optable31[438] = recompile_ecowx;
+
+ ppc.optable63[264] = recompile_fabsx;
+ ppc.optable63[21] = recompile_faddx;
+ ppc.optable63[32] = recompile_fcmpo;
+ ppc.optable63[0] = recompile_fcmpu;
+ ppc.optable63[14] = recompile_fctiwx;
+ ppc.optable63[15] = recompile_fctiwzx;
+ ppc.optable63[18] = recompile_fdivx;
+ ppc.optable63[72] = recompile_fmrx;
+ ppc.optable63[136] = recompile_fnabsx;
+ ppc.optable63[40] = recompile_fnegx;
+ ppc.optable63[12] = recompile_frspx;
+ ppc.optable63[26] = recompile_frsqrtex;
+ ppc.optable63[22] = recompile_fsqrtx;
+ ppc.optable63[20] = recompile_fsubx;
+ ppc.optable63[583] = recompile_mffsx;
+ ppc.optable63[70] = recompile_mtfsb0x;
+ ppc.optable63[38] = recompile_mtfsb1x;
+ ppc.optable63[711] = recompile_mtfsfx;
+ ppc.optable63[134] = recompile_mtfsfix;
+ ppc.optable63[64] = recompile_mcrfs;
+
+ ppc.optable59[21] = recompile_faddsx;
+ ppc.optable59[18] = recompile_fdivsx;
+ ppc.optable59[24] = recompile_fresx;
+ ppc.optable59[22] = recompile_fsqrtsx;
+ ppc.optable59[20] = recompile_fsubsx;
+
+ for(i = 0; i < 32; i++)
+ {
+ ppc.optable63[i * 32 | 29] = recompile_fmaddx;
+ ppc.optable63[i * 32 | 28] = recompile_fmsubx;
+ ppc.optable63[i * 32 | 25] = recompile_fmulx;
+ ppc.optable63[i * 32 | 31] = recompile_fnmaddx;
+ ppc.optable63[i * 32 | 30] = recompile_fnmsubx;
+ ppc.optable63[i * 32 | 23] = recompile_fselx;
+
+ ppc.optable59[i * 32 | 29] = recompile_fmaddsx;
+ ppc.optable59[i * 32 | 28] = recompile_fmsubsx;
+ ppc.optable59[i * 32 | 25] = recompile_fmulsx;
+ ppc.optable59[i * 32 | 31] = recompile_fnmaddsx;
+ ppc.optable59[i * 32 | 30] = recompile_fnmsubsx;
+ }
+
+ ppc.optable31[978] = recompile_tlbld;
+
+ for(i = 0; i < 256; i++)
+ {
+ ppc_field_xlat[i] =
+ ((i & 0x80) ? 0xF0000000 : 0) |
+ ((i & 0x40) ? 0x0F000000 : 0) |
+ ((i & 0x20) ? 0x00F00000 : 0) |
+ ((i & 0x10) ? 0x000F0000 : 0) |
+ ((i & 0x08) ? 0x0000F000 : 0) |
+ ((i & 0x04) ? 0x00000F00 : 0) |
+ ((i & 0x02) ? 0x000000F0 : 0) |
+ ((i & 0x01) ? 0x0000000F : 0);
+ }
+
+ ppc.is603 = 1;
+
+ ppc.read8 = program_read_byte_64be;
+ ppc.read16 = program_read_word_64be;
+ ppc.read32 = program_read_dword_64be;
+ ppc.read64 = program_read_qword_64be;
+ ppc.write8 = program_write_byte_64be;
+ ppc.write16 = program_write_word_64be;
+ ppc.write32 = program_write_dword_64be;
+ ppc.write64 = program_write_qword_64be;
+ ppc.read16_unaligned = ppc_read16_unaligned;
+ ppc.read32_unaligned = ppc_read32_unaligned;
+ ppc.read64_unaligned = ppc_read64_unaligned;
+ ppc.write16_unaligned = ppc_write16_unaligned;
+ ppc.write32_unaligned = ppc_write32_unaligned;
+ ppc.write64_unaligned = ppc_write64_unaligned;
+
+ ppc.irq_callback = irqcallback;
+
+ ppc.pvr = config->pvr;
+
+ multiplier = (float)((config->bus_frequency_multiplier >> 4) & 0xf) +
+ (float)(config->bus_frequency_multiplier & 0xf) / 10.0f;
+ bus_freq_multiplier = (int)(multiplier * 2);
+}
+
+static void ppc604drc_exit(void)
+{
+#if LOG_CODE
+ //if (symfile) fclose(symfile);
+#endif
+ drc_exit(ppc.drc);
+}
+#endif
+
+
static void ppc_get_context(void *dst)
{
/* copy the context */
@@ -2300,3 +2435,48 @@ void ppc601_get_info(UINT32 state, cpuinfo *info)
}
}
#endif
+
+/* PPC604 */
+
+#if (HAS_PPC604)
+static void ppc604_set_info(UINT32 state, cpuinfo *info)
+{
+ if (state >= CPUINFO_INT_INPUT_STATE && state <= CPUINFO_INT_INPUT_STATE + 5)
+ {
+ ppcdrc603_set_irq_line(state-CPUINFO_INT_INPUT_STATE, info->i);
+ return;
+ }
+ switch(state)
+ {
+ default: ppc_set_info(state, info); break;
+ }
+}
+
+void ppc604_get_info(UINT32 state, cpuinfo *info)
+{
+ switch(state)
+ {
+ /* --- the following bits of info are returned as 64-bit signed integers --- */
+ case CPUINFO_INT_INPUT_LINES: info->i = 5; break;
+ case CPUINFO_INT_ENDIANNESS: info->i = CPU_IS_BE; break;
+
+ case CPUINFO_INT_DATABUS_WIDTH + ADDRESS_SPACE_PROGRAM: info->i = 64; break;
+ case CPUINFO_INT_ADDRBUS_WIDTH + ADDRESS_SPACE_PROGRAM: info->i = 32; break;
+
+ /* --- the following bits of info are returned as pointers to data or functions --- */
+ case CPUINFO_PTR_SET_INFO: info->setinfo = ppc604_set_info; break;
+ case CPUINFO_PTR_INIT: info->init = ppc604drc_init; break;
+ case CPUINFO_PTR_RESET: info->reset = ppcdrc603_reset; break;
+ case CPUINFO_PTR_EXIT: info->exit = ppc604drc_exit; break;
+ case CPUINFO_PTR_EXECUTE: info->execute = ppcdrc603_execute; break;
+ case CPUINFO_PTR_READ: info->read = ppc_read; break;
+ case CPUINFO_PTR_WRITE: info->write = ppc_write; break;
+ case CPUINFO_PTR_READOP: info->readop = ppc_readop; break;
+
+ /* --- the following bits of info are returned as NULL-terminated strings --- */
+ case CPUINFO_STR_NAME: strcpy(info->s, "PPC604"); break;
+
+ default: ppc_get_info(state, info); break;
+ }
+}
+#endif
diff --git a/src/emu/cpu/rsp/rsp_dasm.c b/src/emu/cpu/rsp/rsp_dasm.c
index b78e818482b..9a29b8dfa97 100644
--- a/src/emu/cpu/rsp/rsp_dasm.c
+++ b/src/emu/cpu/rsp/rsp_dasm.c
@@ -7,7 +7,7 @@
#include "cpuintrf.h"
#include <stdarg.h>
-static const char *reg[32] =
+static const char *const reg[32] =
{
"0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
"r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
@@ -15,7 +15,7 @@ static const char *reg[32] =
"r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31"
};
-static const char *vreg[32] =
+static const char *const vreg[32] =
{
" v0", " v1", " v2", " v3", " v4", " v5", " v6", " v7",
" v8", " v9", "v10", "v11", "v12", "v13", "v14", "v15",
@@ -23,7 +23,7 @@ static const char *vreg[32] =
"v24", "v25", "v26", "v27", "v28", "v29", "v30", "v31"
};
-static const char *cop0_regs[32] =
+static const char *const cop0_regs[32] =
{
"SP_MEM_ADDR", "SP_DRAM_ADDR", "SP_RD_LEN", "SP_WR_LEN",
"SP_STATUS", "SP_DMA_FULL", "SP_DMA_BUSY", "SP_SEMAPHORE",
@@ -35,13 +35,13 @@ static const char *cop0_regs[32] =
"???", "???", "???", "???"
};
-static const char *element[16] =
+static const char *const element[16] =
{
"", "[???]", "[00224466]", "[11335577]", "[00004444]", "[11115555]", "[22226666]", "[33337777]",
"[00000000]", "[11111111]", "[22222222]", "[33333333]", "[44444444]", "[55555555]", "[66666666]", "[77777777]"
};
-static const char *element2[16] =
+static const char *const element2[16] =
{
"01234567", "????????", "00224466", "11335577", "00004444", "11115555", "22226666", "33337777",
"00000000", "11111111", "22222222", "33333333", "44444444", "55555555", "66666666", "77777777"
diff --git a/src/emu/cpu/s2650/2650dasm.c b/src/emu/cpu/s2650/2650dasm.c
index 3248b5bbdd8..c4ce39c8848 100644
--- a/src/emu/cpu/s2650/2650dasm.c
+++ b/src/emu/cpu/s2650/2650dasm.c
@@ -21,7 +21,7 @@ static offs_t pcbase;
#define MNEMO 1
/* handy table to build relative offsets from HR (holding register) */
-static int rel[0x100] = {
+static const int rel[0x100] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
@@ -65,7 +65,7 @@ static char *IMM(int pc)
}
#if MNEMO
-static char cc[4] = { 'z', 'p', 'm', 'a' };
+static const char cc[4] = { 'z', 'p', 'm', 'a' };
/* format an immediate for PSL */
static char *IMM_PSL(int pc)
@@ -136,7 +136,7 @@ static char *IMM_PSU(int pc)
return buff;
}
#else
-static char cc[4] = { '0', '1', '2', '3' };
+static const char cc[4] = { '0', '1', '2', '3' };
#define IMM_PSL IMM
#define IMM_PSU IMM
#endif
diff --git a/src/emu/cpu/s2650/s2650.c b/src/emu/cpu/s2650/s2650.c
index 7dd5d4f40ef..3b86dae50ec 100644
--- a/src/emu/cpu/s2650/s2650.c
+++ b/src/emu/cpu/s2650/s2650.c
@@ -200,7 +200,7 @@ INLINE UINT8 ARG(void)
* handy table to build PC relative offsets
* from HR (holding register)
***************************************************************/
-static int S2650_relative[0x100] =
+static const int S2650_relative[0x100] =
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
diff --git a/src/emu/cpu/saturn/saturnds.c b/src/emu/cpu/saturn/saturnds.c
index cf6005ffa62..dce67bf487a 100644
--- a/src/emu/cpu/saturn/saturnds.c
+++ b/src/emu/cpu/saturn/saturnds.c
@@ -44,13 +44,13 @@ static int set=1;
#define W "W"
#define A "A"
-static const char *adr_b[]=
+static const char *const adr_b[]=
{ P, WP, XS, X, S, M, B, W };
-static const char *adr_af[]=
+static const char *const adr_af[]=
{ P, WP, XS, X, S, M, B, W, 0, 0, 0, 0, 0, 0, 0, A };
-static const char *adr_a[]=
+static const char *const adr_a[]=
{ P, WP, XS, X, S, M, B, W };
static const char number_2_hex[]=
@@ -587,7 +587,7 @@ static const char *field_2_string(int adr_enum)
return 0;
}
-static OPCODE opcodes[][0x10]= {
+static const OPCODE opcodes[][0x10]= {
{
// first digit
{ Opcode0 },
@@ -1261,7 +1261,7 @@ unsigned saturn_dasm(char *dst, offs_t pc, const UINT8 *oprom, const UINT8 *opra
int cont=1; // operation still not complete disassembled
char bin[10]; int binsize=0; // protocollizing fetched nibbles
char number[17];
- OPCODE *level=opcodes[0]; //pointer to current digit
+ const OPCODE *level=opcodes[0]; //pointer to current digit
int op; // currently fetched nibble
int pos = 0;
diff --git a/src/emu/cpu/sh2/sh2dasm.c b/src/emu/cpu/sh2/sh2dasm.c
index 8d66e230b99..91854338b03 100644
--- a/src/emu/cpu/sh2/sh2dasm.c
+++ b/src/emu/cpu/sh2/sh2dasm.c
@@ -7,7 +7,7 @@
#define Rn ((opcode >> 8) & 15)
#define Rm ((opcode >> 4) & 15)
-static const char *regname[16] = {
+static const char *const regname[16] = {
"R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7",
"R8", "R9", "R10","R11","R12","R13","R14","SP"
};
diff --git a/src/emu/cpu/sh4/sh4dasm.c b/src/emu/cpu/sh4/sh4dasm.c
index 50675b0dd57..6a33d45f101 100644
--- a/src/emu/cpu/sh4/sh4dasm.c
+++ b/src/emu/cpu/sh4/sh4dasm.c
@@ -7,7 +7,7 @@
#define Rn ((opcode >> 8) & 15)
#define Rm ((opcode >> 4) & 15)
-static const char *regname[16] = {
+static const char *const regname[16] = {
"R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7",
"R8", "R9", "R10","R11","R12","R13","R14","SP"
};
diff --git a/src/emu/cpu/sm8500/sm8500.c b/src/emu/cpu/sm8500/sm8500.c
index eb6526bc1ab..6364a47c329 100644
--- a/src/emu/cpu/sm8500/sm8500.c
+++ b/src/emu/cpu/sm8500/sm8500.c
@@ -55,7 +55,7 @@ static sm8500_regs regs;
/* nr of cycles to run */
static int sm8500_icount;
-static UINT8 sm8500_b2w[8] = {
+static const UINT8 sm8500_b2w[8] = {
0, 8, 2, 10, 4, 12, 6, 14
};
diff --git a/src/emu/cpu/sm8500/sm8500d.c b/src/emu/cpu/sm8500/sm8500d.c
index 4d8a2c0ba85..b4d2c336a9e 100644
--- a/src/emu/cpu/sm8500/sm8500d.c
+++ b/src/emu/cpu/sm8500/sm8500d.c
@@ -32,7 +32,7 @@ z1A, z1B, z4F,
5A, 5B,
*/
-static const char *s_mnemonic[] =
+static const char *const s_mnemonic[] =
{
"adc", "adcw", "add", "addw", "and", "andw", "band", "bbc", "bbs",
"bclr", "bcmp", "bmov", "bor", "br", "btst", "bset", "bxor", "call", "cals", "clr",
@@ -71,7 +71,7 @@ typedef struct
UINT8 arguments;
} sm8500dasm;
-static const char *sm8500_cond[16] = {
+static const char *const sm8500_cond[16] = {
"F", "LT", "LE", "ULE", "OV", "MI", "Z", "C",
"T", "GE", "GT", "UGT", "NOV", "PL", "NZ", "NC"
};
diff --git a/src/emu/cpu/spc700/spc700ds.c b/src/emu/cpu/spc700/spc700ds.c
index 373832a210a..383ea7ecc29 100644
--- a/src/emu/cpu/spc700/spc700ds.c
+++ b/src/emu/cpu/spc700/spc700ds.c
@@ -54,7 +54,7 @@ enum
};
-static const char* g_opnames[] =
+static const char *const g_opnames[] =
{
"ADC ", "ADDW ", "AND ", "AND1 ", "ASL ", "BBC ", "BBS ", "BCC ",
"BCS ", "BEQ ", "BMI ", "BNE ", "BPL ", "BRA ", "BRK ", "BVC ",
@@ -67,7 +67,7 @@ static const char* g_opnames[] =
"TCLR1", "TSET1", "XCN "
};
-static opcode_struct g_opcodes[256] =
+static const opcode_struct g_opcodes[256] =
{
/* 00 */ {NOP , {IMP , IMP }},
/* 01 */ {TCALL , {N0 , IMP }},
@@ -346,7 +346,7 @@ INLINE unsigned int read_16_immediate(void)
offs_t spc700_dasm(char *buff, offs_t pc, const UINT8 *oprom, const UINT8 *opram)
{
- opcode_struct* opcode;
+ const opcode_struct* opcode;
UINT32 flags = 0;
char* ptr;
int var;
diff --git a/src/emu/cpu/ssp1610/ssp1610d.c b/src/emu/cpu/ssp1610/ssp1610d.c
index a22a16e4e7f..3ac58284ef6 100644
--- a/src/emu/cpu/ssp1610/ssp1610d.c
+++ b/src/emu/cpu/ssp1610/ssp1610d.c
@@ -10,46 +10,46 @@
#include "cpuintrf.h"
-static const char* reg[] =
+static const char *const reg[] =
{
"-", "X", "Y", "A", "ST", "STACK", "PC", "P", "AL", "?", "?", "XST", "PL", "?", "?", "SRCR", "BRCR", "BRER",
"XRD0", "XRD1", "AE", "DIOR", "GR22", "GR23", "EXT0", "EXT1", "EXT2", "EXT3", "EXT4", "EXT5", "EXT6", "EXT7"
};
-static const char* rij[] =
+static const char *const rij[] =
{
"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7"
};
-static const char* erij[] =
+static const char *const erij[] =
{
"er0", "er1", "er2", "er3", "er4", "er5", "er6", "er7"
};
-static const char* modifier[] =
+static const char *const modifier[] =
{
"", "+!", "-", "+"
};
-static const char* cond[] =
+static const char *const cond[] =
{
"always", "always", "RESERVED", "RESERVED", "gpi0=0", "gpi0=1", "gpi1=0", "gpi1=1", "l=0", "l=1", "z=0", "z=1", "ov=0", "ov=1", "n=0", "n=1",
"diof=0", "diof=1", "gpi2=0", "gpi2=1", "gpi3=0", "gpi3=1", "RESERVED", "RESERVED", "RESERVED", "RESERVED", "RESERVED", "RESERVED", "RESERVED", "RESERVED", "RESERVED", "RESERVED"
};
-static const char* acc_op[] =
+static const char *const acc_op[] =
{
"ror", "rol", "shr", "shl", "inc", "dec", "neg", "abs"
};
// pag. 81 uses different addresses!
-static const char* flag_op[] =
+static const char *const flag_op[] =
{
"?", "?", "resl", "setl", "resie", "setie", "?", "?", "resop", "setop", "?", "?", "?", "?", "res", "set"
};
-static const char* st_mod[] =
+static const char *const st_mod[] =
{
"macs", "rpl", "gpo", "rb", "gpo0", "gpo1", "gpo2", "gpo3", "wte", "diof", "bre", "reserved", "reserved", "reserved", "reserved", "reserved"
};
diff --git a/src/emu/cpu/t11/t11dasm.c b/src/emu/cpu/t11/t11dasm.c
index a3cd49ceb86..f2331c434cc 100644
--- a/src/emu/cpu/t11/t11dasm.c
+++ b/src/emu/cpu/t11/t11dasm.c
@@ -10,7 +10,7 @@
#include "debugger.h"
#include "t11.h"
-static const char *regs[8] = { "R0", "R1", "R2", "R3", "R4", "R5", "SP", "PC" };
+static const char *const regs[8] = { "R0", "R1", "R2", "R3", "R4", "R5", "SP", "PC" };
static const UINT8 *rombase;
static offs_t pcbase;
diff --git a/src/emu/cpu/t11/t11table.c b/src/emu/cpu/t11/t11table.c
index eeeb8007405..e9ba4a45665 100644
--- a/src/emu/cpu/t11/t11table.c
+++ b/src/emu/cpu/t11/t11table.c
@@ -1109,7 +1109,7 @@ static void sub_ixd_ixd(void);
-static void (*opcode_table[65536 >> 3])(void) =
+static void (*const opcode_table[65536 >> 3])(void) =
{
/* 0x0000 */
op_0000, illegal, illegal, illegal, illegal, illegal, illegal, illegal,
diff --git a/src/emu/cpu/tlcs90/tlcs90.c b/src/emu/cpu/tlcs90/tlcs90.c
index dc18b69b020..39b7bc1ceee 100644
--- a/src/emu/cpu/tlcs90/tlcs90.c
+++ b/src/emu/cpu/tlcs90/tlcs90.c
@@ -63,8 +63,8 @@ static int t90_ICount;
typedef UINT16 e_r;
#define F T90.af.b.l
-static const char *r8_names[] = { "b", "c", "d", "e", "h", "l", "a" };
-static const char *r16_names[] = { "bc", "de", "hl", "??", "ix", "iy", "sp", "af", "af'", "pc" };
+static const char *const r8_names[] = { "b", "c", "d", "e", "h", "l", "a" };
+static const char *const r16_names[] = { "bc", "de", "hl", "??", "ix", "iy", "sp", "af", "af'", "pc" };
// Condition Codes
@@ -107,13 +107,13 @@ static UINT8 SZP[256]; /* zero, sign and parity flags */
static UINT8 SZHV_inc[256]; /* zero, sign, half carry and overflow flags INC r8 */
static UINT8 SZHV_dec[256]; /* zero, sign, half carry and overflow flags DEC r8 */
-static const char *cc_names[] = { "f", "lt", "le", "ule", "ov", "mi", "z", "c", "", "ge", "gt", "ugt", "nov", "pl", "nz", "nc" };
+static const char *const cc_names[] = { "f", "lt", "le", "ule", "ov", "mi", "z", "c", "", "ge", "gt", "ugt", "nov", "pl", "nz", "nc" };
// Opcodes
#define OP_16 0x80
typedef enum { UNKNOWN, NOP, EX, EXX, LD, LDW, LDA, LDI, LDIR, LDD, LDDR, CPI, CPIR, CPD, CPDR, PUSH, POP, JP, JR, CALL, CALLR, RET, RETI, HALT, DI, EI, SWI, DAA, CPL, NEG, LDAR, RCF, SCF, CCF, TSET, BIT, SET, RES, INC, DEC, INCX, DECX, INCW, DECW, ADD, ADC, SUB, SBC, AND, XOR, OR, CP, RLC, RRC, RL, RR, SLA, SRA, SLL, SRL, RLD, RRD, DJNZ, MUL, DIV } e_op;
-static const char *op_names[] = { "??", "nop", "ex", "exx", "ld", "ldw", "lda", "ldi", "ldir", "ldd", "lddr", "cpi", "cpir", "cpd", "cpdr", "push", "pop", "jp", "jr", "call", "callr", "ret", "reti", "halt", "di", "ei", "swi", "daa", "cpl", "neg", "ldar", "rcf", "scf", "ccf", "tset", "bit", "set", "res", "inc", "dec", "incx", "decx", "incw", "decw", "add", "adc", "sub", "sbc", "and", "xor", "or", "cp", "rlc", "rrc", "rl", "rr", "sla", "sra", "sll", "srl", "rld", "rrd", "djnz", "mul", "div" };
+static const char *const op_names[] = { "??", "nop", "ex", "exx", "ld", "ldw", "lda", "ldi", "ldir", "ldd", "lddr", "cpi", "cpir", "cpd", "cpdr", "push", "pop", "jp", "jr", "call", "callr", "ret", "reti", "halt", "di", "ei", "swi", "daa", "cpl", "neg", "ldar", "rcf", "scf", "ccf", "tset", "bit", "set", "res", "inc", "dec", "incx", "decx", "incw", "decw", "add", "adc", "sub", "sbc", "and", "xor", "or", "cp", "rlc", "rrc", "rl", "rr", "sla", "sra", "sll", "srl", "rld", "rrd", "djnz", "mul", "div" };
typedef enum {
MODE_NONE, MODE_BIT8, MODE_CC,
@@ -936,7 +936,7 @@ static void decode(void)
OP( UNKNOWN,2 ) NONE( 1 ) NONE( 2 )
}
-static const char *ir_names[] = {
+static const char *const ir_names[] = {
"P0", "P1", "P01CR/IRFL", "IRFH", "P2", "P2CR", "P3", "P3CR",
"P4", "P4CR", "P5", "SMMOD", "P6", "P7", "P67CR", "SMCR",
"P8", "P8CR", "WDMOD", "WDCR", "TREG0", "TREG1", "TREG2", "TREG3",
diff --git a/src/emu/cpu/tms32010/32010dsm.c b/src/emu/cpu/tms32010/32010dsm.c
index 9c78d4deb68..de7078603de 100644
--- a/src/emu/cpu/tms32010/32010dsm.c
+++ b/src/emu/cpu/tms32010/32010dsm.c
@@ -52,11 +52,11 @@ typedef unsigned short int word;
#define FMT(a,b) a, b
#define PTRS_PER_FORMAT 2
-static const char *arith[4] = { "*" , "*-" , "*+" , "??" } ;
-static const char *nextar[4] = { ",AR0" , ",AR1" , "" , "" } ;
+static const char *const arith[4] = { "*" , "*-" , "*+" , "??" } ;
+static const char *const nextar[4] = { ",AR0" , ",AR1" , "" , "" } ;
-static const char *TMS32010Formats[] = {
+static const char *const TMS32010Formats[] = {
FMT("0000ssss0aaaaaaa", "add %A%S"),
FMT("0000ssss10mmn00n", "add %M%S%N"),
FMT("0001ssss0aaaaaaa", "sub %A%S"),
@@ -183,7 +183,8 @@ static int OpInizialized = 0;
static void InitDasm32010(void)
{
- const char *p, **ops;
+ const char *p;
+ const char *const *ops;
word mask, bits;
int bit;
int i;
diff --git a/src/emu/cpu/tms32010/tms32010.c b/src/emu/cpu/tms32010/tms32010.c
index c7c7105381b..580256a896f 100644
--- a/src/emu/cpu/tms32010/tms32010.c
+++ b/src/emu/cpu/tms32010/tms32010.c
@@ -665,7 +665,7 @@ static unsigned cycles_7F_other[32]=
* Opcode Table
***********************************************************************/
-static opcode_fn opcode_main[256]=
+static const opcode_fn opcode_main[256]=
{
/*00*/ add_sh ,add_sh ,add_sh ,add_sh ,add_sh ,add_sh ,add_sh ,add_sh
/*08*/ ,add_sh ,add_sh ,add_sh ,add_sh ,add_sh ,add_sh ,add_sh ,add_sh
@@ -701,7 +701,7 @@ static opcode_fn opcode_main[256]=
/*F8*/ ,call ,br ,blz ,blez ,bgz ,bgez ,bnz ,bz
};
-static opcode_fn opcode_7F_other[32]=
+static const opcode_fn opcode_7F_other[32]=
{
/*80*/ nop ,dint ,eint ,illegal ,illegal ,illegal ,illegal ,illegal
/*88*/ ,abst ,zac ,rovm ,sovm ,cala ,ret ,pac ,apac
diff --git a/src/emu/cpu/tms32025/32025dsm.c b/src/emu/cpu/tms32025/32025dsm.c
index ab6f524b42c..8f4594bb251 100644
--- a/src/emu/cpu/tms32025/32025dsm.c
+++ b/src/emu/cpu/tms32025/32025dsm.c
@@ -60,12 +60,12 @@ typedef unsigned short int word;
#define FMT(a,b) a, b
#define PTRS_PER_FORMAT 2
-static const char *arith[8] = { "*", "*-", "*+", "??", "BR0-", "*0-", "*0+", "*BR0+" } ;
-static const char *nextar[16] = { "", "", "", "", "", "", "", "", ",AR0", ",AR1", ",AR2", ",AR3", ",AR4", ",AR5", ",AR6", ",AR7" } ;
-static const char *cmpmode[4] = { "0 (ARx = AR0)" , "1 (ARx < AR0)" , "2 (ARx > AR0)" , "3 (ARx <> AR0)" } ;
+static const char *const arith[8] = { "*", "*-", "*+", "??", "BR0-", "*0-", "*0+", "*BR0+" } ;
+static const char *const nextar[16] = { "", "", "", "", "", "", "", "", ",AR0", ",AR1", ",AR2", ",AR3", ",AR4", ",AR5", ",AR6", ",AR7" } ;
+static const char *const cmpmode[4] = { "0 (ARx = AR0)" , "1 (ARx < AR0)" , "2 (ARx > AR0)" , "3 (ARx <> AR0)" } ;
-static const char *TMS32025Formats[] = {
+static const char *const TMS32025Formats[] = {
FMT("0000tttt0aaaaaaa", "add %A,%T"), /* 0xxx */
FMT("0000tttt1mmmnnnn", "add %M,%T%N"),
FMT("0001tttt0aaaaaaa", "sub %A,%T"), /* 1xxx */
@@ -347,7 +347,8 @@ static int OpInizialized = 0;
static void InitDasm32025(void)
{
- const char *p, **ops;
+ const char *p;
+ const char *const *ops;
word mask, bits;
int bit;
int i;
diff --git a/src/emu/cpu/tms32025/tms32025.c b/src/emu/cpu/tms32025/tms32025.c
index 3c9c3b971a7..352f787efba 100644
--- a/src/emu/cpu/tms32025/tms32025.c
+++ b/src/emu/cpu/tms32025/tms32025.c
@@ -1643,7 +1643,7 @@ static unsigned cycles_CE_subset[256]=
* Opcode Table
***********************************************************************/
-static opcode_fn opcode_main[256]=
+static const opcode_fn opcode_main[256]=
{
/*00*/ add, add, add, add, add, add, add, add,
/*08*/ add, add, add, add, add, add, add, add,
@@ -1679,12 +1679,12 @@ static opcode_fn opcode_main[256]=
/*F8*/ bbz, bbnz, bioz, banz, blkp, blkd, call, br
};
-static opcode_fn opcode_DX_subset[8]= /* Instructions living under the Dxxx opcode */
+static const opcode_fn opcode_DX_subset[8]= /* Instructions living under the Dxxx opcode */
{
/*00*/ lrlk, lalk, adlk, sblk, andk, ork, xork, illegal
};
-static opcode_fn opcode_CE_subset[256]=
+static const opcode_fn opcode_CE_subset[256]=
{
/*00*/ eint, dint, rovm, sovm, cnfd, cnfp, rsxm, ssxm,
/*08*/ spm, spm, spm, spm, rxf, sxf, fort, fort,
diff --git a/src/emu/cpu/tms32031/32031ops.c b/src/emu/cpu/tms32031/32031ops.c
index 94d2b608a75..bc8e1e96e8b 100644
--- a/src/emu/cpu/tms32031/32031ops.c
+++ b/src/emu/cpu/tms32031/32031ops.c
@@ -66,7 +66,7 @@
FORWARD DECLARATIONS
***************************************************************************/
-void (*tms32031ops[])(void);
+void (*const tms32031ops[])(void);
@@ -1231,7 +1231,7 @@ static UINT32 mod17_def(UINT8 ar)
/* tables */
-static UINT32 (*indirect_d[0x20])(UINT8) =
+static UINT32 (*const indirect_d[0x20])(UINT8) =
{
mod00_d, mod01_d, mod02_d, mod03_d, mod04_d, mod05_d, mod06_d, mod07_d,
mod08, mod09, mod0a, mod0b, mod0c, mod0d, mod0e, mod0f,
@@ -1240,7 +1240,7 @@ static UINT32 (*indirect_d[0x20])(UINT8) =
};
-static UINT32 (*indirect_1[0x20])(UINT8) =
+static UINT32 (*const indirect_1[0x20])(UINT8) =
{
mod00_1, mod01_1, mod02_1, mod03_1, mod04_1, mod05_1, mod06_1, mod07_1,
mod08, mod09, mod0a, mod0b, mod0c, mod0d, mod0e, mod0f,
@@ -1249,7 +1249,7 @@ static UINT32 (*indirect_1[0x20])(UINT8) =
};
-static UINT32 (*indirect_1_def[0x20])(UINT8) =
+static UINT32 (*const indirect_1_def[0x20])(UINT8) =
{
mod00_1, mod01_1, mod02_1_def,mod03_1_def,mod04_1_def,mod05_1_def,mod06_1_def,mod07_1_def,
mod08, mod09, mod0a_def, mod0b_def, mod0c_def, mod0d_def, mod0e_def, mod0f_def,
@@ -6103,7 +6103,7 @@ static void xor3sti(void)
FUNCTION TABLE
***************************************************************************/
-void (*tms32031ops[])(void) =
+void (*const tms32031ops[])(void) =
{
absf_reg, absf_dir, absf_ind, absf_imm, /* 0x00 */
absi_reg, absi_dir, absi_ind, absi_imm,
diff --git a/src/emu/cpu/tms32031/dis32031.c b/src/emu/cpu/tms32031/dis32031.c
index 47735b19963..8c599b932d6 100644
--- a/src/emu/cpu/tms32031/dis32031.c
+++ b/src/emu/cpu/tms32031/dis32031.c
@@ -37,7 +37,7 @@ INLINE char *signed_16bit(INT16 val)
return temp;
}
-static const char *regname[32] =
+static const char *const regname[32] =
{
"R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7",
"AR0", "AR1", "AR2", "AR3", "AR4", "AR5", "AR6", "AR7",
@@ -45,7 +45,7 @@ static const char *regname[32] =
"IOF", "RS", "RE", "RC", "??", "??", "??", "??"
};
-static const char *condition[32] =
+static const char *const condition[32] =
{
"U", "LO", "LS", "HI", "HS", "EQ", "NE", "LT",
"LE", "GT", "GE", "??", "NV", "V", "NUF", "UF",
diff --git a/src/emu/cpu/tms32051/32051ops.h b/src/emu/cpu/tms32051/32051ops.h
index a2f2c222f3b..d627d2d08f9 100644
--- a/src/emu/cpu/tms32051/32051ops.h
+++ b/src/emu/cpu/tms32051/32051ops.h
@@ -1,4 +1,4 @@
-static void (* tms32051_opcode_table[256])(void) =
+static void (*const tms32051_opcode_table[256])(void) =
{
/* 0x00 - 0x0f */
op_lar_mem, op_lar_mem, op_lar_mem, op_lar_mem,
@@ -82,7 +82,7 @@ static void (* tms32051_opcode_table[256])(void) =
op_retcd, op_retcd, op_retcd, op_retcd
};
-static void (* tms32051_opcode_table_be[256])(void) =
+static void (*const tms32051_opcode_table_be[256])(void) =
{
/* 0x00 - 0x0f */
op_abs, op_cmpl, op_neg, op_pac,
@@ -166,7 +166,7 @@ static void (* tms32051_opcode_table_be[256])(void) =
op_invalid, op_invalid, op_invalid, op_invalid,
};
-static void (* tms32051_opcode_table_bf[256])(void) =
+static void (*const tms32051_opcode_table_bf[256])(void) =
{
/* 0x00 - 0x0f */
op_spm, op_spm, op_spm, op_spm,
diff --git a/src/emu/cpu/tms32051/dis32051.c b/src/emu/cpu/tms32051/dis32051.c
index 7a0b577c37a..ad741f4966b 100644
--- a/src/emu/cpu/tms32051/dis32051.c
+++ b/src/emu/cpu/tms32051/dis32051.c
@@ -3,7 +3,7 @@
-static const char *zl_condition_codes[] =
+static const char *const zl_condition_codes[] =
{
// bit 3, 2 (ZL), bit 1, 0 (MASK)
"", // Z=0, L=0, ZM=0, ZL=0
@@ -24,7 +24,7 @@ static const char *zl_condition_codes[] =
"leq", // Z=1, L=1, ZM=1, ZL=1
};
-static const char *cv_condition_codes[16] =
+static const char *const cv_condition_codes[16] =
{
"", // C=0, V=0, CM=0, VM=0
"nov", // C=0, V=0, CM=0, VM=1
@@ -44,7 +44,7 @@ static const char *cv_condition_codes[16] =
"c ov", // C=1, V=1, CM=1, VM=1
};
-static const char *tp_condition_codes[4] =
+static const char *const tp_condition_codes[4] =
{
"bio",
"tc",
diff --git a/src/emu/cpu/tms34010/34010fld.c b/src/emu/cpu/tms34010/34010fld.c
index dc3e4896da9..e614c19cf72 100644
--- a/src/emu/cpu/tms34010/34010fld.c
+++ b/src/emu/cpu/tms34010/34010fld.c
@@ -184,7 +184,7 @@ static void wfield_32(offs_t offset,UINT32 data)
}
-void (*tms34010_wfield_functions[32])(offs_t offset,UINT32 data) =
+void (*const tms34010_wfield_functions[32])(offs_t offset,UINT32 data) =
{
wfield_32, wfield_01, wfield_02, wfield_03, wfield_04, wfield_05,
wfield_06, wfield_07, wfield_08, wfield_09, wfield_10, wfield_11,
@@ -665,7 +665,7 @@ static UINT32 rfield_s_31(offs_t offset)
return ((INT32)(ret << 1)) >> 1;
}
-UINT32 (*tms34010_rfield_functions[64])(offs_t offset) =
+UINT32 (*const tms34010_rfield_functions[64])(offs_t offset) =
{
rfield_32 , rfield_z_01, rfield_z_02, rfield_z_03, rfield_z_04, rfield_z_05,
rfield_z_06, rfield_z_07, rfield_z_08, rfield_z_09, rfield_z_10, rfield_z_11,
diff --git a/src/emu/cpu/tms34010/34010gfx.c b/src/emu/cpu/tms34010/34010gfx.c
index f0f2cdd3ecb..c4f82421a86 100644
--- a/src/emu/cpu/tms34010/34010gfx.c
+++ b/src/emu/cpu/tms34010/34010gfx.c
@@ -251,14 +251,14 @@ static UINT32 pixel_op19(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { INT32 tmp
static UINT32 pixel_op20(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { dstpix &= mask; return (srcpix > dstpix) ? srcpix : dstpix; }
static UINT32 pixel_op21(UINT32 dstpix, UINT32 mask, UINT32 srcpix) { dstpix &= mask; return (srcpix < dstpix) ? srcpix : dstpix; }
-static UINT32 (*pixel_op_table[])(UINT32, UINT32, UINT32) =
+static UINT32 (*const pixel_op_table[])(UINT32, UINT32, UINT32) =
{
pixel_op00, pixel_op01, pixel_op02, pixel_op03, pixel_op04, pixel_op05, pixel_op06, pixel_op07,
pixel_op08, pixel_op09, pixel_op10, pixel_op11, pixel_op12, pixel_op13, pixel_op14, pixel_op15,
pixel_op16, pixel_op17, pixel_op18, pixel_op19, pixel_op20, pixel_op21, pixel_op00, pixel_op00,
pixel_op00, pixel_op00, pixel_op00, pixel_op00, pixel_op00, pixel_op00, pixel_op00, pixel_op00
};
-static UINT8 pixel_op_timing_table[] =
+static const UINT8 pixel_op_timing_table[] =
{
2,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,6,5,5,2,2,2,2,2,2,2,2,2,2,2
};
@@ -353,7 +353,7 @@ static void fill_16_opx_trans(int dst_is_linear);
/* tables */
-static void (*pixblt_op_table[])(int, int) =
+static void (*const pixblt_op_table[])(int, int) =
{
pixblt_1_op0, pixblt_1_op0_trans, pixblt_1_opx, pixblt_1_opx_trans,
pixblt_1_opx, pixblt_1_opx_trans, pixblt_1_opx, pixblt_1_opx_trans,
@@ -441,7 +441,7 @@ static void (*pixblt_op_table[])(int, int) =
pixblt_16_opx, pixblt_16_opx_trans, pixblt_16_opx, pixblt_16_opx_trans
};
-static void (*pixblt_r_op_table[])(int, int) =
+static void (*const pixblt_r_op_table[])(int, int) =
{
pixblt_r_1_op0, pixblt_r_1_op0_trans, pixblt_r_1_opx, pixblt_r_1_opx_trans,
pixblt_r_1_opx, pixblt_r_1_opx_trans, pixblt_r_1_opx, pixblt_r_1_opx_trans,
@@ -529,7 +529,7 @@ static void (*pixblt_r_op_table[])(int, int) =
pixblt_r_16_opx,pixblt_r_16_opx_trans, pixblt_r_16_opx,pixblt_r_16_opx_trans
};
-static void (*pixblt_b_op_table[])(int) =
+static void (*const pixblt_b_op_table[])(int) =
{
pixblt_b_1_op0, pixblt_b_1_op0_trans, pixblt_b_1_opx, pixblt_b_1_opx_trans,
pixblt_b_1_opx, pixblt_b_1_opx_trans, pixblt_b_1_opx, pixblt_b_1_opx_trans,
@@ -617,7 +617,7 @@ static void (*pixblt_b_op_table[])(int) =
pixblt_b_16_opx,pixblt_b_16_opx_trans, pixblt_b_16_opx,pixblt_b_16_opx_trans
};
-static void (*fill_op_table[])(int) =
+static void (*const fill_op_table[])(int) =
{
fill_1_op0, fill_1_op0_trans, fill_1_opx, fill_1_opx_trans,
fill_1_opx, fill_1_opx_trans, fill_1_opx, fill_1_opx_trans,
@@ -893,7 +893,7 @@ static void (*fill_op_table[])(int) =
#undef PIXEL_OP_TIMING
#undef PIXEL_OP
-static UINT8 pixelsize_lookup[32] =
+static const UINT8 pixelsize_lookup[32] =
{
0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4
};
diff --git a/src/emu/cpu/tms34010/34010tbl.c b/src/emu/cpu/tms34010/34010tbl.c
index 2e08b9ca29c..ef07d0dd6f7 100644
--- a/src/emu/cpu/tms34010/34010tbl.c
+++ b/src/emu/cpu/tms34010/34010tbl.c
@@ -394,7 +394,7 @@ static void vlcol(void);
/* Opcode Table */
-static void (*opcode_table[65536 >> 4])(void) =
+static void (*const opcode_table[65536 >> 4])(void) =
{
/* 0x0000 0x0010 0x0020 0x0030 ... 0x00f0 */
unimpl, unimpl, rev_a, rev_b, idle, unimpl, unimpl, unimpl,
diff --git a/src/emu/cpu/tms34010/dis34010.c b/src/emu/cpu/tms34010/dis34010.c
index 7b1addb953f..89d43af6400 100644
--- a/src/emu/cpu/tms34010/dis34010.c
+++ b/src/emu/cpu/tms34010/dis34010.c
@@ -9,7 +9,7 @@ static UINT32 offset;
#include "34010dsm.c"
-static char *Options[]=
+static const char *const Options[]=
{
"begin","end","offset",0
};
diff --git a/src/emu/cpu/tms34010/tms34010.c b/src/emu/cpu/tms34010/tms34010.c
index eab03d73025..9860e91a953 100644
--- a/src/emu/cpu/tms34010/tms34010.c
+++ b/src/emu/cpu/tms34010/tms34010.c
@@ -825,7 +825,7 @@ static int tms34010_execute(int cycles)
PIXEL OPS
***************************************************************************/
-static void (*pixel_write_ops[4][5])(offs_t offset,UINT32 data) =
+static void (*const pixel_write_ops[4][5])(offs_t offset,UINT32 data) =
{
{ write_pixel_1, write_pixel_2, write_pixel_4, write_pixel_8, write_pixel_16 },
{ write_pixel_r_1, write_pixel_r_2, write_pixel_r_4, write_pixel_r_8, write_pixel_r_16 },
@@ -833,7 +833,7 @@ static void (*pixel_write_ops[4][5])(offs_t offset,UINT32 data) =
{ write_pixel_r_t_1, write_pixel_r_t_2, write_pixel_r_t_4, write_pixel_r_t_8, write_pixel_r_t_16 }
};
-static UINT32 (*pixel_read_ops[5])(offs_t offset) =
+static UINT32 (*const pixel_read_ops[5])(offs_t offset) =
{
read_pixel_1, read_pixel_2, read_pixel_4, read_pixel_8, read_pixel_16
};
@@ -876,7 +876,7 @@ static void set_pixel_function(void)
RASTER OPS
***************************************************************************/
-static INT32 (*raster_ops[32]) (INT32 newpix, INT32 oldpix) =
+static INT32 (*const raster_ops[32]) (INT32 newpix, INT32 oldpix) =
{
0, raster_op_1 , raster_op_2 , raster_op_3,
raster_op_4 , raster_op_5 , raster_op_6 , raster_op_7,
@@ -1120,7 +1120,7 @@ VIDEO_UPDATE( tms340x0 )
I/O REGISTER WRITES
***************************************************************************/
-static const char *ioreg_name[] =
+static const char *const ioreg_name[] =
{
"HESYNC", "HEBLNK", "HSBLNK", "HTOTAL",
"VESYNC", "VEBLNK", "VSBLNK", "VTOTAL",
@@ -1247,7 +1247,7 @@ WRITE16_HANDLER( tms34010_io_register_w )
}
-static const char *ioreg020_name[] =
+static const char *const ioreg020_name[] =
{
"VESYNC", "HESYNC", "VEBLNK", "HEBLNK",
"VSBLNK", "HSBLNK", "VTOTAL", "HTOTAL",
diff --git a/src/emu/cpu/tms7000/7000dasm.c b/src/emu/cpu/tms7000/7000dasm.c
index 3048c0f1689..358c5bcce0d 100644
--- a/src/emu/cpu/tms7000/7000dasm.c
+++ b/src/emu/cpu/tms7000/7000dasm.c
@@ -15,7 +15,7 @@ typedef struct {
UINT32 s_flag;
} opcodeinfo;
-static oprandinfo of[] = {
+static const oprandinfo of[] = {
/* 00 */ { {" B,A", "", "", ""}, {NONE, DONE, DONE, DONE} },
/* 01 */ { {" R%u", ",A", "", ""}, {UI8, NONE, DONE, DONE} },
/* 02 */ { {" R%u", ",B", "", ""}, {UI8, NONE, DONE, DONE} },
@@ -75,7 +75,7 @@ static oprandinfo of[] = {
/* 45 */ { {" *R%u", "", "", ""}, {UI8, DONE, DONE, DONE} }
};
-static opcodeinfo opcodes[] = {
+static const opcodeinfo opcodes[] = {
{0x69, "ADC", 0, 0 },
{0x19, "ADC", 1, 0 },
{0x39, "ADC", 2, 0 },
diff --git a/src/emu/cpu/tms9900/99xxcore.h b/src/emu/cpu/tms9900/99xxcore.h
index 360c92c7aff..2414e374631 100644
--- a/src/emu/cpu/tms9900/99xxcore.h
+++ b/src/emu/cpu/tms9900/99xxcore.h
@@ -2377,7 +2377,7 @@ static int read_single_CRU(int port)
static int readCRU(int CRUAddr, int Number)
{
- static int BitMask[] =
+ static const int BitMask[] =
{
0, /* filler - saves a subtract to find mask */
0x0001,0x0003,0x0007,0x000F,0x001F,0x003F,0x007F,0x00FF,
@@ -4527,7 +4527,7 @@ INLINE void execute(UINT16 opcode)
/* tms9900-like instruction set*/
- static void (* jumptable[128])(UINT16) =
+ static void (*const jumptable[128])(UINT16) =
{
&illegal,&h0200,&h0400,&h0400,&h0800,&h0800,&illegal,&illegal,
&h1000,&h1000,&h1000,&h1000,&h1000,&h1000,&h1000,&h1000,
@@ -4554,7 +4554,7 @@ INLINE void execute(UINT16 opcode)
/* tms9989 and tms9995 include 4 extra instructions, and one additionnal instruction type */
/* tms99000 includes yet another additional instruction */
- static void (* jumptable[256])(UINT16) =
+ static void (*const jumptable[256])(UINT16) =
{
&h0040,&h0100,&h0200,&h0200,&h0400,&h0400,&h0400,&h0400,
&h0800,&h0800,&h0800,&h0800,&illegal,&illegal,&illegal,&illegal,
diff --git a/src/emu/cpu/upd7810/7810dasm.c b/src/emu/cpu/upd7810/7810dasm.c
index 0024992a555..30850483023 100644
--- a/src/emu/cpu/upd7810/7810dasm.c
+++ b/src/emu/cpu/upd7810/7810dasm.c
@@ -189,7 +189,7 @@ enum
XRI
};
-static const char* token[] =
+static const char *const token[] =
{
"",
"illegal",
@@ -364,7 +364,7 @@ static const char* token[] =
/* prefix 48 */
-static struct dasm_s dasm48_7810[256] =
+static const struct dasm_s dasm48_7810[256] =
{
{illegal,0, 2, 8}, /* 00: 0100 1000 0000 0000 */
{SLRC,"A", 2, 8}, /* 01: 0100 1000 0000 0001 */
@@ -639,7 +639,7 @@ static struct dasm_s dasm48_7810[256] =
{illegal,0, 2, 8} /* ff: 0100 1000 1111 1111 */
};
-static struct dasm_s dasm48_7807[256] =
+static const struct dasm_s dasm48_7807[256] =
{
{illegal,0, 2, 8}, /* 00: 0100 1000 0000 0000 */
{SLRC,"A", 2, 8}, /* 01: 0100 1000 0000 0001 */
@@ -915,7 +915,7 @@ static struct dasm_s dasm48_7807[256] =
};
/* prefix 4C */
-static struct dasm_s dasm4C_7810[256] =
+static const struct dasm_s dasm4C_7810[256] =
{
{illegal,0, 2, 8}, /* 00: 0100 1100 0000 0000 */
{illegal,0, 2, 8}, /* 01: 0100 1100 0000 0001 */
@@ -1190,7 +1190,7 @@ static struct dasm_s dasm4C_7810[256] =
{illegal,0, 2,10} /* ff: 0100 1100 1111 1111 */
};
-static struct dasm_s dasm4C_7807[256] =
+static const struct dasm_s dasm4C_7807[256] =
{
{illegal,0, 2, 8}, /* 00: 0100 1100 0000 0000 */
{illegal,0, 2, 8}, /* 01: 0100 1100 0000 0001 */
@@ -1466,7 +1466,7 @@ static struct dasm_s dasm4C_7807[256] =
};
/* prefix 4D */
-static struct dasm_s dasm4D_7810[256] =
+static const struct dasm_s dasm4D_7810[256] =
{
{illegal,0, 2, 8}, /* 00: 0100 1101 0000 0000 */
{illegal,0, 2, 8}, /* 01: 0100 1101 0000 0001 */
@@ -1741,7 +1741,7 @@ static struct dasm_s dasm4D_7810[256] =
{illegal,0, 2,10} /* ff: 0100 1101 1111 1111 */
};
-static struct dasm_s dasm4D_7807[256] =
+static const struct dasm_s dasm4D_7807[256] =
{
{illegal,0, 2, 8}, /* 00: 0100 1101 0000 0000 */
{illegal,0, 2, 8}, /* 01: 0100 1101 0000 0001 */
@@ -2017,7 +2017,7 @@ static struct dasm_s dasm4D_7807[256] =
};
/* prefix 60 */
-static struct dasm_s dasm60[256] =
+static const struct dasm_s dasm60[256] =
{
{illegal,0, 2, 8}, /* 00: 0110 0000 0000 0000 */
{illegal,0, 2, 8}, /* 01: 0110 0000 0000 0001 */
@@ -2293,7 +2293,7 @@ static struct dasm_s dasm60[256] =
};
/* prefix 64 */
-static struct dasm_s dasm64_7810[256] =
+static const struct dasm_s dasm64_7810[256] =
{
{MVI,"PA,%b", 3,14}, /* 00: 0110 0100 0000 0000 xxxx xxxx */
{MVI,"PB,%b", 3,14}, /* 01: 0110 0100 0000 0001 xxxx xxxx */
@@ -2568,7 +2568,7 @@ static struct dasm_s dasm64_7810[256] =
{illegal,0, 3,20} /* ff: 0110 0100 1111 1111 xxxx xxxx */
};
-static struct dasm_s dasm64_7807[256] =
+static const struct dasm_s dasm64_7807[256] =
{
{MVI,"PA,%b", 3,14}, /* 00: 0110 0100 0000 0000 xxxx xxxx */
{MVI,"PB,%b", 3,14}, /* 01: 0110 0100 0000 0001 xxxx xxxx */
@@ -2844,7 +2844,7 @@ static struct dasm_s dasm64_7807[256] =
};
/* prefix 70 */
-static struct dasm_s dasm70[256] =
+static const struct dasm_s dasm70[256] =
{
{illegal,0, 2, 8}, /* 00: 0111 0000 0000 0000 */
{illegal,0, 2, 8}, /* 01: 0111 0000 0000 0001 */
@@ -3120,7 +3120,7 @@ static struct dasm_s dasm70[256] =
};
/* prefix 74 */
-static struct dasm_s dasm74[256] =
+static const struct dasm_s dasm74[256] =
{
{illegal,0, 2, 8}, /* 00: 0111 0100 0000 0000 */
{illegal,0, 2, 8}, /* 01: 0111 0100 0000 0001 */
@@ -3396,7 +3396,7 @@ static struct dasm_s dasm74[256] =
};
/* main opcodes */
-static struct dasm_s dasmXX_7810[256] =
+static const struct dasm_s dasmXX_7810[256] =
{
{NOP,0, 1, 4}, /* 00: 0000 0000 */
{LDAW,"%a", 2,10}, /* 01: 0000 0001 oooo oooo */
@@ -3671,7 +3671,7 @@ static struct dasm_s dasmXX_7810[256] =
{JR,"%o", 1,10} /* ff: 11oo oooo */
};
-static struct dasm_s dasmXX_7807[256] =
+static const struct dasm_s dasmXX_7807[256] =
{
{NOP,0, 1, 4}, /* 00: 0000 0000 */
{LDAW,"%a", 2,10}, /* 01: 0000 0001 oooo oooo */
@@ -3947,7 +3947,7 @@ static struct dasm_s dasmXX_7807[256] =
/* register names for bit manipulation instructions */
-static const char *regname[32] =
+static const char *const regname[32] =
{
"illegal", "illegal", "illegal", "illegal",
"illegal", "illegal", "illegal", "illegal",
@@ -3961,7 +3961,7 @@ static const char *regname[32] =
static unsigned upd7810_get_reg(int reg) { cpuinfo info; upd7810_get_info(CPUINFO_INT_REGISTER + (reg), &info); return info.i; }
-static unsigned Dasm( char *buffer, unsigned pc, struct dasm_s *dasmXX, const UINT8 *oprom, const UINT8 *opram )
+static unsigned Dasm( char *buffer, unsigned pc, const struct dasm_s *dasmXX, const UINT8 *oprom, const UINT8 *opram )
{
unsigned opc = pc;
UINT8 op = oprom[pc++ - opc], op2, t, l;
diff --git a/src/emu/cpu/upd7810/7810tbl.c b/src/emu/cpu/upd7810/7810tbl.c
index d6032fc8aed..0a149298d94 100644
--- a/src/emu/cpu/upd7810/7810tbl.c
+++ b/src/emu/cpu/upd7810/7810tbl.c
@@ -1024,7 +1024,7 @@ static void XRI_SMH_xx(void);
static void XRI_TMM_xx(void);
static void XRI_V_xx(void);
-static struct opcode_s op48[256] =
+static const struct opcode_s op48[256] =
{
{illegal, 2, 8, 8,L0|L1}, /* 00: 0100 1000 0000 0000 */
{SLRC_A, 2, 8, 8,L0|L1}, /* 01: 0100 1000 0000 0001 */
@@ -1303,7 +1303,7 @@ static struct opcode_s op48[256] =
};
/* prefix 4C */
-static struct opcode_s op4C[256] =
+static const struct opcode_s op4C[256] =
{
{illegal2, 2, 8, 8,L0|L1}, /* 00: 0100 1100 0000 0000 */
{illegal2, 2, 8, 8,L0|L1}, /* 01: 0100 1100 0000 0001 */
@@ -1580,7 +1580,7 @@ static struct opcode_s op4C[256] =
};
/* prefix 4D */
-static struct opcode_s op4D[256] =
+static const struct opcode_s op4D[256] =
{
{illegal2, 2, 8, 8,L0|L1}, /* 00: 0100 1101 0000 0000 */
{illegal2, 2, 8, 8,L0|L1}, /* 01: 0100 1101 0000 0001 */
@@ -1856,7 +1856,7 @@ static struct opcode_s op4D[256] =
};
/* prefix 60 */
-static struct opcode_s op60[256] =
+static const struct opcode_s op60[256] =
{
{illegal2, 2, 8, 8,L0|L1}, /* 00: 0110 0000 0000 0000 */
{illegal2, 2, 8, 8,L0|L1}, /* 01: 0110 0000 0000 0001 */
@@ -2132,7 +2132,7 @@ static struct opcode_s op60[256] =
};
/* prefix 64 */
-static struct opcode_s op64[256] =
+static const struct opcode_s op64[256] =
{
{MVI_PA_xx, 3,14,11,L0|L1}, /* 00: 0110 0100 0000 0000 xxxx xxxx */
{MVI_PB_xx, 3,14,11,L0|L1}, /* 01: 0110 0100 0000 0001 xxxx xxxx */
@@ -2408,7 +2408,7 @@ static struct opcode_s op64[256] =
};
/* prefix 70 */
-static struct opcode_s op70[256] =
+static const struct opcode_s op70[256] =
{
{illegal2, 2, 8, 8,L0|L1}, /* 00: 0111 0000 0000 0000 */
{illegal2, 2, 8, 8,L0|L1}, /* 01: 0111 0000 0000 0001 */
@@ -2685,7 +2685,7 @@ static struct opcode_s op70[256] =
};
/* prefix 74 */
-static struct opcode_s op74[256] =
+static const struct opcode_s op74[256] =
{
{illegal2, 2, 8, 8,L0|L1}, /* 00: 0111 0100 0000 0000 */
{illegal2, 2, 8, 8,L0|L1}, /* 01: 0111 0100 0000 0001 */
@@ -2961,7 +2961,7 @@ static struct opcode_s op74[256] =
};
/* main opcodes */
-static struct opcode_s opXX_7810[256] =
+static const struct opcode_s opXX_7810[256] =
{
{NOP, 1, 4, 4,L0|L1}, /* 00: 0000 0000 */
{LDAW_wa, 2,10,10,L0|L1}, /* 01: 0000 0001 oooo oooo */
@@ -3236,7 +3236,7 @@ static struct opcode_s opXX_7810[256] =
{JR, 1,10,10,L0|L1} /* ff: 1111 1111 */
};
-static struct opcode_s opXX_7807[256] =
+static const struct opcode_s opXX_7807[256] =
{
{NOP, 1, 4, 4,L0|L1}, /* 00: 0000 0000 */
{LDAW_wa, 2,10,10,L0|L1}, /* 01: 0000 0001 oooo oooo */
diff --git a/src/emu/cpu/v30mz/v30mz.c b/src/emu/cpu/v30mz/v30mz.c
index 83ad5c867d7..f70be456507 100644
--- a/src/emu/cpu/v30mz/v30mz.c
+++ b/src/emu/cpu/v30mz/v30mz.c
@@ -925,7 +925,7 @@ static offs_t nec_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8
static void nec_init(int index, int clock, const void *config, int (*irqcallback)(int), int type)
{
- static const char *names[]={"V20","V30","V33","V30MZ"};
+ static const char *const names[]={"V20","V30","V33","V30MZ"};
state_save_register_item_array(names[type], index, I.regs.w);
state_save_register_item_array(names[type], index, I.sregs);
diff --git a/src/emu/cpu/v60/v60.c b/src/emu/cpu/v60/v60.c
index c405054e287..132a2001ec2 100644
--- a/src/emu/cpu/v60/v60.c
+++ b/src/emu/cpu/v60/v60.c
@@ -160,7 +160,7 @@ static int v60_stall_io;
//29-31 reserved
// Register names
-const char *v60_reg_names[69] = {
+const char *const v60_reg_names[69] = {
"R0", "R1", "R2", "R3",
"R4", "R5", "R6", "R7",
"R8", "R9", "R10", "R11",
diff --git a/src/emu/cpu/v60/v60.h b/src/emu/cpu/v60/v60.h
index d5dbb2ba9e7..37d3c68da92 100644
--- a/src/emu/cpu/v60/v60.h
+++ b/src/emu/cpu/v60/v60.h
@@ -75,7 +75,7 @@ enum {
V60_REGMAX
};
-extern const char *v60_reg_names[];
+extern const char *const v60_reg_names[];
void v60_stall(void);
#if HAS_V60
diff --git a/src/emu/cpu/v810/v810.c b/src/emu/cpu/v810/v810.c
index 26d7b7ee708..ff0b9528ee8 100644
--- a/src/emu/cpu/v810/v810.c
+++ b/src/emu/cpu/v810/v810.c
@@ -877,7 +877,7 @@ static UINT32 opFpoint(void)
return clkIF+1;
}
-static UINT32 (*OpCodeTable[64])(void) =
+static UINT32 (*const OpCodeTable[64])(void) =
{
/* 0x00 */ opMOVr, // mov r1,r2 1
/* 0x01 */ opADDr, // add r1,r2 1
diff --git a/src/emu/cpu/v810/v810dasm.c b/src/emu/cpu/v810/v810dasm.c
index 2cf52742d16..9d1f4475e41 100644
--- a/src/emu/cpu/v810/v810dasm.c
+++ b/src/emu/cpu/v810/v810dasm.c
@@ -7,7 +7,8 @@
#include "debugger.h"
#include "v810.h"
-const static char *dRegs[]={
+static const char *const dRegs[]=
+{
"R0","R1","R2","SP","R4",
"R5","R6","R7","R8","R9",
"R10","R11","R12","R13",
diff --git a/src/emu/cpu/x86drc.c b/src/emu/cpu/x86drc.c
index 5092ee70d5c..098baf14ebd 100644
--- a/src/emu/cpu/x86drc.c
+++ b/src/emu/cpu/x86drc.c
@@ -19,8 +19,8 @@
-static UINT16 fp_control[4] = { 0x023f, 0x063f, 0x0a3f, 0x0e3f };
-static UINT32 sse_control[4] = { 0x9fc0, 0xbfc0, 0xdfc0, 0xffc0 };
+static const UINT16 fp_control[4] = { 0x023f, 0x063f, 0x0a3f, 0x0e3f };
+static const UINT32 sse_control[4] = { 0x9fc0, 0xbfc0, 0xdfc0, 0xffc0 };
static void append_entry_point(drc_core *drc);
diff --git a/src/emu/cpu/z180/z180.c b/src/emu/cpu/z180/z180.c
index b72dceaafbc..d9ea75f3ff9 100644
--- a/src/emu/cpu/z180/z180.c
+++ b/src/emu/cpu/z180/z180.c
@@ -2589,12 +2589,12 @@ void z180_get_info(UINT32 state, cpuinfo *info)
#endif /* MAME_DEBUG */
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &z180_icount; break;
case CPUINFO_PTR_TRANSLATE: info->translate = z180_translate; break;
- case CPUINFO_PTR_Z180_CYCLE_TABLE + Z180_TABLE_op: info->p = cc[Z180_TABLE_op]; break;
- case CPUINFO_PTR_Z180_CYCLE_TABLE + Z180_TABLE_cb: info->p = cc[Z180_TABLE_cb]; break;
- case CPUINFO_PTR_Z180_CYCLE_TABLE + Z180_TABLE_ed: info->p = cc[Z180_TABLE_ed]; break;
- case CPUINFO_PTR_Z180_CYCLE_TABLE + Z180_TABLE_xy: info->p = cc[Z180_TABLE_xy]; break;
- case CPUINFO_PTR_Z180_CYCLE_TABLE + Z180_TABLE_xycb: info->p = cc[Z180_TABLE_xycb]; break;
- case CPUINFO_PTR_Z180_CYCLE_TABLE + Z180_TABLE_ex: info->p = cc[Z180_TABLE_ex]; break;
+ case CPUINFO_PTR_Z180_CYCLE_TABLE + Z180_TABLE_op: info->p = (void *)cc[Z180_TABLE_op]; break;
+ case CPUINFO_PTR_Z180_CYCLE_TABLE + Z180_TABLE_cb: info->p = (void *)cc[Z180_TABLE_cb]; break;
+ case CPUINFO_PTR_Z180_CYCLE_TABLE + Z180_TABLE_ed: info->p = (void *)cc[Z180_TABLE_ed]; break;
+ case CPUINFO_PTR_Z180_CYCLE_TABLE + Z180_TABLE_xy: info->p = (void *)cc[Z180_TABLE_xy]; break;
+ case CPUINFO_PTR_Z180_CYCLE_TABLE + Z180_TABLE_xycb: info->p = (void *)cc[Z180_TABLE_xycb]; break;
+ case CPUINFO_PTR_Z180_CYCLE_TABLE + Z180_TABLE_ex: info->p = (void *)cc[Z180_TABLE_ex]; break;
/* --- the following bits of info are returned as NULL-terminated strings --- */
case CPUINFO_STR_NAME: strcpy(info->s, "Z180"); break;
diff --git a/src/emu/cpu/z180/z180daa.h b/src/emu/cpu/z180/z180daa.h
index 44dbbd3bc0b..b4ad6e1521c 100644
--- a/src/emu/cpu/z180/z180daa.h
+++ b/src/emu/cpu/z180/z180daa.h
@@ -1,4 +1,4 @@
-static UINT16 DAATable[0x800] = {
+static const UINT16 DAATable[0x800] = {
(0x00<<8) +ZF +VF ,
(0x01<<8) ,
(0x02<<8) ,
diff --git a/src/emu/cpu/z180/z180dasm.c b/src/emu/cpu/z180/z180dasm.c
index 8f3dff1874c..493e8a3ba74 100644
--- a/src/emu/cpu/z180/z180dasm.c
+++ b/src/emu/cpu/z180/z180dasm.c
@@ -61,7 +61,7 @@ enum e_mnemonics {
zSLP ,zSRA ,zSRL ,zSUB ,zTST ,zTSTIO ,zXOR
};
-static const char *s_mnemonic[] = {
+static const char *const s_mnemonic[] = {
"adc" ,"add" ,"and" ,"bit" ,"call" ,"ccf" ,"cp" ,"cpd" ,
"cpdr" ,"cpi" ,"cpir" ,"cpl" ,"daa" ,"db" ,"dec" ,"di" ,
"djnz" ,"ei" ,"ex" ,"exx" ,"halt" ,"im" ,"in" ,"in0" ,
@@ -79,7 +79,7 @@ typedef struct {
const char *arguments;
} z80dasm;
-static z80dasm mnemonic_xx_cb[256]= {
+static const z80dasm mnemonic_xx_cb[256]= {
{zRLC,"b=Y"}, {zRLC,"c=Y"}, {zRLC,"d=Y"}, {zRLC,"e=Y"},
{zRLC,"h=Y"}, {zRLC,"l=Y"}, {zRLC,"Y"}, {zRLC,"a=Y"},
{zRRC,"b=Y"}, {zRRC,"c=Y"}, {zRRC,"d=Y"}, {zRRC,"e=Y"},
@@ -146,7 +146,7 @@ static z80dasm mnemonic_xx_cb[256]= {
{zSET,"h=7,Y"}, {zSET,"l=7,Y"}, {zSET,"7,Y"}, {zSET,"a=7,Y"}
};
-static z80dasm mnemonic_cb[256] = {
+static const z80dasm mnemonic_cb[256] = {
{zRLC,"b"}, {zRLC,"c"}, {zRLC,"d"}, {zRLC,"e"},
{zRLC,"h"}, {zRLC,"l"}, {zRLC,"(hl)"}, {zRLC,"a"},
{zRRC,"b"}, {zRRC,"c"}, {zRRC,"d"}, {zRRC,"e"},
@@ -213,7 +213,7 @@ static z80dasm mnemonic_cb[256] = {
{zSET,"7,h"}, {zSET,"7,l"}, {zSET,"7,(hl)"},{zSET,"7,a"}
};
-static z80dasm mnemonic_ed[256]= {
+static const z80dasm mnemonic_ed[256]= {
{zIN0,"b,(B)"}, {zOUT0,"(B),b"},{zDB,"?"}, {zDB,"?"},
{zTST,"b"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"},
{zIN0,"c,(B)"}, {zOUT0,"(B),c"},{zDB,"?"}, {zDB,"?"},
@@ -280,7 +280,7 @@ static z80dasm mnemonic_ed[256]= {
{zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"}
};
-static z80dasm mnemonic_xx[256]= {
+static const z80dasm mnemonic_xx[256]= {
{zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"},
{zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"},
{zDB,"?"}, {zADD,"I,bc"}, {zDB,"?"}, {zDB,"?"},
@@ -347,7 +347,7 @@ static z80dasm mnemonic_xx[256]= {
{zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"}
};
-static z80dasm mnemonic_main[256]= {
+static const z80dasm mnemonic_main[256]= {
{zNOP,0}, {zLD,"bc,N"}, {zLD,"(bc),a"}, {zINC,"bc"},
{zINC,"b"}, {zDEC,"b"}, {zLD,"b,B"}, {zRLCA,0},
{zEX,"af,af'"}, {zADD,"hl,bc"}, {zLD,"a,(bc)"}, {zDEC,"bc"},
@@ -430,7 +430,7 @@ static int offs(INT8 offset)
****************************************************************************/
offs_t z180_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram)
{
- z80dasm *d;
+ const z80dasm *d;
const char *src, *ixy;
char *dst;
unsigned PC = pc;
diff --git a/src/emu/cpu/z180/z180tbl.h b/src/emu/cpu/z180/z180tbl.h
index bfd2271aa5f..3598f12a529 100644
--- a/src/emu/cpu/z180/z180tbl.h
+++ b/src/emu/cpu/z180/z180tbl.h
@@ -1,16 +1,16 @@
#if Z180_EXACT
/* tmp1 value for ini/inir/outi/otir for [C.1-0][io.1-0] */
-static UINT8 irep_tmp1[4][4] = {
+static const UINT8 irep_tmp1[4][4] = {
{0,0,1,0},{0,1,0,1},{1,0,1,1},{0,1,1,0}
};
/* tmp1 value for ind/indr/outd/otdr for [C.1-0][io.1-0] */
-static UINT8 drep_tmp1[4][4] = {
+static const UINT8 drep_tmp1[4][4] = {
{0,1,0,0},{1,0,0,1},{0,0,1,0},{0,1,0,1}
};
/* tmp2 value for all in/out repeated opcodes for B.7-0 */
-static UINT8 breg_tmp2[256] = {
+static const UINT8 breg_tmp2[256] = {
0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,
0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,
1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,
@@ -30,7 +30,7 @@ static UINT8 breg_tmp2[256] = {
};
#endif
-static UINT8 cc_op[0x100] = {
+static const UINT8 cc_op[0x100] = {
/*-0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -a -b -c -d -e -f */
3, 9, 7, 4, 4, 4, 6, 3, 4, 7, 6, 4, 4, 4, 6, 3,
7, 9, 7, 4, 4, 4, 6, 3, 8, 7, 6, 4, 4, 4, 6, 3,
@@ -50,7 +50,7 @@ static UINT8 cc_op[0x100] = {
5, 9, 6, 3, 6,11, 6,11, 5, 4, 6, 3, 6, 0, 6,11
};
-static UINT8 cc_cb[0x100] = {
+static const UINT8 cc_cb[0x100] = {
/*-0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -a -b -c -d -e -f */
7, 7, 7, 7, 7, 7,13, 7, 7, 7, 7, 7, 7, 7,13, 7,
7, 7, 7, 7, 7, 7,13, 7, 7, 7, 7, 7, 7, 7,13, 7,
@@ -70,7 +70,7 @@ static UINT8 cc_cb[0x100] = {
7, 7, 7, 7, 7, 7,13, 7, 7, 7, 7, 7, 7, 7,13, 7
};
-static UINT8 cc_ed[0x100] = {
+static const UINT8 cc_ed[0x100] = {
/*-0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -a -b -c -d -e -f */
12,13, 6, 6, 9, 6, 6, 6,12,13, 6, 6, 9, 6, 6, 6,
12,13, 6, 6, 9, 6, 6, 6,12,13, 6, 6, 9, 6, 6, 6,
@@ -90,7 +90,7 @@ static UINT8 cc_ed[0x100] = {
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6
};
-static UINT8 cc_xy[0x100] = {
+static const UINT8 cc_xy[0x100] = {
/*-0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -a -b -c -d -e -f */
4, 4, 4, 4, 4, 4, 4, 4, 4,10, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4,10, 4, 4, 4, 4, 4, 4,
@@ -110,7 +110,7 @@ static UINT8 cc_xy[0x100] = {
4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4
};
-static UINT8 cc_xycb[0x100] = {
+static const UINT8 cc_xycb[0x100] = {
/*-0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -a -b -c -d -e -f */
19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
@@ -131,7 +131,7 @@ static UINT8 cc_xycb[0x100] = {
};
/* extra cycles if jr/jp/call taken and 'interrupt latency' on rst 0-7 */
-static UINT8 cc_ex[0x100] = {
+static const UINT8 cc_ex[0x100] = {
/*-0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -a -b -c -d -e -f */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* DJNZ */
@@ -151,7 +151,7 @@ static UINT8 cc_ex[0x100] = {
5, 0, 3, 0,10, 0, 0, 2, 5, 0, 3, 0,10, 0, 0, 2
};
-static UINT8 *cc[6] = { cc_op, cc_cb, cc_ed, cc_xy, cc_xycb, cc_ex };
+static const UINT8 *cc[6] = { cc_op, cc_cb, cc_ed, cc_xy, cc_xycb, cc_ex };
#define Z180_TABLE_dd Z180_TABLE_xy
#define Z180_TABLE_fd Z180_TABLE_xy
@@ -222,7 +222,7 @@ static void take_interrupt(int irqline);
INLINE void prefix##_f4(void); INLINE void prefix##_f5(void); INLINE void prefix##_f6(void); INLINE void prefix##_f7(void); \
INLINE void prefix##_f8(void); INLINE void prefix##_f9(void); INLINE void prefix##_fa(void); INLINE void prefix##_fb(void); \
INLINE void prefix##_fc(void); INLINE void prefix##_fd(void); INLINE void prefix##_fe(void); INLINE void prefix##_ff(void); \
-static void (*tablename[0x100])(void) = { \
+static void (*const tablename[0x100])(void) = { \
prefix##_00,prefix##_01,prefix##_02,prefix##_03,prefix##_04,prefix##_05,prefix##_06,prefix##_07, \
prefix##_08,prefix##_09,prefix##_0a,prefix##_0b,prefix##_0c,prefix##_0d,prefix##_0e,prefix##_0f, \
prefix##_10,prefix##_11,prefix##_12,prefix##_13,prefix##_14,prefix##_15,prefix##_16,prefix##_17, \
diff --git a/src/emu/cpu/z80/z80dasm.c b/src/emu/cpu/z80/z80dasm.c
index 6070f8cce33..be11542fc29 100644
--- a/src/emu/cpu/z80/z80dasm.c
+++ b/src/emu/cpu/z80/z80dasm.c
@@ -35,7 +35,7 @@ enum e_mnemonics
zSLL ,zSRA ,zSRL ,zSUB ,zXOR
};
-static const char *s_mnemonic[] =
+static const char *const s_mnemonic[] =
{
"adc" ,"add" ,"and" ,"bit" ,"call","ccf" ,"cp" ,"cpd" ,
"cpdr","cpi" ,"cpir","cpl" ,"daa" ,"db" ,"dec" ,"di" ,
diff --git a/src/emu/cpu/z8000/8000dasm.c b/src/emu/cpu/z8000/8000dasm.c
index ac380060ade..01172273bc5 100644
--- a/src/emu/cpu/z8000/8000dasm.c
+++ b/src/emu/cpu/z8000/8000dasm.c
@@ -64,17 +64,17 @@ static void GET_OP(const UINT8 *oprom, int i, unsigned offset)
n[i*4+3] = opcode & 0x0f;
}
-static const char *cc[16] = {
+static const char *const cc[16] = {
"n", "lt", "le", "ule", "pe/ov", "mi", "eq/z", "c/ult",
"a", "ge", "gt", "ugt", "po/nov", "pl", "ne/nz", "nc/uge"
};
-static const char *flg[16] = {
+static const char *const flg[16] = {
"", "p/v", "s", "p/v,s", "z", "p/v,z", "s,z", "p/v,s,z",
"c", "p/v,c","s,c", "p/v,s,c", "z,c", "p/v,z,c","s,z,c","p/v,s,z,c"
};
-static const char *ints[4] = {
+static const char *const ints[4] = {
"", "vi", "nvi", "vi,nvi"
};
diff --git a/src/emu/cpu/z8000/makedab.c b/src/emu/cpu/z8000/makedab.c
index 58bf9c0a490..bea8a25b407 100644
--- a/src/emu/cpu/z8000/makedab.c
+++ b/src/emu/cpu/z8000/makedab.c
@@ -69,7 +69,7 @@ int main(int ac, char **av)
printf(" * 0..7 result value \n");
printf(" * 8 carry flag after \n");
printf(" ************************************************/\n");
- printf("static UINT16 Z8000_dab[0x800] = {\n");
+ printf("static const UINT16 Z8000_dab[0x800] = {\n");
for (i = 0; i < 0x800; i++) {
if ((i & 0x3ff) == 0) {
if (i & 0x400)
diff --git a/src/emu/cpu/z8000/z8000dab.h b/src/emu/cpu/z8000/z8000dab.h
index c68af257749..bee36eedaee 100644
--- a/src/emu/cpu/z8000/z8000dab.h
+++ b/src/emu/cpu/z8000/z8000dab.h
@@ -13,7 +13,7 @@
* 0..7 result value
* 8 carry flag after
************************************************/
-static UINT16 Z8000_dab[0x800] = {
+static const UINT16 Z8000_dab[0x800] = {
/* add/adc results */
0x000,0x001,0x002,0x003,0x004,0x005,0x006,0x007,
0x008,0x009,0x010,0x011,0x012,0x013,0x014,0x015,
diff --git a/src/emu/cpu/z8000/z8000tbl.c b/src/emu/cpu/z8000/z8000tbl.c
index c1a2f0ee3fa..a9f9c4964c9 100644
--- a/src/emu/cpu/z8000/z8000tbl.c
+++ b/src/emu/cpu/z8000/z8000tbl.c
@@ -21,7 +21,7 @@
*
*****************************************************************************/
-static Z8000_init table[] = {
+static const Z8000_init table[] = {
{0x0000,0x000f, 1,2, 7,Z00_0000_dddd_imm8, "addb %rb3,%#b3"},
{0x0010,0x00ff, 1,1, 7,Z00_ssN0_dddd, "addb %rb3,@%rw2"},
{0x0100,0x010f, 1,2, 7,Z01_0000_dddd_imm16, "add %rw3,%#w1"},
@@ -538,7 +538,7 @@ static Z8000_init table[] = {
void z8000_init(int index, int clock, const void *config, int (*irqcallback)(int))
{
int i;
- Z8000_init *init;
+ const Z8000_init *init;
/* already initialized? */
if( z8000_exec )
diff --git a/src/emu/cpu/z80gb/z80gb.c b/src/emu/cpu/z80gb/z80gb.c
index 61dca398cd4..09c50c423c5 100644
--- a/src/emu/cpu/z80gb/z80gb.c
+++ b/src/emu/cpu/z80gb/z80gb.c
@@ -131,7 +131,7 @@ INLINE void mem_WriteWord (UINT32 address, UINT16 value)
/* Nr of cycles to run */
static int z80gb_ICount;
-static int Cycles[256] =
+static const int Cycles[256] =
{
4,12, 8, 8, 4, 4, 8, 4,20, 8, 8, 8, 4, 4, 8, 4,
4,12, 8, 8, 4, 4, 8, 4,12, 8, 8, 8, 4, 4, 8, 4,
@@ -151,7 +151,7 @@ static int Cycles[256] =
12,12, 8, 4, 4,16, 8,16,12, 8,16, 4, 4, 4, 8,16
};
-static int CyclesCB[256] =
+static const int CyclesCB[256] =
{
8, 8, 8, 8, 8, 8,16, 8, 8, 8, 8, 8, 8, 8,16, 8,
8, 8, 8, 8, 8, 8,16, 8, 8, 8, 8, 8, 8, 8,16, 8,
diff --git a/src/emu/cpu/z80gb/z80gbd.c b/src/emu/cpu/z80gb/z80gbd.c
index 0989ed1e171..67592660b06 100644
--- a/src/emu/cpu/z80gb/z80gbd.c
+++ b/src/emu/cpu/z80gb/z80gbd.c
@@ -33,7 +33,7 @@ enum e_mnemonics
zSTOP, zSUB, zXOR, zSWAP
};
-static const char *s_mnemonic[] =
+static const char *const s_mnemonic[] =
{
"adc", "add", "and", "bit", "call","ccf", "cp",
"cpl", "daa", "db", "dec", "di", "ei", "halt",
@@ -63,7 +63,7 @@ typedef struct
const char *arguments;
} z80gbdasm;
-static z80gbdasm mnemonic_cb[256] = {
+static const z80gbdasm mnemonic_cb[256] = {
{zRLC,"b"}, {zRLC,"c"}, {zRLC,"d"}, {zRLC,"e"},
{zRLC,"h"}, {zRLC,"l"}, {zRLC,"(hl)"}, {zRLC,"a"},
{zRRC,"b"}, {zRRC,"c"}, {zRRC,"d"}, {zRRC,"e"},
@@ -130,7 +130,7 @@ static z80gbdasm mnemonic_cb[256] = {
{zSET,"7,h"}, {zSET,"7,l"}, {zSET,"7,(hl)"},{zSET,"7,a"}
};
-static z80gbdasm mnemonic_main[256]= {
+static const z80gbdasm mnemonic_main[256]= {
{zNOP,0}, {zLD,"bc,N"}, {zLD,"(bc),a"}, {zINC,"bc"},
{zINC,"b"}, {zDEC,"b"}, {zLD,"b,B"}, {zRLCA,0},
{zLD,"(W),sp"}, {zADD,"hl,bc"}, {zLD,"a,(bc)"}, {zDEC,"bc"},
@@ -203,7 +203,7 @@ static z80gbdasm mnemonic_main[256]= {
unsigned z80gb_dasm( char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram )
{
- z80gbdasm *d;
+ const z80gbdasm *d;
const char *symbol, *src;
char *dst;
INT8 offset = 0;
diff --git a/src/emu/cpuexec.h b/src/emu/cpuexec.h
index cb7d9b2e20c..206cbb982c4 100644
--- a/src/emu/cpuexec.h
+++ b/src/emu/cpuexec.h
@@ -168,6 +168,7 @@ enum _cpu_type
CPU_PPC601,
CPU_PPC602,
CPU_PPC603,
+ CPU_PPC604,
CPU_MPC8240,
CPU_SE3208,
CPU_MC68HC11,
diff --git a/src/emu/cpuintrf.c b/src/emu/cpuintrf.c
index 7d5e433f42e..945aaaa6793 100644
--- a/src/emu/cpuintrf.c
+++ b/src/emu/cpuintrf.c
@@ -164,6 +164,7 @@ void ppc403_get_info(UINT32 state, cpuinfo *info);
void ppc601_get_info(UINT32 state, cpuinfo *info);
void ppc602_get_info(UINT32 state, cpuinfo *info);
void ppc603_get_info(UINT32 state, cpuinfo *info);
+void ppc604_get_info(UINT32 state, cpuinfo *info);
void mpc8240_get_info(UINT32 state, cpuinfo *info);
void SE3208_get_info(UINT32 state, cpuinfo *info);
void mc68hc11_get_info(UINT32 state, cpuinfo *info);
@@ -685,6 +686,9 @@ static const struct
#if (HAS_PPC603)
{ CPU_PPC603, ppc603_get_info },
#endif
+#if (HAS_PPC604)
+ { CPU_PPC604, ppc604_get_info },
+#endif
#if (HAS_MPC8240)
{ CPU_MPC8240, mpc8240_get_info },
#endif
diff --git a/src/emu/emu.mak b/src/emu/emu.mak
index 1962eea223f..a2de86ff402 100644
--- a/src/emu/emu.mak
+++ b/src/emu/emu.mak
@@ -121,6 +121,7 @@ EMUMACHINEOBJS = \
$(EMUMACHINE)/74181.o \
$(EMUMACHINE)/8042kbdc.o \
$(EMUMACHINE)/8237dma.o \
+ $(EMUMACHINE)/8257dma.o \
$(EMUMACHINE)/8255ppi.o \
$(EMUMACHINE)/adc083x.o \
$(EMUMACHINE)/adc1213x.o \
diff --git a/src/emu/info.c b/src/emu/info.c
index a8ce2549af7..78a087b9b18 100644
--- a/src/emu/info.c
+++ b/src/emu/info.c
@@ -560,9 +560,9 @@ static void print_game_sampleof(FILE* out, const game_driver* game)
for( i = 0; i < MAX_SOUND && drv.sound[i].type != SOUND_DUMMY; i++ )
{
- const char **samplenames = NULL;
+ const char *const *samplenames = NULL;
if( drv.sound[i].type == SOUND_SAMPLES )
- samplenames = ((struct Samplesinterface *)drv.sound[i].config)->samplenames;
+ samplenames = ((const struct Samplesinterface *)drv.sound[i].config)->samplenames;
if (samplenames != 0 && samplenames[0] != 0) {
int k = 0;
if (samplenames[k][0]=='*')
@@ -587,9 +587,9 @@ static void print_game_sample(FILE* out, const game_driver* game)
for( i = 0; i < MAX_SOUND && drv.sound[i].type != SOUND_DUMMY; i++ )
{
- const char **samplenames = NULL;
+ const char *const *samplenames = NULL;
if( drv.sound[i].type == SOUND_SAMPLES )
- samplenames = ((struct Samplesinterface *)drv.sound[i].config)->samplenames;
+ samplenames = ((const struct Samplesinterface *)drv.sound[i].config)->samplenames;
if (samplenames != 0 && samplenames[0] != 0) {
int k = 0;
if (samplenames[k][0]=='*')
diff --git a/src/emu/machine/8257dma.c b/src/emu/machine/8257dma.c
new file mode 100644
index 00000000000..8f56bc965c3
--- /dev/null
+++ b/src/emu/machine/8257dma.c
@@ -0,0 +1,378 @@
+/**********************************************************************
+
+ 8257 DMA interface and emulation
+
+ For datasheet http://www.threedee.com/jcm/library/index.html
+
+ 2007/11 couriersud
+
+ - architecture copied from 8237 DMA
+ - significant changes to implementation
+
+ The DMA works like this:
+
+ 1. The device asserts the DRQn line
+ 2. The DMA clears the TC (terminal count) line
+ 3. The DMA asserts the CPU's HRQ (halt request) line
+ 4. Upon acknowledgement of the halt, the DMA will let the device
+ know that it needs to send information by asserting the DACKn
+ line
+ 5. The DMA will read the byte from the device
+ 6. The device clears the DRQn line
+ 7. The DMA clears the CPU's HRQ line
+ 8. (steps 3-7 are repeated for every byte in the chain)
+
+**********************************************************************/
+
+#include "driver.h"
+#include "memconv.h"
+#include "8257dma.h"
+
+struct dma8257
+{
+ const struct dma8257_interface *intf;
+ emu_timer *timer;
+ emu_timer *msbflip_timer;
+
+ UINT16 registers[DMA8257_NUM_CHANNELS*2];
+
+ UINT16 address[DMA8257_NUM_CHANNELS];
+ UINT16 count[DMA8257_NUM_CHANNELS];
+ UINT8 rwmode[DMA8257_NUM_CHANNELS];
+
+ UINT8 mode;
+ UINT8 rr;
+
+ UINT8 msb;
+ UINT8 drq;
+
+ /* bits 0- 3 : Terminal count for channels 0-3 */
+ UINT8 status;
+};
+
+static struct dma8257 *dma;
+static int dma_count;
+
+#define DMA_MODE_AUTOLOAD(mode) ((mode) & 0x80)
+#define DMA_MODE_TCSTOP(mode) ((mode) & 0x40)
+#define DMA_MODE_EXWRITE(mode) ((mode) & 0x20)
+#define DMA_MODE_ROTPRIO(mode) ((mode) & 0x10)
+#define DMA_MODE_CH_EN(mode, chan) ((mode) & (1 << (chan)))
+
+static TIMER_CALLBACK( dma8257_timerproc );
+static TIMER_CALLBACK( dma8257_msbflip_timerproc );
+static void dma8257_update_status(int which);
+
+/* ----------------------------------------------------------------------- */
+
+int dma8257_init(int count)
+{
+ int which;
+
+ dma = auto_malloc(count * sizeof(struct dma8257));
+ memset(dma, 0, count * sizeof(struct dma8257));
+ dma_count = count;
+
+ for (which = 0; which < dma_count; which++)
+ {
+ dma[which].status = 0x0F;
+ dma[which].timer = timer_alloc(dma8257_timerproc, NULL);
+ dma[which].msbflip_timer = timer_alloc(dma8257_msbflip_timerproc, NULL);
+
+ state_save_register_item_array("8257", which, dma[which].address);
+ state_save_register_item_array("8257", which, dma[which].count);
+ state_save_register_item_array("8257", which, dma[which].rwmode);
+ state_save_register_item_array("8257", which, dma[which].registers);
+
+ state_save_register_item("8257", which, dma[which].mode);
+ state_save_register_item("8257", which, dma[which].rr);
+ state_save_register_item("8257", which, dma[which].msb);
+ state_save_register_item("8257", which, dma[which].drq);
+ state_save_register_item("8257", which, dma[which].status);
+
+ }
+
+ return 0;
+}
+
+
+
+void dma8257_config(int which, const struct dma8257_interface *intf)
+{
+ dma[which].intf = intf;
+}
+
+
+
+void dma8257_reset(void)
+{
+ int which;
+
+ for (which = 0; which < dma_count; which++)
+ {
+ dma[which].status &= 0xF0;
+ dma[which].mode = 0;
+ dma8257_update_status(which);
+ }
+}
+
+
+
+/* ----------------------------------------------------------------------- */
+
+
+
+static int dma8257_do_operation(int which, int channel)
+{
+ int done;
+ UINT8 data;
+ UINT8 mode;
+
+ mode = dma[which].rwmode[channel];
+ if (dma[which].count[channel] == 0x0000)
+ {
+ dma[which].status |= (0x01 << channel);
+ if (dma[which].intf->out_tc_func[channel])
+ dma[which].intf->out_tc_func[channel](ASSERT_LINE);
+ }
+ switch(mode) {
+ case 1:
+ data = dma[which].intf->memory_read_func(channel, dma[which].address[channel]);
+ dma[which].intf->channel_write_func[channel](data);
+
+ dma[which].address[channel]++;
+ dma[which].count[channel]--;
+ done = (dma[which].count[channel] == 0xFFFF);
+ break;
+
+ case 2:
+ data = dma[which].intf->channel_read_func[channel]();
+ dma[which].intf->memory_write_func(channel, dma[which].address[channel], data);
+
+ dma[which].address[channel]++;
+ dma[which].count[channel]--;
+ done = (dma[which].count[channel] == 0xFFFF);
+ break;
+ case 0: /* verify */
+ dma[which].address[channel]++;
+ dma[which].count[channel]--;
+ done = (dma[which].count[channel] == 0xFFFF);
+ break;
+ default:
+ fatalerror("dma8257_do_operation: invalid mode!\n");
+ break;
+ }
+ if (done)
+ {
+ if (dma[which].intf->out_tc_func[channel])
+ dma[which].intf->out_tc_func[channel](CLEAR_LINE);
+ }
+ return done;
+}
+
+
+
+static TIMER_CALLBACK( dma8257_timerproc )
+{
+ int which = param;
+ int i, channel = 0, rr;
+ int done;
+
+ rr = DMA_MODE_ROTPRIO(dma[which].mode) ? dma[which].rr : 0;
+ for (i = 0; i < DMA8257_NUM_CHANNELS; i++)
+ {
+ channel = (i + rr) % DMA8257_NUM_CHANNELS;
+ if ((dma[which].status & (1 << channel)) == 0)
+ if (dma[which].mode & dma[which].drq & (1 << channel))
+ break;
+ }
+ done = dma8257_do_operation(which, channel);
+
+ dma[which].rr = (channel + 1) & 0x03;
+
+ if (done)
+ {
+ dma[which].drq &= ~(0x01 << channel);
+ dma8257_update_status(which);
+ if (DMA_MODE_TCSTOP(dma[which].mode))
+ dma[which].mode &= ~(0x01 << channel);
+ }
+}
+
+
+
+static TIMER_CALLBACK( dma8257_msbflip_timerproc )
+{
+ dma[param].msb ^= 1;
+}
+
+
+
+static void dma8257_update_status(int which)
+{
+ UINT16 pending_transfer;
+ attotime next;
+
+ /* no transfer is active right now; is there a transfer pending right now? */
+ pending_transfer = dma[which].drq & (dma[which].mode & 0x0F);
+
+ if (pending_transfer)
+ {
+ next = ATTOTIME_IN_HZ(dma[which].intf->clockhz / 4 );
+ timer_adjust(dma[which].timer,
+ attotime_zero,
+ which,
+ /* 1 byte transferred in 4 clock cycles */
+ next);
+ }
+ else
+ {
+ /* no transfers active right now */
+ timer_reset(dma[which].timer, attotime_never);
+ }
+
+ /* set the halt line */
+ if (dma[which].intf && dma[which].intf->cpunum >= 0)
+ {
+ cpunum_set_input_line(dma[which].intf->cpunum, INPUT_LINE_HALT,
+ pending_transfer ? ASSERT_LINE : CLEAR_LINE);
+ }
+
+}
+
+
+
+/* ----------------------------------------------------------------------- */
+
+static void prepare_msb_flip(int which)
+{
+ timer_adjust(dma[which].msbflip_timer, attotime_zero, which, attotime_zero);
+}
+
+
+
+static UINT8 dma8257_read(int which, offs_t offset)
+{
+ UINT8 data = 0xFF;
+
+ switch(offset) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ /* DMA address/count register */
+ data = ( dma[which].registers[offset] >> (dma[which].msb ? 8 : 0) ) & 0xFF;
+ prepare_msb_flip(which);
+ break;
+
+ case 8:
+ /* DMA status register */
+ data = (UINT8) dma[which].status;
+ /* read resets status ! */
+ dma[which].status &= 0xF0;
+
+ break;
+
+ default:
+ logerror("8257: Read from register %d.\n", offset);
+ data = 0xFF;
+ break;
+ }
+ return data;
+}
+
+
+
+static void dma8257_write(int which, offs_t offset, UINT8 data)
+{
+
+ switch(offset) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ /* DMA address/count register */
+ if (dma[which].msb)
+ dma[which].registers[offset] |= ((UINT16) data) << 8;
+ else
+ dma[which].registers[offset] = data;
+ prepare_msb_flip(which);
+ break;
+
+ case 8:
+ /* DMA mode register */
+ if (DMA_MODE_AUTOLOAD(data) )
+ fatalerror("8257: Autoload not supported!\n");
+ dma[which].mode = data;
+ break;
+
+ default:
+ logerror("8257: Write to register %d.\n", offset);
+ break;
+ }
+}
+
+
+
+static TIMER_CALLBACK( dma8257_drq_write_callback )
+{
+ int which = param >> 3;
+ int channel = (param >> 1) & 0x03;
+ int state = param & 0x01;
+
+ /* normalize state */
+ if (state)
+ {
+ dma[which].drq |= 0x01 << channel;
+ dma[which].address[channel] = dma[which].registers[channel * 2];
+ dma[which].count[channel] = dma[which].registers[channel * 2 + 1] & 0x3FF;
+ dma[which].rwmode[channel] = dma[which].registers[channel * 2 + 1] >> 14;
+ /* clear channel TC */
+ dma[which].status &= ~(0x01 << channel);
+ }
+ else
+ dma[which].drq &= ~(0x01 << channel);
+
+ dma8257_update_status(which);
+}
+
+
+
+void dma8257_drq_write(int which, int channel, int state)
+{
+ int param;
+
+ param = (which << 3) | (channel << 1) | (state ? 1 : 0);
+ timer_call_after_resynch(NULL, param, dma8257_drq_write_callback);
+}
+
+
+/******************* Standard 8-bit/32-bit/64-bit CPU interfaces *******************/
+
+READ8_HANDLER( dma8257_0_r ) { return dma8257_read(0, offset); }
+READ8_HANDLER( dma8257_1_r ) { return dma8257_read(1, offset); }
+WRITE8_HANDLER( dma8257_0_w ) { dma8257_write(0, offset, data); }
+WRITE8_HANDLER( dma8257_1_w ) { dma8257_write(1, offset, data); }
+
+READ16_HANDLER( dma8257_16le_0_r ) { return read16le_with_read8_handler(dma8257_0_r, offset, mem_mask); }
+READ16_HANDLER( dma8257_16le_1_r ) { return read16le_with_read8_handler(dma8257_1_r, offset, mem_mask); }
+WRITE16_HANDLER( dma8257_16le_0_w ) { write16le_with_write8_handler(dma8257_0_w, offset, data, mem_mask); }
+WRITE16_HANDLER( dma8257_16le_1_w ) { write16le_with_write8_handler(dma8257_1_w, offset, data, mem_mask); }
+
+READ32_HANDLER( dma8257_32le_0_r ) { return read32le_with_read8_handler(dma8257_0_r, offset, mem_mask); }
+READ32_HANDLER( dma8257_32le_1_r ) { return read32le_with_read8_handler(dma8257_1_r, offset, mem_mask); }
+WRITE32_HANDLER( dma8257_32le_0_w ) { write32le_with_write8_handler(dma8257_0_w, offset, data, mem_mask); }
+WRITE32_HANDLER( dma8257_32le_1_w ) { write32le_with_write8_handler(dma8257_1_w, offset, data, mem_mask); }
+
+READ64_HANDLER( dma8257_64be_0_r ) { return read64be_with_read8_handler(dma8257_0_r, offset, mem_mask); }
+READ64_HANDLER( dma8257_64be_1_r ) { return read64be_with_read8_handler(dma8257_1_r, offset, mem_mask); }
+WRITE64_HANDLER( dma8257_64be_0_w ) { write64be_with_write8_handler(dma8257_0_w, offset, data, mem_mask); }
+WRITE64_HANDLER( dma8257_64be_1_w ) { write64be_with_write8_handler(dma8257_1_w, offset, data, mem_mask); }
diff --git a/src/emu/machine/8257dma.h b/src/emu/machine/8257dma.h
new file mode 100644
index 00000000000..3c963f5cb1e
--- /dev/null
+++ b/src/emu/machine/8257dma.h
@@ -0,0 +1,67 @@
+/**********************************************************************
+
+ 8257 DMA interface and emulation
+
+**********************************************************************/
+
+#ifndef DMA8257_H
+#define DMA8257_H
+
+#define DMA8257_STATUS_UPDATE 0x10
+#define DMA8257_STATUS_TC_CH3 0x08
+#define DMA8257_STATUS_TC_CH2 0x04
+#define DMA8257_STATUS_TC_CH1 0x02
+#define DMA8257_STATUS_TC_CH0 0x01
+
+#define DMA8257_NUM_CHANNELS (4)
+
+
+struct dma8257_interface
+{
+ /* CPU to halt when DMA is active */
+ int cpunum;
+
+ /* speed of DMA accesses (per byte) */
+ int clockhz;
+
+ /* accessors to main memory */
+ UINT8 (*memory_read_func)(int channel, offs_t offset);
+ void (*memory_write_func)(int channel, offs_t offset, UINT8 data);
+
+ /* channel accesors */
+ UINT8 (*channel_read_func[DMA8257_NUM_CHANNELS])(void);
+ void (*channel_write_func[DMA8257_NUM_CHANNELS])(UINT8 data);
+
+ /* function to call when DMA completes */
+ void (*out_tc_func[DMA8257_NUM_CHANNELS])(int state);
+};
+
+
+
+int dma8257_init(int count);
+void dma8257_config(int which, const struct dma8257_interface *intf);
+void dma8257_reset(void);
+
+void dma8257_drq_write(int which, int channel, int state);
+
+READ8_HANDLER( dma8257_0_r );
+READ8_HANDLER( dma8257_1_r );
+WRITE8_HANDLER( dma8257_0_w );
+WRITE8_HANDLER( dma8257_1_w );
+
+READ16_HANDLER( dma8257_16le_0_r );
+READ16_HANDLER( dma8257_16le_1_r );
+WRITE16_HANDLER( dma8257_16le_0_w );
+WRITE16_HANDLER( dma8257_16le_1_w );
+
+READ32_HANDLER( dma8257_32le_0_r );
+READ32_HANDLER( dma8257_32le_1_r );
+WRITE32_HANDLER( dma8257_32le_0_w );
+WRITE32_HANDLER( dma8257_32le_1_w );
+
+READ64_HANDLER( dma8257_64be_0_r );
+READ64_HANDLER( dma8257_64be_1_r );
+WRITE64_HANDLER( dma8257_64be_0_w );
+WRITE64_HANDLER( dma8257_64be_1_w );
+
+#endif /* DMA8257_H */
diff --git a/src/emu/machine/at28c16.c b/src/emu/machine/at28c16.c
index da8d2d2cc8d..f20b889de0b 100644
--- a/src/emu/machine/at28c16.c
+++ b/src/emu/machine/at28c16.c
@@ -11,14 +11,14 @@
#include "driver.h"
#include "machine/at28c16.h"
-#define DATA_SIZE ( 0x800 )
-#define ID_SIZE ( 0x020 )
-#define ID_OFFSET ( DATA_SIZE - ID_SIZE )
+#define SIZE_DATA ( 0x800 )
+#define SIZE_ID ( 0x020 )
+#define OFFSET_ID ( SIZE_DATA - SIZE_ID )
struct at28c16_chip
{
- UINT8 data[ DATA_SIZE ];
- UINT8 id[ ID_SIZE ];
+ UINT8 *data;
+ UINT8 *id;
UINT8 a9_12v;
};
@@ -39,7 +39,7 @@ void at28c16_a9_12v( int chip, int a9_12v )
/* nvram handlers */
-static void at28c16_init( int chip )
+void at28c16_init( int chip, UINT8 *data, UINT8 *id )
{
struct at28c16_chip *c;
if( chip >= MAX_AT28C16_CHIPS )
@@ -50,11 +50,22 @@ static void at28c16_init( int chip )
c = &at28c16[ chip ];
c->a9_12v = 0;
- memset( c->data, 0, DATA_SIZE );
- memset( c->id, 0, ID_SIZE );
- state_save_register_item_array( "at28c16", chip, c->data );
- state_save_register_item_array( "at28c16", chip, c->id );
+ if( data == NULL )
+ {
+ data = auto_malloc( SIZE_DATA );
+ }
+
+ if( id == NULL )
+ {
+ id = auto_malloc( SIZE_ID );
+ }
+
+ c->data = data;
+ c->id = id;
+
+ state_save_register_item_pointer( "at28c16", chip, c->data, SIZE_DATA );
+ state_save_register_item_pointer( "at28c16", chip, c->id, SIZE_ID );
state_save_register_item( "at28c16", chip, c->a9_12v );
}
@@ -70,16 +81,15 @@ static void nvram_handler_at28c16( running_machine *machine, int chip, mame_file
if( read_or_write )
{
- mame_fwrite( file, c->data, DATA_SIZE );
- mame_fwrite( file, c->id, ID_SIZE );
+ mame_fwrite( file, c->data, SIZE_DATA );
+ mame_fwrite( file, c->id, SIZE_ID );
}
else
{
- at28c16_init( chip );
if( file )
{
- mame_fread( file, c->data, DATA_SIZE );
- mame_fread( file, c->id, ID_SIZE );
+ mame_fread( file, c->data, SIZE_DATA );
+ mame_fread( file, c->id, SIZE_ID );
}
}
}
@@ -101,14 +111,14 @@ static UINT8 at28c16_read( UINT32 chip, offs_t offset )
}
c = &at28c16[ chip ];
- if( offset >= ID_OFFSET && c->a9_12v )
+ if( offset >= OFFSET_ID && c->a9_12v )
{
logerror( "at28c16_read( %04x ) id\n", offset );
- return c->id[ offset - ID_OFFSET ];
+ return c->id[ offset - OFFSET_ID ];
}
else
{
-// logerror( "at28c16_read( %04x ) data\n", offset );
+// logerror( "%08x: at28c16_read( %d, %04x ) %02x data\n", activecpu_get_pc(), chip, offset, c->data[ offset ] );
return c->data[ offset ];
}
}
@@ -123,14 +133,14 @@ static void at28c16_write( UINT32 chip, offs_t offset, UINT8 data )
}
c = &at28c16[ chip ];
- if( offset >= ID_OFFSET && c->a9_12v )
+ if( offset >= OFFSET_ID && c->a9_12v )
{
logerror( "at28c16_write( %d, %04x, %02x ) id\n", chip, offset, data );
- c->id[ offset - ID_OFFSET ] = data;
+ c->id[ offset - OFFSET_ID ] = data;
}
else
{
-// logerror( "at28c16_write( %d, %04x, %02x ) data\n", chip, offset, data );
+// logerror( "%08x: at28c16_write( %d, %04x, %02x ) data\n", activecpu_get_pc(), chip, offset, data );
c->data[ offset ] = data;
}
}
diff --git a/src/emu/machine/at28c16.h b/src/emu/machine/at28c16.h
index 87e7f200bf8..e289df71eb6 100644
--- a/src/emu/machine/at28c16.h
+++ b/src/emu/machine/at28c16.h
@@ -10,6 +10,7 @@
#define MAX_AT28C16_CHIPS ( 4 )
+extern void at28c16_init( int chip, UINT8 *data, UINT8 *id );
extern void at28c16_a9_12v( int chip, int a9_12v );
/* nvram handlers */
diff --git a/src/emu/machine/eeprom.c b/src/emu/machine/eeprom.c
index 2c065433ec3..07d8cd6a183 100644
--- a/src/emu/machine/eeprom.c
+++ b/src/emu/machine/eeprom.c
@@ -6,7 +6,7 @@
#define SERIAL_BUFFER_LENGTH 40
#define MEMORY_SIZE 1024
-static struct EEPROM_interface *intf;
+static const struct EEPROM_interface *intf;
static int serial_count;
static UINT8 serial_buffer[SERIAL_BUFFER_LENGTH];
@@ -76,7 +76,7 @@ static int EEPROM_command_match(const char *buf, const char *cmd, int len)
}
-struct EEPROM_interface eeprom_interface_93C46 =
+const struct EEPROM_interface eeprom_interface_93C46 =
{
6, // address bits 6
16, // data bits 16
@@ -90,7 +90,7 @@ struct EEPROM_interface eeprom_interface_93C46 =
// "*10010xxxx" // erase all 1 00 10xxxx
};
-struct EEPROM_interface eeprom_interface_93C66B =
+const struct EEPROM_interface eeprom_interface_93C66B =
{
8, /* address bits */
16, /* data bits */
@@ -126,7 +126,7 @@ NVRAM_HANDLER( 93C66B )
}
}
-void EEPROM_init(struct EEPROM_interface *interface)
+void EEPROM_init(const struct EEPROM_interface *interface)
{
intf = interface;
diff --git a/src/emu/machine/eeprom.h b/src/emu/machine/eeprom.h
index 2e7a69fb609..bef23dc5bef 100644
--- a/src/emu/machine/eeprom.h
+++ b/src/emu/machine/eeprom.h
@@ -16,7 +16,7 @@ struct EEPROM_interface
};
-void EEPROM_init(struct EEPROM_interface *interface);
+void EEPROM_init(const struct EEPROM_interface *interface);
void EEPROM_write_bit(int bit);
int EEPROM_read_bit(void);
@@ -30,11 +30,11 @@ void EEPROM_set_data(const UINT8 *data, int length);
UINT8 * EEPROM_get_data_pointer(int * length);
/* 93C46 */
-extern struct EEPROM_interface eeprom_interface_93C46;
+extern const struct EEPROM_interface eeprom_interface_93C46;
NVRAM_HANDLER( 93C46 );
/* 93C66B */
-extern struct EEPROM_interface eeprom_interface_93C66B;
+extern const struct EEPROM_interface eeprom_interface_93C66B;
NVRAM_HANDLER( 93C66B );
#endif
diff --git a/src/emu/memory.c b/src/emu/memory.c
index 826ea4496d4..eade6d00fe7 100644
--- a/src/emu/memory.c
+++ b/src/emu/memory.c
@@ -367,6 +367,17 @@ const char *address_space_names[ADDRESS_SPACES] = { "program", "data", "I/O" };
/*-------------------------------------------------
+ INLINE FUNCTIONS
+-------------------------------------------------*/
+
+INLINE void force_opbase_update(void)
+{
+ opcode_entry = 0xff;
+ memory_set_opbase(activecpu_get_physical_pc_byte());
+}
+
+
+/*-------------------------------------------------
FUNCTION PROTOTYPES
-------------------------------------------------*/
@@ -576,14 +587,13 @@ opbase_handler memory_set_opbase_handler(int cpunum, opbase_handler function)
void memory_set_opbase(offs_t pc)
{
- address_space *space = &active_address_space[ADDRESS_SPACE_PROGRAM];
-
+ const address_space *space = &active_address_space[ADDRESS_SPACE_PROGRAM];
UINT8 *base = NULL, *based = NULL;
- handler_data *handlers;
+ const handler_data *handlers;
UINT8 entry;
/* allow overrides */
- if (opbasefunc)
+ if (opbasefunc != NULL)
{
pc = (*opbasefunc)(pc);
if (pc == ~0)
@@ -596,10 +606,6 @@ void memory_set_opbase(offs_t 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;
@@ -627,7 +633,7 @@ void memory_set_opbase(offs_t pc)
/* if no decrypted opcodes, point to the same base */
base = bank_ptr[entry];
based = bankd_ptr[entry];
- if (!based)
+ if (based == NULL)
based = base;
/* compute the adjusted base */
@@ -662,7 +668,7 @@ void memory_set_decrypted_region(int cpunum, offs_t start, offs_t end, void *bas
/* if this is live, adjust now */
if (cpu_getactivecpu() >= 0 && cpunum == cur_context && opcode_entry == banknum)
- memory_set_opbase(activecpu_get_physical_pc_byte());
+ force_opbase_update();
}
else if (bdata->base < end && bdata->end > start)
fatalerror("memory_set_decrypted_region found straddled region %08X-%08X for CPU %d", start, end, cpunum);
@@ -862,10 +868,7 @@ void memory_set_bank(int banknum, int entrynum)
/* if we're executing out of this bank, adjust the opbase pointer */
if (opcode_entry == banknum && cpu_getactivecpu() >= 0)
- {
- opcode_entry = 0xff;
- memory_set_opbase(activecpu_get_physical_pc_byte());
- }
+ force_opbase_update();
}
@@ -891,10 +894,7 @@ void memory_set_bankptr(int banknum, void *base)
/* if we're executing out of this bank, adjust the opbase pointer */
if (opcode_entry == banknum && cpu_getactivecpu() >= 0)
- {
- opcode_entry = 0xff;
- memory_set_opbase(activecpu_get_physical_pc_byte());
- }
+ force_opbase_update();
}
diff --git a/src/emu/sound/k054539.c b/src/emu/sound/k054539.c
index ac0e28a8dd1..1d5c13a4ab9 100644
--- a/src/emu/sound/k054539.c
+++ b/src/emu/sound/k054539.c
@@ -129,15 +129,13 @@ static void K054539_update(void *param, stream_sample_t **inputs, stream_sample_
};
int ch, reverb_pos;
- short *rev_max;
- short *rbase, *rbuffer, *rev_top;
+ short *rbase;
unsigned char *samples;
UINT32 rom_mask;
unsigned char *base1, *base2;
struct K054539_channel *chan;
stream_sample_t *bufl, *bufr;
- short *revb;
int cur_pos, cur_pfrac, cur_val, cur_pval;
int delta, rdelta, fdelta, pdelta;
int vol, bval, pan, i;
@@ -146,8 +144,6 @@ static void K054539_update(void *param, stream_sample_t **inputs, stream_sample_
reverb_pos = info->reverb_pos;
rbase = (short *)(info->ram);
- rbuffer = rbase + reverb_pos;
- rev_max = rev_top = rbase + 0x4000;
memset(buffer[0], 0, length*sizeof(*buffer[0]));
memset(buffer[1], 0, length*sizeof(*buffer[1]));
@@ -199,7 +195,6 @@ else
rdelta = (base1[6] | (base1[7] << 8)) >> 3;
// rdelta = (reverb_pos + (int)((rdelta - 0x2000) * info->freq_ratio)) & 0x3fff;
rdelta = (int)(rdelta + reverb_pos) & 0x3fff;
- revb = rbase + rdelta;
cur_pos = (base1[0x0c] | (base1[0x0d] << 8) | (base1[0x0e] << 16)) & rom_mask;
@@ -231,7 +226,8 @@ else
do { \
*bufl++ += (INT16)(cur_val*lvol); \
*bufr++ += (INT16)(cur_val*rvol); \
- *revb++ += (INT16)(cur_val*rbvol); \
+ rbase[rdelta++] += (INT16)(cur_val*rbvol); \
+ rdelta &= 0x3fff; \
} while(0)
switch(base2[0] & 0xc) {
@@ -351,17 +347,8 @@ else
base1[0x0d] = cur_pos>> 8 & 0xff;
base1[0x0e] = cur_pos>>16 & 0xff;
}
-
- if(revb > rev_max)
- rev_max = revb;
}
- while(rev_max >= rev_top) {
- rev_max[-0x4000] += rev_max[0];
- rev_max[0] = 0;
- rev_max--;
- }
-
//* drivers should be given the option to disable reverb when things go terribly wrong
if(!(info->K054539_flags & K054539_DISABLE_REVERB))
{
@@ -372,12 +359,12 @@ else
}
}
- if(rbuffer+length > rev_top) {
- i = rev_top-rbuffer; // delta
- memset(rbuffer, 0, i*2);
+ if(reverb_pos + length > 0x4000) {
+ i = 0x4000 - reverb_pos;
+ memset(rbase + reverb_pos, 0, i*2);
memset(rbase, 0, (length-i)*2);
} else
- memset(rbuffer, 0, length*2);
+ memset(rbase + reverb_pos, 0, length*2);
#if CHANNEL_DEBUG
{
diff --git a/src/emu/sound/samples.c b/src/emu/sound/samples.c
index 8d773916e10..54d73f4a070 100644
--- a/src/emu/sound/samples.c
+++ b/src/emu/sound/samples.c
@@ -6,7 +6,7 @@
struct sample_channel
{
sound_stream *stream;
- INT16 * source;
+ const INT16 *source;
INT32 source_length;
INT32 source_num;
UINT32 pos;
@@ -174,7 +174,7 @@ static int read_wav_sample(mame_file *f, struct loaded_sample *sample)
readsamples - load all samples
-------------------------------------------------*/
-struct loaded_samples *readsamples(const char **samplenames, const char *basename)
+struct loaded_samples *readsamples(const char *const *samplenames, const char *basename)
{
struct loaded_samples *samples;
int skipfirst = 0;
@@ -270,7 +270,7 @@ void sample_start(int channel,int samplenum,int loop)
}
-void sample_start_raw_n(int num,int channel,INT16 *sampledata,int samples,int frequency,int loop)
+void sample_start_raw_n(int num,int channel,const INT16 *sampledata,int samples,int frequency,int loop)
{
struct samples_info *info = sndti_token(SOUND_SAMPLES, num);
struct sample_channel *chan;
@@ -293,7 +293,7 @@ void sample_start_raw_n(int num,int channel,INT16 *sampledata,int samples,int fr
chan->loop = loop;
}
-void sample_start_raw(int channel,INT16 *sampledata,int samples,int frequency,int loop)
+void sample_start_raw(int channel,const INT16 *sampledata,int samples,int frequency,int loop)
{
sample_start_raw_n(0,channel,sampledata,samples,frequency,loop);
}
@@ -452,7 +452,7 @@ static void sample_update_sound(void *param, stream_sample_t **inputs, stream_sa
UINT32 pos = chan->pos;
UINT32 frac = chan->frac;
UINT32 step = chan->step;
- INT16 *sample = chan->source;
+ const INT16 *sample = chan->source;
UINT32 sample_length = chan->source_length;
while (length--)
diff --git a/src/emu/sound/samples.h b/src/emu/sound/samples.h
index 334899d09ce..2ff8e7cadf3 100644
--- a/src/emu/sound/samples.h
+++ b/src/emu/sound/samples.h
@@ -17,13 +17,13 @@ struct loaded_samples
struct Samplesinterface
{
int channels; /* number of discrete audio channels needed */
- const char **samplenames;
+ const char *const *samplenames;
void (*start)(void);
};
void sample_start_n(int num,int channel,int samplenum,int loop);
-void sample_start_raw_n(int num,int channel,INT16 *sampledata,int samples,int frequency,int loop);
+void sample_start_raw_n(int num,int channel,const INT16 *sampledata,int samples,int frequency,int loop);
void sample_set_freq_n(int num,int channel,int freq);
void sample_set_volume_n(int num,int channel,float volume);
void sample_set_pause_n(int num,int channel,int pause);
@@ -34,7 +34,7 @@ int sample_loaded_n(int num,int samplenum);
/* shortcuts for backwards compatibilty */
void sample_start(int channel,int samplenum,int loop);
-void sample_start_raw(int channel,INT16 *sampledata,int samples,int frequency,int loop);
+void sample_start_raw(int channel,const INT16 *sampledata,int samples,int frequency,int loop);
void sample_set_freq(int channel,int freq);
void sample_set_volume(int channel,float volume);
void sample_set_pause(int channel,int pause);
@@ -45,6 +45,6 @@ int sample_loaded(int samplenum);
/* helper function that reads samples from disk - this can be used by other */
/* drivers as well (e.g. a sound chip emulator needing drum samples) */
-struct loaded_samples *readsamples(const char **samplenames, const char *name);
+struct loaded_samples *readsamples(const char *const *samplenames, const char *name);
#endif
diff --git a/src/emu/sound/scsp.c b/src/emu/sound/scsp.c
index 43b8b465d32..a24ed931946 100644
--- a/src/emu/sound/scsp.c
+++ b/src/emu/sound/scsp.c
@@ -38,7 +38,7 @@
#define FIX(v) ((UINT32) ((float) (1<<SHIFT)*(v)))
-#define EG_SHIFT 8
+#define EG_SHIFT 16
// include the LFO handling code
#include "scsplfo.c"
@@ -108,6 +108,7 @@ static const double DRTimes[64]={100000/*infinity*/,100000/*infinity*/,118200.0,
920.0,790.0,690.0,550.0,460.0,390.0,340.0,270.0,230.0,200.0,170.0,140.0,110.0,98.0,85.0,68.0,57.0,49.0,43.0,34.0,
28.0,25.0,22.0,18.0,14.0,12.0,11.0,8.5,7.1,6.1,5.4,4.3,3.6,3.1};
static UINT32 FNS_Table[0x400];
+static INT32 EG_TABLE[0x400];
typedef enum {ATTACK,DECAY1,DECAY2,RELEASE} _STATE;
struct _EG
@@ -365,7 +366,7 @@ static int Get_RR(struct _SCSP *SCSP,int base,int R)
int Rate=base+(R<<1);
if(Rate>63) Rate=63;
if(Rate<0) Rate=0;
- return SCSP->ARTABLE[63-Rate];
+ return SCSP->DRTABLE[Rate];
}
static void Compute_EG(struct _SCSP *SCSP,struct _SLOT *slot)
@@ -378,7 +379,7 @@ static void Compute_EG(struct _SCSP *SCSP,struct _SLOT *slot)
else
rate=0; //rate=((FNS(slot)>>9)&1);
- slot->EG.volume=0;
+ slot->EG.volume=0x17F<<EG_SHIFT;
slot->EG.AR=Get_AR(SCSP,rate,AR(slot));
slot->EG.D1R=Get_DR(SCSP,rate,D1R(slot));
slot->EG.D2R=Get_DR(SCSP,rate,D2R(slot));
@@ -410,7 +411,7 @@ static int EG_Update(struct _SLOT *slot)
break;
case DECAY1:
slot->EG.volume-=slot->EG.D1R;
- if(slot->EG.volume>>(EG_SHIFT+5)<=slot->EG.DL)
+ if(slot->EG.volume>>(EG_SHIFT+5)<slot->EG.DL)
slot->EG.state=DECAY2;
break;
case DECAY2:
@@ -425,9 +426,10 @@ static int EG_Update(struct _SLOT *slot)
slot->EG.volume-=slot->EG.RR;
if(slot->EG.volume<=0)
{
- SCSP_StopSlot(slot,0);
slot->EG.volume=0;
- slot->EG.state=ATTACK;
+ SCSP_StopSlot(slot,0);
+ //slot->EG.volume=0x17F<<EG_SHIFT;
+ //slot->EG.state=ATTACK;
}
break;
default:
@@ -461,13 +463,16 @@ static void Compute_LFO(struct _SLOT *slot)
static void SCSP_StartSlot(struct _SCSP *SCSP, struct _SLOT *slot)
{
+ UINT32 start_offset;
+
slot->active=1;
- slot->base=SCSP->SCSPRAM+SA(slot);
+ start_offset = PCM8B(slot) ? SA(slot) : SA(slot) & 0x7FFFE;
+ slot->base=SCSP->SCSPRAM + start_offset;
slot->cur_addr=0;
slot->step=SCSP_Step(slot);
Compute_EG(SCSP,slot);
slot->EG.state=ATTACK;
- slot->EG.volume=0;
+ slot->EG.volume=0x17F<<EG_SHIFT;
slot->Prev=0;
slot->Backwards=0;
Compute_LFO(slot);
@@ -477,7 +482,7 @@ static void SCSP_StartSlot(struct _SCSP *SCSP, struct _SLOT *slot)
static void SCSP_StopSlot(struct _SLOT *slot,int keyoff)
{
- if(keyoff && slot->EG.state!=RELEASE)
+ if(keyoff /*&& slot->EG.state!=RELEASE*/)
{
slot->EG.state=RELEASE;
}
@@ -485,7 +490,6 @@ static void SCSP_StopSlot(struct _SLOT *slot,int keyoff)
{
slot->active=0;
}
-
slot->udata.data[0]&=~0x800;
}
@@ -536,6 +540,13 @@ static void SCSP_Init(struct _SCSP *SCSP, const struct SCSPinterface *intf, int
FNS_Table[i]=(float) (1<<SHIFT) *fcent;
}
+ for(i=0;i<0x400;++i)
+ {
+ float envDB=((float)(3*(i-0x3ff)))/32.0;
+ float scale=(float)(1<<SHIFT);
+ EG_TABLE[i]=(INT32)(pow(10.0,envDB/20.0)*scale);
+ }
+
for(i=0;i<0x10000;++i)
{
int iTL =(i>>0x0)&0xff;
@@ -613,7 +624,6 @@ static void SCSP_Init(struct _SCSP *SCSP, const struct SCSPinterface *intf, int
{
SCSP->Slots[i].slot=i;
SCSP->Slots[i].active=0;
- SCSP->Slots[i].active=0;
SCSP->Slots[i].base=NULL;
}
@@ -645,11 +655,11 @@ static void SCSP_UpdateSlotReg(struct _SCSP *SCSP,int s,int r)
{
struct _SLOT *s2=SCSP->Slots+sl;
{
- if(KEYONB(s2) && !s2->active)
+ if(KEYONB(s2) && s2->EG.state==RELEASE/*&& !s2->active*/)
{
SCSP_StartSlot(SCSP, s2);
}
- if(!KEYONB(s2) && s2->active)
+ if(!KEYONB(s2) /*&& s2->active*/)
{
SCSP_StopSlot(s2,1);
}
@@ -1257,7 +1267,10 @@ INLINE INT32 SCSP_UpdateSlot(struct _SCSP *SCSP, struct _SLOT *slot)
if(!STWINH(slot))
*RBUFDST=sample;
- sample=(sample*EG_Update(slot))>>SHIFT;
+ if(slot->EG.state==ATTACK)
+ sample=(sample*EG_Update(slot))>>SHIFT;
+ else
+ sample=(sample*EG_TABLE[EG_Update(slot)>>(SHIFT-10)])>>SHIFT;
return sample;
}
@@ -1308,8 +1321,8 @@ static void SCSP_DoMasterSamples(struct _SCSP *SCSP, int nsamples)
if(EFSDL(slot))
{
unsigned short Enc=(TL(slot))|((EFPAN(slot))<<0x8)|((EFSDL(slot))<<0xd);
- smpl+=(SCSP->DSP.EFREG[i]*SCSP->LPANTABLE[Enc])>>(SHIFT-5);
- smpr+=(SCSP->DSP.EFREG[i]*SCSP->RPANTABLE[Enc])>>(SHIFT-5);
+ smpl+=(SCSP->DSP.EFREG[i]*SCSP->LPANTABLE[Enc])>>(SHIFT-4);
+ smpr+=(SCSP->DSP.EFREG[i]*SCSP->RPANTABLE[Enc])>>(SHIFT-4);
}
}
diff --git a/src/emu/sound/sn76477.c b/src/emu/sound/sn76477.c
index f477eee4f7a..34db6ea018e 100644
--- a/src/emu/sound/sn76477.c
+++ b/src/emu/sound/sn76477.c
@@ -100,7 +100,7 @@
#if TEST_MODE
#include "input.h"
-static struct SN76477interface empty_interface =
+static const struct SN76477interface empty_interface =
{
0, /* 4 noise_clock_res */
0, /* 5 filter_res */
diff --git a/src/emu/sound/votrax.c b/src/emu/sound/votrax.c
index f856e68b9ed..711b616c9f9 100644
--- a/src/emu/sound/votrax.c
+++ b/src/emu/sound/votrax.c
@@ -45,7 +45,7 @@ struct votrax_info
* 64 Phonemes - currently 1 sample per phoneme, will be combined sometime!
****************************************************************************/
-static const char *VotraxTable[65] =
+static const char *const VotraxTable[65] =
{
"EH3","EH2","EH1","PA0","DT" ,"A1" ,"A2" ,"ZH",
"AH2","I3" ,"I2" ,"I1" ,"M" ,"N" ,"B" ,"V",
diff --git a/src/mame/audio/8080bw.c b/src/mame/audio/8080bw.c
index 03e8a764a0c..4d7b0f1b67e 100644
--- a/src/mame/audio/8080bw.c
+++ b/src/mame/audio/8080bw.c
@@ -94,7 +94,7 @@ WRITE8_HANDLER( spcewars_sh_port_w )
/* */
/*******************************************************/
-static const char *lrescue_sample_names[] =
+static const char *const lrescue_sample_names[] =
{
"*lrescue",
"alienexplosion.wav",
@@ -109,7 +109,7 @@ static const char *lrescue_sample_names[] =
0
};
-struct Samplesinterface lrescue_samples_interface =
+const struct Samplesinterface lrescue_samples_interface =
{
4, /* 4 channels */
lrescue_sample_names
@@ -664,7 +664,7 @@ WRITE8_HANDLER( polaris_sh_port_3_w )
#define SCHASER_4V SCHASER_HSYNC /2 /4
#define SCHASER_8V SCHASER_HSYNC /2 /8
-struct SN76477interface schaser_sn76477_interface =
+const struct SN76477interface schaser_sn76477_interface =
{
RES_K( 47), /* 4 noise_res */
RES_K(330), /* 5 filter_res */
diff --git a/src/mame/audio/astinvad.c b/src/mame/audio/astinvad.c
index 47d384d9710..4183624ff93 100644
--- a/src/mame/audio/astinvad.c
+++ b/src/mame/audio/astinvad.c
@@ -18,7 +18,7 @@
#include "sound/samples.h"
#include "includes/astinvad.h"
-static const char *astinvad_sample_names[] =
+static const char *const astinvad_sample_names[] =
{
"*invaders",
"0.wav",
@@ -48,7 +48,7 @@ enum
};
-struct Samplesinterface astinvad_samples_interface =
+const struct Samplesinterface astinvad_samples_interface =
{
6, /* channels */
astinvad_sample_names
diff --git a/src/mame/audio/astrof.c b/src/mame/audio/astrof.c
index 6e480a2d8a9..de56750904d 100644
--- a/src/mame/audio/astrof.c
+++ b/src/mame/audio/astrof.c
@@ -156,7 +156,7 @@ logerror("Explosion: %x\n", data);
}
-static const char *astrof_sample_names[] =
+static const char *const astrof_sample_names[] =
{
"*astrof",
"fire.wav",
@@ -174,7 +174,7 @@ static const char *astrof_sample_names[] =
};
-static struct Samplesinterface astrof_samples_interface =
+static const struct Samplesinterface astrof_samples_interface =
{
4, /* 4 channels */
astrof_sample_names
@@ -219,7 +219,7 @@ WRITE8_HANDLER( tomahawk_audio_w )
}
-static struct SN76477interface tomahawk_sn76477_interface =
+static const struct SN76477interface tomahawk_sn76477_interface =
{
0, /* 4 noise_res (N/C) */
0, /* 5 filter_res (N/C) */
diff --git a/src/mame/audio/blockade.c b/src/mame/audio/blockade.c
index aca284d0a9f..5bf24e12bb8 100644
--- a/src/mame/audio/blockade.c
+++ b/src/mame/audio/blockade.c
@@ -57,14 +57,14 @@ WRITE8_HANDLER( blockade_env_off_w )
return;
}
-static const char *blockade_sample_names[] =
+static const char *const blockade_sample_names[] =
{
"*blockade",
"boom.wav",
0
};
-struct Samplesinterface blockade_samples_interface =
+const struct Samplesinterface blockade_samples_interface =
{
1, /* 1 channel */
blockade_sample_names
diff --git a/src/mame/audio/carnival.c b/src/mame/audio/carnival.c
index c5e6be32454..e80d92b3cd8 100644
--- a/src/mame/audio/carnival.c
+++ b/src/mame/audio/carnival.c
@@ -81,7 +81,7 @@
/* sample file names */
-static const char *carnival_sample_names[] =
+static const char *const carnival_sample_names[] =
{
"*carnival",
"bear.wav",
@@ -98,7 +98,7 @@ static const char *carnival_sample_names[] =
};
-static struct Samplesinterface carnival_samples_interface =
+static const struct Samplesinterface carnival_samples_interface =
{
10,
carnival_sample_names
diff --git a/src/mame/audio/cclimber.c b/src/mame/audio/cclimber.c
index dd6da27e75a..f7d04174167 100644
--- a/src/mame/audio/cclimber.c
+++ b/src/mame/audio/cclimber.c
@@ -83,7 +83,7 @@ struct AY8910interface cclimber_ay8910_interface =
0
};
-struct Samplesinterface cclimber_samples_interface =
+const struct Samplesinterface cclimber_samples_interface =
{
1,
NULL,
diff --git a/src/mame/audio/cinemat.c b/src/mame/audio/cinemat.c
index 1a634309bf9..a3c24a2b845 100644
--- a/src/mame/audio/cinemat.c
+++ b/src/mame/audio/cinemat.c
@@ -136,7 +136,7 @@ static void generic_init(running_machine *machine, void (*callback)(UINT8, UINT8
*
*************************************/
-static const char *spacewar_sample_names[] =
+static const char *const spacewar_sample_names[] =
{
"*spacewar",
"explode1.wav",
@@ -150,7 +150,7 @@ static const char *spacewar_sample_names[] =
0
};
-static struct Samplesinterface spacewar_samples_interface =
+static const struct Samplesinterface spacewar_samples_interface =
{
8,
spacewar_sample_names
@@ -218,7 +218,7 @@ MACHINE_DRIVER_END
*
*************************************/
-static const char *barrier_sample_names[] =
+static const char *const barrier_sample_names[] =
{
"*barrier",
"playrdie.wav",
@@ -227,7 +227,7 @@ static const char *barrier_sample_names[] =
0
};
-static struct Samplesinterface barrier_samples_interface =
+static const struct Samplesinterface barrier_samples_interface =
{
3,
barrier_sample_names
@@ -271,14 +271,14 @@ MACHINE_DRIVER_END
*
*************************************/
-static const char *speedfrk_sample_names[] =
+static const char *const speedfrk_sample_names[] =
{
"*speedfrk",
"offroad.wav",
NULL
};
-static struct Samplesinterface speedfrk_samples_interface =
+static const struct Samplesinterface speedfrk_samples_interface =
{
1,
speedfrk_sample_names
@@ -329,7 +329,7 @@ MACHINE_DRIVER_END
*
*************************************/
-static const char *starhawk_sample_names[] =
+static const char *const starhawk_sample_names[] =
{
"*starhawk",
"explode.wav",
@@ -341,7 +341,7 @@ static const char *starhawk_sample_names[] =
NULL
};
-static struct Samplesinterface starhawk_samples_interface =
+static const struct Samplesinterface starhawk_samples_interface =
{
5,
starhawk_sample_names
@@ -403,7 +403,7 @@ MACHINE_DRIVER_END
*
*************************************/
-static const char *sundance_sample_names[] =
+static const char *const sundance_sample_names[] =
{
"*sundance",
"bong.wav",
@@ -415,7 +415,7 @@ static const char *sundance_sample_names[] =
0
};
-static struct Samplesinterface sundance_samples_interface =
+static const struct Samplesinterface sundance_samples_interface =
{
6,
sundance_sample_names
@@ -471,7 +471,7 @@ MACHINE_DRIVER_END
*
*************************************/
-static const char *tailg_sample_names[] =
+static const char *const tailg_sample_names[] =
{
"*tailg",
"sexplode.wav",
@@ -483,7 +483,7 @@ static const char *tailg_sample_names[] =
NULL
};
-static struct Samplesinterface tailg_samples_interface =
+static const struct Samplesinterface tailg_samples_interface =
{
6,
tailg_sample_names
@@ -558,7 +558,7 @@ MACHINE_DRIVER_END
*
*************************************/
-static const char *warrior_sample_names[] =
+static const char *const warrior_sample_names[] =
{
"*warrior",
"bgmhum1.wav",
@@ -569,7 +569,7 @@ static const char *warrior_sample_names[] =
NULL
};
-static struct Samplesinterface warrior_samples_interface =
+static const struct Samplesinterface warrior_samples_interface =
{
5,
warrior_sample_names
@@ -625,7 +625,7 @@ MACHINE_DRIVER_END
*
*************************************/
-static const char *armora_sample_names[] =
+static const char *const armora_sample_names[] =
{
"*armora",
"loexp.wav",
@@ -638,7 +638,7 @@ static const char *armora_sample_names[] =
NULL
};
-static struct Samplesinterface armora_samples_interface =
+static const struct Samplesinterface armora_samples_interface =
{
7,
armora_sample_names
@@ -718,7 +718,7 @@ MACHINE_DRIVER_END
*
*************************************/
-static const char *ripoff_sample_names[] =
+static const char *const ripoff_sample_names[] =
{
"*ripoff",
"bonuslvl.wav",
@@ -737,7 +737,7 @@ static const char *ripoff_sample_names[] =
NULL
};
-static struct Samplesinterface ripoff_samples_interface =
+static const struct Samplesinterface ripoff_samples_interface =
{
6,
ripoff_sample_names
@@ -808,7 +808,7 @@ MACHINE_DRIVER_END
*
*************************************/
-static const char *starcas_sample_names[] =
+static const char *const starcas_sample_names[] =
{
"*starcas",
"cfire.wav",
@@ -822,7 +822,7 @@ static const char *starcas_sample_names[] =
0
};
-static struct Samplesinterface starcas_samples_interface =
+static const struct Samplesinterface starcas_samples_interface =
{
8,
starcas_sample_names
@@ -920,7 +920,7 @@ MACHINE_DRIVER_END
*
*************************************/
-static const char *solarq_sample_names[] =
+static const char *const solarq_sample_names[] =
{
"*solarq",
"bigexpl.wav",
@@ -934,7 +934,7 @@ static const char *solarq_sample_names[] =
NULL
};
-static struct Samplesinterface solarq_samples_interface =
+static const struct Samplesinterface solarq_samples_interface =
{
8,
solarq_sample_names
@@ -1055,7 +1055,7 @@ MACHINE_DRIVER_END
*
*************************************/
-static const char *boxingb_sample_names[] =
+static const char *const boxingb_sample_names[] =
{
"*boxingb",
"softexpl.wav",
@@ -1073,7 +1073,7 @@ static const char *boxingb_sample_names[] =
NULL
};
-static struct Samplesinterface boxingb_samples_interface =
+static const struct Samplesinterface boxingb_samples_interface =
{
12,
boxingb_sample_names
@@ -1188,7 +1188,7 @@ MACHINE_DRIVER_END
*
*************************************/
-static const char *wotw_sample_names[] =
+static const char *const wotw_sample_names[] =
{
"*wotw",
"cfire.wav",
@@ -1202,7 +1202,7 @@ static const char *wotw_sample_names[] =
0
};
-static struct Samplesinterface wotw_samples_interface =
+static const struct Samplesinterface wotw_samples_interface =
{
8,
wotw_sample_names
@@ -1300,7 +1300,7 @@ MACHINE_DRIVER_END
*
*************************************/
-static const char *wotwc_sample_names[] =
+static const char *const wotwc_sample_names[] =
{
"*wotwc",
"cfire.wav",
@@ -1314,7 +1314,7 @@ static const char *wotwc_sample_names[] =
0
};
-static struct Samplesinterface wotwc_samples_interface =
+static const struct Samplesinterface wotwc_samples_interface =
{
8,
wotwc_sample_names
diff --git a/src/mame/audio/circus.c b/src/mame/audio/circus.c
index 951a039f272..d4d878f8c7c 100644
--- a/src/mame/audio/circus.c
+++ b/src/mame/audio/circus.c
@@ -4,7 +4,7 @@
int circus_game;
-static const char *circus_sample_names[] =
+static const char *const circus_sample_names[] =
{
"*circus",
"pop.wav",
@@ -13,26 +13,26 @@ static const char *circus_sample_names[] =
0
};
-struct Samplesinterface circus_samples_interface =
+const struct Samplesinterface circus_samples_interface =
{
3, /* 3 channels */
circus_sample_names
};
-static const char *crash_sample_names[] =
+static const char *const crash_sample_names[] =
{
"*crash",
"crash.wav",
0
};
-struct Samplesinterface crash_samples_interface =
+const struct Samplesinterface crash_samples_interface =
{
1, /* 1 channel */
crash_sample_names
};
-static const char *ripcord_sample_names[] =
+static const char *const ripcord_sample_names[] =
{
"*ripcord",
"splash.wav",
@@ -42,13 +42,13 @@ static const char *ripcord_sample_names[] =
0
};
-struct Samplesinterface ripcord_samples_interface =
+const struct Samplesinterface ripcord_samples_interface =
{
4, /* 4 channels */
ripcord_sample_names
};
-static const char *robotbwl_sample_names[] =
+static const char *const robotbwl_sample_names[] =
{
"*robotbwl",
"hit.wav",
@@ -59,7 +59,7 @@ static const char *robotbwl_sample_names[] =
0
};
-struct Samplesinterface robotbwl_samples_interface =
+const struct Samplesinterface robotbwl_samples_interface =
{
5, /* 5 channels */
robotbwl_sample_names
diff --git a/src/mame/audio/depthch.c b/src/mame/audio/depthch.c
index f63dd35e115..75ea5ead7f0 100644
--- a/src/mame/audio/depthch.c
+++ b/src/mame/audio/depthch.c
@@ -18,7 +18,7 @@
/* sample file names */
-static const char *depthch_sample_names[] =
+static const char *const depthch_sample_names[] =
{
"*depthch",
"longex.wav",
@@ -29,7 +29,7 @@ static const char *depthch_sample_names[] =
};
-static struct Samplesinterface depthch_samples_interface =
+static const struct Samplesinterface depthch_samples_interface =
{
4,
depthch_sample_names
diff --git a/src/mame/audio/dkong.c b/src/mame/audio/dkong.c
index 66fb86e8eea..421689f46fd 100644
--- a/src/mame/audio/dkong.c
+++ b/src/mame/audio/dkong.c
@@ -1,14 +1,39 @@
#include "driver.h"
#include "cpu/i8039/i8039.h"
+#include "cpu/m6502/m6502.h"
+#include "sound/nes_apu.h"
#include "sound/samples.h"
-#include "includes/dkong.h"
#include "sound/discrete.h"
#include "sound/dac.h"
+#include "includes/dkong.h"
/****************************************************************
*
- * Diskrete Sound defines
+ * Defines and Macros
+ *
+ ****************************************************************/
+
+#define DEBUG_SPEECH (0)
+
+#define ACTIVELOW_PORT_BIT(P,A,D) (((P) & (~(1 << (A)))) | (((D) ^ 1) << (A)))
+
+/* Needed for dkongjr ... FIXME */
+#define I8035_T_R(N) ((portT >> (N)) & 1)
+#define I8035_T_W_AL(N,D) do { portT = ACTIVELOW_PORT_BIT(portT,N,D); soundlatch2_w(0, portT); } while (0)
+
+#define I8035_P1_R() (soundlatch3_r(0))
+#define I8035_P2_R() (soundlatch4_r(0))
+#define I8035_P1_W(D) soundlatch3_w(0,D)
+#define I8035_P2_W(D) soundlatch4_w(0,D)
+
+#define I8035_P1_W_AL(B,D) I8035_P1_W(ACTIVELOW_PORT_BIT(I8035_P1_R(),B,(D)))
+#define I8035_P2_W_AL(B,D) I8035_P2_W(ACTIVELOW_PORT_BIT(I8035_P2_R(),B,(D)))
+
+
+/****************************************************************
+ *
+ * Discrete Sound defines
*
****************************************************************/
@@ -63,22 +88,20 @@
static UINT8 dkongjr_latch[10];
static UINT8 sh_climb_count;
-static UINT8 has_discrete_interface = 0;
+static UINT8 has_discrete_interface;
static UINT8 page,mcustatus;
-static UINT8 p[8];
-static UINT8 t[2];
static double envelope,tt;
static UINT8 decay;
-static UINT8 sh1_count = 0;
+static UINT8 sh1_count;
+static UINT8 portT;
-enum
-{
+enum {
WAIT_CMD,
WAIT_WRITE,
WAIT_DONE1,
WAIT_DONE2
-};
+} m58817_states;
static UINT8 m58817_state;
static UINT8 m58817_drq;
@@ -160,7 +183,7 @@ static INT32 m58817_address;
#define DK_C29 CAP_U_AGED(3.3)
#define DK_C30 CAP_U_AGED(10)
#define DK_C32 CAP_U_AGED(10)
-#define DK_C34 CAP_N(100)
+#define DK_C34 CAP_N(10)
#define DK_C160 CAP_N(100)
@@ -234,7 +257,7 @@ static const discrete_inverter_osc_desc dkong_inverter_osc_desc_walk =
DISC_OSC_INVERTER_IS_TYPE2
};
-DISCRETE_SOUND_START(dkong)
+static DISCRETE_SOUND_START(dkong2b)
/************************************************/
/* Input register mapping for dkong */
@@ -331,11 +354,13 @@ DISCRETE_SOUND_START(dkong)
/* following the DAC are two opamps. The first is a current-to-voltage changer
* for the DAC08 which delivers a variable output current.
- * The second opamp I tried to modell in the transform.
+ *
+ * The second one is a Sallen Key filter ...
+ * http://www.t-linespeakers.org/tech/filters/Sallen-Key.html
+ * f = w / 2 / pi = 1 / ( 2 * pi * 5.6k*sqrt(22n*10n)) = 1916 Hz
+ * Q = 1/2 * sqrt(22n/10n)= 0.74
*/
-
- DISCRETE_RCFILTER(NODE_72,1,NODE_71,(DK_R21+DK_R22),DK_C34)
- DISCRETE_TRANSFORM4(NODE_73,1,NODE_72,NODE_71,-1,NODE_73,"012*3+-")
+ DISCRETE_FILTER2(NODE_73, 1, NODE_71, 1916, (1.0/0.74), DISC_FILTER_LOWPASS)
/* Adjustment VR2 */
DISCRETE_MULTIPLY(DS_OUT_DAC, 1, NODE_73, DS_ADJ_DAC)
@@ -346,20 +371,21 @@ DISCRETE_SOUND_START(dkong)
DISCRETE_MIXER4(NODE_288, 1, DS_OUT_SOUND0, DS_OUT_SOUND1, DS_OUT_DAC, DS_OUT_SOUND2, &dkong_mixer_desc)
-#if 1
+#if 0
/* This filter should simulate gain vs. frequency behaviour of MB3712 */
//DISCRETE_FILTER1(NODE_294,1,NODE_288,80,DISC_FILTER_HIGHPASS)
/* The following is the CR filter by the speaker and C8 */
/* 4 Ohm is from MB3712 Spec Sheet */
DISCRETE_CRFILTER(NODE_295,1,NODE_288, 4, DK_C8)
- DISCRETE_OUTPUT(NODE_295, 32767.0/5.0*30)
+ DISCRETE_OUTPUT(NODE_295, 32767.0/5.0*15)
#else
// Amplifier: internal amplifier
- DISCRETE_ADDER2(NODE_289,1,NODE_288,0.5+5.0*150.0/(150.0+1000.0))
+ //DISCRETE_ADDER2(NODE_289,1,NODE_288,0.3+5.0*150.0/(150.0+1000.0))
+ DISCRETE_ADDER2(NODE_289,1,NODE_288,5.0*43.0/(100.0+43.0))
DISCRETE_RCINTEGRATE(NODE_294,1,NODE_289,0,150,1000, CAP_U(33),DK_SUP_V,DISC_RC_INTEGRATE_TYPE3)
DISCRETE_CRFILTER(NODE_295,1,NODE_294, 50, DK_C13)
- DISCRETE_OUTPUT(NODE_295, 32767.0/5.0)
+ DISCRETE_OUTPUT(NODE_295, 32767.0/5.0 )
#endif
DISCRETE_SOUND_END
@@ -382,7 +408,7 @@ DISCRETE_SOUND_END
#define RS_R14 RES_K(10)
#define RS_R15 RES_K(5.6) // ????
#define RS_R16 RES_K(5.6)
-#define RS_R18 RES_K(4.7) // ????
+#define RS_R18 RES_K(4.7)
#define RS_R22 RES_K(5.6)
#define RS_R23 RES_K(5.6)
#define RS_R25 RES_K(10)
@@ -431,6 +457,9 @@ DISCRETE_SOUND_END
#define RS_C45 CAP_U(22)
#define RS_C46 CAP_U(1)
#define RS_C47 CAP_U(22)
+#define RS_C48 CAP_N(33)
+#define RS_C49 CAP_N(10)
+#define RS_C50 CAP_U(3.3)
#define RS_C51 CAP_U(3.3)
#define RS_C53 CAP_U(3.3)
#define RS_C54 CAP_U(1)
@@ -465,7 +494,7 @@ static const discrete_mixer_desc radarscp_mixer_desc_7 =
{0,0,0}, // no variable resistors
{0,0,0}, // no node capacitors
0, 0,
- RS_C51,
+ RS_C50,
0,
0, 1};
@@ -488,7 +517,7 @@ static const discrete_inverter_osc_desc radarscp_inverter_osc_desc_7 =
DISC_OSC_INVERTER_IS_TYPE3
};
-DISCRETE_SOUND_START(radarscp)
+static DISCRETE_SOUND_START(radarscp)
/************************************************/
/* Input register mapping for radarscp */
@@ -563,7 +592,7 @@ DISCRETE_SOUND_START(radarscp)
DISCRETE_MIXER3(NODE_42, 1, NODE_41, DK_SUP_V, 0,&radarscp_mixer_desc_0)
/* 555 Voltage controlled */
- DISCRETE_555_ASTABLE_CV(NODE_43, DS_SOUND6, RES_K(47), RES_K(27), CAP_N(10), NODE_42, &dkong_555_vco_desc)
+ DISCRETE_555_ASTABLE_CV(NODE_43, DS_SOUND6, RES_K(47), RES_K(27), RS_C49, NODE_42, &dkong_555_vco_desc)
DISCRETE_RCDISC_MODULATED(NODE_44,1,DS_SOUND0_INV,NODE_43,RS_R39,RS_R18,RS_R37,RS_R38,RS_C22,DK_SUP_V)
DISCRETE_CRFILTER(NODE_45, 1, NODE_44, RS_R15+RS_R16, RS_C33)
@@ -579,7 +608,7 @@ DISCRETE_SOUND_START(radarscp)
DISCRETE_MIXER3(NODE_53, 1, NODE_51, DK_SUP_V, 0,&radarscp_mixer_desc_7)
/* 555 Voltage controlled */
- DISCRETE_555_ASTABLE_CV(NODE_54, DS_SOUND7, RES_K(47), RES_K(27), CAP_N(33), NODE_53, &dkong_555_vco_desc)
+ DISCRETE_555_ASTABLE_CV(NODE_54, DS_SOUND7, RES_K(47), RES_K(27), RS_C48, NODE_53, &dkong_555_vco_desc)
DISCRETE_RCINTEGRATE(NODE_55,1,NODE_52,RS_R46, RS_R46,0,RS_C45,DK_SUP_V,DISC_RC_INTEGRATE_TYPE1)
DISCRETE_TRANSFORM4(NODE_56, 1, NODE_55, DS_SOUND7,NODE_54,2.5, "01*23<*")
@@ -595,11 +624,13 @@ DISCRETE_SOUND_START(radarscp)
/* following the DAC are two opamps. The first is a current-to-voltage changer
* for the DAC08 which delivers a variable output current.
- * The second opamp I tried to modell in the transform.
+ *
+ * The second one is a Sallen Key filter ...
+ * http://www.t-linespeakers.org/tech/filters/Sallen-Key.html
+ * f = w / 2 / pi = 1 / ( 2 * pi * 5.6k*sqrt(22n*10n)) = 1916 Hz
+ * Q = 1/2 * sqrt(22n/10n)= 0.74
*/
-
- DISCRETE_RCFILTER(NODE_172,1,NODE_171,(RS_R22+RS_R23),RS_C38)
- DISCRETE_TRANSFORM4(NODE_173,1,NODE_172,NODE_171,-1,NODE_173,"012*3+-")
+ DISCRETE_FILTER2(NODE_173, 1, NODE_171, 1916, (1.0/0.74), DISC_FILTER_LOWPASS)
/* Adjustment VR3 */
DISCRETE_MULTIPLY(DS_OUT_DAC, 1, NODE_173, DS_ADJ_DAC)
@@ -610,27 +641,23 @@ DISCRETE_SOUND_START(radarscp)
DISCRETE_MIXER5(NODE_288, 1, DS_OUT_SOUND0, DS_OUT_SOUND1, DS_OUT_SOUND2, DS_OUT_SOUND7, DS_OUT_DAC, &radarscp_mixer_desc)
-#if 1
+#if 0
/* This filter should simulate gain vs. frequency behaviour of MB3712 */
//DISCRETE_FILTER1(NODE_291,1,NODE_289,80,DISC_FILTER_HIGHPASS)
/* The following is the CR filter by the speaker and C8 */
/* 4 Ohm is from MB3712 Spec Sheet */
DISCRETE_CRFILTER(NODE_295,1,NODE_288, 4, RS_C5)
- DISCRETE_OUTPUT(NODE_295, 32767.0/5.0*10)
+ DISCRETE_OUTPUT(NODE_295, 32767.0/5.0*20)
#else
// Amplifier: internal amplifier
- DISCRETE_ADDER2(NODE_289,1,NODE_288,0.5+5.0*150.0/(150.0+1000.0))
+ //DISCRETE_ADDER2(NODE_289,1,NODE_288,0.5+5.0*150.0/(150.0+1000.0))
+ DISCRETE_ADDER2(NODE_289,1,NODE_288,5.0*43.0/(100.0+43.0))
DISCRETE_RCINTEGRATE(NODE_294,1,NODE_289,0,150,1000, CAP_U(33),DK_SUP_V,DISC_RC_INTEGRATE_TYPE3)
DISCRETE_CRFILTER(NODE_295,1,NODE_294, 50, DK_C13)
- DISCRETE_OUTPUT(NODE_295, 32767.0/5.0)
+ DISCRETE_OUTPUT(NODE_295, 32767.0/5.0 * 3)
#endif
- //DISCRETE_CSVLOG3(DS_SOUND2,NODE_13,NODE_14)
- //DISCRETE_CSVLOG3(DS_SOUND0,NODE_54,NODE_51)
- //DISCRETE_CRFILTER(NODE_299,1,NODE_288, 50, DK_C13)
- //DISCRETE_WAVELOG2(NODE_295, 32767/5.0, NODE_299, 32767.0/5.0*20)
- //DISCRETE_WAVELOG2(NODE_57, 32767/5.0, NODE_56, 32767/5.0)
DISCRETE_SOUND_END
@@ -640,16 +667,23 @@ DISCRETE_SOUND_END
*
****************************************************************/
-SOUND_START( dkong )
+static SOUND_START( dkong )
{
state_save_register_global(page);
state_save_register_global(mcustatus);
- state_save_register_global_array(p);
- state_save_register_global_array(t);
state_save_register_global(envelope);
state_save_register_global(tt);
state_save_register_global(decay);
state_save_register_global(sh1_count);
+ state_save_register_global(portT);
+
+ has_discrete_interface = 1;
+
+
+}
+
+static SOUND_RESET( dkong )
+{
sh1_count = 0;
mcustatus = 0;
@@ -658,13 +692,15 @@ SOUND_START( dkong )
decay = 0;
page = 0;
- p[0] = p[1] = p[2] = p[3] = p[4] = p[5] = p[6] = p[7] = 255;
- t[0] = t[1] = 1;
- has_discrete_interface = 1;
+ I8035_T_W_AL(0,0);
+ I8035_T_W_AL(1,0);
+ I8035_P1_W(255);
+ I8035_P2_W(255);
+
}
-SOUND_START( dkongjr )
+static SOUND_START( dkongjr )
{
sound_start_dkong(machine);
@@ -676,94 +712,38 @@ SOUND_START( dkongjr )
has_discrete_interface = 0;
}
-SOUND_START( hunchbkd )
+static SOUND_START( radarsc1 )
{
sound_start_dkong(machine);
- has_discrete_interface = 0;
-}
+ state_save_register_global(m58817_state);
+ state_save_register_global(m58817_drq);
+ state_save_register_global_array(m58817_nibbles);
+ state_save_register_global(m58817_count);
+ state_save_register_global(m58817_address);
-static int dumpframe(int startbit);
+ has_discrete_interface = 1;
+}
-SOUND_START( radarsc1 )
+static SOUND_RESET( radarsc1 )
{
- sound_start_dkong(machine);
+ sound_reset_dkong(machine);
m58817_state=WAIT_CMD;
m58817_drq=0;
m58817_count=0;
m58817_address=0;
- state_save_register_global(m58817_state);
- state_save_register_global(m58817_drq);
- state_save_register_global_array(m58817_nibbles);
- state_save_register_global(m58817_count);
- state_save_register_global(m58817_address);
-
- has_discrete_interface = 1;
}
/****************************************************************
*
- * I/O Handlers
+ * M58817 Speech
+ *
+ * Fixme: Move to src/emu/audio
*
****************************************************************/
-
-READ8_HANDLER( dkong_sh_p1_r )
-{
- return p[1];
-}
-
-READ8_HANDLER( dkong_sh_p2_r )
-{
- return p[2];
-}
-
-READ8_HANDLER( dkong_sh_t0_r )
-{
- return t[0];
-}
-
-READ8_HANDLER( dkong_sh_t1_r )
-{
- return t[1];
-}
-
-READ8_HANDLER( dkong_sh_tune_r )
-{
- UINT8 *SND = memory_region(REGION_CPU2);
- if ((page & 0x40) && (offset==0x20))
- return soundlatch_r(0);
- else
- return (SND[2048+(page & 7)*256+offset]);
-}
-
-#define TSTEP 0.001
-
-WRITE8_HANDLER( dkong_sh_p1_w )
-{
-
- if (has_discrete_interface)
- discrete_sound_w(DS_DAC,data);
- else
- {
- envelope=exp(-tt);
- DAC_data_w(0,(int)(data*envelope));
- if (decay)
- tt+=TSTEP;
- else
- tt=0;
- }
-}
-
-READ8_HANDLER( radarsc1_sh_tune_r )
-{
- // always offset 0x20
- return soundlatch_r(0);
-}
-
-
/* @0x510, cpu2
10: 0000 00 00000000 ... 50 53 01010000 01010011 "scramble"
12: 007a 44 01000100 ... 00 0f 00000000 00001111 "all pilots climb up"
@@ -788,16 +768,17 @@ READ8_HANDLER( radarsc1_sh_tune_r )
271
Samples
- 0: 14 16
- 1: 14 18
- 2: 14 1A
- 3: 1C
- 4: 1E 1E
- 5: 10 10 10
- 6: 12 12
- 7: 20
+ 0: 14 16 ... checkpoint charlie
+ 1: 14 18 ... checkpoint bravo
+ 2: 14 1A ... checkpoint alpha
+ 3: 1C You'll notice
+ 4: 1E 1E Complete attack mission
+ 5: 10 10 10 trouble, trouble, trouble
+ 6: 12 12 all pilots climb up
+ 7: 20 engine trouble
*/
+#if DEBUG_SPEECH
static UINT8 m58817_getbit(int bitnum)
{
const UINT8 *table = memory_region(REGION_SOUND1);
@@ -817,7 +798,7 @@ static UINT32 m58817_getbits(int startbit, int num)
return r;
}
-static int decodeframe(int startbit)
+static int m58817_decodeframe(int startbit)
{
int energy;
int pitch;
@@ -866,13 +847,49 @@ static int decodeframe(int startbit)
}
}
-static int dumpframe(int startbit)
+static int m58817_dumpframe(int startbit)
{
while (startbit>=0)
- startbit=decodeframe(startbit);
+ startbit=m58817_decodeframe(startbit);
logerror("\n");
return startbit;
}
+#endif
+
+static void m58817_sampleframe(int addr)
+{
+ printf("0x%x\n", addr);
+ switch (addr)
+ {
+ case 0x0000: /* 10 */
+ sample_start (0,0,0);
+ break;
+ case 0x007a: /* 12 */
+ sample_start (0,1,0);
+ break;
+ case 0x018b: /* 14 */
+ sample_start (0,2,0);
+ break;
+ case 0x0320: /* 16 */
+ sample_start (0,3,0);
+ break;
+ case 0x036c: /* 18 */
+ sample_start (0,4,0);
+ break;
+ case 0x03c4: /* 1A */
+ sample_start (0,5,0);
+ break;
+ case 0x041c: /* 1C */
+ sample_start (0,6,0);
+ break;
+ case 0x0520: /* 1E */
+ sample_start (0,7,0);
+ break;
+ case 0x063e: /* 20 */
+ sample_start (0,8,0);
+ break;
+ }
+}
static void m58817_state_loop(int data)
{
@@ -908,18 +925,21 @@ static void m58817_state_loop(int data)
m58817_address |= (m58817_nibbles[i] << (i*4));
}
logerror("m58817: address: 0x%04x\n", m58817_address);
- dumpframe(m58817_address * 8);
+ //m58817_dumpframe(m58817_address * 8);
+ m58817_sampleframe(m58817_address);
m58817_state=WAIT_CMD;
break;
}
}
-static READ8_HANDLER( M58817_status_r)
+
+static READ8_HANDLER( M58817_status_r )
{
- return !(m58817_state == WAIT_CMD);
+ //return !(m58817_state == WAIT_CMD);
+ return sample_playing(0);
}
-static WRITE8_HANDLER( M58817_command_w)
+static WRITE8_HANDLER( M58817_command_w )
{
int drq = (data>>4) & 0x01; // FIXME 0x20 ??
int dat = data & 0x0f;
@@ -929,21 +949,75 @@ static WRITE8_HANDLER( M58817_command_w)
m58817_drq = drq;
}
-READ8_HANDLER( radarsc1_sh_p1_r )
+/****************************************************************
+ *
+ * I/O Handlers - static
+ *
+ ****************************************************************/
+
+static READ8_HANDLER( dkong_sh_p1_r )
+{
+ return I8035_P1_R();
+}
+
+static READ8_HANDLER( dkong_sh_p2_r )
{
- int r;
+ return I8035_P2_R();
+}
- r = (p[1] & 0x80) | (M58817_status_r(0)<<6);
- //logerror("PA Ret %x\n", r);
+static READ8_HANDLER( dkong_sh_t0_r )
+{
+ return I8035_T_R(0);
+}
+
+static READ8_HANDLER( dkong_sh_t1_r )
+{
+ return I8035_T_R(1);
+}
+
+static READ8_HANDLER( dkong_sh_tune_r )
+{
+ UINT8 *SND = memory_region(REGION_CPU2);
+ if ( page & 0x40 )
+ {
+ return soundlatch_r(0);
+ }
+ else
+ return (SND[2048+(page & 7)*256+offset]);
+}
+
+#define TSTEP 0.001
+
+static WRITE8_HANDLER( dkong_sh_p1_w )
+{
+
+ if (has_discrete_interface)
+ discrete_sound_w(DS_DAC,data);
+ else
+ {
+ envelope=exp(-tt);
+ DAC_data_w(0,(int)(data*envelope));
+ if (decay)
+ tt+=TSTEP;
+ else
+ tt=0;
+ }
+}
+
+
+static READ8_HANDLER( radarsc1_sh_p1_r )
+{
+ int r;
+ r = (I8035_P1_R() & 0x80) | (M58817_status_r(0)<<6);
return r;
}
-WRITE8_HANDLER( radarsc1_sh_p1_w )
+static WRITE8_HANDLER( radarsc1_sh_p1_w )
{
M58817_command_w(0,data);
}
-WRITE8_HANDLER( radarsc1_sh_p2_w )
+static WRITE8_HANDLER( radarsc1_sh_p2_w )
{
/* If P2.Bit7 -> external signal decay
* If P2.Bit6 -> not connected
@@ -961,7 +1035,7 @@ WRITE8_HANDLER( radarsc1_sh_p2_w )
radarsc1_ansn_w(0, (data & 0x20) >> 5);
}
-WRITE8_HANDLER( dkong_sh_p2_w )
+static WRITE8_HANDLER( dkong_sh_p2_w )
{
/* If P2.Bit7 -> is apparently an external signal decay or other output control
* If P2.Bit6 -> activates the external compressed sample ROM
@@ -977,35 +1051,35 @@ WRITE8_HANDLER( dkong_sh_p2_w )
mcustatus = ((~data & 0x10) >> 4);
}
-#define ACTIVELOW_PORT_BIT(P,A,D) ((P & (~(1 << A))) | (((D) ^ 1) << A))
-
-WRITE8_HANDLER( dkong_sh_tuneselect_w )
+static READ8_HANDLER( radarsc1_sh_tune_r )
{
- soundlatch_w(offset,data ^ 0x0f);
+ return soundlatch_r(0);
}
-WRITE8_HANDLER( dkongjr_sh_test6_w )
-{
- p[2] = ACTIVELOW_PORT_BIT(p[2],6,data);
-}
-WRITE8_HANDLER( dkongjr_sh_test5_w )
-{
- p[2] = ACTIVELOW_PORT_BIT(p[2],5,data);
-}
+/****************************************************************
+ *
+ * I/O Handlers - global
+ *
+ ****************************************************************/
-WRITE8_HANDLER( dkongjr_sh_test4_w )
+WRITE8_HANDLER( dkongjr_sh_test6_w )
{
- p[2] = ACTIVELOW_PORT_BIT(p[2],4,data);
+ I8035_P2_W_AL(6,data & 1);
}
+
WRITE8_HANDLER( dkongjr_sh_tuneselect_w )
{
soundlatch_w(offset,data);
}
+READ8_HANDLER( dkong_audio_status_r )
+{
+ return mcustatus;
+}
-WRITE8_HANDLER( dkong_sh_w )
+WRITE8_HANDLER( dkong_audio_irq_w )
{
if (data)
cpunum_set_input_line(1, 0, ASSERT_LINE);
@@ -1015,51 +1089,11 @@ WRITE8_HANDLER( dkong_sh_w )
WRITE8_HANDLER( dkong_snd_disc_w )
{
- if (!has_discrete_interface && (offset<3))
- {
- logerror("dkong.c: Write to snd port %d (%d)\n", offset, data);
- return;
- }
- switch (offset)
- {
- case 0:
- discrete_sound_w(DS_SOUND0_INP,data & 1);
- break;
- case 1:
- discrete_sound_w(DS_SOUND1_INP,data & 1);
- break;
- case 2:
- discrete_sound_w(DS_SOUND2_INP,data & 1);
- radarscp_snd02_w(0, data & 1);
- break;
- case 3:
- p[2] = ACTIVELOW_PORT_BIT(p[2],5,data);
- break;
- case 4:
- t[1] = ~data & 1;
- break;
- case 5:
- t[0] = ~data & 1;
- break;
- case 6:
- if (has_discrete_interface)
- discrete_sound_w(DS_SOUND6_INP,data & 1);
- break;
- case 7:
- if (has_discrete_interface)
- discrete_sound_w(DS_SOUND7_INP,data & 1);
- break;
- }
- return;
-}
+ dkong_state *state = Machine->driver_data;
-WRITE8_HANDLER( radarsc1_snd_disc_w )
-{
if (!has_discrete_interface && (offset<3))
{
logerror("dkong.c: Write to snd port %d (%d)\n", offset, data);
- if (offset == 2)
- radarscp_snd02_w(0, data & 1);
return;
}
switch (offset)
@@ -1074,14 +1108,18 @@ WRITE8_HANDLER( radarsc1_snd_disc_w )
discrete_sound_w(DS_SOUND2_INP,data & 1);
radarscp_snd02_w(0, data & 1);
break;
- case 3: //SOUND3 ==> PA7
- p[1] = ACTIVELOW_PORT_BIT(p[1],7,data & 1);
+ case 3:
+ if (state->hardware_type == HARDWARE_TRS01)
+ //SOUND3 ==> PA7
+ I8035_P1_W_AL(7,data & 1);
+ else
+ I8035_P2_W_AL(5,data & 1);
break;
case 4:
- t[1] = ~data & 1;
+ I8035_T_W_AL(1, data & 1);
break;
case 5:
- t[0] = ~data & 1;
+ I8035_T_W_AL(0, data & 1);
break;
case 6:
if (has_discrete_interface)
@@ -1091,13 +1129,13 @@ WRITE8_HANDLER( radarsc1_snd_disc_w )
if (has_discrete_interface)
discrete_sound_w(DS_SOUND7_INP,data & 1);
break;
- }
+ }
return;
}
-READ8_HANDLER( dkong_in2_r )
+WRITE8_HANDLER( dkong_sh_tuneselect_w )
{
- return input_port_2_r(offset) | (mcustatus << 6);
+ soundlatch_w(offset,data ^ 0x0f);
}
WRITE8_HANDLER( dkongjr_snd_w1 )
@@ -1123,8 +1161,8 @@ WRITE8_HANDLER( dkongjr_snd_w1 )
}
break;
case 1: /* jump */
- if (data)
- sample_start (6,0,0);
+ if (data)
+ sample_start (6,0,0);
break;
case 2: /* land */
if (data)
@@ -1136,10 +1174,10 @@ WRITE8_HANDLER( dkongjr_snd_w1 )
sample_start (7,2,0);
break;
case 4: /* Port 4 write */
- t[1] = ~data & 1;
+ I8035_T_W_AL(1, data & 1);
break;
case 5: /* Port 5 write */
- t[0] = ~data & 1;
+ I8035_T_W_AL(0, data & 1);
break;
case 6: /* snapjaw */
if (data)
@@ -1173,3 +1211,193 @@ WRITE8_HANDLER( dkongjr_snd_w2 )
dkongjr_latch[offset+8] = data;
}
}
+
+
+
+/*************************************
+ *
+ * Sound CPU memory handlers
+ *
+ *************************************/
+
+static ADDRESS_MAP_START( dkong_sound_map, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0x0fff) AM_ROM
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( dkong_sound_io_map, ADDRESS_SPACE_IO, 8 )
+ AM_RANGE(0x00, 0xff) AM_READ(dkong_sh_tune_r)
+ AM_RANGE(I8039_bus, I8039_bus) AM_READ(dkong_sh_tune_r)
+ AM_RANGE(I8039_p1, I8039_p1) AM_READWRITE(dkong_sh_p1_r, dkong_sh_p1_w)
+ AM_RANGE(I8039_p2, I8039_p2) AM_READWRITE(dkong_sh_p2_r, dkong_sh_p2_w)
+ AM_RANGE(I8039_t0, I8039_t0) AM_READ(dkong_sh_t0_r)
+ AM_RANGE(I8039_t1, I8039_t1) AM_READ(dkong_sh_t1_r)
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( radarsc1_sound_io_map, ADDRESS_SPACE_IO, 8 )
+ AM_RANGE(0x00, 0xff) AM_READ(radarsc1_sh_tune_r)
+ AM_RANGE(0x00, 0xff) AM_WRITE(dkong_sh_p1_w) // DAC here
+ AM_RANGE(I8039_p1, I8039_p1) AM_READWRITE(radarsc1_sh_p1_r, radarsc1_sh_p1_w)
+ AM_RANGE(I8039_p2, I8039_p2) AM_READWRITE(dkong_sh_p2_r, radarsc1_sh_p2_w)
+ AM_RANGE(I8039_t0, I8039_t0) AM_READ(dkong_sh_t0_r)
+ AM_RANGE(I8039_t1, I8039_t1) AM_READ(dkong_sh_t1_r)
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( dkong3_sound1_map, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0x01ff) AM_RAM
+ AM_RANGE(0x4016, 0x4016) AM_READ(soundlatch_r) // overwrite default
+ AM_RANGE(0x4017, 0x4017) AM_READ(soundlatch2_r)
+ AM_RANGE(0x4000, 0x4017) AM_READ(NESPSG_0_r)
+ AM_RANGE(0x4000, 0x4017) AM_WRITE(NESPSG_0_w)
+ AM_RANGE(0xe000, 0xffff) AM_ROM
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( dkong3_sound2_map, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0x01ff) AM_RAM
+ AM_RANGE(0x4016, 0x4016) AM_READ(soundlatch3_r) // overwrite default
+ AM_RANGE(0x4000, 0x4017) AM_READ(NESPSG_1_r)
+ AM_RANGE(0x4000, 0x4017) AM_WRITE(NESPSG_1_w)
+ AM_RANGE(0xe000, 0xffff) AM_ROM
+ADDRESS_MAP_END
+
+/*************************************
+ *
+ * Sound interfaces
+ *
+ *************************************/
+
+static const char *dkongjr_sample_names[] =
+{
+ "*dkongjr",
+ "jump.wav",
+ "land.wav",
+ "roar.wav",
+ "climb0.wav",
+ "climb1.wav",
+ "climb2.wav",
+ "death.wav",
+ "drop.wav",
+ "walk0.wav",
+ "walk1.wav",
+ "walk2.wav",
+ "snapjaw.wav",
+ 0 /* end of array */
+};
+
+static struct Samplesinterface dkongjr_samples_interface =
+{
+ 8, /* 8 channels */
+ dkongjr_sample_names
+};
+
+static const char *radarsc1_sample_names[] =
+{
+ "*radarsc1",
+ "10.wav",
+ "12.wav",
+ "14.wav",
+ "16.wav",
+ "18.wav",
+ "1A.wav",
+ "1C.wav",
+ "1E.wav",
+ "20.wav",
+ 0 /* end of array */
+};
+
+static struct Samplesinterface radarsc1_samples_interface =
+{
+ 8, /* 8 channels */
+ radarsc1_sample_names
+};
+
+static struct NESinterface nes_interface_1 = { REGION_CPU2 };
+static struct NESinterface nes_interface_2 = { REGION_CPU3 };
+
+/*************************************
+ *
+ * Machine driver
+ *
+ *************************************/
+
+MACHINE_DRIVER_START( dkong2b_audio )
+
+ MDRV_CPU_ADD_TAG("sound", I8035,I8035_CLOCK)
+ MDRV_CPU_PROGRAM_MAP(dkong_sound_map,0)
+ MDRV_CPU_IO_MAP(dkong_sound_io_map, 0)
+
+ MDRV_SOUND_START(dkong)
+ MDRV_SOUND_RESET(dkong)
+
+ MDRV_SPEAKER_STANDARD_MONO("mono")
+ MDRV_SOUND_ADD_TAG("discrete", DISCRETE, 0)
+ MDRV_SOUND_CONFIG_DISCRETE(dkong2b)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+
+MACHINE_DRIVER_END
+
+MACHINE_DRIVER_START( radarscp_audio )
+
+ MDRV_IMPORT_FROM( dkong2b_audio )
+ MDRV_SOUND_MODIFY("discrete")
+ MDRV_SOUND_CONFIG_DISCRETE(radarscp)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+
+MACHINE_DRIVER_END
+
+
+MACHINE_DRIVER_START( radarsc1_audio )
+
+ MDRV_IMPORT_FROM( radarscp_audio )
+ MDRV_CPU_MODIFY("sound")
+ MDRV_CPU_IO_MAP(radarsc1_sound_io_map, 0)
+
+ MDRV_SOUND_START(radarsc1)
+ MDRV_SOUND_RESET(radarsc1)
+
+ MDRV_SOUND_ADD(SAMPLES, 0)
+ MDRV_SOUND_CONFIG(radarsc1_samples_interface)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 3.0)
+
+MACHINE_DRIVER_END
+
+MACHINE_DRIVER_START( dkongjr_audio )
+
+ MDRV_CPU_ADD(I8035,I8035_CLOCK)
+ MDRV_CPU_PROGRAM_MAP(dkong_sound_map,0)
+ MDRV_CPU_IO_MAP(dkong_sound_io_map, 0)
+
+ MDRV_SOUND_START(dkongjr)
+ MDRV_SOUND_RESET(dkong)
+
+ MDRV_SPEAKER_STANDARD_MONO("mono")
+ MDRV_SOUND_ADD(DAC, 0)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.55)
+
+ MDRV_SOUND_ADD(SAMPLES, 0)
+ MDRV_SOUND_CONFIG(dkongjr_samples_interface)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+
+MACHINE_DRIVER_END
+
+MACHINE_DRIVER_START( dkong3_audio )
+
+ MDRV_CPU_ADD_TAG("n2a03a", N2A03,N2A03_DEFAULTCLOCK)
+ MDRV_CPU_PROGRAM_MAP(dkong3_sound1_map, 0)
+ MDRV_CPU_VBLANK_INT(nmi_line_pulse,1)
+
+ MDRV_CPU_ADD_TAG("n2a03b", N2A03,N2A03_DEFAULTCLOCK)
+ MDRV_CPU_PROGRAM_MAP(dkong3_sound2_map, 0)
+ MDRV_CPU_VBLANK_INT(nmi_line_pulse,1)
+
+ MDRV_SPEAKER_STANDARD_MONO("mono")
+ MDRV_SOUND_ADD(NES, N2A03_DEFAULTCLOCK)
+ MDRV_SOUND_CONFIG(nes_interface_1)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+
+ MDRV_SOUND_ADD(NES, N2A03_DEFAULTCLOCK)
+ MDRV_SOUND_CONFIG(nes_interface_2)
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+
+MACHINE_DRIVER_END
+
+
diff --git a/src/mame/audio/galaxian.c b/src/mame/audio/galaxian.c
index ee1681dbdf8..ff1dfe2e6c3 100644
--- a/src/mame/audio/galaxian.c
+++ b/src/mame/audio/galaxian.c
@@ -57,7 +57,7 @@ static INT32 pitch,vol;
static INT32 counter, countdown;
static INT32 lfobit[4];
-static INT16 backgroundwave[32] =
+static const INT16 backgroundwave[32] =
{
0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000,
0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000,
@@ -357,11 +357,11 @@ static void galaxian_sh_start(void)
sample_start_raw(CHANNEL_SHOOT,shootwave,SHOOT_LENGTH,SHOOT_RATE,1);
sample_set_volume(CHANNEL_LFO+0,0);
- sample_start_raw(CHANNEL_LFO+0,backgroundwave,sizeof(backgroundwave)/2,1000,1);
+ sample_start_raw(CHANNEL_LFO+0,backgroundwave,ARRAY_LENGTH(backgroundwave),1000,1);
sample_set_volume(CHANNEL_LFO+1,0);
- sample_start_raw(CHANNEL_LFO+1,backgroundwave,sizeof(backgroundwave)/2,1000,1);
+ sample_start_raw(CHANNEL_LFO+1,backgroundwave,ARRAY_LENGTH(backgroundwave),1000,1);
sample_set_volume(CHANNEL_LFO+2,0);
- sample_start_raw(CHANNEL_LFO+2,backgroundwave,sizeof(backgroundwave)/2,1000,1);
+ sample_start_raw(CHANNEL_LFO+2,backgroundwave,ARRAY_LENGTH(backgroundwave),1000,1);
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));
@@ -525,7 +525,7 @@ static TIMER_CALLBACK( galaxian_sh_update )
}
-struct Samplesinterface galaxian_samples_interface =
+const struct Samplesinterface galaxian_samples_interface =
{
5,
NULL,
diff --git a/src/mame/audio/gorf.c b/src/mame/audio/gorf.c
index c63cb150dd7..8752345777c 100644
--- a/src/mame/audio/gorf.c
+++ b/src/mame/audio/gorf.c
@@ -28,7 +28,7 @@ gorf_sh_ update- Null
* 64 Phonemes - currently 1 sample per phoneme, will be combined sometime!
****************************************************************************/
-static const char *PhonemeTable[65] =
+static const char *const PhonemeTable[65] =
{
"EH3","EH2","EH1","PA0","DT" ,"A1" ,"A2" ,"ZH",
"AH2","I3" ,"I2" ,"I1" ,"M" ,"N" ,"B" ,"V",
@@ -41,7 +41,7 @@ static const char *PhonemeTable[65] =
0
};
-static const char *GorfWordTable[] =
+static const char *const GorfWordTable[] =
{
"A2AYY1","A2E1","UH1GEH1I3N","AE1EH2M","AEM",
"AE1EH3ND","UH1NAH2I1YLA2SHUH2N","AH2NUHTHER","AH1NUHTHVRR",
@@ -78,7 +78,7 @@ static const char *GorfWordTable[] =
#define num_samples (sizeof(GorfWordTable)/sizeof(char *))
-const char *gorf_sample_names[] =
+const char *const gorf_sample_names[] =
{
"*gorf","a.wav","a.wav","again.wav","am.wav","am.wav","and.wav","anhilatn.wav",
"another.wav","another.wav","are.wav","are.wav",
diff --git a/src/mame/audio/gottlieb.c b/src/mame/audio/gottlieb.c
index 37b06994e66..b5b7ee22b41 100644
--- a/src/mame/audio/gottlieb.c
+++ b/src/mame/audio/gottlieb.c
@@ -103,7 +103,7 @@ static TIMER_CALLBACK( gottlieb_nmi_generate )
cpunum_set_input_line(1,INPUT_LINE_NMI,PULSE_LINE);
}
-static const char *PhonemeTable[65] =
+static const char *const PhonemeTable[65] =
{
"EH3","EH2","EH1","PA0","DT" ,"A1" ,"A2" ,"ZH",
"AH2","I3" ,"I2" ,"I1" ,"M" ,"N" ,"B" ,"V",
diff --git a/src/mame/audio/invinco.c b/src/mame/audio/invinco.c
index 459615f9434..efa3d124667 100644
--- a/src/mame/audio/invinco.c
+++ b/src/mame/audio/invinco.c
@@ -20,7 +20,7 @@
/* sample file names */
-static const char *invinco_sample_names[] =
+static const char *const invinco_sample_names[] =
{
"*invinco",
"saucer.wav",
@@ -35,7 +35,7 @@ static const char *invinco_sample_names[] =
};
-static struct Samplesinterface invinco_samples_interface =
+static const struct Samplesinterface invinco_samples_interface =
{
8,
invinco_sample_names
diff --git a/src/mame/audio/meadows.c b/src/mame/audio/meadows.c
index c6616eb2fd6..af241fc7337 100644
--- a/src/mame/audio/meadows.c
+++ b/src/mame/audio/meadows.c
@@ -32,7 +32,7 @@ static int dac_enable;
static int channel;
static int freq1 = 1000;
static int freq2 = 1000;
-static INT16 waveform[2] = { -120*256, 120*256 };
+static const INT16 waveform[2] = { -120*256, 120*256 };
/************************************/
/* Sound handler start */
@@ -44,9 +44,9 @@ void meadows_sh_start(void)
vol[0]=vol[1]=255;
sample_set_volume(0,0);
- sample_start_raw(0,waveform,sizeof(waveform)/2,freq1,1);
+ sample_start_raw(0,waveform,ARRAY_LENGTH(waveform),freq1,1);
sample_set_volume(1,0);
- sample_start_raw(1,waveform,sizeof(waveform)/2,freq2,1);
+ sample_start_raw(1,waveform,ARRAY_LENGTH(waveform),freq2,1);
}
/************************************/
diff --git a/src/mame/audio/mw8080bw.c b/src/mame/audio/mw8080bw.c
index 1f010dc7b5c..ced288fedac 100644
--- a/src/mame/audio/mw8080bw.c
+++ b/src/mame/audio/mw8080bw.c
@@ -115,7 +115,7 @@ static const discrete_lfsr_desc midway_lfsr =
*
*************************************/
-static const char *seawolf_sample_names[] =
+static const char *const seawolf_sample_names[] =
{
"*seawolf",
"shiphit.wav",
@@ -127,7 +127,7 @@ static const char *seawolf_sample_names[] =
};
-static struct Samplesinterface seawolf_samples_interface =
+static const struct Samplesinterface seawolf_samples_interface =
{
5, /* 5 channels */
seawolf_sample_names
@@ -178,7 +178,7 @@ WRITE8_HANDLER( seawolf_audio_w )
*
*************************************/
-static const char *gunfight_sample_names[] =
+static const char *const gunfight_sample_names[] =
{
"*gunfight",
"gunshot.wav",
@@ -187,7 +187,7 @@ static const char *gunfight_sample_names[] =
};
-static struct Samplesinterface gunfight_samples_interface =
+static const struct Samplesinterface gunfight_samples_interface =
{
1, /* 1 channel */
gunfight_sample_names
@@ -1597,7 +1597,7 @@ WRITE8_HANDLER( dplay_audio_w )
*
*************************************/
-static const char *gmissile_sample_names[] =
+static const char *const gmissile_sample_names[] =
{
"*gmissile",
"1.wav", /* missle */
@@ -1606,7 +1606,7 @@ static const char *gmissile_sample_names[] =
};
-static struct Samplesinterface gmissile_samples_interface =
+static const struct Samplesinterface gmissile_samples_interface =
{
1, /* 1 channel */
gmissile_sample_names
@@ -1695,7 +1695,7 @@ WRITE8_HANDLER( gmissile_audio_3_w )
/* Noise clock was breadboarded and measured at 3760Hz */
-static const char *m4_sample_names[] =
+static const char *const m4_sample_names[] =
{
"*m4",
"1.wav", /* missle */
@@ -1704,7 +1704,7 @@ static const char *m4_sample_names[] =
};
-static struct Samplesinterface m4_samples_interface =
+static const struct Samplesinterface m4_samples_interface =
{
2, /* 2 channels */
m4_sample_names
@@ -1985,14 +1985,14 @@ static DISCRETE_SOUND_START(clowns)
DISCRETE_SOUND_END
-static const char *clowns_sample_names[] =
+static const char *const clowns_sample_names[] =
{
"*clowns",
"miss.wav",
0
};
-static struct Samplesinterface clowns_samples_interface =
+static const struct Samplesinterface clowns_samples_interface =
{
1, /* 1 channel */
clowns_sample_names
@@ -2177,7 +2177,7 @@ WRITE8_HANDLER( dogpatch_audio_w )
* Apr 2007, D.R.
*************************************/
-static struct SN76477interface spcenctr_sn76477_interface =
+static const struct SN76477interface spcenctr_sn76477_interface =
{
0, /* 4 noise_res (N/C) */
0, /* 5 filter_res (N/C) */
@@ -2750,7 +2750,7 @@ WRITE8_HANDLER( spcenctr_audio_3_w )
*
*************************************/
-static const char *phantom2_sample_names[] =
+static const char *const phantom2_sample_names[] =
{
"*phantom2",
"1.wav", /* shot */
@@ -2759,7 +2759,7 @@ static const char *phantom2_sample_names[] =
};
-static struct Samplesinterface phantom2_samples_interface =
+static const struct Samplesinterface phantom2_samples_interface =
{
2, /* 2 channels */
phantom2_sample_names
@@ -2993,7 +2993,7 @@ WRITE8_HANDLER( bowler_audio_6_w )
*
*************************************/
-static struct SN76477interface invaders_sn76477_interface =
+static const struct SN76477interface invaders_sn76477_interface =
{
0, /* 4 noise_res (N/C) */
0, /* 5 filter_res (N/C) */
@@ -3022,7 +3022,7 @@ static struct SN76477interface invaders_sn76477_interface =
-static const char *invaders_sample_names[] =
+static const char *const invaders_sample_names[] =
{
"*invaders",
"1.wav", /* shot/missle */
@@ -3038,7 +3038,7 @@ static const char *invaders_sample_names[] =
};
-static struct Samplesinterface invaders_samples_interface =
+static const struct Samplesinterface invaders_samples_interface =
{
6, /* 6 channels */
invaders_sample_names
@@ -3816,7 +3816,7 @@ WRITE8_HANDLER( blueshrk_audio_w )
*
*************************************/
-static struct SN76477interface invad2ct_p1_sn76477_interface =
+static const struct SN76477interface invad2ct_p1_sn76477_interface =
{
0, /* 4 noise_res (N/C) */
0, /* 5 filter_res (N/C) */
@@ -3844,7 +3844,7 @@ static struct SN76477interface invad2ct_p1_sn76477_interface =
};
-static struct SN76477interface invad2ct_p2_sn76477_interface =
+static const struct SN76477interface invad2ct_p2_sn76477_interface =
{
0, /* 4 noise_res (N/C) */
0, /* 5 filter_res (N/C) */
diff --git a/src/mame/audio/n8080.c b/src/mame/audio/n8080.c
index 5e47f32140e..d8ff9474492 100644
--- a/src/mame/audio/n8080.c
+++ b/src/mame/audio/n8080.c
@@ -30,7 +30,7 @@ static int mono_flop[3];
-static struct SN76477interface sheriff_sn76477_interface =
+static const struct SN76477interface sheriff_sn76477_interface =
{
RES_K(36) , /* 04 */
RES_K(100) , /* 05 */
@@ -58,7 +58,7 @@ static struct SN76477interface sheriff_sn76477_interface =
};
-static struct SN76477interface spacefev_sn76477_interface =
+static const struct SN76477interface spacefev_sn76477_interface =
{
RES_K(36) , /* 04 */
RES_K(150) , /* 05 */
diff --git a/src/mame/audio/polyplay.c b/src/mame/audio/polyplay.c
index edaa1a812a4..b8c79b8b01a 100644
--- a/src/mame/audio/polyplay.c
+++ b/src/mame/audio/polyplay.c
@@ -50,7 +50,7 @@ void polyplay_play_channel1(int data)
if (data) {
freq1 = 2457600 / 16 / data / 8;
sample_set_volume(0, channel_playing1 * 1.0);
- sample_start_raw(0, backgroundwave, sizeof(backgroundwave)/2, sizeof(backgroundwave)*freq1,1);
+ sample_start_raw(0, backgroundwave, ARRAY_LENGTH(backgroundwave), sizeof(backgroundwave)*freq1,1);
}
else {
sample_stop(0);
@@ -63,7 +63,7 @@ void polyplay_play_channel2(int data)
if (data) {
freq2 = 2457600 / 16 / data / 8;
sample_set_volume(1, channel_playing2 * 1.0);
- sample_start_raw(1, backgroundwave, sizeof(backgroundwave)/2, sizeof(backgroundwave)*freq2,1);
+ sample_start_raw(1, backgroundwave, ARRAY_LENGTH(backgroundwave), sizeof(backgroundwave)*freq2,1);
}
else {
sample_stop(0);
diff --git a/src/mame/audio/pulsar.c b/src/mame/audio/pulsar.c
index 6d6551556d7..1748210f2fb 100644
--- a/src/mame/audio/pulsar.c
+++ b/src/mame/audio/pulsar.c
@@ -33,7 +33,7 @@
/* sample file names */
-static const char *pulsar_sample_names[] =
+static const char *const pulsar_sample_names[] =
{
"*pulsar",
"clang.wav",
@@ -52,7 +52,7 @@ static const char *pulsar_sample_names[] =
};
-static struct Samplesinterface pulsar_samples_interface =
+static const struct Samplesinterface pulsar_samples_interface =
{
12,
pulsar_sample_names
diff --git a/src/mame/audio/rockola.c b/src/mame/audio/rockola.c
index e051c639f08..1cc0988e4b7 100644
--- a/src/mame/audio/rockola.c
+++ b/src/mame/audio/rockola.c
@@ -50,7 +50,7 @@ static sound_stream * tone_stream;
static int Sound0StopOnRollover;
static UINT8 LastPort1;
-const char *sasuke_sample_names[] =
+const char *const sasuke_sample_names[] =
{
"*sasuke",
@@ -63,7 +63,7 @@ const char *sasuke_sample_names[] =
0
};
-const char *vanguard_sample_names[] =
+const char *const vanguard_sample_names[] =
{
"*vanguard",
@@ -92,7 +92,7 @@ const char *vanguard_sample_names[] =
0
};
-const char *fantasy_sample_names[] =
+const char *const fantasy_sample_names[] =
{
"*fantasy",
diff --git a/src/mame/audio/segag80r.c b/src/mame/audio/segag80r.c
index 6e5522a21cf..36dfd14a42e 100644
--- a/src/mame/audio/segag80r.c
+++ b/src/mame/audio/segag80r.c
@@ -173,7 +173,7 @@ static SOUND_START( astrob );
*/
-static const char *astrob_sample_names[] =
+static const char *const astrob_sample_names[] =
{
"*astrob",
"invadr1.wav", /* 0 */
@@ -196,7 +196,7 @@ static const char *astrob_sample_names[] =
};
-static struct Samplesinterface astrob_samples_interface =
+static const struct Samplesinterface astrob_samples_interface =
{
11,
astrob_sample_names
@@ -397,7 +397,7 @@ static TIMER_CALLBACK( sega005_auto_timer );
The 4391 output is the final output.
*/
-static const char *sega005_sample_names[] =
+static const char *const sega005_sample_names[] =
{
"*005",
"lexplode.wav", /* 0 */
@@ -411,7 +411,7 @@ static const char *sega005_sample_names[] =
};
-static struct Samplesinterface sega005_samples_interface =
+static const struct Samplesinterface sega005_samples_interface =
{
7,
sega005_sample_names
@@ -632,7 +632,7 @@ static TIMER_CALLBACK( sega005_auto_timer )
static SOUND_START( spaceod );
-static const char *spaceod_sample_names[] =
+static const char *const spaceod_sample_names[] =
{
"*spaceod",
"fire.wav", /* 0 */
@@ -650,7 +650,7 @@ static const char *spaceod_sample_names[] =
};
-static struct Samplesinterface spaceod_samples_interface =
+static const struct Samplesinterface spaceod_samples_interface =
{
11,
spaceod_sample_names
@@ -766,7 +766,7 @@ static READ8_HANDLER( n7751_t1_r );
*/
-static const char *monsterb_sample_names[] =
+static const char *const monsterb_sample_names[] =
{
"*monsterb",
"zap.wav",
@@ -775,7 +775,7 @@ static const char *monsterb_sample_names[] =
};
-static struct Samplesinterface monsterb_samples_interface =
+static const struct Samplesinterface monsterb_samples_interface =
{
2,
monsterb_sample_names
diff --git a/src/mame/audio/spacefb.c b/src/mame/audio/spacefb.c
index b75b9c95ea1..510b3dbc73d 100644
--- a/src/mame/audio/spacefb.c
+++ b/src/mame/audio/spacefb.c
@@ -66,7 +66,7 @@ WRITE8_HANDLER( spacefb_port_1_w )
}
-static const char *spacefb_sample_names[] =
+static const char *const spacefb_sample_names[] =
{
"*spacefb",
"ekilled.wav",
@@ -77,7 +77,7 @@ static const char *spacefb_sample_names[] =
};
-static struct Samplesinterface spacefb_samples_interface =
+static const struct Samplesinterface spacefb_samples_interface =
{
3,
spacefb_sample_names
diff --git a/src/mame/audio/targ.c b/src/mame/audio/targ.c
index 5d718d958cd..15f01fa7426 100644
--- a/src/mame/audio/targ.c
+++ b/src/mame/audio/targ.c
@@ -35,7 +35,7 @@ static UINT8 tone_prom[32] =
};
/* waveforms for the audio hardware */
-static INT16 waveform1[32] =
+static const INT16 waveform1[32] =
{
/* sine-wave */
0x0F0F, 0x0F0F, 0x0F0F, 0x0606, 0x0606, 0x0909, 0x0909, 0x0606, 0x0606, 0x0909, 0x0606, 0x0D0D, 0x0F0F, 0x0F0F, 0x0D0D, 0x0000,
diff --git a/src/mame/audio/triplhnt.c b/src/mame/audio/triplhnt.c
index eb0c6d7d50d..018d8ed0c2b 100644
--- a/src/mame/audio/triplhnt.c
+++ b/src/mame/audio/triplhnt.c
@@ -8,7 +8,7 @@
#include "sound/discrete.h"
-static const char *triplhnt_sample_names[] =
+static const char *const triplhnt_sample_names[] =
{
"*triplhnt",
"bear_rac.wav",
@@ -16,7 +16,7 @@ static const char *triplhnt_sample_names[] =
0
};
-struct Samplesinterface triplhnt_samples_interface =
+const struct Samplesinterface triplhnt_samples_interface =
{
2, /* 2 channels */
triplhnt_sample_names
diff --git a/src/mame/audio/turbo.c b/src/mame/audio/turbo.c
index 6faa460271d..d2b1a9fc35f 100644
--- a/src/mame/audio/turbo.c
+++ b/src/mame/audio/turbo.c
@@ -164,7 +164,7 @@ WRITE8_HANDLER( turbo_sound_c_w )
*
*************************************/
-static const char *turbo_sample_names[] =
+static const char *const turbo_sample_names[] =
{
"*turbo",
"01.wav", /* 0: Trig1 */
@@ -180,7 +180,7 @@ static const char *turbo_sample_names[] =
};
-static struct Samplesinterface turbo_samples_interface =
+static const struct Samplesinterface turbo_samples_interface =
{
10,
turbo_sample_names
@@ -418,7 +418,7 @@ WRITE8_HANDLER( subroc3d_sound_c_w )
*
*************************************/
-static const char *subroc3d_sample_names[] =
+static const char *const subroc3d_sample_names[] =
{
"*subroc3d",
"01.wav", /* 0: enemy missile */
@@ -436,7 +436,7 @@ static const char *subroc3d_sample_names[] =
};
-static struct Samplesinterface subroc3d_samples_interface =
+static const struct Samplesinterface subroc3d_samples_interface =
{
12,
subroc3d_sample_names
@@ -571,7 +571,7 @@ WRITE8_HANDLER( buckrog_sound_b_w )
*
*************************************/
-static const char *buckrog_sample_names[]=
+static const char *const buckrog_sample_names[]=
{
"*buckrog",
"alarm0.wav", /* 0 */
@@ -589,7 +589,7 @@ static const char *buckrog_sample_names[]=
};
-static struct Samplesinterface buckrog_samples_interface =
+static const struct Samplesinterface buckrog_samples_interface =
{
6, /* 6 channels */
buckrog_sample_names
diff --git a/src/mame/audio/vicdual.c b/src/mame/audio/vicdual.c
index 2635eb9aec7..2b04788da27 100644
--- a/src/mame/audio/vicdual.c
+++ b/src/mame/audio/vicdual.c
@@ -101,7 +101,7 @@ static DISCRETE_SOUND_START(frogs)
DISCRETE_SOUND_END
-static const char *frogs_sample_names[] =
+static const char *const frogs_sample_names[] =
{
"*frogs",
"boing.wav",
@@ -113,7 +113,7 @@ static const char *frogs_sample_names[] =
0
};
-static struct Samplesinterface frogs_samples_interface =
+static const struct Samplesinterface frogs_samples_interface =
{
5, /* 5 channels */
frogs_sample_names
diff --git a/src/mame/audio/wow.c b/src/mame/audio/wow.c
index f50d173a708..90963bab3fb 100644
--- a/src/mame/audio/wow.c
+++ b/src/mame/audio/wow.c
@@ -29,7 +29,7 @@ wow_sh_ update- Null
* 64 Phonemes - currently 1 sample per phoneme, will be combined sometime!
****************************************************************************/
-static const char *PhonemeTable[65] =
+static const char *const PhonemeTable[65] =
{
"EH3","EH2","EH1","PA0","DT" ,"A1" ,"A2" ,"ZH",
"AH2","I3" ,"I2" ,"I1" ,"M" ,"N" ,"B" ,"V",
@@ -48,7 +48,7 @@ static const char *PhonemeTable[65] =
doom.wav pop.wav
Problems with YOU and YOU'LL and YOU'DD */
-static const char *wowWordTable[] =
+static const char *const wowWordTable[] =
{
"AH1I3Y1", "UH1GA1EH1N", "AHAH2", "AE1EH3M", "AE1EH3ND",
"anew.wav", "AH1NUHTHER", "AE1NY", "anyone.wav", "appear.wav", "AH1UH3R", "UHR", "BABYY1S", "BAE1EH3K",
@@ -75,7 +75,7 @@ static const char *wowWordTable[] =
#define num_samples (sizeof(wowWordTable)/sizeof(char *))
-const char *wow_sample_names[] =
+const char *const wow_sample_names[] =
{
"*wow",
"a.wav", "again.wav", "ahh.wav", "am.wav", "and.wav",
diff --git a/src/mame/audio/zaxxon.c b/src/mame/audio/zaxxon.c
index c76886ad20b..0851cbe462f 100644
--- a/src/mame/audio/zaxxon.c
+++ b/src/mame/audio/zaxxon.c
@@ -81,7 +81,7 @@ static UINT8 sound_state[3];
*
*************************************/
-static const char *zaxxon_sample_names[] =
+static const char *const zaxxon_sample_names[] =
{
"*zaxxon",
"03.wav", /* 0 - Homing Missile */
@@ -100,7 +100,7 @@ static const char *zaxxon_sample_names[] =
};
-static struct Samplesinterface zaxxon_samples_interface =
+static const struct Samplesinterface zaxxon_samples_interface =
{
12,
zaxxon_sample_names
@@ -194,7 +194,7 @@ WRITE8_HANDLER( zaxxon_sound_c_w )
*
*************************************/
-static const char *congo_sample_names[] =
+static const char *const congo_sample_names[] =
{
"*congo",
"gorilla.wav", /* 0 */
@@ -206,7 +206,7 @@ static const char *congo_sample_names[] =
};
-static struct Samplesinterface congo_samples_interface =
+static const struct Samplesinterface congo_samples_interface =
{
5, /* 5 channels */
congo_sample_names
diff --git a/src/mame/drivers/20pacgal.c b/src/mame/drivers/20pacgal.c
index 9a2fb76115c..b0fd88d3239 100644
--- a/src/mame/drivers/20pacgal.c
+++ b/src/mame/drivers/20pacgal.c
@@ -56,7 +56,7 @@ VIDEO_UPDATE( 20pacgal );
-static struct EEPROM_interface eeprom_interface =
+static const struct EEPROM_interface eeprom_interface =
{
7, /* address bits */
8, /* data bits */
diff --git a/src/mame/drivers/ashnojoe.c b/src/mame/drivers/ashnojoe.c
index 93dbf88b9ba..2d80c6c823f 100644
--- a/src/mame/drivers/ashnojoe.c
+++ b/src/mame/drivers/ashnojoe.c
@@ -1,6 +1,6 @@
/***************************************************************************
-Ashita no Joe (Success Joe) [Wave]
+ Success Joe / Ashita no Joe [Wave]
driver by David Haywood and bits from Pierpaolo Prazzoli
@@ -9,9 +9,14 @@ todo:
- frequencies
- 1 unused rom
-there is an english logo in the roms, needs different program roms?
+Upper board marked: W9011
-Tow sub-boards:
+Sticker on the upper pcb of Success Joe (World) labelled:
+M6100506A
+SUCCESS JOE
+900110149
+
+Two sub-boards:
Upper:
@@ -29,6 +34,8 @@ Upper:
GFX?
Mask ROMs 401, 402 & 403 (Hitachi HN62414 Mask ROMs)
+ Note: the pcb has a place for a battery circuit but the components are not soldered.
+
Lower:
GFX?
@@ -382,41 +389,80 @@ static MACHINE_DRIVER_START( ashnojoe )
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_DRIVER_END
+ROM_START( scessjoe )
+ ROM_REGION( 0xc0000, REGION_CPU1, 0 ) /* 68000 code */
+ ROM_LOAD16_BYTE( "5.4q", 0x00000, 0x10000, CRC(c805f9e7) SHA1(e1e85701bde496b1fd64211b94bfb0def597ae51) )
+ ROM_LOAD16_BYTE( "6.4s", 0x00001, 0x10000, CRC(eda7a537) SHA1(3bb19fbdfb6c8af4e2078958fa445ac1f4434d0d) )
+ ROM_LOAD16_WORD_SWAP( "sj201-nw.6m", 0x80000, 0x40000, CRC(5a64ca42) SHA1(660b8bca21ef3c2230adce7cb7e7d1f018714f23) )
+
+ ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* 32k for Z80 code */
+ ROM_LOAD( "9.8q", 0x0000, 0x8000, CRC(8767e212) SHA1(13bf927febedff9d7d164fbf0da7fb3a588c2a94) )
+
+ ROM_REGION( 0x20000, REGION_GFX1, ROMREGION_DISPOSE )
+ ROM_LOAD( "8.5e", 0x00000, 0x10000, CRC(9bcb160e) SHA1(1677048e5ce26562ff7ba36fcc2d0ed5a652b91e) )
+ ROM_LOAD( "7.5c", 0x10000, 0x10000, CRC(b250c69d) SHA1(594b1bb94a162b07944a971b7fedddca5c37f2cb) )
+
+ ROM_REGION( 0x20000, REGION_GFX2, ROMREGION_DISPOSE )
+ ROM_LOAD( "4.4e", 0x00000, 0x10000, CRC(aa6336d3) SHA1(43f70cc3223f11d7929dd44b0edf0a31f5fe41c3) )
+ ROM_LOAD( "3.4c", 0x10000, 0x10000, CRC(7e2d86b5) SHA1(8b8d1b9240a700e29afc109eddf6e58a0a7666a4) )
+
+ ROM_REGION( 0x20000, REGION_GFX3, ROMREGION_DISPOSE )
+ ROM_LOAD( "2.3m", 0x00000, 0x10000, CRC(c3254938) SHA1(fd57163f740cd4fdecca94cced91314c289741ae) )
+ ROM_LOAD( "1.1m", 0x10000, 0x10000, CRC(5d16a6fa) SHA1(2af907b0fcb9ff93340de3301da4b10e945455e5) )
+
+ ROM_REGION( 0x100000, REGION_GFX4, ROMREGION_DISPOSE )
+ ROM_LOAD16_WORD_SWAP( "sj402-nw.8e", 0x000000, 0x80000, CRC(b6d33d06) SHA1(688ccf467a5112ec522811894e2626ab5f155903) )
+ ROM_LOAD16_WORD_SWAP( "sj403-nw.7e", 0x080000, 0x80000, CRC(07143f56) SHA1(1b953c8826d3993a486eed6b9d94d37145fd2e79) )
+
+ ROM_REGION( 0x300000, REGION_GFX5, ROMREGION_DISPOSE )
+ ROM_LOAD16_WORD_SWAP( "sj404-nw.7a", 0x000000, 0x80000, CRC(8f134128) SHA1(026a6076d54cd5f1d06b29c51031cb79a6b2c11d) )
+ ROM_LOAD16_WORD_SWAP( "sj405-nw.7c", 0x080000, 0x80000, CRC(6fd81699) SHA1(8a4f9e47dd39b4b0213c3682da2221ca53bba658) )
+ ROM_LOAD16_WORD_SWAP( "sj406-nw.7d", 0x100000, 0x80000, CRC(634e33e6) SHA1(1d6a72a4ca80cd1c1fd6ce9359c304b45091cdfe) )
+ ROM_LOAD16_WORD_SWAP( "sj407-nw.7f", 0x180000, 0x80000, CRC(5c66ff06) SHA1(9923ba00679e1b47b5da63c1a13e0f8dd4c78bb5) )
+ ROM_LOAD16_WORD_SWAP( "sj408-nw.7g", 0x200000, 0x80000, CRC(6a3b1ea1) SHA1(e39a6e52d930f291bf237cf9db3d4b3d2fad53e0) )
+ ROM_LOAD16_WORD_SWAP( "sj409-nw.7j", 0x280000, 0x80000, CRC(d8764213) SHA1(89eadefb956863216c8e3d0380394aba35e8c856) )
+
+ ROM_REGION( 0x80000, REGION_SOUND1, 0 ) /* samples? */
+ ROM_LOAD( "sj401-nw.10r", 0x00000, 0x80000, CRC(25dfab59) SHA1(7d50159204ba05323a2442778f35192e66117dda) )
+ROM_END
+
ROM_START( ashnojoe )
ROM_REGION( 0xc0000, REGION_CPU1, 0 ) /* 68000 code */
ROM_LOAD16_BYTE( "5.bin", 0x00000, 0x10000, CRC(c61e1569) SHA1(422c18f5810539b5a9e3a9bd4e3b4d70bde8d1d5) )
ROM_LOAD16_BYTE( "6.bin", 0x00001, 0x10000, CRC(c0a16338) SHA1(fb127b9d38f2c9807b6e23ff71935fc8a22a2e8f) )
- ROM_LOAD16_WORD_SWAP( "sj201-nw.bin", 0x80000, 0x40000, CRC(5a64ca42) SHA1(660b8bca21ef3c2230adce7cb7e7d1f018714f23) )
+ ROM_LOAD16_WORD_SWAP( "sj201-nw.6m", 0x80000, 0x40000, CRC(5a64ca42) SHA1(660b8bca21ef3c2230adce7cb7e7d1f018714f23) )
ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* 32k for Z80 code */
- ROM_LOAD( "9.bin", 0x0000, 0x8000, CRC(8767e212) SHA1(13bf927febedff9d7d164fbf0da7fb3a588c2a94) )
+ ROM_LOAD( "9.8q", 0x0000, 0x8000, CRC(8767e212) SHA1(13bf927febedff9d7d164fbf0da7fb3a588c2a94) )
ROM_REGION( 0x20000, REGION_GFX1, ROMREGION_DISPOSE )
- ROM_LOAD( "8.bin", 0x00000, 0x10000, CRC(9bcb160e) SHA1(1677048e5ce26562ff7ba36fcc2d0ed5a652b91e) )
+ ROM_LOAD( "8.5e", 0x00000, 0x10000, CRC(9bcb160e) SHA1(1677048e5ce26562ff7ba36fcc2d0ed5a652b91e) )
ROM_LOAD( "7.bin", 0x10000, 0x10000, CRC(7e1efc42) SHA1(e3c282072fdaa0b98c2a1bf25fd02c680d9ca4d7) )
ROM_REGION( 0x20000, REGION_GFX2, ROMREGION_DISPOSE )
- ROM_LOAD( "4.bin", 0x00000, 0x10000, CRC(aa6336d3) SHA1(43f70cc3223f11d7929dd44b0edf0a31f5fe41c3) )
- ROM_LOAD( "3.bin", 0x10000, 0x10000, CRC(7e2d86b5) SHA1(8b8d1b9240a700e29afc109eddf6e58a0a7666a4) )
+ ROM_LOAD( "4.4e", 0x00000, 0x10000, CRC(aa6336d3) SHA1(43f70cc3223f11d7929dd44b0edf0a31f5fe41c3) )
+ ROM_LOAD( "3.4c", 0x10000, 0x10000, CRC(7e2d86b5) SHA1(8b8d1b9240a700e29afc109eddf6e58a0a7666a4) )
ROM_REGION( 0x20000, REGION_GFX3, ROMREGION_DISPOSE )
- ROM_LOAD( "2.bin", 0x00000, 0x10000, CRC(c3254938) SHA1(fd57163f740cd4fdecca94cced91314c289741ae) )
+ ROM_LOAD( "2.3m", 0x00000, 0x10000, CRC(c3254938) SHA1(fd57163f740cd4fdecca94cced91314c289741ae) )
ROM_LOAD( "1.bin", 0x10000, 0x10000, CRC(1bf585f0) SHA1(4003941636e7fded95e880109c3c9dd1d8f28b07) )
ROM_REGION( 0x100000, REGION_GFX4, ROMREGION_DISPOSE )
- ROM_LOAD16_WORD_SWAP( "sj402-nw.bin", 0x000000, 0x80000, CRC(b6d33d06) SHA1(688ccf467a5112ec522811894e2626ab5f155903) )
- ROM_LOAD16_WORD_SWAP( "sj403-nw.bin", 0x080000, 0x80000, CRC(07143f56) SHA1(1b953c8826d3993a486eed6b9d94d37145fd2e79) )
+ ROM_LOAD16_WORD_SWAP( "sj402-nw.8e", 0x000000, 0x80000, CRC(b6d33d06) SHA1(688ccf467a5112ec522811894e2626ab5f155903) )
+ ROM_LOAD16_WORD_SWAP( "sj403-nw.7e", 0x080000, 0x80000, CRC(07143f56) SHA1(1b953c8826d3993a486eed6b9d94d37145fd2e79) )
ROM_REGION( 0x300000, REGION_GFX5, ROMREGION_DISPOSE )
- ROM_LOAD16_WORD_SWAP( "sj404-nw.bin", 0x000000, 0x80000, CRC(8f134128) SHA1(026a6076d54cd5f1d06b29c51031cb79a6b2c11d) )
- ROM_LOAD16_WORD_SWAP( "sj405-nw.bin", 0x080000, 0x80000, CRC(6fd81699) SHA1(8a4f9e47dd39b4b0213c3682da2221ca53bba658) )
- ROM_LOAD16_WORD_SWAP( "sj406-nw.bin", 0x100000, 0x80000, CRC(634e33e6) SHA1(1d6a72a4ca80cd1c1fd6ce9359c304b45091cdfe) )
- ROM_LOAD16_WORD_SWAP( "sj407-nw.bin", 0x180000, 0x80000, CRC(5c66ff06) SHA1(9923ba00679e1b47b5da63c1a13e0f8dd4c78bb5) )
- ROM_LOAD16_WORD_SWAP( "sj408-nw.bin", 0x200000, 0x80000, CRC(6a3b1ea1) SHA1(e39a6e52d930f291bf237cf9db3d4b3d2fad53e0) )
- ROM_LOAD16_WORD_SWAP( "sj409-nw.bin", 0x280000, 0x80000, CRC(d8764213) SHA1(89eadefb956863216c8e3d0380394aba35e8c856) )
+ ROM_LOAD16_WORD_SWAP( "sj404-nw.7a", 0x000000, 0x80000, CRC(8f134128) SHA1(026a6076d54cd5f1d06b29c51031cb79a6b2c11d) )
+ ROM_LOAD16_WORD_SWAP( "sj405-nw.7c", 0x080000, 0x80000, CRC(6fd81699) SHA1(8a4f9e47dd39b4b0213c3682da2221ca53bba658) )
+ ROM_LOAD16_WORD_SWAP( "sj406-nw.7d", 0x100000, 0x80000, CRC(634e33e6) SHA1(1d6a72a4ca80cd1c1fd6ce9359c304b45091cdfe) )
+ ROM_LOAD16_WORD_SWAP( "sj407-nw.7f", 0x180000, 0x80000, CRC(5c66ff06) SHA1(9923ba00679e1b47b5da63c1a13e0f8dd4c78bb5) )
+ ROM_LOAD16_WORD_SWAP( "sj408-nw.7g", 0x200000, 0x80000, CRC(6a3b1ea1) SHA1(e39a6e52d930f291bf237cf9db3d4b3d2fad53e0) )
+ ROM_LOAD16_WORD_SWAP( "sj409-nw.7j", 0x280000, 0x80000, CRC(d8764213) SHA1(89eadefb956863216c8e3d0380394aba35e8c856) )
ROM_REGION( 0x80000, REGION_SOUND1, 0 ) /* samples? */
- ROM_LOAD( "sj401-nw.bin", 0x00000, 0x80000, CRC(25dfab59) SHA1(7d50159204ba05323a2442778f35192e66117dda) )
+ ROM_LOAD( "sj401-nw.10r", 0x00000, 0x80000, CRC(25dfab59) SHA1(7d50159204ba05323a2442778f35192e66117dda) )
ROM_END
-GAME( 1990, ashnojoe, 0, ashnojoe, ashnojoe, ashnojoe, ROT0, "WAVE / Taito Corporation", "Ashita no Joe (Japan)", GAME_IMPERFECT_SOUND )
+GAME( 1990, scessjoe, 0, ashnojoe, ashnojoe, ashnojoe, ROT0, "WAVE / Taito Corporation", "Success Joe (World)", GAME_IMPERFECT_SOUND )
+GAME( 1990, ashnojoe, scessjoe, ashnojoe, ashnojoe, ashnojoe, ROT0, "WAVE / Taito Corporation", "Ashita no Joe (Japan)", GAME_IMPERFECT_SOUND )
+
diff --git a/src/mame/drivers/asterix.c b/src/mame/drivers/asterix.c
index ad1c361a15d..55dfa52dcdf 100644
--- a/src/mame/drivers/asterix.c
+++ b/src/mame/drivers/asterix.c
@@ -23,7 +23,7 @@ WRITE16_HANDLER( asterix_spritebank_w );
static UINT8 cur_control2;
static int init_eeprom_count;
-static struct EEPROM_interface eeprom_interface =
+static const struct EEPROM_interface eeprom_interface =
{
7, /* address bits */
8, /* data bits */
diff --git a/src/mame/drivers/asteroid.c b/src/mame/drivers/asteroid.c
index 762bbd8860d..270fe202335 100644
--- a/src/mame/drivers/asteroid.c
+++ b/src/mame/drivers/asteroid.c
@@ -639,7 +639,7 @@ static MACHINE_DRIVER_START( asteroid )
MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_VECTOR )
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB15)
MDRV_SCREEN_SIZE(400,300)
- MDRV_SCREEN_VISIBLE_AREA(0, 1044, 0, 800)
+ MDRV_SCREEN_VISIBLE_AREA(522, 1566, 394, 1182)
MDRV_PALETTE_LENGTH(32768)
MDRV_VIDEO_START(dvg)
@@ -693,7 +693,7 @@ static MACHINE_DRIVER_START( llander )
MDRV_SCREEN_REFRESH_RATE(40)
MDRV_MACHINE_RESET(avgdvg)
- MDRV_SCREEN_VISIBLE_AREA(0, 1023, 0, 1023)
+ MDRV_SCREEN_VISIBLE_AREA(522, 1566, 270, 1070)
MDRV_VIDEO_START(dvg)
MDRV_VIDEO_UPDATE(vector)
diff --git a/src/mame/drivers/astrocde.c b/src/mame/drivers/astrocde.c
index 2fb40ff5418..a76bb77e255 100644
--- a/src/mame/drivers/astrocde.c
+++ b/src/mame/drivers/astrocde.c
@@ -1189,7 +1189,7 @@ INPUT_PORTS_END
*
*************************************/
-static const char *seawolf_sample_names[] =
+static const char *const seawolf_sample_names[] =
{
"*seawolf",
"shiphit.wav",
@@ -1200,19 +1200,19 @@ static const char *seawolf_sample_names[] =
0
};
-static struct Samplesinterface seawolf2_samples_interface =
+static const struct Samplesinterface seawolf2_samples_interface =
{
10, /* 5*2 channels */
seawolf_sample_names
};
-static struct Samplesinterface wow_samples_interface =
+static const struct Samplesinterface wow_samples_interface =
{
1,
wow_sample_names
};
-static struct Samplesinterface gorf_samples_interface =
+static const struct Samplesinterface gorf_samples_interface =
{
1,
gorf_sample_names
diff --git a/src/mame/drivers/bfcobra.c b/src/mame/drivers/bfcobra.c
index 0b286bcf7be..2d25a14025f 100644
--- a/src/mame/drivers/bfcobra.c
+++ b/src/mame/drivers/bfcobra.c
@@ -67,11 +67,12 @@
* escounts: Colours are completely wrong. Is there a palette register
somewhere that affects blitter/video output?
* qos: Game clock and score dividers aren't drawn (needs line draw mode)
-
+ * all games bar qos: NVRAM not saved.
******************************************************************************/
#include "driver.h"
#include "debugger.h"
#include "machine/6850acia.h"
+#include "machine/meters.h"
#include "cpu/z80/z80.h"
#include "cpu/m6809/m6809.h"
#include "sound/upd7759.h"
@@ -1134,10 +1135,12 @@ static READ8_HANDLER( meter_r )
return meter_latch;
}
-/* TODO */
+/* TODO: This is borrowed from Scorpion 1 */
static WRITE8_HANDLER( meter_w )
{
- //int changed = meter_latch ^ data;
+ int i;
+ int changed = meter_latch ^ data;
+ long cycles = ATTOTIME_TO_CYCLES(0, timer_get_time() );
meter_latch = data;
@@ -1145,10 +1148,15 @@ static WRITE8_HANDLER( meter_w )
When a meter is triggered, the current drawn is sensed. If a meter
is connected, the /FIRQ line will be pulsed.
*/
- if ( data )
- {
- cpunum_set_input_line(1, M6809_FIRQ_LINE, PULSE_LINE );
- }
+
+ for (i = 0; i<8; i++)
+ {
+ if ( changed & (1 << i) )
+ {
+ Mechmtr_update(i, cycles, data & (1 << i) );
+ cpunum_set_input_line(1, M6809_FIRQ_LINE, PULSE_LINE );
+ }
+ }
}
/* TODO */
@@ -1227,14 +1235,14 @@ static ADDRESS_MAP_START( m6809_prog_map, ADDRESS_SPACE_PROGRAM, 8 )
ADDRESS_MAP_END
static INPUT_PORTS_START( bfcobra )
-PORT_START_TAG("STROBE0")
+ PORT_START_TAG("STROBE0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_NAME("Coin: 10p")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_NAME("Coin: 20p")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 ) PORT_NAME("Coin: 50p")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN4 ) PORT_NAME("Coin: 1 pound")
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Green Test?") PORT_CODE(KEYCODE_F1)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Red Test?")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START_TAG("STROBE1")
@@ -1258,8 +1266,8 @@ PORT_START_TAG("STROBE0")
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START_TAG("STROBE3")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Cash box door") PORT_CODE(KEYCODE_Y) PORT_TOGGLE
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Unknown (resets)") PORT_CODE(KEYCODE_T) PORT_TOGGLE
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_INTERLOCK) PORT_NAME("Cash box door") PORT_CODE(KEYCODE_Y) PORT_TOGGLE
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Front Door? (resets)") PORT_CODE(KEYCODE_T) PORT_TOGGLE
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Refill Key") PORT_CODE(KEYCODE_R) PORT_TOGGLE
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
diff --git a/src/mame/drivers/bmcbowl.c b/src/mame/drivers/bmcbowl.c
index f01b4dd89ff..63d4abd7701 100644
--- a/src/mame/drivers/bmcbowl.c
+++ b/src/mame/drivers/bmcbowl.c
@@ -252,7 +252,8 @@ static void via_irq(int state)
// 'working' NVRAM
-static int bmc_nv1[]=
+#ifdef NVRAM_HACK
+static const UINT8 bmc_nv1[]=
{
0x00,0x00,0x55,0x55,0x00,0x00,0x55,0x55,0x00,0x00,0x55,0x55,0x00,0x00,0x55,0x55,0x13,0x88,0x46,0xDD,0x0F,0xA0,
0x5A,0xF5,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x6E,0x55,
@@ -270,31 +271,29 @@ static int bmc_nv1[]=
0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x96,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0xDC,0x00,0xFF,0xFF,0xFF,0xFF,-1
+ 0x00,0x00,0xDC,0x00,0xFF,0xFF,0xFF,0xFF
};
-static int bmc_nv2[]=
+static const UINT8 bmc_nv2[]=
{
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x03,0x00,0x09,0x00,0x00,0x2B,0xF1,
- 0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,-1
+ 0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
};
-static int bmc_nv3[]=
+static const UINT8 bmc_nv3[]=
{
- 0xFA,0xFF,0x01,0x02,0x04,0x0A,0x1E,0xC8,0x02,0x01,0xFF,0xFF,0xFF,0xFF,0xFF,-1
+ 0xFA,0xFF,0x01,0x02,0x04,0x0A,0x1E,0xC8,0x02,0x01,0xFF,0xFF,0xFF,0xFF,0xFF
};
-static void init_stats(int *table , int address)
+static void init_stats(const UINT8 *table, int table_len, int address)
{
- while(*table>=0)
- {
- stats_ram[address]=*table;
- address+=2;
- table++;
- }
+ int i;
+ for (i=0; i<table_len; i++)
+ stats_ram[address+2*i]=table[i];
}
+#endif
static NVRAM_HANDLER( bmcbowl )
{
@@ -306,12 +305,11 @@ static NVRAM_HANDLER( bmcbowl )
#ifdef NVRAM_HACK
for (i = 0; i < stats_ram_size; i++)
- {
- stats_ram[i] = 0xff;
- init_stats(bmc_nv1,0);
- init_stats(bmc_nv2,0x3b0);
- init_stats(bmc_nv3,0xfe2);
- }
+ stats_ram[i] = 0xff;
+
+ init_stats(bmc_nv1,ARRAY_LENGTH(bmc_nv1),0);
+ init_stats(bmc_nv2,ARRAY_LENGTH(bmc_nv2),0x3b0);
+ init_stats(bmc_nv3,ARRAY_LENGTH(bmc_nv3),0xfe2);
#else
if (file)
mame_fread(file, stats_ram, stats_ram_size);
diff --git a/src/mame/drivers/cave.c b/src/mame/drivers/cave.c
index 8424bceacee..6c50f9990e4 100644
--- a/src/mame/drivers/cave.c
+++ b/src/mame/drivers/cave.c
@@ -292,19 +292,19 @@ static READ16_HANDLER( cave_sound_r )
***************************************************************************/
-static UINT8 cave_default_eeprom_type1[16] = {0x00,0x0C,0x11,0x0D,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x11,0x11,0xFF,0xFF,0xFF,0xFF}; /* DFeveron, Guwange */
-static UINT8 cave_default_eeprom_type1feversos[18] = {0x00,0x0C,0x16,0x27,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x11,0x11,0xFF,0xFF,0xFF,0xFF,0x05,0x19}; /* Fever SOS (code checks for the 0x0519 or it won't boot) */
-static UINT8 cave_default_eeprom_type2[16] = {0x00,0x0C,0xFF,0xFB,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}; /* Esprade, DonPachi, DDonPachi */
-static UINT8 cave_default_eeprom_type3[16] = {0x00,0x03,0x08,0x00,0xFF,0xFF,0xFF,0xFF,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF}; /* UoPoko */
-static UINT8 cave_default_eeprom_type4[16] = {0xF3,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}; /* Hotdog Storm */
-static UINT8 cave_default_eeprom_type5[16] = {0xED,0xFF,0x00,0x00,0x12,0x31,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; /* Mazinger Z (6th byte is country code) */
-static UINT8 cave_default_eeprom_type6[18] = {0xa5,0x00,0xa5,0x00,0xa5,0x00,0xa5,0x00,0xa5,0x01,0xa5,0x01,0xa5,0x04,0xa5,0x01,0xa5,0x02}; /* Sailor Moon (last byte is country code) */
+static const UINT8 cave_default_eeprom_type1[16] = {0x00,0x0C,0x11,0x0D,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x11,0x11,0xFF,0xFF,0xFF,0xFF}; /* DFeveron, Guwange */
+static const UINT8 cave_default_eeprom_type1feversos[18] = {0x00,0x0C,0x16,0x27,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x11,0x11,0xFF,0xFF,0xFF,0xFF,0x05,0x19}; /* Fever SOS (code checks for the 0x0519 or it won't boot) */
+static const UINT8 cave_default_eeprom_type2[16] = {0x00,0x0C,0xFF,0xFB,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}; /* Esprade, DonPachi, DDonPachi */
+static const UINT8 cave_default_eeprom_type3[16] = {0x00,0x03,0x08,0x00,0xFF,0xFF,0xFF,0xFF,0x08,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF}; /* UoPoko */
+static const UINT8 cave_default_eeprom_type4[16] = {0xF3,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}; /* Hotdog Storm */
+static const UINT8 cave_default_eeprom_type5[16] = {0xED,0xFF,0x00,0x00,0x12,0x31,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; /* Mazinger Z (6th byte is country code) */
+static const UINT8 cave_default_eeprom_type6[18] = {0xa5,0x00,0xa5,0x00,0xa5,0x00,0xa5,0x00,0xa5,0x01,0xa5,0x01,0xa5,0x04,0xa5,0x01,0xa5,0x02}; /* Sailor Moon (last byte is country code) */
// Air Gallet. Byte 1f is the country code (0==JAPAN,U.S.A,EUROPE,HONGKONG,TAIWAN,KOREA)
-static UINT8 cave_default_eeprom_type7[48] = {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+static const UINT8 cave_default_eeprom_type7[48] = {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff};
-static UINT8 *cave_default_eeprom;
+static const UINT8 *cave_default_eeprom;
static int cave_default_eeprom_length;
static int cave_region_byte;
diff --git a/src/mame/drivers/cbasebal.c b/src/mame/drivers/cbasebal.c
index dd2d4a32269..86d5ee179f5 100644
--- a/src/mame/drivers/cbasebal.c
+++ b/src/mame/drivers/cbasebal.c
@@ -93,7 +93,7 @@ static WRITE8_HANDLER( cbasebal_coinctrl_w )
***************************************************************************/
-static struct EEPROM_interface eeprom_interface =
+static const struct EEPROM_interface eeprom_interface =
{
6, /* address bits */
16, /* data bits */
diff --git a/src/mame/drivers/clayshoo.c b/src/mame/drivers/clayshoo.c
index b76623274ab..2c5fb6c37fb 100644
--- a/src/mame/drivers/clayshoo.c
+++ b/src/mame/drivers/clayshoo.c
@@ -132,7 +132,7 @@ static void create_analog_timers(void)
*
*************************************/
-static ppi8255_interface ppi8255_intf =
+static const ppi8255_interface ppi8255_intf =
{
2, /* 2 chips */
{ 0, 0 }, /* Port A read */
diff --git a/src/mame/drivers/cosmic.c b/src/mame/drivers/cosmic.c
index ef8fdf59884..16e19b77c09 100644
--- a/src/mame/drivers/cosmic.c
+++ b/src/mame/drivers/cosmic.c
@@ -944,7 +944,7 @@ static GFXDECODE_START( cosmica )
GFXDECODE_END
-static const char *panic_sample_names[] =
+static const char *const panic_sample_names[] =
{
"*panic",
"walk.wav",
@@ -961,13 +961,13 @@ static const char *panic_sample_names[] =
0
};
-static struct Samplesinterface panic_samples_interface =
+static const struct Samplesinterface panic_samples_interface =
{
9, /* 9 channels */
panic_sample_names
};
-static const char *cosmicg_sample_names[] =
+static const char *const cosmicg_sample_names[] =
{
"*cosmicg",
"cg_m0.wav", /* 8 Different pitches of March Sound */
@@ -988,7 +988,7 @@ static const char *cosmicg_sample_names[] =
0
};
-static struct Samplesinterface cosmicg_samples_interface =
+static const struct Samplesinterface cosmicg_samples_interface =
{
9, /* 9 channels */
cosmicg_sample_names
diff --git a/src/mame/drivers/couple.c b/src/mame/drivers/couple.c
index 0cad02ba5fd..4079e5861c8 100644
--- a/src/mame/drivers/couple.c
+++ b/src/mame/drivers/couple.c
@@ -125,7 +125,7 @@ static struct AY8910interface ay8910_interface =
};
#endif
-static ppi8255_interface ppi8255_intf =
+static const ppi8255_interface ppi8255_intf =
{
2,
{ input_port_0_r, input_port_1_r }, /* Port A read */
diff --git a/src/mame/drivers/cps1.c b/src/mame/drivers/cps1.c
index ffa77dcc61a..a1be3a62d1e 100644
--- a/src/mame/drivers/cps1.c
+++ b/src/mame/drivers/cps1.c
@@ -381,7 +381,7 @@ static WRITE8_HANDLER( qsound_banksw_w )
********************************************************************/
#ifndef MESS
-static struct EEPROM_interface qsound_eeprom_interface =
+static const struct EEPROM_interface qsound_eeprom_interface =
{
7, /* address bits */
8, /* data bits */
@@ -390,7 +390,7 @@ static struct EEPROM_interface qsound_eeprom_interface =
"0111" /* erase command */
};
-static struct EEPROM_interface pang3_eeprom_interface =
+static const struct EEPROM_interface pang3_eeprom_interface =
{
6, /* address bits */
16, /* data bits */
diff --git a/src/mame/drivers/cps2.c b/src/mame/drivers/cps2.c
index 0d3238ab37c..7f8e0538b82 100644
--- a/src/mame/drivers/cps2.c
+++ b/src/mame/drivers/cps2.c
@@ -634,7 +634,7 @@ static INTERRUPT_GEN( cps2_interrupt )
-static struct EEPROM_interface cps2_eeprom_interface =
+static const struct EEPROM_interface cps2_eeprom_interface =
{
6, /* address bits */
16, /* data bits */
diff --git a/src/mame/drivers/crbaloon.c b/src/mame/drivers/crbaloon.c
index 5d19aabd8e1..a4ad76506ea 100644
--- a/src/mame/drivers/crbaloon.c
+++ b/src/mame/drivers/crbaloon.c
@@ -306,7 +306,7 @@ static GFXDECODE_START( crbaloon )
GFXDECODE_END
-static struct SN76477interface sn76477_interface =
+static const struct SN76477interface sn76477_interface =
{
RES_K( 47), /* 4 noise_res */
RES_K(330), /* 5 filter_res */
diff --git a/src/mame/drivers/darkhors.c b/src/mame/drivers/darkhors.c
index 0ce924c8de4..84ec4a28547 100644
--- a/src/mame/drivers/darkhors.c
+++ b/src/mame/drivers/darkhors.c
@@ -197,7 +197,7 @@ static VIDEO_UPDATE( darkhors )
***************************************************************************/
-static struct EEPROM_interface eeprom_interface =
+static const struct EEPROM_interface eeprom_interface =
{
7, // address bits 7
8, // data bits 8
diff --git a/src/mame/drivers/deco32.c b/src/mame/drivers/deco32.c
index ceaeb2b624d..b38938911a9 100644
--- a/src/mame/drivers/deco32.c
+++ b/src/mame/drivers/deco32.c
@@ -1836,7 +1836,7 @@ static const UINT8 tattass_default_eprom[0x160] =
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
-static struct EEPROM_interface eeprom_interface_tattass =
+static const struct EEPROM_interface eeprom_interface_tattass =
{
10, // address bits 10 ==> } 1024 byte eprom
8, // data bits 8
diff --git a/src/mame/drivers/dkong.c b/src/mame/drivers/dkong.c
index 7d512de73b4..142d8282ddb 100644
--- a/src/mame/drivers/dkong.c
+++ b/src/mame/drivers/dkong.c
@@ -4,8 +4,16 @@ TODO:
- dkongjr discrete interface
- write a shootgal palette_init
-- when i am retired: implement 8257 DMA controller
+- Pestplce colors and origin
+- Shooting Gallery: Shootgal.txt mentions speech pcb, mikesarcade.com dk conversion
+ Clarify
+- 8ballact: read 1507 no mapped
+- drakton - add dkongjr conversion
+- implement 74LS259 (8bit addressable latches), 74LS175 (QUAD D FlipFlop), 74LS373 (Octal transparent latch)
+
+Done:
+- when i am retired: implement 8257 DMA controller
- radarscp_grid_color_w() is wrong, it probably isn't supposed to change
the grid color. There are reports of the grid being constantly blue in
the real game, the flyer confirms this.
@@ -23,6 +31,29 @@ TODO:
- combined memory maps
- first attempts on decoding m58815
+ Couriersud: 11/2007
+
+ - Added configuration switch to change palette between TKG02 (radarscp conversion) and TKG04 (dkong 2board)
+ - Added speech support (samples) to radarsc1
+ - Hooked up and written 8257 dma controller
+ All dkong and dkongjr based games now use the 8257
+ All epos and 2650 based games now use the 8257
+ - Fixed 2650 games to use dkong audio as well - only cpu replaced by addon board ...
+ - straightened memory maps
+ - Fixed bug in dkong3b memory map
+ - Externalized sound drivers to MACHINE_START in audio/dkong.c
+ - DAC Filter now uses lowpass sallen key filter
+ - Reorganized INPUT_PORTS
+ - Fixed sound for drakton and strtheat
+ - Added Dip-Switch locations to 8ballact
+ - Fixed 8ballact according to conversion manual
+ - Reorganized code
+ - http://members.cox.net/rcolbert/mame_cocktail_project.htm mentions, that radarscp to dkong conversions
+ have a sticker TKG-2 over the TRS-02 label.
+ - PCB Info (Dkong.txt) mentions, that TKG-3 is a 4 board set. This seems to be based on the radarscp 4-board set trs-02.
+ Schematics show, that these boards actually were based on TRS-02
+ - TKG-4 is a 2 board set.
+
Donkey Kong and Donkey Kong Jr. memory map (preliminary) (DKong 3 follows)
0000-3fff ROM (Donkey Kong Jr.and Donkey Kong 3: 0000-5fff)
@@ -174,23 +205,56 @@ Changes:
***************************************************************************/
#include "driver.h"
-#include "cpu/i8039/i8039.h"
#include "cpu/s2650/s2650.h"
#include "cpu/m6502/m6502.h"
-#include "sound/dac.h"
-#include "sound/samples.h"
-#include "sound/nes_apu.h"
#include "includes/dkong.h"
+#include "machine/8257dma.h"
#include <math.h>
/*************************************
*
- * Globals
+ * prototypes
*
*************************************/
-static INT8 counter;
-static int hunchloopback;
+static UINT8 hb_dma_read_byte(int channel, offs_t offset);
+static void hb_dma_write_byte(int channel, offs_t offset, UINT8 data);
+static UINT8 dk_dma_read_byte(int channel, offs_t offset);
+static void dk_dma_write_byte(int channel, offs_t offset, UINT8 data);
+static UINT8 p8257_ctl_r(void);
+static void p8257_ctl_w(UINT8 data);
+
+/*************************************
+ *
+ * statics
+ *
+ *************************************/
+
+static struct dma8257_interface dk_dma =
+{
+ 0,
+ CLOCK_1H,
+
+ dk_dma_read_byte,
+ dk_dma_write_byte,
+
+ { 0, p8257_ctl_r, 0, 0 },
+ { p8257_ctl_w, 0, 0, 0 },
+ { 0, 0, 0, 0 }
+};
+
+static struct dma8257_interface hb_dma =
+{
+ 0,
+ CLOCK_1H,
+
+ hb_dma_read_byte,
+ hb_dma_write_byte,
+
+ { 0, p8257_ctl_r, 0, 0 },
+ { p8257_ctl_w, 0, 0, 0 },
+ { 0, 0, 0, 0 }
+};
/*************************************
*
@@ -209,49 +273,182 @@ static INTERRUPT_GEN( hunchbkd_interrupt )
*
*************************************/
-/* EPOS games */
+static MACHINE_START( dkong2b )
+{
+ dkong_state *state = machine->driver_data;
+
+ dma8257_init(1);
+ dma8257_config(0, &dk_dma);
+
+ state->hardware_type = HARDWARE_TKG04;
+
+ state_save_register_global(state->decrypt_counter);
+ state_save_register_global(state->dma_latch);
+
+}
+
+
+static MACHINE_START( hunchbkd )
+{
+ UINT8 *p = memory_region(REGION_PROMS);
+ int i;
+
+ dkong_state *state = Machine->driver_data;
+
+ machine_start_dkong2b(machine);
+ dma8257_config(0, &hb_dma);
+
+ for (i=0;i<0x200;i++)
+ state->rev_map[i] = -1;
+ for (i=0;i<0x200;i++)
+ state->rev_map[p[0x300+i]] = i;
+
+ state_save_register_global(state->hunchloopback);
+
+ state->hunchloopback = 0;
+
+}
+
+
+static MACHINE_START( radarscp )
+{
+ dkong_state *state = Machine->driver_data;
+
+ machine_start_dkong2b(machine);
+ state->hardware_type = HARDWARE_TRS02;
+}
+
+static MACHINE_START( radarsc1 )
+{
+ dkong_state *state = Machine->driver_data;
+
+ machine_start_dkong2b(machine);
+ state->hardware_type = HARDWARE_TRS01;
+}
+
static MACHINE_RESET( dkong )
{
+
+ dma8257_reset();
+
}
static MACHINE_RESET( strtheat )
{
+ dkong_state *state = machine->driver_data;
UINT8 *ROM = memory_region(REGION_CPU1);
machine_reset_dkong(machine);
/* The initial state of the counter is 0x08 */
memory_configure_bank(1, 0, 4, &ROM[0x10000], 0x4000);
- counter = 0x08;
+ state->decrypt_counter = 0x08;
memory_set_bank(1, 0);
}
static MACHINE_RESET( drakton )
{
+ dkong_state *state = machine->driver_data;
UINT8 *ROM = memory_region(REGION_CPU1);
machine_reset_dkong(machine);
/* The initial state of the counter is 0x09 */
memory_configure_bank(1, 0, 4, &ROM[0x10000], 0x4000);
- counter = 0x09;
+ state->decrypt_counter = 0x09;
memory_set_bank(1, 1);
}
-static MACHINE_START( dkong )
+/*************************************
+ *
+ * DMA handling
+ *
+ *************************************/
+
+static UINT8 dk_dma_read_byte(int channel, offs_t offset)
+{
+ UINT8 result;
+
+ cpuintrf_push_context(0);
+ result = program_read_byte(offset);
+ cpuintrf_pop_context();
+
+ return result;
+}
+
+static void dk_dma_write_byte(int channel, offs_t offset, UINT8 data)
+{
+ cpuintrf_push_context(0);
+ program_write_byte(offset, data);
+ cpuintrf_pop_context();
+}
+
+static UINT8 hb_dma_read_byte(int channel, offs_t offset)
+{
+ dkong_state *state = Machine->driver_data;
+ int bucket = state->rev_map[(offset>>10) & 0x1ff];
+ int addr;
+ UINT8 data;
+
+ if (bucket<0)
+ fatalerror("hb_dma_read_byte - unmapped access for 0x%02x - bucket 0x%02x\n", offset, bucket);
+
+ addr = ((bucket<<7) & 0x7c00) | (offset & 0x3ff);
+
+ cpuintrf_push_context(0);
+ data = program_read_byte(addr);
+ cpuintrf_pop_context();
+
+ return data;
+}
+
+static void hb_dma_write_byte(int channel, offs_t offset, UINT8 data)
{
- state_save_register_global(counter);
- state_save_register_global(hunchloopback);
- hunchloopback = 0;
+ dkong_state *state = Machine->driver_data;
+ int bucket = state->rev_map[(offset>>10) & 0x1ff];
+ int addr;
+
+ if (bucket<0)
+ fatalerror("hb_dma_read_byte - unmapped access for 0x%02x - bucket 0x%02x\n", offset, bucket);
+
+ addr = ((bucket<<7) & 0x7c00) | (offset & 0x3ff);
+
+ cpuintrf_push_context(0);
+ program_write_byte(addr, data);
+ cpuintrf_pop_context();
}
+static UINT8 p8257_ctl_r(void)
+{
+ dkong_state *state = Machine->driver_data;
+ return state->dma_latch;
+}
+
+static void p8257_ctl_w(UINT8 data)
+{
+ dkong_state *state = Machine->driver_data;
+ state->dma_latch = data;
+}
+
+
/*************************************
*
* Output ports
*
*************************************/
+static WRITE8_HANDLER( p8257_drq_w )
+{
+ dma8257_drq_write(0, 0, data & 0x01);
+ dma8257_drq_write(0, 1, data & 0x01);
+}
+
+static READ8_HANDLER( dkong_in2_r )
+{
+ return (readinputportbytag("IN2") & 0xBF) | (dkong_audio_status_r(0) << 6);
+}
+
static READ8_HANDLER( hunchbkd_mirror_r )
{
return program_read_byte(0x1000+offset);
@@ -264,25 +461,27 @@ static WRITE8_HANDLER( hunchbkd_mirror_w )
static READ8_HANDLER( epos_decrypt_rom )
{
+ dkong_state *state = Machine->driver_data;
+
if (offset & 0x01)
{
- counter = counter - 1;
- if (counter < 0)
- counter = 0x0F;
+ state->decrypt_counter = state->decrypt_counter - 1;
+ if (state->decrypt_counter < 0)
+ state->decrypt_counter = 0x0F;
}
else
{
- counter = (counter + 1) & 0x0F;
+ state->decrypt_counter = (state->decrypt_counter + 1) & 0x0F;
}
- switch(counter)
+ switch(state->decrypt_counter)
{
case 0x08: memory_set_bank(1, 0); break;
case 0x09: memory_set_bank(1, 1); break;
case 0x0A: memory_set_bank(1, 2); break;
case 0x0B: memory_set_bank(1, 3); break;
default:
- logerror("Invalid counter = %02X\n",counter);
+ logerror("Invalid counter = %02X\n",state->decrypt_counter);
break;
}
@@ -291,7 +490,9 @@ static READ8_HANDLER( epos_decrypt_rom )
static WRITE8_HANDLER( hunchbkd_data_w )
{
- hunchloopback=data;
+ dkong_state *state = Machine->driver_data;
+
+ state->hunchloopback = data;
}
static READ8_HANDLER( hunchbkd_port0_r )
@@ -309,7 +510,9 @@ static READ8_HANDLER( hunchbkd_port0_r )
static READ8_HANDLER( hunchbkd_port1_r )
{
- return hunchloopback;
+ dkong_state *state = Machine->driver_data;
+
+ return state->hunchloopback;
}
static READ8_HANDLER( herbiedk_port1_r )
@@ -387,39 +590,20 @@ static WRITE8_HANDLER( dkong3_2a03_reset_w )
static ADDRESS_MAP_START( dkong_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x3fff) AM_ROM
- AM_RANGE(0x6000, 0x73ff) AM_RAM
- AM_RANGE(0x6900, 0x6a7f) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprite set 1 */
- AM_RANGE(0x6a80, 0x6cff) AM_RAM /* 0x6b00: sprite set 2 */
+ AM_RANGE(0x6000, 0x6bff) AM_RAM
+ AM_RANGE(0x7000, 0x73ff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprite set 1 */
AM_RANGE(0x7400, 0x77ff) AM_READWRITE(MRA8_RAM, dkong_videoram_w) AM_BASE(&videoram)
- AM_RANGE(0x7800, 0x780f) AM_NOP /* P8257 control registers */
+ AM_RANGE(0x7800, 0x780f) AM_READWRITE(dma8257_0_r, dma8257_0_w) /* P8257 control registers */
AM_RANGE(0x7c00, 0x7c00) AM_READWRITE(input_port_0_r, dkong_sh_tuneselect_w) /* IN0, sound CPU intf */
- AM_RANGE(0x7c80, 0x7c80) AM_READ(input_port_1_r) /* IN1 */
+ AM_RANGE(0x7c80, 0x7c80) AM_READWRITE(input_port_1_r, radarscp_grid_color_w) /* IN1 */
AM_RANGE(0x7d00, 0x7d00) AM_READ(dkong_in2_r) /* IN2/DSW2 */
AM_RANGE(0x7d00, 0x7d07) AM_WRITE(dkong_snd_disc_w) /* Sound signals */
- AM_RANGE(0x7d80, 0x7d80) AM_READWRITE(input_port_3_r, dkong_sh_w) /* DSW1 */
+ AM_RANGE(0x7d80, 0x7d80) AM_READWRITE(input_port_3_r, dkong_audio_irq_w) /* DSW1 */
+ AM_RANGE(0x7d81, 0x7d81) AM_WRITE(radarscp_grid_enable_w)
AM_RANGE(0x7d82, 0x7d82) AM_WRITE(dkong_flipscreen_w)
AM_RANGE(0x7d83, 0x7d83) AM_WRITE(dkong_spritebank_w) /* 2 PSL Signal */
AM_RANGE(0x7d84, 0x7d84) AM_WRITE(interrupt_enable_w)
- AM_RANGE(0x7d85, 0x7d85) AM_NOP /* P8257 ==> /DRQ0 /DRQ1 */
- AM_RANGE(0x7d86, 0x7d87) AM_WRITE(dkong_palettebank_w)
- AM_RANGE(0xb000, 0xbfff) AM_READ(MRA8_ROM) /* Pest Place only */
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START( epos_map, ADDRESS_SPACE_PROGRAM, 8 )
- AM_RANGE(0x0000, 0x3fff) AM_READ(MRA8_BANK1) /* DK: 0000-3fff */
- AM_RANGE(0x6000, 0x61ff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
- AM_RANGE(0x6200, 0x6fff) AM_RAM
- AM_RANGE(0x7400, 0x77ff) AM_READWRITE(MRA8_RAM, dkong_videoram_w) AM_BASE(&videoram)
- AM_RANGE(0x7800, 0x780f) AM_NOP /* P8257 control registers */
- AM_RANGE(0x7c00, 0x7c00) AM_READWRITE(input_port_0_r, dkong_sh_tuneselect_w)
- AM_RANGE(0x7c80, 0x7c80) AM_READ(input_port_1_r) /* IN1 */
- AM_RANGE(0x7d00, 0x7d00) AM_READ(dkong_in2_r) /* IN2/DSW2 */
- AM_RANGE(0x7d00, 0x7d07) AM_WRITE(dkong_snd_disc_w) /* sound */
- AM_RANGE(0x7d80, 0x7d80) AM_READWRITE(dkong_in2_r, dkong_sh_w)
- AM_RANGE(0x7d82, 0x7d82) AM_WRITE(dkong_flipscreen_w)
- AM_RANGE(0x7d83, 0x7d83) AM_NOP
- AM_RANGE(0x7d84, 0x7d84) AM_WRITE(interrupt_enable_w)
- AM_RANGE(0x7d85, 0x7d85) AM_NOP /* P8257 ==> /DRQ0 /DRQ1 */
+ AM_RANGE(0x7d85, 0x7d85) AM_WRITE(p8257_drq_w) /* P8257 ==> /DRQ0 /DRQ1 */
AM_RANGE(0x7d86, 0x7d87) AM_WRITE(dkong_palettebank_w)
ADDRESS_MAP_END
@@ -428,61 +612,22 @@ static ADDRESS_MAP_START( epos_readport, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x00, 0xff) AM_READ(epos_decrypt_rom) /* Switch protection logic */
ADDRESS_MAP_END
-static ADDRESS_MAP_START( radarscp_map, ADDRESS_SPACE_PROGRAM, 8 )
- AM_RANGE(0x0000, 0x3fff) AM_ROM
- AM_RANGE(0x6000, 0x73ff) AM_RAM
- AM_RANGE(0x6900, 0x6a7f) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprite set 1 */
- AM_RANGE(0x6a80, 0x6cff) AM_RAM /* 0x6b00: sprite set 2 */
- AM_RANGE(0x7400, 0x77ff) AM_READWRITE(MRA8_RAM, dkong_videoram_w) AM_BASE(&videoram)
- AM_RANGE(0x7800, 0x780f) AM_NOP /* P8257 control registers */
- AM_RANGE(0x7c00, 0x7c00) AM_READWRITE(input_port_0_r, dkong_sh_tuneselect_w) /* IN0, sound CPU intf */
- AM_RANGE(0x7c80, 0x7c80) AM_READWRITE(input_port_1_r, radarscp_grid_color_w)/* IN1 */
- AM_RANGE(0x7d00, 0x7d00) AM_READ(dkong_in2_r) /* IN2/DSW2 */
- AM_RANGE(0x7d00, 0x7d07) AM_WRITE(dkong_snd_disc_w) /* Sound signals */
- AM_RANGE(0x7d80, 0x7d80) AM_READWRITE(input_port_3_r, dkong_sh_w) /* DSW1 */
- AM_RANGE(0x7d81, 0x7d81) AM_WRITE(radarscp_grid_enable_w)
- AM_RANGE(0x7d82, 0x7d82) AM_WRITE(dkong_flipscreen_w)
- AM_RANGE(0x7d83, 0x7d83) AM_WRITE(dkong_spritebank_w) /* 2 PSL Signal */
- AM_RANGE(0x7d84, 0x7d84) AM_WRITE(interrupt_enable_w)
- AM_RANGE(0x7d85, 0x7d85) AM_NOP /* P8257 ==> /DRQ0 /DRQ1 */
- AM_RANGE(0x7d86, 0x7d87) AM_WRITE(dkong_palettebank_w)
- AM_RANGE(0xb000, 0xbfff) AM_READ(MRA8_ROM) /* Pest Place only */
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START( radarsc1_map, ADDRESS_SPACE_PROGRAM, 8 )
- AM_RANGE(0x0000, 0x3fff) AM_ROM
- AM_RANGE(0x6000, 0x73ff) AM_RAM
- AM_RANGE(0x6900, 0x6a7f) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprite set 1 */
- AM_RANGE(0x6a80, 0x6cff) AM_RAM /* 0x6b00: sprite set 2 */
- AM_RANGE(0x7400, 0x77ff) AM_READWRITE(MRA8_RAM, dkong_videoram_w) AM_BASE(&videoram)
- AM_RANGE(0x7800, 0x780f) AM_NOP /* P8257 control registers */
- AM_RANGE(0x7c00, 0x7c00) AM_READWRITE(input_port_0_r, dkong_sh_tuneselect_w) /* IN0, sound CPU intf */
- AM_RANGE(0x7c80, 0x7c80) AM_READWRITE(input_port_1_r, radarscp_grid_color_w)/* IN1 */
- AM_RANGE(0x7d00, 0x7d00) AM_READ(dkong_in2_r) /* IN2/DSW2 */
- AM_RANGE(0x7d00, 0x7d07) AM_WRITE(radarsc1_snd_disc_w) /* Sound signals */
- AM_RANGE(0x7d80, 0x7d80) AM_READWRITE(input_port_3_r, dkong_sh_w) /* DSW1 */
- AM_RANGE(0x7d81, 0x7d81) AM_WRITE(radarscp_grid_enable_w)
- AM_RANGE(0x7d82, 0x7d82) AM_WRITE(dkong_flipscreen_w)
- AM_RANGE(0x7d83, 0x7d83) AM_WRITE(dkong_spritebank_w) /* 2 PSL Signal */
- AM_RANGE(0x7d84, 0x7d84) AM_WRITE(interrupt_enable_w)
- AM_RANGE(0x7d85, 0x7d85) AM_NOP /* P8257 ==> /DRQ0 /DRQ1 */
- AM_RANGE(0x7d86, 0x7d87) AM_WRITE(dkong_palettebank_w)
- AM_RANGE(0xb000, 0xbfff) AM_READ(MRA8_ROM) /* Pest Place only */
-ADDRESS_MAP_END
-
static ADDRESS_MAP_START( hunchbkd_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x0fff) AM_ROM
+ AM_RANGE(0x1000, 0x13ff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* 0x7000 */
AM_RANGE(0x1400, 0x1400) AM_READWRITE(input_port_0_r, dkong_sh_tuneselect_w)
- AM_RANGE(0x1480, 0x1480) AM_READWRITE(input_port_1_r, dkongjr_gfxbank_w)
+ AM_RANGE(0x1480, 0x1480) AM_READ(input_port_1_r)
AM_RANGE(0x1500, 0x1500) AM_READ(input_port_2_r) /* IN2/DSW2 */
- AM_RANGE(0x1580, 0x1580) AM_READWRITE(input_port_3_r, dkong_sh_w) /* DSW1 */
+ AM_RANGE(0x1580, 0x1580) AM_READWRITE(input_port_3_r, dkong_audio_irq_w) /* DSW1 */
AM_RANGE(0x1582, 0x1582) AM_WRITE(dkong_flipscreen_w)
AM_RANGE(0x1584, 0x1584) AM_NOP /* Possibly still interupt enable */
- AM_RANGE(0x1585, 0x1585) AM_NOP /* written a lot - every int */
+ AM_RANGE(0x1585, 0x1585) AM_WRITE(p8257_drq_w) /* P8257 ==> /DRQ0 /DRQ1 */
AM_RANGE(0x1586, 0x1587) AM_WRITE(dkong_palettebank_w)
- AM_RANGE(0x1600, 0x17ff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
- AM_RANGE(0x1800, 0x1bff) AM_READWRITE(MRA8_RAM, dkong_videoram_w) AM_BASE(&videoram)
- AM_RANGE(0x1C00, 0x1fff) AM_RAM
+ AM_RANGE(0x1600, 0x17ff) AM_RAM /* 0x6400 spriteram location */
+ AM_RANGE(0x1800, 0x1bff) AM_READWRITE(MRA8_RAM, dkong_videoram_w) AM_BASE(&videoram) /* 0x7400 */
+ AM_RANGE(0x1C00, 0x1f7f) AM_RAM /* 0x6000 */
+ AM_RANGE(0x1f80, 0x1f8f) AM_READWRITE(dma8257_0_r, dma8257_0_w) /* P8257 control registers */
+ /* 0x6800 not remapped */
AM_RANGE(0x2000, 0x2fff) AM_ROM
AM_RANGE(0x3000, 0x3fff) AM_READWRITE(hunchbkd_mirror_r, hunchbkd_mirror_w)
AM_RANGE(0x4000, 0x4fff) AM_ROM
@@ -548,12 +693,11 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( dkongjr_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x5fff) AM_ROM
- AM_RANGE(0x6000, 0x68ff) AM_RAM
- AM_RANGE(0x6900, 0x6a7f) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprite set 1 */
- AM_RANGE(0x6a80, 0x6cff) AM_RAM /* 0x6b00: sprite set 2 */
- AM_RANGE(0x6d00, 0x6fff) AM_RAM
+ AM_RANGE(0x6000, 0x6bff) AM_RAM
+ AM_RANGE(0x6c00, 0x6fff) AM_RAM /* DK3 bootleg only */
+ AM_RANGE(0x7000, 0x73ff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprite set 1 */
AM_RANGE(0x7400, 0x77ff) AM_READWRITE(MRA8_RAM, dkong_videoram_w) AM_BASE(&videoram)
- AM_RANGE(0x7800, 0x780f) AM_NOP /* P8257 control registers */
+ AM_RANGE(0x7800, 0x780f) AM_READWRITE(dma8257_0_r, dma8257_0_w) /* P8257 control registers */
AM_RANGE(0x7c00, 0x7c00) AM_READWRITE(input_port_0_r, dkongjr_sh_tuneselect_w)
AM_RANGE(0x7c80, 0x7c80) AM_READWRITE(input_port_1_r, dkongjr_gfxbank_w)
AM_RANGE(0x7c81, 0x7c81) AM_WRITE(dkongjr_sh_test6_w)
@@ -564,94 +708,46 @@ static ADDRESS_MAP_START( dkongjr_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x7d82, 0x7d82) AM_WRITE(dkong_flipscreen_w)
AM_RANGE(0x7d83, 0x7d83) AM_WRITE(dkong_spritebank_w) /* 2 PSL Signal */
AM_RANGE(0x7d84, 0x7d84) AM_WRITE(interrupt_enable_w)
- AM_RANGE(0x7d85, 0x7d85) AM_NOP /* P8257 ==> /DRQ0 /DRQ1 */
+ AM_RANGE(0x7d85, 0x7d85) AM_WRITE(p8257_drq_w) /* P8257 ==> /DRQ0 /DRQ1 */
AM_RANGE(0x7d86, 0x7d87) AM_WRITE(dkong_palettebank_w)
- AM_RANGE(0x8000, 0x9fff) AM_WRITE(MWA8_ROM) /* bootleg DKjr only */
- AM_RANGE(0xd000, 0xdfff) AM_WRITE(MWA8_ROM) /* DK3 bootleg only */
+ AM_RANGE(0x8000, 0x9fff) AM_ROM /* bootleg DKjr only */
+ AM_RANGE(0xb000, 0xbfff) AM_ROM /* pestplce only */
+ AM_RANGE(0xd000, 0xdfff) AM_ROM /* DK3 bootleg only */
ADDRESS_MAP_END
-static ADDRESS_MAP_START( pestplce_map, ADDRESS_SPACE_PROGRAM, 8 )
- AM_RANGE(0x0000, 0x5fff) AM_ROM
- AM_RANGE(0x6000, 0x68ff) AM_RAM
- AM_RANGE(0x6900, 0x6a7f) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size) /* sprite set 1 */
- AM_RANGE(0x6a80, 0x6cff) AM_RAM /* 0x6b00: sprite set 2 */
- AM_RANGE(0x6d00, 0x6fff) AM_RAM
- AM_RANGE(0x7400, 0x77ff) AM_READWRITE(MRA8_RAM, dkong_videoram_w) AM_BASE(&videoram)
- AM_RANGE(0x7800, 0x780f) AM_NOP /* P8257 control registers */
- AM_RANGE(0x7c00, 0x7c00) AM_READWRITE(input_port_0_r, dkongjr_sh_tuneselect_w)
- AM_RANGE(0x7c80, 0x7c80) AM_READWRITE(input_port_1_r, dkongjr_gfxbank_w)
- AM_RANGE(0x7c81, 0x7c81) AM_WRITE(dkongjr_sh_test6_w)
- AM_RANGE(0x7d00, 0x7d00) AM_READ(dkong_in2_r) /* IN2/DSW2 */
- AM_RANGE(0x7d00, 0x7d07) AM_WRITE(dkong_snd_disc_w) /* walk/jump/boom sample trigger */
- AM_RANGE(0x7d80, 0x7d80) AM_READ(input_port_3_r) AM_WRITENOP //(dkong_sh_w)
- AM_RANGE(0x7d82, 0x7d82) AM_WRITE(dkong_flipscreen_w)
- //AM_RANGE(0x7d83, 0x7d83) AM_WRITE(dkong_spritebank_w) /* 2 PSL Signal */
- AM_RANGE(0x7d84, 0x7d84) AM_WRITE(interrupt_enable_w)
- AM_RANGE(0x7d85, 0x7d85) AM_NOP /* P8257 ==> /DRQ0 /DRQ1 */
- AM_RANGE(0x7d86, 0x7d87) AM_WRITE(dkong_palettebank_w)
- AM_RANGE(0xb000, 0xbfff) AM_ROM
-ADDRESS_MAP_END
/*************************************
*
- * Sound CPU memory handlers
+ * Port definitions
*
*************************************/
-static ADDRESS_MAP_START( dkong_sound_map, ADDRESS_SPACE_PROGRAM, 8 )
- AM_RANGE(0x0000, 0x0fff) AM_ROM
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START( dkong_sound_io_map, ADDRESS_SPACE_IO, 8 )
- AM_RANGE(0x00, 0xff) AM_READ(dkong_sh_tune_r)
- AM_RANGE(I8039_p1, I8039_p1) AM_READWRITE(dkong_sh_p1_r, dkong_sh_p1_w)
- AM_RANGE(I8039_p2, I8039_p2) AM_READWRITE(dkong_sh_p2_r, dkong_sh_p2_w)
- AM_RANGE(I8039_t0, I8039_t0) AM_READ(dkong_sh_t0_r)
- AM_RANGE(I8039_t1, I8039_t1) AM_READ(dkong_sh_t1_r)
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START( radarsc1_sound_io_map, ADDRESS_SPACE_IO, 8 )
- AM_RANGE(0x00, 0xff) AM_READ(radarsc1_sh_tune_r)
- AM_RANGE(0x00, 0xff) AM_WRITE(dkong_sh_p1_w) // DAC here
- AM_RANGE(I8039_p1, I8039_p1) AM_READWRITE(radarsc1_sh_p1_r, radarsc1_sh_p1_w)
- AM_RANGE(I8039_p2, I8039_p2) AM_READWRITE(dkong_sh_p2_r, radarsc1_sh_p2_w)
- AM_RANGE(I8039_t0, I8039_t0) AM_READ(dkong_sh_t0_r)
- AM_RANGE(I8039_t1, I8039_t1) AM_READ(dkong_sh_t1_r)
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START( hunchbkd_sound_io_map, ADDRESS_SPACE_IO, 8 )
- AM_RANGE(I8039_bus, I8039_bus) AM_READ(soundlatch_r)
- AM_RANGE(I8039_p1, I8039_p1) AM_READWRITE(dkong_sh_p1_r, dkong_sh_p1_w)
- AM_RANGE(I8039_p2, I8039_p2) AM_READWRITE(dkong_sh_p2_r, dkong_sh_p2_w)
- AM_RANGE(I8039_t0, I8039_t0) AM_READ(dkong_sh_t0_r)
- AM_RANGE(I8039_t1, I8039_t1) AM_READ(dkong_sh_t1_r)
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START( dkong3_sound1_map, ADDRESS_SPACE_PROGRAM, 8 )
- AM_RANGE(0x0000, 0x01ff) AM_RAM
- AM_RANGE(0x4016, 0x4016) AM_READ(soundlatch_r) // overwrite default
- AM_RANGE(0x4017, 0x4017) AM_READ(soundlatch2_r)
- AM_RANGE(0x4000, 0x4017) AM_READ(NESPSG_0_r)
- AM_RANGE(0x4000, 0x4017) AM_WRITE(NESPSG_0_w)
- AM_RANGE(0xe000, 0xffff) AM_ROM
-ADDRESS_MAP_END
-
-static ADDRESS_MAP_START( dkong3_sound2_map, ADDRESS_SPACE_PROGRAM, 8 )
- AM_RANGE(0x0000, 0x01ff) AM_RAM
- AM_RANGE(0x4016, 0x4016) AM_READ(soundlatch3_r) // overwrite default
- AM_RANGE(0x4000, 0x4017) AM_READ(NESPSG_1_r)
- AM_RANGE(0x4000, 0x4017) AM_WRITE(NESPSG_1_w)
- AM_RANGE(0xe000, 0xffff) AM_ROM
-ADDRESS_MAP_END
+static INPUT_PORTS_START( radarscp_in0_2 )
+ PORT_START_TAG("IN0") /* IN0 */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not connected - held to high */
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not connected - held to high */
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not connected - held to high */
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not connected - held to high */
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not connected - held to high */
+INPUT_PORTS_END
-/*************************************
- *
- * Port definitions
- *
- *************************************/
+static INPUT_PORTS_START( radarscp_in1_2 )
+ PORT_START_TAG("IN1") /* IN1 */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_COCKTAIL /* not connected - held to high */
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_COCKTAIL /* not connected - held to high */
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
+INPUT_PORTS_END
-static INPUT_PORTS_START( dkong )
- PORT_START /* IN0 */
+static INPUT_PORTS_START( dkong_in0_4 )
+ PORT_START_TAG("IN0") /* IN0 */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY
@@ -660,8 +756,10 @@ static INPUT_PORTS_START( dkong )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
+INPUT_PORTS_END
- PORT_START /* IN1 */
+static INPUT_PORTS_START( dkong_in1_4 )
+ PORT_START_TAG("IN1") /* IN1 */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
@@ -670,12 +768,38 @@ static INPUT_PORTS_START( dkong )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
+INPUT_PORTS_END
+
+static INPUT_PORTS_START( dkong_in0_8 )
+ PORT_START_TAG("IN0") /* IN0 */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
+INPUT_PORTS_END
+
+static INPUT_PORTS_START( dkong_in1_8 )
+ PORT_START_TAG("IN1") /* IN1 */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
+INPUT_PORTS_END
+static INPUT_PORTS_START( dkong_in2 )
/* Bit 0x80 is (SERVICE OR COIN) !
* Bit 0x01 is going to the connector but it is not labeled
* It should be a IPT_UNKNOWN. In fact, it will reset the game.
*/
- PORT_START /* IN2 */
+ PORT_START_TAG("IN2") /* IN2 */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME(DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* connection not labeled in schematics */
/* This may freeze or reset dkong */
@@ -685,8 +809,10 @@ static INPUT_PORTS_START( dkong )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* status from sound cpu */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 )
+INPUT_PORTS_END
- PORT_START /* DSW0 */
+static INPUT_PORTS_START( dkong_dsw0 )
+ PORT_START_TAG("DSW0") /* DSW0 */
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION( "SW1:!1,!2" )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x01, "4" )
@@ -709,74 +835,45 @@ static INPUT_PORTS_START( dkong )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) PORT_DIPLOCATION( "SW1:!8" )
PORT_DIPSETTING( 0x80, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
+INPUT_PORTS_END
+static INPUT_PORTS_START( dkong_config )
PORT_START_TAG("VR2")
PORT_ADJUSTER( 90, "VR2 - DAC Volume" )
+ PORT_START_TAG("VIDHW")
+ PORT_CONFNAME( 0x01, 0x01, "Video Hardware" )
+ PORT_CONFSETTING( 0x00, "TKG-02 (Radarscope Conversion)" )
+ PORT_CONFSETTING( 0x01, "TKG-04 (Two board set)" )
+
INPUT_PORTS_END
-static INPUT_PORTS_START( radarscp )
- PORT_START /* IN0 */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not connected - held to high */
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not connected - held to high */
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not connected - held to high */
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not connected - held to high */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not connected - held to high */
+static INPUT_PORTS_START( dkong )
+ PORT_INCLUDE( dkong_in0_4 )
+ PORT_INCLUDE( dkong_in1_4 )
+ PORT_INCLUDE( dkong_in2 )
+ PORT_INCLUDE( dkong_dsw0 )
- PORT_START /* IN1 */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_COCKTAIL /* not connected - held to high */
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_COCKTAIL /* not connected - held to high */
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
+ PORT_INCLUDE( dkong_config )
+INPUT_PORTS_END
+static INPUT_PORTS_START( radarscp )
+ PORT_INCLUDE( radarscp_in0_2 )
+ PORT_INCLUDE( radarscp_in1_2 )
/* Bit 0x80 is (SERVICE OR COIN) !
* Bit 0x01 is going to the connector and is labeled test switch
* It should be a IPT_UNUSED. In fact, it will reset the game.
*/
- PORT_START /* IN2 */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME(DEF_STR( Service_Mode )) PORT_CODE(KEYCODE_F2)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* connection not labeled in schematics */
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_INCLUDE( dkong_in2 )
+ PORT_MODIFY("IN2")
PORT_DIPNAME( 0x10, 0x10, "TP3" )
PORT_DIPSETTING( 0x00, "Gnd" )
PORT_DIPSETTING( 0x10, "Open" )
PORT_DIPNAME( 0x20, 0x20, "TP5" )
PORT_DIPSETTING( 0x00, "Gnd" )
PORT_DIPSETTING( 0x20, "Open" )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* SACA - Sound Acknowledge*/
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 )
- PORT_START /* DSW0 */
- PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
- PORT_DIPSETTING( 0x00, "3" )
- PORT_DIPSETTING( 0x01, "4" )
- PORT_DIPSETTING( 0x02, "5" )
- PORT_DIPSETTING( 0x03, "6" )
- PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )
- PORT_DIPSETTING( 0x00, "7000" )
- PORT_DIPSETTING( 0x04, "10000" )
- PORT_DIPSETTING( 0x08, "15000" )
- PORT_DIPSETTING( 0x0c, "20000" )
- PORT_DIPNAME( 0x70, 0x00, DEF_STR( Coinage ) )
- PORT_DIPSETTING( 0x70, DEF_STR( 5C_1C ) )
- PORT_DIPSETTING( 0x50, DEF_STR( 4C_1C ) )
- PORT_DIPSETTING( 0x30, DEF_STR( 3C_1C ) )
- PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) )
- PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) )
- PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) )
- PORT_DIPSETTING( 0x60, DEF_STR( 1C_4C ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) )
- PORT_DIPSETTING( 0x80, DEF_STR( Upright ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
+ PORT_INCLUDE( dkong_dsw0 )
PORT_START_TAG("VR2")
PORT_ADJUSTER( 35, "VR2 - DAC Volume" )
@@ -784,7 +881,7 @@ static INPUT_PORTS_START( radarscp )
INPUT_PORTS_END
static INPUT_PORTS_START( dkong3 )
- PORT_START /* IN0 */
+ PORT_START_TAG("IN0") /* IN0 */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY
@@ -794,7 +891,7 @@ static INPUT_PORTS_START( dkong3 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN3 )
- PORT_START /* IN1 */
+ PORT_START_TAG("IN1") /* IN1 */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
@@ -804,7 +901,7 @@ static INPUT_PORTS_START( dkong3 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(1)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_START /* DSW0 */
+ PORT_START_TAG("DSW0") /* DSW0 */
PORT_DIPNAME( 0x07, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW2:!1,!2,!3")
PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) )
@@ -822,7 +919,7 @@ static INPUT_PORTS_START( dkong3 )
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) )
- PORT_START /* DSW1 */
+ PORT_START_TAG("DSW1") /* DSW1 */
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:!1,!2")
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x01, "4" )
@@ -846,45 +943,12 @@ static INPUT_PORTS_START( dkong3 )
INPUT_PORTS_END
static INPUT_PORTS_START( dkong3b )
- PORT_START /* IN0 */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_INCLUDE( dkong_in0_4 )
+ PORT_INCLUDE( dkong_in1_4 )
- PORT_START /* IN1 */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_INCLUDE( dkong_in2 )
- PORT_START /* IN2 */
- PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x01, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x02, DEF_STR( On ) )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
- 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_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* status from sound cpu */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1)
-
- PORT_START /* DSW0 */
+ PORT_START_TAG("DSW0") /* DSW0 */
PORT_DIPNAME( 0x07, 0x00, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) )
@@ -911,86 +975,57 @@ static INPUT_PORTS_START( dkong3b )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
INPUT_PORTS_END
+static INPUT_PORTS_START( dkongjr )
+ PORT_INCLUDE( dkong_in0_4 )
+ PORT_INCLUDE( dkong_in1_4 )
+ PORT_INCLUDE( dkong_in2 )
+ PORT_INCLUDE( dkong_dsw0 )
+INPUT_PORTS_END
+
static INPUT_PORTS_START( hunchbkd )
- PORT_START /* IN0 */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_START /* IN1 */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_INCLUDE( dkong_in0_8 )
+ PORT_INCLUDE( dkong_in1_8 )
- PORT_START /* IN2 */
+ PORT_INCLUDE( dkong_in2 )
+ PORT_MODIFY("IN2")
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* status from sound cpu */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 )
- PORT_START /* DSW0 */
- PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
+ PORT_INCLUDE( dkong_dsw0 )
+ PORT_MODIFY("DSW0")
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW1:!1" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x00, DEF_STR( Lives ) )
+ PORT_DIPNAME( 0x02, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION( "SW1:!2" )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x02, "5" )
- PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )
+ PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION( "SW1:!3,!4" )
PORT_DIPSETTING( 0x00, "10000" )
PORT_DIPSETTING( 0x04, "20000" )
PORT_DIPSETTING( 0x08, "40000" )
PORT_DIPSETTING( 0x0c, "80000" )
- PORT_DIPNAME( 0x70, 0x00, DEF_STR( Coinage ) )
- PORT_DIPSETTING( 0x70, DEF_STR( 5C_1C ) )
- PORT_DIPSETTING( 0x50, DEF_STR( 4C_1C ) )
- PORT_DIPSETTING( 0x30, DEF_STR( 3C_1C ) )
- PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) )
- PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) )
- PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) )
- PORT_DIPSETTING( 0x60, DEF_STR( 1C_4C ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) )
- PORT_DIPSETTING( 0x80, DEF_STR( Upright ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
PORT_START /* Sense */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
+
+ PORT_INCLUDE( dkong_config )
INPUT_PORTS_END
static INPUT_PORTS_START( shootgal )
- PORT_START /* IN0 */
+ PORT_START_TAG("IN0") /* IN0 */
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(4) PORT_REVERSE
- PORT_START /* IN1 */
+ PORT_START_TAG("IN1") /* IN1 */
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(4) PORT_REVERSE
- PORT_START /* IN2 */
+ PORT_INCLUDE( dkong_in2 )
+ PORT_MODIFY("IN2")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 )
- PORT_START /* DSW0 */
+ PORT_START_TAG("DSW0") /* DSW0 */
PORT_DIPNAME( 0x01, 0x00, "1" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
@@ -1014,203 +1049,108 @@ static INPUT_PORTS_START( shootgal )
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
PORT_SERVICE( 0x80, IP_ACTIVE_HIGH )
- PORT_START /* Sense */
+ PORT_START_TAG("SENSE") /* Sense */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
+
+ PORT_INCLUDE( dkong_config )
+
INPUT_PORTS_END
static INPUT_PORTS_START( sbdk )
- PORT_START /* IN0 */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_INCLUDE( dkong_in0_8 )
+ PORT_INCLUDE( dkong_in1_8 )
- PORT_START /* IN1 */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
-
- PORT_START /* IN2 */
- PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x01, DEF_STR( On ) )
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* status from sound cpu */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 )
+ PORT_INCLUDE( dkong_in2 )
+ PORT_MODIFY("IN2")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Start 1 / P1 Button 1") PORT_PLAYER(1)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Start 2 / P1 Button 2") PORT_PLAYER(1)
- PORT_START /* DSW0 */
- PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
+ PORT_INCLUDE( dkong_dsw0 )
+ PORT_MODIFY("DSW0")
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW1:!1" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x00, DEF_STR( Lives ) )
+ PORT_DIPNAME( 0x02, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION( "SW1:!2" )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x02, "5" )
- PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW1:!3" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x04, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW1:!4" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
- PORT_DIPNAME( 0x70, 0x00, DEF_STR( Coinage ) )
- PORT_DIPSETTING( 0x70, DEF_STR( 5C_1C ) )
- PORT_DIPSETTING( 0x50, DEF_STR( 4C_1C ) )
- PORT_DIPSETTING( 0x30, DEF_STR( 3C_1C ) )
- PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) )
- PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) )
- PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) )
- PORT_DIPSETTING( 0x60, DEF_STR( 1C_4C ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) )
- PORT_DIPSETTING( 0x80, DEF_STR( Upright ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
- PORT_START /* Sense */
+ PORT_START_TAG("SENSE") /* Sense */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
+
+ PORT_INCLUDE( dkong_config )
+
INPUT_PORTS_END
static INPUT_PORTS_START( herbiedk )
- PORT_START /* IN0 */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_INCLUDE( dkong_in0_8 )
+ PORT_INCLUDE( dkong_in1_8 )
- PORT_START /* IN1 */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
-
- PORT_START /* IN2 */
- PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x01, DEF_STR( On ) )
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Start 1 / P1 Button 1") PORT_PLAYER(1)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Start 2 / P1 Button 2") PORT_PLAYER(1)
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* status from sound cpu */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 )
+ PORT_INCLUDE( dkong_in2 )
- PORT_START /* DSW0 */
- PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
+ PORT_INCLUDE( dkong_dsw0 )
+ PORT_MODIFY("DSW0")
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW1:!1" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW1:!2" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x02, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW1:!3" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x04, DEF_STR( On ) )
- PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
+ PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW1:!4" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
- PORT_DIPNAME( 0x70, 0x00, DEF_STR( Coinage ) )
- PORT_DIPSETTING( 0x70, DEF_STR( 5C_1C ) )
- PORT_DIPSETTING( 0x50, DEF_STR( 4C_1C ) )
- PORT_DIPSETTING( 0x30, DEF_STR( 3C_1C ) )
- PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) )
- PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) )
- PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) )
- PORT_DIPSETTING( 0x60, DEF_STR( 1C_4C ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) )
- PORT_DIPSETTING( 0x80, DEF_STR( Upright ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
- PORT_START /* Sense */
+ PORT_START_TAG("SENSE") /* Sense */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK )
+
+ PORT_INCLUDE( dkong_config )
INPUT_PORTS_END
/* Notes :
- you ALWAYS get an extra life at 150000 points.
- having more than 6 lives will reset the game.
*/
+
static INPUT_PORTS_START( herodk )
- PORT_START /* IN0 */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_INCLUDE( dkong_in0_8 )
+ PORT_MODIFY("IN0")
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_START /* IN1 */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
+ PORT_INCLUDE( dkong_in1_8 )
+ PORT_MODIFY("IN1")
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_START /* IN2 */
- PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x01, DEF_STR( On ) )
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* status from sound cpu */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 )
+ PORT_INCLUDE( dkong_in2 )
- PORT_START /* DSW0 */
- PORT_DIPUNUSED( 0x01, IP_ACTIVE_HIGH )
- PORT_DIPNAME( 0x02, 0x00, DEF_STR( Lives ) )
+ PORT_INCLUDE( dkong_dsw0 )
+ PORT_MODIFY("DSW0")
+ PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW1:!1" )
+ PORT_DIPNAME( 0x02, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION( "SW1:!2" )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x02, "5" )
- PORT_DIPNAME( 0x0c, 0x00, "Difficulty?" ) // Stored at 0x1c99
+ PORT_DIPNAME( 0x0c, 0x00, "Difficulty?" ) PORT_DIPLOCATION( "SW1:!3,!4" ) // Stored at 0x1c99
PORT_DIPSETTING( 0x00, "0" )
PORT_DIPSETTING( 0x04, "1" )
PORT_DIPSETTING( 0x08, "2" )
PORT_DIPSETTING( 0x0c, "3" )
- PORT_DIPNAME( 0x70, 0x00, DEF_STR( Coinage ) )
- PORT_DIPSETTING( 0x70, DEF_STR( 5C_1C ) )
- PORT_DIPSETTING( 0x50, DEF_STR( 4C_1C ) )
- PORT_DIPSETTING( 0x30, DEF_STR( 3C_1C ) )
- PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) )
- PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) )
- PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) )
- PORT_DIPSETTING( 0x60, DEF_STR( 1C_4C ) )
- PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) )
- PORT_DIPSETTING( 0x80, DEF_STR( Upright ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
- PORT_START /* Sense */
+ PORT_START_TAG("SENSE") /* Sense */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
+
+ PORT_INCLUDE( dkong_config )
INPUT_PORTS_END
static INPUT_PORTS_START( pestplce )
- PORT_START /* IN0 */
+ PORT_START_TAG("IN0") /* IN0 */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(1)
@@ -1220,7 +1160,7 @@ static INPUT_PORTS_START( pestplce )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_START /* IN1 */
+ PORT_START_TAG("IN1") /* IN1 */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(2)
@@ -1230,17 +1170,11 @@ static INPUT_PORTS_START( pestplce )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_START /* IN2 */
+ PORT_INCLUDE( dkong_in2 )
+ PORT_MODIFY("IN2")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* status from sound cpu */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 )
- PORT_START /* DSW0 */
+ PORT_START_TAG("DSW0") /* DSW0 */
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x01, "4" )
@@ -1263,41 +1197,27 @@ static INPUT_PORTS_START( pestplce )
PORT_DIPSETTING( 0x40, "30000" )
PORT_DIPSETTING( 0x80, "40000" )
PORT_DIPSETTING( 0xc0, DEF_STR ( None ) )
+
+ PORT_INCLUDE( dkong_config )
INPUT_PORTS_END
static INPUT_PORTS_START( spclforc )
- PORT_START /* IN0 */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY
+ PORT_INCLUDE( dkong_in0_8 )
+ PORT_MODIFY("IN0")
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_START /* IN1 */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
+ PORT_INCLUDE( dkong_in1_8 )
+ PORT_MODIFY("IN1")
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_START /* IN2 */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_INCLUDE( dkong_in2 )
+ PORT_MODIFY("IN2")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Start 1 / P1 Button 1") PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Start 2 / P1 Button 2") PORT_PLAYER(1)
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* status from sound cpu */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 )
- PORT_START /* DSW0 */
+ PORT_START_TAG("DSW0") /* DSW0 */
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
@@ -1322,58 +1242,30 @@ static INPUT_PORTS_START( spclforc )
PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) )
- PORT_START /* Sense */
+ PORT_START_TAG("SENSE") /* Sense */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK )
+
+ PORT_INCLUDE( dkong_config )
+
INPUT_PORTS_END
static INPUT_PORTS_START( 8ballact )
- PORT_START /* IN0 */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_INCLUDE( dkong_in0_8 )
+ PORT_INCLUDE( dkong_in1_8 )
- PORT_START /* IN1 */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
-
- PORT_START /* IN2 */
- PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x01, DEF_STR( On ) )
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* status from sound cpu */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 )
+ PORT_INCLUDE( dkong_in2 )
- PORT_START /* DSW0 */
- PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x01, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x02, DEF_STR( On ) )
- 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( Cabinet ) )
+ PORT_START_TAG("DSW0") /* DSW0 */
+ PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW1:!1" )
+ PORT_DIPUNUSED_DIPLOC( 0x02, 0x02, "SW1:!2" )
+ PORT_DIPNAME( 0x04, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION( "SW1:!3" )
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
- PORT_DIPSETTING( 0x08, DEF_STR( Cocktail ) )
- PORT_DIPNAME( 0x70, 0x00, DEF_STR( Coinage ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( Cocktail ) )
+ PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW1:!4" )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( On ) )
+ PORT_DIPNAME( 0x70, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION( "SW1:!5,!6,!7" )
PORT_DIPSETTING( 0x70, DEF_STR( 5C_1C ) )
PORT_DIPSETTING( 0x50, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x30, DEF_STR( 3C_1C ) )
@@ -1382,47 +1274,24 @@ static INPUT_PORTS_START( 8ballact )
PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x60, DEF_STR( 1C_4C ) )
- PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x80, DEF_STR( On ) )
+ PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW1:!8" )
- PORT_START /* Sense */
+ PORT_START_TAG("SENSE") /* Sense */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK )
-INPUT_PORTS_END
+ PORT_INCLUDE( dkong_config )
-static INPUT_PORTS_START( drakton )
- PORT_START /* IN0 */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+INPUT_PORTS_END
- PORT_START /* IN1 */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+static INPUT_PORTS_START( drakton )
+ PORT_INCLUDE( dkong_in0_4 )
+ PORT_INCLUDE( dkong_in1_4 )
- PORT_START /* IN2 */
+ PORT_INCLUDE( dkong_in2 )
+ PORT_MODIFY("IN2")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* status from sound cpu */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 )
- PORT_START /* DSW0 */
+ PORT_START_TAG("DSW0") /* DSW0 */
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
@@ -1446,11 +1315,14 @@ static INPUT_PORTS_START( drakton )
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) )
+
+ PORT_INCLUDE( dkong_config )
+
INPUT_PORTS_END
static INPUT_PORTS_START( strtheat )
- PORT_START /* IN0 */
+ PORT_START_TAG("IN0") /* IN0 */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 )
@@ -1460,7 +1332,7 @@ static INPUT_PORTS_START( strtheat )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_START /* IN1 */
+ PORT_START_TAG("IN1") /* IN1 */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
@@ -1470,17 +1342,11 @@ static INPUT_PORTS_START( strtheat )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_START /* IN2 */
+ PORT_INCLUDE( dkong_in2 )
+ PORT_MODIFY("IN2")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* status from sound cpu */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 )
- PORT_START /* DSW0 */
+ PORT_START_TAG("DSW0") /* DSW0 */
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
@@ -1505,11 +1371,14 @@ static INPUT_PORTS_START( strtheat )
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) )
- PORT_START /* IN4 */
+ PORT_START_TAG("IN4") /* IN4 */
PORT_BIT( 0x03, 0x00, IPT_DIAL ) PORT_SENSITIVITY(40) PORT_KEYDELTA(10) PORT_REVERSE
- PORT_START /* IN5 */
+ PORT_START_TAG("IN5") /* IN5 */
PORT_BIT( 0x03, 0x00, IPT_DIAL ) PORT_SENSITIVITY(40) PORT_KEYDELTA(10) PORT_REVERSE PORT_COCKTAIL
+
+ PORT_INCLUDE( dkong_config )
+
INPUT_PORTS_END
/*************************************
@@ -1571,32 +1440,6 @@ GFXDECODE_END
*
*************************************/
-static const char *dkongjr_sample_names[] =
-{
- "*dkongjr",
- "jump.wav",
- "land.wav",
- "roar.wav",
- "climb0.wav",
- "climb1.wav",
- "climb2.wav",
- "death.wav",
- "drop.wav",
- "walk0.wav",
- "walk1.wav",
- "walk2.wav",
- "snapjaw.wav",
- 0 /* end of array */
-};
-
-static struct Samplesinterface dkongjr_samples_interface =
-{
- 8, /* 8 channels */
- dkongjr_sample_names
-};
-
-static struct NESinterface nes_interface_1 = { REGION_CPU2 };
-static struct NESinterface nes_interface_2 = { REGION_CPU3 };
/*************************************
*
@@ -1604,18 +1447,17 @@ static struct NESinterface nes_interface_2 = { REGION_CPU3 };
*
*************************************/
-static MACHINE_DRIVER_START( radarscp )
+static MACHINE_DRIVER_START( dkong_base )
+
+ /* driver data */
+ MDRV_DRIVER_DATA(dkong_state)
/* basic machine hardware */
- MDRV_CPU_ADD(Z80, CLOCK_1H) /* 3.072 MHz (?) */
- MDRV_CPU_PROGRAM_MAP(radarscp_map, 0)
+ MDRV_CPU_ADD_TAG("main", Z80, CLOCK_1H)
+ MDRV_CPU_PROGRAM_MAP(dkong_map, 0)
MDRV_CPU_VBLANK_INT(nmi_line_pulse,1)
- MDRV_CPU_ADD(I8035,I8035_CLOCK)
- MDRV_CPU_PROGRAM_MAP(dkong_sound_map, 0)
- MDRV_CPU_IO_MAP(dkong_sound_io_map, 0)
-
- MDRV_MACHINE_START(dkong)
+ MDRV_MACHINE_START(dkong2b)
MDRV_MACHINE_RESET(dkong)
/* video hardware */
@@ -1623,176 +1465,89 @@ static MACHINE_DRIVER_START( radarscp )
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
MDRV_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
MDRV_GFXDECODE(dkong)
- MDRV_PALETTE_LENGTH(256+256+8+1)
+ MDRV_PALETTE_LENGTH(DK2B_PALETTE_LENGTH)
- MDRV_PALETTE_INIT(radarscp)
- MDRV_VIDEO_START(radarscp)
- MDRV_VIDEO_UPDATE(radarscp)
+ MDRV_PALETTE_INIT(dkong2b)
+ MDRV_VIDEO_START(dkong)
+ MDRV_VIDEO_UPDATE(dkong)
- /* sound hardware */
- MDRV_SOUND_START(dkong)
+MACHINE_DRIVER_END
- MDRV_SPEAKER_STANDARD_MONO("mono")
- MDRV_SOUND_ADD_TAG("discrete", DISCRETE, 0)
- MDRV_SOUND_CONFIG_DISCRETE(radarscp)
- MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+static MACHINE_DRIVER_START( radarscp )
-MACHINE_DRIVER_END
+ MDRV_IMPORT_FROM(dkong_base)
-static MACHINE_DRIVER_START( radarsc1 )
+ MDRV_MACHINE_START(radarscp)
+ MDRV_PALETTE_LENGTH(RS_PALETTE_LENGTH)
+ MDRV_PALETTE_INIT(radarscp)
- /* basic machine hardware */
- MDRV_CPU_ADD(Z80, CLOCK_1H) /* 3.072 MHz (?) */
- MDRV_CPU_PROGRAM_MAP(radarsc1_map, 0)
- MDRV_CPU_VBLANK_INT(nmi_line_pulse,1)
+ /* sound hardware */
+ MDRV_IMPORT_FROM(radarscp_audio)
- MDRV_CPU_ADD(I8035,I8035_CLOCK)
- MDRV_CPU_PROGRAM_MAP(dkong_sound_map,0)
- MDRV_CPU_IO_MAP(radarsc1_sound_io_map, 0)
+MACHINE_DRIVER_END
- MDRV_MACHINE_START(dkong)
- MDRV_MACHINE_RESET(dkong)
+static MACHINE_DRIVER_START( radarsc1 )
- /* video hardware */
- MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
- MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
- MDRV_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
- MDRV_GFXDECODE(dkong)
- MDRV_PALETTE_LENGTH(256+256+8+1)
+ MDRV_IMPORT_FROM(dkong_base)
+ MDRV_MACHINE_START(radarsc1)
+ MDRV_PALETTE_LENGTH(RS_PALETTE_LENGTH)
MDRV_PALETTE_INIT(radarsc1)
- MDRV_VIDEO_START(radarsc1)
- MDRV_VIDEO_UPDATE(radarscp)
/* sound hardware */
- MDRV_SOUND_START(radarsc1)
+ MDRV_IMPORT_FROM(radarsc1_audio)
- MDRV_SPEAKER_STANDARD_MONO("mono")
-
- MDRV_SOUND_ADD_TAG("discrete", DISCRETE, 0)
- MDRV_SOUND_CONFIG_DISCRETE(radarscp)
- MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_DRIVER_END
-static MACHINE_DRIVER_START( dkong )
-
- /* basic machine hardware */
- MDRV_CPU_ADD(Z80, CLOCK_1H)
- MDRV_CPU_PROGRAM_MAP(dkong_map, 0)
- MDRV_CPU_VBLANK_INT(nmi_line_pulse,1)
- MDRV_CPU_ADD(I8035,I8035_CLOCK)
- MDRV_CPU_PROGRAM_MAP(dkong_sound_map,0)
- MDRV_CPU_IO_MAP(dkong_sound_io_map, 0)
+static MACHINE_DRIVER_START( dkong2b )
- MDRV_MACHINE_START(dkong)
- MDRV_MACHINE_RESET(dkong)
+ MDRV_IMPORT_FROM(dkong_base)
- /* video hardware */
- MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
- MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
- MDRV_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
- MDRV_GFXDECODE(dkong)
- MDRV_PALETTE_LENGTH(256)
-
- MDRV_PALETTE_INIT(dkong)
- MDRV_VIDEO_START(dkong)
- MDRV_VIDEO_UPDATE(dkong)
+ MDRV_MACHINE_START(dkong2b)
+ MDRV_PALETTE_LENGTH(DK2B_PALETTE_LENGTH)
/* sound hardware */
- MDRV_SOUND_START(dkong)
+ MDRV_IMPORT_FROM(dkong2b_audio)
- MDRV_SPEAKER_STANDARD_MONO("mono")
- MDRV_SOUND_ADD_TAG("discrete", DISCRETE, 0)
- MDRV_SOUND_CONFIG_DISCRETE(dkong)
- MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.7)
MACHINE_DRIVER_END
+
static MACHINE_DRIVER_START( hunchbkd )
+ MDRV_IMPORT_FROM(dkong2b)
+
/* basic machine hardware */
- MDRV_CPU_ADD_TAG("main", S2650, 3072000/2) /* ??? */
+ MDRV_CPU_REPLACE("main", S2650, CLOCK_1H / 2) /* ??? */
MDRV_CPU_PROGRAM_MAP(hunchbkd_map, 0)
MDRV_CPU_IO_MAP(hunchbkd_io_map, 0)
MDRV_CPU_VBLANK_INT(hunchbkd_interrupt,1)
- MDRV_CPU_ADD_TAG("sound", I8035,I8035_CLOCK)
- MDRV_CPU_PROGRAM_MAP(dkong_sound_map, 0)
- MDRV_CPU_IO_MAP(hunchbkd_sound_io_map, 0)
-
- MDRV_MACHINE_START(dkong)
- MDRV_MACHINE_RESET(dkong)
-
- /* video hardware */
- MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
- MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
- MDRV_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
- MDRV_GFXDECODE(dkong)
- MDRV_PALETTE_LENGTH(256)
-
- MDRV_PALETTE_INIT(dkong)
- MDRV_VIDEO_START(dkong)
- MDRV_VIDEO_UPDATE(dkong)
-
- /* sound hardware */
- MDRV_SOUND_START(hunchbkd)
+ MDRV_MACHINE_START(hunchbkd)
- MDRV_SPEAKER_STANDARD_MONO("mono")
- MDRV_SOUND_ADD(DAC, 0)
- MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.55)
MACHINE_DRIVER_END
static MACHINE_DRIVER_START( epos )
- /* basic machine hardware */
- MDRV_CPU_ADD(Z80, CLOCK_1H)
- MDRV_CPU_PROGRAM_MAP(epos_map, 0)
- MDRV_CPU_IO_MAP(epos_readport,0)
- MDRV_CPU_VBLANK_INT(nmi_line_pulse,1)
-
- MDRV_CPU_ADD(I8035,I8035_CLOCK)
- MDRV_CPU_PROGRAM_MAP(dkong_sound_map,0)
- MDRV_CPU_IO_MAP(dkong_sound_io_map, 0)
-
- MDRV_MACHINE_START(dkong)
- MDRV_MACHINE_RESET(dkong)
+ MDRV_IMPORT_FROM(dkong2b)
- /* video hardware */
- MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
- MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
- MDRV_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
- MDRV_GFXDECODE(dkong)
- MDRV_PALETTE_LENGTH(256)
-
- MDRV_PALETTE_INIT(dkong)
- MDRV_VIDEO_START(dkong)
- MDRV_VIDEO_UPDATE(dkong)
-
- /* sound hardware */
- MDRV_SOUND_START(hunchbkd)
+ MDRV_CPU_MODIFY("main")
+ MDRV_CPU_IO_MAP(epos_readport,0)
- MDRV_SPEAKER_STANDARD_MONO("mono")
- MDRV_SOUND_ADD(DAC, 0)
- MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.55)
MACHINE_DRIVER_END
static MACHINE_DRIVER_START( dkong3 )
+ /* driver data */
+ MDRV_DRIVER_DATA(dkong_state)
+
/* basic machine hardware */
MDRV_CPU_ADD(Z80,8000000/2) /* 4 MHz */
MDRV_CPU_PROGRAM_MAP(dkong3_map, 0)
MDRV_CPU_IO_MAP(0, dkong3_io_map)
MDRV_CPU_VBLANK_INT(nmi_line_pulse,1)
- MDRV_CPU_ADD(N2A03,N2A03_DEFAULTCLOCK)
- MDRV_CPU_PROGRAM_MAP(dkong3_sound1_map, 0)
- MDRV_CPU_VBLANK_INT(nmi_line_pulse,1)
-
- MDRV_CPU_ADD(N2A03,N2A03_DEFAULTCLOCK)
- MDRV_CPU_PROGRAM_MAP(dkong3_sound2_map, 0)
- MDRV_CPU_VBLANK_INT(nmi_line_pulse,1)
-
- MDRV_MACHINE_START(dkong)
+ MDRV_MACHINE_START(dkong2b)
MDRV_MACHINE_RESET(dkong)
/* video hardware */
@@ -1800,93 +1555,37 @@ static MACHINE_DRIVER_START( dkong3 )
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
MDRV_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
MDRV_GFXDECODE(dkong)
- MDRV_PALETTE_LENGTH(256)
+ MDRV_PALETTE_LENGTH(DK3_PALETTE_LENGTH)
MDRV_PALETTE_INIT(dkong3)
MDRV_VIDEO_START(dkong)
MDRV_VIDEO_UPDATE(dkong)
/* sound hardware */
- MDRV_SPEAKER_STANDARD_MONO("mono")
- MDRV_SOUND_ADD(NES, N2A03_DEFAULTCLOCK)
- MDRV_SOUND_CONFIG(nes_interface_1)
- MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-
- MDRV_SOUND_ADD(NES, N2A03_DEFAULTCLOCK)
- MDRV_SOUND_CONFIG(nes_interface_2)
- MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ MDRV_IMPORT_FROM(dkong3_audio)
MACHINE_DRIVER_END
static MACHINE_DRIVER_START( dkongjr )
- /* basic machine hardware */
- MDRV_CPU_ADD(Z80, CLOCK_1H)
- MDRV_CPU_PROGRAM_MAP(dkongjr_map, 0)
- MDRV_CPU_VBLANK_INT(nmi_line_pulse,1)
-
- MDRV_CPU_ADD(I8035,I8035_CLOCK)
- MDRV_CPU_PROGRAM_MAP(dkong_sound_map,0)
- MDRV_CPU_IO_MAP(dkong_sound_io_map, 0)
-
- MDRV_MACHINE_START(dkong)
- MDRV_MACHINE_RESET(dkong)
+ MDRV_IMPORT_FROM(dkong_base)
- /* video hardware */
- MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
- MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
- MDRV_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
- MDRV_GFXDECODE(dkong)
- MDRV_PALETTE_LENGTH(256)
-
- MDRV_PALETTE_INIT(dkong)
- MDRV_VIDEO_START(dkong)
- MDRV_VIDEO_UPDATE(dkong)
+ MDRV_CPU_MODIFY("main")
+ MDRV_CPU_PROGRAM_MAP(dkongjr_map, 0)
/* sound hardware */
- MDRV_SOUND_START(dkongjr)
+ MDRV_IMPORT_FROM(dkongjr_audio)
- MDRV_SPEAKER_STANDARD_MONO("mono")
- MDRV_SOUND_ADD(DAC, 0)
- MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.55)
-
- MDRV_SOUND_ADD(SAMPLES, 0)
- MDRV_SOUND_CONFIG(dkongjr_samples_interface)
- MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_DRIVER_END
static MACHINE_DRIVER_START( pestplce )
- /* basic machine hardware */
- MDRV_CPU_ADD(Z80, 3072000) /* 3.072 MHz (?) */
- MDRV_CPU_PROGRAM_MAP(pestplce_map, 0)
- MDRV_CPU_VBLANK_INT(nmi_line_pulse,1)
-
- MDRV_CPU_ADD(I8035,I8035_CLOCK)
- MDRV_CPU_PROGRAM_MAP(dkong_sound_map, 0)
- MDRV_CPU_IO_MAP(dkong_sound_io_map, 0)
-
- MDRV_MACHINE_START(dkong)
- MDRV_MACHINE_RESET(dkong)
+ MDRV_IMPORT_FROM(dkongjr)
- /* video hardware */
- MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
- MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
- MDRV_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
MDRV_GFXDECODE(pestplce)
- MDRV_PALETTE_LENGTH(256)
-
- MDRV_PALETTE_INIT(dkong) // wrong!
- MDRV_VIDEO_START(dkong)
+ MDRV_PALETTE_LENGTH(DK2B_PALETTE_LENGTH)
+ MDRV_PALETTE_INIT(dkong2b) // wrong!
MDRV_VIDEO_UPDATE(pestplce)
- /* sound hardware */
- MDRV_SOUND_START(hunchbkd)
-
- MDRV_SPEAKER_STANDARD_MONO("mono")
- MDRV_SOUND_ADD(DAC, 0)
- MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.55)
-
- /* samples */
MACHINE_DRIVER_END
static MACHINE_DRIVER_START( herbiedk )
@@ -1896,7 +1595,6 @@ static MACHINE_DRIVER_START( herbiedk )
MDRV_CPU_MODIFY("main")
MDRV_CPU_IO_MAP(herbiedk_io_map, 0)
- //MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(1000))
MACHINE_DRIVER_END
static MACHINE_DRIVER_START( spclforc )
@@ -2056,14 +1754,6 @@ ROM_START( dkong )
ROM_LOAD( "c-2k.bpr", 0x0000, 0x0100, CRC(e273ede5) SHA1(b50ec9e1837c00c20fb2a4369ec7dd0358321127) ) /* palette low 4 bits (inverted) */
ROM_LOAD( "c-2j.bpr", 0x0100, 0x0100, CRC(d6412358) SHA1(f9c872da2fe8e800574ae3bf483fb3ccacc92eb3) ) /* palette high 4 bits (inverted) */
ROM_LOAD( "v-5e.bpr", 0x0200, 0x0100, CRC(b869b8f5) SHA1(c2bdccbf2654b64ea55cd589fd21323a9178a660) ) /* character color codes on a per-column basis */
-
-/*********************************************************
-I use more appropreate filenames for color PROMs.
- ROM_REGION( 0x0300, REGION_PROMS, 0 )
- ROM_LOAD( "dkong.2k", 0x0000, 0x0100, CRC(1e82d375) )
- ROM_LOAD( "dkong.2j", 0x0100, 0x0100, CRC(2ab01dc8) )
- ROM_LOAD( "dkong.5f", 0x0200, 0x0100, CRC(44988665) )
-*********************************************************/
ROM_END
ROM_START( dkongo )
@@ -2092,14 +1782,6 @@ ROM_START( dkongo )
ROM_LOAD( "c-2k.bpr", 0x0000, 0x0100, CRC(e273ede5) SHA1(b50ec9e1837c00c20fb2a4369ec7dd0358321127) ) /* palette low 4 bits (inverted) */
ROM_LOAD( "c-2j.bpr", 0x0100, 0x0100, CRC(d6412358) SHA1(f9c872da2fe8e800574ae3bf483fb3ccacc92eb3) ) /* palette high 4 bits (inverted) */
ROM_LOAD( "v-5e.bpr", 0x0200, 0x0100, CRC(b869b8f5) SHA1(c2bdccbf2654b64ea55cd589fd21323a9178a660) ) /* character color codes on a per-column basis */
-
-/*********************************************************
-I use more appropreate filenames for color PROMs.
- ROM_REGION( 0x0300, REGION_PROMS, 0 )
- ROM_LOAD( "dkong.2k", 0x0000, 0x0100, CRC(1e82d375) )
- ROM_LOAD( "dkong.2j", 0x0100, 0x0100, CRC(2ab01dc8) )
- ROM_LOAD( "dkong.5f", 0x0200, 0x0100, CRC(44988665) )
-*********************************************************/
ROM_END
ROM_START( dkongjp )
@@ -2127,14 +1809,6 @@ ROM_START( dkongjp )
ROM_LOAD( "c-2k.bpr", 0x0000, 0x0100, CRC(e273ede5) SHA1(b50ec9e1837c00c20fb2a4369ec7dd0358321127) ) /* palette low 4 bits (inverted) */
ROM_LOAD( "c-2j.bpr", 0x0100, 0x0100, CRC(d6412358) SHA1(f9c872da2fe8e800574ae3bf483fb3ccacc92eb3) ) /* palette high 4 bits (inverted) */
ROM_LOAD( "v-5e.bpr", 0x0200, 0x0100, CRC(b869b8f5) SHA1(c2bdccbf2654b64ea55cd589fd21323a9178a660) ) /* character color codes on a per-column basis */
-
-/*********************************************************
-I use more appropreate filenames for color PROMs.
- ROM_REGION( 0x0300, REGION_PROMS, 0 )
- ROM_LOAD( "dkong.2k", 0x0000, 0x0100, CRC(1e82d375) )
- ROM_LOAD( "dkong.2j", 0x0100, 0x0100, CRC(2ab01dc8) )
- ROM_LOAD( "dkong.5f", 0x0200, 0x0100, CRC(44988665) )
-*********************************************************/
ROM_END
ROM_START( dkongjo )
@@ -2162,14 +1836,6 @@ ROM_START( dkongjo )
ROM_LOAD( "c-2k.bpr", 0x0000, 0x0100, CRC(e273ede5) SHA1(b50ec9e1837c00c20fb2a4369ec7dd0358321127) ) /* palette low 4 bits (inverted) */
ROM_LOAD( "c-2j.bpr", 0x0100, 0x0100, CRC(d6412358) SHA1(f9c872da2fe8e800574ae3bf483fb3ccacc92eb3) ) /* palette high 4 bits (inverted) */
ROM_LOAD( "v-5e.bpr", 0x0200, 0x0100, CRC(b869b8f5) SHA1(c2bdccbf2654b64ea55cd589fd21323a9178a660) ) /* character color codes on a per-column basis */
-
-/*********************************************************
-I use more appropreate filenames for color PROMs.
- ROM_REGION( 0x0300, REGION_PROMS, 0 )
- ROM_LOAD( "dkong.2k", 0x0000, 0x0100, CRC(1e82d375) )
- ROM_LOAD( "dkong.2j", 0x0100, 0x0100, CRC(2ab01dc8) )
- ROM_LOAD( "dkong.5f", 0x0200, 0x0100, CRC(44988665) )
-*********************************************************/
ROM_END
ROM_START( dkongjo1 )
@@ -2198,13 +1864,6 @@ ROM_START( dkongjo1 )
ROM_LOAD( "c-2j.bpr", 0x0100, 0x0100, CRC(d6412358) SHA1(f9c872da2fe8e800574ae3bf483fb3ccacc92eb3) ) /* palette high 4 bits (inverted) */
ROM_LOAD( "v-5e.bpr", 0x0200, 0x0100, CRC(b869b8f5) SHA1(c2bdccbf2654b64ea55cd589fd21323a9178a660) ) /* character color codes on a per-column basis */
-/*********************************************************
-I use more appropreate filenames for color PROMs.
- ROM_REGION( 0x0300, REGION_PROMS, 0 )
- ROM_LOAD( "dkong.2k", 0x0000, 0x0100, CRC(1e82d375) )
- ROM_LOAD( "dkong.2j", 0x0100, 0x0100, CRC(2ab01dc8) )
- ROM_LOAD( "dkong.5f", 0x0200, 0x0100, CRC(44988665) )
-*********************************************************/
ROM_END
ROM_START( dkongjr )
@@ -2518,7 +2177,10 @@ ROM_START( hunchbkd )
ROM_LOAD( "hbprom.2e", 0x0000, 0x0100, CRC(37aab98f) SHA1(0b002ab82158854bdd4a9db05eee037711017313) ) /* palette low 4 bits (inverted) */
ROM_LOAD( "hbprom.2f", 0x0100, 0x0100, CRC(845b8dcc) SHA1(eebd0c024172e54b509f1f99d9159438d5f3a905) ) /* palette high 4 bits (inverted) */
ROM_LOAD( "hbprom.2n", 0x0200, 0x0100, CRC(dff9070a) SHA1(307b95749343b5106247d842f773b2b445faa156) ) /* character color codes on a per-column basis */
- ROM_LOAD( "82s147.prm", 0x0300, 0x0200, CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* unknown */
+ ROM_LOAD( "82s147.prm", 0x0300, 0x0200, CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* address mapping */
+
+ ROM_REGION( 0x0100, REGION_PLDS, ROMREGION_DISPOSE )
+ ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */
ROM_END
ROM_START( sbdk )
@@ -2541,10 +2203,14 @@ ROM_START( sbdk )
ROM_LOAD( "sb-dk.7e", 0x1000, 0x0800, CRC(8e48b13e) SHA1(b4589685a60a8463f656a4f5b0dedfb265c3b3e4) )
ROM_LOAD( "sb-dk.7f", 0x1800, 0x0800, CRC(989969f3) SHA1(de641082476ac3da3872461263566dfb398ea43a) )
- ROM_REGION( 0x0300, REGION_PROMS, 0 )
+ ROM_REGION( 0x0500, REGION_PROMS, 0 )
ROM_LOAD( "sb.2e", 0x0000, 0x0100, CRC(4f06f789) SHA1(0b2775dd8da1c20121639871ed291a015a34e1f6) )
ROM_LOAD( "sb.2f", 0x0100, 0x0100, CRC(2c15b1b2) SHA1(7c80eb77ba47e2f4d889fc10663a0391d4329a1d) )
ROM_LOAD( "sb.2n", 0x0200, 0x0100, CRC(dff9070a) SHA1(307b95749343b5106247d842f773b2b445faa156) )
+ ROM_LOAD( "82s147.prm", 0x0300, 0x0200, CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* address mapping */
+
+ ROM_REGION( 0x0100, REGION_PLDS, ROMREGION_DISPOSE )
+ ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */
ROM_END
ROM_START( herbiedk )
@@ -2571,7 +2237,7 @@ ROM_START( herbiedk )
ROM_LOAD( "74s287.2k", 0x0000, 0x0100, CRC(7dc0a381) SHA1(7d974b2249392160e3b800e7113d4899c3600b7f) ) /* palette high 4 bits (inverted) */
ROM_LOAD( "74s287.2j", 0x0100, 0x0100, CRC(0a440c00) SHA1(e3249a646cd8aa50739e09ae101e796ea3aac37a) ) /* palette low 4 bits (inverted) */
ROM_LOAD( "74s287.vid", 0x0200, 0x0100, CRC(5a3446cc) SHA1(158de015006e6c400cb7ee758fda7ff760eb5835) ) /* character color codes on a per-column basis */
- ROM_LOAD( "82s147.hh", 0x0300, 0x0200, CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* unknown */
+ ROM_LOAD( "82s147.hh", 0x0300, 0x0200, CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* address mapping */
ROM_REGION( 0x0100, REGION_PLDS, ROMREGION_DISPOSE )
ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, CRC(d6a04bcc) SHA1(ef1ed4311869d46dec95c2bfb31875c2f022da4f) )
@@ -2602,10 +2268,14 @@ ROM_START( herodk )
ROM_LOAD( "yellow.7e", 0x1000, 0x0800, CRC(f6272e96) SHA1(a9608966613aedb36cfb04f85730efed9a44d17c) )
ROM_LOAD( "violet.7f", 0x1800, 0x0800, CRC(ca020685) SHA1(fe0d8d85c3bf244384e9c94f6a7f17db31083245) )
- ROM_REGION( 0x0300, REGION_PROMS, 0 )
+ ROM_REGION( 0x0500, REGION_PROMS, 0 )
ROM_LOAD( "82s129.2e", 0x0000, 0x0100, CRC(da4b47e6) SHA1(2cfc7d489002113eb91048cc29d24831dadbfabb) ) /* palette low 4 bits (inverted) */
ROM_LOAD( "82s129.2f", 0x0100, 0x0100, CRC(96e213a4) SHA1(38f21e7bce96fd2159aa61e64d66aa574d85873c) ) /* palette high 4 bits (inverted) */
ROM_LOAD( "82s126.2n", 0x0200, 0x0100, CRC(37aece4b) SHA1(08dbb470644278132b8126649fe41d70e7750bee) ) /* character color codes on a per-column basis */
+ ROM_LOAD( "82s147.prm", 0x0300, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* no dump - taken from hunchbkd */
+
+ ROM_REGION( 0x0100, REGION_PLDS, ROMREGION_DISPOSE )
+ ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */
ROM_END
ROM_START( herodku )
@@ -2631,10 +2301,14 @@ ROM_START( herodku )
ROM_LOAD( "yellow.7e", 0x1000, 0x0800, CRC(f6272e96) SHA1(a9608966613aedb36cfb04f85730efed9a44d17c) )
ROM_LOAD( "violet.7f", 0x1800, 0x0800, CRC(ca020685) SHA1(fe0d8d85c3bf244384e9c94f6a7f17db31083245) )
- ROM_REGION( 0x0300, REGION_PROMS, 0 )
+ ROM_REGION( 0x0500, REGION_PROMS, 0 )
ROM_LOAD( "82s129.2e", 0x0000, 0x0100, CRC(da4b47e6) SHA1(2cfc7d489002113eb91048cc29d24831dadbfabb) ) /* palette low 4 bits (inverted) */
ROM_LOAD( "82s129.2f", 0x0100, 0x0100, CRC(96e213a4) SHA1(38f21e7bce96fd2159aa61e64d66aa574d85873c) ) /* palette high 4 bits (inverted) */
ROM_LOAD( "82s126.2n", 0x0200, 0x0100, CRC(37aece4b) SHA1(08dbb470644278132b8126649fe41d70e7750bee) ) /* character color codes on a per-column basis */
+ ROM_LOAD( "82s147.prm", 0x0300, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* no dump - taken from hunchbkd */
+
+ ROM_REGION( 0x0100, REGION_PLDS, ROMREGION_DISPOSE )
+ ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */
ROM_END
ROM_START( spclforc )
@@ -2654,10 +2328,14 @@ ROM_START( spclforc )
ROM_LOAD( "2732.7e", 0x2000, 0x1000, CRC(f6a113bd) SHA1(2f8776780284081f7858334766be6a6fde3a3371) )
ROM_LOAD( "2732.7f", 0x3000, 0x1000, CRC(42857a7a) SHA1(267dd954480bc87f14c758803cb26b7812d323b8) )
- ROM_REGION( 0x0300, REGION_PROMS, 0 )
+ ROM_REGION( 0x0500, REGION_PROMS, 0 )
ROM_LOAD( "82s126.2e", 0x0000, 0x0100, CRC(b3751a25) SHA1(4b444e8fd02ac8674ecaba2fee083cb9feb99fa0) )
ROM_LOAD( "82s126.2f", 0x0100, 0x0100, CRC(1026d438) SHA1(927009e6ed520c39c36c1d7966589c6778df1a3a) )
ROM_LOAD( "82s126.2n", 0x0200, 0x0100, CRC(9735998d) SHA1(c3f50f97369547b1fd25da64507a5c8b725de6d0) )
+ ROM_LOAD( "82s147.prm", 0x0300, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* no dump - taken from hunchbkd */
+
+ ROM_REGION( 0x0100, REGION_PLDS, ROMREGION_DISPOSE )
+ ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */
ROM_END
ROM_START( spcfrcii )
@@ -2677,10 +2355,14 @@ ROM_START( spcfrcii )
ROM_LOAD( "spfc2.7e", 0x2000, 0x1000, CRC(f6a113bd) SHA1(2f8776780284081f7858334766be6a6fde3a3371) )
ROM_LOAD( "spfc2.7f", 0x3000, 0x1000, CRC(42857a7a) SHA1(267dd954480bc87f14c758803cb26b7812d323b8) )
- ROM_REGION( 0x0300, REGION_PROMS, 0 )
+ ROM_REGION( 0x0500, REGION_PROMS, 0 )
ROM_LOAD( "spfc2.2e", 0x0000, 0x0100, CRC(b3751a25) SHA1(4b444e8fd02ac8674ecaba2fee083cb9feb99fa0) )
ROM_LOAD( "spfc2.2f", 0x0100, 0x0100, CRC(1026d438) SHA1(927009e6ed520c39c36c1d7966589c6778df1a3a) )
ROM_LOAD( "spfc2.2n", 0x0200, 0x0100, CRC(9735998d) SHA1(c3f50f97369547b1fd25da64507a5c8b725de6d0) )
+ ROM_LOAD( "82s147.prm", 0x0300, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* no dump - taken from hunchbkd */
+
+ ROM_REGION( 0x0100, REGION_PLDS, ROMREGION_DISPOSE )
+ ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */
ROM_END
ROM_START( 8ballact )
@@ -2706,10 +2388,14 @@ ROM_START( 8ballact )
ROM_LOAD( "8b-dk.7e", 0x1000, 0x0800, CRC(655af8a8) SHA1(d434efc89226d28d24e858186fab9aff0e476deb) )
ROM_LOAD( "8b-dk.7f", 0x1800, 0x0800, CRC(a29b2763) SHA1(6b2ee88e96a1b74193f12f4fa64a6705f17557b1) )
- ROM_REGION( 0x0300, REGION_PROMS, 0 )
+ ROM_REGION( 0x0500, REGION_PROMS, 0 )
ROM_LOAD( "8b.2e", 0x0000, 0x0100, CRC(c7379a12) SHA1(e128e7d7c71ec61b934651c29648d0d2fc69e306) )
ROM_LOAD( "8b.2f", 0x0100, 0x0100, CRC(116612b4) SHA1(9a7c5329f211b13d5a757fdac761d7096d78b65a) )
ROM_LOAD( "8b.2n", 0x0200, 0x0100, CRC(30586988) SHA1(a9c246fd01cb3ff371ad33b55d5b2fe4898c4d1b) )
+ ROM_LOAD( "82s147.prm", 0x0300, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* no dump - taken from hunchbkd */
+
+ ROM_REGION( 0x0100, REGION_PLDS, ROMREGION_DISPOSE )
+ ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */
ROM_END
ROM_START( 8ballat2 )
@@ -2735,10 +2421,14 @@ ROM_START( 8ballat2 )
ROM_LOAD( "8b-jr.7e", 0x1000, 0x0800, CRC(655af8a8) SHA1(d434efc89226d28d24e858186fab9aff0e476deb) )
ROM_LOAD( "8b-jr.7f", 0x1800, 0x0800, CRC(a29b2763) SHA1(6b2ee88e96a1b74193f12f4fa64a6705f17557b1) )
- ROM_REGION( 0x0300, REGION_PROMS, 0 )
+ ROM_REGION( 0x0500, REGION_PROMS, 0 )
ROM_LOAD( "8b.2e", 0x0000, 0x0100, CRC(c7379a12) SHA1(e128e7d7c71ec61b934651c29648d0d2fc69e306) )
ROM_LOAD( "8b.2f", 0x0100, 0x0100, CRC(116612b4) SHA1(9a7c5329f211b13d5a757fdac761d7096d78b65a) )
ROM_LOAD( "8b.2n", 0x0200, 0x0100, CRC(30586988) SHA1(a9c246fd01cb3ff371ad33b55d5b2fe4898c4d1b) )
+ ROM_LOAD( "82s147.prm", 0x0300, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) ) /* no dump - taken from hunchbkd */
+
+ ROM_REGION( 0x0100, REGION_PLDS, ROMREGION_DISPOSE )
+ ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */
ROM_END
/* encrypted */
@@ -2749,8 +2439,8 @@ ROM_START( drakton )
ROM_REGION( 0x1000, REGION_CPU2, 0 ) /* sound */
/* one is used for dkong conversions, the other one for dkongjr conversions */
- ROM_LOAD( "2716.3h", 0x0000, 0x0800, CRC(3489a35b) SHA1(9ebcf4b20b212d54e6b1a6d9abbda3109298631b) )
- ROM_LOAD( "2716.3h1", 0x0000, 0x0800, CRC(2a6ec016) SHA1(c95e185a39c8029f00798ce0a00759a4deb45677) )
+ ROM_LOAD( "2716.3h", 0x0000, 0x0800, CRC(3489a35b) SHA1(9ebcf4b20b212d54e6b1a6d9abbda3109298631b) ) /* dkong */
+ ROM_LOAD( "2716.3h1", 0x0800, 0x0800, CRC(2a6ec016) SHA1(c95e185a39c8029f00798ce0a00759a4deb45677) ) /* dkongjr */
ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE )
ROM_LOAD( "2716.3n", 0x0000, 0x0800, CRC(ea0e7f9a) SHA1(a8e2b43e15281d45e414eaae98e5248bad79c41b) )
@@ -2901,7 +2591,6 @@ static DRIVER_INIT( herodk )
int A;
UINT8 *rom = memory_region(REGION_CPU1);
-
/* swap data lines D3 and D4 */
for (A = 0;A < 0x8000;A++)
{
@@ -2915,48 +2604,52 @@ static DRIVER_INIT( herodk )
}
}
+
+
/*************************************
*
* Game drivers
*
*************************************/
-GAME( 1980, radarscp, 0, radarscp, radarscp, 0, ROT90, "Nintendo", "Radar Scope", GAME_SUPPORTS_SAVE )
-GAME( 1980, radarsc1, 0, radarsc1, radarscp, 0, ROT90, "Nintendo", "Radar Scope (TRS01)", GAME_SUPPORTS_SAVE )
-GAME( 1981, dkong, 0, dkong, dkong, 0, ROT90, "Nintendo of America", "Donkey Kong (US set 1)", GAME_SUPPORTS_SAVE )
-GAME( 1981, dkongo, dkong, dkong, dkong, 0, ROT90, "Nintendo", "Donkey Kong (US set 2)", GAME_SUPPORTS_SAVE )
-GAME( 1981, dkongjp, dkong, dkong, dkong, 0, ROT90, "Nintendo", "Donkey Kong (Japan set 1)", GAME_SUPPORTS_SAVE )
-GAME( 1981, dkongjo, dkong, dkong, dkong, 0, ROT90, "Nintendo", "Donkey Kong (Japan set 2)", GAME_SUPPORTS_SAVE )
-GAME( 1981, dkongjo1, dkong, dkong, dkong, 0, ROT90, "Nintendo", "Donkey Kong (Japan set 3) (bad dump?)", GAME_SUPPORTS_SAVE )
+GAME( 1980, radarscp, 0, radarscp, radarscp, 0, ROT90, "Nintendo", "Radar Scope", GAME_SUPPORTS_SAVE )
+GAME( 1980, radarsc1, radarscp, radarsc1, radarscp, 0, ROT90, "Nintendo", "Radar Scope (TRS01)", GAME_SUPPORTS_SAVE )
+
+GAME( 1981, dkong, 0, dkong2b, dkong, 0, ROT90, "Nintendo of America", "Donkey Kong (US set 1)", GAME_SUPPORTS_SAVE )
+GAME( 1981, dkongo, dkong, dkong2b, dkong, 0, ROT90, "Nintendo", "Donkey Kong (US set 2)", GAME_SUPPORTS_SAVE )
+GAME( 1981, dkongjp, dkong, dkong2b, dkong, 0, ROT90, "Nintendo", "Donkey Kong (Japan set 1)", GAME_SUPPORTS_SAVE )
+GAME( 1981, dkongjo, dkong, dkong2b, dkong, 0, ROT90, "Nintendo", "Donkey Kong (Japan set 2)", GAME_SUPPORTS_SAVE )
+GAME( 1981, dkongjo1, dkong, dkong2b, dkong, 0, ROT90, "Nintendo", "Donkey Kong (Japan set 3) (bad dump?)", GAME_SUPPORTS_SAVE )
-GAME( 1982, dkongjr, 0, dkongjr, dkong, 0, ROT90, "Nintendo of America", "Donkey Kong Junior (US)", GAME_SUPPORTS_SAVE )
-GAME( 1982, dkongjrj, dkongjr, dkongjr, dkong, 0, ROT90, "Nintendo", "Donkey Kong Jr. (Japan)", GAME_SUPPORTS_SAVE )
-GAME( 1982, dkngjnrj, dkongjr, dkongjr, dkong, 0, ROT90, "Nintendo", "Donkey Kong Junior (Japan?)", GAME_SUPPORTS_SAVE )
-GAME( 1982, dkongjrb, dkongjr, dkongjr, dkong, 0, ROT90, "bootleg", "Donkey Kong Jr. (bootleg)", GAME_SUPPORTS_SAVE )
-GAME( 1982, dkngjnrb, dkongjr, dkongjr, dkong, 0, ROT90, "Nintendo of America", "Donkey Kong Junior (bootleg?)", GAME_SUPPORTS_SAVE )
+GAME( 1982, dkongjr, 0, dkongjr, dkongjr, 0, ROT90, "Nintendo of America", "Donkey Kong Junior (US)", GAME_SUPPORTS_SAVE )
+GAME( 1982, dkongjrj, dkongjr, dkongjr, dkongjr, 0, ROT90, "Nintendo", "Donkey Kong Jr. (Japan)", GAME_SUPPORTS_SAVE )
+GAME( 1982, dkngjnrj, dkongjr, dkongjr, dkongjr, 0, ROT90, "Nintendo", "Donkey Kong Junior (Japan?)", GAME_SUPPORTS_SAVE )
+GAME( 1982, dkongjrb, dkongjr, dkongjr, dkongjr, 0, ROT90, "bootleg", "Donkey Kong Jr. (bootleg)", GAME_SUPPORTS_SAVE )
+GAME( 1982, dkngjnrb, dkongjr, dkongjr, dkongjr, 0, ROT90, "Nintendo of America", "Donkey Kong Junior (bootleg?)", GAME_SUPPORTS_SAVE )
-GAME( 1983, dkong3, 0, dkong3, dkong3, 0, ROT90, "Nintendo of America", "Donkey Kong 3 (US)", GAME_SUPPORTS_SAVE )
-GAME( 1983, dkong3j, dkong3, dkong3, dkong3, 0, ROT90, "Nintendo", "Donkey Kong 3 (Japan)", GAME_SUPPORTS_SAVE )
-GAME( 1984, dkong3b, dkong3, dkong3b, dkong3b, 0, ROT90, "bootleg", "Donkey Kong 3 (bootleg on Donkey Kong Jr. hardware)", GAME_SUPPORTS_SAVE )
+GAME( 1983, dkong3, 0, dkong3, dkong3, 0, ROT90, "Nintendo of America", "Donkey Kong 3 (US)", GAME_SUPPORTS_SAVE )
+GAME( 1983, dkong3j, dkong3, dkong3, dkong3, 0, ROT90, "Nintendo", "Donkey Kong 3 (Japan)", GAME_SUPPORTS_SAVE )
+GAME( 1984, dkong3b, dkong3, dkong3b, dkong3b, 0, ROT90, "bootleg", "Donkey Kong 3 (bootleg on Donkey Kong Jr. hardware)", GAME_SUPPORTS_SAVE )
-GAME( 1984, herbiedk, huncholy, herbiedk, herbiedk, 0, ROT90, "CVS", "Herbie at the Olympics (DK conversion)", GAME_SUPPORTS_SAVE )
+GAME( 1984, herbiedk, huncholy, herbiedk, herbiedk, 0, ROT90, "CVS", "Herbie at the Olympics (DK conversion)", GAME_SUPPORTS_SAVE )
-GAME( 1983, hunchbkd, hunchbak, hunchbkd, hunchbkd, 0, ROT90, "Century Electronics", "Hunchback (DK conversion)", GAME_WRONG_COLORS | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
+GAME( 1983, hunchbkd, hunchbak, hunchbkd, hunchbkd, 0, ROT90, "Century Electronics", "Hunchback (DK conversion)", GAME_WRONG_COLORS | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
-GAME( 1984, sbdk, superbik, hunchbkd, sbdk, 0, ROT90, "Century Electronics", "Super Bike (DK conversion)", GAME_SUPPORTS_SAVE )
+GAME( 1984, sbdk, superbik, hunchbkd, sbdk, 0, ROT90, "Century Electronics", "Super Bike (DK conversion)", GAME_SUPPORTS_SAVE )
GAME( 1984, herodk, hero, hunchbkd, herodk, herodk, ROT90, "Seatongrove Ltd (Crown license)", "Hero in the Castle of Doom (DK conversion)", GAME_SUPPORTS_SAVE )
-GAME( 1984, herodku, hero, hunchbkd, herodk, 0, ROT90, "Seatongrove Ltd (Crown license)", "Hero in the Castle of Doom (DK conversion not encrypted)", GAME_SUPPORTS_SAVE )
+GAME( 1984, herodku, hero, hunchbkd, herodk, 0, ROT90, "Seatongrove Ltd (Crown license)", "Hero in the Castle of Doom (DK conversion not encrypted)", GAME_SUPPORTS_SAVE )
-GAME( 1984, 8ballact, 0, eightact, 8ballact, 0, ROT90, "Seatongrove Ltd (Magic Eletronics USA licence)", "Eight Ball Action (DK conversion)", GAME_SUPPORTS_SAVE )
-GAME( 1984, 8ballat2, 8ballact, eightact, 8ballact, 0, ROT90, "Seatongrove Ltd (Magic Eletronics USA licence)", "Eight Ball Action (DKJr conversion)", GAME_SUPPORTS_SAVE )
+GAME( 1984, 8ballact, 0, eightact, 8ballact, 0, ROT90, "Seatongrove Ltd (Magic Eletronics USA licence)", "Eight Ball Action (DK conversion)", GAME_SUPPORTS_SAVE )
+GAME( 1984, 8ballat2, 8ballact, eightact, 8ballact, 0, ROT90, "Seatongrove Ltd (Magic Eletronics USA licence)", "Eight Ball Action (DKJr conversion)", GAME_SUPPORTS_SAVE )
-GAME( 1984, shootgal, 0, shootgal, shootgal, 0, ROT180, "Seatongrove Ltd (Zaccaria licence)", "Shooting Gallery", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
+GAME( 1984, shootgal, 0, shootgal, shootgal, 0, ROT180, "Seatongrove Ltd (Zaccaria licence)", "Shooting Gallery", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
-GAME( 1983, pestplce, mario, pestplce, pestplce, 0, ROT180, "bootleg", "Pest Place", GAME_WRONG_COLORS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
+GAME( 1983, pestplce, mario, pestplce, pestplce, 0, ROT180, "bootleg", "Pest Place", GAME_WRONG_COLORS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
-GAME( 1985, spclforc, 0, spclforc, spclforc, 0, ROT90, "Senko Industries (Magic Eletronics Inc. licence)", "Special Forces", GAME_NO_SOUND | GAME_SUPPORTS_SAVE )
-GAME( 1985, spcfrcii, 0, spclforc, spclforc, 0, ROT90, "Senko Industries (Magic Eletronics Inc. licence)", "Special Forces II", GAME_NO_SOUND | GAME_SUPPORTS_SAVE )
+GAME( 1985, spclforc, 0, spclforc, spclforc, 0, ROT90, "Senko Industries (Magic Eletronics Inc. licence)", "Special Forces", GAME_NO_SOUND | GAME_SUPPORTS_SAVE )
+GAME( 1985, spcfrcii, 0, spclforc, spclforc, 0, ROT90, "Senko Industries (Magic Eletronics Inc. licence)", "Special Forces II", GAME_NO_SOUND | GAME_SUPPORTS_SAVE )
-GAME( 1984, drakton, 0, drakton, drakton, drakton, ROT90, "Epos Corporation", "Drakton", GAME_NO_SOUND | GAME_SUPPORTS_SAVE )
-GAME( 1985, strtheat, 0, strtheat, strtheat, strtheat, ROT90, "Epos Corporation", "Street Heat - Cardinal Amusements", GAME_NO_SOUND | GAME_SUPPORTS_SAVE )
+//FIXME: move DRIVER_INIT here
+GAME( 1984, drakton, 0, drakton, drakton, drakton, ROT90, "Epos Corporation", "Drakton", GAME_SUPPORTS_SAVE )
+GAME( 1985, strtheat, 0, strtheat, strtheat, strtheat, ROT90, "Epos Corporation", "Street Heat - Cardinal Amusements", GAME_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/dribling.c b/src/mame/drivers/dribling.c
index 8d4af6a52d8..59f0866a80e 100644
--- a/src/mame/drivers/dribling.c
+++ b/src/mame/drivers/dribling.c
@@ -186,7 +186,7 @@ static WRITE8_HANDLER( iowrite )
*
*************************************/
-static ppi8255_interface ppi8255_intf =
+static const ppi8255_interface ppi8255_intf =
{
2,
{ dsr_r, NULL },
diff --git a/src/mame/drivers/drw80pkr.c b/src/mame/drivers/drw80pkr.c
new file mode 100644
index 00000000000..54f52a5f773
--- /dev/null
+++ b/src/mame/drivers/drw80pkr.c
@@ -0,0 +1,274 @@
+/**********************************************************************************
+
+
+ DRAW 80 POKER
+
+ Driver by Jim Stolis.
+
+
+ --- Technical Notes ---
+
+ Name: Draw 80 Poker
+ Company: IGT - International Gaming Technology
+ Year: 1983
+
+ Hardware:
+
+ CPU = INTEL 8039 ; I8039 compatible
+ VIDEO = SYS 6545 ; CRTC6845 compatible
+ SND = AY-3-8912 ; AY8910 compatible
+
+ History:
+
+ This is one of the first video machines produced by IGT. Originally, the
+ company was called SIRCOMA and was founded in 1979. It became a public
+ company in 1981 and changed its name to IGT. The motherboard has a date
+ of 1982 (c) IGT, but the game rom labels and backglass are dated 1983.
+
+***********************************************************************************/
+#include "driver.h"
+#include "sound/ay8910.h"
+#include "cpu/i8039/i8039.h"
+#include "video/crtc6845.h"
+
+static tilemap *bg_tilemap;
+
+static UINT8 p1, p2, p4, bus;
+
+static UINT8 *pkr_cmos_ram;
+
+
+/*****************
+* Write Handlers *
+******************/
+
+WRITE8_HANDLER( p1_w )
+{
+ p1 = data;
+}
+
+WRITE8_HANDLER( p2_w )
+{
+ p2 = data;
+}
+
+WRITE8_HANDLER( p4_w )
+{
+ p4 = data;
+}
+
+WRITE8_HANDLER( bus_w )
+{
+ bus = data;
+}
+
+WRITE8_HANDLER( drw80pkr_cmos_w )
+{
+ //if (p2 == 0xc7) CRTC Register
+ //if (p2 == 0xd7) CRTC Address
+ pkr_cmos_ram[offset] = data;
+}
+
+/****************
+* Read Handlers *
+****************/
+
+READ8_HANDLER( p1_r )
+{
+ return p1;
+}
+
+READ8_HANDLER( p2_r )
+{
+ return p2;
+}
+
+READ8_HANDLER( bus_r )
+{
+ return bus;
+}
+
+READ8_HANDLER( drw80pkr_cmos_r )
+{
+ return pkr_cmos_ram[offset];
+}
+
+/****************************
+* Video/Character functions *
+****************************/
+
+static TILE_GET_INFO( get_bg_tile_info )
+{
+ int vr = 0;
+ int code = vr;
+ int color = 0;
+
+ SET_TILE_INFO(0, code, color, 0);
+}
+
+VIDEO_START( drw80pkr )
+{
+ bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 40, 25);
+}
+
+VIDEO_UPDATE( drw80pkr )
+{
+ tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0);
+
+ return 0;
+}
+
+PALETTE_INIT( drw80pkr )
+{
+/* prom bits
+ 7654 3210
+ ---- -xxx red component.
+ --xx x--- green component.
+ xx-- ---- blue component.
+*/
+ int i;
+
+ for (i = 0;i < machine->drv->total_colors;i++)
+ {
+ int bit0, bit1, bit2, r, g, b;
+
+ /* red component */
+ bit0 = (~color_prom[i] >> 0) & 0x01;
+ bit1 = (~color_prom[i] >> 1) & 0x01;
+ bit2 = (~color_prom[i] >> 2) & 0x01;
+ r = 0x21 * bit2 + 0x47 * bit1 + 0x97 * bit0;
+
+ /* green component */
+ bit0 = (~color_prom[i] >> 3) & 0x01;
+ bit1 = (~color_prom[i] >> 4) & 0x01;
+ bit2 = (~color_prom[i] >> 5) & 0x01;
+ g = 0x21 * bit2 + 0x47 * bit1 + 0x97 * bit0;
+
+ /* blue component */
+ bit0 = (~color_prom[i] >> 6) & 0x01;
+ bit1 = (~color_prom[i] >> 7) & 0x01;
+ bit2 = 0;
+ b = 0x21 * bit2 + 0x47 * bit1 + 0x97 * bit0;
+
+ palette_set_color(machine, i, MAKE_RGB(r, g, b));
+ }
+}
+
+
+/*************************
+* Graphics Layouts *
+*************************/
+
+static const gfx_layout charlayout =
+{
+ 8,8, /* 8x8 characters */
+ 0x200, /* 512 characters */
+ 2, /* 2 bitplanes */
+ { 0x200*8*8*1, 0x200*8*8*0 }, /* bitplane offsets */
+ { 0, 1, 2, 3, 4, 5, 6, 7 },
+ { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
+ 8*8
+};
+
+
+/******************************
+* Graphics Decode Information *
+******************************/
+
+static GFXDECODE_START( drw80pkr )
+ GFXDECODE_ENTRY( REGION_GFX1, 0x00000, charlayout, 0, 16 )
+GFXDECODE_END
+
+
+/**************
+* Driver Init *
+***************/
+
+static DRIVER_INIT( drw80pkr )
+{
+
+}
+
+
+/*************************
+* Memory map information *
+*************************/
+
+static ADDRESS_MAP_START( drw80pkr_map, ADDRESS_SPACE_PROGRAM, 8 )
+ AM_RANGE(0x0000, 0x1fff) AM_READWRITE(MRA8_ROM, MWA8_ROM)
+ADDRESS_MAP_END
+
+static ADDRESS_MAP_START( drw80pkr_io_map, ADDRESS_SPACE_IO, 8 )
+ AM_RANGE(0x00, 0xff) AM_RAM AM_READWRITE(drw80pkr_cmos_r, drw80pkr_cmos_w) AM_BASE(&pkr_cmos_ram)
+ AM_RANGE(I8039_t1, I8039_t1) AM_RAM
+ AM_RANGE(I8039_p1, I8039_p1) AM_RAM AM_READWRITE(p1_r, p1_w)
+ AM_RANGE(I8039_p2, I8039_p2) AM_RAM AM_READWRITE(p2_r, p2_w)
+ AM_RANGE(I8039_p4, I8039_p4) AM_RAM AM_WRITE(p4_w)
+ AM_RANGE(I8039_bus, I8039_bus) AM_RAM AM_READWRITE(bus_r, bus_w)
+ADDRESS_MAP_END
+
+/*************************
+* Input ports *
+*************************/
+
+static INPUT_PORTS_START( drw80pkr )
+ // Unknown at this time
+INPUT_PORTS_END
+
+/*************************
+* Machine Driver *
+*************************/
+
+static MACHINE_DRIVER_START( drw80pkr )
+ // basic machine hardware
+ MDRV_CPU_ADD_TAG("main", I8039, 7864300)
+ MDRV_CPU_PROGRAM_MAP(drw80pkr_map, 0)
+ MDRV_CPU_IO_MAP(drw80pkr_io_map, 0)
+ MDRV_CPU_VBLANK_INT(irq0_line_hold, 1)
+
+ MDRV_SCREEN_REFRESH_RATE(60)
+ MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION)
+
+ // video hardware
+ MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
+ MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
+ MDRV_SCREEN_SIZE((31+1)*8, (31+1)*8)
+ MDRV_SCREEN_VISIBLE_AREA(0*8, 24*8-1, 0*8, 27*8-1)
+
+ MDRV_GFXDECODE(drw80pkr)
+ MDRV_PALETTE_LENGTH(16*16)
+
+ MDRV_PALETTE_INIT(drw80pkr)
+ MDRV_VIDEO_START(drw80pkr)
+ MDRV_VIDEO_UPDATE(drw80pkr)
+
+ // sound hardware
+ MDRV_SOUND_ADD(AY8912, 20000000/12)
+ MDRV_SPEAKER_STANDARD_MONO("mono")
+ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
+MACHINE_DRIVER_END
+
+/*************************
+* Rom Load *
+*************************/
+
+ROM_START( drw80pkr )
+ ROM_REGION( 0x2000, REGION_CPU1, 0 )
+ ROM_LOAD( "pm0.u81", 0x0000, 0x1000, CRC(0f3e97d2) SHA1(aa9e4015246284f32435d7320de667e075412e5b) )
+ ROM_LOAD( "pm1.u82", 0x1000, 0x1000, CRC(5a6ad467) SHA1(0128bd70b65244a0f68031d5f451bf115eeb7609) )
+
+ ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE )
+ ROM_LOAD( "cg0-a.u74", 0x0000, 0x1000, CRC(97f5eb92) SHA1(f6c7bb42ccef8a78e8d56104ad942ae5b8e5b0df) )
+ ROM_LOAD( "cg1-a.u76", 0x1000, 0x1000, CRC(2a3a750d) SHA1(db6183d11b2865b011c3748dc472cf5858dde78f) )
+
+ ROM_REGION( 0x100, REGION_PROMS, 0 ) // WRONG CAP
+ ROM_LOAD( "cap13.u92", 0x0000, 0x0100, CRC(42d6e973) SHA1(5c2983d5c80333ca45033070a2296fe58c339ee1) )
+ROM_END
+
+
+/*************************
+* Game Drivers *
+*************************/
+
+/* YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS */
+GAME( 1983, drw80pkr, 0, drw80pkr, drw80pkr, drw80pkr, ROT0, "IGT - International Gaming Technology", "Draw 80 Poker", GAME_NOT_WORKING )
diff --git a/src/mame/drivers/eolith.c b/src/mame/drivers/eolith.c
index 31de463e57a..2ef2cbe9b59 100644
--- a/src/mame/drivers/eolith.c
+++ b/src/mame/drivers/eolith.c
@@ -66,7 +66,7 @@ static int coin_counter_bit = 0;
#include "eolithsp.h"
// It's configured for 512 bytes
-static struct EEPROM_interface eeprom_interface_93C66 =
+static const struct EEPROM_interface eeprom_interface_93C66 =
{
9, // address bits 9
8, // data bits 8
diff --git a/src/mame/drivers/eolith16.c b/src/mame/drivers/eolith16.c
index dd7bc5f5ea0..efef3d9165c 100644
--- a/src/mame/drivers/eolith16.c
+++ b/src/mame/drivers/eolith16.c
@@ -18,7 +18,7 @@ static UINT16 *vram;
static int vbuffer = 0;
// It's configured for 512 bytes
-static struct EEPROM_interface eeprom_interface_93C66 =
+static const struct EEPROM_interface eeprom_interface_93C66 =
{
9, // address bits 9
8, // data bits 8
diff --git a/src/mame/drivers/epos.c b/src/mame/drivers/epos.c
index 8375d95eea3..82b6b921011 100644
--- a/src/mame/drivers/epos.c
+++ b/src/mame/drivers/epos.c
@@ -120,7 +120,7 @@ static ADDRESS_MAP_START( dealer_writeport, ADDRESS_SPACE_IO, 8 )
// AM_RANGE(0x40, 0x40) AM_WRITE(watchdog_reset_w)
ADDRESS_MAP_END
-static ppi8255_interface ppi8255_intf =
+static const ppi8255_interface ppi8255_intf =
{
1, /* 1 chip */
{ input_port_2_r }, /* Port A read */
diff --git a/src/mame/drivers/exidy.c b/src/mame/drivers/exidy.c
index 067f01fddf8..4705373dff8 100644
--- a/src/mame/drivers/exidy.c
+++ b/src/mame/drivers/exidy.c
@@ -791,7 +791,7 @@ GFXDECODE_END
*
*************************************/
-static const char *targ_sample_names[] =
+static const char *const targ_sample_names[] =
{
"*targ",
"expl.wav",
@@ -803,7 +803,7 @@ static const char *targ_sample_names[] =
};
-static struct Samplesinterface targ_samples_interface =
+static const struct Samplesinterface targ_samples_interface =
{
4, /* 3 Channels */
targ_sample_names,
diff --git a/src/mame/drivers/filetto.c b/src/mame/drivers/filetto.c
index a0bb91cf652..834cc7f065e 100644
--- a/src/mame/drivers/filetto.c
+++ b/src/mame/drivers/filetto.c
@@ -475,7 +475,7 @@ static WRITE8_HANDLER( sys_reset_w )
}
-static ppi8255_interface filetto_ppi8255_intf =
+static const ppi8255_interface filetto_ppi8255_intf =
{
2, /* 2 chips */
{ port_a_r,NULL }, /* Port A read */
diff --git a/src/mame/drivers/findout.c b/src/mame/drivers/findout.c
index 2fb85107139..8446aaed6e3 100644
--- a/src/mame/drivers/findout.c
+++ b/src/mame/drivers/findout.c
@@ -110,7 +110,7 @@ static WRITE8_HANDLER( sound_w )
// popmessage("%02x",data);
}
-static ppi8255_interface ppi8255_intf =
+static const ppi8255_interface ppi8255_intf =
{
2, /* 2 chips */
{ input_port_0_r, input_port_2_r }, /* Port A read */
diff --git a/src/mame/drivers/freekick.c b/src/mame/drivers/freekick.c
index 8fcbffb57b6..e95fd0f4b43 100644
--- a/src/mame/drivers/freekick.c
+++ b/src/mame/drivers/freekick.c
@@ -597,7 +597,7 @@ static READ8_HANDLER( snd_rom_r )
return memory_region(REGION_USER1)[romaddr & 0x7fff];
}
-static ppi8255_interface ppi8255_intf =
+static const ppi8255_interface ppi8255_intf =
{
2, /* 1 chips */
{ NULL, input_port_0_r }, /* Port A read */
diff --git a/src/mame/drivers/galaga.c b/src/mame/drivers/galaga.c
index a1b7190c9ae..0149929aaba 100644
--- a/src/mame/drivers/galaga.c
+++ b/src/mame/drivers/galaga.c
@@ -1599,7 +1599,7 @@ static struct namco_52xx_interface namco_52xx_interface =
.25 /* Combined gain of both filters */
};
-static const char *battles_sample_names[] =
+static const char *const battles_sample_names[] =
{
"*battles",
"explo1.wav", /* ground target explosion */
@@ -1607,7 +1607,7 @@ static const char *battles_sample_names[] =
0 /* end of array */
};
-static struct Samplesinterface battles_samples_interface =
+static const struct Samplesinterface battles_samples_interface =
{
1, /* one channel */
battles_sample_names
diff --git a/src/mame/drivers/gaplus.c b/src/mame/drivers/gaplus.c
index e49ff16dea1..ebc845aa78b 100644
--- a/src/mame/drivers/gaplus.c
+++ b/src/mame/drivers/gaplus.c
@@ -737,14 +737,14 @@ static struct namco_interface namco_interface =
REGION_SOUND1 /* memory region */
};
-static const char *gaplus_sample_names[] =
+static const char *const gaplus_sample_names[] =
{
"*gaplus",
"bang.wav",
0
};
-static struct Samplesinterface samples_interface =
+static const struct Samplesinterface samples_interface =
{
1, /* one channel */
gaplus_sample_names
diff --git a/src/mame/drivers/getrivia.c b/src/mame/drivers/getrivia.c
index eb59d78e264..cf489340c68 100644
--- a/src/mame/drivers/getrivia.c
+++ b/src/mame/drivers/getrivia.c
@@ -359,7 +359,7 @@ INPUT_PORTS_END
-static ppi8255_interface getrivia_ppi8255_intf =
+static const ppi8255_interface getrivia_ppi8255_intf =
{
2, /* 2 chips */
{ input_port_0_r, input_port_2_r }, /* Port A read */
@@ -370,7 +370,7 @@ static ppi8255_interface getrivia_ppi8255_intf =
{ sound_w, lamps2_w }, /* Port C write */
};
-static ppi8255_interface gselect_ppi8255_intf =
+static const ppi8255_interface gselect_ppi8255_intf =
{
2, /* 2 chips */
{ input_port_0_r, input_port_2_r }, /* Port A read */
diff --git a/src/mame/drivers/gijoe.c b/src/mame/drivers/gijoe.c
index 57126fb7f1f..ede39d44fd7 100644
--- a/src/mame/drivers/gijoe.c
+++ b/src/mame/drivers/gijoe.c
@@ -52,7 +52,7 @@ static UINT16 cur_control2;
static int init_eeprom_count;
static emu_timer *dmadelay_timer;
-static struct EEPROM_interface eeprom_interface =
+static const struct EEPROM_interface eeprom_interface =
{
7, /* address bits */
8, /* data bits */
diff --git a/src/mame/drivers/gottlieb.c b/src/mame/drivers/gottlieb.c
index 79ff0c3206e..ca9a867e471 100644
--- a/src/mame/drivers/gottlieb.c
+++ b/src/mame/drivers/gottlieb.c
@@ -1431,7 +1431,7 @@ static GFXDECODE_START( charROM )
GFXDECODE_END
-static const char *reactor_sample_names[] =
+static const char *const reactor_sample_names[] =
{
"*reactor",
"fx_53.wav", /* "8 left" */
@@ -1457,7 +1457,7 @@ static const char *reactor_sample_names[] =
0 /* end of array */
};
-static const char *qbert_sample_names[] =
+static const char *const qbert_sample_names[] =
{
"*qbert",
"fx_17a.wav", /* random speech, voice clock 255 */
@@ -1508,13 +1508,13 @@ static const char *qbert_sample_names[] =
0 /* end of array */
};
-static struct Samplesinterface qbert_samples_interface =
+static const struct Samplesinterface qbert_samples_interface =
{
1, /* one channel */
qbert_sample_names
};
-static struct Samplesinterface reactor_samples_interface =
+static const struct Samplesinterface reactor_samples_interface =
{
1, /* one channel */
reactor_sample_names
diff --git a/src/mame/drivers/gotya.c b/src/mame/drivers/gotya.c
index 9a1840b9bc8..c905f57b87a 100644
--- a/src/mame/drivers/gotya.c
+++ b/src/mame/drivers/gotya.c
@@ -146,7 +146,7 @@ static GFXDECODE_START( gotya )
GFXDECODE_END
-static const char *sample_names[] =
+static const char *const sample_names[] =
{ // Address triggered at
"*thehand",
"01.wav", /* game start tune */ // 075f
@@ -182,7 +182,7 @@ static const char *sample_names[] =
0
};
-static struct Samplesinterface samples_interface =
+static const struct Samplesinterface samples_interface =
{
4, /* 4 channels */
sample_names
diff --git a/src/mame/drivers/gridlee.c b/src/mame/drivers/gridlee.c
index ca61b4c224a..a5485057ca1 100644
--- a/src/mame/drivers/gridlee.c
+++ b/src/mame/drivers/gridlee.c
@@ -408,7 +408,7 @@ static struct CustomSound_interface custom_interface =
};
-static const char *sample_names[] =
+static const char *const sample_names[] =
{
"*gridlee",
"bounce1.wav",
@@ -416,7 +416,7 @@ static const char *sample_names[] =
0 /* end of array */
};
-static struct Samplesinterface samples_interface =
+static const struct Samplesinterface samples_interface =
{
8, /* 8 channels */
sample_names
diff --git a/src/mame/drivers/groundfx.c b/src/mame/drivers/groundfx.c
index 5052fbd933a..eb05cf30eeb 100644
--- a/src/mame/drivers/groundfx.c
+++ b/src/mame/drivers/groundfx.c
@@ -115,7 +115,7 @@ static TIMER_CALLBACK( groundfx_interrupt5 )
EPROM
**********************************************************/
-static UINT8 default_eeprom[128]=
+static const UINT8 default_eeprom[128]=
{
0x02,0x01,0x11,0x12,0x01,0x01,0x01,0x00,0x80,0x80,0x30,0x01,0x00,0x00,0x62,0x45,
0xe0,0xa0,0xff,0x28,0xff,0xff,0xfa,0xd7,0x33,0x28,0x00,0x00,0x33,0x28,0x00,0x00,
diff --git a/src/mame/drivers/gticlub.c b/src/mame/drivers/gticlub.c
index 701998fa7f6..80e5ec27eaf 100644
--- a/src/mame/drivers/gticlub.c
+++ b/src/mame/drivers/gticlub.c
@@ -119,7 +119,7 @@ static VIDEO_UPDATE( hangplt )
/******************************************************************/
/* 93C56 EEPROM */
-static struct EEPROM_interface eeprom_interface =
+static const struct EEPROM_interface eeprom_interface =
{
8, /* address bits */
16, /* data bits */
diff --git a/src/mame/drivers/gunbustr.c b/src/mame/drivers/gunbustr.c
index 74eb24fc228..e001e2f239a 100644
--- a/src/mame/drivers/gunbustr.c
+++ b/src/mame/drivers/gunbustr.c
@@ -336,7 +336,7 @@ static MACHINE_RESET( gunbustr )
}
-static UINT8 default_eeprom[128]={
+static const UINT8 default_eeprom[128]={
0x00,0x01,0x00,0x85,0x00,0xfd,0x00,0xff,0x00,0x67,0x00,0x02,0x00,0x00,0x00,0x7b,
0x00,0xff,0x00,0xff,0x00,0x78,0x00,0x03,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0x01,0x01,0x00,0x00,0x01,0x02,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x10,0x00,0x00,
diff --git a/src/mame/drivers/homerun.c b/src/mame/drivers/homerun.c
index 1be5cd6cd54..1a5e8bc7bb8 100644
--- a/src/mame/drivers/homerun.c
+++ b/src/mame/drivers/homerun.c
@@ -34,7 +34,7 @@ static WRITE8_HANDLER(pa_w){homerun_xpa=data;}
static WRITE8_HANDLER(pb_w){homerun_xpb=data;}
static WRITE8_HANDLER(pc_w){homerun_xpc=data;}
-static ppi8255_interface ppi8255_intf =
+static const ppi8255_interface ppi8255_intf =
{
1,
{ 0 },
diff --git a/src/mame/drivers/imolagp.c b/src/mame/drivers/imolagp.c
index d8e9ab8124f..0f7145bd104 100644
--- a/src/mame/drivers/imolagp.c
+++ b/src/mame/drivers/imolagp.c
@@ -510,7 +510,7 @@ ROM_START( imolagp )
ROM_LOAD( "xe.bin", 0x3c00, 0x400, CRC(e0e81120) SHA1(14a77dfd069be342df4dbb1b747443c6d121d3fe) ) // ? car+misc
ROM_END
-static ppi8255_interface ppi8255_intf =
+static const ppi8255_interface ppi8255_intf =
{
1, /* 1 chips */
{0}, /* Port A read */
diff --git a/src/mame/drivers/iqblock.c b/src/mame/drivers/iqblock.c
index 6416389822f..643939a3f19 100644
--- a/src/mame/drivers/iqblock.c
+++ b/src/mame/drivers/iqblock.c
@@ -110,7 +110,7 @@ static WRITE8_HANDLER( port_C_w )
/* bit 7 could be a second coin counter, but coin 2 doesn't seem to work... */
}
-static ppi8255_interface ppi8255_intf =
+static const ppi8255_interface ppi8255_intf =
{
1, /* 1 chip */
{ input_port_0_r }, /* Port A read */
diff --git a/src/mame/drivers/jack.c b/src/mame/drivers/jack.c
index bea10aab10b..98158d49336 100644
--- a/src/mame/drivers/jack.c
+++ b/src/mame/drivers/jack.c
@@ -1226,13 +1226,13 @@ ROM_START( loverboy )
ROM_LOAD( "lover.s0", 0x0000, 0x1000, CRC(ec38111c) SHA1(09efded9e905658bdbcde4ad4f0b4cb9585bdb33) )
ROM_REGION( 0x6000, REGION_GFX1, ROMREGION_DISPOSE ) /* gfx - 8x8x3bpp */
- ROM_LOAD( "lover.p1", 0x0000, 0x2000, CRC(cda0d87e) SHA1(efff230e994e21705902f252e50ee40a20444c0f) )
+ ROM_LOAD( "lover.p3", 0x0000, 0x2000, CRC(1a519c8f) SHA1(36f546deaf36e8cd3bd113d84fd5e5f6e98d5de5) )
ROM_LOAD( "lover.p2", 0x2000, 0x2000, CRC(e465372f) SHA1(345b769ebc33f60daa9692b64e8ef43062552a33) )
- ROM_LOAD( "lover.p3", 0x4000, 0x2000, CRC(1a519c8f) SHA1(36f546deaf36e8cd3bd113d84fd5e5f6e98d5de5) )
+ ROM_LOAD( "lover.p1", 0x4000, 0x2000, CRC(cda0d87e) SHA1(efff230e994e21705902f252e50ee40a20444c0f) )
- ROM_REGION( 0x100, REGION_PROMS, 0 ) /* colours - not from this board, from joinem */
- ROM_LOAD_NIB_LOW( "l82s129.11n", 0x0000, 0x100, BAD_DUMP CRC(7b724211) SHA1(7396c773e8d48dea856d9482d6c48de966616c83) )
- ROM_LOAD_NIB_HIGH( "h82s129.12n", 0x0000, 0x100, BAD_DUMP CRC(2e81c5ff) SHA1(e103c8813af704d5de11fe705de5105ff3a691c3) )
+ ROM_REGION( 0x200, REGION_PROMS, 0 )
+ ROM_LOAD_NIB_LOW( "color.n11", 0x0000, 0x200, CRC(cf4a16ae) SHA1(e17c5dfd73c5bc55c0a929cf65ee5b516c9776a5) )
+ ROM_LOAD_NIB_HIGH( "color.n12", 0x0000, 0x200, CRC(4b11ac21) SHA1(d9e7cecfb7237335288ab6f94bb35696d8291bdf) )
ROM_END
diff --git a/src/mame/drivers/kickgoal.c b/src/mame/drivers/kickgoal.c
index 6681b8a12b6..07ffb3eadf0 100644
--- a/src/mame/drivers/kickgoal.c
+++ b/src/mame/drivers/kickgoal.c
@@ -427,10 +427,10 @@ static INTERRUPT_GEN( kickgoal_interrupt )
}
-static UINT8 *kickgoal_default_eeprom;
+static const UINT8 *kickgoal_default_eeprom;
static int kickgoal_default_eeprom_length;
-static UINT8 kickgoal_default_eeprom_type1[128] = {
+static const UINT8 kickgoal_default_eeprom_type1[128] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
diff --git a/src/mame/drivers/konamigq.c b/src/mame/drivers/konamigq.c
index 39ddbaf7495..de16f5f8f2d 100644
--- a/src/mame/drivers/konamigq.c
+++ b/src/mame/drivers/konamigq.c
@@ -118,7 +118,7 @@ static NVRAM_HANDLER( konamigq_93C46 )
}
else
{
- static UINT8 def_eeprom[ 128 ] =
+ static const UINT8 def_eeprom[ 128 ] =
{
0x29, 0x2b, 0x52, 0x56, 0x20, 0x94, 0x41, 0x55, 0x00, 0x41, 0x14, 0x14, 0x00, 0x03, 0x01, 0x01,
0x01, 0x03, 0x00, 0x00, 0x07, 0x07, 0x00, 0x01, 0xaa, 0x00, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
diff --git a/src/mame/drivers/laserbat.c b/src/mame/drivers/laserbat.c
index eda496b4a4f..2d479c9fea1 100644
--- a/src/mame/drivers/laserbat.c
+++ b/src/mame/drivers/laserbat.c
@@ -558,7 +558,7 @@ static VIDEO_UPDATE( laserbat )
/* Laser Battle sound **********************************/
-static struct SN76477interface sn76477_interface =
+static const struct SN76477interface sn76477_interface =
{
RES_K(47), /* 4 noise_res R21 47K */
0, /* 5 filter_res (variable) */
diff --git a/src/mame/drivers/lethal.c b/src/mame/drivers/lethal.c
index 0ec68946938..83762a190fc 100644
--- a/src/mame/drivers/lethal.c
+++ b/src/mame/drivers/lethal.c
@@ -184,13 +184,13 @@ static UINT8 cur_control2;
/* Default Eeprom for the parent.. otherwise it will always complain first boot */
/* its easy to init but this saves me a bit of time.. */
-static UINT8 lethalen_default_eeprom[48] = {
+static const UINT8 lethalen_default_eeprom[48] = {
0x02, 0x1E, 0x00, 0x00, 0x39, 0x31, 0x39, 0x31, 0x55, 0x45, 0x77, 0x00, 0x00, 0x00, 0x00, 0x01,
0x02, 0x01, 0x00, 0x03, 0x05, 0x01, 0x01, 0x02, 0x28, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
};
-static struct EEPROM_interface eeprom_interface =
+static const struct EEPROM_interface eeprom_interface =
{
7, /* address bits */
8, /* data bits */
diff --git a/src/mame/drivers/lordgun.c b/src/mame/drivers/lordgun.c
index 71761c0c1c3..7a8d7913533 100644
--- a/src/mame/drivers/lordgun.c
+++ b/src/mame/drivers/lordgun.c
@@ -408,7 +408,7 @@ INPUT_PORTS_END
***************************************************************************/
-static ppi8255_interface ppi8255_intf =
+static const ppi8255_interface ppi8255_intf =
{
2, // 2 chips
{ lordgun_eeprom_r, input_port_1_r }, // Port A read
diff --git a/src/mame/drivers/m72.c b/src/mame/drivers/m72.c
index 5a441775988..73c1cade25d 100644
--- a/src/mame/drivers/m72.c
+++ b/src/mame/drivers/m72.c
@@ -234,7 +234,7 @@ running, but they have not been derived from the real 8751 code.
#define CRC_LEN 18
/* Battle Chopper / Mr. Heli */
-static UINT8 bchopper_code[CODE_LEN] =
+static const UINT8 bchopper_code[CODE_LEN] =
{
0x68,0x00,0xa0, // push 0a000h
0x1f, // pop ds
@@ -258,13 +258,13 @@ static UINT8 bchopper_code[CODE_LEN] =
0xc6,0x06,0x70,0x16,0x77, // mov [1670h], byte 077h
0xea,0x68,0x01,0x40,0x00 // jmp 0040:$0168
};
-static UINT8 bchopper_crc[CRC_LEN] = { 0x1a,0x12,0x5c,0x08, 0x84,0xb6,0x73,0xd1,
+static const UINT8 bchopper_crc[CRC_LEN] = { 0x1a,0x12,0x5c,0x08, 0x84,0xb6,0x73,0xd1,
0x54,0x91,0x94,0xeb, 0x00,0x00 };
-static UINT8 mrheli_crc[CRC_LEN] = { 0x24,0x21,0x1f,0x14, 0xf9,0x28,0xfb,0x47,
+static const UINT8 mrheli_crc[CRC_LEN] = { 0x24,0x21,0x1f,0x14, 0xf9,0x28,0xfb,0x47,
0x4c,0x77,0x9e,0xc2, 0x00,0x00 };
/* Ninja Spirit */
-static UINT8 nspirit_code[CODE_LEN] =
+static const UINT8 nspirit_code[CODE_LEN] =
{
0x68,0x00,0xa0, // push 0a000h
0x1f, // pop ds
@@ -288,13 +288,13 @@ static UINT8 nspirit_code[CODE_LEN] =
0xc6,0x06,0x71,0x16,0x00, // mov [1671h], byte 000h
0xea,0x00,0x00,0x40,0x00 // jmp 0040:$0000
};
-static UINT8 nspirit_crc[CRC_LEN] = { 0xfe,0x94,0x6e,0x4e, 0xc8,0x33,0xa7,0x2d,
+static const UINT8 nspirit_crc[CRC_LEN] = { 0xfe,0x94,0x6e,0x4e, 0xc8,0x33,0xa7,0x2d,
0xf2,0xa3,0xf9,0xe1, 0xa9,0x6c,0x02,0x95, 0x00,0x00 };
-static UINT8 nspiritj_crc[CRC_LEN] = { 0x26,0xa3,0xa5,0xe9, 0xc8,0x33,0xa7,0x2d,
+static const UINT8 nspiritj_crc[CRC_LEN] = { 0x26,0xa3,0xa5,0xe9, 0xc8,0x33,0xa7,0x2d,
0xf2,0xa3,0xf9,0xe1, 0xbc,0x6c,0x01,0x95, 0x00,0x00 };
/* Image Fight */
-static UINT8 imgfight_code[CODE_LEN] =
+static const UINT8 imgfight_code[CODE_LEN] =
{
0x68,0x00,0xa0, // push 0a000h
0x1f, // pop ds
@@ -321,11 +321,11 @@ static UINT8 imgfight_code[CODE_LEN] =
0xc6,0x06,0xb0,0x1c,0x57, // mov [1cb0h], byte 057h
0xea,0x00,0x00,0x40,0x00 // jmp 0040:$0000
};
-static UINT8 imgfight_crc[CRC_LEN] = { 0x7e,0xcc,0xec,0x03, 0x04,0x33,0xb6,0xc5,
+static const UINT8 imgfight_crc[CRC_LEN] = { 0x7e,0xcc,0xec,0x03, 0x04,0x33,0xb6,0xc5,
0xbf,0x37,0x92,0x94, 0x00,0x00 };
/* Legend of Hero Tonma */
-static UINT8 loht_code[CODE_LEN] =
+static const UINT8 loht_code[CODE_LEN] =
{
0x68,0x00,0xa0, // push 0a000h
0x1f, // pop ds
@@ -346,28 +346,28 @@ static UINT8 loht_code[CODE_LEN] =
0xea,0x5d,0x01,0x40,0x00 // jmp 0040:$015d
};
-static UINT8 loht_crc[CRC_LEN] = { 0x39,0x00,0x82,0xae, 0x2c,0x9d,0x4b,0x73,
+static const UINT8 loht_crc[CRC_LEN] = { 0x39,0x00,0x82,0xae, 0x2c,0x9d,0x4b,0x73,
0xfb,0xac,0xd4,0x6d, 0x6d,0x5b,0x77,0xc0, 0x00,0x00 };
/* service mode crashes at the moment (119u2), so I can't add the CRCs for lohtj */
/* X Multiply */
-static UINT8 xmultipl_code[CODE_LEN] =
+static const UINT8 xmultipl_code[CODE_LEN] =
{
0xea,0x30,0x02,0x00,0x0e // jmp 0e00:$0230
};
-static UINT8 xmultipl_crc[CRC_LEN] = { 0x73,0x82,0x4e,0x3f, 0xfc,0x56,0x59,0x06,
+static const UINT8 xmultipl_crc[CRC_LEN] = { 0x73,0x82,0x4e,0x3f, 0xfc,0x56,0x59,0x06,
0x05,0x48,0xa8,0xf4, 0x00,0x00 };
/* Dragon Breed */
-static UINT8 dbreed72_code[CODE_LEN] =
+static const UINT8 dbreed72_code[CODE_LEN] =
{
0xea,0x6c,0x00,0x00,0x00 // jmp 0000:$006c
};
-static UINT8 dbreed72_crc[CRC_LEN] = { 0xa4,0x96,0x5f,0xc0, 0xab,0x49,0x9f,0x19,
+static const UINT8 dbreed72_crc[CRC_LEN] = { 0xa4,0x96,0x5f,0xc0, 0xab,0x49,0x9f,0x19,
0x84,0xe6,0xd6,0xca, 0x00,0x00 };
/* Air Duel */
-static UINT8 airduel_code[CODE_LEN] =
+static const UINT8 airduel_code[CODE_LEN] =
{
0x68,0x00,0xd0, // push 0d000h
0x1f, // pop ds
@@ -377,15 +377,15 @@ static UINT8 airduel_code[CODE_LEN] =
0xc6,0x06,0xc0,0x1c,0x57, // mov [1cc0h], byte 057h
0xea,0x69,0x0b,0x00,0x00 // jmp 0000:$0b69
};
-static UINT8 airduel_crc[CRC_LEN] = { 0x72,0x9c,0xca,0x85, 0xc9,0x12,0xcc,0xea,
+static const UINT8 airduel_crc[CRC_LEN] = { 0x72,0x9c,0xca,0x85, 0xc9,0x12,0xcc,0xea,
0x00,0x00 };
/* Daiku no Gensan */
-static UINT8 dkgenm72_code[CODE_LEN] =
+static const UINT8 dkgenm72_code[CODE_LEN] =
{
0xea,0x3d,0x00,0x00,0x10 // jmp 1000:$003d
};
-static UINT8 dkgenm72_crc[CRC_LEN] = { 0xc8,0xb4,0xdc,0xf8, 0xd3,0xba,0x48,0xed,
+static const UINT8 dkgenm72_crc[CRC_LEN] = { 0xc8,0xb4,0xdc,0xf8, 0xd3,0xba,0x48,0xed,
0x79,0x08,0x1c,0xb3, 0x00,0x00 };
@@ -416,7 +416,7 @@ static WRITE16_HANDLER( protection_w )
copy_le(&protection_ram[0x0fe0],protection_crc,CRC_LEN);
}
-static void install_protection_handler(UINT8 *code,UINT8 *crc)
+static void install_protection_handler(const UINT8 *code,const UINT8 *crc)
{
protection_ram = auto_malloc(0x1000);
protection_code = code;
diff --git a/src/mame/drivers/malzak.c b/src/mame/drivers/malzak.c
index 1e3842edbe2..fc46e9db8df 100644
--- a/src/mame/drivers/malzak.c
+++ b/src/mame/drivers/malzak.c
@@ -414,7 +414,7 @@ static PALETTE_INIT( malzak )
}
-static struct SN76477interface sn76477_intf =
+static const struct SN76477interface sn76477_intf =
{
0, /* N/C */ /* 4 noise_res */
0, /* N/C */ /* 5 filter_res */
diff --git a/src/mame/drivers/mario.c b/src/mame/drivers/mario.c
index 198046e0cd5..98369031a61 100644
--- a/src/mame/drivers/mario.c
+++ b/src/mame/drivers/mario.c
@@ -353,7 +353,7 @@ GFXDECODE_END
-static const char *mario_sample_names[] =
+static const char *const mario_sample_names[] =
{
"*mario",
@@ -371,7 +371,7 @@ static const char *mario_sample_names[] =
0 /* end of array */
};
-static struct Samplesinterface samples_interface =
+static const struct Samplesinterface samples_interface =
{
3, /* 3 channels */
mario_sample_names
diff --git a/src/mame/drivers/mcr.c b/src/mame/drivers/mcr.c
index 118dc5b4907..b2deb062e29 100644
--- a/src/mame/drivers/mcr.c
+++ b/src/mame/drivers/mcr.c
@@ -1478,14 +1478,14 @@ GFXDECODE_END
*
*************************************/
-static const char *journey_sample_names[] =
+static const char *const journey_sample_names[] =
{
"*journey",
"sepways.wav",
0
};
-static struct Samplesinterface journey_samples_interface =
+static const struct Samplesinterface journey_samples_interface =
{
1,
journey_sample_names
diff --git a/src/mame/drivers/meadows.c b/src/mame/drivers/meadows.c
index f9c67416384..e58cce74ed0 100644
--- a/src/mame/drivers/meadows.c
+++ b/src/mame/drivers/meadows.c
@@ -578,14 +578,14 @@ GFXDECODE_END
*
*************************************/
-static struct Samplesinterface meadows_samples_interface =
+static const struct Samplesinterface meadows_samples_interface =
{
2,
NULL,
meadows_sh_start
};
-static const char *bowl3d_sample_names[] =
+static const char *const bowl3d_sample_names[] =
{
"*bowl3d",
"roll.wav", /* "roll" */
@@ -597,7 +597,7 @@ static const char *bowl3d_sample_names[] =
0 /* end of array */
};
-static struct Samplesinterface bowl3d_samples_interface =
+static const struct Samplesinterface bowl3d_samples_interface =
{
1, /* one channel */
bowl3d_sample_names
diff --git a/src/mame/drivers/megatech.c b/src/mame/drivers/megatech.c
index 8b690f53194..eac9cdb11ea 100644
--- a/src/mame/drivers/megatech.c
+++ b/src/mame/drivers/megatech.c
@@ -68,9 +68,12 @@ Tetris 171-5834 837-6963-22 610-0239-22 MPR-1
Ghouls & Ghosts 171-5869A - 610-0239-23 MPR-12605 (40 pins) MPR-12606 (40 pins) EPR-12368-23 (27256)
Super Hang On 171-5782 837-6963-24 610-0239-24 MPR-12640 (234000) EPR-12368-24 (27256) n/a
Forgotten Worlds 171-5782 837-6963-26 610-0239-26 MPR-12672-H (Mask) EPR-12368-26 (27256) n/a
+Arnold Palmer Tour Golf 171-5782 837-6963-31 610-0239-31 MPR-12645F (23C4000) EPR-12368-31 (27256) n/a
Super Real Basket Ball 171-5782 837-6963-32 610-0239-32 MPR-12904F (838200A) EPR-12368-32 (27256) n/a
-Sonic Hedgehog 2 171-6215A 837-6963-62 610-0239-62 MPR-15000A-F (838200) EPR-12368-62 (27256) n/a
+Wrestle War 171-5782 837-6963-48 610-0239-48 MPR-14025-F (23C4000) EPR-12368-48 (27256) n/a
+Bonanza Bros. 171-5782 837-6963-49 610-0239-49 MPR-13905A-F (23C4000) EPR-12368-49 (27256) n/a
Mario Lemeux Hockey 171-5782 837-6963-59 610-0239-59 MPR-14376-H (234000) EPR-12368-59 (27256) n/a
+Sonic Hedgehog 2 171-6215A 837-6963-62 610-0239-62 MPR-15000A-F (838200) EPR-12368-62 (27256) n/a
*/
@@ -878,6 +881,19 @@ ROM_START( mt_bbros ) /* Bonanza Bros */
MEGATECH_GAME49(REGION_USER1, REGION_USER2)
ROM_END
+/* Game 48 - Wrestle War */
+
+#define MEGATECH_GAME48(GAME_REGION, INSTRUCTION_REGION) \
+ ROM_REGION16_BE( 0x300000, GAME_REGION, 0 ) \
+ ROM_LOAD16_WORD_SWAP( "mpr-14025-f.ic1", 0x000000, 0x080000, CRC(26e899fe) SHA1(6d28e154ae2e4196097a2aa96c5acd5dfe7e3d2b) ) \
+ MEGATECH_INSTRUCTION_REGION( INSTRUCTION_REGION, MEGATECH_GAME_IS_GEN ) \
+ ROM_LOAD( "12368-48.ic2", 0x000000, 0x08000, CRC(25817bc2) SHA1(ba1bbb952aff12fb4d3ecfb10d82c54128439395) ) \
+
+ROM_START( mt_wwar ) /* Wrestle War */
+ MEGATECH_BIOS
+ MEGATECH_GAME48(REGION_USER1, REGION_USER2)
+ROM_END
+
/* Game 62 - Sonic 2 */
#define MEGATECH_GAME62(GAME_REGION, INSTRUCTION_REGION) \
@@ -1293,7 +1309,7 @@ ROM_END
/* 45 */ // unknown
/* 46 */ // unknown
/* 47 */ GAME( 1990, mt_astrm, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Alien Storm (Mega-Tech", GAME_NOT_WORKING )
-/* 48 */ // unknown
+/* 48 */ GAME( 1991, mt_wwar, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Wrestle War (Mega-Tech)", GAME_NOT_WORKING ) /* Copyright 1989, 1991 Sega */
/* 49 */ GAME( 1991, mt_bbros, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Bonanza Bros. (Mega-Tech)", GAME_NOT_WORKING )
/* 50 */ // unknown
/* 51 */ // unknown
@@ -1309,10 +1325,7 @@ ROM_END
/* 60 */ GAME( 1992, mt_kcham, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Kid Chameleon (Mega-Tech)", GAME_NOT_WORKING )
/* 61 */ // unknown
/* 62 */ GAME( 1992, mt_soni2, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Sonic The Hedgehog 2 (Mega-Tech)", GAME_NOT_WORKING )
-/*
- Known to Exist, but nn number currently not known:
- Wrestle War
-*/
+
/* more? */
/* Compilations to test multi-game support */
diff --git a/src/mame/drivers/merit.c b/src/mame/drivers/merit.c
index 325091e9cf9..4ae1eb0ed97 100644
--- a/src/mame/drivers/merit.c
+++ b/src/mame/drivers/merit.c
@@ -769,7 +769,7 @@ static GFXDECODE_START( merit )
GFXDECODE_ENTRY( REGION_GFX2, 8, tiles8x8x1_layout, 0, 128 ) // flipped tiles
GFXDECODE_END
-static ppi8255_interface ppi8255_intf =
+static const ppi8255_interface ppi8255_intf =
{
2, /* 2 chips */
{ input_port_0_r, input_port_3_r }, /* Port A read */
diff --git a/src/mame/drivers/mitchell.c b/src/mame/drivers/mitchell.c
index f04e74a2679..cb0bf50ee6c 100644
--- a/src/mame/drivers/mitchell.c
+++ b/src/mame/drivers/mitchell.c
@@ -138,7 +138,7 @@ static WRITE8_HANDLER( pang_bankswitch_w )
***************************************************************************/
-static struct EEPROM_interface eeprom_interface =
+static const struct EEPROM_interface eeprom_interface =
{
6, /* address bits */
16, /* data bits */
diff --git a/src/mame/drivers/model3.c b/src/mame/drivers/model3.c
index 42dbf41f3aa..518e8b935b7 100644
--- a/src/mame/drivers/model3.c
+++ b/src/mame/drivers/model3.c
@@ -916,7 +916,7 @@ static void real3d_dma_callback(UINT32 src, UINT32 dst, int length, int byteswap
/*****************************************************************************/
/* this is a 93C46 but with reset delay that is needed by Lost World */
-static struct EEPROM_interface eeprom_interface =
+static const struct EEPROM_interface eeprom_interface =
{
6, /* address bits */
16, /* data bits */
diff --git a/src/mame/drivers/moo.c b/src/mame/drivers/moo.c
index 2e0ee8bd8cf..c4391a98261 100644
--- a/src/mame/drivers/moo.c
+++ b/src/mame/drivers/moo.c
@@ -60,7 +60,7 @@ static UINT16 protram[16];
static UINT16 cur_control2;
-static struct EEPROM_interface eeprom_interface =
+static const struct EEPROM_interface eeprom_interface =
{
7, /* address bits */
8, /* data bits */
diff --git a/src/mame/drivers/mpu4drvr.c b/src/mame/drivers/mpu4drvr.c
index 9a7792554bc..1b57b5346cb 100644
--- a/src/mame/drivers/mpu4drvr.c
+++ b/src/mame/drivers/mpu4drvr.c
@@ -272,12 +272,12 @@ static void update_mpu68_interrupts(void)
/* set the new state of the IRQ lines */
if (newstate)
{
- LOG(("68k IRQ, %x\n", newstate));
+ LOGSTUFF(("68k IRQ, %x\n", newstate));
cpunum_set_input_line(1, newstate, ASSERT_LINE);
}
else
{
- LOG(("68k IRQ Clear, %x\n", newstate));
+ LOGSTUFF(("68k IRQ Clear, %x\n", newstate));
cpunum_set_input_line(1, 7, CLEAR_LINE);
}
}
diff --git a/src/mame/drivers/mystwarr.c b/src/mame/drivers/mystwarr.c
index 21b78e4f9ec..43181d7ee41 100644
--- a/src/mame/drivers/mystwarr.c
+++ b/src/mame/drivers/mystwarr.c
@@ -54,7 +54,7 @@ static UINT16 *gx_workram;
static INT32 init_eeprom_count;
static UINT8 mw_irq_control;
-static struct EEPROM_interface eeprom_interface =
+static const struct EEPROM_interface eeprom_interface =
{
7, /* address bits */
8, /* data bits */
@@ -67,7 +67,7 @@ static struct EEPROM_interface eeprom_interface =
/* Gaiapolis and Polygonet Commanders use the ER5911,
but the command formats are slightly different. Why? */
-static struct EEPROM_interface eeprom_interface_gaia =
+static const struct EEPROM_interface eeprom_interface_gaia =
{
7, /* address bits */
8, /* data bits */
diff --git a/src/mame/drivers/namcond1.c b/src/mame/drivers/namcond1.c
index 70ef7c680b5..f3c08d90687 100644
--- a/src/mame/drivers/namcond1.c
+++ b/src/mame/drivers/namcond1.c
@@ -277,6 +277,11 @@ static INTERRUPT_GEN( mcu_interrupt )
}
}
+static DRIVER_INIT( namcond1 )
+{
+ at28c16_init( 0, NULL, NULL );
+}
+
/******************************************
ND-1 Master clock = 49.152MHz
- 680000 = 12288000 (CLK/4)
@@ -405,8 +410,8 @@ ROM_START( ncv2j )
ROM_LOAD( "ncs1voic.7c", 0x000000, 0x200000, CRC(ed05fd88) SHA1(ad88632c89a9946708fc6b4c9247e1bae9b2944b) )
ROM_END
-GAME( 1995, ncv1, 0, namcond1, namcond1, 0, ROT90, "Namco", "Namco Classics Collection Vol.1", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
-GAME( 1995, ncv1j, ncv1, namcond1, namcond1, 0, ROT90, "Namco", "Namco Classics Collection Vol.1 (Japan, v1.00)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
-GAME( 1995, ncv1j2, ncv1, namcond1, namcond1, 0, ROT90, "Namco", "Namco Classics Collection Vol.1 (Japan, v1.03)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
-GAME( 1996, ncv2, 0, namcond1, namcond1, 0, ROT90, "Namco", "Namco Classics Collection Vol.2", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE )
-GAME( 1996, ncv2j, ncv2, namcond1, namcond1, 0, ROT90, "Namco", "Namco Classics Collection Vol.2 (Japan)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE )
+GAME( 1995, ncv1, 0, namcond1, namcond1, namcond1, ROT90, "Namco", "Namco Classics Collection Vol.1", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
+GAME( 1995, ncv1j, ncv1, namcond1, namcond1, namcond1, ROT90, "Namco", "Namco Classics Collection Vol.1 (Japan, v1.00)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
+GAME( 1995, ncv1j2, ncv1, namcond1, namcond1, namcond1, ROT90, "Namco", "Namco Classics Collection Vol.1 (Japan, v1.03)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
+GAME( 1996, ncv2, 0, namcond1, namcond1, namcond1, ROT90, "Namco", "Namco Classics Collection Vol.2", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE )
+GAME( 1996, ncv2j, ncv2, namcond1, namcond1, namcond1, ROT90, "Namco", "Namco Classics Collection Vol.2 (Japan)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/namcos11.c b/src/mame/drivers/namcos11.c
index be3ae22d2eb..a2790e0d2b8 100644
--- a/src/mame/drivers/namcos11.c
+++ b/src/mame/drivers/namcos11.c
@@ -881,6 +881,8 @@ static DRIVER_INIT( namcos11 )
}
state_save_register_global( m_n_oldcoin );
+
+ at28c16_init( 0, NULL, NULL );
}
static MACHINE_RESET( namcos11 )
diff --git a/src/mame/drivers/namcos12.c b/src/mame/drivers/namcos12.c
index a57719941e0..3cbbd05f6d6 100644
--- a/src/mame/drivers/namcos12.c
+++ b/src/mame/drivers/namcos12.c
@@ -1338,6 +1338,8 @@ static DRIVER_INIT( namcos12 )
psx_driver_init();
psx_dma_install_read_handler( 5, namcos12_rom_read );
+
+ at28c16_init( 0, NULL, NULL );
}
static DRIVER_INIT( ptblank2 )
diff --git a/src/mame/drivers/ninjakd2.c b/src/mame/drivers/ninjakd2.c
index 8ebf0ad7505..7e319b266d2 100644
--- a/src/mame/drivers/ninjakd2.c
+++ b/src/mame/drivers/ninjakd2.c
@@ -449,7 +449,7 @@ static GFXDECODE_START( ninjakd2 )
GFXDECODE_ENTRY( REGION_GFX3, 0, charlayout, 32*16, 16 )
GFXDECODE_END
-static struct Samplesinterface samples_interface =
+static const struct Samplesinterface samples_interface =
{
1, /* 1 channel */
NULL,
diff --git a/src/mame/drivers/omegrace.c b/src/mame/drivers/omegrace.c
index 03cbb3d7ce4..0c7ee4d9707 100644
--- a/src/mame/drivers/omegrace.c
+++ b/src/mame/drivers/omegrace.c
@@ -503,7 +503,7 @@ static MACHINE_DRIVER_START( omegrace )
MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_VECTOR )
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB15)
MDRV_SCREEN_SIZE(400, 300)
- MDRV_SCREEN_VISIBLE_AREA(0, 1044, 0, 1024)
+ MDRV_SCREEN_VISIBLE_AREA(522, 1566, 522, 1566)
MDRV_PALETTE_LENGTH(32768)
MDRV_VIDEO_START(dvg)
diff --git a/src/mame/drivers/othunder.c b/src/mame/drivers/othunder.c
index f5d125a0018..697d2b5610e 100644
--- a/src/mame/drivers/othunder.c
+++ b/src/mame/drivers/othunder.c
@@ -316,7 +316,7 @@ The eeprom unlock command is different, and the write/clock/reset
bits are different.
******************************************************************/
-static UINT8 default_eeprom[128]=
+static const UINT8 default_eeprom[128]=
{
0x00,0x00,0x00,0xff,0x00,0x01,0x41,0x41,0x00,0x00,0x00,0xff,0x00,0x00,0xf0,0xf0,
0x00,0x00,0x00,0xff,0x00,0x01,0x41,0x41,0x00,0x00,0x00,0xff,0x00,0x00,0xf0,0xf0,
@@ -328,7 +328,7 @@ static UINT8 default_eeprom[128]=
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
};
-static struct EEPROM_interface eeprom_interface =
+static const struct EEPROM_interface eeprom_interface =
{
6, /* address bits */
16, /* data bits */
diff --git a/src/mame/drivers/overdriv.c b/src/mame/drivers/overdriv.c
index 811867cebb3..b900332d854 100644
--- a/src/mame/drivers/overdriv.c
+++ b/src/mame/drivers/overdriv.c
@@ -83,7 +83,7 @@ static WRITE16_HANDLER( K051316_ctrl_1_msb_w )
***************************************************************************/
-static UINT8 default_eeprom[128] =
+static const UINT8 default_eeprom[128] =
{
0x77,0x58,0xFF,0xFF,0x00,0x78,0x90,0x00,0x00,0x78,0x70,0x00,0x00,0x78,0x50,0x00,
0x54,0x41,0x4B,0x51,0x31,0x36,0x46,0x55,0x4A,0xFF,0x03,0x00,0x02,0x70,0x02,0x50,
@@ -96,7 +96,7 @@ static UINT8 default_eeprom[128] =
};
-static struct EEPROM_interface eeprom_interface =
+static const struct EEPROM_interface eeprom_interface =
{
6, /* address bits */
16, /* data bits */
diff --git a/src/mame/drivers/pipeline.c b/src/mame/drivers/pipeline.c
index f05b99bafbf..f743adb4a9c 100644
--- a/src/mame/drivers/pipeline.c
+++ b/src/mame/drivers/pipeline.c
@@ -306,7 +306,7 @@ static struct z80_irq_daisy_chain daisy_chain_sound[] =
{ 0, 0, 0, 0, -1 } /* end mark */
};
-static ppi8255_interface ppi8255_intf =
+static const ppi8255_interface ppi8255_intf =
{
3,
{ input_port_0_r, input_port_1_r, NULL }, /* Port A read */
diff --git a/src/mame/drivers/pirates.c b/src/mame/drivers/pirates.c
index fb5d2525fa0..a95fe38c8ef 100644
--- a/src/mame/drivers/pirates.c
+++ b/src/mame/drivers/pirates.c
@@ -103,7 +103,7 @@ VIDEO_UPDATE(pirates);
-static struct EEPROM_interface eeprom_interface =
+static const struct EEPROM_interface eeprom_interface =
{
6, /* address bits */
16, /* data bits */
diff --git a/src/mame/drivers/playmark.c b/src/mame/drivers/playmark.c
index c796a838711..f4e6fbf782e 100644
--- a/src/mame/drivers/playmark.c
+++ b/src/mame/drivers/playmark.c
@@ -97,7 +97,7 @@ static WRITE16_HANDLER( coinctrl_w )
***************************************************************************/
-static struct EEPROM_interface eeprom_interface =
+static const struct EEPROM_interface eeprom_interface =
{
6, /* address bits */
16, /* data bits */
diff --git a/src/mame/drivers/plygonet.c b/src/mame/drivers/plygonet.c
index 25a0d2d5565..b6100b9a718 100644
--- a/src/mame/drivers/plygonet.c
+++ b/src/mame/drivers/plygonet.c
@@ -70,7 +70,7 @@ static UINT16 *dsp56k_bank01_ram ;
static UINT16 *dsp56k_bank02_ram ;
static UINT16 *dsp56k_bank04_ram ;
-static struct EEPROM_interface eeprom_interface =
+static const struct EEPROM_interface eeprom_interface =
{
7, /* address bits */
8, /* data bits */
diff --git a/src/mame/drivers/pntnpuzl.c b/src/mame/drivers/pntnpuzl.c
index c2febbfc44e..bb3f678ee26 100644
--- a/src/mame/drivers/pntnpuzl.c
+++ b/src/mame/drivers/pntnpuzl.c
@@ -124,7 +124,7 @@ CN1 standard DB15 VGA connector (15KHz)
#include "machine/eeprom.h"
-static struct EEPROM_interface eeprom_interface =
+static const struct EEPROM_interface eeprom_interface =
{
6, /* address bits */
16, /* data bits */
diff --git a/src/mame/drivers/policetr.c b/src/mame/drivers/policetr.c
index 9863c525aea..29aa6721751 100644
--- a/src/mame/drivers/policetr.c
+++ b/src/mame/drivers/policetr.c
@@ -269,7 +269,7 @@ static WRITE32_HANDLER( speedup_w )
*
*************************************/
-static struct EEPROM_interface eeprom_interface_policetr =
+static const 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 e73c856e050..6fb71258d2f 100644
--- a/src/mame/drivers/polyplay.c
+++ b/src/mame/drivers/polyplay.c
@@ -113,7 +113,7 @@ static WRITE8_HANDLER( polyplay_sound_channel );
/* Polyplay Sound Interface */
-static struct Samplesinterface polyplay_samples_interface =
+static const struct Samplesinterface polyplay_samples_interface =
{
2,
NULL,
diff --git a/src/mame/drivers/powerbal.c b/src/mame/drivers/powerbal.c
index f362673a971..36ab08ab338 100644
--- a/src/mame/drivers/powerbal.c
+++ b/src/mame/drivers/powerbal.c
@@ -27,7 +27,7 @@ static int bg_yoffset;
static int xoffset;
static int yoffset;
-static struct EEPROM_interface eeprom_interface =
+static const struct EEPROM_interface eeprom_interface =
{
6, /* address bits */
16, /* data bits */
diff --git a/src/mame/drivers/psikyo.c b/src/mame/drivers/psikyo.c
index ef4401a71ce..d382d3a822e 100644
--- a/src/mame/drivers/psikyo.c
+++ b/src/mame/drivers/psikyo.c
@@ -184,19 +184,19 @@ static WRITE32_HANDLER( s1945_soundlatch_w )
timer_call_after_resynch(NULL, (data >> 16) & 0xff, psikyo_soundlatch_callback);
}
-static UINT8 s1945_table[256] = {
+static const UINT8 s1945_table[256] = {
0x00, 0x00, 0x64, 0xae, 0x00, 0x00, 0x26, 0x2c, 0x00, 0x00, 0x2c, 0xda, 0x00, 0x00, 0x2c, 0xbc,
0x00, 0x00, 0x2c, 0x9e, 0x00, 0x00, 0x2f, 0x0e, 0x00, 0x00, 0x31, 0x10, 0x00, 0x00, 0xc5, 0x1e,
0x00, 0x00, 0x32, 0x90, 0x00, 0x00, 0xac, 0x5c, 0x00, 0x00, 0x2b, 0xc0
};
-static UINT8 s1945a_table[256] = {
+static const UINT8 s1945a_table[256] = {
0x00, 0x00, 0x64, 0xbe, 0x00, 0x00, 0x26, 0x2c, 0x00, 0x00, 0x2c, 0xda, 0x00, 0x00, 0x2c, 0xbc,
0x00, 0x00, 0x2c, 0x9e, 0x00, 0x00, 0x2f, 0x0e, 0x00, 0x00, 0x31, 0x10, 0x00, 0x00, 0xc7, 0x2a,
0x00, 0x00, 0x32, 0x90, 0x00, 0x00, 0xad, 0x4c, 0x00, 0x00, 0x2b, 0xc0
};
-static UINT8 s1945j_table[256] = {
+static const UINT8 s1945j_table[256] = {
0x00, 0x00, 0x64, 0xb6, 0x00, 0x00, 0x26, 0x2c, 0x00, 0x00, 0x2c, 0xda, 0x00, 0x00, 0x2c, 0xbc,
0x00, 0x00, 0x2c, 0x9e, 0x00, 0x00, 0x2f, 0x0e, 0x00, 0x00, 0x31, 0x10, 0x00, 0x00, 0xc5, 0x92,
0x00, 0x00, 0x32, 0x90, 0x00, 0x00, 0xac, 0x64, 0x00, 0x00, 0x2b, 0xc0
diff --git a/src/mame/drivers/psikyo4.c b/src/mame/drivers/psikyo4.c
index d93793da593..96efe286556 100644
--- a/src/mame/drivers/psikyo4.c
+++ b/src/mame/drivers/psikyo4.c
@@ -160,7 +160,7 @@ static GFXDECODE_START( ps4 )
GFXDECODE_ENTRY( REGION_GFX1, 0, layout_16x16x8, 0x000, 0x80 ) // 8bpp tiles
GFXDECODE_END
-static struct EEPROM_interface eeprom_interface_93C56 =
+static const struct EEPROM_interface eeprom_interface_93C56 =
{
8, // address bits 8
8, // data bits 8
diff --git a/src/mame/drivers/psikyosh.c b/src/mame/drivers/psikyosh.c
index a3d8983fd13..148d27b16bf 100644
--- a/src/mame/drivers/psikyosh.c
+++ b/src/mame/drivers/psikyosh.c
@@ -279,12 +279,12 @@ Notes:
#define ROMTEST 1 /* Does necessary stuff to perform rom test, uses RAM as it doesn't dispose of GFX after decoding */
-static UINT8 factory_eeprom[16] = { 0x00,0x02,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00 };
-static UINT8 daraku_eeprom[16] = { 0x03,0x02,0x00,0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
-static UINT8 s1945iii_eeprom[16] = { 0x00,0x00,0x00,0x00,0x00,0x01,0x11,0x70,0x25,0x25,0x25,0x00,0x01,0x00,0x11,0xe0 };
-static UINT8 dragnblz_eeprom[16] = { 0x00,0x01,0x11,0x70,0x25,0x25,0x25,0x00,0x01,0x00,0x11,0xe0,0x00,0x00,0x00,0x00 };
-static UINT8 gnbarich_eeprom[16] = { 0x00,0x0f,0x42,0x40,0x08,0x0a,0x00,0x00,0x01,0x06,0x42,0x59,0x00,0x00,0x00,0x00 };
-static UINT8 mjgtaste_eeprom[16] = { 0x00,0x00,0x00,0x01,0x01,0x00,0x01,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00 };
+static const UINT8 factory_eeprom[16] = { 0x00,0x02,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00 };
+static const UINT8 daraku_eeprom[16] = { 0x03,0x02,0x00,0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
+static const UINT8 s1945iii_eeprom[16] = { 0x00,0x00,0x00,0x00,0x00,0x01,0x11,0x70,0x25,0x25,0x25,0x00,0x01,0x00,0x11,0xe0 };
+static const UINT8 dragnblz_eeprom[16] = { 0x00,0x01,0x11,0x70,0x25,0x25,0x25,0x00,0x01,0x00,0x11,0xe0,0x00,0x00,0x00,0x00 };
+static const UINT8 gnbarich_eeprom[16] = { 0x00,0x0f,0x42,0x40,0x08,0x0a,0x00,0x00,0x01,0x06,0x42,0x59,0x00,0x00,0x00,0x00 };
+static const UINT8 mjgtaste_eeprom[16] = { 0x00,0x00,0x00,0x01,0x01,0x00,0x01,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00 };
static int use_factory_eeprom;
diff --git a/src/mame/drivers/rallyx.c b/src/mame/drivers/rallyx.c
index 91c1e980413..56f2b332ca4 100644
--- a/src/mame/drivers/rallyx.c
+++ b/src/mame/drivers/rallyx.c
@@ -817,14 +817,14 @@ static struct namco_interface namco_interface =
REGION_SOUND1 /* memory region */
};
-static const char *rallyx_sample_names[] =
+static const char *const rallyx_sample_names[] =
{
"*rallyx",
"bang.wav",
0 /* end of array */
};
-static struct Samplesinterface samples_interface =
+static const struct Samplesinterface samples_interface =
{
1, /* 1 channel */
rallyx_sample_names
diff --git a/src/mame/drivers/rockola.c b/src/mame/drivers/rockola.c
index c69330af02b..0d113979df0 100644
--- a/src/mame/drivers/rockola.c
+++ b/src/mame/drivers/rockola.c
@@ -158,9 +158,9 @@ extern VIDEO_START( satansat );
/* audio */
-extern const char *sasuke_sample_names[];
-extern const char *vanguard_sample_names[];
-extern const char *fantasy_sample_names[];
+extern const char *const sasuke_sample_names[];
+extern const char *const vanguard_sample_names[];
+extern const char *const fantasy_sample_names[];
extern WRITE8_HANDLER( sasuke_sound_w );
extern WRITE8_HANDLER( satansat_sound_w );
@@ -713,26 +713,26 @@ static struct CustomSound_interface custom_interface =
rockola_sh_start
};
-static struct Samplesinterface sasuke_samples_interface =
+static const struct Samplesinterface sasuke_samples_interface =
{
4, /* 4 channels */
sasuke_sample_names
};
-static struct Samplesinterface vanguard_samples_interface =
+static const struct Samplesinterface vanguard_samples_interface =
{
3, /* 3 channel */
vanguard_sample_names
};
-static struct Samplesinterface fantasy_samples_interface =
+static const struct Samplesinterface fantasy_samples_interface =
{
1, /* 1 channel */
fantasy_sample_names
};
-static struct SN76477interface sasuke_sn76477_intf_1 =
+static const struct SN76477interface sasuke_sn76477_intf_1 =
{
RES_K(470), /* 4 noise_res */
RES_K(150), /* 5 filter_res */
@@ -761,7 +761,7 @@ static struct SN76477interface sasuke_sn76477_intf_1 =
// ic48 GND: 2,22,26,27,28 +5V: 1,15,25
};
-static struct SN76477interface sasuke_sn76477_intf_2 =
+static const struct SN76477interface sasuke_sn76477_intf_2 =
{
RES_K(340), /* 4 noise_res */
RES_K(47), /* 5 filter_res */
@@ -790,7 +790,7 @@ static struct SN76477interface sasuke_sn76477_intf_2 =
// ic51 GND: 2,26,27 +5V: 1,15,22,25,28
};
-static struct SN76477interface sasuke_sn76477_intf_3 =
+static const struct SN76477interface sasuke_sn76477_intf_3 =
{
RES_K(330), /* 4 noise_res */
RES_K(47), /* 5 filter_res */
@@ -819,7 +819,7 @@ static struct SN76477interface sasuke_sn76477_intf_3 =
// ic52 GND: 2,22,27,28 +5V: 1,15,25,26
};
-static struct SN76477interface satansat_sn76477_intf =
+static const struct SN76477interface satansat_sn76477_intf =
{
RES_K(470), /* 4 noise_res */
RES_M(1.5), /* 5 filter_res */
@@ -848,7 +848,7 @@ static struct SN76477interface satansat_sn76477_intf =
// ??? GND: 2,26,27 +5V: 15,25
};
-static struct SN76477interface vanguard_sn76477_intf_1 =
+static const struct SN76477interface vanguard_sn76477_intf_1 =
{
RES_K(470), /* 4 noise_res */
RES_M(1.5), /* 5 filter_res */
@@ -877,7 +877,7 @@ static struct SN76477interface vanguard_sn76477_intf_1 =
// SHOT A GND: 2,9,26,27 +5V: 15,25
};
-static struct SN76477interface vanguard_sn76477_intf_2 =
+static const struct SN76477interface vanguard_sn76477_intf_2 =
{
RES_K(10), /* 4 noise_res */
RES_K(30), /* 5 filter_res */
@@ -906,7 +906,7 @@ static struct SN76477interface vanguard_sn76477_intf_2 =
// SHOT B GND: 1,2,26,27 +5V: 15,25,28
};
-static struct SN76477interface fantasy_sn76477_intf =
+static const struct SN76477interface fantasy_sn76477_intf =
{
RES_K(470), /* 4 noise_res */
RES_M(1.5), /* 5 filter_res */
diff --git a/src/mame/drivers/route16.c b/src/mame/drivers/route16.c
index cc386a2efd5..6030ccb431e 100644
--- a/src/mame/drivers/route16.c
+++ b/src/mame/drivers/route16.c
@@ -575,7 +575,7 @@ static struct AY8910interface stratvox_ay8910_interface =
};
-static struct SN76477interface sn76477_interface =
+static const struct SN76477interface sn76477_interface =
{
RES_K(47), /* 4 noise_res */
RES_K(150), /* 5 filter_res */
diff --git a/src/mame/drivers/rungun.c b/src/mame/drivers/rungun.c
index 29b2f3a525a..a6920e751f4 100644
--- a/src/mame/drivers/rungun.c
+++ b/src/mame/drivers/rungun.c
@@ -57,7 +57,7 @@ static int init_eeprom_count;
static int rng_z80_control;
static int rng_sound_status;
-static struct EEPROM_interface eeprom_interface =
+static const struct EEPROM_interface eeprom_interface =
{
7, /* address bits */
8, /* data bits */
diff --git a/src/mame/drivers/segag80r.c b/src/mame/drivers/segag80r.c
index 7cb66c461f6..9a81339204a 100644
--- a/src/mame/drivers/segag80r.c
+++ b/src/mame/drivers/segag80r.c
@@ -1542,7 +1542,7 @@ static DRIVER_INIT( pignewt )
static DRIVER_INIT( sindbadm )
{
- ppi8255_interface ppi_intf =
+ static ppi8255_interface ppi_intf =
{
1,
{ 0 },
diff --git a/src/mame/drivers/segag80v.c b/src/mame/drivers/segag80v.c
index 61d5fff24c1..1e43b3d09ec 100644
--- a/src/mame/drivers/segag80v.c
+++ b/src/mame/drivers/segag80v.c
@@ -812,7 +812,7 @@ INPUT_PORTS_END
*
*************************************/
-static const char *elim_sample_names[] =
+static const char *const elim_sample_names[] =
{
"*elim2",
"elim1.wav",
@@ -830,7 +830,7 @@ static const char *elim_sample_names[] =
0 /* end of array */
};
-static struct Samplesinterface elim2_samples_interface =
+static const struct Samplesinterface elim2_samples_interface =
{
8, /* 8 channels */
elim_sample_names
@@ -844,7 +844,7 @@ static struct Samplesinterface elim2_samples_interface =
*
*************************************/
-static const char *spacfury_sample_names[] =
+static const char *const spacfury_sample_names[] =
{
"*spacfury",
/* Sound samples */
@@ -862,7 +862,7 @@ static const char *spacfury_sample_names[] =
};
-static struct Samplesinterface spacfury_samples_interface =
+static const struct Samplesinterface spacfury_samples_interface =
{
8, /* 8 channels */
spacfury_sample_names
@@ -875,7 +875,7 @@ static struct Samplesinterface spacfury_samples_interface =
*
*************************************/
-static const char *zektor_sample_names[] =
+static const char *const zektor_sample_names[] =
{
"*zektor",
"elim1.wav", /* 0 fireball */
@@ -893,7 +893,7 @@ static const char *zektor_sample_names[] =
};
-static struct Samplesinterface zektor_samples_interface =
+static const struct Samplesinterface zektor_samples_interface =
{
8,
zektor_sample_names
diff --git a/src/mame/drivers/segahang.c b/src/mame/drivers/segahang.c
index 1c95682dd3c..ba62db8b034 100644
--- a/src/mame/drivers/segahang.c
+++ b/src/mame/drivers/segahang.c
@@ -62,7 +62,7 @@ static READ8_HANDLER( adc_status_r );
*
*************************************/
-static ppi8255_interface hangon_ppi_intf =
+static const ppi8255_interface hangon_ppi_intf =
{
2,
{ NULL, NULL },
diff --git a/src/mame/drivers/segaorun.c b/src/mame/drivers/segaorun.c
index 0e71a72406e..0b67ff0b3eb 100644
--- a/src/mame/drivers/segaorun.c
+++ b/src/mame/drivers/segaorun.c
@@ -76,7 +76,7 @@ static WRITE8_HANDLER( video_control_w );
*
*************************************/
-static ppi8255_interface single_ppi_intf =
+static const ppi8255_interface single_ppi_intf =
{
1,
{ unknown_porta_r },
diff --git a/src/mame/drivers/segas16a.c b/src/mame/drivers/segas16a.c
index 433a4be5ebd..cc3be60695a 100644
--- a/src/mame/drivers/segas16a.c
+++ b/src/mame/drivers/segas16a.c
@@ -183,7 +183,7 @@ static WRITE8_HANDLER( tilemap_sound_w );
*
*************************************/
-static ppi8255_interface single_ppi_intf =
+static const ppi8255_interface single_ppi_intf =
{
1,
{ NULL },
diff --git a/src/mame/drivers/seibuspi.c b/src/mame/drivers/seibuspi.c
index fb3b9d05f80..dada511c049 100644
--- a/src/mame/drivers/seibuspi.c
+++ b/src/mame/drivers/seibuspi.c
@@ -1699,7 +1699,7 @@ static NVRAM_HANDLER( spi )
}
/* this is a 93C46 but with reset delay */
-static struct EEPROM_interface eeprom_interface =
+static const struct EEPROM_interface eeprom_interface =
{
6, /* address bits */
16, /* data bits */
diff --git a/src/mame/drivers/senjyo.c b/src/mame/drivers/senjyo.c
index 9b3482e33af..0f32da485b5 100644
--- a/src/mame/drivers/senjyo.c
+++ b/src/mame/drivers/senjyo.c
@@ -649,7 +649,7 @@ static struct z80_irq_daisy_chain daisy_chain[] =
-static struct Samplesinterface senjyo_samples_interface =
+static const struct Samplesinterface senjyo_samples_interface =
{
1,
NULL,
diff --git a/src/mame/drivers/simpl156.c b/src/mame/drivers/simpl156.c
index 58aafae4e33..05908457286 100644
--- a/src/mame/drivers/simpl156.c
+++ b/src/mame/drivers/simpl156.c
@@ -99,7 +99,7 @@ extern void decrypt156(void);
#include "deco16ic.h"
static UINT32 *simpl156_systemram;
-static UINT8 *simpl156_default_eeprom;
+static const UINT8 *simpl156_default_eeprom;
extern VIDEO_START( simpl156 );
extern VIDEO_UPDATE( simpl156 );
@@ -1040,7 +1040,7 @@ ROM_END
/* some default eeproms */
-static UINT8 chainrec_eeprom[128] = {
+static const UINT8 chainrec_eeprom[128] = {
0x52, 0x54, 0x00, 0x50, 0x00, 0x00, 0x39, 0x11, 0x41, 0x54, 0x00, 0x43, 0x00, 0x50, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
@@ -1109,7 +1109,7 @@ static UINT8 chainrec_eeprom[128] = {
*/
-static UINT8 osman_eeprom[128] = {
+static const UINT8 osman_eeprom[128] = {
0xFF, 0xBE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
@@ -1119,7 +1119,7 @@ static UINT8 osman_eeprom[128] = {
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
};
-static UINT8 candance_eeprom[128] = {
+static const UINT8 candance_eeprom[128] = {
0xFF, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
@@ -1129,7 +1129,7 @@ static UINT8 candance_eeprom[128] = {
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
};
-static UINT8 prtytime_eeprom[128] = {
+static const UINT8 prtytime_eeprom[128] = {
0xAF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
@@ -1140,7 +1140,7 @@ static UINT8 prtytime_eeprom[128] = {
0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0x7F, 0xFF, 0xFF, 0x7F, 0xFE, 0xFF, 0xFF
};
-static UINT8 gangonta_eeprom[128] = {
+static const UINT8 gangonta_eeprom[128] = {
0x2F, 0xFF, 0x2F, 0xFF, 0xFF, 0xFE, 0xFF, 0xFE, 0xFF, 0xFE, 0xED, 0xCB, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
diff --git a/src/mame/drivers/smstrv.c b/src/mame/drivers/smstrv.c
index ec0ebe69736..15b1b4d3de0 100644
--- a/src/mame/drivers/smstrv.c
+++ b/src/mame/drivers/smstrv.c
@@ -204,7 +204,7 @@ static VIDEO_UPDATE( smstrv )
return 0;
}
-static ppi8255_interface ppi8255_intf =
+static const ppi8255_interface ppi8255_intf =
{
2, /* 2 chips */
{ r1, r4 }, /* Port A read */
diff --git a/src/mame/drivers/starcrus.c b/src/mame/drivers/starcrus.c
index 0021da2e01a..c640ca50b74 100644
--- a/src/mame/drivers/starcrus.c
+++ b/src/mame/drivers/starcrus.c
@@ -161,7 +161,7 @@ static PALETTE_INIT( starcrus )
memcpy(colortable,colortable_source,sizeof(colortable_source));
}
-static const char *starcrus_sample_names[] =
+static const char *const starcrus_sample_names[] =
{
"*starcrus",
"engine.wav", /* engine sound, channel 0 */
@@ -171,7 +171,7 @@ static const char *starcrus_sample_names[] =
0
};
-static struct Samplesinterface samples_interface =
+static const struct Samplesinterface samples_interface =
{
4, /* 4 channels */
starcrus_sample_names
diff --git a/src/mame/drivers/statriv2.c b/src/mame/drivers/statriv2.c
index cdf4cdf6517..d17d9015d3c 100644
--- a/src/mame/drivers/statriv2.c
+++ b/src/mame/drivers/statriv2.c
@@ -65,7 +65,7 @@ PROM use is unknown
/* Default NVram, we seem to need one or statriv2 crashes during attract
attempting to display an unterminated message */
-static UINT8 statriv2_default_eeprom[256] = {
+static const UINT8 statriv2_default_eeprom[256] = {
0x24,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x11,0x00,
0x00,0x00,0x00,0x00,0x01,0x02,0x01,0x05,0x00,0x00,0x11,0x49,0x41,0x41,0x00,0x00,
@@ -84,7 +84,7 @@ static UINT8 statriv2_default_eeprom[256] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
-static UINT8 quaquiz2_default_eeprom[256] = {
+static const UINT8 quaquiz2_default_eeprom[256] = {
0x6f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x02,0x00,0x10,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0xa5,0x6e,0x03,0xff,
0x50,0x03,0xff,0xa0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
diff --git a/src/mame/drivers/stlforce.c b/src/mame/drivers/stlforce.c
index 44a22e10269..70f2151d853 100644
--- a/src/mame/drivers/stlforce.c
+++ b/src/mame/drivers/stlforce.c
@@ -74,7 +74,7 @@ TO DO :
UINT16 *stlforce_bg_videoram, *stlforce_mlow_videoram, *stlforce_mhigh_videoram, *stlforce_tx_videoram;
UINT16 *stlforce_bg_scrollram, *stlforce_mlow_scrollram, *stlforce_mhigh_scrollram, *stlforce_vidattrram;
UINT16 *stlforce_spriteram;
-static UINT8 *default_eeprom;
+static const UINT8 *default_eeprom;
extern int stlforce_sprxoffs;
VIDEO_START( stlforce );
@@ -197,7 +197,7 @@ static GFXDECODE_START( stlforce )
GFXDECODE_ENTRY( REGION_GFX2, 0, stlforce_splayout, 0, 256 )
GFXDECODE_END
-static UINT8 stlforce_default_eeprom[128] = {
+static const UINT8 stlforce_default_eeprom[128] = {
0x7e, 0x01, 0x00, 0x00, 0x01, 0x03, 0x05, 0x01, 0x01, 0x00, 0x4e, 0x20, 0x00, 0x00, 0x4a, 0x4d,
0x42, 0x00, 0x02, 0x01, 0x4e, 0x20, 0x00, 0x00, 0x4d, 0x41, 0x43, 0x00, 0x02, 0x01, 0x00, 0x64,
0x00, 0x00, 0x41, 0x41, 0x41, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x41, 0x41, 0x41, 0x00,
@@ -208,7 +208,7 @@ static UINT8 stlforce_default_eeprom[128] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
};
-static UINT8 twinbrat_default_eeprom[128] = {
+static const UINT8 twinbrat_default_eeprom[128] = {
0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x03,
0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b,
diff --git a/src/mame/drivers/stv.c b/src/mame/drivers/stv.c
index 3e20a72120a..43bacb02ec6 100644
--- a/src/mame/drivers/stv.c
+++ b/src/mame/drivers/stv.c
@@ -3306,6 +3306,48 @@ ROM_START( thunt )
ROM_LOAD16_WORD_SWAP( "th-e-5.ic5", 0x1000000, 0x0400000, CRC(3914b805) SHA1(1331ce82ba0bdfc76fe3456a5252e69c00e2cf1f) )
ROM_END
+ROM_START( thuntk )
+ STV_BIOS
+
+ ROM_REGION32_BE( 0x3000000, REGION_USER1, 0 ) /* SH2 code */
+ ROM_FILL( 0x0000000, 0x0400000, 0x00 )
+ ROM_LOAD16_BYTE( "2.ic13_2", 0x0200000, 0x0080000, CRC(6cae2926) SHA1(e8d5745b4228de24672da5017cb3dab58344f59f) )
+ ROM_LOAD16_BYTE( "1.ic13_1", 0x0200001, 0x0080000, CRC(460727c8) SHA1(da7171b65734264e10692e3408ac93beb374c65e) )
+
+ ROM_LOAD( "bom210-10.ic2", 0x1c00000, 0x0400000, CRC(f59d0827) SHA1(2bed4b2c78e9b4e9332f576e1b264a6343f4cfff) )
+ ROM_RELOAD( 0x0400000, 0x0400000 )
+ ROM_LOAD( "bom210-11.ic3", 0x2000000, 0x0400000, CRC(44e5a13e) SHA1(aee3c06662a1d083f3bd01292cf2694132f63533) )
+ ROM_RELOAD( 0x0800000, 0x0400000 )
+ ROM_LOAD( "bom210-12.ic4", 0x2400000, 0x0400000, CRC(deabc701) SHA1(cb313ae9bf6f115682fc76647a999e12c98f6120) )
+ ROM_RELOAD( 0x0c00000, 0x0400000 )
+ ROM_LOAD( "bom210-13.ic5", 0x2800000, 0x0400000, CRC(5ece1d5c) SHA1(6d88f71b485bf2b3c164fa22f1c7ecaba4b3f5b1) )
+ ROM_RELOAD( 0x1000000, 0x0400000 )
+ROM_END
+
+
+ROM_START( sanjeon )
+ STV_BIOS
+
+ ROM_REGION32_BE( 0x3000000, REGION_USER1, 0 ) /* SH2 code */
+ ROM_LOAD( "ic11", 0x0000000, 0x0200000, CRC(9abae8d4) SHA1(ddbe4c8fff8fa59d63e278e95f245145d2da8aeb) ) // ic13 bad
+ ROM_RELOAD ( 0x0100000, 0x0200000 )
+ ROM_RELOAD ( 0x0200000, 0x0200000 )
+ ROM_RELOAD ( 0x0300000, 0x0200000 )
+
+ ROM_LOAD( "ic13", 0x0400000, 0x0200000, CRC(f72c1d13) SHA1(a2b168d187034024b83fbbe2f5eec78816285da9) ) // ic2 good
+ ROM_LOAD( "ic14", 0x0600000, 0x0200000, CRC(bcd72105) SHA1(fb88a1f2589fef5d9845027646259ec8e781771b) ) // ic2 good
+ ROM_LOAD( "ic15", 0x0800000, 0x0200000, CRC(8c9c8352) SHA1(312e9e6435c6e9a4a19b72e234b087d4f5b069a5) ) // ic3 good
+ ROM_LOAD( "ic16", 0x0a00000, 0x0200000, CRC(07e11512) SHA1(5fb5e93a167aae501bd799aba98f7dbc3762a795) ) // ic3 good
+ ROM_LOAD( "ic17", 0x0c00000, 0x0200000, CRC(46b7b344) SHA1(a325b724e6346f585582bb2581d3063b1c8ddee9) ) // ic4 good
+ ROM_LOAD( "ic18", 0x0e00000, 0x0200000, CRC(d48404e1) SHA1(e4927d17cb19f6825f41b41056b89de224cf97de) ) // ic4 good
+ ROM_LOAD( "ic19", 0x1000000, 0x0200000, CRC(33d23bb9) SHA1(0179438a0b14ad7eb553a24d86fae778671fcc49) ) // ic5 good
+ ROM_LOAD( "ic20", 0x1200000, 0x0200000, CRC(f8cc1038) SHA1(06bcb25eb5df77bd503b0692a96ec66c00976fe9) ) // ic5 good
+ ROM_LOAD( "ic21", 0x1400000, 0x0200000, CRC(74ceb649) SHA1(91b7eb699b7167f890528149178644a74ef3ad17) ) // ic6 good
+ ROM_LOAD( "ic22", 0x1600000, 0x0200000, CRC(85f31277) SHA1(277c28d44cabd9081a8151d6ec27d47b5606435a) ) // ic6 good
+ ROM_LOAD( "ic12", 0x1800000, 0x0400000, CRC(d5ebc84e) SHA1(f990b793cdfadbbac69c680191660f4a2f282ba2) ) // ic1 good
+ROM_END
+
+
ROM_START( sasissu )
STV_BIOS
@@ -3668,6 +3710,44 @@ ROM_START( sfish2j )
ROM_END
+ROM_START( magzun )
+ STV_BIOS
+
+ ROM_REGION32_BE( 0x3000000, REGION_USER1, 0 ) /* SH2 code */
+ ROM_LOAD( "flash.ic13", 0x0000000, 0x0100000, CRC(e6f0aca0) SHA1(251d4d9c5a332d13af3a144c5eb9d8e7836bdd1b) ) // good
+ ROM_RELOAD ( 0x0100000, 0x0100000 )
+ ROM_RELOAD ( 0x0200000, 0x0100000 )
+ ROM_RELOAD ( 0x0300000, 0x0100000 )
+
+ ROM_LOAD16_WORD_SWAP( "mpr-19354.ic2", 0x0400000, 0x0400000, CRC(a23822e7) SHA1(10ca5d39dcaaf35b80168a08d8a18d77fba1d2ce) ) // good
+ ROM_LOAD16_WORD_SWAP( "mpr-19355.ic3", 0x0800000, 0x0400000, CRC(d70e5ebc) SHA1(2d560f6b6e693b2b91cf5ff5c4f0890cc2176f91) ) // good
+ ROM_LOAD16_WORD_SWAP( "mpr-19356.ic4", 0x0c00000, 0x0400000, CRC(3bc43fe9) SHA1(f72b0f3208e2f411f4c9cc76c317a605acd32a67) ) // good
+ ROM_LOAD16_WORD_SWAP( "mpr-19357.ic5", 0x1000000, 0x0400000, CRC(aa749370) SHA1(f09b0aa94fcc983419aaf2465dae5c9c64606158) ) // good
+ ROM_LOAD16_WORD_SWAP( "mpr-19358.ic6", 0x1400000, 0x0400000, CRC(0969f1ec) SHA1(25b9671f0975172f283458d46e160080dd1d19e9) ) // good
+ ROM_LOAD16_WORD_SWAP( "mpr-19359.ic1", 0x1800000, 0x0400000, CRC(b0d06f9c) SHA1(19e04c9c3a0bea5950aba8e1975962fa37722f32) ) // good
+ROM_END
+
+
+ROM_START( stress )
+ STV_BIOS
+
+ ROM_REGION32_BE( 0x3000000, REGION_USER1, 0 ) /* SH2 code */
+ ROM_LOAD( "epr-21300a.ic13", 0x0000000, 0x0100000, CRC(899d829e) SHA1(b6c6da92dc108353998b29c0659d288645541519) ) // good
+ ROM_RELOAD ( 0x0100000, 0x0100000 )
+ ROM_RELOAD ( 0x0200000, 0x0100000 )
+ ROM_RELOAD ( 0x0300000, 0x0100000 )
+ ROM_LOAD16_WORD_SWAP( "mpr-21290.ic2", 0x0400000, 0x0400000, CRC(a49d29f3) SHA1(8f6c26fd9e94a9e03dd0029026d205cf481fe151) ) // good
+ ROM_LOAD16_WORD_SWAP( "mpr-21291.ic3", 0x0800000, 0x0400000, CRC(9452ba20) SHA1(8a9ff546901715f99bb911616c74ae30ebd7c6d7) ) // good
+ ROM_LOAD16_WORD_SWAP( "mpr-21292.ic4", 0x0c00000, 0x0400000, CRC(f60268e2) SHA1(5c2febb94553a941a68e9611617750a89c82e783) ) // good
+ ROM_LOAD16_WORD_SWAP( "mpr-21293.ic5", 0x1000000, 0x0400000, CRC(794946e0) SHA1(7881adb92fbf3efecb88f30834cdd1ed863b0b0e) ) // good
+ ROM_LOAD16_WORD_SWAP( "mpr-21294.ic6", 0x1400000, 0x0400000, CRC(550843bb) SHA1(5e278a0ae60f7bee23b5f1ee10b8ce31effc9718) ) // good
+ ROM_LOAD16_WORD_SWAP( "mpr-21289.ic1", 0x1800000, 0x0400000, CRC(c2ee8bea) SHA1(5fa0e6b492cc272c33b01adbef9233e6c8098827) ) // good
+ ROM_LOAD16_WORD_SWAP( "mpr-21296.ic8", 0x1c00000, 0x0400000, CRC(b825c42a) SHA1(7c6f737b69b9283345f8fa23cb1d110b9b5f3d7e) ) // good
+ ROM_LOAD16_WORD_SWAP( "mpr-21297.ic9", 0x2000000, 0x0400000, CRC(4bff7469) SHA1(8a36405a1a292d60b5918e604b460ed98740fae3) ) // good
+ ROM_LOAD16_WORD_SWAP( "mpr-21298.ic10", 0x2400000, 0x0400000, CRC(68d07144) SHA1(5021f43d19105b484135ebddd3fa203233096c98) ) // good
+ ROM_LOAD16_WORD_SWAP( "mpr-21299.ic11", 0x2800000, 0x0400000, CRC(ecc521c6) SHA1(f7ed4dd1cbe179652fdfdde34929b41a1fdcf9e2) ) // good
+ROM_END
+
/*
country codes:
J = Japan
@@ -3689,54 +3769,78 @@ by introdon in ST-V ("SG0000000"),and according to the manual it's even wrong! (
by Sega titles,and this is a Sunsoft game)It's likely to be a left-over...
*/
+DRIVER_INIT( sanjeon )
+{
+ UINT8 *src = memory_region ( REGION_USER1 );
+ int x;
+
+ for (x=0;x<0x3000000;x++)
+ {
+ src[x] = src[x]^0xff;
+
+ src[x] = BITSWAP8(src[x],7,2,5,1, 3,6,4,0);
+ src[x] = BITSWAP8(src[x],4,6,5,7, 3,2,1,0);
+ src[x] = BITSWAP8(src[x],7,6,5,4, 2,3,1,0);
+ src[x] = BITSWAP8(src[x],7,0,5,4, 3,2,1,6);
+ src[x] = BITSWAP8(src[x],3,6,5,4, 7,2,1,0);
+
+ }
+
+
+ driver_init_sasissu(Machine);
+}
+
GAME( 1996, stvbios, 0, stv, stv, stv, ROT0, "Sega", "ST-V Bios", GAME_IS_BIOS_ROOT )
//GBX YEAR, NAME, PARENT, BIOS, MACH,INP, INIT, MONITOR
/* Playable */
-GAME( 1998, astrass, stvbios, stv, stv, astrass, ROT0, "Sunsoft", "Astra SuperStars (J 980514 V1.002)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
+GAME( 1998, astrass, stvbios, stv, stv, astrass, ROT0, "Sunsoft", "Astra SuperStars (J 980514 V1.002)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
GAME( 1995, bakubaku, stvbios, stv, stv, bakubaku, ROT0, "Sega", "Baku Baku Animal (J 950407 V1.000)", GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS )
-GAME( 1996, batmanfr, stvbios, stv, stv, batmanfr, ROT0, "Acclaim", "Batman Forever (JUE 960507 V1.000)", GAME_NO_SOUND )
+GAME( 1996, batmanfr, stvbios, stv, stv, batmanfr, ROT0, "Acclaim", "Batman Forever (JUE 960507 V1.000)", GAME_NO_SOUND )
GAME( 1996, colmns97, stvbios, stv, stv, colmns97, ROT0, "Sega", "Columns '97 (JET 961209 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
GAME( 1997, cotton2, stvbios, stv, stv, cotton2, ROT0, "Success", "Cotton 2 (JUET 970902 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
GAME( 1998, cottonbm, stvbios, stv, stv, cottonbm, ROT0, "Success", "Cotton Boomerang (JUET 980709 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
-GAME( 1995, critcrsh, stvbios, stv, critcrsh, ic13, ROT0, "Sega", "Critter Crusher (EA 951204 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
-GAME( 1999, danchih, stvbios, stv, stvmp,danchih, ROT0, "Altron (Tecmo license)", "Danchi de Hanafuda (J 990607 V1.400)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
+GAME( 1995, critcrsh, stvbios, stv, critcrsh, ic13, ROT0, "Sega", "Critter Crusher (EA 951204 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
+GAME( 1999, danchih, stvbios, stv, stvmp,danchih, ROT0, "Altron (Tecmo license)", "Danchi de Hanafuda (J 990607 V1.400)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
GAME( 1996, diehard, stvbios, stv, stv, diehard, ROT0, "Sega", "Die Hard Arcade (UET 960515 V1.000)", GAME_IMPERFECT_SOUND )
GAME( 1996, dnmtdeka, diehard, stv, stv, dnmtdeka, ROT0, "Sega", "Dynamite Deka (J 960515 V1.000)", GAME_IMPERFECT_SOUND )
GAME( 1995, ejihon, stvbios, stv, stv, ic13, ROT0, "Sega", "Ejihon Tantei Jimusyo (J 950613 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
GAME( 1995, fhboxers, stvbios, stv, stv, fhboxers, ROT0, "Sega", "Funky Head Boxers (JUETBKAL 951218 V1.000)", GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS )
-GAME( 1994, gaxeduel, stvbios, stv, stv, gaxeduel, ROT0, "Sega", "Golden Axe - The Duel (JUETL 950117 V1.000)", GAME_IMPERFECT_SOUND )
+GAME( 1994, gaxeduel, stvbios, stv, stv, gaxeduel, ROT0, "Sega", "Golden Axe - The Duel (JUETL 950117 V1.000)", GAME_IMPERFECT_SOUND )
GAME( 1998, grdforce, stvbios, stv, stv, grdforce, ROT0, "Success", "Guardian Force (JUET 980318 V0.105)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
GAME( 1998, groovef, stvbios, stv, stv, groovef, ROT0, "Atlus", "Power Instinct 3 - Groove On Fight (J 970416 V1.001)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
GAME( 1997, hanagumi, stvbios, stv, stv, hanagumi, ROT0, "Sega", "Hanagumi Taisen Columns - Sakura Wars (J 971007 V1.010)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
-GAME( 1996, introdon, stvbios, stv, stv, ic13, ROT0, "Sunsoft / Success", "Karaoke Quiz Intro Don Don! (J 960213 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
+GAME( 1996, introdon, stvbios, stv, stv, ic13, ROT0, "Sunsoft / Success", "Karaoke Quiz Intro Don Don! (J 960213 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
GAME( 1995, kiwames, stvbios, stv, stvmp,ic13, ROT0, "Athena", "Pro Mahjong Kiwame S (J 951020 V1.208)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
GAME( 1997, maruchan, stvbios, stv, stv, maruchan, ROT0, "Sega / Toyosuisan", "Maru-Chan de Goo! (J 971216 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
GAME( 1996, mausuke, stvbios, stv, stv, mausuke, ROT0, "Data East", "Mausuke no Ojama the World (J 960314 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
GAME( 1998, othellos, stvbios, stv, stv, othellos, ROT0, "Success", "Othello Shiyouyo (J 980423 V1.002)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
-GAME( 1995, pblbeach, stvbios, stv, stv, pblbeach, ROT0, "T&E Soft", "Pebble Beach - The Great Shot (JUE 950913 V0.990)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
+GAME( 1995, pblbeach, stvbios, stv, stv, pblbeach, ROT0, "T&E Soft", "Pebble Beach - The Great Shot (JUE 950913 V0.990)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
GAME( 1996, prikura, stvbios, stv, stv, prikura, ROT0, "Atlus", "Princess Clara Daisakusen (J 960910 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
GAME( 1996, puyosun, stvbios, stv, stv, puyosun, ROT0, "Compile", "Puyo Puyo Sun (J 961115 V0.001)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
-GAME( 1998, rsgun, stvbios, stv, stv, rsgun, ROT0, "Treasure", "Radiant Silvergun (JUET 980523 V1.000)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
+GAME( 1998, rsgun, stvbios, stv, stv, rsgun, ROT0, "Treasure", "Radiant Silvergun (JUET 980523 V1.000)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
GAME( 1998, sasissu, stvbios, stv, stv, sasissu, ROT0, "Sega", "Taisen Tanto-R Sashissu!! (J 980216 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
+GAME( 1999, sanjeon, sasissu, stv, stv, sanjeon, ROT0, "Sega / Deniam", "DaeJeon! SanJeon SuJeon (Korea)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
GAME( 1997, seabass, stvbios, stv, stv, seabass, ROT0, "A wave inc. (Able license)","Sea Bass Fishing (JUET 971110 V0.001)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
-GAME( 1995, shanhigw, stvbios, stv, stv, shanhigw, ROT0, "Sunsoft / Activision", "Shanghai - The Great Wall / Shanghai Triple Threat (JUE 950623 V1.005)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
+GAME( 1995, shanhigw, stvbios, stv, stv, shanhigw, ROT0, "Sunsoft / Activision", "Shanghai - The Great Wall / Shanghai Triple Threat (JUE 950623 V1.005)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
GAME( 1997, shienryu, stvbios, stv, stv, shienryu, ROT270, "Warashi", "Shienryu (JUET 961226 V1.000)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
GAME( 1995, smleague, stvbios, stv, stv, smleague, ROT0, "Sega", "Super Major League (U 960108 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
-GAME( 1995, finlarch, smleague, stv, stv, finlarch, ROT0, "Sega", "Final Arch (J 950714 V1.001)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
+GAME( 1995, finlarch, smleague,stv, stv, finlarch, ROT0, "Sega", "Final Arch (J 950714 V1.001)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
GAME( 1998, sss, stvbios, stv, stv, sss, ROT0, "Capcom / Cave / Victor", "Steep Slope Sliders (JUET 981110 V1.000)", GAME_IMPERFECT_SOUND )
GAME( 1995, sandor, stvbios, stv, stv, sandor, ROT0, "Sega", "Puzzle & Action: Sando-R (J 951114 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
+GAME( 1997, thunt, sandor, stv, stv, thunt, ROT0, "Sega", "Puzzle & Action: Treasure Hunt (JUET 970901 V2.00E)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
+GAME( 1997, thuntk, sandor, stv, stv, sandor, ROT0, "Sega / Deniam", "Puzzle & Action: BoMulEul Chajara (Korea)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
GAME( 1996, sokyugrt, stvbios, stv, stv, sokyugrt, ROT0, "Raizing / 8ing", "Soukyugurentai / Terra Diver (JUET 960821 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
-GAME( 1995, suikoenb, stvbios, stv, stv, suikoenb, ROT0, "Data East", "Suikoenbu / Outlaws of the Lost Dynasty (JUETL 950314 V2.001)", GAME_IMPERFECT_SOUND )
-GAME( 1997, thunt, sandor, stv, stv, thunt, ROT0, "Sega", "Puzzle & Action: Treasure Hunt (JUET 970901 V2.00E)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
+GAME( 1995, suikoenb, stvbios, stv, stv, suikoenb, ROT0, "Data East", "Suikoenbu / Outlaws of the Lost Dynasty (JUETL 950314 V2.001)", GAME_IMPERFECT_SOUND )
GAME( 1996, vfkids, stvbios, stv, stv, ic13, ROT0, "Sega", "Virtua Fighter Kids (JUET 960319 V0.000)", GAME_IMPERFECT_SOUND )
GAME( 1997, winterht, stvbios, stv, stv, winterht, ROT0, "Sega", "Winter Heat (JUET 971012 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
GAME( 1997, znpwfv, stvbios, stv, stv, znpwfv, ROT0, "Sega", "Zen Nippon Pro-Wrestling Featuring Virtua (J 971123 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
/* Almost */
-GAME( 1997, vmahjong, stvbios, stv, stvmp,stv, ROT0, "Micronet", "Virtual Mahjong (J 961214 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
-GAME( 1998, myfairld, stvbios, stv, stvmp,stv, ROT0, "Micronet", "Virtual Mahjong 2 - My Fair Lady (J 980608 V1.000)", GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING )
-GAME( 1998, twcup98, stvbios, stv, stv, twcup98, ROT0, "Tecmo", "Tecmo World Cup '98 (JUET 980410 V1.000)", GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS|GAME_NOT_WORKING ) // player movement
+GAME( 1997, vmahjong, stvbios, stv, stvmp,stv, ROT0, "Micronet", "Virtual Mahjong (J 961214 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
+GAME( 1998, myfairld, stvbios, stv, stvmp,stv, ROT0, "Micronet", "Virtual Mahjong 2 - My Fair Lady (J 980608 V1.000)", GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING )
+GAME( 1998, twcup98, stvbios, stv, stv, twcup98, ROT0, "Tecmo", "Tecmo World Cup '98 (JUET 980410 V1.000)", GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS|GAME_NOT_WORKING ) // player movement
+GAME( 1997, stress, stvbios, stv, stv, ic13, ROT0, "Sega", "Stress Busters", GAME_NOT_WORKING ) // needs printer
/* Doing Something.. but not enough yet */
GAME( 1998, elandore, stvbios, stv, stv, elandore, ROT0, "Sai-Mate", "Elan Doree - Legend of Dragon (JUET 980922 V1.006)", GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )//japanese name?
@@ -3749,6 +3853,7 @@ GAME( 1999, ffreveng, stvbios, stv, stv, ffreveng, ROT0, "Capcom",
/* CD games */
GAME( 1995, sfish2, 0, stv, stv, ic13, ROT0, "Sega", "Sport Fishing 2 (UET 951106 V1.10e)", GAME_NO_SOUND | GAME_NOT_WORKING )
GAME( 1995, sfish2j, sfish2, stv, stv, ic13, ROT0, "Sega", "Sport Fishing 2 (J 951201 V1.100)", GAME_NO_SOUND | GAME_NOT_WORKING )
+GAME( 1997, magzun, stvbios, stv, stv, ic13, ROT0, "Sega", "Magical Zunou Power", GAME_NOT_WORKING )
/*
This is the known list of undumped ST-V games:
diff --git a/src/mame/drivers/stvinit.c b/src/mame/drivers/stvinit.c
index d2955ea0ee3..e6832c4a157 100644
--- a/src/mame/drivers/stvinit.c
+++ b/src/mame/drivers/stvinit.c
@@ -100,7 +100,8 @@ EEPROM write ffff to address 3d
EEPROM write ffff to address 3e
EEPROM write ffff to address 3f
*/
-/*static UINT8 stv_default_eeprom[128] = {
+#if 0
+static const UINT8 stv_default_eeprom[128] = {
0x53,0x45,0xff,0xff,0xff,0xff,0x3b,0xe2,
0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x00,
0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x08,
@@ -117,9 +118,10 @@ EEPROM write ffff to address 3f
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff
-};*/
+};
+#endif
-static UINT8 shienryu_default_eeprom[128] = {
+static const UINT8 shienryu_default_eeprom[128] = {
0x53,0x45,0x47,0x41,0x3b,0xe2,0x5e,0x09,
0x5e,0x09,0x00,0x00,0x00,0x00,0x00,0x02,
0x01,0x00,0x01,0x01,0x00,0x00,0x00,0x00,
@@ -138,7 +140,7 @@ static UINT8 shienryu_default_eeprom[128] = {
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
};
-static UINT8 *stv_default_eeprom;
+static const UINT8 *stv_default_eeprom;
static int stv_default_eeprom_length;
NVRAM_HANDLER( stv )
diff --git a/src/mame/drivers/suna8.c b/src/mame/drivers/suna8.c
index 90263809662..ab6fa48edfd 100644
--- a/src/mame/drivers/suna8.c
+++ b/src/mame/drivers/suna8.c
@@ -1539,7 +1539,7 @@ static struct AY8910interface hardhead_ay8910_interface =
suna8_samples_number_w
};
-static struct Samplesinterface suna8_samples_interface =
+static const struct Samplesinterface suna8_samples_interface =
{
1,
NULL,
diff --git a/src/mame/drivers/superchs.c b/src/mame/drivers/superchs.c
index 3509cd9c81d..046a1e1458e 100644
--- a/src/mame/drivers/superchs.c
+++ b/src/mame/drivers/superchs.c
@@ -374,7 +374,7 @@ static MACHINE_RESET( superchs )
f3_68681_reset();
}
-static struct EEPROM_interface superchs_eeprom_interface =
+static const struct EEPROM_interface superchs_eeprom_interface =
{
6, /* address bits */
16, /* data bits */
@@ -385,7 +385,7 @@ static struct EEPROM_interface superchs_eeprom_interface =
"0100110000", /* lock command */
};
-static UINT8 default_eeprom[128]={
+static const UINT8 default_eeprom[128]={
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x53,0x00,0x2e,0x00,0x43,0x00,0x00,
0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0xff,0xff,0xff,0xff,0x00,0x01,
diff --git a/src/mame/drivers/superqix.c b/src/mame/drivers/superqix.c
index ed8898b3f3e..54d3cb5e862 100644
--- a/src/mame/drivers/superqix.c
+++ b/src/mame/drivers/superqix.c
@@ -862,7 +862,7 @@ GFXDECODE_END
-static struct Samplesinterface pbillian_samples_interface =
+static const struct Samplesinterface pbillian_samples_interface =
{
1,
NULL,
diff --git a/src/mame/drivers/system1.c b/src/mame/drivers/system1.c
index 60a126bc36a..19fff673b5d 100644
--- a/src/mame/drivers/system1.c
+++ b/src/mame/drivers/system1.c
@@ -2632,7 +2632,7 @@ ROM_START( starjack )
ROM_LOAD( "epr-5318.86", 0x0000, 0x4000, CRC(6f2e1fd3) SHA1(326d538551245fce67d0fdba85975e27093b7a93) )
ROM_LOAD( "epr-5319.93", 0x4000, 0x4000, CRC(ebee4999) SHA1(bb331be270dc1da63699533d9f02d73ce28f1bc5) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.106", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -2660,18 +2660,18 @@ ROM_START( starjacs )
ROM_LOAD( "a1_ic86.86", 0x0000, 0x4000, CRC(6f2e1fd3) SHA1(326d538551245fce67d0fdba85975e27093b7a93) )
ROM_LOAD( "a1_ic93.93", 0x4000, 0x4000, CRC(07987244) SHA1(8468b95684b1f62c6de6af1b1d405bfb333e4e26) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.106", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
ROM_START( regulus )
ROM_REGION( 0x10000, REGION_CPU1, 0 )
- ROM_LOAD( "epr5640a.129", 0x0000, 0x2000, CRC(dafb1528) SHA1(9140c5507bd931df3f8ef8d2910bc74f737b1a5a) ) /* encrypted */
- ROM_LOAD( "epr5641a.130", 0x2000, 0x2000, CRC(0fcc850e) SHA1(d2d6b06bf1e2dc404aa5451cc9f1b919fb5be0f5) ) /* encrypted */
- ROM_LOAD( "epr5642a.131", 0x4000, 0x2000, CRC(4feffa17) SHA1(9d9f4227c4e60a5cc53c369e7c9ce59ea8df3553) ) /* encrypted */
- ROM_LOAD( "epr5643a.132", 0x6000, 0x2000, CRC(b8ac7eb4) SHA1(f96bcde021060a8c1c5270b73487e24d1893e8e5) ) /* encrypted */
+ ROM_LOAD( "epr-5640a.129", 0x0000, 0x2000, CRC(dafb1528) SHA1(9140c5507bd931df3f8ef8d2910bc74f737b1a5a) ) /* encrypted */
+ ROM_LOAD( "epr-5641a.130", 0x2000, 0x2000, CRC(0fcc850e) SHA1(d2d6b06bf1e2dc404aa5451cc9f1b919fb5be0f5) ) /* encrypted */
+ ROM_LOAD( "epr-5642a.131", 0x4000, 0x2000, CRC(4feffa17) SHA1(9d9f4227c4e60a5cc53c369e7c9ce59ea8df3553) ) /* encrypted */
+ ROM_LOAD( "epr-5643a.132", 0x6000, 0x2000, CRC(b8ac7eb4) SHA1(f96bcde021060a8c1c5270b73487e24d1893e8e5) ) /* encrypted */
ROM_LOAD( "epr-5644.133", 0x8000, 0x2000, CRC(ffd05b7d) SHA1(6fe471548d227d834c012d5d148b1ea1c12dfd00) )
- ROM_LOAD( "epr5645a.134", 0xa000, 0x2000, CRC(6b4bf77c) SHA1(0200efb58b85a6873db44ffa70c3c14dbca958a6) )
+ ROM_LOAD( "epr-5645a.134", 0xa000, 0x2000, CRC(6b4bf77c) SHA1(0200efb58b85a6873db44ffa70c3c14dbca958a6) )
ROM_REGION( 0x10000, REGION_CPU2, 0 )
ROM_LOAD( "epr-5652.3", 0x0000, 0x2000, CRC(74edcb98) SHA1(bc181c73a6009ca723e715650adb920b77bd311c) )
@@ -2688,7 +2688,7 @@ ROM_START( regulus )
ROM_LOAD( "epr-5638.86", 0x0000, 0x4000, CRC(617363dd) SHA1(c8024f541086a8a940e21219fa4522646aeb365a) )
ROM_LOAD( "epr-5639.93", 0x4000, 0x4000, CRC(a4ec5131) SHA1(033bf46d2625f99544a784fe3fa299cc1b1b48e1) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.106", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -2716,7 +2716,7 @@ ROM_START( reguluso )
ROM_LOAD( "epr-5638.86", 0x0000, 0x4000, CRC(617363dd) SHA1(c8024f541086a8a940e21219fa4522646aeb365a) )
ROM_LOAD( "epr-5639.93", 0x4000, 0x4000, CRC(a4ec5131) SHA1(033bf46d2625f99544a784fe3fa299cc1b1b48e1) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.106", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -2744,7 +2744,7 @@ ROM_START( regulusu )
ROM_LOAD( "epr-5638.86", 0x0000, 0x4000, CRC(617363dd) SHA1(c8024f541086a8a940e21219fa4522646aeb365a) )
ROM_LOAD( "epr-5639.93", 0x4000, 0x4000, CRC(a4ec5131) SHA1(033bf46d2625f99544a784fe3fa299cc1b1b48e1) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.106", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -2772,7 +2772,7 @@ ROM_START( upndown )
ROM_LOAD( "epr-5514.86", 0x0000, 0x4000, CRC(fcc0a88b) SHA1(ca7db3df10deb6720096e6c50eddd9b74c47f0a0) )
ROM_LOAD( "epr-5515.93", 0x4000, 0x4000, CRC(60908838) SHA1(aedff8ce07ab16942037e5aff212652e51c19e71) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.106", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -2800,7 +2800,7 @@ ROM_START( upndownu )
ROM_LOAD( "epr-5514.86", 0x0000, 0x4000, CRC(fcc0a88b) SHA1(ca7db3df10deb6720096e6c50eddd9b74c47f0a0) )
ROM_LOAD( "epr-5515.93", 0x4000, 0x4000, CRC(60908838) SHA1(aedff8ce07ab16942037e5aff212652e51c19e71) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.106", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -2828,7 +2828,7 @@ ROM_START( mrviking )
ROM_LOAD( "epr-5749.86", 0x0000, 0x4000, CRC(e24682cd) SHA1(3f626f3e5e2db486ccf727e9869ab488643b4a8c) )
ROM_LOAD( "epr-5750.93", 0x4000, 0x4000, CRC(6564d1ad) SHA1(f246afee7e73bc30054b0e5dcb83fa0edd2d2164) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.106", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -2856,7 +2856,7 @@ ROM_START( mrvikngj )
ROM_LOAD( "epr-5749.86", 0x0000, 0x4000, CRC(e24682cd) SHA1(3f626f3e5e2db486ccf727e9869ab488643b4a8c) )
ROM_LOAD( "epr-5750.93", 0x4000, 0x4000, CRC(6564d1ad) SHA1(f246afee7e73bc30054b0e5dcb83fa0edd2d2164) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.106", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -2884,7 +2884,7 @@ ROM_START( swat )
ROM_LOAD( "epr-5805.86", 0x0000, 0x4000, CRC(5a732865) SHA1(55c54e54f052187ddd957131e56400c9c432a6b2) )
ROM_LOAD( "epr-5806.93", 0x4000, 0x4000, CRC(26ac258c) SHA1(e4e9f929ab8ae7da74f885481cf94335d7553a1c) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.106", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -2908,7 +2908,7 @@ ROM_START( flicky )
ROM_LOAD( "epr-5855.117", 0x0000, 0x4000, CRC(b5f894a1) SHA1(2c72dc16739dad155fcd572e1add067a7647f5bd) )
ROM_LOAD( "epr-5856.110", 0x4000, 0x4000, CRC(266af78f) SHA1(dcbfce550d10a1f2b3ce3e7e081fc008cb575708) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -2932,7 +2932,7 @@ ROM_START( flicks2 )
ROM_LOAD( "epr-5855.117", 0x0000, 0x4000, CRC(b5f894a1) SHA1(2c72dc16739dad155fcd572e1add067a7647f5bd) )
ROM_LOAD( "epr-5856.110", 0x4000, 0x4000, CRC(266af78f) SHA1(dcbfce550d10a1f2b3ce3e7e081fc008cb575708) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -2960,7 +2960,7 @@ ROM_START( flicks1 )
ROM_LOAD( "epr-5855.117", 0x0000, 0x4000, CRC(b5f894a1) SHA1(2c72dc16739dad155fcd572e1add067a7647f5bd) )
ROM_LOAD( "epr-5856.110", 0x4000, 0x4000, CRC(266af78f) SHA1(dcbfce550d10a1f2b3ce3e7e081fc008cb575708) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -2986,7 +2986,7 @@ ROM_START( flickyo )
ROM_LOAD( "epr-5855.117", 0x0000, 0x4000, CRC(b5f894a1) SHA1(2c72dc16739dad155fcd572e1add067a7647f5bd) )
ROM_LOAD( "epr-5856.110", 0x4000, 0x4000, CRC(266af78f) SHA1(dcbfce550d10a1f2b3ce3e7e081fc008cb575708) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -3014,7 +3014,7 @@ ROM_START( wmatch )
ROM_LOAD( "wm.86", 0x0000, 0x4000, CRC(238ae0e5) SHA1(af18cfe7f8103358a0ce2aef9bbd949fdc0bfbfc) )
ROM_LOAD( "wm.93", 0x4000, 0x4000, CRC(a2f19170) SHA1(47dacc380b09c6365c737d320145cedad54ecedb) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.106", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -3042,7 +3042,7 @@ ROM_START( bullfgt )
ROM_LOAD( "epr-6069.86", 0x0000, 0x4000, CRC(fe691e41) SHA1(90faf26685202e2a25bb3024750456014d0722b3) ) /* epr-6069.86 */
ROM_LOAD( "epr-6070.93", 0x4000, 0x4000, CRC(34f080df) SHA1(0e7d28e3325c8c3f06438fde29ea0ffe57fc325f) ) /* epr-6070.93 */
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
/* pr-5317.106 */
ROM_END
@@ -3068,7 +3068,7 @@ ROM_START( thetogyu )
ROM_LOAD( "epr-6069.117", 0x0000, 0x4000, CRC(fe691e41) SHA1(90faf26685202e2a25bb3024750456014d0722b3) )
ROM_LOAD( "epr-6070.110", 0x4000, 0x4000, CRC(34f080df) SHA1(0e7d28e3325c8c3f06438fde29ea0ffe57fc325f) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -3093,7 +3093,7 @@ ROM_START( pitfall2 )
ROM_LOAD( "epr6454a.117", 0x0000, 0x4000, CRC(a5d96780) SHA1(e0571f6fd031bbe2d971c3be7b96a017b0ea4be9) )
ROM_LOAD( "epr-6455.05", 0x4000, 0x4000, CRC(32ee64a1) SHA1(21743f78735fc9105fbbfac420bdaa2965b4b56f) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -3118,7 +3118,7 @@ ROM_START( pitfallu )
ROM_LOAD( "epr6454a.117", 0x0000, 0x4000, CRC(a5d96780) SHA1(e0571f6fd031bbe2d971c3be7b96a017b0ea4be9) )
ROM_LOAD( "epr-6455.05", 0x4000, 0x4000, CRC(32ee64a1) SHA1(21743f78735fc9105fbbfac420bdaa2965b4b56f) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -3145,7 +3145,7 @@ ROM_START( seganinj )
ROM_LOAD( "epr-6547.110", 0x8000, 0x4000, CRC(34451b08) SHA1(ee8708f6c886b63f138bcc10dc2a053bfad96c37) )
ROM_LOAD( "epr-6549.05", 0xc000, 0x4000, CRC(d2057668) SHA1(ded2a04f7555eb3b1e4da57901ca00635de2c043) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -3172,7 +3172,7 @@ ROM_START( seganinu )
ROM_LOAD( "epr-6547.110", 0x8000, 0x4000, CRC(34451b08) SHA1(ee8708f6c886b63f138bcc10dc2a053bfad96c37) )
ROM_LOAD( "epr-6549.05", 0xc000, 0x4000, CRC(d2057668) SHA1(ded2a04f7555eb3b1e4da57901ca00635de2c043) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -3202,7 +3202,7 @@ ROM_START( nprinces )
ROM_LOAD( "epr-6547.110", 0x8000, 0x4000, CRC(34451b08) SHA1(ee8708f6c886b63f138bcc10dc2a053bfad96c37) ) /* epr-6547.4 */
ROM_LOAD( "epr-6549.05", 0xc000, 0x4000, CRC(d2057668) SHA1(ded2a04f7555eb3b1e4da57901ca00635de2c043) ) /* epr-6549.2 */
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
/* pr-5317.106 */
ROM_END
@@ -3230,7 +3230,7 @@ ROM_START( nprincso )
ROM_LOAD( "epr-6547.110", 0x8000, 0x4000, CRC(34451b08) SHA1(ee8708f6c886b63f138bcc10dc2a053bfad96c37) )
ROM_LOAD( "epr-6549.05", 0xc000, 0x4000, CRC(d2057668) SHA1(ded2a04f7555eb3b1e4da57901ca00635de2c043) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -3260,7 +3260,7 @@ ROM_START( nprincsu )
ROM_LOAD( "epr-6547.110", 0x8000, 0x4000, CRC(34451b08) SHA1(ee8708f6c886b63f138bcc10dc2a053bfad96c37) ) /* epr-6547.4 */
ROM_LOAD( "epr-6549.05", 0xc000, 0x4000, CRC(d2057668) SHA1(ded2a04f7555eb3b1e4da57901ca00635de2c043) ) /* epr-6549.2 */
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -3287,7 +3287,7 @@ ROM_START( nprincsb )
ROM_LOAD( "epr-6547.110", 0x8000, 0x4000, CRC(34451b08) SHA1(ee8708f6c886b63f138bcc10dc2a053bfad96c37) )
ROM_LOAD( "epr-6549.05", 0xc000, 0x4000, CRC(d2057668) SHA1(ded2a04f7555eb3b1e4da57901ca00635de2c043) )
- ROM_REGION( 0x0220, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0220, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_LOAD( "nprinces.129", 0x0100, 0x0100, CRC(ae765f62) SHA1(9434b5a23d118a9c62015b479719826b38269cd4) ) /* decryption table (not used) */
ROM_LOAD( "nprinces.123", 0x0200, 0x0020, CRC(ed5146e9) SHA1(7044035c07636e4029f4b746c1a92e15173869e9) ) /* decryption table (not used) */
@@ -3316,7 +3316,7 @@ ROM_START( ninja )
ROM_LOAD( "epr-6547.110", 0x8000, 0x4000, CRC(34451b08) SHA1(ee8708f6c886b63f138bcc10dc2a053bfad96c37) )
ROM_LOAD( "epr-6549.05", 0xc000, 0x4000, CRC(d2057668) SHA1(ded2a04f7555eb3b1e4da57901ca00635de2c043) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -3341,7 +3341,7 @@ ROM_START( imsorry )
ROM_LOAD( "epr-6645.117", 0x0000, 0x4000, CRC(1ba167ee) SHA1(5a105cc3112f2533e7c5982233405d365402fba2) )
ROM_LOAD( "epr-6646.04", 0x4000, 0x4000, CRC(edda7ad6) SHA1(eef7dcde632787283c4cb522380b138060018204) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -3366,7 +3366,7 @@ ROM_START( imsorryj )
ROM_LOAD( "epr-6645.117", 0x0000, 0x4000, CRC(1ba167ee) SHA1(5a105cc3112f2533e7c5982233405d365402fba2) )
ROM_LOAD( "epr-6646.04", 0x4000, 0x4000, CRC(edda7ad6) SHA1(eef7dcde632787283c4cb522380b138060018204) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -3393,7 +3393,7 @@ ROM_START( teddybb )
ROM_LOAD( "epr-6736.110", 0x8000, 0x4000, CRC(565c25d0) SHA1(5ae524ef01138c5042b223286d65eb9043c0f0d5) )
ROM_LOAD( "epr-6738.05", 0xc000, 0x4000, CRC(e116285f) SHA1(b6fb50b02a981b3b23385200045ae537092d26d6) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -3420,7 +3420,7 @@ ROM_START( teddybbo )
ROM_LOAD( "epr-6736.110", 0x8000, 0x4000, CRC(565c25d0) SHA1(5ae524ef01138c5042b223286d65eb9043c0f0d5) )
ROM_LOAD( "epr-6738.05", 0xc000, 0x4000, CRC(e116285f) SHA1(b6fb50b02a981b3b23385200045ae537092d26d6) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -3478,7 +3478,7 @@ ROM_START( myhero )
ROM_LOAD( "epr-6922.110", 0x8000, 0x4000, CRC(37f77a78) SHA1(01d8bd41303bd5e3a6f1cdafa4a1d682e4c659a2) )
ROM_LOAD( "epr-6924.05", 0xc000, 0x4000, CRC(42bdc8f6) SHA1(f31d82641187a7cc77a4a19189b5a15d5168cbd7) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -3505,7 +3505,7 @@ ROM_START( sscandal )
ROM_LOAD( "epr-6922.110", 0x8000, 0x4000, CRC(37f77a78) SHA1(01d8bd41303bd5e3a6f1cdafa4a1d682e4c659a2) )
ROM_LOAD( "epr-6924.05", 0xc000, 0x4000, CRC(42bdc8f6) SHA1(f31d82641187a7cc77a4a19189b5a15d5168cbd7) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -3533,12 +3533,12 @@ ROM_START( myherok )
ROM_LOAD( "epr-6922.110", 0x8000, 0x4000, CRC(37f77a78) SHA1(01d8bd41303bd5e3a6f1cdafa4a1d682e4c659a2) )
ROM_LOAD( "epr-6924.05", 0xc000, 0x4000, CRC(42bdc8f6) SHA1(f31d82641187a7cc77a4a19189b5a15d5168cbd7) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
/*
- Shooting Master (SEGA) - Set 1, 8751 315-5159
+ Shooting Master (SEGA) - Rev A, 8751 315-5159a
Year: 1985
System 2
@@ -3549,7 +3549,7 @@ ROM_END
ROM_START( shtngmst )
ROM_REGION( 0x20000, REGION_CPU1, 0 )
/* This rom is located on the daughter board .*/
- ROM_LOAD( "epr7100.ic18", 0x00000, 0x8000, CRC(45e64431) SHA1(7edf818dc1f65365641e51abc197d13db7a8d4d9) )
+ 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) )
@@ -3560,7 +3560,7 @@ ROM_START( shtngmst )
/* 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 )
+ ROM_LOAD( "315-5159a.ic74", 0x00000, 0x1000, NO_DUMP )
/* These roms are located on the main board. */
ROM_REGION( 0x18000, REGION_GFX1, ROMREGION_DISPOSE )
@@ -3596,7 +3596,7 @@ ROM_START( shtngmst )
ROM_END
/*
- Shooting Master (SEGA) - Set 2, 8751 315-5159a
+ Shooting Master (SEGA) - Set 1, 8751 315-5159
Year: 1985
System 2
@@ -3604,10 +3604,10 @@ ROM_END
Light Gun Board? 834-5720
*/
-ROM_START( shtngmsb )
+ROM_START( shtngms1 )
ROM_REGION( 0x20000, REGION_CPU1, 0 )
/* This rom is located on the daughter board .*/
- ROM_LOAD( "epr7100a.ic18", 0x00000, 0x8000, CRC(661f0b6e) SHA1(a1d064839c95d8a6f6d89b0894259f666d637ec4) )
+ 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) )
@@ -3618,7 +3618,7 @@ ROM_START( shtngmsb )
/* 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 )
+ ROM_LOAD( "315-5159.ic74", 0x00000, 0x1000, NO_DUMP )
/* These roms are located on the main board. */
ROM_REGION( 0x18000, REGION_GFX1, ROMREGION_DISPOSE )
@@ -3706,16 +3706,16 @@ this set seems to hang sometimes, is it bad, it could be hacked and failing chec
ROM_START( shtngmsa )
ROM_REGION( 0x20000, REGION_CPU1, 0 )
ROM_LOAD( "7100.18", 0x00000, 0x8000, CRC(268ecb1d) SHA1(a9274c9718f7244235cc6df76331d6a0b7e4e4c8) ) // different..
- ROM_LOAD( "epr7101", 0x10000, 0x8000, CRC(ebf5ff72) SHA1(13ae06e3a81cf00b80ec939d5baf30143d61d480) )
- ROM_LOAD( "epr7102", 0x18000, 0x8000, CRC(c890a4ad) SHA1(4b59d37902ace3a69b380ff40652ee37c85f0e9d) )
+ ROM_LOAD( "epr7101.ic91", 0x10000, 0x8000, CRC(ebf5ff72) SHA1(13ae06e3a81cf00b80ec939d5baf30143d61d480) )
+ ROM_LOAD( "epr7102.ic92", 0x18000, 0x8000, CRC(c890a4ad) SHA1(4b59d37902ace3a69b380ff40652ee37c85f0e9d) )
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) )
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) )
ROM_REGION( 0x40000, REGION_GFX2, ROMREGION_ERASEFF )
ROM_LOAD( "epr7110", 0x00000, 0x8000, CRC(5d1a5048) SHA1(d1626ab1981080451c912df7e4ad7f76c0cb3459) )
@@ -3727,14 +3727,14 @@ ROM_START( shtngmsa )
ROM_LOAD( "epr7107", 0x30000, 0x8000, CRC(8f50ea24) SHA1(781687e202dedca7b72c9bd5b97d9d46fcfd601c) )
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 */
ROM_REGION( 0x0400, REGION_PLDS, ROMREGION_DISPOSE )
- ROM_LOAD( "pal16r4a.ic9", 0x0000, 0x0104, CRC(dd223015) SHA1(8d70f91b118e8653dda1efee3eaea287ae63809f) ) /* label on chip is: 315-5137 */
- ROM_LOAD( "pal16r4a(315-5137).bin", 0x0200, 0x0104, CRC(6ffd9e6f) SHA1(a60a3a2ec5bc256b18bfff0fec0172ee2e4fd955) )
+ 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_END
/*
@@ -3888,7 +3888,7 @@ ROM_START( 4dwarrio )
ROM_LOAD( "4d.110", 0x8000, 0x4000, CRC(6ec5990a) SHA1(a26dbd470744c38a26a016e5d4792ac2f2b9bc4b) )
ROM_LOAD( "4d.05", 0xc000, 0x4000, CRC(f31a1e6a) SHA1(f49dbc4b381e7096d5ffe3c16660dd63121dabf7) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -3944,7 +3944,7 @@ ROM_START( raflesia )
ROM_LOAD( "epr-7408.110", 0x8000, 0x4000, CRC(3189f33c) SHA1(8476c2c01920f0492cf643929d4f023f3afe0164) ) /* epr-7408.4 */
ROM_LOAD( "epr-7410.05", 0xc000, 0x4000, CRC(ced74789) SHA1(d0ad845bfe83412ac8d43125e1c50d0581a5b47e) ) /* epr-7410.2 */
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
/* pr-5317.106 */
ROM_END
@@ -3972,7 +3972,7 @@ ROM_START( spatter )
ROM_LOAD( "epr-6307.05", 0x8000, 0x4000, CRC(0a5ad543) SHA1(5acada30c1affc4ffbebc8365a9ba4465f213d47) )
ROM_LOAD( "epr-6309.110", 0xc000, 0x4000, CRC(7423ad98) SHA1(e19b4c64795f30e1491520160d315e4148d58df2) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
/* pr-5317.106 */
ROM_END
@@ -4000,7 +4000,7 @@ ROM_START( ssanchan )
ROM_LOAD( "epr-6307.05", 0x8000, 0x4000, CRC(0a5ad543) SHA1(5acada30c1affc4ffbebc8365a9ba4465f213d47) )
ROM_LOAD( "epr-6309.110", 0xc000, 0x4000, CRC(7423ad98) SHA1(e19b4c64795f30e1491520160d315e4148d58df2) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
/* pr-5317.106 */
ROM_END
@@ -4028,7 +4028,7 @@ ROM_START( wboy )
ROM_LOAD( "epr-7486.110", 0x8000, 0x4000, CRC(8d622c50) SHA1(9a76a50204c618347d3e8eee6cda841becd906eb) )
ROM_LOAD( "epr-7488.05", 0xc000, 0x4000, CRC(007c2f1b) SHA1(c2f1376144a49d20cb35384648e06d06978474c1) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -4055,7 +4055,7 @@ ROM_START( wboyo )
ROM_LOAD( "epr-7486.110", 0x8000, 0x4000, CRC(8d622c50) SHA1(9a76a50204c618347d3e8eee6cda841becd906eb) )
ROM_LOAD( "epr-7488.05", 0xc000, 0x4000, CRC(007c2f1b) SHA1(c2f1376144a49d20cb35384648e06d06978474c1) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -4085,7 +4085,7 @@ ROM_START( wboy2 )
ROM_LOAD( "epr-7486.110", 0x8000, 0x4000, CRC(8d622c50) SHA1(9a76a50204c618347d3e8eee6cda841becd906eb) ) /* epr-7486.4 */
ROM_LOAD( "epr-7488.05", 0xc000, 0x4000, CRC(007c2f1b) SHA1(c2f1376144a49d20cb35384648e06d06978474c1) ) /* epr-7488.2 */
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
/* pr-5317.106 */
ROM_END
@@ -4116,7 +4116,7 @@ ROM_START( wboy2u )
ROM_LOAD( "epr-7486.110", 0x8000, 0x4000, CRC(8d622c50) SHA1(9a76a50204c618347d3e8eee6cda841becd906eb) ) /* epr-7486.4 */
ROM_LOAD( "epr-7488.05", 0xc000, 0x4000, CRC(007c2f1b) SHA1(c2f1376144a49d20cb35384648e06d06978474c1) ) /* epr-7488.2 */
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
/* pr-5317.106 */
ROM_END
@@ -4144,7 +4144,7 @@ ROM_START( wboy3 )
ROM_LOAD( "epr-7486.110", 0x8000, 0x4000, CRC(8d622c50) SHA1(9a76a50204c618347d3e8eee6cda841becd906eb) )
ROM_LOAD( "epr-7488.05", 0xc000, 0x4000, CRC(007c2f1b) SHA1(c2f1376144a49d20cb35384648e06d06978474c1) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -4178,7 +4178,7 @@ ROM_START( wboy4 )
ROM_LOAD( "7578.87", 0x00000, 0x8000, CRC(6ff1637f) SHA1(9a6ddbd7b8d53273b30c3529b028c1f28bf3c63b) ) // epr7577.ic110
ROM_LOAD( "7577.86", 0x08000, 0x8000, CRC(58b3705e) SHA1(1a8ff3f1765a3b21145bd1a6c85441f806f7b17d) ) // epr7576.ic117
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -4205,7 +4205,7 @@ ROM_START( wboyu )
ROM_LOAD( "ic110_86.bin", 0x8000, 0x4000, CRC(26d0fac4) SHA1(2e6a06f6850b2d19e3dd7dcdc6b700d0eda878cb) )
ROM_LOAD( "ic005_88.bin", 0xc000, 0x4000, CRC(2602e519) SHA1(00e94ec7ae37b5063137d4d49af7806fb0357c4b) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -4259,7 +4259,7 @@ ROM_START( wbdeluxe )
ROM_LOAD( "epr-7486.110", 0x8000, 0x4000, CRC(8d622c50) SHA1(9a76a50204c618347d3e8eee6cda841becd906eb) ) /* epr-7486.4 */
ROM_LOAD( "epr-7488.05", 0xc000, 0x4000, CRC(007c2f1b) SHA1(c2f1376144a49d20cb35384648e06d06978474c1) ) /* epr-7488.2 */
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
/* pr-5317.106 */
ROM_END
@@ -4344,7 +4344,7 @@ ROM_START( blockgal )
ROM_LOAD( "bg.110", 0x8000, 0x4000, CRC(064c812c) SHA1(673790dc5131fd280333386a0e9915fb94e9f3e1) )
ROM_LOAD( "bg.05", 0xc000, 0x4000, CRC(02e0b040) SHA1(fb626fc31dfe25bf9fac0c8d76d5041609b06e82) )
- ROM_REGION( 0x0100, REGION_USER2, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER2, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -4370,7 +4370,7 @@ ROM_START( blckgalb )
ROM_LOAD( "bg.110", 0x8000, 0x4000, CRC(064c812c) SHA1(673790dc5131fd280333386a0e9915fb94e9f3e1) )
ROM_LOAD( "bg.05", 0xc000, 0x4000, CRC(02e0b040) SHA1(fb626fc31dfe25bf9fac0c8d76d5041609b06e82) )
- ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but no color so don't use REGION_PROMS! */
+ ROM_REGION( 0x0100, REGION_USER1, 0 ) /* misc PROMs, but not color so don't use REGION_PROMS! */
ROM_LOAD( "pr5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */
ROM_END
@@ -4821,51 +4821,51 @@ static DRIVER_INIT( bootlegb )
}
-GAME( 1983, starjack, 0, small, starjack, 0, ROT270, "Sega", "Star Jacker (Sega)", GAME_SUPPORTS_SAVE )
-GAME( 1983, starjacs, starjack, small, starjacs, 0, ROT270, "Stern", "Star Jacker (Stern)", GAME_SUPPORTS_SAVE )
-GAME( 1983, regulus, 0, small, regulus, regulus, ROT270, "Sega", "Regulus (315-5033, New Ver.)", GAME_SUPPORTS_SAVE )
-GAME( 1983, reguluso, regulus, small, reguluso, regulus, ROT270, "Sega", "Regulus (315-5033, Old Ver.)", GAME_SUPPORTS_SAVE )
-GAME( 1983, regulusu, regulus, small, regulus, 0, ROT270, "Sega", "Regulus (not encrypted)", GAME_SUPPORTS_SAVE )
-GAME( 1983, upndown, 0, system1, upndown, nprinces, ROT270, "Sega", "Up'n Down (315-5030)", GAME_SUPPORTS_SAVE )
-GAME( 1983, upndownu, upndown, system1, upndown, 0, ROT270, "Sega", "Up'n Down (not encrypted)", GAME_SUPPORTS_SAVE )
-GAME( 1984, mrviking, 0, small, mrviking, mrviking, ROT270, "Sega", "Mister Viking (315-5041)", GAME_SUPPORTS_SAVE )
-GAME( 1984, mrvikngj, mrviking, small, mrvikngj, mrviking, ROT270, "Sega", "Mister Viking (315-5041, Japan)", GAME_SUPPORTS_SAVE )
-GAME( 1984, swat, 0, system1, swat, swat, ROT270, "Coreland / Sega", "SWAT (315-5048)", GAME_SUPPORTS_SAVE )
-GAME( 1984, flicky, 0, system1, flicky, flicky, ROT0, "Sega", "Flicky (128k Version, System 2, 315-5051)", GAME_SUPPORTS_SAVE )
-GAME( 1984, flicks2, flicky, system1, flicky, 0, ROT0, "Sega", "Flicky (128k Version, System 2, not encrypted)", GAME_SUPPORTS_SAVE )
-GAME( 1984, flickyo, flicky, system1, flicky, flicky, ROT0, "Sega", "Flicky (64k Version, System 1, 315-5051, set 1)", GAME_SUPPORTS_SAVE )
-GAME( 1984, flicks1, flicky, system1, flicky, flicky, ROT0, "Sega", "Flicky (64k Version, System 1, 315-5051, set 2)", GAME_SUPPORTS_SAVE )
-GAME( 1984, wmatch, 0, small, wmatch, wmatch, ROT270, "Sega", "Water Match (315-5064)", GAME_SUPPORTS_SAVE )
-GAME( 1984, bullfgt, 0, system1, bullfgt, bullfgtj, ROT0, "Coreland / Sega", "Bullfight (315-5065)", GAME_SUPPORTS_SAVE )
-GAME( 1984, thetogyu, bullfgt, system1, bullfgt, bullfgtj, ROT0, "Coreland / Sega", "The Togyu (315-5065, Japan)", GAME_SUPPORTS_SAVE )
-GAME( 1984, spatter, 0, small, spatter, spatter, ROT0, "Sega", "Spatter", GAME_SUPPORTS_SAVE )
-GAME( 1984, ssanchan, spatter, small, spatter, spatter, ROT0, "Sega", "Sanrin San Chan (Japan)", GAME_SUPPORTS_SAVE )
-GAME( 1985, pitfall2, 0, pitfall2, pitfall2, pitfall2, ROT0, "Sega", "Pitfall II (315-5093)", GAME_SUPPORTS_SAVE )
-GAME( 1985, pitfallu, pitfall2, pitfall2, pitfallu, 0, ROT0, "Sega", "Pitfall II (not encrypted)", GAME_SUPPORTS_SAVE )
-GAME( 1985, seganinj, 0, system1, seganinj, seganinj, ROT0, "Sega", "Sega Ninja (315-5102)", GAME_SUPPORTS_SAVE )
-GAME( 1985, seganinu, seganinj, system1, seganinj, 0, ROT0, "Sega", "Sega Ninja (not encrypted)", GAME_SUPPORTS_SAVE )
-GAME( 1985, ninja, seganinj, system1, seganinj, seganinj, ROT0, "Sega", "Ninja (315-5102)", GAME_SUPPORTS_SAVE )
-GAME( 1985, nprinces, seganinj, system1, seganinj, flicky, ROT0, "bootleg?", "Ninja Princess (315-5051, 64k Ver. bootleg?)", GAME_SUPPORTS_SAVE )
-GAME( 1985, nprincso, seganinj, system1, seganinj, nprinces, ROT0, "Sega", "Ninja Princess (315-5098, 128k Ver.)", GAME_SUPPORTS_SAVE )
-GAME( 1985, nprincsu, seganinj, system1, seganinj, 0, ROT0, "Sega", "Ninja Princess (64k Ver. not encrypted)", GAME_SUPPORTS_SAVE )
-GAME( 1985, nprincsb, seganinj, system1, seganinj, flicky, ROT0, "bootleg?", "Ninja Princess (315-5051?, 128k Ver. bootleg?)", GAME_SUPPORTS_SAVE )
-GAME( 1985, imsorry, 0, system1, imsorry, imsorry, ROT0, "Coreland / Sega", "I'm Sorry (315-5110, US)", GAME_SUPPORTS_SAVE )
-GAME( 1985, imsorryj, imsorry, system1, imsorry, imsorry, ROT0, "Coreland / Sega", "Gonbee no I'm Sorry (315-5110, Japan)", GAME_SUPPORTS_SAVE )
-GAME( 1985, teddybb, 0, system1, teddybb, teddybb, ROT0, "Sega", "TeddyBoy Blues (315-5115, New Ver.)", GAME_SUPPORTS_SAVE )
-GAME( 1985, teddybbo, teddybb, system1, teddybb, teddybb, ROT0, "Sega", "TeddyBoy Blues (315-5115, Old Ver.)", GAME_SUPPORTS_SAVE )
-GAME( 1985, myhero, 0, system1, myhero, 0, ROT0, "Sega", "My Hero (US, not encrypted)", GAME_SUPPORTS_SAVE )
-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 (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, 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 )
-GAME( 1986, raflesia, 0, system1, raflesia, 4dwarrio, ROT270, "Coreland / Sega", "Rafflesia (315-5162)", GAME_SUPPORTS_SAVE )
+GAME( 1983, starjack, 0, small, starjack, 0, ROT270, "Sega", "Star Jacker (Sega)", GAME_SUPPORTS_SAVE )
+GAME( 1983, starjacs, starjack, small, starjacs, 0, ROT270, "Stern", "Star Jacker (Stern)", GAME_SUPPORTS_SAVE )
+GAME( 1983, regulus, 0, small, regulus, regulus, ROT270, "Sega", "Regulus (315-5033, Rev A.)", GAME_SUPPORTS_SAVE )
+GAME( 1983, reguluso, regulus, small, reguluso, regulus, ROT270, "Sega", "Regulus (315-5033)", GAME_SUPPORTS_SAVE )
+GAME( 1983, regulusu, regulus, small, regulus, 0, ROT270, "Sega", "Regulus (not encrypted)", GAME_SUPPORTS_SAVE )
+GAME( 1983, upndown, 0, system1, upndown, nprinces, ROT270, "Sega", "Up'n Down (315-5030)", GAME_SUPPORTS_SAVE )
+GAME( 1983, upndownu, upndown, system1, upndown, 0, ROT270, "Sega", "Up'n Down (not encrypted)", GAME_SUPPORTS_SAVE )
+GAME( 1984, mrviking, 0, small, mrviking, mrviking, ROT270, "Sega", "Mister Viking (315-5041)", GAME_SUPPORTS_SAVE )
+GAME( 1984, mrvikngj, mrviking, small, mrvikngj, mrviking, ROT270, "Sega", "Mister Viking (315-5041, Japan)", GAME_SUPPORTS_SAVE )
+GAME( 1984, swat, 0, system1, swat, swat, ROT270, "Coreland / Sega", "SWAT (315-5048)", GAME_SUPPORTS_SAVE )
+GAME( 1984, flicky, 0, system1, flicky, flicky, ROT0, "Sega", "Flicky (128k Version, System 2, 315-5051)", GAME_SUPPORTS_SAVE )
+GAME( 1984, flicks2, flicky, system1, flicky, 0, ROT0, "Sega", "Flicky (128k Version, System 2, not encrypted)", GAME_SUPPORTS_SAVE )
+GAME( 1984, flickyo, flicky, system1, flicky, flicky, ROT0, "Sega", "Flicky (64k Version, System 1, 315-5051, set 1)", GAME_SUPPORTS_SAVE )
+GAME( 1984, flicks1, flicky, system1, flicky, flicky, ROT0, "Sega", "Flicky (64k Version, System 1, 315-5051, set 2)", GAME_SUPPORTS_SAVE )
+GAME( 1984, wmatch, 0, small, wmatch, wmatch, ROT270, "Sega", "Water Match (315-5064)", GAME_SUPPORTS_SAVE )
+GAME( 1984, bullfgt, 0, system1, bullfgt, bullfgtj, ROT0, "Coreland / Sega", "Bullfight (315-5065)", GAME_SUPPORTS_SAVE )
+GAME( 1984, thetogyu, bullfgt, system1, bullfgt, bullfgtj, ROT0, "Coreland / Sega", "The Togyu (315-5065, Japan)", GAME_SUPPORTS_SAVE )
+GAME( 1984, spatter, 0, small, spatter, spatter, ROT0, "Sega", "Spatter", GAME_SUPPORTS_SAVE )
+GAME( 1984, ssanchan, spatter, small, spatter, spatter, ROT0, "Sega", "Sanrin San Chan (Japan)", GAME_SUPPORTS_SAVE )
+GAME( 1985, pitfall2, 0, pitfall2, pitfall2, pitfall2, ROT0, "Sega", "Pitfall II (315-5093)", GAME_SUPPORTS_SAVE )
+GAME( 1985, pitfallu, pitfall2, pitfall2, pitfallu, 0, ROT0, "Sega", "Pitfall II (not encrypted)", GAME_SUPPORTS_SAVE )
+GAME( 1985, seganinj, 0, system1, seganinj, seganinj, ROT0, "Sega", "Sega Ninja (315-5102)", GAME_SUPPORTS_SAVE )
+GAME( 1985, seganinu, seganinj, system1, seganinj, 0, ROT0, "Sega", "Sega Ninja (not encrypted)", GAME_SUPPORTS_SAVE )
+GAME( 1985, ninja, seganinj, system1, seganinj, seganinj, ROT0, "Sega", "Ninja (315-5102)", GAME_SUPPORTS_SAVE )
+GAME( 1985, nprinces, seganinj, system1, seganinj, flicky, ROT0, "bootleg?", "Ninja Princess (315-5051, 64k Ver. bootleg?)", GAME_SUPPORTS_SAVE )
+GAME( 1985, nprincso, seganinj, system1, seganinj, nprinces, ROT0, "Sega", "Ninja Princess (315-5098, 128k Ver.)", GAME_SUPPORTS_SAVE )
+GAME( 1985, nprincsu, seganinj, system1, seganinj, 0, ROT0, "Sega", "Ninja Princess (64k Ver. not encrypted)", GAME_SUPPORTS_SAVE )
+GAME( 1985, nprincsb, seganinj, system1, seganinj, flicky, ROT0, "bootleg?", "Ninja Princess (315-5051?, 128k Ver. bootleg?)", GAME_SUPPORTS_SAVE )
+GAME( 1985, imsorry, 0, system1, imsorry, imsorry, ROT0, "Coreland / Sega", "I'm Sorry (315-5110, US)", GAME_SUPPORTS_SAVE )
+GAME( 1985, imsorryj, imsorry, system1, imsorry, imsorry, ROT0, "Coreland / Sega", "Gonbee no I'm Sorry (315-5110, Japan)", GAME_SUPPORTS_SAVE )
+GAME( 1985, teddybb, 0, system1, teddybb, teddybb, ROT0, "Sega", "TeddyBoy Blues (315-5115, New Ver.)", GAME_SUPPORTS_SAVE )
+GAME( 1985, teddybbo, teddybb, system1, teddybb, teddybb, ROT0, "Sega", "TeddyBoy Blues (315-5115, Old Ver.)", GAME_SUPPORTS_SAVE )
+GAME( 1985, myhero, 0, system1, myhero, 0, ROT0, "Sega", "My Hero (US, not encrypted)", GAME_SUPPORTS_SAVE )
+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 (Rev A, 8751 315-5159a)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE | GAME_NOT_WORKING )
+GAME( 1985, shtngms1, shtngmst, shtngmst, shtngmst, 0, ROT0, "Sega", "Shooting Master (8751 315-5159)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE | GAME_NOT_WORKING )
+GAME( 1985, shtngmsa, shtngmst, shtngmst, shtngmst, 0, ROT0, "Sega [EVG]", "Shooting Master (EVG, 8751 315-5159)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE | GAME_NOT_WORKING )
+GAME( 1985, chplft, 0, chplft, chplft, 0, ROT0, "Sega", "Choplifter (8751 315-5151)", GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE | GAME_NOT_WORKING )
+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 )
+GAME( 1986, raflesia, 0, system1, raflesia, 4dwarrio, ROT270, "Coreland / Sega", "Rafflesia (315-5162)", GAME_SUPPORTS_SAVE )
GAME( 1986, wboy, 0, system1, wboy, wboy, ROT0, "Sega (Escape license)", "Wonder Boy (set 1, 315-5177)", GAME_SUPPORTS_SAVE )
GAME( 1986, wboyo, wboy, system1, wboy, hvymetal, ROT0, "Sega (Escape license)", "Wonder Boy (set 1, 315-5135)", GAME_SUPPORTS_SAVE )
GAME( 1986, wboy2, wboy, system1, wboy, wboy2, ROT0, "Sega (Escape license)", "Wonder Boy (set 2, 315-5178)", GAME_SUPPORTS_SAVE )
@@ -4875,17 +4875,17 @@ GAME( 1986, wboy4, wboy, system1, wboy, 4dwarrio, ROT0, "Sega (Esc
GAME( 1986, wboyu, wboy, system1, wboyu, 0, ROT0, "Sega (Escape license)", "Wonder Boy (not encrypted)", GAME_SUPPORTS_SAVE )
GAME( 1986, wboysys2, wboy, wbml, wboysys2, wboy, ROT0, "Sega (Escape license)", "Wonder Boy (system 2)", GAME_SUPPORTS_SAVE )
GAME( 1986, wbdeluxe, wboy, system1, wbdeluxe, 0, ROT0, "Sega (Escape license)", "Wonder Boy Deluxe", GAME_SUPPORTS_SAVE )
-GAME( 1986, gardia, 0, brain, gardia, gardia, ROT270, "Sega / Coreland", "Gardia (317-0006)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE)
-GAME( 1986, gardiab, gardia, brain, gardia, gardiab, ROT270, "bootleg", "Gardia (317-0007?, bootleg)", GAME_NOT_WORKING | GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
-GAME( 1986, noboranb, 0, noboranb, noboranb, noboranb, ROT270, "bootleg", "Noboranka (Japan)", GAME_SUPPORTS_SAVE )
-GAME( 1987, blockgal, 0, system1, blockgal, blockgal, ROT90, "Sega / Vic Tokai", "Block Gal (MC-8123B, 317-0029)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE)
-GAME( 1987, blckgalb, blockgal, blckgalb, blockgal, bootleg, ROT90, "bootleg", "Block Gal (bootleg)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
-GAME( 1987, tokisens, 0, wbml, tokisens, 0, ROT90, "Sega", "Toki no Senshi - Chrono Soldier", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
-GAME( 1987, wbml, 0, wbml, wbml, wbml, ROT0, "Sega / Westone", "Wonder Boy in Monster Land (Japan New Ver., MC-8123, 317-0043)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
-GAME( 1987, wbmljo, wbml, wbml, wbml, wbml, ROT0, "Sega / Westone", "Wonder Boy in Monster Land (Japan Old Ver., MC-8123, 317-0043)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
-GAME( 1987, wbmljb, wbml, wbml, wbml, bootlegb, ROT0, "bootleg", "Wonder Boy in Monster Land (Japan not encrypted)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
-GAME( 1987, wbmlb, wbml, wbml, wbml, bootlegb, ROT0, "bootleg", "Wonder Boy in Monster Land (English bootleg)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE)
-GAME( 1987, wbmlbg, wbml, wbml, wbml, bootlegb, ROT0, "bootleg", "Wonder Boy in Monster Land (Galaxy Electronics English bootleg)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE)
-GAME( 1987, dakkochn, 0, wbml, wbml, dakkochn, ROT0, "Whiteboard", "DakkoChan House (MC-8123, 317-0014)", GAME_NOT_WORKING | GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
-GAME( 1988, ufosensi, 0, ufosensi, ufosensi, ufosensi, ROT0, "Sega", "Ufo Senshi Yohko Chan (MC-8123, 317-0064)", GAME_SUPPORTS_SAVE )
-GAME( 1988, ufosensb, ufosensi, ufosensi, ufosensi, bootlegb, ROT0, "bootleg", "Ufo Senshi Yohko Chan (not encrypted)", GAME_SUPPORTS_SAVE )
+GAME( 1986, gardia, 0, brain, gardia, gardia, ROT270, "Sega / Coreland", "Gardia (317-0006)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE)
+GAME( 1986, gardiab, gardia, brain, gardia, gardiab, ROT270, "bootleg", "Gardia (317-0007?, bootleg)", GAME_NOT_WORKING | GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
+GAME( 1986, noboranb, 0, noboranb, noboranb, noboranb, ROT270, "bootleg", "Noboranka (Japan)", GAME_SUPPORTS_SAVE )
+GAME( 1987, blockgal, 0, system1, blockgal, blockgal, ROT90, "Sega / Vic Tokai", "Block Gal (MC-8123B, 317-0029)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE)
+GAME( 1987, blckgalb, blockgal, blckgalb, blockgal, bootleg, ROT90, "bootleg", "Block Gal (bootleg)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
+GAME( 1987, tokisens, 0, wbml, tokisens, 0, ROT90, "Sega", "Toki no Senshi - Chrono Soldier", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
+GAME( 1987, wbml, 0, wbml, wbml, wbml, ROT0, "Sega / Westone", "Wonder Boy in Monster Land (Japan New Ver., MC-8123, 317-0043)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
+GAME( 1987, wbmljo, wbml, wbml, wbml, wbml, ROT0, "Sega / Westone", "Wonder Boy in Monster Land (Japan Old Ver., MC-8123, 317-0043)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
+GAME( 1987, wbmljb, wbml, wbml, wbml, bootlegb, ROT0, "bootleg", "Wonder Boy in Monster Land (Japan not encrypted)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
+GAME( 1987, wbmlb, wbml, wbml, wbml, bootlegb, ROT0, "bootleg", "Wonder Boy in Monster Land (English bootleg)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE)
+GAME( 1987, wbmlbg, wbml, wbml, wbml, bootlegb, ROT0, "bootleg", "Wonder Boy in Monster Land (Galaxy Electronics English bootleg)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE)
+GAME( 1987, dakkochn, 0, wbml, wbml, dakkochn, ROT0, "Whiteboard", "DakkoChan House (MC-8123, 317-0014)", GAME_NOT_WORKING | GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
+GAME( 1988, ufosensi, 0, ufosensi, ufosensi, ufosensi, ROT0, "Sega", "Ufo Senshi Yohko Chan (MC-8123, 317-0064)", GAME_SUPPORTS_SAVE )
+GAME( 1988, ufosensb, ufosensi, ufosensi, ufosensi, bootlegb, ROT0, "bootleg", "Ufo Senshi Yohko Chan (not encrypted)", GAME_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/taito_b.c b/src/mame/drivers/taito_b.c
index 7652abcb83a..7680f84e63b 100644
--- a/src/mame/drivers/taito_b.c
+++ b/src/mame/drivers/taito_b.c
@@ -382,7 +382,7 @@ static WRITE16_HANDLER( gain_control_w )
***************************************************************************/
-static struct EEPROM_interface eeprom_interface =
+static const struct EEPROM_interface eeprom_interface =
{
6, /* address bits */
16, /* data bits */
diff --git a/src/mame/drivers/taito_z.c b/src/mame/drivers/taito_z.c
index 5ae8e9c56e9..31c65b164cd 100644
--- a/src/mame/drivers/taito_z.c
+++ b/src/mame/drivers/taito_z.c
@@ -943,7 +943,7 @@ static INTERRUPT_GEN( dblaxle_cpub_interrupt )
EEPROM
******************************************************************/
-static UINT8 default_eeprom[128]=
+static const UINT8 default_eeprom[128]=
{
0x00,0x00,0x00,0xff,0x00,0x01,0x41,0x41,0x00,0x00,0x00,0xff,0x00,0x00,0xf0,0xf0,
0x00,0x00,0x00,0xff,0x00,0x01,0x41,0x41,0x00,0x00,0x00,0xff,0x00,0x00,0xf0,0xf0,
@@ -955,7 +955,7 @@ static UINT8 default_eeprom[128]=
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
};
-static struct EEPROM_interface eeprom_interface =
+static const struct EEPROM_interface eeprom_interface =
{
6, /* address bits */
16, /* data bits */
diff --git a/src/mame/drivers/tankbatt.c b/src/mame/drivers/tankbatt.c
index 96b4d36b4dd..d6250f821bb 100644
--- a/src/mame/drivers/tankbatt.c
+++ b/src/mame/drivers/tankbatt.c
@@ -257,7 +257,7 @@ GFXDECODE_END
-static const char *tankbatt_sample_names[] =
+static const char *const tankbatt_sample_names[] =
{
"*tankbatt",
"fire.wav",
@@ -267,7 +267,7 @@ static const char *tankbatt_sample_names[] =
0 /* end of array */
};
-static struct Samplesinterface samples_interface =
+static const struct Samplesinterface samples_interface =
{
3, /* 3 channels */
tankbatt_sample_names
diff --git a/src/mame/drivers/taxidrvr.c b/src/mame/drivers/taxidrvr.c
index bcd37503431..2a59ca70b1a 100644
--- a/src/mame/drivers/taxidrvr.c
+++ b/src/mame/drivers/taxidrvr.c
@@ -93,7 +93,7 @@ static WRITE8_HANDLER( p8910_0b_w )
}
-static ppi8255_interface ppi8255_intf =
+static const ppi8255_interface ppi8255_intf =
{
5, /* 5 chips */
{ p0a_r, NULL, NULL, NULL, NULL }, /* Port A read */
diff --git a/src/mame/drivers/tcl.c b/src/mame/drivers/tcl.c
index 5d4abc49f8b..181a1b3aae9 100644
--- a/src/mame/drivers/tcl.c
+++ b/src/mame/drivers/tcl.c
@@ -86,7 +86,7 @@ static GFXDECODE_START( tcl )
GFXDECODE_ENTRY( REGION_GFX2, 0, charlayout2, 0, 16 ) /* wrong */
GFXDECODE_END
-static ppi8255_interface ppi8255_intf =
+static const ppi8255_interface ppi8255_intf =
{
2,
{ NULL, NULL },
diff --git a/src/mame/drivers/thief.c b/src/mame/drivers/thief.c
index bdbac46a1a7..b445a952455 100644
--- a/src/mame/drivers/thief.c
+++ b/src/mame/drivers/thief.c
@@ -417,7 +417,7 @@ INPUT_PORTS_END
/***********************************************************/
-static const char *sharkatt_sample_names[] =
+static const char *const sharkatt_sample_names[] =
{
"*sharkatt",
"talk.wav",
@@ -425,7 +425,7 @@ static const char *sharkatt_sample_names[] =
0 /* end of array */
};
-static struct Samplesinterface sharkatt_samples_interface =
+static const struct Samplesinterface sharkatt_samples_interface =
{
2, /* number of channels */
sharkatt_sample_names
@@ -433,7 +433,7 @@ static struct Samplesinterface sharkatt_samples_interface =
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-static const char *thief_sample_names[] =
+static const char *const thief_sample_names[] =
{
"*thief",
"talk.wav",
@@ -441,7 +441,7 @@ static const char *thief_sample_names[] =
0 /* end of array */
};
-static struct Samplesinterface thief_samples_interface =
+static const struct Samplesinterface thief_samples_interface =
{
2, /* number of channels */
thief_sample_names
@@ -449,7 +449,7 @@ static struct Samplesinterface thief_samples_interface =
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-static const char *natodef_sample_names[] =
+static const char *const natodef_sample_names[] =
{
"*natodef",
"talk.wav",
@@ -457,7 +457,7 @@ static const char *natodef_sample_names[] =
0 /* end of array */
};
-static struct Samplesinterface natodef_samples_interface =
+static const struct Samplesinterface natodef_samples_interface =
{
2, /* number of channels */
natodef_sample_names
diff --git a/src/mame/drivers/tmnt.c b/src/mame/drivers/tmnt.c
index c8c709da936..3281088175c 100644
--- a/src/mame/drivers/tmnt.c
+++ b/src/mame/drivers/tmnt.c
@@ -455,7 +455,7 @@ static WRITE16_HANDLER( ssriders_protection_w )
static int init_eeprom_count;
-static struct EEPROM_interface eeprom_interface =
+static const struct EEPROM_interface eeprom_interface =
{
7, /* address bits */
8, /* data bits */
@@ -565,7 +565,7 @@ static WRITE16_HANDLER( detatwin_eeprom_w )
WRITE16_HANDLER( ssriders_eeprom_w ); /* in video/tmnt.c */
-static struct EEPROM_interface thndrx2_eeprom_interface =
+static const struct EEPROM_interface thndrx2_eeprom_interface =
{
7, /* address bits */
8, /* data bits */
@@ -2485,7 +2485,7 @@ static struct upd7759_interface upd7759_interface =
REGION_SOUND2 /* memory region */
};
-static struct Samplesinterface samples_interface =
+static const struct Samplesinterface samples_interface =
{
1, /* 1 channel for the title music */
NULL,
diff --git a/src/mame/drivers/tnzs.c b/src/mame/drivers/tnzs.c
index f74a923233a..abee876897a 100644
--- a/src/mame/drivers/tnzs.c
+++ b/src/mame/drivers/tnzs.c
@@ -1279,7 +1279,7 @@ static struct YM2203interface kabukiz_ym2203_interface =
irqhandler
};
-static struct Samplesinterface samples_interface =
+static const struct Samplesinterface samples_interface =
{
1,
NULL,
diff --git a/src/mame/drivers/toaplan2.c b/src/mame/drivers/toaplan2.c
index 601d6929440..552cda01b79 100644
--- a/src/mame/drivers/toaplan2.c
+++ b/src/mame/drivers/toaplan2.c
@@ -1212,7 +1212,7 @@ static WRITE8_HANDLER( raizing_clear_nmi_w )
/*###################### Battle Bakraid ##############################*/
/* EEPROM contents with Battle Bakraid Unlimited version features unlocked */
-static UINT8 bbakraid_unlimited_nvram[512] = {
+static const UINT8 bbakraid_unlimited_nvram[512] = {
0xc2,0x49,0x00,0x07,0xa1,0x20,0x2a,0x2a,0x2a,0x90,0x90,0x90,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x06,0x1a,0x80,0x2a,0x2a,0x2a,0x94,
0x94,0x94,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x04,
@@ -1249,7 +1249,7 @@ static UINT8 bbakraid_unlimited_nvram[512] = {
-static struct EEPROM_interface eeprom_interface_93C66 =
+static const struct EEPROM_interface eeprom_interface_93C66 =
{
/* Pin 6 of the 93C66 is connected to Gnd!
So it's configured for 512 bytes */
diff --git a/src/mame/drivers/toratora.c b/src/mame/drivers/toratora.c
index 8b5438513d6..88881ada762 100644
--- a/src/mame/drivers/toratora.c
+++ b/src/mame/drivers/toratora.c
@@ -167,7 +167,7 @@ static WRITE8_HANDLER( clear_timer_w )
*
*************************************/
-static struct SN76477interface sn76477_interface =
+static const struct SN76477interface sn76477_interface =
{
RES_K(47), /* 4 noise_res */
// RES_K(120), /* 5 filter_res */
diff --git a/src/mame/drivers/turbo.c b/src/mame/drivers/turbo.c
index 89229c8aa12..5e5eb523729 100644
--- a/src/mame/drivers/turbo.c
+++ b/src/mame/drivers/turbo.c
@@ -1526,7 +1526,7 @@ static void turbo_rom_decode(void)
static DRIVER_INIT( turbo )
{
- static ppi8255_interface turbo_8255_intf =
+ static const ppi8255_interface turbo_8255_intf =
{
4,
{ NULL, NULL, NULL, turbo_analog_r },
@@ -1548,7 +1548,7 @@ static DRIVER_INIT( turbo_enc )
static DRIVER_INIT( subroc3d )
{
- static ppi8255_interface subroc3d_8255_intf =
+ static const ppi8255_interface subroc3d_8255_intf =
{
2,
{ NULL, NULL },
@@ -1564,7 +1564,7 @@ static DRIVER_INIT( subroc3d )
static DRIVER_INIT( buckrog )
{
- static ppi8255_interface buckrog_8255_intf =
+ static const ppi8255_interface buckrog_8255_intf =
{
2,
{ NULL, NULL },
diff --git a/src/mame/drivers/tx1.c b/src/mame/drivers/tx1.c
index 3e18005ad13..8b02ce58c7b 100644
--- a/src/mame/drivers/tx1.c
+++ b/src/mame/drivers/tx1.c
@@ -808,7 +808,7 @@ static WRITE8_HANDLER(TX1_COIN_COUNTER)
coin_counter_w(0,data & 0x80);
coin_counter_w(1,data & 0x40);
}
-static ppi8255_interface tx1_ppi8255_intf =
+static const ppi8255_interface tx1_ppi8255_intf =
{
1,
{ input_port_2_r }, /* Accelerator and brake */
@@ -821,7 +821,7 @@ static ppi8255_interface tx1_ppi8255_intf =
/* Buggy Boy (3-monitor) uses a 8255 instead of the YM2149 ports for inputs */
-static ppi8255_interface buggyboy_ppi8255_intf =
+static const ppi8255_interface buggyboy_ppi8255_intf =
{
1,
{ input_port_2_r },
diff --git a/src/mame/drivers/undrfire.c b/src/mame/drivers/undrfire.c
index a33313dd826..e246d0b7c89 100644
--- a/src/mame/drivers/undrfire.c
+++ b/src/mame/drivers/undrfire.c
@@ -174,7 +174,7 @@ static TIMER_CALLBACK( undrfire_interrupt5 )
EPROM
**********************************************************/
-static UINT8 default_eeprom[128]=
+static const UINT8 default_eeprom[128]=
{
0x02,0x01,0x11,0x12,0x01,0x01,0x01,0x00,0x80,0x80,0x30,0x01,0x00,0x00,0x62,0x45,
0xe0,0xa0,0xff,0x28,0xff,0xff,0xfa,0xd7,0x33,0x28,0x00,0x00,0x33,0x28,0x00,0x00,
@@ -186,7 +186,7 @@ static UINT8 default_eeprom[128]=
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
};
-static struct EEPROM_interface undrfire_eeprom_interface =
+static const struct EEPROM_interface undrfire_eeprom_interface =
{
6, /* address bits */
16, /* data bits */
diff --git a/src/mame/drivers/unico.c b/src/mame/drivers/unico.c
index a3ac671d546..598f3b95d21 100644
--- a/src/mame/drivers/unico.c
+++ b/src/mame/drivers/unico.c
@@ -642,7 +642,7 @@ static MACHINE_RESET( unico )
}
-static struct EEPROM_interface zeropnt2_eeprom_interface =
+static const struct EEPROM_interface zeropnt2_eeprom_interface =
{
7, // address bits 7
8, // data bits 8
diff --git a/src/mame/drivers/vamphalf.c b/src/mame/drivers/vamphalf.c
index c9c3d6ea45c..094a523f634 100644
--- a/src/mame/drivers/vamphalf.c
+++ b/src/mame/drivers/vamphalf.c
@@ -513,7 +513,7 @@ static GFXDECODE_START( vamphalf )
GFXDECODE_END
-static UINT8 suplup_default_nvram[128] = {
+static const UINT8 suplup_default_nvram[128] = {
0xE8, 0xFE, 0xFF, 0xFF, 0x10, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x96, 0x2D, 0xB4, 0x80, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
@@ -524,7 +524,7 @@ static UINT8 suplup_default_nvram[128] = {
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xAA
};
-static UINT8 misncrft_default_nvram[128] = {
+static const UINT8 misncrft_default_nvram[128] = {
0x67, 0xBE, 0x00, 0x01, 0x80, 0xFE, 0x04, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
diff --git a/src/mame/drivers/vegaeo.c b/src/mame/drivers/vegaeo.c
index 14c365de63a..642e4362977 100644
--- a/src/mame/drivers/vegaeo.c
+++ b/src/mame/drivers/vegaeo.c
@@ -265,6 +265,8 @@ ROM_END
static DRIVER_INIT( vegaeo )
{
init_eolith_speedup(machine);
+
+ at28c16_init( 0, NULL, NULL );
}
GAME( 2002, crazywar, 0, vega, crazywar, vegaeo, ROT0, "Eolith", "Crazy War", GAME_NO_SOUND )
diff --git a/src/mame/drivers/vendetta.c b/src/mame/drivers/vendetta.c
index a67a5f3829c..16988002548 100644
--- a/src/mame/drivers/vendetta.c
+++ b/src/mame/drivers/vendetta.c
@@ -112,7 +112,7 @@ VIDEO_UPDATE( vendetta );
static int init_eeprom_count;
-static struct EEPROM_interface eeprom_interface =
+static const struct EEPROM_interface eeprom_interface =
{
7, /* address bits */
8, /* data bits */
diff --git a/src/mame/drivers/vroulet.c b/src/mame/drivers/vroulet.c
index 84cd05da71b..f4220f8e573 100644
--- a/src/mame/drivers/vroulet.c
+++ b/src/mame/drivers/vroulet.c
@@ -232,7 +232,7 @@ static WRITE8_HANDLER( ppi8255_a_w ){}// watchdog ?
static WRITE8_HANDLER( ppi8255_b_w ){}// lamps ?
static WRITE8_HANDLER( ppi8255_c_w ){}
-static ppi8255_interface ppi8255_intf =
+static const ppi8255_interface ppi8255_intf =
{
2, // 2 chips
{ input_port_0_r, NULL }, // Port A read
diff --git a/src/mame/drivers/wilytowr.c b/src/mame/drivers/wilytowr.c
index ccfd0f71900..1db23e57bd1 100644
--- a/src/mame/drivers/wilytowr.c
+++ b/src/mame/drivers/wilytowr.c
@@ -501,7 +501,7 @@ static GFXDECODE_START( fghtbskt )
GFXDECODE_END
-static struct Samplesinterface fghtbskt_samples_interface =
+static const struct Samplesinterface fghtbskt_samples_interface =
{
1,
NULL,
diff --git a/src/mame/drivers/xexex.c b/src/mame/drivers/xexex.c
index 44ea5706197..c070a90ee5d 100644
--- a/src/mame/drivers/xexex.c
+++ b/src/mame/drivers/xexex.c
@@ -85,7 +85,7 @@ static int suspension_active, resume_trigger;
static emu_timer *dmadelay_timer;
-static struct EEPROM_interface eeprom_interface =
+static const struct EEPROM_interface eeprom_interface =
{
7, /* address bits */
8, /* data bits */
diff --git a/src/mame/drivers/xmen.c b/src/mame/drivers/xmen.c
index e12a80e1440..96e3fbc2db7 100644
--- a/src/mame/drivers/xmen.c
+++ b/src/mame/drivers/xmen.c
@@ -38,7 +38,7 @@ UINT16 xmen_current_frame;
static int init_eeprom_count;
-static struct EEPROM_interface eeprom_interface =
+static const struct EEPROM_interface eeprom_interface =
{
7, /* address bits */
8, /* data bits */
diff --git a/src/mame/drivers/zaccaria.c b/src/mame/drivers/zaccaria.c
index 0b1380d120d..17d621f82a2 100644
--- a/src/mame/drivers/zaccaria.c
+++ b/src/mame/drivers/zaccaria.c
@@ -229,7 +229,7 @@ static const pia6821_interface pia_1_intf =
};
-static ppi8255_interface ppi8255_intf =
+static const ppi8255_interface ppi8255_intf =
{
1, /* 1 chip */
{input_port_3_r}, /* Port A read */
diff --git a/src/mame/drivers/zn.c b/src/mame/drivers/zn.c
index 1a665a67462..f831231e559 100644
--- a/src/mame/drivers/zn.c
+++ b/src/mame/drivers/zn.c
@@ -86,7 +86,9 @@ static const UINT8 mg05[ 8 ] = { 0x80, 0xc2, 0x38, 0xf9, 0xfd, 0x0c, 0x10, 0xe0
static const UINT8 mg06[ 8 ] = { 0xc0, 0xe2, 0xe1, 0xfd, 0x04, 0x78, 0x70, 0xf0 };
static const UINT8 mg08[ 8 ] = { 0xf0, 0xfa, 0xf9, 0xc1, 0x20, 0x1c, 0x7c, 0x80 };
static const UINT8 mg09[ 8 ] = { 0xf0, 0x03, 0xe2, 0x18, 0x78, 0x7c, 0x3c, 0xc0 }; /* brute forced */
+static const UINT8 mg10[ 8 ] = { 0xfc, 0xf2, 0x30, 0xc1, 0xf9, 0x78, 0x60, 0xe0 };
static const UINT8 mg11[ 8 ] = { 0x80, 0xc2, 0x38, 0xf9, 0xfd, 0x1c, 0x10, 0xf0 };
+static const UINT8 mg12[ 8 ] = { 0x02, 0x40, 0x38, 0xf9, 0xfd, 0x1c, 0x10, 0xf0 };
static const UINT8 mg13[ 8 ] = { 0xc0, 0xe2, 0xe1, 0xf9, 0x04, 0x0c, 0x70, 0x80 };
static const UINT8 mg14[ 8 ] = { 0xfc, 0xf2, 0xfa, 0x18, 0x20, 0x40, 0x81, 0x01 };
static const UINT8 tt01[ 8 ] = { 0xe0, 0xf9, 0xfd, 0x7c, 0x70, 0x30, 0xc2, 0x02 };
@@ -156,7 +158,9 @@ static struct
{ "flameguj", mg01, mg06 }, /* OK, geometry issues */
{ "glpracr3", mg01, mg08 },
{ "tondemo", mg01, mg09 }, /* OK */
+ { "1on1gov", mg01, mg10 }, /* OK */
{ "brvblade", mg01, mg11 }, /* OK */
+ { "tblkkuzu", mg01, mg12 }, /* OK */
{ "tecmowcm", mg01, mg13 }, /* OK */
{ "mfjump", mg01, mg14 }, /* OK */
{ "sfchamp", tt01, tt02 }, /* stuck in test mode */
@@ -399,6 +403,8 @@ static void zn_driver_init( void )
}
n_game++;
}
+
+ at28c16_init( 0, memory_region( REGION_USER4 ), NULL );
}
static struct PSXSPUinterface psxspu_interface =
@@ -4015,6 +4021,34 @@ ROM_START( mfjump )
ROM_LOAD( "mfj.216", 0x0400000, 0x400000, CRC(0d518dba) SHA1(100cd4d0a1e678e660336027f067a9a1f5cbad3e) )
ROM_END
+ROM_START( tblkkuzu )
+ TPS_BIOS
+
+ ROM_REGION32_LE( 0x02800000, REGION_USER2, 0 )
+ ROM_LOAD16_BYTE( "tbk.u119", 0x0000001, 0x100000, CRC(621b07e1) SHA1(30773aaa333fdee7ef55db2f8adde010688abce1) )
+ ROM_LOAD16_BYTE( "tbk.u120", 0x0000000, 0x100000, CRC(bb390f7d) SHA1(6bce88448fbb5308952f8c221e786be8aa51ceff) )
+ ROM_LOAD( "tbk.u0216", 0x0400000, 0x400000, CRC(41f8285f) SHA1(3326ab83d96d51ed31fb5c2f30630ff480d45282) )
+ROM_END
+
+ROM_START( 1on1gov )
+ TPS_BIOS
+
+ ROM_REGION32_LE( 0x02800000, REGION_USER2, 0 )
+ ROM_LOAD16_BYTE( "1on1.u119", 0x0000001, 0x100000, CRC(10aecc19) SHA1(ad2fe6011551935907568cc3b4028f481034537c) )
+ ROM_LOAD16_BYTE( "1on1.u120", 0x0000000, 0x100000, CRC(eea158bd) SHA1(2b2a56fcce46557201bbbab7b170ee64549ddafe) )
+ ROM_LOAD( "ooo-0.u0217", 0x0800000, 0x400000, CRC(8b42f365) SHA1(6035a370f477f0f33894f642717fa0b012540d36) )
+ ROM_LOAD( "ooo-1.u0218", 0x0c00000, 0x400000, CRC(65162f46) SHA1(db420a2f0d996b32cd4b6e9352d46a36fa31eaaa) )
+ ROM_LOAD( "ooo-2.u0219", 0x1000000, 0x400000, CRC(14cf3a84) SHA1(60175a1fb2c765e4c3d0e30e77961f84cfa8485c) )
+ ROM_LOAD( "ooo-3.u0220", 0x1400000, 0x400000, CRC(9a45f6ff) SHA1(e0ee90c545c821bf1d6b4709b1e40f93314c51a6) )
+ ROM_LOAD( "ooo-4.u0221", 0x1800000, 0x400000, CRC(ba20a1fd) SHA1(7893f50de730624b8447f39fc7e25e4e334df845) )
+ ROM_LOAD( "ooo-5.u0222", 0x1c00000, 0x400000, CRC(eed1953d) SHA1(8d3e738a07b9c6b6ca55be7b47444b5e3725065c) )
+ ROM_LOAD( "ooo-6.u0223", 0x2000000, 0x400000, CRC(f74f38b6) SHA1(ff7f0ebff85fc982f8d1c13d6649d4c7c5da6c45) )
+ ROM_LOAD( "ooo-7.u0323", 0x2400000, 0x400000, CRC(0e58777c) SHA1(9f8ee3c6d6d8b1482522500e18217577056d8c98) )
+
+ ROM_REGION( 0x800, REGION_USER4, 0 ) /* at28c16 */
+ ROM_LOAD( "at28c16", 0x0000000, 0x000800, BAD_DUMP CRC(ff7b63e3) SHA1(febf073c91041394cabdc1c37cbce344b14cd6bd) )
+ROM_END
+
/* video system */
#define KN_BIOS \
@@ -4600,6 +4634,8 @@ GAME( 1999, tondemo, tps, coh1002m, zn, coh1002m, ROT0, "Tecmo", "Tondemo
GAME( 1999, glpracr3, tps, coh1002m, zn, coh1002m, ROT0, "Tecmo", "Gallop Racer 3 (JAPAN)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
GAME( 1999, flamegun, tps, coh1002m, zn, coh1002m, ROT0, "GAPS Inc.", "Flame Gunner", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
GAME( 1999, flameguj, flamegun, coh1002m, zn, coh1002m, ROT0, "GAPS Inc.", "Flame Gunner (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
+GAME( 2000, tblkkuzu, tps, coh1002m, zn, coh1002m, ROT0, "Tamsoft/D3 Publisher", "The Block Kuzushi (JAPAN)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
+GAME( 2000, 1on1gov, tps, coh1002m, zn, coh1002m, ROT0, "Tecmo", "1 on 1 Government (JAPAN)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )
GAME( 2000, tecmowcm, tps, coh1002m, zn, coh1002m, ROT0, "Tecmo", "Tecmo World Cup Millennium (JAPAN)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
GAME( 2001, mfjump, tps, coh1002m, zn, coh1002m, ROT0, "Tecmo", "Monster Farm Jump (JAPAN)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
diff --git a/src/mame/includes/8080bw.h b/src/mame/includes/8080bw.h
index b451b5a7a5e..b0dad666849 100644
--- a/src/mame/includes/8080bw.h
+++ b/src/mame/includes/8080bw.h
@@ -24,7 +24,7 @@ WRITE8_HANDLER( spcewars_sh_port_w );
WRITE8_HANDLER( lrescue_sh_port_1_w );
WRITE8_HANDLER( lrescue_sh_port_2_w );
-extern struct Samplesinterface lrescue_samples_interface;
+extern const struct Samplesinterface lrescue_samples_interface;
WRITE8_HANDLER( cosmo_sh_port_2_w );
@@ -45,7 +45,7 @@ MACHINE_RESET( schaser );
MACHINE_START( schaser );
WRITE8_HANDLER( schaser_sh_port_1_w );
WRITE8_HANDLER( schaser_sh_port_2_w );
-extern struct SN76477interface schaser_sn76477_interface;
+extern const struct SN76477interface schaser_sn76477_interface;
DISCRETE_SOUND_EXTERN( schaser );
WRITE8_HANDLER( rollingc_sh_port_w );
diff --git a/src/mame/includes/astinvad.h b/src/mame/includes/astinvad.h
index 731df1cf877..9c58c4bc571 100644
--- a/src/mame/includes/astinvad.h
+++ b/src/mame/includes/astinvad.h
@@ -16,7 +16,7 @@ void astinvad_set_screen_red(int data);
/*----------- defined in audio/astinvad.c -----------*/
-extern struct Samplesinterface astinvad_samples_interface;
+extern const struct Samplesinterface astinvad_samples_interface;
WRITE8_HANDLER( astinvad_sound1_w );
WRITE8_HANDLER( astinvad_sound2_w );
diff --git a/src/mame/includes/astrocde.h b/src/mame/includes/astrocde.h
index 5e89a5a7d03..5dbfdbe43c3 100644
--- a/src/mame/includes/astrocde.h
+++ b/src/mame/includes/astrocde.h
@@ -43,7 +43,7 @@ WRITE8_HANDLER( profpac_screenram_ctrl_w );
/*----------- defined in audio/wow.c -----------*/
-extern const char *wow_sample_names[];
+extern const char *const wow_sample_names[];
READ8_HANDLER( wow_speech_r );
UINT32 wow_speech_status_r(void *param);
@@ -51,7 +51,7 @@ UINT32 wow_speech_status_r(void *param);
/*----------- defined in audio/gorf.c -----------*/
-extern const char *gorf_sample_names[];
+extern const char *const gorf_sample_names[];
READ8_HANDLER( gorf_speech_r );
UINT32 gorf_speech_status_r(void *param);
diff --git a/src/mame/includes/blockade.h b/src/mame/includes/blockade.h
index 5eb392a23fb..b56d92e4813 100644
--- a/src/mame/includes/blockade.h
+++ b/src/mame/includes/blockade.h
@@ -9,7 +9,7 @@ VIDEO_UPDATE( blockade );
/*----------- defined in audio/blockade.c -----------*/
-extern struct Samplesinterface blockade_samples_interface;
+extern const struct Samplesinterface blockade_samples_interface;
DISCRETE_SOUND_EXTERN( blockade );
WRITE8_HANDLER( blockade_sound_freq_w );
diff --git a/src/mame/includes/cclimber.h b/src/mame/includes/cclimber.h
index 4be89c9dec9..c4b804e512b 100644
--- a/src/mame/includes/cclimber.h
+++ b/src/mame/includes/cclimber.h
@@ -39,7 +39,7 @@ WRITE8_HANDLER( swimmer_sidepanel_enable_w );
/*----------- defined in audio/cclimber.c -----------*/
extern struct AY8910interface cclimber_ay8910_interface;
-extern struct Samplesinterface cclimber_samples_interface;
+extern const struct Samplesinterface cclimber_samples_interface;
WRITE8_HANDLER( cclimber_sample_trigger_w );
WRITE8_HANDLER( cclimber_sample_rate_w );
WRITE8_HANDLER( cclimber_sample_volume_w );
diff --git a/src/mame/includes/circus.h b/src/mame/includes/circus.h
index d2705e3d4e0..e80bfb7da68 100644
--- a/src/mame/includes/circus.h
+++ b/src/mame/includes/circus.h
@@ -13,10 +13,10 @@ extern WRITE8_HANDLER( circus_clown_z_w );
DISCRETE_SOUND_EXTERN( circus );
DISCRETE_SOUND_EXTERN( robotbwl );
DISCRETE_SOUND_EXTERN( crash );
-extern struct Samplesinterface circus_samples_interface;
-extern struct Samplesinterface crash_samples_interface;
-extern struct Samplesinterface ripcord_samples_interface;
-extern struct Samplesinterface robotbwl_samples_interface;
+extern const struct Samplesinterface circus_samples_interface;
+extern const struct Samplesinterface crash_samples_interface;
+extern const struct Samplesinterface ripcord_samples_interface;
+extern const struct Samplesinterface robotbwl_samples_interface;
/*----------- defined in video/circus.c -----------*/
diff --git a/src/mame/includes/dkong.h b/src/mame/includes/dkong.h
index 92bc6cc41c5..be37f565cf5 100644
--- a/src/mame/includes/dkong.h
+++ b/src/mame/includes/dkong.h
@@ -43,6 +43,61 @@
#define I8035_DIVIDER (15)
#define I8035_CLOCK (I8035_MASTER_CLOCK/I8035_DIVIDER)
+#define HARDWARE_TYPE_TAG "HARDWARE_TYPE"
+#define HARDWARE_TKG04 0
+#define HARDWARE_TRS01 1
+#define HARDWARE_TRS02 2
+#define HARDWARE_TKG02 3
+
+#define DK2B_PALETTE_LENGTH (256+256+8+1) // (256)
+#define DK4B_PALETTE_LENGTH (256+256+8+1) // (256)
+#define DK3_PALETTE_LENGTH (256+256+8+1) // (256)
+#define RS_PALETTE_LENGTH (256+256+8+1)
+
+typedef struct _dkong_state dkong_state;
+struct _dkong_state
+{
+ /* memory pointers */
+
+ /* machine states */
+ UINT8 hardware_type;
+
+ /* sound state */
+
+ /* video state */
+ tilemap *bg_tilemap;
+
+ mame_bitmap * bg_bits;
+ const UINT8 * color_codes;
+ emu_timer * scanline_timer;
+ INT8 vidhw; /* Selected video hardware RS Conversion / TKG04 */
+
+ /* radar scope */
+ UINT8 sig30Hz;
+ UINT8 grid_sig;
+ UINT8 rflip_sig;
+ UINT8 star_ff;
+ UINT8 blue_level;
+ double cd4049_a;
+ double cd4049_b;
+
+ /* Specific states */
+ INT8 decrypt_counter;
+ int hunchloopback;
+
+ /* Save state relevant */
+ UINT8 gfx_bank, palette_bank;
+ UINT8 grid_on;
+ UINT8 snd02_enable;
+ UINT8 sig_ansn;
+ UINT16 grid_col;
+ UINT8 sprite_bank;
+ UINT8 dma_latch;
+
+ /* reverse address lookup map - hunchbkd */
+ INT16 rev_map[0x200];
+
+};
/*----------- defined in video/dkong.c -----------*/
@@ -59,15 +114,13 @@ WRITE8_HANDLER( dkong_palettebank_w );
WRITE8_HANDLER( dkong_videoram_w );
-PALETTE_INIT( dkong );
+PALETTE_INIT( dkong2b );
+PALETTE_INIT( dkong4b );
PALETTE_INIT( radarscp );
PALETTE_INIT( radarsc1 );
PALETTE_INIT( dkong3 );
VIDEO_START( dkong );
-VIDEO_START( radarsc1 );
-VIDEO_START( radarscp );
-VIDEO_UPDATE( radarscp );
VIDEO_UPDATE( dkong );
VIDEO_UPDATE( pestplce );
VIDEO_UPDATE( spclforc );
@@ -86,39 +139,21 @@ DRIVER_INIT( drakton );
/*----------- defined in audio/dkong.c -----------*/
-READ8_HANDLER( dkong_sh_p1_r );
-READ8_HANDLER( dkong_sh_p2_r );
-READ8_HANDLER( dkong_sh_t0_r );
-READ8_HANDLER( dkong_sh_t1_r );
-READ8_HANDLER( dkong_sh_tune_r );
-READ8_HANDLER( dkong_in2_r );
-
-WRITE8_HANDLER( radarsc1_snd_disc_w );
-WRITE8_HANDLER( dkong_sh_w );
-WRITE8_HANDLER( dkong_sh_p1_w );
-WRITE8_HANDLER( dkong_sh_p2_w );
+READ8_HANDLER( dkong_audio_status_r );
+WRITE8_HANDLER( dkong_audio_irq_w );
WRITE8_HANDLER( dkong_snd_disc_w );
WRITE8_HANDLER( dkong_sh_tuneselect_w );
WRITE8_HANDLER( dkongjr_sh_test6_w );
-WRITE8_HANDLER( dkongjr_sh_test5_w );
-WRITE8_HANDLER( dkongjr_sh_test4_w );
WRITE8_HANDLER( dkongjr_sh_tuneselect_w );
WRITE8_HANDLER( dkongjr_snd_w1 );
WRITE8_HANDLER( dkongjr_snd_w2 );
-READ8_HANDLER( radarsc1_sh_tune_r );
-READ8_HANDLER( radarsc1_sh_p1_r );
-WRITE8_HANDLER( radarsc1_sh_p1_w );
-WRITE8_HANDLER( radarsc1_sh_p2_w );
-
-SOUND_START( dkong );
-SOUND_START( dkongjr );
-SOUND_START( hunchbkd );
-SOUND_START( radarsc1 );
-
-DISCRETE_SOUND_EXTERN( dkong );
-DISCRETE_SOUND_EXTERN( radarscp );
+MACHINE_DRIVER_EXTERN( radarscp_audio );
+MACHINE_DRIVER_EXTERN( dkong2b_audio );
+MACHINE_DRIVER_EXTERN( dkongjr_audio );
+MACHINE_DRIVER_EXTERN( dkong3_audio );
+MACHINE_DRIVER_EXTERN( radarsc1_audio );
diff --git a/src/mame/includes/galaxian.h b/src/mame/includes/galaxian.h
index dbfd447ff31..1f2f938f667 100644
--- a/src/mame/includes/galaxian.h
+++ b/src/mame/includes/galaxian.h
@@ -207,7 +207,7 @@ WRITE8_HANDLER( hunchbks_mirror_w );
/*----------- defined in audio/galaxian.c -----------*/
-extern struct Samplesinterface galaxian_samples_interface;
+extern const struct Samplesinterface galaxian_samples_interface;
WRITE8_HANDLER( galaxian_pitch_w );
WRITE8_HANDLER( galaxian_vol_w );
WRITE8_HANDLER( galaxian_noise_enable_w );
diff --git a/src/mame/includes/triplhnt.h b/src/mame/includes/triplhnt.h
index ddcb652c569..6a16aed811c 100644
--- a/src/mame/includes/triplhnt.h
+++ b/src/mame/includes/triplhnt.h
@@ -23,7 +23,7 @@ void triplhnt_set_collision(int data);
/*----------- defined in audio/triplhnt.c -----------*/
DISCRETE_SOUND_EXTERN( triplhnt );
-extern struct Samplesinterface triplhnt_samples_interface;
+extern const struct Samplesinterface triplhnt_samples_interface;
/*----------- defined in video/triplhnt.c -----------*/
diff --git a/src/mame/machine/asteroid.c b/src/mame/machine/asteroid.c
index 72912641965..fef6613274f 100644
--- a/src/mame/machine/asteroid.c
+++ b/src/mame/machine/asteroid.c
@@ -107,7 +107,7 @@ READ8_HANDLER( asteroid_IN1_r )
int bitmask;
res=readinputport(1);
- bitmask = (1 << offset);
+ bitmask = (1 << (offset & 0x7));
if (res & bitmask)
res = 0x80;
@@ -186,8 +186,13 @@ READ8_HANDLER( llander_IN0_r )
if (avgdvg_done())
res |= 0x01;
+ else
+ res &= ~0x01;
+
if (activecpu_gettotalcycles() & 0x100)
res |= 0x40;
+ else
+ res &= ~0x40;
return res;
}
diff --git a/src/mame/machine/chaknpop.c b/src/mame/machine/chaknpop.c
index 21eb9edefde..f10426250bc 100644
--- a/src/mame/machine/chaknpop.c
+++ b/src/mame/machine/chaknpop.c
@@ -17,7 +17,7 @@ static UINT8 mcu_result;
/* mcu data that is extracted from the real board! */
/* updated on 2st Jun 2003 */
-static UINT8 mcu_data[256] = {
+static const UINT8 mcu_data[256] = {
0x3a, 0xe6, 0x80, 0xc6, 0x0e, 0xdd, 0x77, 0xfd,
0x7e, 0xfe, 0x10, 0x38, 0x10, 0xdd, 0x7e, 0x03,
0xc6, 0x08, 0xdd, 0x77, 0x03, 0xdd, 0x7e, 0xff,
diff --git a/src/mame/machine/drakton.c b/src/mame/machine/drakton.c
index 70a6556ac46..61df996fcf1 100644
--- a/src/mame/machine/drakton.c
+++ b/src/mame/machine/drakton.c
@@ -103,9 +103,13 @@ static void drakton_decrypt_rom_B(void)
DRIVER_INIT( drakton )
{
+
+ memory_install_read8_handler(0, ADDRESS_SPACE_PROGRAM, 0x0000, 0x3fff, 0, 0, MRA8_BANK1 );
+
/* While the PAL supports up to 16 decryption methods, only four
are actually used in the PAL. Therefore, we'll take a little
memory overhead and decrypt the ROMs using each method in advance. */
+
drakton_decrypt_rom_8();
drakton_decrypt_rom_9();
drakton_decrypt_rom_A();
diff --git a/src/mame/machine/exctsccr.c b/src/mame/machine/exctsccr.c
index 46223367232..4aa9df433d9 100644
--- a/src/mame/machine/exctsccr.c
+++ b/src/mame/machine/exctsccr.c
@@ -37,19 +37,19 @@ static int mcu_code_latch;
/* Exciting Soccer */
/* input = 0x6009 - data = 0x6170 */
-static UINT8 mcu_table1[MCU_KEY_TABLE_SIZE] = {
+static const UINT8 mcu_table1[MCU_KEY_TABLE_SIZE] = {
0x23, 0x05, 0xfb, 0x07, 0x4d, 0x3b, 0x7d, 0x03,
0x9a, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
/* input = 0x600d - data = 0x61f0 */
-static UINT8 mcu_table2[MCU_KEY_TABLE_SIZE] = {
+static const UINT8 mcu_table2[MCU_KEY_TABLE_SIZE] = {
0x75, 0x25, 0x4b, 0x10, 0xa6, 0x06, 0x9a, 0x02,
0x04, 0x11, 0x09, 0x09, 0x2a, 0x10, 0x3a, 0x10
};
/* input = ?????? - data = 0x6300 */
-static UINT8 mcu_table3[MCU_KEY_TABLE_SIZE*4] = {
+static const UINT8 mcu_table3[MCU_KEY_TABLE_SIZE*4] = {
0xba, 0x26, 0x53, 0x0d, 0x01, 0x24, 0x1d, 0x15,
0xd0, 0x1d, 0x35, 0x1f, 0x32, 0x22, 0xa0, 0x2c,
@@ -64,31 +64,31 @@ static UINT8 mcu_table3[MCU_KEY_TABLE_SIZE*4] = {
};
/* input = 0x6007 - data = 0x629b */
-static UINT8 mcu_table4[MCU_KEY_TABLE_SIZE] = {
+static const UINT8 mcu_table4[MCU_KEY_TABLE_SIZE] = {
0xc5, 0x24, 0xc5, 0x24, 0x27, 0x3f, 0xd0, 0x07,
0x07, 0x0b, 0xd8, 0x02, 0x9a, 0x08, 0x00, 0x00
};
/* input = 0x6007 - data = 0x629b */
-static UINT8 mcu_table5[MCU_KEY_TABLE_SIZE] = {
+static const UINT8 mcu_table5[MCU_KEY_TABLE_SIZE] = {
0x54, 0x43, 0xd0, 0x07, 0xd8, 0x02, 0x9a, 0x08,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
/* input = 0x6007 - data = 0x629b */
-static UINT8 mcu_table6[MCU_KEY_TABLE_SIZE] = {
+static const UINT8 mcu_table6[MCU_KEY_TABLE_SIZE] = {
0x2b, 0x03, 0xd0, 0x07, 0xd8, 0x02, 0x9a, 0x08,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
/* input = 0x6007 - data = 0x629b */
-static UINT8 mcu_table7[MCU_KEY_TABLE_SIZE] = {
+static const UINT8 mcu_table7[MCU_KEY_TABLE_SIZE] = {
0xfa, 0x0e, 0x9a, 0x08, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
/* input = 0x6011 - data = 0x607f */
-static UINT8 mcu_table8[MCU_KEY_TABLE_SIZE*2] = {
+static const UINT8 mcu_table8[MCU_KEY_TABLE_SIZE*2] = {
0x0b, 0x78, 0x47, 0x04, 0x36, 0x18, 0x23, 0xf1,
0x10, 0xee, 0x16, 0x04, 0x11, 0x94, 0x16, 0xdd,
@@ -199,19 +199,19 @@ WRITE8_HANDLER( exctsccr_mcu_w ) {
/* Exciting Soccer II */
/* input = 0x6009 - data = 0x6170 */
-static UINT8 exctscc2_mcu_table1[MCU_KEY_TABLE_SIZE] = {
+static const UINT8 exctscc2_mcu_table1[MCU_KEY_TABLE_SIZE] = {
0x56, 0x05, 0x90, 0x08, 0x19, 0x3e, 0xa8, 0x03,
0x2f, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
/* input = 0x600d - data = 0x61f0 */
-static UINT8 exctscc2_mcu_table2[MCU_KEY_TABLE_SIZE] = {
+static const UINT8 exctscc2_mcu_table2[MCU_KEY_TABLE_SIZE] = {
0xff, 0x27, 0x35, 0x10, 0xd9, 0x06, 0xc3, 0x02,
0x4d, 0x12, 0x9e, 0x09, 0x14, 0x10, 0x24, 0x10
};
/* input = ?????? - data = 0x6300 */
-static UINT8 exctscc2_mcu_table3[MCU_KEY_TABLE_SIZE*4] = {
+static const UINT8 exctscc2_mcu_table3[MCU_KEY_TABLE_SIZE*4] = {
0x41, 0x29, 0xb2, 0x12, 0x91, 0x26, 0xa6, 0x16, //0x12b2?
0x5f, 0x20, 0xc4, 0x21, 0xc1, 0x24, 0x3e, 0x2f,
@@ -226,31 +226,31 @@ static UINT8 exctscc2_mcu_table3[MCU_KEY_TABLE_SIZE*4] = {
};
/* input = 0x6007 - data = 0x629b */
-static UINT8 exctscc2_mcu_table4[MCU_KEY_TABLE_SIZE] = {
+static const UINT8 exctscc2_mcu_table4[MCU_KEY_TABLE_SIZE] = {
0x55, 0x27, 0x55, 0x27, 0xf3, 0x41, 0x65, 0x08,
0xe3, 0x0b, 0x01, 0x03, 0x2f, 0x09, 0x00, 0x00
};
/* input = 0x6007 - data = 0x629b */
-static UINT8 exctscc2_mcu_table5[MCU_KEY_TABLE_SIZE] = {
+static const UINT8 exctscc2_mcu_table5[MCU_KEY_TABLE_SIZE] = {
0xdd, 0x45, 0x65, 0x08, 0x01, 0x03, 0x2f, 0x09,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
/* input = 0x6007 - data = 0x629b */
-static UINT8 exctscc2_mcu_table6[MCU_KEY_TABLE_SIZE] = {
+static const UINT8 exctscc2_mcu_table6[MCU_KEY_TABLE_SIZE] = {
0x54, 0x03, 0x65, 0x08, 0x01, 0x03, 0x2f, 0x09,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
/* input = 0x6007 - data = 0x629b */
-static UINT8 exctscc2_mcu_table7[MCU_KEY_TABLE_SIZE] = {
+static const UINT8 exctscc2_mcu_table7[MCU_KEY_TABLE_SIZE] = {
0xe4, 0x0e, 0x2f, 0x09, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
/* input = 0x6011 - data = 0x607f */
-static UINT8 exctscc2_mcu_table8[MCU_KEY_TABLE_SIZE*2] = {
+static const UINT8 exctscc2_mcu_table8[MCU_KEY_TABLE_SIZE*2] = {
0x0c, 0x54, 0x4b, 0x0d, 0x38, 0xbd, 0x26, 0x81,
0x12, 0x37, 0x18, 0x4a, 0x13, 0x0f, 0x19, 0x23,
diff --git a/src/mame/machine/flstory.c b/src/mame/machine/flstory.c
index 174317be19a..c872891791f 100644
--- a/src/mame/machine/flstory.c
+++ b/src/mame/machine/flstory.c
@@ -180,7 +180,7 @@ READ8_HANDLER( onna34ro_mcu_status_r )
#define VICTNINE_MCU_SEED (memory_region(REGION_CPU1)[0xE685])
-static UINT8 victnine_mcu_data[0x100] =
+static const UINT8 victnine_mcu_data[0x100] =
{
0x3e, 0x08, 0xdd, 0x29, 0xcb, 0x14, 0xfd, 0x29,
0xcb, 0x15, 0xd9, 0x29, 0xd9, 0x30, 0x0d, 0xd9,
diff --git a/src/mame/machine/gaelco2.c b/src/mame/machine/gaelco2.c
index c634ec61004..b0df1dbbdfd 100644
--- a/src/mame/machine/gaelco2.c
+++ b/src/mame/machine/gaelco2.c
@@ -164,7 +164,7 @@ WRITE16_HANDLER( wrally2_coin_w )
***************************************************************************/
-static struct EEPROM_interface gaelco2_eeprom_interface =
+static const struct EEPROM_interface gaelco2_eeprom_interface =
{
8, /* address bits */
16, /* data bits */
diff --git a/src/mame/machine/kanekotb.h b/src/mame/machine/kanekotb.h
index ca11a31c511..14f04d7fd18 100644
--- a/src/mame/machine/kanekotb.h
+++ b/src/mame/machine/kanekotb.h
@@ -17,7 +17,7 @@
// MCU executed command: 4300 0100 - factory settings
// this command is issued whenever the nvram settings are corrupted
// the MCU writes directly to NVRAM
-static UINT16 bonkadv_mcu_43[] = {
+static const UINT16 bonkadv_mcu_43[] = {
0x8BE0,0x8E71,0x0102,0x0102,0x0300,0x010C,0x0202,0x0202,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0030,0x0020,0x4F6B,0x0305,0x0000,0x0000,0x0000,0x0000,
@@ -40,12 +40,12 @@ static UINT16 bonkadv_mcu_43[] = {
200E0E: 7E7F moveq #$7f, D7
200E10: 4E75 rts
*/
-static UINT16 bonkadv_mcu_4_34[] = {
+static const UINT16 bonkadv_mcu_4_34[] = {
0x7071,0x7273,0x7475,0x7677,0x7879,0x7a7b,0x7c7d,0x7e7f,
0x4e75
};
// MCU executed command: 0400 0180 0032 - 128 bytes at $200180
-static UINT16 bonkadv_mcu_4_32[] = {
+static const UINT16 bonkadv_mcu_4_32[] = {
0x00cc,0xcc0c,0xc0c0,0xc080,0x0484,0xb6a6,0x0404,0x80c0,
0x80b1,0xb1a1,0xa1b2,0xa2b3,0xb3a3,0xa3b1,0xb1b1,0xb1c0,
0xc0a1,0xa1a1,0xa1b2,0xb2a2,0xa290,0x9090,0xb9b9,0xa9a9,
@@ -56,7 +56,7 @@ static UINT16 bonkadv_mcu_4_32[] = {
0xc0c0,0xa1a1,0xa1a1,0xb2b2,0xa2a2,0x9090,0x9000,0x0000
};
// MCU executed command: 0400 0280 0031 - 112 bytes at $200280
-static UINT16 bonkadv_mcu_4_31[] = {
+static const UINT16 bonkadv_mcu_4_31[] = {
0x1013,0x1411,0x1216,0x1519,0x1a17,0x1824,0x2322,0x211f,
0x201e,0x1d1c,0x1b27,0x2825,0x2629,0x2a2b,0x2e2f,0x2c2d,
0x3130,0x3435,0x3233,0x3f3e,0x3d3c,0x3a3b,0x3938,0x3736,
@@ -66,7 +66,7 @@ static UINT16 bonkadv_mcu_4_31[] = {
0x7071,0x6f6e,0x6d6c,0x7879,0x7677,0x7a7b,0x7c7d,0x7e7f
};
// MCU executed command: 0400 0E50 0030 - 655 bytes at $200E50 (656 here)
-static UINT16 bonkadv_mcu_4_30[] = {
+static const UINT16 bonkadv_mcu_4_30[] = {
0x8c00,0x9700,0xa000,0xa700,0xb200,0xb700,0xc000,0xcc00,
0xd600,0xdf00,0xef00,0xf500,0xfd00,0x0501,0x0b01,0x1801,
0x1e01,0x2901,0x3101,0x3701,0x4101,0x4901,0x0b01,0x5d01,
@@ -112,7 +112,7 @@ static UINT16 bonkadv_mcu_4_30[] = {
0xff00,0x0005,0x2495,0x96ff,0x0000,0x009a,0xff00,0x0000
};
// MCU executed command: 0400 0400 0033 - 2560 bytes at $200400
-static UINT16 bonkadv_mcu_4_33[] = {
+static const UINT16 bonkadv_mcu_4_33[] = {
0x00a4,0x0001,0x00a5,0x005a,0x00a6,0x0074,0x00a7,0x009b,
0x00a8,0x00d0,0x00a9,0x00fe,0x00aa,0x015d,0x00ab,0x01b0,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
@@ -285,40 +285,40 @@ static UINT16 bonkadv_mcu_4_33[] = {
};
// dynamic, per-level (29), in level order
// PC=078896 : MCU executed command: 0400 0300 00xx - xx = subcmd
-static UINT16 bonkadv_mcu_4_00[] = { 0x0000,0x04C0,0x0000,0x0100,0x0600,0x0100 };
-static UINT16 bonkadv_mcu_4_02[] = { 0x0000,0x0760,0x0000,0x0100,0x0270,0x0100,0x0320,0x01B0,
+static const UINT16 bonkadv_mcu_4_00[] = { 0x0000,0x04C0,0x0000,0x0100,0x0600,0x0100 };
+static const UINT16 bonkadv_mcu_4_02[] = { 0x0000,0x0760,0x0000,0x0100,0x0270,0x0100,0x0320,0x01B0,
0x0460,0x01B0,0x0510,0x0100,0x05E0,0x0100,0x0620,0x0120,
0x08A0,0x0120 };
-static UINT16 bonkadv_mcu_4_01[] = { 0x0000,0x0670,0x0000,0x0100,0x0200,0x0100,0x02E0,0x0090,
+static const UINT16 bonkadv_mcu_4_01[] = { 0x0000,0x0670,0x0000,0x0100,0x0200,0x0100,0x02E0,0x0090,
0x0400,0x0090,0x04E0,0x0100,0x07B0,0x0100 };
-static UINT16 bonkadv_mcu_4_05[] = { 0x0000,0x0610,0x0000,0x0100,0x0750,0x0100 };
-static UINT16 bonkadv_mcu_4_07[] = { 0x0000,0x03C0,0x0000,0x0100,0x0500,0x0100 };
-static UINT16 bonkadv_mcu_4_06[] = { 0x0000,0x05F0,0x0000,0x0100,0x0730,0x0100 };
-static UINT16 bonkadv_mcu_4_09[] = { 0x0000,0x05C0,0x0000,0x0100,0x0700,0x0100 };
-static UINT16 bonkadv_mcu_4_0D[] = { 0x0000,0x07A0,0x0000,0x0100,0x08E0,0x0100 };
-static UINT16 bonkadv_mcu_4_03[] = { 0x0000,0x0920,0x0000,0x0100,0x0A60,0x0100 };
-static UINT16 bonkadv_mcu_4_08[] = { 0x0000,0x0730,0x0000,0x0100,0x0870,0x0100 };
-static UINT16 bonkadv_mcu_4_04[] = { 0x0000,0x05C0,0x0000,0x0100,0x0200,0x0100,0x0280,0x00C0,
+static const UINT16 bonkadv_mcu_4_05[] = { 0x0000,0x0610,0x0000,0x0100,0x0750,0x0100 };
+static const UINT16 bonkadv_mcu_4_07[] = { 0x0000,0x03C0,0x0000,0x0100,0x0500,0x0100 };
+static const UINT16 bonkadv_mcu_4_06[] = { 0x0000,0x05F0,0x0000,0x0100,0x0730,0x0100 };
+static const UINT16 bonkadv_mcu_4_09[] = { 0x0000,0x05C0,0x0000,0x0100,0x0700,0x0100 };
+static const UINT16 bonkadv_mcu_4_0D[] = { 0x0000,0x07A0,0x0000,0x0100,0x08E0,0x0100 };
+static const UINT16 bonkadv_mcu_4_03[] = { 0x0000,0x0920,0x0000,0x0100,0x0A60,0x0100 };
+static const UINT16 bonkadv_mcu_4_08[] = { 0x0000,0x0730,0x0000,0x0100,0x0870,0x0100 };
+static const UINT16 bonkadv_mcu_4_04[] = { 0x0000,0x05C0,0x0000,0x0100,0x0200,0x0100,0x0280,0x00C0,
0x02E0,0x0060,0x03A0,0x0000,0x0700,0x0000 };
-static UINT16 bonkadv_mcu_4_0C[] = { 0x0000,0x06E0,0x0000,0x0100,0x0820,0x0100 };
-static UINT16 bonkadv_mcu_4_0A[] = { 0x0000,0x05A0,0x0000,0x0100,0x06E0,0x0100 };
-static UINT16 bonkadv_mcu_4_0B[] = { 0x0000,0x0470,0x0000,0x0100,0x05B0,0x0100 };
-static UINT16 bonkadv_mcu_4_10[] = { 0x0000,0x06C0,0x0000,0x0100,0x03B0,0x0100,0x0460,0x0050,
+static const UINT16 bonkadv_mcu_4_0C[] = { 0x0000,0x06E0,0x0000,0x0100,0x0820,0x0100 };
+static const UINT16 bonkadv_mcu_4_0A[] = { 0x0000,0x05A0,0x0000,0x0100,0x06E0,0x0100 };
+static const UINT16 bonkadv_mcu_4_0B[] = { 0x0000,0x0470,0x0000,0x0100,0x05B0,0x0100 };
+static const UINT16 bonkadv_mcu_4_10[] = { 0x0000,0x06C0,0x0000,0x0100,0x03B0,0x0100,0x0460,0x0050,
0x05E0,0x0050,0x0650,0xFFE0,0x0800,0xFFE0 };
-static UINT16 bonkadv_mcu_4_0E[] = { 0x0000,0x0630,0x0000,0x0100,0x0770,0x0100 };
-static UINT16 bonkadv_mcu_4_13[] = { 0x0000,0x05C0,0x0000,0x0100,0x0700,0x0100 };
-static UINT16 bonkadv_mcu_4_0F[] = { 0x0000,0x05C0,0x0000,0x0100,0x0700,0x0100 };
-static UINT16 bonkadv_mcu_4_11[] = { 0x0000,0x05C0,0x0000,0x0100,0x0700,0x0100 };
-static UINT16 bonkadv_mcu_4_14[] = { 0x0000,0x05C0,0x0000,0x0100,0x0700,0x0100 };
-static UINT16 bonkadv_mcu_4_12[] = { 0x0000,0x05C0,0x0000,0x0100,0x0700,0x0100 };
-static UINT16 bonkadv_mcu_4_17[] = { 0x0000,0x0520,0x0000,0x0100,0x0660,0x0100 };
-static UINT16 bonkadv_mcu_4_1A[] = { 0x0000,0x03C0,0x0000,0x0100,0x0500,0x0100 };
-static UINT16 bonkadv_mcu_4_15[] = { 0x0000,0x02C0,0x0000,0x0100,0x0400,0x0100 };
-static UINT16 bonkadv_mcu_4_18[] = { 0x0000,0x03C0,0x0000,0x0100,0x0500,0x0100 };
-static UINT16 bonkadv_mcu_4_16[] = { 0x0000,0x02F0,0x0000,0x0100,0x0430,0x0100 };
-static UINT16 bonkadv_mcu_4_19[] = { 0x0000,0x03A0,0x0000,0x0100,0x04E0,0x0100 };
-static UINT16 bonkadv_mcu_4_1B[] = { 0x0000,0x0460,0x0000,0x0100,0x05A0,0x0100 };
-static UINT16 bonkadv_mcu_4_1C[] = { 0x0000,0x02C0,0x0000,0x0100,0x0400,0x0100 };
+static const UINT16 bonkadv_mcu_4_0E[] = { 0x0000,0x0630,0x0000,0x0100,0x0770,0x0100 };
+static const UINT16 bonkadv_mcu_4_13[] = { 0x0000,0x05C0,0x0000,0x0100,0x0700,0x0100 };
+static const UINT16 bonkadv_mcu_4_0F[] = { 0x0000,0x05C0,0x0000,0x0100,0x0700,0x0100 };
+static const UINT16 bonkadv_mcu_4_11[] = { 0x0000,0x05C0,0x0000,0x0100,0x0700,0x0100 };
+static const UINT16 bonkadv_mcu_4_14[] = { 0x0000,0x05C0,0x0000,0x0100,0x0700,0x0100 };
+static const UINT16 bonkadv_mcu_4_12[] = { 0x0000,0x05C0,0x0000,0x0100,0x0700,0x0100 };
+static const UINT16 bonkadv_mcu_4_17[] = { 0x0000,0x0520,0x0000,0x0100,0x0660,0x0100 };
+static const UINT16 bonkadv_mcu_4_1A[] = { 0x0000,0x03C0,0x0000,0x0100,0x0500,0x0100 };
+static const UINT16 bonkadv_mcu_4_15[] = { 0x0000,0x02C0,0x0000,0x0100,0x0400,0x0100 };
+static const UINT16 bonkadv_mcu_4_18[] = { 0x0000,0x03C0,0x0000,0x0100,0x0500,0x0100 };
+static const UINT16 bonkadv_mcu_4_16[] = { 0x0000,0x02F0,0x0000,0x0100,0x0430,0x0100 };
+static const UINT16 bonkadv_mcu_4_19[] = { 0x0000,0x03A0,0x0000,0x0100,0x04E0,0x0100 };
+static const UINT16 bonkadv_mcu_4_1B[] = { 0x0000,0x0460,0x0000,0x0100,0x05A0,0x0100 };
+static const UINT16 bonkadv_mcu_4_1C[] = { 0x0000,0x02C0,0x0000,0x0100,0x0400,0x0100 };
/***************************************************************************
@@ -336,30 +336,30 @@ static UINT16 bonkadv_mcu_4_1C[] = { 0x0000,0x02C0,0x0000,0x0100,0x0400,0x0100 }
// fighter: order is unclear - cmd 26 is probably the last (ends with 0xff)
// --- unknown data ---
-static UINT16 bloodwar_mcu_4_01[] = { 0x00E6,0x00C6,0x00E8,0x00D0,0xFC9A,0x05C0,0x0F00,0x08C0, // Warrior 1
+static const UINT16 bloodwar_mcu_4_01[] = { 0x00E6,0x00C6,0x00E8,0x00D0,0xFC9A,0x05C0,0x0F00,0x08C0, // Warrior 1
0x0001,0x0120,0x0090,0x021B,0x00B4,0x0094,0x00AC,0x0094 };
-static UINT16 bloodwar_mcu_4_02[] = { 0x00B4,0x0094,0x00AC,0x0094,0xFCD2,0x03C0,0x1000,0x0900, // Warrior 2
+static const UINT16 bloodwar_mcu_4_02[] = { 0x00B4,0x0094,0x00AC,0x0094,0xFCD2,0x03C0,0x1000,0x0900, // Warrior 2
0x0001,0x0100,0x0080,0x0118,0x00F0,0x00D0,0x00F4,0x00DC };
-static UINT16 bloodwar_mcu_4_03[] = { 0x00F0,0x00D0,0x00F4,0x00DC,0xFC90,0x03C0,0x0C00,0x0CC0, // Warrior 3
+static const UINT16 bloodwar_mcu_4_03[] = { 0x00F0,0x00D0,0x00F4,0x00DC,0xFC90,0x03C0,0x0C00,0x0CC0, // Warrior 3
0x0001,0x0200,0x0100,0x0930,0x00D2,0x00B2,0x00CA,0x00B0 };
-static UINT16 bloodwar_mcu_4_04[] = { 0x00D2,0x00B2,0x00CA,0x00B0,0xFCB5,0x05C0,0x1000,0x0C00, // Warrior 4
+static const UINT16 bloodwar_mcu_4_04[] = { 0x00D2,0x00B2,0x00CA,0x00B0,0xFCB5,0x05C0,0x1000,0x0C00, // Warrior 4
0x0001,0x0140,0x00A0,0x031E,0x00A0,0x0080,0x00DC,0x00C4 };
-static UINT16 bloodwar_mcu_4_05[] = { 0x00A0,0x0080,0x00DC,0x00C4,0xFCA2,0x05C0,0x0AC0,0x0880, // Warrior 5
+static const UINT16 bloodwar_mcu_4_05[] = { 0x00A0,0x0080,0x00DC,0x00C4,0xFCA2,0x05C0,0x0AC0,0x0880, // Warrior 5
0x0001,0x01A0,0x00D0,0x0627,0x00BE,0x009E,0x00C2,0x00A8 };
-static UINT16 bloodwar_mcu_4_06[] = { 0x00BE,0x009E,0x00C2,0x00A8,0xFCBF,0x04C0,0x1100,0x0C00, // Warrior 6
+static const UINT16 bloodwar_mcu_4_06[] = { 0x00BE,0x009E,0x00C2,0x00A8,0xFCBF,0x04C0,0x1100,0x0C00, // Warrior 6
0x0001,0x0180,0x00C0,0x0524,0x00C8,0x00A8,0x00D6,0x009C };
-static UINT16 bloodwar_mcu_4_07[] = { 0x00C8,0x00A8,0x00D6,0x009C,0xFCC8,0x05C0,0x0F40,0x0CC0, // Warrior 7
+static const UINT16 bloodwar_mcu_4_07[] = { 0x00C8,0x00A8,0x00D6,0x009C,0xFCC8,0x05C0,0x0F40,0x0CC0, // Warrior 7
0x0001,0x0160,0x00B0,0x0421,0x00AA,0x008A,0x00A0,0x0086 };
-static UINT16 bloodwar_mcu_4_08[] = { 0x00AA,0x008A,0x00A0,0x0086,0xFCDB,0x05C0,0x1380,0x0F80, // Warrior 8
+static const UINT16 bloodwar_mcu_4_08[] = { 0x00AA,0x008A,0x00A0,0x0086,0xFCDB,0x05C0,0x1380,0x0F80, // Warrior 8
0x0000,0x01E0,0x00F0,0x082D,0x00DC,0x00BC,0x00D6,0x00BC };
-static UINT16 bloodwar_mcu_4_09[] = { 0x00DC,0x00BC,0x00D6,0x00BC,0xFCAC,0x04C0,0x10C0,0x1000, // Warrior 9
+static const UINT16 bloodwar_mcu_4_09[] = { 0x00DC,0x00BC,0x00D6,0x00BC,0xFCAC,0x04C0,0x10C0,0x1000, // Warrior 9
0x0001,0x01C0,0x00E0,0x072A,0xFF08,0xFF02,0x0000,0xFF03 };
// --- palette data ---
// number of palettes (>=1)
// palette data follows (each palette is 0x200 bytes long)
// a negative word will end the palette
-static UINT16 bloodwar_mcu_4_0a[] = { // Warrior 1 Player 1
+static const UINT16 bloodwar_mcu_4_0a[] = { // Warrior 1 Player 1
0x000B,0x0000,0x4232,0x56F8,0x2D8D,0x27FF,0x3BFF,0x53FF,
0x63FF,0x381F,0x4C1F,0x581F,0x6C1F,0x7C1F,0x7E1F,0x7EBF,
0x7BDE,0x2DAF,0x296E,0x298E,0x29AE,0x2DAE,0x31CF,0x31D0,
@@ -544,7 +544,7 @@ static UINT16 bloodwar_mcu_4_0a[] = { // Warrior 1 Player 1
0x2340,0x2B60,0x3380,0x3FA0,0x47A0,0x4FC1,0x5BC0,0x67E2,
0x6FE4,0x77E6,0x7BEF,0x7FF4,0x7FFB,0x7BDE,0xFFFF,0x000B
};
-static UINT16 bloodwar_mcu_4_0b[] = { // Warrior 1 Player 2
+static const UINT16 bloodwar_mcu_4_0b[] = { // Warrior 1 Player 2
0x000B,0x292A,0x4232,0x56F8,0x2D8D,0x2108,0x294A,0x318C,
0x39CE,0x4210,0x4A52,0x5294,0x5AD6,0x6318,0x6B5A,0x739C,
0x7BDE,0x2E2A,0x29E9,0x2609,0x29E9,0x2629,0x2A4A,0x2A4B,
@@ -729,7 +729,7 @@ static UINT16 bloodwar_mcu_4_0b[] = { // Warrior 1 Player 2
0x2340,0x2B60,0x3380,0x3FA0,0x47A0,0x4FC1,0x5BC0,0x67E2,
0x6FE4,0x77E6,0x7BEF,0x7FF4,0x7FFB,0x7BDE,0xFFFF,0x0004
};
-static UINT16 bloodwar_mcu_4_0c[] = { // Warrior 5 Player 1
+static const UINT16 bloodwar_mcu_4_0c[] = { // Warrior 5 Player 1
0x0004,0x0000,0x4232,0x56F8,0x2D8D,0x2108,0x294A,0x318C,
0x39CE,0x4210,0x4A52,0x5294,0x5AD6,0x6318,0x6B5A,0x739C,
0x7BDE,0x1422,0x1423,0x2044,0x1803,0x1C23,0x2CA6,0x2445,
@@ -810,7 +810,7 @@ static UINT16 bloodwar_mcu_4_0c[] = { // Warrior 5 Player 1
0x270A,0x32F1,0x2EAB,0x3BCF,0x3BD2,0x4BEE,0x53F6,0x5B94,
0x6BB5,0x6FFB,0x7BDE,0xFFFF,0x0004,0x0000,0x4232,0x56F8
};
-static UINT16 bloodwar_mcu_4_0d[] = { // Warrior 5 Player 2
+static const UINT16 bloodwar_mcu_4_0d[] = { // Warrior 5 Player 2
0x0004,0x0000,0x4232,0x56F8,0x2D8D,0x2108,0x294A,0x318C,
0x39CE,0x4210,0x4A52,0x5294,0x5AD6,0x6318,0x6B5A,0x739C,
0x7BDE,0x0C29,0x0C2A,0x184B,0x100A,0x142A,0x24AD,0x1C4C,
@@ -891,7 +891,7 @@ static UINT16 bloodwar_mcu_4_0d[] = { // Warrior 5 Player 2
0x270A,0x32F1,0x2EAB,0x3BCF,0x3BD2,0x4BEE,0x53F6,0x5B94,
0x6BB5,0x6FFB,0x7BDE,0xFFFF,0x0005,0x40CE,0x4232,0x56F8
};
-static UINT16 bloodwar_mcu_4_0e[] = { // Warrior 4 Player 2
+static const UINT16 bloodwar_mcu_4_0e[] = { // Warrior 4 Player 2
0x0005,0x40CE,0x4232,0x56F8,0x2D8D,0x1D08,0x254A,0x2D8C,
0x35CE,0x3E10,0x4652,0x4E94,0x56D6,0x5F18,0x675A,0x6F9C,
0x7BDE,0x7BF9,0x6FF5,0x6BD4,0x63F1,0x538D,0x63F2,0x57EE,
@@ -934,7 +934,7 @@ static UINT16 bloodwar_mcu_4_0e[] = { // Warrior 4 Player 2
0x4340,0x4760,0x4F80,0x57A1,0x5BC0,0x67E2,0x6FE4,0x77E6,
0x7BEF,0x7FF4,0x7FFB,0x7BDE,0xFFFF,0x0005,0x40CE,0x4232
};
-static UINT16 bloodwar_mcu_4_0f[] = { // Warrior 4 Player 1
+static const UINT16 bloodwar_mcu_4_0f[] = { // Warrior 4 Player 1
0x0005,0x40CE,0x4232,0x56F8,0x2D8D,0x20E9,0x292B,0x316D,
0x39AF,0x41F1,0x4A33,0x5275,0x5AB7,0x62F9,0x6B3B,0x737D,
0x7BDF,0x7FFA,0x73F6,0x6FF5,0x67F2,0x57CE,0x67F3,0x5BEF,
@@ -977,7 +977,7 @@ static UINT16 bloodwar_mcu_4_0f[] = { // Warrior 4 Player 1
0x4340,0x4760,0x4F80,0x57A1,0x5BC0,0x67E2,0x6FE4,0x77E6,
0x7BEF,0x7FF4,0x7FFB,0x7BDE,0xFFFF,0x0009,0x0000,0x4232
};
-static UINT16 bloodwar_mcu_4_10[] = { // Warrior 6 Player 1
+static const UINT16 bloodwar_mcu_4_10[] = { // Warrior 6 Player 1
0x0009,0x0000,0x4232,0x56F8,0x2D8D,0x27FF,0x3BFF,0x53FF,
0x63FF,0x401E,0x4C1F,0x581F,0x6C1F,0x7C1F,0x7E1F,0x7EBF,
0x7BDE,0x4BCD,0x47EC,0x43CA,0x3BC8,0x2F45,0x2703,0x22E2,
@@ -1046,7 +1046,7 @@ static UINT16 bloodwar_mcu_4_10[] = { // Warrior 6 Player 1
0x7C00,0x7C05,0x780A,0x7C0F,0x7C14,0x7C19,0x7C1F,0x7BDE,
0xFFFF,0x0009,0x0000,0x4232,0x56F8,0x2D8D,0x6C1F,0x7C1F
};
-static UINT16 bloodwar_mcu_4_11[] = { // Warrior 6 Player 2
+static const UINT16 bloodwar_mcu_4_11[] = { // Warrior 6 Player 2
0x0009,0x0000,0x4232,0x56F8,0x2D8D,0x6C1F,0x7C1F,0x7E1F,
0x7EBF,0x5C13,0x5C52,0x6432,0x7075,0x7992,0x7DF6,0x7EF9,
0x7BDE,0x52F2,0x4F11,0x4AEF,0x42CD,0x368A,0x2E48,0x2A27,
@@ -1115,7 +1115,7 @@ static UINT16 bloodwar_mcu_4_11[] = { // Warrior 6 Player 2
0x7C00,0x7C05,0x780A,0x7C0F,0x7C14,0x7C19,0x7C1F,0x7BDE,
0xFFFF,0x0002,0x0000,0x4232,0x56F8,0x2D8D,0x2108,0x294A
};
-static UINT16 bloodwar_mcu_4_12[] = { // Warrior 9 Player 1
+static const UINT16 bloodwar_mcu_4_12[] = { // Warrior 9 Player 1
0x0002,0x0000,0x4232,0x56F8,0x2D8D,0x2108,0x294A,0x318C,
0x39CE,0x4210,0x4A52,0x5294,0x5AD6,0x6318,0x6B5A,0x739C,
0x7BDE,0x1AC2,0x1AE2,0x1B02,0x1703,0x1723,0x1743,0x1763,
@@ -1175,7 +1175,7 @@ static UINT16 bloodwar_mcu_4_12[] = { // Warrior 9 Player 1
0x7FB6,0x7FB7,0x7FB8,0x7FB9,0x7FBF,0x7FBB,0x7FFF,0x7FFF,
0x0000,0xFFFF,0x0002,0x0000,0x4232,0x56F8,0x2D8D,0x2108
};
-static UINT16 bloodwar_mcu_4_13[] = { // Warrior 9 Player 2
+static const UINT16 bloodwar_mcu_4_13[] = { // Warrior 9 Player 2
0x0002,0x0000,0x4232,0x56F8,0x2D8D,0x2108,0x294A,0x318C,
0x39CE,0x4210,0x4A52,0x5294,0x5AD6,0x6318,0x6B5A,0x739C,
0x7BDE,0x146D,0x1CAF,0x24EF,0x24EF,0x2910,0x3553,0x3DB7,
@@ -1235,7 +1235,7 @@ static UINT16 bloodwar_mcu_4_13[] = { // Warrior 9 Player 2
0x7FB6,0x7FB7,0x7FB8,0x7FB9,0x7FBF,0x7FBB,0x7FFF,0x7FFF,
0x0000,0xFFFF,0x0006,0x0000,0x4232,0x56F8,0x2D8D,0x2108
};
-static UINT16 bloodwar_mcu_4_14[] = { // Warrior 7 Player 1
+static const UINT16 bloodwar_mcu_4_14[] = { // Warrior 7 Player 1
0x0006,0x0000,0x4232,0x56F8,0x2D8D,0x2108,0x294A,0x318C,
0x39CE,0x4210,0x4A52,0x5294,0x5AD6,0x6318,0x6B5A,0x739C,
0x7BDE,0x0D00,0x0D00,0x0D40,0x0D40,0x0D60,0x0D80,0x1140,
@@ -1376,7 +1376,7 @@ static UINT16 bloodwar_mcu_4_14[] = { // Warrior 7 Player 1
0x77E2,0x77E4,0x77E6,0x77E8,0x7BEA,0x7BED,0x7BF0,0x7BF3,
0x7BF6,0x7BF9,0x7BFB,0x7FFF,0x0000,0xFFFF,0x0006,0x3CB1
};
-static UINT16 bloodwar_mcu_4_15[] = { // Warrior 7 Player 2
+static const UINT16 bloodwar_mcu_4_15[] = { // Warrior 7 Player 2
0x0006,0x3CB1,0x4232,0x56F8,0x2D8D,0x2108,0x294A,0x318C,
0x39CE,0x4210,0x4A52,0x5294,0x5AD6,0x6318,0x6B5A,0x739C,
0x7BDE,0x1CCB,0x1049,0x184A,0x18E9,0x1CAA,0x1C4C,0x20AE,
@@ -1517,7 +1517,7 @@ static UINT16 bloodwar_mcu_4_15[] = { // Warrior 7 Player 2
0x77E2,0x77E4,0x77E6,0x77E8,0x7BEA,0x7BED,0x7BF0,0x7BF3,
0x7BF6,0x7BF9,0x7BFB,0x7FFF,0x0000,0xFFFF,0x0002,0x0000
};
-static UINT16 bloodwar_mcu_4_16[] = { // Warrior 8 Player 1
+static const UINT16 bloodwar_mcu_4_16[] = { // Warrior 8 Player 1
0x0002,0x0000,0x4232,0x56F8,0x2D8D,0x2108,0x294A,0x318C,
0x39CE,0x4210,0x4A52,0x5294,0x5AD6,0x6318,0x6B5A,0x739C,
0x7BDE,0x29A9,0x2DCA,0x31EB,0x360C,0x3A0D,0x3A2D,0x3A4D,
@@ -1554,7 +1554,7 @@ static UINT16 bloodwar_mcu_4_16[] = { // Warrior 8 Player 1
0x7BDE,0xFFFF,0x0002,0x0000,0x4232,0x56F8,0x2D8D,0x2108
};
-static UINT16 bloodwar_mcu_4_17[] = { // Warrior 8 Player 2
+static const UINT16 bloodwar_mcu_4_17[] = { // Warrior 8 Player 2
0x0002,0x0000,0x4232,0x56F8,0x2D8D,0x2108,0x294A,0x318C,
0x39CE,0x4210,0x4A52,0x5294,0x5AD6,0x6318,0x6B5A,0x739C,
0x7BDE,0x296A,0x2D8B,0x31AC,0x35CD,0x35EF,0x39F0,0x3A10,
@@ -1591,7 +1591,7 @@ static UINT16 bloodwar_mcu_4_17[] = { // Warrior 8 Player 2
0x7BDE,0xFFFF,0x0003,0x0000,0x4232,0x56F8,0x2D8D,0x2108
};
-static UINT16 bloodwar_mcu_4_18[] = { // Warrior 2 Player 2
+static const UINT16 bloodwar_mcu_4_18[] = { // Warrior 2 Player 2
0x0003,0x0000,0x4232,0x56F8,0x2D8D,0x2108,0x294A,0x318C,
0x39CE,0x4210,0x4A52,0x5294,0x5AD6,0x6318,0x6B5A,0x739C,
0x7BDE,0x1524,0x0CC2,0x0CE2,0x0CE3,0x10E3,0x1103,0x14E3,
@@ -1651,7 +1651,7 @@ static UINT16 bloodwar_mcu_4_18[] = { // Warrior 2 Player 2
0x294A,0x318C,0x39CE,0x03A0,0x23E0,0x37E0,0x3FE0,0x4FE0,
0x67ED,0x77EE,0x7FFF,0xFFFF,0x0003,0x0000,0x4232,0x56F8
};
-static UINT16 bloodwar_mcu_4_19[] = { // Warrior 2 Player 1
+static const UINT16 bloodwar_mcu_4_19[] = { // Warrior 2 Player 1
0x0003,0x0000,0x4232,0x56F8,0x2D8D,0x2108,0x294A,0x318C,
0x39CE,0x4210,0x4A52,0x5294,0x5AD6,0x6318,0x6B5A,0x739C,
0x7BDE,0x1524,0x0CC2,0x0CE2,0x0CE3,0x10E3,0x1103,0x14E3,
@@ -1711,7 +1711,7 @@ static UINT16 bloodwar_mcu_4_19[] = { // Warrior 2 Player 1
0x294A,0x318C,0x39CE,0x03A0,0x23E0,0x37E0,0x3FE0,0x4FE0,
0x67ED,0x77EE,0x7FFF,0xFFFF,0x0005,0x0000,0x4232,0x56F8
};
-static UINT16 bloodwar_mcu_4_1a[] = { // Warrior 3 Player 1
+static const UINT16 bloodwar_mcu_4_1a[] = { // Warrior 3 Player 1
0x0005,0x0000,0x4232,0x56F8,0x2D8D,0x2108,0x294A,0x318C,
0x39CE,0x4210,0x4A52,0x5294,0x5AD6,0x6318,0x6B5A,0x739C,
0x7BDE,0x08A0,0x0D02,0x1142,0x19C2,0x3EEB,0x430D,0x4B6C,
@@ -1839,7 +1839,7 @@ static UINT16 bloodwar_mcu_4_1a[] = { // Warrior 3 Player 1
0x0192,0x0194,0x0195,0x2597,0x2998,0x3599,0x3D99,0x0195,
0x0999,0x1199,0x21CF,0x25D4,0xFFFF,0x0005,0x0000,0x4232
};
-static UINT16 bloodwar_mcu_4_1b[] = { // Warrior 3 Player 2
+static const UINT16 bloodwar_mcu_4_1b[] = { // Warrior 3 Player 2
0x0005,0x0000,0x4232,0x56F8,0x2D8D,0x2108,0x294A,0x318C,
0x39CE,0x4210,0x4A52,0x5294,0x5AD6,0x6318,0x6B5A,0x739C,
0x7BDE,0x08A0,0x0D02,0x1142,0x19C2,0x3EEB,0x430D,0x4B6C,
@@ -1970,7 +1970,7 @@ static UINT16 bloodwar_mcu_4_1b[] = { // Warrior 3 Player 2
// --- tilemap data ---
// tile data (ff means no tiles) followed by routine index (end marker: 0xff00)
-static UINT16 bloodwar_mcu_4_1c[] = { // Warrior 8
+static const UINT16 bloodwar_mcu_4_1c[] = { // Warrior 8
0xFF08,0xFF02,0x0000,0xFF03,0x0400,0xFF01,0x0D00,0xFF06,
0x01BF,0xFF06,0x00FF,0xFF06,0x0008,0x2C01,0xFF06,0x0001,
0xFF05,0x0002,0x2C02,0xFF06,0x0001,0xFF05,0x0002,0x2C55,
@@ -2033,7 +2033,7 @@ static UINT16 bloodwar_mcu_4_1c[] = { // Warrior 8
0x000A,0x38BD,0xFF06,0x0004,0xFF06,0x000E,0xFF05,0x000A,
0x38C9,0xFF06,0x0004,0xFF06,0x00BF,0xFF00,0xFF08,0xFF02
};
-static UINT16 bloodwar_mcu_4_1d[] = { // Warrior 2
+static const UINT16 bloodwar_mcu_4_1d[] = { // Warrior 2
0xFF08,0xFF02,0x0000,0xFF03,0x0400,0xFF01,0x0000,0xFF06,
0x01BF,0xFF06,0x0003,0x4401,0xFF06,0x0002,0x4401,0xFF05,
0x0001,0x340B,0xFF06,0x0000,0x4401,0xFF06,0x0005,0xFF04,
@@ -2180,7 +2180,7 @@ static UINT16 bloodwar_mcu_4_1d[] = { // Warrior 2
0xFF05,0x0007,0x2070,0xFF06,0x0003,0xFF06,0x009F,0xFF00,
0xFF08,0xFF02,0x0000,0xFF03,0x0400,0xFF01,0x0200,0xFF06
};
-static UINT16 bloodwar_mcu_4_1e[] = { // Warrior 3
+static const UINT16 bloodwar_mcu_4_1e[] = { // Warrior 3
0xFF08,0xFF02,0x0000,0xFF03,0x0400,0xFF01,0x0200,0xFF06,
0x01BF,0xFF05,0x000F,0x2C01,0xFF05,0x000F,0x2C01,0xFF05,
0x000F,0x2C11,0xFF05,0x000F,0x2C11,0xFF05,0x0001,0x3C27,
@@ -2319,7 +2319,7 @@ static UINT16 bloodwar_mcu_4_1e[] = { // Warrior 3
0x007F,0xFF00,0xFF08,0xFF02,0x0000,0xFF03,0x0200,0xFF01
};
-static UINT16 bloodwar_mcu_4_1f[] = { // Warrior 5
+static const UINT16 bloodwar_mcu_4_1f[] = { // Warrior 5
0xFF08,0xFF02,0x0000,0xFF03,0x0200,0xFF01,0x0800,0xFF06,
0x01BF,0xFF06,0x007F,0xFF06,0x0009,0xFF05,0x0002,0x2801,
0xFF05,0x0004,0x3429,0xFF06,0x0000,0xFF05,0x0002,0x342E,
@@ -2402,7 +2402,7 @@ static UINT16 bloodwar_mcu_4_1f[] = { // Warrior 5
0xFF05,0x0001,0x2C6B,0x2C6A,0xFF06,0x000C,0xFF05,0x0001,
0x2C6B,0x2C6A,0xFF06,0x0006,0xFF06,0x003F,0xFF00,0xFF08
};
-static UINT16 bloodwar_mcu_4_20[] = { // Warrior 4
+static const UINT16 bloodwar_mcu_4_20[] = { // Warrior 4
0xFF08,0xFF02,0x0000,0xFF03,0x0400,0xFF01,0x1100,0xFF06,
0x01BF,0xFF06,0x00DF,0xFF06,0x0001,0xFF04,0x0002,0xFF09,
0x0001,0x2402,0xFF04,0x0000,0xFF06,0x0017,0xFF05,0x0001,
@@ -2477,7 +2477,7 @@ static UINT16 bloodwar_mcu_4_20[] = { // Warrior 4
0x2111,0xFF05,0x000F,0x2111,0xFF05,0x000F,0x2121,0xFF05,
0x000F,0x2121,0xFF06,0x013F,0xFF00,0xFF08,0xFF02,0x0000
};
-static UINT16 bloodwar_mcu_4_21[] = { // Warrior 6
+static const UINT16 bloodwar_mcu_4_21[] = { // Warrior 6
0xFF08,0xFF02,0x0000,0xFF03,0x0400,0xFF01,0x0F00,0xFF06,
0x01BF,0xFF06,0x005F,0xFF06,0x000F,0x4401,0xFF06,0x000E,
0xFF06,0x000C,0xFF05,0x0005,0x4402,0xFF06,0x000C,0xFF06,
@@ -2641,7 +2641,7 @@ static UINT16 bloodwar_mcu_4_21[] = { // Warrior 6
0x30EF,0xFF05,0x000F,0x3141,0xFF05,0x000F,0x3101,0xFF05,
0x000F,0x3151,0xFF05,0x000F,0x3111,0xFF00,0xFF08,0xFF02
};
-static UINT16 bloodwar_mcu_4_22[] = { // Warrior 1
+static const UINT16 bloodwar_mcu_4_22[] = { // Warrior 1
0xFF08,0xFF02,0x0000,0xFF03,0x0300,0xFF01,0x0B00,0xFF06,
0x01BF,0xFF06,0x0001,0x3401,0xFF06,0x0000,0xFF05,0x0002,
0x3402,0xFF06,0x0010,0xFF05,0x0001,0x3440,0xFF06,0x0001,
@@ -2764,7 +2764,7 @@ static UINT16 bloodwar_mcu_4_22[] = { // Warrior 1
0x0005,0xFF05,0x0006,0x2CF7,0xFF06,0x0008,0xFF05,0x0006,
0x2CF7,0xFF06,0x0002,0xFF06,0x007F,0xFF00,0xFF08,0xFF02
};
-static UINT16 bloodwar_mcu_4_23[] = { // Warrior 9
+static const UINT16 bloodwar_mcu_4_23[] = { // Warrior 9
0xFF08,0xFF02,0x0000,0xFF03,0x0400,0xFF01,0x0A00,0xFF06,
0x01BF,0xFF06,0x0006,0xFF05,0x0001,0x3C88,0xFF06,0x0005,
0xFF05,0x0001,0x4001,0xFF06,0x0005,0xFF04,0x0002,0xFF09,
@@ -2926,7 +2926,7 @@ static UINT16 bloodwar_mcu_4_23[] = { // Warrior 9
0xFF05,0x0007,0x2881,0xFF05,0x0007,0x2881,0xFF05,0x0007,
0x2881,0xFF05,0x0007,0x2881,0xFF06,0x007F,0xFF00,0xFF08
};
-static UINT16 bloodwar_mcu_4_24[] = { // Warrior 7
+static const UINT16 bloodwar_mcu_4_24[] = { // Warrior 7
0xFF08,0xFF02,0x0000,0xFF03,0x0400,0xFF01,0x0300,0xFF06,
0x01BF,0xFF06,0x0000,0x3402,0xFF05,0x0005,0x4C14,0x3402,
0xFF05,0x0006,0x4C14,0xFF05,0x0006,0x4C14,0xFF04,0x0002,
@@ -3041,7 +3041,7 @@ static UINT16 bloodwar_mcu_4_24[] = { // Warrior 7
};
// --- fighter data: pointers to ROM ---
-static UINT16 bloodwar_mcu_4_25[] = { // Warrior 1
+static const UINT16 bloodwar_mcu_4_25[] = { // Warrior 1
0x0007,0x2B72,0x0007,0x2B9E,0x0007,0x2C52,0x0007,0x2D36,
0x0007,0x3584,0x0007,0x2E3A,0x0007,0x2E54,0x0007,0x2E74,
0x0007,0x2F28,0x0007,0x3022,0x0007,0x35A0,0x0007,0x377C,
@@ -3113,7 +3113,7 @@ static UINT16 bloodwar_mcu_4_25[] = { // Warrior 1
0x0007,0x862A,0x0007,0x8644,0x0007,0x869C,0x0007,0x86A6,
0x0007,0xCC3C,0x0007,0xCC68,0x0007,0xCD1C,0x0007,0xCD9A
};
-static UINT16 bloodwar_mcu_4_26[] = { // Warrior 2
+static const UINT16 bloodwar_mcu_4_26[] = { // Warrior 2
0x000B,0xB188,0x000B,0xB1C0,0x000B,0xB308,0x000B,0xB590,
0x000B,0xCF38,0x000B,0xBA00,0x000B,0xBA1A,0x000B,0xBA3A,
0x000B,0xBE62,0x000B,0xC4AA,0x000B,0xCF54,0x000B,0xD130,
@@ -3181,7 +3181,7 @@ static UINT16 bloodwar_mcu_4_26[] = { // Warrior 2
0x000C,0x1F4A,0x000C,0x1F5E,0x000C,0x1FC2,0x000C,0x1FCC,
0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF
};
-static UINT16 bloodwar_mcu_4_27[] = { // Warrior 3
+static const UINT16 bloodwar_mcu_4_27[] = { // Warrior 3
0x0008,0x631C,0x0008,0x6348,0x0008,0x63EC,0x0008,0x6494,
0x0008,0x6C5C,0x0008,0x6598,0x0008,0x65B2,0x0008,0x65D2,
0x0008,0x6676,0x0008,0x674A,0x0008,0x6C78,0x0008,0x6E54,
@@ -3254,7 +3254,7 @@ static UINT16 bloodwar_mcu_4_27[] = { // Warrior 3
0x0008,0xB786,0x0008,0xB8F0,0x0008,0xB912,0x0008,0xB93A,
0x0008,0xF128,0x0008,0xF148,0x0008,0xF1EC,0x0008,0xF2AA
};
-static UINT16 bloodwar_mcu_4_28[] = { // Warrior 4
+static const UINT16 bloodwar_mcu_4_28[] = { // Warrior 4
0x0008,0xF128,0x0008,0xF148,0x0008,0xF1EC,0x0008,0xF2AA,
0x0008,0xFA80,0x0008,0xF3AA,0x0008,0xF3C4,0x0008,0xF3E4,
0x0008,0xF4A8,0x0008,0xF56C,0x0008,0xFA9C,0x0008,0xFC78,
@@ -3325,7 +3325,7 @@ static UINT16 bloodwar_mcu_4_28[] = { // Warrior 4
0x0009,0x4A2A,0x0009,0x81A8,0x0009,0x81C8,0x0009,0x8270
};
-static UINT16 bloodwar_mcu_4_29[] = { // Warrior 5
+static const UINT16 bloodwar_mcu_4_29[] = { // Warrior 5
0x0007,0xCC3C,0x0007,0xCC68,0x0007,0xCD1C,0x0007,0xCD9A,
0x0007,0xD616,0x0007,0xCE38,0x0007,0xCE52,0x0007,0xCE72,
0x0007,0xCF16,0x0007,0xCFAA,0x0007,0xD632,0x0007,0xD80E,
@@ -3396,7 +3396,7 @@ static UINT16 bloodwar_mcu_4_29[] = { // Warrior 5
0x0008,0x1E9A,0x0008,0x1EAC,0x0008,0x631C,0x0008,0x6348
};
-static UINT16 bloodwar_mcu_4_2a[] = { // Warrior 6
+static const UINT16 bloodwar_mcu_4_2a[] = { // Warrior 6
0x000A,0x0E3C,0x000A,0x0E5C,0x000A,0x0F00,0x000A,0x0FA8,
0x000A,0x16E2,0x000A,0x105C,0x000A,0x1076,0x000A,0x1096,
0x000A,0x113A,0x000A,0x11DE,0x000A,0x16FE,0x000A,0x18DA,
@@ -3465,7 +3465,7 @@ static UINT16 bloodwar_mcu_4_2a[] = { // Warrior 6
0x000A,0x62DA,0x000A,0x62A0,0x000A,0x62B4,0x000A,0x631E,
0x000A,0x6338,0x000A,0x94A4,0x000A,0x94C4,0x000A,0x9568
};
-static UINT16 bloodwar_mcu_4_2b[] = { // Warrior 7
+static const UINT16 bloodwar_mcu_4_2b[] = { // Warrior 7
0x000A,0x94A4,0x000A,0x94C4,0x000A,0x9568,0x000A,0x9646,
0x000A,0x9DFC,0x000A,0x9746,0x000A,0x9760,0x000A,0x9780,
0x000A,0x9824,0x000A,0x98C8,0x000A,0x9E18,0x000A,0x9FF4,
@@ -3533,7 +3533,7 @@ static UINT16 bloodwar_mcu_4_2b[] = { // Warrior 7
0x000A,0xF31E,0x000A,0xF344,0x000A,0xF39C,0x000A,0xF3A6,
0x000B,0x272C,0x000B,0x274C,0x000B,0x284C,0x000B,0x2924
};
-static UINT16 bloodwar_mcu_4_2c[] = { // Warrior 8
+static const UINT16 bloodwar_mcu_4_2c[] = { // Warrior 8
0x000B,0x272C,0x000B,0x274C,0x000B,0x284C,0x000B,0x2924,
0x000B,0x3242,0x000B,0x2A0E,0x000B,0x2A28,0x000B,0x2A48,
0x000B,0x2B4C,0x000B,0x2C1A,0x000B,0x325E,0x000B,0x343A,
@@ -3602,7 +3602,7 @@ static UINT16 bloodwar_mcu_4_2c[] = { // Warrior 8
0x000B,0x80C8,0x000B,0x808E,0x000B,0x80A2,0x000B,0x811C,
0x000B,0x813E,0x000B,0xB188,0x000B,0xB1C0,0x000B,0xB308
};
-static UINT16 bloodwar_mcu_4_2d[] = { // Warrior 9
+static const UINT16 bloodwar_mcu_4_2d[] = { // Warrior 9
0x0009,0x81A8,0x0009,0x81C8,0x0009,0x8270,0x0009,0x8328,
0x0009,0x8A98,0x0009,0x8416,0x0009,0x8430,0x0009,0x8450,
0x0009,0x84E8,0x0009,0x8580,0x0009,0x8AB4,0x0009,0x8C90,
diff --git a/src/mame/machine/leland.c b/src/mame/machine/leland.c
index fc38517e319..fb62d16167b 100644
--- a/src/mame/machine/leland.c
+++ b/src/mame/machine/leland.c
@@ -676,7 +676,7 @@ void ataxx_bankswitch(void)
void leland_init_eeprom(UINT8 default_val, const UINT16 *data, UINT8 serial_offset, UINT8 serial_type)
{
- static struct EEPROM_interface eeprom_interface =
+ static const struct EEPROM_interface eeprom_interface =
{
6,
16,
@@ -769,7 +769,7 @@ void leland_init_eeprom(UINT8 default_val, const UINT16 *data, UINT8 serial_offs
void ataxx_init_eeprom(UINT8 default_val, const UINT16 *data, UINT8 serial_offset)
{
- static struct EEPROM_interface eeprom_interface =
+ static const struct EEPROM_interface eeprom_interface =
{
7,
16,
diff --git a/src/mame/machine/scramble.c b/src/mame/machine/scramble.c
index dfb2321cf0c..5dc2aae78ee 100644
--- a/src/mame/machine/scramble.c
+++ b/src/mame/machine/scramble.c
@@ -288,7 +288,7 @@ WRITE8_HANDLER( hunchbks_mirror_w )
}
-static ppi8255_interface ppi8255_intf =
+static const ppi8255_interface ppi8255_intf =
{
2, /* 2 chips */
{input_port_0_r, 0}, /* Port A read */
@@ -300,7 +300,7 @@ static ppi8255_interface ppi8255_intf =
};
/* extra chip for sample latch */
-static ppi8255_interface sfx_ppi8255_intf =
+static const ppi8255_interface sfx_ppi8255_intf =
{
3, /* 3 chips */
{input_port_0_r, 0, soundlatch2_r}, /* Port A read */
@@ -312,7 +312,7 @@ static ppi8255_interface sfx_ppi8255_intf =
};
/* extra chip for sample latch */
-static ppi8255_interface monsterz_ppi8255_intf =
+static const ppi8255_interface monsterz_ppi8255_intf =
{
3, /* 3 chips */
{input_port_0_r, 0, 0}, /* Port A read */
diff --git a/src/mame/machine/simpsons.c b/src/mame/machine/simpsons.c
index 1556b2359cf..cc9946c1fdf 100644
--- a/src/mame/machine/simpsons.c
+++ b/src/mame/machine/simpsons.c
@@ -19,7 +19,7 @@ int simpsons_firq_enabled;
static int init_eeprom_count;
-static struct EEPROM_interface eeprom_interface =
+static const struct EEPROM_interface eeprom_interface =
{
7, /* address bits */
8, /* data bits */
diff --git a/src/mame/machine/slapstic.c b/src/mame/machine/slapstic.c
index 189b23d50a0..12183a1075f 100644
--- a/src/mame/machine/slapstic.c
+++ b/src/mame/machine/slapstic.c
@@ -278,7 +278,7 @@ enum state_type
*************************************/
/* slapstic 137412-101: Empire Strikes Back/Tetris (NOT confirmed) */
-static struct slapstic_data slapstic101 =
+static const struct slapstic_data slapstic101 =
{
/* basic banking */
3, /* starting bank */
@@ -305,7 +305,7 @@ static struct slapstic_data slapstic101 =
/* slapstic 137412-103: Marble Madness (confirmed) */
-static struct slapstic_data slapstic103 =
+static const struct slapstic_data slapstic103 =
{
/* basic banking */
3, /* starting bank */
@@ -332,7 +332,7 @@ static struct slapstic_data slapstic103 =
/* slapstic 137412-104: Gauntlet (confirmed) */
-static struct slapstic_data slapstic104 =
+static const struct slapstic_data slapstic104 =
{
/* basic banking */
3, /* starting bank */
@@ -359,7 +359,7 @@ static struct slapstic_data slapstic104 =
/* slapstic 137412-105: Indiana Jones/Paperboy (confirmed) */
-static struct slapstic_data slapstic105 =
+static const struct slapstic_data slapstic105 =
{
/* basic banking */
3, /* starting bank */
@@ -386,7 +386,7 @@ static struct slapstic_data slapstic105 =
/* slapstic 137412-106: Gauntlet II (confirmed) */
-static struct slapstic_data slapstic106 =
+static const struct slapstic_data slapstic106 =
{
/* basic banking */
3, /* starting bank */
@@ -413,7 +413,7 @@ static struct slapstic_data slapstic106 =
/* slapstic 137412-107: Peter Packrat/Xybots/2p Gauntlet/720 (confirmed) */
-static struct slapstic_data slapstic107 =
+static const struct slapstic_data slapstic107 =
{
/* basic banking */
3, /* starting bank */
@@ -440,7 +440,7 @@ static struct slapstic_data slapstic107 =
/* slapstic 137412-108: Road Runner/Super Sprint (confirmed) */
-static struct slapstic_data slapstic108 =
+static const struct slapstic_data slapstic108 =
{
/* basic banking */
3, /* starting bank */
@@ -467,7 +467,7 @@ static struct slapstic_data slapstic108 =
/* slapstic 137412-109: Championship Sprint/Road Blasters (confirmed) */
-static struct slapstic_data slapstic109 =
+static const struct slapstic_data slapstic109 =
{
/* basic banking */
3, /* starting bank */
@@ -494,7 +494,7 @@ static struct slapstic_data slapstic109 =
/* slapstic 137412-110: Road Blasters/APB (confirmed) */
-static struct slapstic_data slapstic110 =
+static const struct slapstic_data slapstic110 =
{
/* basic banking */
3, /* starting bank */
@@ -528,7 +528,7 @@ static struct slapstic_data slapstic110 =
*************************************/
/* slapstic 137412-111: Pit Fighter (confirmed) */
-static struct slapstic_data slapstic111 =
+static const struct slapstic_data slapstic111 =
{
/* basic banking */
0, /* starting bank */
@@ -554,7 +554,7 @@ static struct slapstic_data slapstic111 =
/* slapstic 137412-112: Pit Fighter (Japan) (confirmed) */
-static struct slapstic_data slapstic112 =
+static const struct slapstic_data slapstic112 =
{
/* basic banking */
0, /* starting bank */
@@ -580,7 +580,7 @@ static struct slapstic_data slapstic112 =
/* slapstic 137412-113: Unknown (Europe) (confirmed) */
-static struct slapstic_data slapstic113 =
+static const struct slapstic_data slapstic113 =
{
/* basic banking */
0, /* starting bank */
@@ -606,7 +606,7 @@ static struct slapstic_data slapstic113 =
/* slapstic 137412-114: Unknown (Europe) (unconfirmed) */
-static struct slapstic_data slapstic114 =
+static const struct slapstic_data slapstic114 =
{
/* basic banking */
0, /* starting bank */
@@ -632,7 +632,7 @@ static struct slapstic_data slapstic114 =
/* slapstic 137412-115: Race Drivin' DSK board (confirmed) */
-static struct slapstic_data slapstic115 =
+static const struct slapstic_data slapstic115 =
{
/* basic banking */
0, /* starting bank */
@@ -658,7 +658,7 @@ static struct slapstic_data slapstic115 =
/* slapstic 137412-116: Hydra (confirmed) */
-static struct slapstic_data slapstic116 =
+static const struct slapstic_data slapstic116 =
{
/* basic banking */
0, /* starting bank */
@@ -684,7 +684,7 @@ static struct slapstic_data slapstic116 =
/* slapstic 137412-117: Race Drivin' main board (confirmed) */
-static struct slapstic_data slapstic117 =
+static const struct slapstic_data slapstic117 =
{
/* basic banking */
0, /* starting bank */
@@ -710,7 +710,7 @@ static struct slapstic_data slapstic117 =
/* slapstic 137412-118: Rampart/Vindicators II (confirmed) */
-static struct slapstic_data slapstic118 =
+static const struct slapstic_data slapstic118 =
{
/* basic banking */
0, /* starting bank */
@@ -743,7 +743,7 @@ static struct slapstic_data slapstic118 =
*************************************/
/* master table */
-static struct slapstic_data *slapstic_table[] =
+static const struct slapstic_data *const slapstic_table[] =
{
&slapstic101, /* NOT confirmed! */
NULL, /* never seen */
diff --git a/src/mame/machine/steppers.c b/src/mame/machine/steppers.c
index f680079d93f..6566ef41a21 100644
--- a/src/mame/machine/steppers.c
+++ b/src/mame/machine/steppers.c
@@ -346,7 +346,7 @@ static const int BarcrestStepTab[] =
0, //0001->0110 1->6
0, //0001->0111 1->7
0, //0001->1000 1->8
- -1, //0001->1001 1->9
+ -1,//0001->1001 1->9
0, //0001->1010 1->A
0, //0001->1011 1->B
0, //0001->1100 1->C
@@ -357,14 +357,14 @@ static const int BarcrestStepTab[] =
0, //0010->0000 2->0
0, //0010->0001 2->1
0, //0010->0010 2->2
- -1, //0010->0011 2->3
+ -1,//0010->0011 2->3
0, //0010->0100 2->4
0, //0010->0101 2->5
1, //0010->0110 2->6
0, //0010->0111 2->7
- 0,//0010->1000 2->8
+ 0, //0010->1000 2->8
0, //0010->1001 2->9
- 0,//0010->1010 2->A
+ 0, //0010->1010 2->A
0, //0010->1011 2->B
0, //0010->1100 2->C
0, //0010->1101 2->D
@@ -372,7 +372,7 @@ static const int BarcrestStepTab[] =
0, //0010->1111 2->F
0, //0011->0000 3->0
- -1, //0011->0001 3->1
+ -1,//0011->0001 3->1
1, //0011->0010 3->2
0, //0011->0011 3->3
0, //0011->0100 3->4
@@ -380,7 +380,7 @@ static const int BarcrestStepTab[] =
2, //0011->0110 3->6
0, //0011->0111 3->7
0, //0011->1000 3->8
- -2, //0011->1001 3->9
+ -2,//0011->1001 3->9
0, //0011->1010 3->A
0, //0011->1011 3->B
0, //0011->1100 3->C
@@ -390,7 +390,7 @@ static const int BarcrestStepTab[] =
0, //0100->0000 4->0
0, //0100->0001 4->1
- 0,//0100->0010 4->2
+ 0, //0100->0010 4->2
0, //0100->0011 4->3
0, //0100->0100 4->4
0, //0100->0101 4->5
@@ -409,9 +409,9 @@ static const int BarcrestStepTab[] =
0, //0101->0001 5->1
0, //0101->0010 5->2
0, //0101->0011 5->3
- 0,//0101->0100 5->4
+ 0, //0101->0100 5->4
0, //0101->0101 5->5
- 0,//0101->0110 5->6
+ 0, //0101->0110 5->6
0, //0101->0111 5->7
0, //0101->1000 5->8
0, //0101->1001 5->9
@@ -432,7 +432,7 @@ static const int BarcrestStepTab[] =
0, //0110->0111 6->7
0, //0110->1000 6->8
0, //0110->1001 6->9
- 0,//0110->1010 6->A
+ 0, //0110->1010 6->A
0, //0110->1011 6->B
2, //0110->1100 6->C
0, //0110->1101 6->D
@@ -457,7 +457,7 @@ static const int BarcrestStepTab[] =
0, //0111->1111 7->F
0, //1000->0000 8->0
- 0,//1000->0001 8->1
+ 0, //1000->0001 8->1
0, //1000->0010 8->2
0, //1000->0011 8->3
0, //1000->0100 8->4
@@ -468,7 +468,7 @@ static const int BarcrestStepTab[] =
1, //1000->1001 8->9
0, //1000->1010 8->A
0, //1000->1011 8->B
- -1, //1000->1100 8->C
+ -1,//1000->1100 8->C
0, //1000->1101 8->D
0, //1000->1110 8->E
0, //1000->1111 8->F
@@ -478,14 +478,14 @@ static const int BarcrestStepTab[] =
0, //1001->0010 9->2
2, //1001->0011 9->3
0, //1001->0100 9->4
- 0,//1001->0101 9->5
+ 0, //1001->0101 9->5
0, //1001->0110 9->6
0, //1001->0111 9->7
- -1, //1001->1000 9->8
+ -1,//1001->1000 9->8
0, //1001->1001 9->9
0, //1001->1010 9->A
0, //1001->1011 9->B
- -2, //1001->1100 9->C
+ -2,//1001->1100 9->C
0, //1001->1101 9->D
0, //1001->1110 9->E
0, //1001->1111 9->F
@@ -498,8 +498,8 @@ static const int BarcrestStepTab[] =
0, //1010->0101 A->5
0, //1010->0110 A->6
0, //1010->0111 A->7
- 0,//1010->1000 A->8
- 0,//1010->1001 A->9
+ 0, //1010->1000 A->8
+ 0, //1010->1001 A->9
0, //1010->1010 A->A
0, //1010->1011 A->B
0, //1010->1100 A->C
@@ -528,9 +528,9 @@ static const int BarcrestStepTab[] =
0, //1100->0001 C->1
0, //1100->0010 C->2
0, //1100->0011 C->3
- -1, //1100->0100 C->4
+ -1,//1100->0100 C->4
0, //1100->0101 C->5
- -2, //1100->0110 C->6
+ -2,//1100->0110 C->6
0, //1100->0111 C->7
1, //1100->1000 C->8
2, //1100->1001 C->9
@@ -605,20 +605,18 @@ void Stepper_init(int id, int type)
steppers[id].pattern = 0;
steppers[id].old_pattern = 0;
steppers[id].step_pos = 0;
- steppers[id].max_steps = (48*2)-1;
+ steppers[id].max_steps = (48*2);
steppers[id].type = type;
switch ( steppers[id].type )
{
- case STEPPER_48STEP_REEL : // STARPOINT RMxxx
+ case STARPOINT_48STEP_REEL : // STARPOINT RMxxx
break;
- case BARCREST_48STEP_REEL : // Barcrest reel units have different coil windings
- steppers[id].index_pos = 0;
- steppers[id].index_len = 16;
- steppers[id].index_patt = 0x09;
+ case BARCREST_48STEP_REEL : // Barcrest reel units have different coil windings and optic tabs
+ Stepper_set_index(id,0,16,0x09);
break;
- case STEPPER_144STEPS_DICE : // STARPOINT 1DCU DICE mechanism
- steppers[id].max_steps = (144*2)-1;
+ case STARPOINT_144STEPS_DICE :// STARPOINT 1DCU DICE mechanism
+ steppers[id].max_steps = (144*2);
break;
}
state_save_register_item("Stepper", id, steppers[id].index_pos);
@@ -636,8 +634,8 @@ void Stepper_init(int id, int type)
void Stepper_set_index(int id,int position,int length,int pattern)
{
steppers[id].index_pos = position;//location of first index value in half steps
- steppers[id].index_len = length;//number of half steps the index lasts
- steppers[id].index_patt = pattern;//hex value of coil pattern
+ steppers[id].index_len = length; //number of half steps the index lasts
+ steppers[id].index_patt = pattern; //hex value of coil pattern
}
int Stepper_get_position(int id)
@@ -719,11 +717,11 @@ int Stepper_update(int id, UINT8 pattern)
switch ( steppers[id].type )
{
default:
- case STEPPER_48STEP_REEL : // STARPOINT RMxxx
- case STEPPER_144STEPS_DICE : // STARPOINT 1DCU DICE mechanism
+ case STARPOINT_48STEP_REEL : // STARPOINT RMxxx
+ case STARPOINT_144STEPS_DICE : // STARPOINT 1DCU DICE mechanism
steps = StarpointStepTab[ index ];
break;
- case BARCREST_48STEP_REEL : // Barcrest reel units have different optics
+ case BARCREST_48STEP_REEL : // Barcrest reel units have different windings
steps = BarcrestStepTab[ index ];
break;
}
diff --git a/src/mame/machine/steppers.h b/src/mame/machine/steppers.h
index ad6094be1f8..b33da923a56 100644
--- a/src/mame/machine/steppers.h
+++ b/src/mame/machine/steppers.h
@@ -18,11 +18,11 @@
#ifndef INC_STEPPERS
#define INC_STEPPERS
-#define MAX_STEPPERS 16 // maximum number of steppers
+#define MAX_STEPPERS 8 // maximum number of steppers
-#define STEPPER_48STEP_REEL 0 // STARPOINT RMXXX reel unit
-#define BARCREST_48STEP_REEL 1 // Barcrest bespoke reel unit
-#define STEPPER_144STEPS_DICE 2 // STARPOINT 1DCU DICE mechanism - tech sheet available on request
+#define STARPOINT_48STEP_REEL 0 // STARPOINT RMXXX reel unit
+#define BARCREST_48STEP_REEL 1 // Barcrest bespoke reel unit
+#define STARPOINT_144STEPS_DICE 2 // STARPOINT 1DCU DICE mechanism - tech sheet available on request
void Stepper_init( int id, int type); // init a stepper motor
diff --git a/src/mame/machine/strtheat.c b/src/mame/machine/strtheat.c
index 8c888c9b1e7..0b9fd32df1a 100644
--- a/src/mame/machine/strtheat.c
+++ b/src/mame/machine/strtheat.c
@@ -180,6 +180,9 @@ static READ8_HANDLER( strtheat_inputport_1_r )
DRIVER_INIT( strtheat )
{
+
+ memory_install_read8_handler(0, ADDRESS_SPACE_PROGRAM, 0x0000, 0x3fff, 0, 0, MRA8_BANK1 );
+
/* While the PAL supports up to 16 decryption methods, only four
are actually used in the PAL. Therefore, we'll take a little
memory overhead and decrypt the ROMs using each method in advance. */
diff --git a/src/mame/mame.mak b/src/mame/mame.mak
index 8a317959bf8..2449f6055d0 100644
--- a/src/mame/mame.mak
+++ b/src/mame/mame.mak
@@ -1513,6 +1513,7 @@ $(MAMEOBJ)/misc.a: \
$(DRIVERS)/dorachan.o \
$(DRIVERS)/dreamwld.o \
$(DRIVERS)/dribling.o $(VIDEO)/dribling.o \
+ $(DRIVERS)/drw80pkr.o \
$(DRIVERS)/dwarfd.o \
$(DRIVERS)/dynadice.o \
$(DRIVERS)/epos.o $(VIDEO)/epos.o \
diff --git a/src/mame/mamedriv.c b/src/mame/mamedriv.c
index 817985a5446..05a4f754825 100644
--- a/src/mame/mamedriv.c
+++ b/src/mame/mamedriv.c
@@ -1701,6 +1701,7 @@ const game_driver * const drivers[] =
DRIVER( slapshot ) /* D71 (c) 1994 Taito Corporation (Japan) */
DRIVER( opwolf3 ) /* D74 (c) 1994 Taito */
DRIVER( opwolf3u ) /* D74 (c) 1994 Taito */
+ DRIVER( scessjoe ) /* ??? (c) 1990 Wave / Taito */
DRIVER( ashnojoe ) /* ??? (c) 1990 Wave / Taito */
/* Taito multi-screen games */
@@ -2740,6 +2741,8 @@ V-V TP-027
DRIVER( glpracr3 ) /* Gallop Racer 3 (JAPAN) */
DRIVER( flamegun ) /* Flame Gunner (USA) */
DRIVER( flameguj ) /* Flame Gunner (JAPAN) */
+ DRIVER( tblkkuzu ) /* The Block Kuzushi (JAPAN) */
+ DRIVER( 1on1gov ) /* 1 on 1 Government (JAPAN) */
DRIVER( tecmowcm ) /* Tecmo World Cup Millenium (JAPAN) */
DRIVER( mfjump ) /* Monster Farm Jump (JAPAN) */
@@ -3271,8 +3274,8 @@ V-V TP-027
DRIVER( sscandal ) /* 834-5755 (c) 1985 Coreland / Sega (S1) */
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( shtngms1 ) /* 834-5719/5720 (c) 1985 (S2) */
+ DRIVER( shtngmsa ) /* 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) */
@@ -3679,7 +3682,9 @@ Sep.1994 Quiz Ghost Hunter
DRIVER( puyosun ) /* (c) 1996 Compile */
DRIVER( rsgun ) /* (c) 1998 Treasure */
DRIVER( sandor ) /* (c) 1995 */
+ DRIVER( sanjeon ) /* (c) 1999 Sega / Deniam */
DRIVER( thunt ) /* (c) 1995 Sega (Deniam License) */
+ DRIVER( thuntk ) /* (c) 1995 Sega (Deniam License) */
DRIVER( sasissu ) /* (c) 1992 */
DRIVER( seabass ) /* (c) 1998 A wave Inc (Able License) */
DRIVER( shanhigw ) /* (c) 1996 */
@@ -3689,6 +3694,7 @@ Sep.1994 Quiz Ghost Hunter
DRIVER( sss ) /* (c) 1998 Capcom / Cave / Victor */
DRIVER( suikoenb ) /* (c) 1995 Data East */
DRIVER( twcup98 ) /* (c) 1998 Techmo */
+ DRIVER( stress ) /* (c) 1997 Sega */
DRIVER( vfkids ) /* (c) 1995 */
DRIVER( vfremix ) /* (c) 1996 */
DRIVER( vmahjong ) /* (c) 1997 Micronet */
@@ -3703,6 +3709,7 @@ Sep.1994 Quiz Ghost Hunter
DRIVER( sfish2 ) /* (c) 1995 */
DRIVER( sfish2j ) /* (c) 1995 */
+ DRIVER( magzun ) /* (c) 1995 */
/* Sega Model 2 Games */
@@ -3916,7 +3923,7 @@ BOMULEUL CHAJARA SEGA ST-V 1997/04/11
/* 45 */
/* 46 */
DRIVER( mt_astrm ) /* 47 */
- /* 48 */
+ DRIVER( mt_wwar ) /* 48 */
DRIVER( mt_bbros ) /* 49 */
/* 50 */
/* 51 */
@@ -7868,5 +7875,6 @@ Other Sun games
DRIVER( jongkyo ) /* (c) 1985 Kiwako */
DRIVER( gtipoker ) /* (c) 1983 GTI Inc */
DRIVER( gamecstl ) /* MAME based bootleg */
+ DRIVER( drw80pkr )
#endif /* DRIVER_RECURSIVE */
diff --git a/src/mame/video/atari.c b/src/mame/video/atari.c
index a9fffa22d22..9f35c763909 100644
--- a/src/mame/video/atari.c
+++ b/src/mame/video/atari.c
@@ -93,7 +93,7 @@ static UINT32 tv_artifacts = 0;
* player/missile colors calculated for the first part (00-1F).
* The priorities of combining priority bits (which games use!) are:
************************************************************************/
-static UINT8 _pm_colors[32][8*2*8] = {
+static const UINT8 _pm_colors[32][8*2*8] = {
{
M0, PL0,P0, PL0,M1, PL1,P1, PL1,M2, PL2,P2, PL2,M3, PL3,P3, PL3, // 00
M0, PL0,P0, PL0,M1, PL1,P1, PL1,M2, PL2,P2, PL2,M3, PL3,P3, PL3,
@@ -423,7 +423,7 @@ static UINT8 _pm_colors[32][8*2*8] = {
static void prio_init(void)
{
int i, j, pm, p, c;
- UINT8 * prio;
+ const UINT8 * prio;
/* 32 priority bit combinations */
for( i = 0; i < 32; i++ )
diff --git a/src/mame/video/avgdvg.c b/src/mame/video/avgdvg.c
index 3e1755ca85f..30fcfacce94 100644
--- a/src/mame/video/avgdvg.c
+++ b/src/mame/video/avgdvg.c
@@ -263,8 +263,8 @@ static int dvg_dmald(vgdata *vg)
static void dvg_draw_to(int x, int y, int intensity)
{
if (((x | y) & 0x400) == 0)
- vg_add_point_buf(xcenter + ((x - 0x200) << 16),
- ycenter - ((y - 0x200) << 16),
+ vg_add_point_buf((xmin + x - 512) << 16,
+ (ymin + 512 - y) << 16,
VECTOR_COLOR111(7), intensity << 4);
}
@@ -1270,71 +1270,6 @@ MACHINE_RESET( avgdvg )
/*************************************
*
- * Vector generator init
- *
- ************************************/
-
-static VIDEO_START( avgdvg )
-{
- xmin = machine->screen[0].visarea.min_x;
- ymin = machine->screen[0].visarea.min_y;
- xmax = machine->screen[0].visarea.max_x;
- ymax = machine->screen[0].visarea.max_y;
-
- xcenter = ((xmax + xmin) / 2) << 16;
- ycenter = ((ymax + ymin) / 2) << 16;
-
- flip_x = flip_y = 0;
-
- 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
- * two's complement representation. The DAC input is xored with
- * 0x200 to convert the value to unsigned.
- */
- vg->xdac_xor = 0x200;
- vg->ydac_xor = 0x200;
-
- state_save_register_item("AVG", 0, vg->pc);
- state_save_register_item("AVG", 0, vg->sp);
- state_save_register_item("AVG", 0, vg->dvx);
- state_save_register_item("AVG", 0, vg->dvy);
- state_save_register_item("AVG", 0, vg->dvy12);
- state_save_register_item("AVG", 0, vg->timer);
- state_save_register_item_array("AVG", 0, vg->stack);
- state_save_register_item("AVG", 0, vg->data);
- state_save_register_item("AVG", 0, vg->state_latch);
- state_save_register_item("AVG", 0, vg->int_latch);
- state_save_register_item("AVG", 0, vg->scale);
- state_save_register_item("AVG", 0, vg->bin_scale);
- state_save_register_item("AVG", 0, vg->intensity);
- state_save_register_item("AVG", 0, vg->color);
- state_save_register_item("AVG", 0, vg->enspkl);
- state_save_register_item("AVG", 0, vg->spkl_shift);
- state_save_register_item("AVG", 0, vg->map);
- state_save_register_item("AVG", 0, vg->hst);
- state_save_register_item("AVG", 0, vg->lst);
- state_save_register_item("AVG", 0, vg->izblank);
- state_save_register_item("AVG", 0, vg->op);
- state_save_register_item("AVG", 0, vg->halt);
- state_save_register_item("AVG", 0, vg->sync_halt);
- state_save_register_item("AVG", 0, vg->xdac_xor);
- state_save_register_item("AVG", 0, vg->ydac_xor);
- state_save_register_item("AVG", 0, vg->xpos);
- state_save_register_item("AVG", 0, vg->ypos);
- state_save_register_item("AVG", 0, vg->clipx_min);
- state_save_register_item("AVG", 0, vg->clipy_min);
- state_save_register_item("AVG", 0, vg->clipx_max);
- state_save_register_item("AVG", 0, vg->clipy_max);
-
- video_start_vector(machine);
-}
-
-
-/*************************************
- *
* Configuration of VG variants
*
*************************************/
@@ -1468,56 +1403,126 @@ static vgconf avg_quantum =
/*************************************
*
- * Video startup
+ * Vector generator init
*
************************************/
+static void register_state (void)
+{
+ state_save_register_item("AVG", 0, vg->pc);
+ state_save_register_item("AVG", 0, vg->sp);
+ state_save_register_item("AVG", 0, vg->dvx);
+ state_save_register_item("AVG", 0, vg->dvy);
+ state_save_register_item("AVG", 0, vg->dvy12);
+ state_save_register_item("AVG", 0, vg->timer);
+ state_save_register_item_array("AVG", 0, vg->stack);
+ state_save_register_item("AVG", 0, vg->data);
+ state_save_register_item("AVG", 0, vg->state_latch);
+ state_save_register_item("AVG", 0, vg->int_latch);
+ state_save_register_item("AVG", 0, vg->scale);
+ state_save_register_item("AVG", 0, vg->bin_scale);
+ state_save_register_item("AVG", 0, vg->intensity);
+ state_save_register_item("AVG", 0, vg->color);
+ state_save_register_item("AVG", 0, vg->enspkl);
+ state_save_register_item("AVG", 0, vg->spkl_shift);
+ state_save_register_item("AVG", 0, vg->map);
+ state_save_register_item("AVG", 0, vg->hst);
+ state_save_register_item("AVG", 0, vg->lst);
+ state_save_register_item("AVG", 0, vg->izblank);
+ state_save_register_item("AVG", 0, vg->op);
+ state_save_register_item("AVG", 0, vg->halt);
+ state_save_register_item("AVG", 0, vg->sync_halt);
+ state_save_register_item("AVG", 0, vg->xdac_xor);
+ state_save_register_item("AVG", 0, vg->ydac_xor);
+ state_save_register_item("AVG", 0, vg->xpos);
+ state_save_register_item("AVG", 0, vg->ypos);
+ state_save_register_item("AVG", 0, vg->clipx_min);
+ state_save_register_item("AVG", 0, vg->clipy_min);
+ state_save_register_item("AVG", 0, vg->clipx_max);
+ state_save_register_item("AVG", 0, vg->clipy_max);
+}
+
+static VIDEO_START( avg_common )
+{
+ xmin = machine->screen[0].visarea.min_x;
+ ymin = machine->screen[0].visarea.min_y;
+ xmax = machine->screen[0].visarea.max_x;
+ ymax = machine->screen[0].visarea.max_y;
+
+ xcenter = ((xmax - xmin) / 2) << 16;
+ ycenter = ((ymax - ymin) / 2) << 16;
+
+ flip_x = flip_y = 0;
+
+ 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
+ * two's complement representation. The DAC input is xored with
+ * 0x200 to convert the value to unsigned.
+ */
+ vg->xdac_xor = 0x200;
+ vg->ydac_xor = 0x200;
+
+ register_state ();
+ video_start_vector(machine);
+}
+
VIDEO_START( dvg )
{
vgc = &dvg_default;
vg = &vgd;
- video_start_avgdvg(machine);
+
+ xmin = machine->screen[0].visarea.min_x;
+ ymin = machine->screen[0].visarea.min_y;
+
+ vg_halt_timer = timer_alloc(vg_set_halt_callback, NULL);
+ vg_run_timer = timer_alloc(run_state_machine, NULL);
+
+ register_state ();
+ video_start_vector(machine);
}
VIDEO_START( avg )
{
vgc = &avg_default;
vg = &vgd;
- video_start_avgdvg(machine);
+ video_start_avg_common(machine);
}
VIDEO_START( avg_starwars )
{
vgc = &avg_starwars;
vg = &vgd;
- video_start_avgdvg(machine);
+ video_start_avg_common(machine);
}
VIDEO_START( avg_tempest )
{
vgc = &avg_tempest;
vg = &vgd;
- video_start_avgdvg(machine);
+ video_start_avg_common(machine);
}
VIDEO_START( avg_mhavoc )
{
vgc = &avg_mhavoc;
vg = &vgd;
- video_start_avgdvg(machine);
+ video_start_avg_common(machine);
}
VIDEO_START( avg_bzone )
{
vgc = &avg_bzone;
vg = &vgd;
- video_start_avgdvg(machine);
+ video_start_avg_common(machine);
}
VIDEO_START( avg_quantum )
{
vgc = &avg_quantum;
vg = &vgd;
- video_start_avgdvg(machine);
+ video_start_avg_common(machine);
}
diff --git a/src/mame/video/cps1.c b/src/mame/video/cps1.c
index 0d7dcaf77ee..bb2b0d15813 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 */
};
-static struct CPS1config *cps1_game_config;
+static const 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}
@@ -262,7 +262,7 @@ static struct CPS1config *cps1_game_config;
#define HACK_B_1 0x00,0x0000, 0x00,0x00,0x00,0x00, 0x54,{0x52,0x50,0x4e,0x4c},0x5c, {0xff,0xff,0xff,0x00,0x00}
-static struct CPS1config cps1_config_table[]=
+static const struct CPS1config cps1_config_table[]=
{
/* name CPSB banks tile limits kludge */
{"forgottn",CPS_B_01, 0,0,0, 0x0000,0xffff,0x0000,0xffff, 7 },
@@ -430,7 +430,7 @@ void cps_setversion(int v)
static MACHINE_RESET( cps )
{
const char *gamename = machine->gamedrv->name;
- struct CPS1config *pCFG=&cps1_config_table[0];
+ const struct CPS1config *pCFG=&cps1_config_table[0];
while(pCFG->name)
{
diff --git a/src/mame/video/dkong.c b/src/mame/video/dkong.c
index 7f223290808..e7f5274c64b 100644
--- a/src/mame/video/dkong.c
+++ b/src/mame/video/dkong.c
@@ -15,38 +15,10 @@
#define RADARSCP_GRID_COL_OFFSET (RADARSCP_BCK_COL_OFFSET + 256)
#define RADARSCP_STAR_COL (RADARSCP_GRID_COL_OFFSET + 8)
-#define HW_TRS01 1
-#define HW_TRS02 2
-#define HW_DK4 4
-
-static tilemap *bg_tilemap;
-
-static mame_bitmap *bg_bits;
-static const UINT8 *color_codes;
-static emu_timer *scanline_timer;
-
static const double cd4049_vl = 1.5/5.0;
static const double cd4049_vh = 3.5/5.0;
static const double cd4049_al = 0.01;
-static UINT8 sig30Hz = 0;
-static UINT8 grid_sig = 0;
-static UINT8 rflip_sig = 0;
-static UINT8 star_ff = 0;
-
-static int blue_level = 0;
-static double cd4049_a, cd4049_b;
-
-/* Save state relevant */
-
-static UINT8 gfx_bank, palette_bank;
-static UINT8 grid_on;
-static UINT8 snd02_enable;
-static UINT8 sig_ansn;
-static UINT16 grid_col;
-static UINT8 vid_hw;
-static UINT8 sprite_bank;
-
/***************************************************************************
Convert the color PROMs into a more useable format.
@@ -156,6 +128,16 @@ static const res_net_info radarscp_net_info =
}
};
+static const res_net_info radarscp_net_bck_info =
+{
+ RES_NET_VCC_5V | RES_NET_VBIAS_TTL | RES_NET_VIN_MB7052 | RES_NET_MONITOR_SANYO_EZV20,
+ {
+ { RES_NET_AMP_DARLINGTON, 470, 0, 0, { 0 } },
+ { RES_NET_AMP_DARLINGTON, 470, 0, 0, { 0 } },
+ { RES_NET_AMP_DARLINGTON, 680, 150000, 0, { 0 } } // radarscp
+ }
+};
+
/*
radarsc1 interface
@@ -188,13 +170,13 @@ static const res_net_info radarscp_stars_net_info =
/* Dummy struct to generate background palette entries */
-static const res_net_info radarscp_bck_net_info =
+static const res_net_info radarscp_blue_net_info =
{
RES_NET_VCC_5V | RES_NET_VBIAS_5V | RES_NET_VIN_VCC | RES_NET_MONITOR_SANYO_EZV20,
{
- { RES_NET_AMP_DARLINGTON, 1, 0, 0, { 0 } }, // bias/gnd exist in schematics, but not readable
- { RES_NET_AMP_DARLINGTON, 1, 0, 0, { 0 } }, // bias/gnd exist in schematics, but not readable
- { RES_NET_AMP_DARLINGTON, 0, 0, 8, { 128,64,32,16,8,4,2,1 } }, // dummy
+ { RES_NET_AMP_DARLINGTON, 470, 4700, 0, { 0 } }, // bias/gnd exist in schematics, readable in TKG3 schematics
+ { RES_NET_AMP_DARLINGTON, 470, 4700, 0, { 0 } }, // bias/gnd exist in schematics, readable in TKG3 schematics
+ { RES_NET_AMP_DARLINGTON, 0, 0, 8, { 128,64,32,16,8,4,2,1 } }, // dummy
}
};
@@ -216,8 +198,9 @@ static const res_net_info radarscp_grid_net_info =
***************************************************************************/
-PALETTE_INIT( dkong )
+PALETTE_INIT( dkong2b)
{
+ dkong_state *state = Machine->driver_data;
rgb_t *rgb;
int i;
@@ -240,12 +223,51 @@ PALETTE_INIT( dkong )
color_prom += 512;
/* color_prom now points to the beginning of the character color codes */
- color_codes = color_prom; /* we'll need it later */
+ state->color_codes = color_prom; /* we'll need it later */
free(rgb);
}
+PALETTE_INIT( dkong4b )
+{
+ dkong_state *state = Machine->driver_data;
+ int i;
+ int r,g,b;
+
+ for (i = 0;i < 256;i++)
+ {
+
+ /* red component */
+ r = compute_res_net( (color_prom[256]>>1) & 0x07, 0, &radarscp_net_info );
+ /* green component */
+ g = compute_res_net( ((color_prom[256]<<2) & 0x04) | ((color_prom[0]>>2) & 0x03), 1, &radarscp_net_info );
+ /* blue component */
+ b = compute_res_net( (color_prom[0]>>0) & 0x03, 2, &radarscp_net_info );
+
+ palette_set_color_rgb(machine,i,r,g,b);
+ color_prom++;
+ }
+
+ /* Now treat tri-state black background generation */
+
+ for (i=0;i<256;i++)
+ if ( (i & 0x03) == 0x00 ) // NOR => CS=1 => Tristate => real black
+ {
+ r = compute_res_net( 1, 0, &radarscp_net_bck_info );
+ g = compute_res_net( 1, 1, &radarscp_net_bck_info );
+ b = compute_res_net( 1, 2, &radarscp_net_bck_info );
+ palette_set_color_rgb(machine,i,r,g,b);
+ }
+
+ palette_normalize_range(machine->palette, 0, 255, 0, 255);
+
+ color_prom += 256;
+ /* color_prom now points to the beginning of the character color codes */
+ state->color_codes = color_prom; /* we'll need it later */
+}
+
PALETTE_INIT( radarscp )
{
+ dkong_state *state = Machine->driver_data;
int i;
int r,g,b;
@@ -268,9 +290,9 @@ PALETTE_INIT( radarscp )
for (i=0;i<256;i++)
if ( (i & 0x03) == 0x00 ) // NOR => CS=1 => Tristate => real black
{
- r = compute_res_net( 1, 0, &dkong_net_bck_info );
- g = compute_res_net( 1, 1, &dkong_net_bck_info );
- b = compute_res_net( 1, 2, &dkong_net_bck_info );
+ r = compute_res_net( 1, 0, &radarscp_net_bck_info );
+ g = compute_res_net( 1, 1, &radarscp_net_bck_info );
+ b = compute_res_net( 1, 2, &radarscp_net_bck_info );
palette_set_color_rgb(machine,i,r,g,b);
}
@@ -283,9 +305,9 @@ PALETTE_INIT( radarscp )
/* Oscillating background */
for (i = 0;i < 256;i++)
{
- r = compute_res_net( 0, 0, &radarscp_bck_net_info );
- g = compute_res_net( 0, 1, &radarscp_bck_net_info );
- b = compute_res_net( i, 2, &radarscp_bck_net_info );
+ r = compute_res_net( 0, 0, &radarscp_blue_net_info );
+ g = compute_res_net( 0, 1, &radarscp_blue_net_info );
+ b = compute_res_net( i, 2, &radarscp_blue_net_info );
palette_set_color_rgb(machine,RADARSCP_BCK_COL_OFFSET + i,r,g,b);
}
@@ -299,21 +321,20 @@ PALETTE_INIT( radarscp )
palette_set_color_rgb(machine,RADARSCP_GRID_COL_OFFSET + i,r,g,b);
}
- palette_normalize_range(machine->palette, 0, RADARSCP_GRID_COL_OFFSET+7, 0, 255);
-
+ palette_normalize_range(machine->palette, 0, RADARSCP_GRID_COL_OFFSET+7, 0, 255);
color_prom += 256;
/* color_prom now points to the beginning of the character color codes */
- color_codes = color_prom; /* we'll need it later */
+ state->color_codes = color_prom; /* we'll need it later */
}
PALETTE_INIT( radarsc1 )
{
+ dkong_state *state = Machine->driver_data;
int i;
int r,g,b;
- printf("Here\n");
for (i = 0;i < 256;i++)
{
@@ -348,9 +369,9 @@ PALETTE_INIT( radarsc1 )
/* Oscillating background */
for (i = 0;i < 256;i++)
{
- r = compute_res_net( 0, 0, &radarscp_bck_net_info );
- g = compute_res_net( 0, 1, &radarscp_bck_net_info );
- b = compute_res_net( i, 2, &radarscp_bck_net_info );
+ r = compute_res_net( 0, 0, &radarscp_blue_net_info );
+ g = compute_res_net( 0, 1, &radarscp_blue_net_info );
+ b = compute_res_net( i, 2, &radarscp_blue_net_info );
palette_set_color_rgb(machine,RADARSCP_BCK_COL_OFFSET + i,r,g,b);
}
@@ -368,10 +389,11 @@ PALETTE_INIT( radarsc1 )
color_prom += 512;
/* color_prom now points to the beginning of the character color codes */
- color_codes = color_prom; /* we'll need it later */
+ state->color_codes = color_prom; /* we'll need it later */
}
+
/***************************************************************************
Convert the color PROMs into a more useable format.
@@ -409,7 +431,7 @@ PALETTE_INIT( radarsc1 )
PALETTE_INIT( dkong3 )
{
-
+ dkong_state *state = Machine->driver_data;
rgb_t *rgb;
rgb = compute_res_net_all(color_prom, &dkong3_decode_info, &dkong3_net_info);
@@ -419,22 +441,24 @@ PALETTE_INIT( dkong3 )
color_prom += 1024;
/* color_prom now points to the beginning of the character color codes */
- color_codes = color_prom; /* we'll need it later */
+ state->color_codes = color_prom; /* we'll need it later */
}
static TILE_GET_INFO( dkong_bg_tile_info )
{
- int code = videoram[tile_index] + 256 * gfx_bank;
- int color = (color_codes[tile_index % 32 + 32 * (tile_index / 32 / 4)] & 0x0f) + 0x10 * palette_bank;
+ dkong_state *state = machine->driver_data;
+ int code = videoram[tile_index] + 256 * state->gfx_bank;
+ int color = (state->color_codes[tile_index % 32 + 32 * (tile_index / 32 / 4)] & 0x0f) + 0x10 * state->palette_bank;
SET_TILE_INFO(0, code, color, 0);
}
static TILE_GET_INFO( radarsc1_bg_tile_info )
{
- int code = videoram[tile_index] + 256 * gfx_bank;
- int color = (color_codes[tile_index % 32] & 0x0f);
- color = color | (palette_bank<<4);
+ dkong_state *state = machine->driver_data;
+ int code = videoram[tile_index] + 256 * state->gfx_bank;
+ int color = (state->color_codes[tile_index % 32] & 0x0f);
+ color = color | (state->palette_bank<<4);
SET_TILE_INFO(0, code, color, 0);
}
@@ -447,68 +471,83 @@ static TILE_GET_INFO( radarsc1_bg_tile_info )
WRITE8_HANDLER( dkong_videoram_w )
{
+ dkong_state *state = Machine->driver_data;
+
if (videoram[offset] != data)
{
videoram[offset] = data;
- tilemap_mark_tile_dirty(bg_tilemap, offset);
+ tilemap_mark_tile_dirty(state->bg_tilemap, offset);
}
}
WRITE8_HANDLER( radarscp_snd02_w )
{
- snd02_enable = data & 0x01;
+ dkong_state *state = Machine->driver_data;
+
+ state->snd02_enable = data & 0x01;
}
WRITE8_HANDLER( radarsc1_ansn_w )
{
- sig_ansn = data & 0x01;
+ dkong_state *state = Machine->driver_data;
+
+ state->sig_ansn = data & 0x01;
}
WRITE8_HANDLER( dkongjr_gfxbank_w )
{
- if (gfx_bank != (data & 0x01))
+ dkong_state *state = Machine->driver_data;
+
+ if (state->gfx_bank != (data & 0x01))
{
- gfx_bank = data & 0x01;
- tilemap_mark_all_tiles_dirty(bg_tilemap);
+ state->gfx_bank = data & 0x01;
+ tilemap_mark_all_tiles_dirty(state->bg_tilemap);
}
}
WRITE8_HANDLER( dkong3_gfxbank_w )
{
- if (gfx_bank != (~data & 0x01))
+ dkong_state *state = Machine->driver_data;
+
+ if (state->gfx_bank != (~data & 0x01))
{
- gfx_bank = ~data & 0x01;
- tilemap_mark_all_tiles_dirty(bg_tilemap);
+ state->gfx_bank = ~data & 0x01;
+ tilemap_mark_all_tiles_dirty(state->bg_tilemap);
}
}
WRITE8_HANDLER( dkong_palettebank_w )
{
+ dkong_state *state = Machine->driver_data;
int newbank;
- newbank = palette_bank;
+ newbank = state->palette_bank;
if (data & 1)
newbank |= 1 << offset;
else
newbank &= ~(1 << offset);
- if (palette_bank != newbank)
+ if (state->palette_bank != newbank)
{
- palette_bank = newbank;
- tilemap_mark_all_tiles_dirty(bg_tilemap);
+ state->palette_bank = newbank;
+ tilemap_mark_all_tiles_dirty(state->bg_tilemap);
}
}
WRITE8_HANDLER( radarscp_grid_enable_w )
{
- grid_on = data & 0x01;
+ dkong_state *state = Machine->driver_data;
+
+ state->grid_on = data & 0x01;
}
WRITE8_HANDLER( radarscp_grid_color_w )
{
- grid_col = (data & 0x07) ^ 0x07;
- popmessage("Gridcol: %d", grid_col);
+ dkong_state *state = Machine->driver_data;
+
+ state->grid_col = (data & 0x07) ^ 0x07;
+ popmessage("Gridcol: %d", state->grid_col);
}
WRITE8_HANDLER( dkong_flipscreen_w )
@@ -518,7 +557,9 @@ WRITE8_HANDLER( dkong_flipscreen_w )
WRITE8_HANDLER( dkong_spritebank_w )
{
- sprite_bank = data & 0x01;
+ dkong_state *state = Machine->driver_data;
+
+ state->sprite_bank = data & 0x01;
}
/***************************************************************************
@@ -529,10 +570,11 @@ WRITE8_HANDLER( dkong_spritebank_w )
static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, UINT32 mask_bank, UINT32 shift_bits)
{
+ dkong_state *state = machine->driver_data;
int offs;
/* Draw the sprites. */
- for (offs = sprite_bank<<9;offs < (sprite_bank<<9) + spriteram_size; offs += 4)
+ for (offs = state->sprite_bank<<9;offs < (state->sprite_bank<<9) + 0x200 /* spriteram_size */; offs += 4)
{
if (spriteram[offs])
{
@@ -554,7 +596,7 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
drawgfx(bitmap,machine->gfx[1],
(spriteram[offs + 1] & 0x7f) + ((spriteram[offs + 2] & mask_bank) << shift_bits),
- (spriteram[offs + 2] & 0x0f) + 16 * palette_bank,
+ (spriteram[offs + 2] & 0x0f) + 16 * state->palette_bank,
!(spriteram[offs + 2] & 0x80),!(spriteram[offs + 1] & 0x80),
x,y,
cliprect,TRANSPARENCY_PEN,0);
@@ -562,7 +604,7 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
/* draw with wrap around - this fixes the 'beheading' bug */
drawgfx(bitmap,machine->gfx[1],
(spriteram[offs + 1] & 0x7f) + ((spriteram[offs + 2] & mask_bank) << shift_bits),
- (spriteram[offs + 2] & 0x0f) + 16 * palette_bank,
+ (spriteram[offs + 2] & 0x0f) + 16 * state->palette_bank,
(spriteram[offs + 2] & 0x80),(spriteram[offs + 1] & 0x80),
x-256,y,
cliprect,TRANSPARENCY_PEN,0);
@@ -571,7 +613,7 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
{
drawgfx(bitmap,machine->gfx[1],
(spriteram[offs + 1] & 0x7f) + ((spriteram[offs + 2] & mask_bank) << shift_bits),
- (spriteram[offs + 2] & 0x0f) + 16 * palette_bank,
+ (spriteram[offs + 2] & 0x0f) + 16 * state->palette_bank,
(spriteram[offs + 2] & 0x80),(spriteram[offs + 1] & 0x80),
x,y,
cliprect,TRANSPARENCY_PEN,0);
@@ -579,7 +621,7 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
/* draw with wrap around - this fixes the 'beheading' bug */
drawgfx(bitmap,machine->gfx[1],
(spriteram[offs + 1] & 0x7f) + ((spriteram[offs + 2] & mask_bank) << shift_bits),
- (spriteram[offs + 2] & 0x0f) + 16 * palette_bank,
+ (spriteram[offs + 2] & 0x0f) + 16 * state->palette_bank,
(spriteram[offs + 2] & 0x80),(spriteram[offs + 1] & 0x80),
x+256,y,
cliprect,TRANSPARENCY_PEN,0);
@@ -606,10 +648,12 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
* TODO: This should be part of the vblank routine
*/
-INLINE double CD4049(double x)
+INLINE double CD4049(running_machine *machine, double x)
{
+ dkong_state *state = machine->driver_data;
+
if (x>0)
- return exp(-cd4049_a * pow(x,cd4049_b));
+ return exp(-state->cd4049_a * pow(x,state->cd4049_b));
else
return 1.0;
}
@@ -618,8 +662,9 @@ INLINE double CD4049(double x)
* a period of roughly 4.4 ms
*/
-static void radarscp_step(int line_cnt)
+static void radarscp_step(running_machine *machine, int line_cnt)
{
+ dkong_state *state = machine->driver_data;
/* Condensator is illegible in schematics for TRS2 board.
* TRS1 board states 3.3u.
*/
@@ -649,11 +694,11 @@ static void radarscp_step(int line_cnt)
if (line_cnt>=512)
line_cnt=512-VTOTAL;
if ( ( !(line_cnt & 0x40) && ((line_cnt+1) & 0x40) ) && (mame_rand(Machine) > RAND_MAX/2))
- sig30Hz = (1-sig30Hz);
- rflip_sig = snd02_enable & sig30Hz;
- sig = rflip_sig ^ ((line_cnt & 0x80)>>7);
- if (vid_hw & HW_TRS01)
- rflip_sig = !rflip_sig;
+ state->sig30Hz = (1-state->sig30Hz);
+ state->rflip_sig = state->snd02_enable & state->sig30Hz;
+ sig = state->rflip_sig ^ ((line_cnt & 0x80)>>7);
+ if (state->hardware_type == HARDWARE_TRS01)
+ state->rflip_sig = !state->rflip_sig;
if (sig) // 128VF
diff = (0.0 - cv1);
else
@@ -666,18 +711,18 @@ static void radarscp_step(int line_cnt)
cv2 += diff;
vg1 = (cv1 - cv2)*0.9 + 0.1 * vg2;
- vg2 = 5*CD4049(vg1/5);
+ vg2 = 5*CD4049(machine, vg1/5);
/* on the real hardware, the gain would be 1.
* This will not work here.
*/
vg3i = 0.9*vg2 + 0.1 * vg3;
- vg3 = 5*CD4049(vg3i/5);
+ vg3 = 5*CD4049(machine, vg3i/5);
- blue_level = (int)(vg3/5.0*255);
+ state->blue_level = (int)(vg3/5.0*255);
// Grid signal
- if (grid_on && sig_ansn)
+ if (state->grid_on && state->sig_ansn)
{
diff = (0.0 - cv3);
diff = diff - diff*exp(0.0 - (1.0/RC32 * dt) );
@@ -693,16 +738,16 @@ static void radarscp_step(int line_cnt)
diff = diff - diff*exp(0.0 - (1.0/RC4 * dt) );
cv4 += diff;
- if (CD4049(CD4049(vg2 - cv4))>2.4/5.0) //TTL - Level
- grid_sig = 0;
+ if (CD4049(machine, CD4049(machine, vg2 - cv4))>2.4/5.0) //TTL - Level
+ state->grid_sig = 0;
else
- grid_sig = 1;
+ state->grid_sig = 1;
/* stars */
pixelcnt += HTOTAL;
if (pixelcnt > period2 )
{
- star_ff = !star_ff;
+ state->star_ff = !state->star_ff;
pixelcnt = pixelcnt - period2;
}
@@ -710,12 +755,13 @@ static void radarscp_step(int line_cnt)
static void radarscp_draw_background(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
{
+ dkong_state *state = machine->driver_data;
const UINT8 *htable = NULL;
int x,y;
UINT8 draw_ok;
UINT16 *pixel;
- if (vid_hw & HW_TRS01)
+ if (state->hardware_type == HARDWARE_TRS01)
htable = memory_region(REGION_GFX4);
y = machine->screen[0].visarea.min_y;
@@ -726,10 +772,10 @@ static void radarscp_draw_background(running_machine *machine, mame_bitmap *bitm
{
pixel = BITMAP_ADDR16(bitmap, y, x);
draw_ok = !(*pixel & 0x01) && !(*pixel & 0x02);
- if (vid_hw & HW_TRS01) // Check again from schematics
- draw_ok = draw_ok && !((htable[ (!rflip_sig<<7) | (x>>2)] >>2) & 0x01);
+ if (state->hardware_type == HARDWARE_TRS01) // Check again from schematics
+ draw_ok = draw_ok && !((htable[ (!state->rflip_sig<<7) | (x>>2)] >>2) & 0x01);
if (draw_ok)
- *pixel = *(BITMAP_ADDR16(bg_bits, y, x));
+ *pixel = *(BITMAP_ADDR16(state->bg_bits, y, x));
x++;
}
y++;
@@ -739,6 +785,7 @@ static void radarscp_draw_background(running_machine *machine, mame_bitmap *bitm
static TIMER_CALLBACK( scanline_callback )
{
+ dkong_state *state = machine->driver_data;
const UINT8 *table = memory_region(REGION_GFX3);
int table_len = memory_region_length(REGION_GFX3);
int x,y,offset;
@@ -747,123 +794,150 @@ static TIMER_CALLBACK( scanline_callback )
int scanline = param;
y = scanline;
- radarscp_step(y);
+ radarscp_step(machine, y);
if (y <= machine->screen[0].visarea.min_y || y > machine->screen[0].visarea.max_y)
counter = 0;
- offset = ((-flip_screen) ^ rflip_sig) ? 0x000 : 0x400;
+ offset = ((-flip_screen) ^ state->rflip_sig) ? 0x000 : 0x400;
x = 0;
while (x < machine->screen[0].width)
{
- pixel = BITMAP_ADDR16(bg_bits, y, x);
+ pixel = BITMAP_ADDR16(state->bg_bits, y, x);
if ((counter < table_len) && (x == 4 * (table[counter|offset] & 0x7f)))
{
- if ( star_ff && (table[counter|offset] & 0x80) ) /* star */
+ if ( state->star_ff && (table[counter|offset] & 0x80) ) /* star */
*pixel = machine->pens[RADARSCP_STAR_COL];
- else if (grid_sig && !(table[counter|offset] & 0x80)) /* radar */
- *pixel = machine->pens[RADARSCP_GRID_COL_OFFSET+grid_col];
+ else if (state->grid_sig && !(table[counter|offset] & 0x80)) /* radar */
+ *pixel = machine->pens[RADARSCP_GRID_COL_OFFSET+state->grid_col];
else
- *pixel = machine->pens[RADARSCP_BCK_COL_OFFSET + blue_level];
+ *pixel = machine->pens[RADARSCP_BCK_COL_OFFSET + state->blue_level];
counter++;
}
else
- *pixel = machine->pens[RADARSCP_BCK_COL_OFFSET + blue_level];
+ *pixel = machine->pens[RADARSCP_BCK_COL_OFFSET + state->blue_level];
x++;
}
while ((counter < table_len) && ( x < 4 * (table[counter|offset] & 0x7f)))
counter++;
scanline = (scanline+1) % VTOTAL;
/* come back at the next appropriate scanline */
- timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline, attotime_zero);
+ timer_adjust(state->scanline_timer, video_screen_get_time_until_pos(0, scanline, 0), scanline, attotime_zero);
}
-static VIDEO_START( dkong_base )
+static void check_palette(running_machine *machine)
{
+ dkong_state *state = machine->driver_data;
+ int newset;
+ int num;
- cd4049_b = (log(0.0 - log(cd4049_al)) - log(0.0 - log((1.0-cd4049_al))) ) / log(cd4049_vh/cd4049_vl);
- cd4049_a = log(0.0 - log(cd4049_al)) - cd4049_b * log(cd4049_vh);
-
- gfx_bank = 0;
- palette_bank = 0;
- sprite_bank = 0;
- sig_ansn = 1;
- vid_hw = HW_DK4;
-
- state_save_register_global(gfx_bank);
- state_save_register_global(palette_bank);
- state_save_register_global(sprite_bank);
- state_save_register_global(grid_on);
-
- state_save_register_global(snd02_enable);
- state_save_register_global(sig_ansn);
- state_save_register_global(grid_col);
-
- /* this must be registered here - hmmm */
- state_save_register_global(flip_screen);
-
+ num = port_tag_to_index("VIDHW");
+ if (num>=0)
+ {
+ newset = readinputport(num);
+ if (newset != state->vidhw)
+ {
+ state->vidhw = newset;
+ switch (newset)
+ {
+ case 0x00:
+ palette_init_radarscp(machine, (UINT16 *) machine->game_colortable, memory_region(REGION_PROMS));
+ break;
+ case 0x01:
+ palette_init_dkong2b(machine, (UINT16 *) machine->game_colortable, memory_region(REGION_PROMS));
+ break;
+ }
+ }
+ }
}
-VIDEO_START( dkong )
+static VIDEO_START( dkong_base )
{
+ dkong_state *state = machine->driver_data;
- video_start_dkong_base(machine);
+ state->cd4049_b = (log(0.0 - log(cd4049_al)) - log(0.0 - log((1.0-cd4049_al))) ) / log(cd4049_vh/cd4049_vl);
+ state->cd4049_a = log(0.0 - log(cd4049_al)) - state->cd4049_b * log(cd4049_vh);
- bg_tilemap = tilemap_create(dkong_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32);
- tilemap_set_scrolldx(bg_tilemap, 0, 128);
-}
+ state->gfx_bank = 0;
+ state->palette_bank = 0;
+ state->sprite_bank = 0;
+ state->sig_ansn = 1;
+ state->vidhw = -1;
-VIDEO_START( radarscp )
-{
+ state_save_register_global(state->gfx_bank);
+ state_save_register_global(state->palette_bank);
+ state_save_register_global(state->sprite_bank);
+ state_save_register_global(state->grid_on);
- video_start_dkong(machine);
+ state_save_register_global(state->snd02_enable);
+ state_save_register_global(state->sig_ansn);
+ state_save_register_global(state->grid_col);
- vid_hw = HW_TRS02;
-
- bg_bits = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
-
- scanline_timer = timer_alloc(scanline_callback, NULL);
- timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0, attotime_zero);
+ /* this must be registered here - hmmm */
+ state_save_register_global(flip_screen);
}
-VIDEO_START( radarsc1 )
+VIDEO_START( dkong )
{
+ dkong_state *state = machine->driver_data;
video_start_dkong_base(machine);
- vid_hw = HW_TRS01;
-
- bg_tilemap = tilemap_create(radarsc1_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32);
- tilemap_set_scrolldx(bg_tilemap, 0, 128);
-
- bg_bits = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
-
- scanline_timer = timer_alloc(scanline_callback, NULL);
- timer_adjust(scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0, attotime_zero);
-
-}
-
-VIDEO_UPDATE( radarscp )
-{
-
- tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0);
- draw_sprites(machine, bitmap, cliprect, 0x40, 1);
- radarscp_draw_background(machine, bitmap, cliprect);
-
- return 0;
+ switch (state->hardware_type)
+ {
+ case HARDWARE_TRS02:
+ state->bg_bits = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
+ state->scanline_timer = timer_alloc(scanline_callback, NULL);
+ timer_adjust(state->scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0, attotime_zero);
+ /* fall through */
+ case HARDWARE_TKG04:
+ case HARDWARE_TKG02:
+ state->bg_tilemap = tilemap_create(dkong_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32);
+ tilemap_set_scrolldx(state->bg_tilemap, 0, 128);
+ break;
+ case HARDWARE_TRS01:
+ state->bg_tilemap = tilemap_create(radarsc1_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_PEN, 8, 8, 32, 32);
+ tilemap_set_scrolldx(state->bg_tilemap, 0, 128);
+
+ state->bg_bits = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
+
+ state->scanline_timer = timer_alloc(scanline_callback, NULL);
+ timer_adjust(state->scanline_timer, video_screen_get_time_until_pos(0, 0, 0), 0, attotime_zero);
+ break;
+ default:
+ fatalerror("Invalid hardware type in dkong_video_start");
+ }
}
VIDEO_UPDATE( dkong )
{
- tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0);
- draw_sprites(machine, bitmap, cliprect, 0x40, 1);
+ dkong_state *state = machine->driver_data;
+
+ switch (state->hardware_type)
+ {
+ case HARDWARE_TKG02:
+ case HARDWARE_TKG04:
+ check_palette(machine);
+ tilemap_draw(bitmap, cliprect, state->bg_tilemap, 0, 0);
+ draw_sprites(machine, bitmap, cliprect, 0x40, 1);
+ break;
+ case HARDWARE_TRS01:
+ case HARDWARE_TRS02:
+ tilemap_draw(bitmap, cliprect, state->bg_tilemap, 0, 0);
+ draw_sprites(machine, bitmap, cliprect, 0x40, 1);
+ radarscp_draw_background(machine, bitmap, cliprect);
+ break;
+ default:
+ fatalerror("Invalid hardware type in dkong_video_update");
+ }
return 0;
}
VIDEO_UPDATE( pestplce )
{
+ dkong_state *state = machine->driver_data;
int offs;
- tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0);
+ tilemap_draw(bitmap, cliprect, state->bg_tilemap, 0, 0);
/* Draw the sprites. */
for (offs = 0;offs < spriteram_size;offs += 4)
@@ -872,7 +946,7 @@ VIDEO_UPDATE( pestplce )
{
drawgfx(bitmap,machine->gfx[1],
spriteram[offs + 2],
- (spriteram[offs + 1] & 0x0f) + 16 * palette_bank,
+ (spriteram[offs + 1] & 0x0f) + 16 * state->palette_bank,
spriteram[offs + 1] & 0x80,spriteram[offs + 1] & 0x40,
spriteram[offs + 3] - 8,240 - spriteram[offs] + 8,
cliprect,TRANSPARENCY_PEN,0);
@@ -883,7 +957,9 @@ VIDEO_UPDATE( pestplce )
VIDEO_UPDATE( spclforc )
{
- tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0);
+ dkong_state *state = machine->driver_data;
+
+ tilemap_draw(bitmap, cliprect, state->bg_tilemap, 0, 0);
/* it uses spriteram[offs + 2] & 0x10 for sprite bank */
draw_sprites(machine, bitmap, cliprect, 0x10, 3);
diff --git a/src/mame/video/midzeus.c b/src/mame/video/midzeus.c
index b9f1e84c93a..794779f2999 100644
--- a/src/mame/video/midzeus.c
+++ b/src/mame/video/midzeus.c
@@ -18,7 +18,7 @@
*************************************/
#define WAVERAM_WIDTH 512
-#define WAVERAM_HEIGHT 4096
+#define WAVERAM_HEIGHT 2048
@@ -31,8 +31,8 @@
typedef struct _poly_extra_data poly_extra_data;
struct _poly_extra_data
{
- const UINT32 * palbase;
- const UINT32 * texbase;
+ const UINT64 * palbase;
+ const UINT64 * texbase;
UINT16 transcolor;
UINT16 texwidth;
UINT16 color;
@@ -56,13 +56,14 @@ static UINT8 zeuscmd_buffer_words;
static UINT8 zeuscmd_buffer_expected_words;
static INT16 zeus_matrix[3][3];
static INT32 zeus_point[3];
-static UINT32 *zeus_palbase;
+static UINT64 *zeus_renderbase;
+static UINT64 *zeus_palbase;
static int zeus_enable_logging;
static UINT32 zeus_blend;
static UINT32 zeus_texdata;
static UINT32 zeus_objdata;
-static UINT32 *waveram;
+static UINT64 *waveram[2];
static UINT8 single_step;
static poly_extra_data single_step_extra;
@@ -95,15 +96,30 @@ static UINT8 zeuscmd_length(UINT32 word);
*
*************************************/
-INLINE UINT32 *waveram_ptr_from_addr(UINT32 addr)
+INLINE UINT64 *waveram_ptr_from_block_addr(UINT8 bank, UINT32 addr)
{
- return &waveram[((addr & 0x1ff) | ((addr & 0xfff000) >> 3)) * 2];
+ return &waveram[bank][(addr % WAVERAM_WIDTH) + ((addr >> 12) % WAVERAM_HEIGHT) * WAVERAM_WIDTH];
}
-INLINE UINT32 *waveram_pixel_ptr(int bank, int y, int x)
+INLINE UINT64 *waveram_ptr_from_expanded_addr(UINT8 bank, UINT32 addr)
{
- return &waveram[bank * (WAVERAM_HEIGHT * WAVERAM_WIDTH) + y * WAVERAM_WIDTH + (x & ~1)];
+ return &waveram[bank][(addr % WAVERAM_WIDTH) + ((addr >> 16) % WAVERAM_HEIGHT) * WAVERAM_WIDTH];
+}
+
+
+INLINE UINT64 *waveram_ptr_from_texture_addr(UINT8 bank, UINT32 addr, int width)
+{
+ return &waveram[bank][(addr * width) / 8];
+}
+
+
+INLINE UINT16 *waveram_pixel_ptr(UINT64 *base, int y, int x, UINT16 **depthptr)
+{
+ UINT16 *baseptr = (UINT16 *)base + y * 512*2 + (x & ~1) * 2;
+ if (depthptr != NULL)
+ *depthptr = baseptr + BYTE4_XOR_LE((x & 1) + 2);
+ return baseptr + BYTE4_XOR_LE(x & 1);
}
@@ -111,11 +127,8 @@ INLINE void waveram_plot(int y, int x, UINT16 color)
{
if (x >= 0 && x < 400 && y >= 0 && y < 256)
{
- UINT32 *ptr = waveram_pixel_ptr(1, y, x);
- if (x & 1)
- *ptr = (*ptr & 0x0000ffff) | (color << 16);
- else
- *ptr = (*ptr & 0xffff0000) | color;
+ UINT16 *ptr = waveram_pixel_ptr(zeus_renderbase, y, x, NULL);
+ *ptr = color;
}
}
@@ -124,17 +137,10 @@ INLINE void waveram_plot_depth(int y, int x, UINT16 color, UINT16 depth)
{
if (x >= 0 && x < 400 && y >= 0 && y < 256)
{
- UINT32 *ptr = waveram_pixel_ptr(1, y, x);
- if (x & 1)
- {
- ptr[0] = (ptr[0] & 0x0000ffff) | (color << 16);
- ptr[1] = (ptr[1] & 0x0000ffff) | (depth << 16);
- }
- else
- {
- ptr[0] = (ptr[0] & 0xffff0000) | color;
- ptr[1] = (ptr[1] & 0xffff0000) | depth;
- }
+ UINT16 *depthptr;
+ UINT16 *ptr = waveram_pixel_ptr(zeus_renderbase, y, x, &depthptr);
+ *ptr = color;
+ *depthptr = depth;
}
}
@@ -143,51 +149,39 @@ INLINE void waveram_plot_check_depth(int y, int x, UINT16 color, UINT16 depth)
{
if (x >= 0 && x < 400 && y >= 0 && y < 256)
{
- UINT32 *ptr = waveram_pixel_ptr(1, y, x);
- if (x & 1)
+ UINT16 *depthptr;
+ UINT16 *ptr = waveram_pixel_ptr(zeus_renderbase, y, x, &depthptr);
+ if (depth <= *depthptr)
{
- if (depth <= (ptr[1] >> 16))
- {
- ptr[0] = (ptr[0] & 0x0000ffff) | (color << 16);
- ptr[1] = (ptr[1] & 0x0000ffff) | (depth << 16);
- }
- }
- else
- {
- if (depth <= (ptr[1] & 0xffff))
- {
- ptr[0] = (ptr[0] & 0xffff0000) | color;
- ptr[1] = (ptr[1] & 0xffff0000) | depth;
- }
+ *ptr = color;
+ *depthptr = depth;
}
}
}
-INLINE UINT32 *zeus_pixaddr(void)
+INLINE UINT8 get_texel_8bit(const UINT64 *base, int y, int x, int width)
{
- int bank = (zeusbase[0xb6] >> 31) & 1;
- int x = (zeusbase[0xb4] & 0xff) << 1;
- int y = ((zeusbase[0xb4] >> 15) & 0xffe) | ((zeusbase[0xb4] >> 8) & 0x01);
- return waveram_pixel_ptr(bank, y, x);
+ const UINT8 *base8 = (const UINT8 *)base;
+ x &= width - 1;
+ base8 += BYTE8_XOR_LE((y / 2) * (width * 2) + (x / 4) * 8 + (y & 1) * 4 + (x & 3));
+ return *base8;
}
-INLINE UINT8 get_texel_8bit(const UINT32 *base, int y, int x, int width)
+INLINE UINT8 get_texel_4bit(const UINT64 *base, int y, int x, int width)
{
- if (x >= width)
- return 0;
- base += (y / 2) * (width / 2) + (x / 4) * 2 + (y & 1);
- return *base >> (8 * (x & 3));
+ const UINT8 *base8 = (const UINT8 *)base;
+ x &= (width * 2) - 1;
+ base8 += BYTE8_XOR_LE((y / 2) * (width * 2) + (x / 8) * 8 + (y & 1) * 4 + ((x / 2) & 3));
+ return (*base8 >> (4 * (x & 1))) & 0x0f;
}
-INLINE UINT8 get_texel_4bit(const UINT32 *base, int y, int x, int width)
+INLINE UINT16 get_palette_entry(const UINT64 *palbase, UINT8 texel)
{
- if (x >= width * 2)
- return 0;
- base += (y / 2) * (width / 2) + (x / 8) * 2 + (y & 1);
- return (*base >> (4 * (x & 7))) & 0x0f;
+ const UINT16 *base16 = (const UINT16 *)palbase;
+ return base16[BYTE4_XOR_LE(texel)];
}
@@ -203,8 +197,10 @@ VIDEO_START( midzeus )
int i;
/* allocate memory for "wave" RAM */
- waveram = auto_malloc(2 * WAVERAM_WIDTH * WAVERAM_HEIGHT * sizeof(*waveram));
- state_save_register_global_pointer(waveram, 2 * WAVERAM_WIDTH * WAVERAM_HEIGHT);
+ waveram[0] = auto_malloc(WAVERAM_WIDTH * WAVERAM_HEIGHT * sizeof(*waveram));
+ waveram[1] = auto_malloc(WAVERAM_WIDTH * WAVERAM_HEIGHT * sizeof(*waveram));
+ state_save_register_global_pointer(waveram[0], WAVERAM_WIDTH * WAVERAM_HEIGHT);
+ state_save_register_global_pointer(waveram[1], WAVERAM_WIDTH * WAVERAM_HEIGHT);
/* initialize a 5-5-5 palette */
for (i = 0; i < 32768; i++)
@@ -215,21 +211,27 @@ VIDEO_START( midzeus )
/* we need to cleanup on exit */
add_exit_callback(machine, exit_handler);
+
+ zeus_renderbase = waveram[1];
}
static void exit_handler(running_machine *machine)
{
FILE *f = fopen("waveram.dmp", "w");
+ int bank;
int i;
- for (i = 0; i < 2 * WAVERAM_WIDTH * WAVERAM_HEIGHT; i += 2)
- {
- if (i % 8 == 0) fprintf(f, "%03X%03X: ", (i / 1024), (i / 2) & 0x1ff);
- fprintf(f, " %08X %08X ", waveram[i+0], waveram[i+1]);
- if (i % 8 == 6) fprintf(f, "\n");
- }
+ for (bank = 0; bank < 2; bank++)
+ for (i = 0; i < WAVERAM_WIDTH * WAVERAM_HEIGHT; i++)
+ {
+ if (i % 4 == 0) fprintf(f, "%03X%03X: ", i / WAVERAM_WIDTH, i % WAVERAM_WIDTH);
+ fprintf(f, " %08X %08X ", (UINT32)(waveram[bank][i] >> 32), (UINT32)waveram[bank][i]);
+ if (i % 4 == 3) fprintf(f, "\n");
+ }
fclose(f);
+
+ poly_free(poly);
}
@@ -247,25 +249,20 @@ VIDEO_UPDATE( midzeus )
/* normal update case */
if (!input_code_pressed(KEYCODE_W))
{
+ UINT64 *base = waveram_ptr_from_expanded_addr(1, zeusbase[0xcc]);
for (y = cliprect->min_y; y <= cliprect->max_y; y++)
{
- UINT32 *src = waveram_pixel_ptr(1, y, 0);
UINT16 *dest = (UINT16 *)bitmap->base + y * bitmap->rowpixels;
- for (x = cliprect->min_x; x <= cliprect->max_x; x += 2)
- {
- UINT32 pixels = *src;
- dest[x+0] = pixels & 0x7fff;
- dest[x+1] = (pixels >> 16) & 0x7fff;
- src += 2;
- }
+ for (x = cliprect->min_x; x <= cliprect->max_x; x++)
+ dest[x] = *waveram_pixel_ptr(base, y, x, NULL);
}
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;
+ const UINT64 *texbase = waveram_ptr_from_texture_addr(0, single_step_val1, texwidth);
int x, y;
for (y = 0; y < 256; y++)
@@ -274,9 +271,7 @@ VIDEO_UPDATE( midzeus )
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)];
+ dest[x] = get_palette_entry(single_step_extra.palbase, (texdepth == 8) ? get_texel_8bit(texbase, y, x, texwidth) : get_texel_4bit(texbase, y, x, texwidth));
else
dest[x] = 0;
}
@@ -297,7 +292,7 @@ VIDEO_UPDATE( midzeus )
{
static int yoffs = 0;
static int width = 256;
- UINT32 *base;
+ const UINT64 *base;
if (input_code_pressed(KEYCODE_DOWN)) yoffs += input_code_pressed(KEYCODE_LSHIFT) ? 0x40 : 1;
if (input_code_pressed(KEYCODE_UP)) yoffs -= input_code_pressed(KEYCODE_LSHIFT) ? 0x40 : 1;
@@ -305,7 +300,7 @@ VIDEO_UPDATE( midzeus )
if (input_code_pressed(KEYCODE_RIGHT) && width < 512) { width <<= 1; while (input_code_pressed(KEYCODE_RIGHT)) ; }
if (yoffs < 0) yoffs = 0;
- base = waveram_ptr_from_addr(yoffs << 12);
+ base = waveram_ptr_from_block_addr(0, yoffs << 12);
for (y = cliprect->min_y; y <= cliprect->max_y; y++)
{
@@ -940,8 +935,8 @@ static void render_poly_4bit(void *dest, INT32 scanline, const poly_extent *exte
float doozdx = extent->param[0].dpdx;
float duozdx = extent->param[1].dpdx;
float dvozdx = extent->param[2].dpdx;
- const UINT32 *texbase = extra->texbase;
- const UINT32 *palbase = extra->palbase;
+ const UINT64 *texbase = extra->texbase;
+ const UINT64 *palbase = extra->palbase;
UINT16 transcolor = extra->transcolor;
int texwidth = extra->texwidth;
int x;
@@ -957,8 +952,8 @@ if (extra->alpha < 0x80)
UINT8 texel = get_texel_4bit(texbase, v, u, texwidth);
if (texel != transcolor)
{
- UINT16 color = palbase[texel >> 1] >> (16 * (texel & 1));
- INT32 depth = z * 256.0f;
+ UINT16 color = get_palette_entry(palbase, texel);
+ INT32 depth = z;
if (depth > 0x7fff) depth = 0x7fff;
if (depth >= 0)
waveram_plot_check_depth(scanline, x, color, depth);
@@ -980,8 +975,8 @@ static void render_poly_8bit(void *dest, INT32 scanline, const poly_extent *exte
float doozdx = extent->param[0].dpdx;
float duozdx = extent->param[1].dpdx;
float dvozdx = extent->param[2].dpdx;
- const UINT32 *texbase = extra->texbase;
- const UINT32 *palbase = extra->palbase;
+ const UINT64 *texbase = extra->texbase;
+ const UINT64 *palbase = extra->palbase;
UINT16 transcolor = extra->transcolor;
int texwidth = extra->texwidth;
int x;
@@ -997,8 +992,8 @@ if (extra->alpha < 0x80)
UINT8 texel = get_texel_8bit(texbase, v, u, texwidth);
if (texel != transcolor)
{
- UINT16 color = palbase[texel >> 1] >> (16 * (texel & 1));
- INT32 depth = z * 256.0f;
+ UINT16 color = get_palette_entry(palbase, texel);
+ INT32 depth = z;
if (depth > 0x7fff) depth = 0x7fff;
if (depth >= 0)
waveram_plot_check_depth(scanline, x, color, depth);
@@ -1011,13 +1006,20 @@ if (extra->alpha < 0x80)
}
+static void render_poly_solid(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid)
+{
+ const poly_extra_data *extra = extradata;
+ UINT16 color = extra->transcolor;
+ int x;
+
+ for (x = extent->startx; x < extent->stopx; x++)
+ waveram_plot_depth(scanline, x, color, 0x7fff);
+}
+
+
static void zeus_draw_model(UINT32 addr_and_count, UINT32 texdata, int logcmd)
{
- static UINT32 *loglist[1000];
- static int loglist_last = 0;
- UINT32 *data = waveram_ptr_from_addr(addr_and_count);
UINT32 val1, val2;
- int i, logit = FALSE;
int texwshift;
int testbit = 0;
@@ -1037,16 +1039,6 @@ static void zeus_draw_model(UINT32 addr_and_count, UINT32 texdata, int logcmd)
);
}
- if (logcmd)
- {
- for (i = 0; i < loglist_last; i++)
- if (loglist[i] == data)
- break;
- logit = (i == loglist_last);
- if (i == loglist_last)
- loglist[loglist_last++] = data;
- }
-
if (input_code_pressed(KEYCODE_Z)) testbit = 1;
if (input_code_pressed(KEYCODE_X)) testbit = 2;
if (input_code_pressed(KEYCODE_C)) testbit = 3;
@@ -1060,65 +1052,81 @@ static void zeus_draw_model(UINT32 addr_and_count, UINT32 texdata, int logcmd)
while (1)
{
- const UINT32 *data = waveram_ptr_from_addr(addr_and_count);
- int count = ((addr_and_count >> 24) + 1) * 2;
+ const UINT64 *data = waveram_ptr_from_block_addr(0, addr_and_count);
+ int count = (addr_and_count >> 24) + 1;
UINT32 next_addr_and_count = 0;
int datanum;
int length;
- for (datanum = 0; datanum < count; datanum += length * 2)
+ for (datanum = 0; datanum < count; datanum += length)
{
+ UINT8 cmd = data[datanum] >> 24;
int offs;
- length = ((data[datanum] >> 24) == 0x25 || (data[datanum] >> 24) == 0x30) ? 7 : 1;
+ length = (cmd == 0x25 || cmd == 0x30) ? 7 : 1;
- if (logit)
+ if (logcmd)
{
- logerror("\t%08X", data[datanum]);
- for (offs = 1; offs < length * 2; offs++)
- logerror(" %08X", data[datanum + offs]);
+ logerror("\t");
+ for (offs = 0; offs < length; offs++)
+ logerror("%08X %08X ", (UINT32)data[datanum + offs], (UINT32)(data[datanum + offs] >> 32));
logerror("\n");
}
- if ((data[datanum] >> 24) == 0x25 || (data[datanum] >> 24) == 0x30 /* invasn */)
+ if (cmd == 0x25 || cmd == 0x30 /* invasn */)
{
poly_draw_scanline callback;
poly_extra_data *extra;
+ poly_vertex clipvert[8];
poly_vertex vert[4];
+ int numverts;
int i;
callback = (val2 & 0x20) ? render_poly_8bit : render_poly_4bit;
for (i = 0; i < 4; i++)
{
- UINT32 ixy = data[datanum + 2 + 2*i];
- UINT32 iuvz = data[datanum + 3 + 2*i];
+ UINT32 ixy = data[datanum + 1 + i];
+ UINT32 iuvz = data[datanum + 1 + i] >> 32;
INT32 xo = (INT16)ixy;
INT32 yo = (INT16)(ixy >> 16);
INT32 zo = (INT16)iuvz;
UINT8 u = iuvz >> 16;
UINT8 v = iuvz >> 24;
- float z, ooz;
vert[i].x = (xo * zeus_matrix[0][0] + yo * zeus_matrix[0][1] + zo * zeus_matrix[0][2] + zeus_point[0]) * (1.0f / 65536.0f);
vert[i].y = (xo * zeus_matrix[1][0] + yo * zeus_matrix[1][1] + zo * zeus_matrix[1][2] + zeus_point[1]) * (1.0f / 65536.0f);
- z = (xo * zeus_matrix[2][0] + yo * zeus_matrix[2][1] + zo * zeus_matrix[2][2] + zeus_point[2]) * (1.0f / (512.0f * 65536.0f));
+ vert[i].p[0] = (xo * zeus_matrix[2][0] + yo * zeus_matrix[2][1] + zo * zeus_matrix[2][2] + zeus_point[2]) * (1.0f / (512.0f * 65536.0f));
+ vert[i].p[1] = u;
+ vert[i].p[2] = v;
+
+ if (logcmd)
+ logerror(" (%f,%f,%f) (%02X,%02X)\n", vert[i].x, vert[i].y, vert[i].p[0], (int)vert[i].p[1], (int)vert[i].p[2]);
+ }
- ooz = 1.0f / z;
- vert[i].x *= ooz;
- vert[i].y *= ooz;
- vert[i].p[0] = ooz;
- vert[i].p[1] = u * ooz;
- vert[i].p[2] = v * ooz;
+ numverts = poly_zclip_if_less(4, &vert[0], &clipvert[0], 3, 0.0f);
+ if (numverts < 3)
+ continue;
- vert[i].x += 200.0f;
- vert[i].y += 128.0f;
+ for (i = 0; i < numverts; i++)
+ {
+ float ooz = 1.0f / (0.005f + clipvert[i].p[0]);
+
+ clipvert[i].x *= ooz;
+ clipvert[i].y *= ooz;
+ clipvert[i].x += 200.0f;
+ clipvert[i].y += 128.0f;
+
+ ooz *= 1.0f / 512.0f;
+ clipvert[i].p[0] = ooz;
+ clipvert[i].p[1] *= ooz;
+ clipvert[i].p[2] *= ooz;
}
extra = poly_get_extra_data(poly);
extra->transcolor = 0x100;
- extra->texbase = &waveram[(val1 << (7 - texwshift)) & 0x3fffff];
extra->texwidth = 512 >> texwshift;
+ extra->texbase = waveram_ptr_from_texture_addr(0, val1, extra->texwidth);
extra->palbase = zeus_palbase;
extra->alpha = zeus_blend;
@@ -1131,14 +1139,14 @@ static void zeus_draw_model(UINT32 addr_and_count, UINT32 texdata, int logcmd)
single_step_advance = FALSE;
}
- poly_render_quad(poly, NULL, &Machine->screen[0].visarea, callback, 3, &vert[0], &vert[1], &vert[2], &vert[3]);
+ poly_render_triangle_fan(poly, NULL, &Machine->screen[0].visarea, callback, 3, numverts, &clipvert[0]);
poly_wait(poly, "Normal");
if (single_step)
while (!single_step_advance) video_frame_update(TRUE);
}
- else if (data[datanum] == 0x0c018000/* mk4 */ || data[datanum] == 0x0c008000/* invasn */)
- next_addr_and_count = data[datanum + 1];
+ else if ((UINT32)data[datanum] == 0x0c018000/* mk4 */ || (UINT32)data[datanum] == 0x0c008000/* invasn */)
+ next_addr_and_count = data[datanum] >> 32;
}
if (datanum != count)
logerror("Overran data\n");
@@ -1183,10 +1191,10 @@ READ32_HANDLER( zeus_r )
break;
case 0xf6: // status -- they wait for this & 9 == 0
+ // value & $9600 must == $9600 to pass Zeus system test
+ result = 0x9600;
if (zeusbase[0xb6] == 0x80040000)
- result = 1;
- else
- result = 0;
+ result |= 1;
logit = 0;
break;
}
@@ -1252,6 +1260,10 @@ WRITE32_HANDLER( zeus2_w )
static void zeus_write_16bit(offs_t offset, UINT16 data, int logit)
{
+ /* writes to register $CC need to force a partial update */
+ if ((offset & ~1) == 0xcc)
+ video_screen_update_partial(0, video_screen_get_vpos(0));
+
/* write to high part on odd addresses */
if (offset & 1)
zeusbase[offset & ~1] = (zeusbase[offset & ~1] & 0x0000ffff) | (data << 16);
@@ -1272,6 +1284,10 @@ static void zeus_write_16bit(offs_t offset, UINT16 data, int logit)
static void zeus_write_32bit(offs_t offset, UINT32 data, int logit)
{
+ /* writes to register $CC need to force a partial update */
+ if ((offset & ~1) == 0xcc)
+ video_screen_update_partial(0, video_screen_get_vpos(0));
+
/* always write to low word? */
zeusbase[offset & ~1] = data;
@@ -1439,8 +1455,6 @@ static void zeus_process_write(offs_t offset)
{
if ((zeusbase[0x80] & 0xffffff) == 0x22FCFF)
{
- int startx, stopx, starty, stopy;
- int x, y;
// zeusbase[0x00] = color
// zeusbase[0x02] = ??? = 0x000C0000
// zeusbase[0x04] = ??? = 0x00000E01
@@ -1463,13 +1477,23 @@ static void zeus_process_write(offs_t offset)
// zeusbase[0x46] = ??? = 0x00000000
// zeusbase[0x4c] = ??? = 0x00808080 (brightness?)
// zeusbase[0x4e] = ??? = 0x00808080 (brightness?)
- startx = (zeusbase[0x08] & 0xffff);
- starty = zeusbase[0x08] >> 16;
- stopx = (zeusbase[0x0c] & 0xffff);
- stopy = zeusbase[0x0c] >> 16;
- for (y = starty; y <= stopy; y++)
- for (x = startx; x <= stopx; x++)
- waveram[(1 * WAVERAM_HEIGHT + (y % WAVERAM_HEIGHT)) * WAVERAM_WIDTH + x] = zeusbase[0x00];
+ poly_extra_data *extra = poly_get_extra_data(poly);
+ poly_vertex vert[4];
+
+ vert[0].x = (INT16)zeusbase[0x08];
+ vert[0].y = (INT16)(zeusbase[0x08] >> 16);
+ vert[1].x = (INT16)zeusbase[0x0a];
+ vert[1].y = (INT16)(zeusbase[0x0a] >> 16);
+ vert[2].x = (INT16)zeusbase[0x0c];
+ vert[2].y = (INT16)(zeusbase[0x0c] >> 16);
+ vert[3].x = (INT16)zeusbase[0x0e];
+ vert[3].y = (INT16)(zeusbase[0x0e] >> 16);
+
+ extra->transcolor = zeusbase[0x00];
+
+ poly_render_quad(poly, NULL, &Machine->screen[0].visarea, render_poly_solid, 0, &vert[0], &vert[1], &vert[2], &vert[3]);
+ poly_wait(poly, "Normal");
+
single_step = input_code_pressed(KEYCODE_S);
if (single_step)
popmessage("Single Step");
@@ -1483,18 +1507,18 @@ static void zeus_process_write(offs_t offset)
case 0xb2:
if ((zeusbase[0xb6] >> 16) != 0)
{
- UINT32 *dest = zeus_pixaddr();
if ((offset == 0xb0 && (zeusbase[0xb6] & 0x02000000) == 0) ||
(offset == 0xb2 && (zeusbase[0xb6] & 0x02000000) != 0))
{
+ UINT16 *dest = (UINT16 *)waveram_ptr_from_expanded_addr(zeusbase[0xb6] >> 31, zeusbase[0xb4]);
if (zeusbase[0xb6] & 0x00100000)
- dest[0] = (dest[0] & 0xffff0000) | (zeusbase[0xb0] & 0x0000ffff);
+ dest[BYTE4_XOR_LE(0)] = zeusbase[0xb0];
if (zeusbase[0xb6] & 0x00200000)
- dest[0] = (dest[0] & 0x0000ffff) | (zeusbase[0xb0] & 0xffff0000);
+ dest[BYTE4_XOR_LE(1)] = zeusbase[0xb0] >> 16;
if (zeusbase[0xb6] & 0x00400000)
- dest[1] = (dest[1] & 0xffff0000) | (zeusbase[0xb2] & 0x0000ffff);
+ dest[BYTE4_XOR_LE(2)] = zeusbase[0xb2];
if (zeusbase[0xb6] & 0x00800000)
- dest[1] = (dest[1] & 0x0000ffff) | (zeusbase[0xb2] & 0xffff0000);
+ dest[BYTE4_XOR_LE(3)] = zeusbase[0xb2] >> 16;
if (zeusbase[0xb6] & 0x00020000)
zeusbase[0xb4]++;
}
@@ -1504,21 +1528,12 @@ static void zeus_process_write(offs_t offset)
case 0xb4:
if (zeusbase[0xb6] & 0x00010000)
{
- UINT32 *src = zeus_pixaddr();
- zeusbase[0xb0] = src[0];
- zeusbase[0xb2] = src[1];
+ const UINT64 *src = waveram_ptr_from_expanded_addr(zeusbase[0xb6] >> 31, zeusbase[0xb4]);
+ zeusbase[0xb0] = *src;
+ zeusbase[0xb2] = *src >> 32;
}
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;
@@ -1534,23 +1549,20 @@ static void zeus_process_write(offs_t offset)
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 0xcc:
+ video_screen_update_partial(0, video_screen_get_vpos(0));
+ break;
+
+ case 0x84:
+ /* MK4: Written in tandem with 0xcc */
+ /* MK4: Writes either 0x80 (and 0x000000 to 0xcc) or 0x00 (and 0x800000 to 0xcc) */
+ zeus_renderbase = waveram_ptr_from_expanded_addr(1, zeusbase[0x84] << 16);
+ break;
case 0xe0:
zeuscmd_buffer[zeuscmd_buffer_words++] = zeusbase[0xe0];
@@ -1570,17 +1582,18 @@ static void log_waveram(UINT32 length_and_base)
{
static struct
{
- UINT32 lab, checksum;
+ UINT32 lab;
+ UINT64 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;
+ const UINT64 *ptr = waveram_ptr_from_block_addr(0, length_and_base);
+ UINT64 checksum = length_and_base;
int foundit = FALSE;
int i;
for (i = 0; i < numoctets; i++)
- checksum += ptr[i * 2 + 0] + ptr[i * 2 + 1];
+ checksum += ptr[i];
for (i = 0; i < ARRAY_LENGTH(recent_entries); i++)
if (recent_entries[i].lab == length_and_base && recent_entries[i].checksum == checksum)
@@ -1601,14 +1614,14 @@ static void log_waveram(UINT32 length_and_base)
return;
for (i = 0; i < numoctets; i++)
- logerror("\t%02X: %08X %08X\n", i, ptr[i * 2 + 0], ptr[i * 2 + 1]);
+ logerror("\t%02X: %08X %08X\n", i, (UINT32)ptr[i], (UINT32)(ptr[i] >> 32));
}
static void zeuscmd_execute(int words)
{
static int colorcount;
- int logcmd = 1;//input_code_pressed(KEYCODE_L);
+ int logcmd = input_code_pressed(KEYCODE_L);
int wordnum;
/* command observations:
@@ -1661,6 +1674,9 @@ static void zeuscmd_execute(int words)
25000000 007F0018 01000400 B0F60008 -- during diagnostics screen
25000080 007F0018 01000400 B0F60008 -- alternate frames during text screen
+ 25008000 0000F833 A8040E4C 0000F8C0 A8FC0BD9 0000F731 08FC0B7F 0000F6A4 08040DF2 21010000
+ 25800000 FE58FD0C 00000000 FE58FD10 00000000 FE74FD10 00000000 FE74FD0C 00000000 200C0000
+
write to ($60) = 1 after setting up:
@@ -1698,7 +1714,7 @@ static void zeuscmd_execute(int words)
case 0x00c040:
if (logcmd)
logerror(" -- setptr(palbase)\n");
- zeus_palbase = waveram_ptr_from_addr(zeuscmd_buffer[1]);
+ zeus_palbase = waveram_ptr_from_block_addr(0, zeuscmd_buffer[1]);
break;
case 0x80c0a5:
@@ -1833,6 +1849,8 @@ static UINT8 zeuscmd_length(UINT32 word)
case 0x25:
case 0x30: /* invasn */
+ if (word & 0x808000)
+ return 10;
return 4; /* ??? */
case 0x1c:
diff --git a/src/osd/windows/drawd3d.c b/src/osd/windows/drawd3d.c
index e819bf7f0e2..b082c54a43c 100644
--- a/src/osd/windows/drawd3d.c
+++ b/src/osd/windows/drawd3d.c
@@ -207,6 +207,33 @@ static const line_aa_step line_aa_4step[] =
// INLINES
//============================================================
+INLINE BOOL GetClientRectExceptMenu(HWND hWnd, PRECT pRect, BOOL fullscreen)
+{
+ static HMENU last_menu;
+ static RECT last_rect;
+ static RECT cached_rect;
+ HMENU menu = GetMenu(hWnd);
+ BOOL result = GetClientRect(hWnd, pRect);
+
+ if (!fullscreen || !menu)
+ return result;
+
+ // to avoid flicker use cache if we can use
+ if (last_menu != menu || memcmp(&last_rect, pRect, sizeof *pRect) != 0)
+ {
+ last_menu = menu;
+ last_rect = *pRect;
+
+ SetMenu(hWnd, NULL);
+ result = GetClientRect(hWnd, &cached_rect);
+ SetMenu(hWnd, menu);
+ }
+
+ *pRect = cached_rect;
+ return result;
+}
+
+
INLINE UINT32 ycc_to_rgb(UINT8 y, UINT8 cb, UINT8 cr)
{
/* original equations:
@@ -535,7 +562,7 @@ static const render_primitive_list *drawd3d_window_get_primitives(win_window_inf
d3d_info *d3d = window->drawdata;
RECT client;
- GetClientRect(window->hwnd, &client);
+ GetClientRectExceptMenu(window->hwnd, &client, window->fullscreen);
if (rect_width(&client) > 0 && rect_height(&client) > 0)
{
render_target_set_bounds(window->target, rect_width(&client), rect_height(&client), winvideo_monitor_get_aspect(window->monitor));
@@ -706,7 +733,7 @@ try_again:
d3d->presentation.MultiSampleType = D3DMULTISAMPLE_NONE;
d3d->presentation.SwapEffect = D3DSWAPEFFECT_DISCARD;
d3d->presentation.hDeviceWindow = window->hwnd;
- d3d->presentation.Windowed = !window->fullscreen || HAS_WINDOW_MENU;
+ d3d->presentation.Windowed = (!video_config.switchres || !window->fullscreen) || HAS_WINDOW_MENU;
d3d->presentation.EnableAutoDepthStencil = FALSE;
d3d->presentation.AutoDepthStencilFormat = D3DFMT_D16;
d3d->presentation.Flags = 0;
@@ -1112,7 +1139,7 @@ static int config_adapter_mode(win_window_info *window)
RECT client;
// bounds are from the window client rect
- GetClientRect(window->hwnd, &client);
+ GetClientRectExceptMenu(window->hwnd, &client, window->fullscreen);
d3d->width = client.right - client.left;
d3d->height = client.bottom - client.top;
@@ -1291,7 +1318,7 @@ static int update_window_size(win_window_info *window)
RECT client;
// get the current window bounds
- GetClientRect(window->hwnd, &client);
+ GetClientRectExceptMenu(window->hwnd, &client, window->fullscreen);
// if we have a device and matching width/height, nothing to do
if (d3d->device != NULL && rect_width(&client) == d3d->width && rect_height(&client) == d3d->height)
diff --git a/src/osd/windows/winprefix.h b/src/osd/windows/winprefix.h
index fce57fb2f34..6d5f4acc7d2 100644
--- a/src/osd/windows/winprefix.h
+++ b/src/osd/windows/winprefix.h
@@ -26,7 +26,7 @@ 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
+#if _MSC_VER < 1500
#define vsnprintf _vsnprintf
#endif
#endif
diff --git a/src/tools/src2html.c b/src/tools/src2html.c
index cce46c3e354..d3172be59b2 100644
--- a/src/tools/src2html.c
+++ b/src/tools/src2html.c
@@ -67,6 +67,14 @@ struct _include_path
};
+typedef struct _list_entry list_entry;
+struct _list_entry
+{
+ list_entry * next;
+ const astring * name;
+};
+
+
/***************************************************************************
GLOBAL VARIABLES
@@ -246,6 +254,14 @@ usage:
CORE OUTPUT FUNCTIONS
***************************************************************************/
+static int compare_list_entries(const void *p1, const void *p2)
+{
+ const list_entry *entry1 = *(const list_entry **)p1;
+ const list_entry *entry2 = *(const list_entry **)p2;
+ return strcmp(astring_c(entry1->name), astring_c(entry2->name));
+}
+
+
/*-------------------------------------------------
recurse_dir - recurse through a directory
-------------------------------------------------*/
@@ -281,6 +297,9 @@ static int recurse_dir(int srcrootlen, int dstrootlen, const astring *srcdir, co
{
osd_dir_entry_type entry_type = typelist[entindex];
const osd_directory_entry *entry;
+ list_entry *list = NULL;
+ list_entry **listarray;
+ list_entry *curlist;
osd_directory *dir;
int found = 0;
@@ -292,65 +311,105 @@ static int recurse_dir(int srcrootlen, int dstrootlen, const astring *srcdir, co
goto error;
}
- /* iterate through each file */
- while ((entry = osd_readdir(dir)) != NULL && result == 0)
+ /* build up the list of files */
+ while ((entry = osd_readdir(dir)) != NULL)
if (entry->type == entry_type && entry->name[0] != '.')
{
- astring *srcfile, *dstfile;
+ list_entry *lentry = malloc(sizeof(*lentry));
+ lentry->name = astring_dupc(entry->name);
+ lentry->next = list;
+ list = lentry;
+ found++;
+ }
- /* add a header */
- if (++found == 1)
- core_fprintf(indexfile, "\t<h2>%s</h2>\n\t<ul>\n", (entry_type == ENTTYPE_DIR) ? "Directories" : "Files");
+ /* close the directory */
+ osd_closedir(dir);
- /* build the source filename */
- srcfile = astring_alloc();
- astring_printf(srcfile, "%s%c%s", astring_c(srcdir), PATH_SEPARATOR[0], entry->name);
+ /* skip if nothing found */
+ if (found == 0)
+ continue;
- /* if we have a file, output it */
- dstfile = astring_alloc();
- if (entry->type == ENTTYPE_FILE)
- {
- file_type type = FILE_TYPE_INVALID;
- int extnum;
+ /* allocate memory for sorting */
+ listarray = malloc(sizeof(list_entry *) * found);
+ found = 0;
+ for (curlist = list; curlist != NULL; curlist = curlist->next)
+ listarray[found++] = curlist;
- /* make sure we care, first */
- for (extnum = 0; extnum < ARRAY_LENGTH(extension_lookup); extnum++)
- if (core_filename_ends_with(entry->name, extension_lookup[extnum].extension))
- {
- type = extension_lookup[extnum].type;
- break;
- }
+ /* sort the list */
+ qsort(listarray, found, sizeof(listarray[0]), compare_list_entries);
- /* if we got a valid file, process it */
- if (type != FILE_TYPE_INVALID)
+ /* rebuild the list */
+ list = NULL;
+ while (--found >= 0)
+ {
+ listarray[found]->next = list;
+ list = listarray[found];
+ }
+
+ /* iterate through each file */
+ for (curlist = list; curlist != NULL && result == 0; curlist = curlist->next)
+ {
+ astring *srcfile, *dstfile;
+
+ /* add a header */
+ if (curlist == list)
+ core_fprintf(indexfile, "\t<h2>%s</h2>\n\t<ul>\n", (entry_type == ENTTYPE_DIR) ? "Directories" : "Files");
+
+ /* build the source filename */
+ srcfile = astring_alloc();
+ astring_printf(srcfile, "%s%c%s", astring_c(srcdir), PATH_SEPARATOR[0], astring_c(curlist->name));
+
+ /* if we have a file, output it */
+ dstfile = astring_alloc();
+ if (entry_type == ENTTYPE_FILE)
+ {
+ file_type type = FILE_TYPE_INVALID;
+ int extnum;
+
+ /* make sure we care, first */
+ for (extnum = 0; extnum < ARRAY_LENGTH(extension_lookup); extnum++)
+ if (core_filename_ends_with(astring_c(curlist->name), extension_lookup[extnum].extension))
{
- astring_printf(dstfile, "%s%c%s.html", astring_c(dstdir), PATH_SEPARATOR[0], entry->name);
- if (indexfile != NULL)
- core_fprintf(indexfile, "\t<li><a href=\"%s.html\">%s</a></li>\n", entry->name, entry->name);
- result = output_file(type, srcrootlen, dstrootlen, srcfile, dstfile);
+ type = extension_lookup[extnum].type;
+ break;
}
- }
- /* if we have a directory, recurse */
- else
+ /* if we got a valid file, process it */
+ if (type != FILE_TYPE_INVALID)
{
- astring_printf(dstfile, "%s%c%s", astring_c(dstdir), PATH_SEPARATOR[0], entry->name);
+ astring_printf(dstfile, "%s%c%s.html", astring_c(dstdir), PATH_SEPARATOR[0], astring_c(curlist->name));
if (indexfile != NULL)
- core_fprintf(indexfile, "\t<li><a href=\"%s/index.html\">%s/</a></li>\n", entry->name, entry->name);
- result = recurse_dir(srcrootlen, dstrootlen, srcfile, dstfile);
+ core_fprintf(indexfile, "\t<li><a href=\"%s.html\">%s</a></li>\n", astring_c(curlist->name), astring_c(curlist->name));
+ result = output_file(type, srcrootlen, dstrootlen, srcfile, dstfile);
}
+ }
- /* free memory for the names */
- astring_free(srcfile);
- astring_free(dstfile);
+ /* if we have a directory, recurse */
+ else
+ {
+ astring_printf(dstfile, "%s%c%s", astring_c(dstdir), PATH_SEPARATOR[0], astring_c(curlist->name));
+ if (indexfile != NULL)
+ core_fprintf(indexfile, "\t<li><a href=\"%s/index.html\">%s/</a></li>\n", astring_c(curlist->name), astring_c(curlist->name));
+ result = recurse_dir(srcrootlen, dstrootlen, srcfile, dstfile);
}
+ /* free memory for the names */
+ astring_free(srcfile);
+ astring_free(dstfile);
+ }
+
/* close the list if we found some stuff */
- if (found > 0)
+ if (list != NULL)
core_fprintf(indexfile, "\t</ul>\n");
- /* close the directory */
- osd_closedir(dir);
+ /* free all the allocated entries */
+ while (list != NULL)
+ {
+ list_entry *next = list->next;
+ astring_free((astring *)list->name);
+ free(list);
+ list = next;
+ }
}
error:
diff --git a/src/version.c b/src/version.c
index 5acc38d07ae..558c43c6967 100644
--- a/src/version.c
+++ b/src/version.c
@@ -9,4 +9,4 @@
***************************************************************************/
-char build_version[] = "0.121u2 ("__DATE__")";
+char build_version[] = "0.121u3 ("__DATE__")";