summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2007-12-17 16:41:39 +0000
committer Aaron Giles <aaron@aarongiles.com>2007-12-17 16:41:39 +0000
commit507ca2d27520118151a2556d96b9a15aac768876 (patch)
tree46bb2585f4114b1dfc157c3bfe60238d23877e7a
parentdf34329a478833efbd542a424ce1813a11214d4a (diff)
Changes for MAME 0.121u4.mame0121u4
-rw-r--r--docs/config.txt7
-rw-r--r--makefile4
-rw-r--r--src/emu/cheat.c48
-rw-r--r--src/emu/cpu/adsp2100/2100ops.c12
-rw-r--r--src/emu/cpu/asap/asap.c4
-rw-r--r--src/emu/cpu/h6280/tblh6280.c2
-rw-r--r--src/emu/cpu/hd6309/6309dasm.c2
-rw-r--r--src/emu/cpu/hd6309/6309ops.c2
-rw-r--r--src/emu/cpu/i86/ea.h2
-rw-r--r--src/emu/cpu/konami/konamtbl.c8
-rw-r--r--src/emu/cpu/m37710/m37710.c4
-rw-r--r--src/emu/cpu/m6502/t65c02.c2
-rw-r--r--src/emu/cpu/m68000/m68kcpu.c2
-rw-r--r--src/emu/cpu/m68000/m68kmame.c14
-rw-r--r--src/emu/cpu/m6805/m6805.c2
-rw-r--r--src/emu/cpu/m6809/6809dasm.c2
-rw-r--r--src/emu/cpu/m6809/6809tbl.c2
-rw-r--r--src/emu/cpu/mips/psx.c6
-rw-r--r--src/emu/cpu/nec/necea.h2
-rw-r--r--src/emu/cpu/nec/necinstr.h2
-rw-r--r--src/emu/cpu/pic16c5x/pic16c5x.c14
-rw-r--r--src/emu/cpu/powerpc/ppcdrc.c2
-rw-r--r--src/emu/cpu/saturn/saturnds.c2
-rw-r--r--src/emu/cpu/sharc/sharcdsm.c2
-rw-r--r--src/emu/cpu/sharc/sharcops.h2
-rw-r--r--src/emu/cpu/tms32010/tms32010.c4
-rw-r--r--src/emu/cpu/tms32025/tms32025.c6
-rw-r--r--src/emu/cpu/tms34010/tms34010.c2
-rw-r--r--src/emu/cpu/tms7000/tms70tb.c4
-rw-r--r--src/emu/cpu/v30mz/necea.h2
-rw-r--r--src/emu/cpu/v30mz/necinstr.h2
-rw-r--r--src/emu/cpu/v60/v60mem.c4
-rw-r--r--src/emu/cpu/z8000/z8000.c14
-rw-r--r--src/emu/cpuexec.h2
-rw-r--r--src/emu/cpuint.c2
-rw-r--r--src/emu/cpuint.h2
-rw-r--r--src/emu/debug/debugcmd.c4
-rw-r--r--src/emu/debug/debugcpu.c4
-rw-r--r--src/emu/debug/debughlp.c4
-rw-r--r--src/emu/debug/express.c6
-rw-r--r--src/emu/drawgfx.c2
-rw-r--r--src/emu/driver.h11
-rw-r--r--src/emu/emuopts.c1
-rw-r--r--src/emu/emuopts.h1
-rw-r--r--src/emu/hash.c2
-rw-r--r--src/emu/inptport.c10
-rw-r--r--src/emu/inptport.h4
-rw-r--r--src/emu/input.c8
-rw-r--r--src/emu/input.h6
-rw-r--r--src/emu/machine/53c810.c8
-rw-r--r--src/emu/machine/53c810.h4
-rw-r--r--src/emu/machine/6840ptm.c2
-rw-r--r--src/emu/machine/am53cf96.c4
-rw-r--r--src/emu/machine/am53cf96.h4
-rw-r--r--src/emu/machine/cr589.c4
-rw-r--r--src/emu/machine/cr589.h2
-rw-r--r--src/emu/machine/ds2401.c11
-rw-r--r--src/emu/machine/ds2401.h2
-rw-r--r--src/emu/machine/idectrl.c14
-rw-r--r--src/emu/machine/idectrl.h8
-rw-r--r--src/emu/machine/laserdsc.c2
-rw-r--r--src/emu/machine/laserdsc.h2
-rw-r--r--src/emu/machine/mb87078.c4
-rw-r--r--src/emu/machine/roc10937.c2
-rw-r--r--src/emu/machine/rp5h01.c4
-rw-r--r--src/emu/machine/rp5h01.h2
-rw-r--r--src/emu/machine/scsi.c12
-rw-r--r--src/emu/machine/scsi.h18
-rw-r--r--src/emu/machine/scsicd.c2
-rw-r--r--src/emu/machine/scsicd.h2
-rw-r--r--src/emu/machine/scsidev.c2
-rw-r--r--src/emu/machine/scsidev.h2
-rw-r--r--src/emu/machine/scsihd.c2
-rw-r--r--src/emu/machine/scsihd.h2
-rw-r--r--src/emu/machine/smc91c9x.c4
-rw-r--r--src/emu/machine/smc91c9x.h2
-rw-r--r--src/emu/machine/wd33c93.c6
-rw-r--r--src/emu/machine/wd33c93.h4
-rw-r--r--src/emu/machine/z80pio.c2
-rw-r--r--src/emu/machine/z80pio.h2
-rw-r--r--src/emu/mame.c4
-rw-r--r--src/emu/mame.h4
-rw-r--r--src/emu/mamecore.c2
-rw-r--r--src/emu/memory.c8
-rw-r--r--src/emu/memory.h4
-rw-r--r--src/emu/profiler.c2
-rw-r--r--src/emu/rendlay.c2
-rw-r--r--src/emu/sound/c140.c2
-rw-r--r--src/emu/sound/c6280.c2
-rw-r--r--src/emu/sound/discrete.c2
-rw-r--r--src/emu/sound/es5503.c8
-rw-r--r--src/emu/sound/flt_rc.c2
-rw-r--r--src/emu/sound/flt_rc.h2
-rw-r--r--src/emu/sound/fm.c14
-rw-r--r--src/emu/sound/k007232.c4
-rw-r--r--src/emu/sound/k053260.c2
-rw-r--r--src/emu/sound/k054539.c4
-rw-r--r--src/emu/sound/msm5232.c4
-rw-r--r--src/emu/sound/multipcm.c4
-rw-r--r--src/emu/sound/okim6295.c2
-rw-r--r--src/emu/sound/s14001a.c2
-rw-r--r--src/emu/sound/scsp.c29
-rw-r--r--src/emu/sound/scspdsp.c52
-rw-r--r--src/emu/sound/scsplfo.c8
-rw-r--r--src/emu/sound/side6581.h2
-rw-r--r--src/emu/sound/sidenvel.c4
-rw-r--r--src/emu/sound/sidw6581.h8
-rw-r--r--src/emu/sound/sidw8580.h8
-rw-r--r--src/emu/sound/sn76477.c2
-rw-r--r--src/emu/sound/sp0256.c2
-rw-r--r--src/emu/sound/speaker.c4
-rw-r--r--src/emu/sound/tms3615.c2
-rw-r--r--src/emu/sound/tms36xx.c2
-rw-r--r--src/emu/sound/tms5110.c2
-rw-r--r--src/emu/sound/tms5220r.c4
-rw-r--r--src/emu/sound/vlm5030.c2
-rw-r--r--src/emu/sound/ym2151.c14
-rw-r--r--src/emu/sound/ym2413.c2
-rw-r--r--src/emu/sound/ymdeltat.c2
-rw-r--r--src/emu/sound/ymz280b.c2
-rw-r--r--src/emu/state.c2
-rw-r--r--src/emu/ui.c5
-rw-r--r--src/emu/uimenu.c4
-rw-r--r--src/emu/uitext.c4
-rw-r--r--src/emu/validity.c2
-rw-r--r--src/emu/video.c13
-rw-r--r--src/emu/video/rgbutil.h2
-rw-r--r--src/emu/video/s2636.c2
-rw-r--r--src/emu/video/tms34061.c4
-rw-r--r--src/emu/video/tms34061.h2
-rw-r--r--src/emu/video/tms9928a.c4
-rw-r--r--src/emu/video/v9938.c30
-rw-r--r--src/emu/video/vooddefs.h10
-rw-r--r--src/lib/util/options.c2
-rw-r--r--src/lib/util/options.h2
-rw-r--r--src/mame/audio/atarijsa.c2
-rw-r--r--src/mame/audio/berzerk.c4
-rw-r--r--src/mame/audio/cage.c4
-rw-r--r--src/mame/audio/cclimber.c2
-rw-r--r--src/mame/audio/cinemat.c6
-rw-r--r--src/mame/audio/dkong.c12
-rw-r--r--src/mame/audio/gotya.c2
-rw-r--r--src/mame/audio/gyruss.c2
-rw-r--r--src/mame/audio/irem.c8
-rw-r--r--src/mame/audio/mcr.c6
-rw-r--r--src/mame/audio/namcoc7x.h2
-rw-r--r--src/mame/audio/polepos.c6
-rw-r--r--src/mame/audio/rockola.c6
-rw-r--r--src/mame/audio/scramble.c4
-rw-r--r--src/mame/audio/segag80r.c4
-rw-r--r--src/mame/audio/segasnd.c4
-rw-r--r--src/mame/audio/seibu.h8
-rw-r--r--src/mame/audio/senjyo.c2
-rw-r--r--src/mame/audio/spiders.c4
-rw-r--r--src/mame/audio/t5182.c2
-rw-r--r--src/mame/audio/t5182.h2
-rw-r--r--src/mame/audio/taito_en.c2
-rw-r--r--src/mame/audio/taito_en.h2
-rw-r--r--src/mame/audio/tank8.c2
-rw-r--r--src/mame/audio/targ.c2
-rw-r--r--src/mame/audio/timeplt.c4
-rw-r--r--src/mame/audio/timeplt.h2
-rw-r--r--src/mame/audio/williams.c4
-rw-r--r--src/mame/drivers/20pacgal.c2
-rw-r--r--src/mame/drivers/2mindril.c2
-rw-r--r--src/mame/drivers/40love.c4
-rw-r--r--src/mame/drivers/88games.c8
-rw-r--r--src/mame/drivers/actfancr.c2
-rw-r--r--src/mame/drivers/aeroboto.c2
-rw-r--r--src/mame/drivers/aerofgt.c4
-rw-r--r--src/mame/drivers/afega.c2
-rw-r--r--src/mame/drivers/airbustr.c2
-rw-r--r--src/mame/drivers/ajax.c4
-rw-r--r--src/mame/drivers/aleck64.c2
-rw-r--r--src/mame/drivers/alg.c2
-rw-r--r--src/mame/drivers/aliens.c4
-rw-r--r--src/mame/drivers/alpha68k.c18
-rw-r--r--src/mame/drivers/ambush.c4
-rw-r--r--src/mame/drivers/amidar.c2
-rw-r--r--src/mame/drivers/ampoker.c2
-rw-r--r--src/mame/drivers/amspdwy.c2
-rw-r--r--src/mame/drivers/angelkds.c2
-rw-r--r--src/mame/drivers/appoooh.c2
-rw-r--r--src/mame/drivers/aquarium.c2
-rw-r--r--src/mame/drivers/arabian.c2
-rw-r--r--src/mame/drivers/arcadia.c2
-rw-r--r--src/mame/drivers/argus.c2
-rw-r--r--src/mame/drivers/arkanoid.c2
-rw-r--r--src/mame/drivers/artmagic.c2
-rw-r--r--src/mame/drivers/ashnojoe.c4
-rw-r--r--src/mame/drivers/asterix.c2
-rw-r--r--src/mame/drivers/asteroid.c4
-rw-r--r--src/mame/drivers/astrocde.c6
-rw-r--r--src/mame/drivers/asuka.c6
-rw-r--r--src/mame/drivers/atarisy1.c4
-rw-r--r--src/mame/drivers/atarisy2.c8
-rw-r--r--src/mame/drivers/ataxx.c2
-rw-r--r--src/mame/drivers/atetris.c4
-rw-r--r--src/mame/drivers/attckufo.c2
-rw-r--r--src/mame/drivers/backfire.c2
-rw-r--r--src/mame/drivers/bagman.c4
-rw-r--r--src/mame/drivers/balsente.c2
-rw-r--r--src/mame/drivers/baraduke.c2
-rw-r--r--src/mame/drivers/battlane.c2
-rw-r--r--src/mame/drivers/battlera.c2
-rw-r--r--src/mame/drivers/bbusters.c4
-rw-r--r--src/mame/drivers/bfcobra.c10
-rw-r--r--src/mame/drivers/bfm_sc2.c2
-rw-r--r--src/mame/drivers/bigevglf.c2
-rw-r--r--src/mame/drivers/bishi.c2
-rw-r--r--src/mame/drivers/bking2.c6
-rw-r--r--src/mame/drivers/bladestl.c4
-rw-r--r--src/mame/drivers/blktiger.c2
-rw-r--r--src/mame/drivers/blockout.c2
-rw-r--r--src/mame/drivers/blueprnt.c4
-rw-r--r--src/mame/drivers/bmcbowl.c4
-rw-r--r--src/mame/drivers/bnstars.c4
-rw-r--r--src/mame/drivers/boogwing.c2
-rw-r--r--src/mame/drivers/bottom9.c4
-rw-r--r--src/mame/drivers/brkthru.c2
-rw-r--r--src/mame/drivers/btoads.c2
-rw-r--r--src/mame/drivers/bublbobl.c2
-rw-r--r--src/mame/drivers/buggychl.c6
-rw-r--r--src/mame/drivers/bwidow.c4
-rw-r--r--src/mame/drivers/bwing.c2
-rw-r--r--src/mame/drivers/bzone.c8
-rw-r--r--src/mame/drivers/cabal.c8
-rw-r--r--src/mame/drivers/capbowl.c2
-rw-r--r--src/mame/drivers/cardline.c2
-rw-r--r--src/mame/drivers/carrera.c2
-rw-r--r--src/mame/drivers/cave.c8
-rw-r--r--src/mame/drivers/cbuster.c2
-rw-r--r--src/mame/drivers/ccastles.c2
-rw-r--r--src/mame/drivers/cchasm.c2
-rw-r--r--src/mame/drivers/centiped.c8
-rw-r--r--src/mame/drivers/chaknpop.c4
-rw-r--r--src/mame/drivers/cham24.c2
-rw-r--r--src/mame/drivers/champbas.c2
-rw-r--r--src/mame/drivers/champbwl.c2
-rw-r--r--src/mame/drivers/changela.c4
-rw-r--r--src/mame/drivers/cherrym.c2
-rw-r--r--src/mame/drivers/cherrym2.c2
-rw-r--r--src/mame/drivers/chinagat.c6
-rw-r--r--src/mame/drivers/chinsan.c2
-rw-r--r--src/mame/drivers/chqflag.c6
-rw-r--r--src/mame/drivers/cidelsa.c4
-rw-r--r--src/mame/drivers/cinemat.c4
-rw-r--r--src/mame/drivers/citycon.c2
-rw-r--r--src/mame/drivers/cloak.c4
-rw-r--r--src/mame/drivers/cloud9.c2
-rw-r--r--src/mame/drivers/clshroad.c2
-rw-r--r--src/mame/drivers/cninja.c4
-rw-r--r--src/mame/drivers/coinmstr.c2
-rw-r--r--src/mame/drivers/cojag.c8
-rw-r--r--src/mame/drivers/combatsc.c4
-rw-r--r--src/mame/drivers/compgolf.c2
-rw-r--r--src/mame/drivers/coolpool.c4
-rw-r--r--src/mame/drivers/couple.c2
-rw-r--r--src/mame/drivers/cowrace.c2
-rw-r--r--src/mame/drivers/cps1.c6
-rw-r--r--src/mame/drivers/cps2.c2
-rw-r--r--src/mame/drivers/cps3.c6
-rw-r--r--src/mame/drivers/crgolf.c2
-rw-r--r--src/mame/drivers/crimfght.c4
-rw-r--r--src/mame/drivers/crospang.c2
-rw-r--r--src/mame/drivers/crshrace.c2
-rw-r--r--src/mame/drivers/crystal.c2
-rw-r--r--src/mame/drivers/cubocd32.c2
-rw-r--r--src/mame/drivers/cvs.c2
-rw-r--r--src/mame/drivers/cyberbal.c2
-rw-r--r--src/mame/drivers/cybertnk.c2
-rw-r--r--src/mame/drivers/darius.c6
-rw-r--r--src/mame/drivers/darkhors.c2
-rw-r--r--src/mame/drivers/darkseal.c2
-rw-r--r--src/mame/drivers/dassault.c2
-rw-r--r--src/mame/drivers/dblewing.c2
-rw-r--r--src/mame/drivers/dbz.c2
-rw-r--r--src/mame/drivers/ddayjlc.c2
-rw-r--r--src/mame/drivers/ddealer.c2
-rw-r--r--src/mame/drivers/ddenlovr.c6
-rw-r--r--src/mame/drivers/ddragon.c4
-rw-r--r--src/mame/drivers/ddragon3.c2
-rw-r--r--src/mame/drivers/ddrible.c4
-rw-r--r--src/mame/drivers/ddz.c2
-rw-r--r--src/mame/drivers/dec0.c12
-rw-r--r--src/mame/drivers/dec8.c8
-rw-r--r--src/mame/drivers/deco156.c2
-rw-r--r--src/mame/drivers/deco32.c4
-rw-r--r--src/mame/drivers/deco_mlc.c2
-rw-r--r--src/mame/drivers/deniam.c2
-rw-r--r--src/mame/drivers/dietgo.c2
-rw-r--r--src/mame/drivers/discoboy.c2
-rw-r--r--src/mame/drivers/djmain.c28
-rw-r--r--src/mame/drivers/dkong.c4
-rw-r--r--src/mame/drivers/dlair.c4
-rw-r--r--src/mame/drivers/docastle.c2
-rw-r--r--src/mame/drivers/dominob.c2
-rw-r--r--src/mame/drivers/dooyong.c6
-rw-r--r--src/mame/drivers/drmicro.c2
-rw-r--r--src/mame/drivers/drtomy.c4
-rw-r--r--src/mame/drivers/dunhuang.c2
-rw-r--r--src/mame/drivers/dwarfd.c2
-rw-r--r--src/mame/drivers/dynax.c16
-rw-r--r--src/mame/drivers/enigma2.c2
-rw-r--r--src/mame/drivers/eolithsp.c2
-rw-r--r--src/mame/drivers/ettrivia.c4
-rw-r--r--src/mame/drivers/exerion.c2
-rw-r--r--src/mame/drivers/exidy.c2
-rw-r--r--src/mame/drivers/exidy440.c2
-rw-r--r--src/mame/drivers/exprraid.c2
-rw-r--r--src/mame/drivers/exterm.c4
-rw-r--r--src/mame/drivers/exzisus.c2
-rw-r--r--src/mame/drivers/f1gp.c2
-rw-r--r--src/mame/drivers/fantland.c4
-rw-r--r--src/mame/drivers/fastlane.c4
-rw-r--r--src/mame/drivers/filetto.c2
-rw-r--r--src/mame/drivers/findout.c2
-rw-r--r--src/mame/drivers/firebeat.c12
-rw-r--r--src/mame/drivers/firetrap.c2
-rw-r--r--src/mame/drivers/flkatck.c2
-rw-r--r--src/mame/drivers/flower.c2
-rw-r--r--src/mame/drivers/flstory.c4
-rw-r--r--src/mame/drivers/foodf.c2
-rw-r--r--src/mame/drivers/frogger.c2
-rw-r--r--src/mame/drivers/fromanc2.c2
-rw-r--r--src/mame/drivers/fromance.c2
-rw-r--r--src/mame/drivers/funkybee.c2
-rw-r--r--src/mame/drivers/funkyjet.c2
-rw-r--r--src/mame/drivers/funworld.c2
-rw-r--r--src/mame/drivers/fuukifg2.c2
-rw-r--r--src/mame/drivers/fuukifg3.c4
-rw-r--r--src/mame/drivers/gaelco2.c12
-rw-r--r--src/mame/drivers/gaelco3d.c2
-rw-r--r--src/mame/drivers/gaiden.c10
-rw-r--r--src/mame/drivers/galaga.c8
-rw-r--r--src/mame/drivers/galaxian.c4
-rw-r--r--src/mame/drivers/galpani3.c2
-rw-r--r--src/mame/drivers/galspnbl.c2
-rw-r--r--src/mame/drivers/gamecstl.c8
-rw-r--r--src/mame/drivers/gameplan.c10
-rw-r--r--src/mame/drivers/gaplus.c8
-rw-r--r--src/mame/drivers/gbusters.c2
-rw-r--r--src/mame/drivers/gcpinbal.c2
-rw-r--r--src/mame/drivers/gijoe.c2
-rw-r--r--src/mame/drivers/ginganin.c2
-rw-r--r--src/mame/drivers/gladiatr.c8
-rw-r--r--src/mame/drivers/goal92.c4
-rw-r--r--src/mame/drivers/goldstar.c4
-rw-r--r--src/mame/drivers/gomoku.c2
-rw-r--r--src/mame/drivers/gotcha.c2
-rw-r--r--src/mame/drivers/gottlieb.c2
-rw-r--r--src/mame/drivers/gradius3.c2
-rw-r--r--src/mame/drivers/grchamp.c4
-rw-r--r--src/mame/drivers/gridlee.c2
-rw-r--r--src/mame/drivers/groundfx.c2
-rw-r--r--src/mame/drivers/gstriker.c2
-rw-r--r--src/mame/drivers/gsword.c6
-rw-r--r--src/mame/drivers/gticlub.c6
-rw-r--r--src/mame/drivers/gunbustr.c2
-rw-r--r--src/mame/drivers/gyruss.c6
-rw-r--r--src/mame/drivers/halleys.c8
-rw-r--r--src/mame/drivers/hanaawas.c2
-rw-r--r--src/mame/drivers/hanaroku.c2
-rw-r--r--src/mame/drivers/harddriv.c10
-rw-r--r--src/mame/drivers/hcastle.c4
-rw-r--r--src/mame/drivers/hexa.c2
-rw-r--r--src/mame/drivers/hnayayoi.c4
-rw-r--r--src/mame/drivers/hng64.c2
-rw-r--r--src/mame/drivers/holeland.c4
-rw-r--r--src/mame/drivers/homedata.c2
-rw-r--r--src/mame/drivers/homerun.c2
-rw-r--r--src/mame/drivers/hornet.c4
-rw-r--r--src/mame/drivers/hotblock.c2
-rw-r--r--src/mame/drivers/hyhoo.c2
-rw-r--r--src/mame/drivers/hyperspt.c4
-rw-r--r--src/mame/drivers/hyprduel.c2
-rw-r--r--src/mame/drivers/igs_blit.c2
-rw-r--r--src/mame/drivers/inufuku.c2
-rw-r--r--src/mame/drivers/irobot.c2
-rw-r--r--src/mame/drivers/ironhors.c2
-rw-r--r--src/mame/drivers/itech32.c6
-rw-r--r--src/mame/drivers/itech8.c6
-rw-r--r--src/mame/drivers/jack.c2
-rw-r--r--src/mame/drivers/jailbrek.c2
-rw-r--r--src/mame/drivers/jalmah.c10
-rw-r--r--src/mame/drivers/jchan.c2
-rw-r--r--src/mame/drivers/jcross.c2
-rw-r--r--src/mame/drivers/jongkyo.c2
-rw-r--r--src/mame/drivers/jpmimpct.c4
-rw-r--r--src/mame/drivers/jrpacman.c2
-rw-r--r--src/mame/drivers/junofrst.c2
-rw-r--r--src/mame/drivers/kaneko16.c4
-rw-r--r--src/mame/drivers/karnov.c2
-rw-r--r--src/mame/drivers/kchamp.c2
-rw-r--r--src/mame/drivers/kingobox.c2
-rw-r--r--src/mame/drivers/kinst.c4
-rw-r--r--src/mame/drivers/kinstb.c2
-rw-r--r--src/mame/drivers/koikoi.c2
-rw-r--r--src/mame/drivers/konamigq.c6
-rw-r--r--src/mame/drivers/konamigv.c6
-rw-r--r--src/mame/drivers/konamigx.c8
-rw-r--r--src/mame/drivers/konamim2.c2
-rw-r--r--src/mame/drivers/ksayakyu.c4
-rw-r--r--src/mame/drivers/ksys573.c12
-rw-r--r--src/mame/drivers/kyugo.c2
-rw-r--r--src/mame/drivers/labyrunr.c4
-rw-r--r--src/mame/drivers/ladyfrog.c4
-rw-r--r--src/mame/drivers/laserbat.c2
-rw-r--r--src/mame/drivers/lastduel.c2
-rw-r--r--src/mame/drivers/leland.c8
-rw-r--r--src/mame/drivers/lemmings.c2
-rw-r--r--src/mame/drivers/lethal.c2
-rw-r--r--src/mame/drivers/lethalj.c4
-rw-r--r--src/mame/drivers/liberatr.c4
-rw-r--r--src/mame/drivers/limenko.c2
-rw-r--r--src/mame/drivers/lkage.c2
-rw-r--r--src/mame/drivers/lockon.c2
-rw-r--r--src/mame/drivers/looping.c4
-rw-r--r--src/mame/drivers/lordgun.c2
-rw-r--r--src/mame/drivers/lsasquad.c2
-rw-r--r--src/mame/drivers/lucky8.c2
-rw-r--r--src/mame/drivers/lvcards.c2
-rw-r--r--src/mame/drivers/lwings.c2
-rw-r--r--src/mame/drivers/m107.c4
-rw-r--r--src/mame/drivers/m72.c2
-rw-r--r--src/mame/drivers/m90.c2
-rw-r--r--src/mame/drivers/m92.c4
-rw-r--r--src/mame/drivers/macrossp.c2
-rw-r--r--src/mame/drivers/macs.c2
-rw-r--r--src/mame/drivers/madalien.c4
-rw-r--r--src/mame/drivers/madmotor.c2
-rw-r--r--src/mame/drivers/magmax.c2
-rw-r--r--src/mame/drivers/mainevt.c4
-rw-r--r--src/mame/drivers/mainsnk.c2
-rw-r--r--src/mame/drivers/mappy.c10
-rw-r--r--src/mame/drivers/mario.c2
-rw-r--r--src/mame/drivers/marvins.c2
-rw-r--r--src/mame/drivers/mastboy.c2
-rw-r--r--src/mame/drivers/matmania.c2
-rw-r--r--src/mame/drivers/maxaflex.c2
-rw-r--r--src/mame/drivers/mayumi.c2
-rw-r--r--src/mame/drivers/mazerbla.c4
-rw-r--r--src/mame/drivers/mcatadv.c2
-rw-r--r--src/mame/drivers/mcr3.c4
-rw-r--r--src/mame/drivers/meadows.c2
-rw-r--r--src/mame/drivers/mediagx.c6
-rw-r--r--src/mame/drivers/megadriv.c8
-rw-r--r--src/mame/drivers/megasys1.c4
-rw-r--r--src/mame/drivers/megatech.c2
-rw-r--r--src/mame/drivers/megazone.c2
-rw-r--r--src/mame/drivers/meijinsn.c6
-rw-r--r--src/mame/drivers/merit.c2
-rw-r--r--src/mame/drivers/metlclsh.c2
-rw-r--r--src/mame/drivers/metro.c8
-rw-r--r--src/mame/drivers/mexico86.c2
-rw-r--r--src/mame/drivers/mhavoc.c2
-rw-r--r--src/mame/drivers/micro3d.c4
-rw-r--r--src/mame/drivers/midas.c2
-rw-r--r--src/mame/drivers/midtunit.c2
-rw-r--r--src/mame/drivers/midvunit.c6
-rw-r--r--src/mame/drivers/midwunit.c2
-rw-r--r--src/mame/drivers/midxunit.c2
-rw-r--r--src/mame/drivers/midyunit.c4
-rw-r--r--src/mame/drivers/midzeus.c153
-rw-r--r--src/mame/drivers/mirax.c4
-rw-r--r--src/mame/drivers/missb2.c2
-rw-r--r--src/mame/drivers/missile.c2
-rw-r--r--src/mame/drivers/mitchell.c2
-rw-r--r--src/mame/drivers/mjkjidai.c2
-rw-r--r--src/mame/drivers/mjsister.c2
-rw-r--r--src/mame/drivers/mjsiyoub.c4
-rw-r--r--src/mame/drivers/mlanding.c4
-rw-r--r--src/mame/drivers/model1.c4
-rw-r--r--src/mame/drivers/model2.c14
-rw-r--r--src/mame/drivers/model3.c24
-rw-r--r--src/mame/drivers/momoko.c2
-rw-r--r--src/mame/drivers/moo.c2
-rw-r--r--src/mame/drivers/mosaic.c4
-rw-r--r--src/mame/drivers/mpu4drvr.c4
-rw-r--r--src/mame/drivers/mquake.c4
-rw-r--r--src/mame/drivers/ms32.c2
-rw-r--r--src/mame/drivers/msisaac.c2
-rw-r--r--src/mame/drivers/mugsmash.c2
-rw-r--r--src/mame/drivers/multigam.c2
-rw-r--r--src/mame/drivers/mw8080bw.c2
-rw-r--r--src/mame/drivers/mystwarr.c2
-rw-r--r--src/mame/drivers/namcona1.c4
-rw-r--r--src/mame/drivers/namcond1.c2
-rw-r--r--src/mame/drivers/namcos1.c4
-rw-r--r--src/mame/drivers/namcos11.c2
-rw-r--r--src/mame/drivers/namcos12.c340
-rw-r--r--src/mame/drivers/namcos2.c2
-rw-r--r--src/mame/drivers/namcos21.c4
-rw-r--r--src/mame/drivers/namcos22.c2
-rw-r--r--src/mame/drivers/namcos23.c6
-rw-r--r--src/mame/drivers/namcos86.c4
-rw-r--r--src/mame/drivers/naomi.c2
-rw-r--r--src/mame/drivers/naughtyb.c38
-rw-r--r--src/mame/drivers/nbmj8688.c2
-rw-r--r--src/mame/drivers/nbmj8891.c2
-rw-r--r--src/mame/drivers/nbmj8991.c2
-rw-r--r--src/mame/drivers/nbmj9195.c4
-rw-r--r--src/mame/drivers/nemesis.c14
-rw-r--r--src/mame/drivers/ninjakd2.c2
-rw-r--r--src/mame/drivers/ninjaw.c4
-rw-r--r--src/mame/drivers/niyanpai.c2
-rw-r--r--src/mame/drivers/nmg5.c2
-rw-r--r--src/mame/drivers/nmk16.c20
-rw-r--r--src/mame/drivers/nova2001.c4
-rw-r--r--src/mame/drivers/nss.c2
-rw-r--r--src/mame/drivers/nwk-tr.c10
-rw-r--r--src/mame/drivers/nycaptor.c4
-rw-r--r--src/mame/drivers/nyny.c6
-rw-r--r--src/mame/drivers/ojankohs.c8
-rw-r--r--src/mame/drivers/omegrace.c2
-rw-r--r--src/mame/drivers/oneshot.c2
-rw-r--r--src/mame/drivers/onetwo.c2
-rw-r--r--src/mame/drivers/opwolf.c8
-rw-r--r--src/mame/drivers/othunder.c4
-rw-r--r--src/mame/drivers/overdriv.c2
-rw-r--r--src/mame/drivers/pacland.c2
-rw-r--r--src/mame/drivers/pacman.c4
-rw-r--r--src/mame/drivers/pandoras.c2
-rw-r--r--src/mame/drivers/parodius.c2
-rw-r--r--src/mame/drivers/pastelg.c2
-rw-r--r--src/mame/drivers/pcktgal.c2
-rw-r--r--src/mame/drivers/pengo.c2
-rw-r--r--src/mame/drivers/pgm.c2
-rw-r--r--src/mame/drivers/phoenix.c10
-rw-r--r--src/mame/drivers/pipedrm.c4
-rw-r--r--src/mame/drivers/pipeline.c4
-rw-r--r--src/mame/drivers/pitnrun.c2
-rw-r--r--src/mame/drivers/pkscram.c2
-rw-r--r--src/mame/drivers/pkunwar.c4
-rw-r--r--src/mame/drivers/playch10.c2
-rw-r--r--src/mame/drivers/plygonet.c2
-rw-r--r--src/mame/drivers/pntnpuzl.c2
-rw-r--r--src/mame/drivers/polepos.c10
-rw-r--r--src/mame/drivers/policetr.c2
-rw-r--r--src/mame/drivers/popeye.c2
-rw-r--r--src/mame/drivers/powerins.c2
-rw-r--r--src/mame/drivers/prehisle.c4
-rw-r--r--src/mame/drivers/progolf.c10
-rw-r--r--src/mame/drivers/psikyo.c6
-rw-r--r--src/mame/drivers/psikyo4.c2
-rw-r--r--src/mame/drivers/psikyosh.c4
-rw-r--r--src/mame/drivers/psychic5.c2
-rw-r--r--src/mame/drivers/pturn.c2
-rw-r--r--src/mame/drivers/puckpkmn.c2
-rw-r--r--src/mame/drivers/punchout.c4
-rw-r--r--src/mame/drivers/pushman.c2
-rw-r--r--src/mame/drivers/qdrmfgp.c8
-rw-r--r--src/mame/drivers/quantum.c4
-rw-r--r--src/mame/drivers/quizdna.c2
-rw-r--r--src/mame/drivers/r2dtank.c6
-rw-r--r--src/mame/drivers/raiders5.c4
-rw-r--r--src/mame/drivers/rainbow.c2
-rw-r--r--src/mame/drivers/rallyx.c2
-rw-r--r--src/mame/drivers/rastan.c4
-rw-r--r--src/mame/drivers/rcasino.c2
-rw-r--r--src/mame/drivers/realbrk.c2
-rw-r--r--src/mame/drivers/redalert.c4
-rw-r--r--src/mame/drivers/renegade.c4
-rw-r--r--src/mame/drivers/rmhaihai.c4
-rw-r--r--src/mame/drivers/rockola.c2
-rw-r--r--src/mame/drivers/rockrage.c2
-rw-r--r--src/mame/drivers/rohga.c2
-rw-r--r--src/mame/drivers/rollerg.c2
-rw-r--r--src/mame/drivers/route16.c2
-rw-r--r--src/mame/drivers/royalmah.c2
-rw-r--r--src/mame/drivers/rpunch.c4
-rw-r--r--src/mame/drivers/runaway.c4
-rw-r--r--src/mame/drivers/rungun.c2
-rw-r--r--src/mame/drivers/sandscrp.c2
-rw-r--r--src/mame/drivers/sbasketb.c2
-rw-r--r--src/mame/drivers/scobra.c4
-rw-r--r--src/mame/drivers/scramble.c18
-rw-r--r--src/mame/drivers/seattle.c6
-rw-r--r--src/mame/drivers/segac2.c4
-rw-r--r--src/mame/drivers/segae.c20
-rw-r--r--src/mame/drivers/segahang.c6
-rw-r--r--src/mame/drivers/segaorun.c6
-rw-r--r--src/mame/drivers/segas16a.c4
-rw-r--r--src/mame/drivers/segas16b.c8
-rw-r--r--src/mame/drivers/segas24.c56
-rw-r--r--src/mame/drivers/segas32.c10
-rw-r--r--src/mame/drivers/segaxbd.c6
-rw-r--r--src/mame/drivers/segaybd.c6
-rw-r--r--src/mame/drivers/seibuspi.c2
-rw-r--r--src/mame/drivers/seicross.c2
-rw-r--r--src/mame/drivers/senjyo.c2
-rw-r--r--src/mame/drivers/seta.c10
-rw-r--r--src/mame/drivers/seta2.c2
-rw-r--r--src/mame/drivers/sf.c12
-rw-r--r--src/mame/drivers/shadfrce.c2
-rw-r--r--src/mame/drivers/shangha3.c6
-rw-r--r--src/mame/drivers/shanghai.c6
-rw-r--r--src/mame/drivers/shisen.c110
-rw-r--r--src/mame/drivers/shootout.c4
-rw-r--r--src/mame/drivers/sidearms.c4
-rw-r--r--src/mame/drivers/sidepckt.c2
-rw-r--r--src/mame/drivers/simpsons.c2
-rw-r--r--src/mame/drivers/skydiver.c2
-rw-r--r--src/mame/drivers/skykid.c2
-rw-r--r--src/mame/drivers/skylncr.c2
-rw-r--r--src/mame/drivers/slapfght.c4
-rw-r--r--src/mame/drivers/slapshot.c2
-rw-r--r--src/mame/drivers/sliver.c2
-rw-r--r--src/mame/drivers/snk.c8
-rw-r--r--src/mame/drivers/snk68.c4
-rw-r--r--src/mame/drivers/snowbros.c4
-rw-r--r--src/mame/drivers/spbactn.c2
-rw-r--r--src/mame/drivers/spcforce.c2
-rw-r--r--src/mame/drivers/spdodgeb.c4
-rw-r--r--src/mame/drivers/speglsht.c4
-rw-r--r--src/mame/drivers/spiders.c2
-rw-r--r--src/mame/drivers/splash.c4
-rw-r--r--src/mame/drivers/spy.c6
-rw-r--r--src/mame/drivers/srmp2.c4
-rw-r--r--src/mame/drivers/srmp5.c4
-rw-r--r--src/mame/drivers/ssf2md.c2
-rw-r--r--src/mame/drivers/sshangha.c2
-rw-r--r--src/mame/drivers/ssrj.c2
-rw-r--r--src/mame/drivers/ssv.c68
-rw-r--r--src/mame/drivers/st0016.c2
-rw-r--r--src/mame/drivers/stadhero.c2
-rw-r--r--src/mame/drivers/starcrus.c2
-rw-r--r--src/mame/drivers/starwars.c18
-rw-r--r--src/mame/drivers/stfight.c2
-rw-r--r--src/mame/drivers/stv.c8
-rw-r--r--src/mame/drivers/suna16.c4
-rw-r--r--src/mame/drivers/suna8.c6
-rw-r--r--src/mame/drivers/supbtime.c2
-rw-r--r--src/mame/drivers/superdq.c2
-rw-r--r--src/mame/drivers/superqix.c14
-rw-r--r--src/mame/drivers/suprgolf.c2
-rw-r--r--src/mame/drivers/suprnova.c2
-rw-r--r--src/mame/drivers/suprridr.c2
-rw-r--r--src/mame/drivers/suprslam.c2
-rw-r--r--src/mame/drivers/surpratk.c2
-rw-r--r--src/mame/drivers/system1.c2
-rw-r--r--src/mame/drivers/system16.c20
-rw-r--r--src/mame/drivers/system18.c2
-rw-r--r--src/mame/drivers/tail2nos.c2
-rw-r--r--src/mame/drivers/taito_b.c8
-rw-r--r--src/mame/drivers/taito_f2.c4
-rw-r--r--src/mame/drivers/taito_h.c4
-rw-r--r--src/mame/drivers/taito_l.c12
-rw-r--r--src/mame/drivers/taito_x.c6
-rw-r--r--src/mame/drivers/taito_z.c8
-rw-r--r--src/mame/drivers/taitoair.c2
-rw-r--r--src/mame/drivers/taitosj.c10
-rw-r--r--src/mame/drivers/taitowlf.c8
-rw-r--r--src/mame/drivers/tankbust.c2
-rw-r--r--src/mame/drivers/taotaido.c2
-rw-r--r--src/mame/drivers/tatsumi.c2
-rw-r--r--src/mame/drivers/tattack.c2
-rw-r--r--src/mame/drivers/taxidrvr.c4
-rw-r--r--src/mame/drivers/tbowl.c4
-rw-r--r--src/mame/drivers/tceptor.c2
-rw-r--r--src/mame/drivers/tecmo.c4
-rw-r--r--src/mame/drivers/tecmo16.c2
-rw-r--r--src/mame/drivers/tecmosys.c4
-rw-r--r--src/mame/drivers/tehkanwc.c6
-rw-r--r--src/mame/drivers/tempest.c4
-rw-r--r--src/mame/drivers/tetrisp2.c2
-rw-r--r--src/mame/drivers/thedeep.c2
-rw-r--r--src/mame/drivers/thepit.c2
-rw-r--r--src/mame/drivers/thunderx.c2
-rw-r--r--src/mame/drivers/tiamc1.c2
-rw-r--r--src/mame/drivers/tickee.c6
-rw-r--r--src/mame/drivers/tigeroad.c12
-rw-r--r--src/mame/drivers/timelimt.c9
-rw-r--r--src/mame/drivers/tmnt.c12
-rw-r--r--src/mame/drivers/tnzs.c8
-rw-r--r--src/mame/drivers/toaplan1.c2
-rw-r--r--src/mame/drivers/toaplan2.c4
-rw-r--r--src/mame/drivers/toki.c2
-rw-r--r--src/mame/drivers/topspeed.c4
-rw-r--r--src/mame/drivers/toypop.c10
-rw-r--r--src/mame/drivers/trackfld.c4
-rw-r--r--src/mame/drivers/trvquest.c6
-rw-r--r--src/mame/drivers/tubep.c8
-rw-r--r--src/mame/drivers/tumbleb.c4
-rw-r--r--src/mame/drivers/tumblep.c2
-rw-r--r--src/mame/drivers/tunhunt.c4
-rw-r--r--src/mame/drivers/twin16.c4
-rw-r--r--src/mame/drivers/twincobr.c2
-rw-r--r--src/mame/drivers/twins.c2
-rw-r--r--src/mame/drivers/tx1.c6
-rw-r--r--src/mame/drivers/ultrsprt.c4
-rw-r--r--src/mame/drivers/upscope.c2
-rw-r--r--src/mame/drivers/vaportra.c2
-rw-r--r--src/mame/drivers/vastar.c2
-rw-r--r--src/mame/drivers/vball.c2
-rw-r--r--src/mame/drivers/vegas.c6
-rw-r--r--src/mame/drivers/vendetta.c2
-rw-r--r--src/mame/drivers/vertigo.c2
-rw-r--r--src/mame/drivers/victory.c2
-rw-r--r--src/mame/drivers/videopin.c2
-rw-r--r--src/mame/drivers/vigilant.c4
-rw-r--r--src/mame/drivers/viper.c10
-rw-r--r--src/mame/drivers/volfied.c2
-rw-r--r--src/mame/drivers/vroulet.c2
-rw-r--r--src/mame/drivers/vsnes.c4
-rw-r--r--src/mame/drivers/wardner.c2
-rw-r--r--src/mame/drivers/warpwarp.c4
-rw-r--r--src/mame/drivers/warriorb.c4
-rw-r--r--src/mame/drivers/wc90.c2
-rw-r--r--src/mame/drivers/wc90b.c4
-rw-r--r--src/mame/drivers/wecleman.c8
-rw-r--r--src/mame/drivers/welltris.c2
-rw-r--r--src/mame/drivers/wgp.c2
-rw-r--r--src/mame/drivers/wink.c2
-rw-r--r--src/mame/drivers/wiping.c2
-rw-r--r--src/mame/drivers/witch.c6
-rw-r--r--src/mame/drivers/wolfpack.c2
-rw-r--r--src/mame/drivers/wwfsstar.c2
-rw-r--r--src/mame/drivers/wwfwfest.c2
-rw-r--r--src/mame/drivers/xain.c2
-rw-r--r--src/mame/drivers/xexex.c2
-rw-r--r--src/mame/drivers/xmen.c2
-rw-r--r--src/mame/drivers/xtheball.c2
-rw-r--r--src/mame/drivers/xxmissio.c4
-rw-r--r--src/mame/drivers/yamato.c10
-rw-r--r--src/mame/drivers/yiear.c2
-rw-r--r--src/mame/drivers/yunsun16.c2
-rw-r--r--src/mame/drivers/yunsung8.c2
-rw-r--r--src/mame/drivers/zaccaria.c6
-rw-r--r--src/mame/drivers/zaxxon.c2
-rw-r--r--src/mame/drivers/zn.c16
-rw-r--r--src/mame/drivers/zr107.c4
-rw-r--r--src/mame/includes/amiga.h2
-rw-r--r--src/mame/includes/cclimber.h2
-rw-r--r--src/mame/includes/cps1.h2
-rw-r--r--src/mame/includes/galaga.h2
-rw-r--r--src/mame/includes/mcr.h8
-rw-r--r--src/mame/includes/n64.h2
-rw-r--r--src/mame/includes/starwars.h12
-rw-r--r--src/mame/includes/system16.h4
-rw-r--r--src/mame/machine/amiga.c4
-rw-r--r--src/mame/machine/bagman.c2
-rw-r--r--src/mame/machine/balsente.c2
-rw-r--r--src/mame/machine/beezer.c4
-rw-r--r--src/mame/machine/bfm_bd1.c2
-rw-r--r--src/mame/machine/bublbobl.c4
-rw-r--r--src/mame/machine/carpolo.c10
-rw-r--r--src/mame/machine/cchip.c2
-rw-r--r--src/mame/machine/copsnrob.c2
-rw-r--r--src/mame/machine/cubocd32.c2
-rw-r--r--src/mame/machine/daikaiju.c2
-rw-r--r--src/mame/machine/deco102.c6
-rw-r--r--src/mame/machine/equites.c28
-rw-r--r--src/mame/machine/fd1089.c12
-rw-r--r--src/mame/machine/konamigx.c14
-rw-r--r--src/mame/machine/mcr.c10
-rw-r--r--src/mame/machine/mexico86.c6
-rw-r--r--src/mame/machine/midwayic.c4
-rw-r--r--src/mame/machine/model1.c2
-rw-r--r--src/mame/machine/model3.c2
-rw-r--r--src/mame/machine/n64.c2
-rw-r--r--src/mame/machine/namcoio.c2
-rw-r--r--src/mame/machine/neoboot.c2
-rw-r--r--src/mame/machine/neoprot.c10
-rw-r--r--src/mame/machine/nmk004.c8
-rw-r--r--src/mame/machine/pckeybrd.c8
-rw-r--r--src/mame/machine/pcshare.c8
-rw-r--r--src/mame/machine/pgmcrypt.c6
-rw-r--r--src/mame/machine/pgmprot.c18
-rw-r--r--src/mame/machine/playch10.c2
-rw-r--r--src/mame/machine/psx.c2
-rw-r--r--src/mame/machine/scramble.c2
-rw-r--r--src/mame/machine/scudsp.c22
-rw-r--r--src/mame/machine/segacrpt.c2
-rw-r--r--src/mame/machine/segas32.c6
-rw-r--r--src/mame/machine/snes.c6
-rw-r--r--src/mame/machine/starwars.c62
-rw-r--r--src/mame/machine/stfight.c2
-rw-r--r--src/mame/machine/stvprot.c2
-rw-r--r--src/mame/machine/system16.c2
-rw-r--r--src/mame/machine/twincobr.c2
-rw-r--r--src/mame/machine/vertigo.c4
-rw-r--r--src/mame/machine/volfied.c2
-rw-r--r--src/mame/machine/vsnes.c12
-rw-r--r--src/mame/mamedriv.c6
-rw-r--r--src/mame/video/20pacgal.c2
-rw-r--r--src/mame/video/atari.c10
-rw-r--r--src/mame/video/avgdvg.c16
-rw-r--r--src/mame/video/blktiger.c2
-rw-r--r--src/mame/video/bwing.c2
-rw-r--r--src/mame/video/capbowl.c2
-rw-r--r--src/mame/video/cps1.c1
-rw-r--r--src/mame/video/cvs.c2
-rw-r--r--src/mame/video/ddrible.c4
-rw-r--r--src/mame/video/digdug.c2
-rw-r--r--src/mame/video/djmain.c6
-rw-r--r--src/mame/video/gaelco.c4
-rw-r--r--src/mame/video/gaelco2.c2
-rw-r--r--src/mame/video/galaga.c4
-rw-r--r--src/mame/video/gaplus.c2
-rw-r--r--src/mame/video/gladiatr.c2
-rw-r--r--src/mame/video/gradius3.c2
-rw-r--r--src/mame/video/gtia.c4
-rw-r--r--src/mame/video/homedata.c9
-rw-r--r--src/mame/video/itech8.c2
-rw-r--r--src/mame/video/jagobj.c6
-rw-r--r--src/mame/video/konamiic.c28
-rw-r--r--src/mame/video/liberatr.c2
-rw-r--r--src/mame/video/lordgun.c2
-rw-r--r--src/mame/video/midtunit.c2
-rw-r--r--src/mame/video/midyunit.c2
-rw-r--r--src/mame/video/midzeus.c2080
-rw-r--r--src/mame/video/model2.c2
-rw-r--r--src/mame/video/n64.c6
-rw-r--r--src/mame/video/namcona1.c2
-rw-r--r--src/mame/video/namcos1.c2
-rw-r--r--src/mame/video/pacland.c2
-rw-r--r--src/mame/video/psx.c24
-rw-r--r--src/mame/video/qix.c2
-rw-r--r--src/mame/video/redalert.c2
-rw-r--r--src/mame/video/retofinv.c2
-rw-r--r--src/mame/video/sauro.c6
-rw-r--r--src/mame/video/segas32.c4
-rw-r--r--src/mame/video/seibuspi.c4
-rw-r--r--src/mame/video/senjyo.c2
-rw-r--r--src/mame/video/seta.c6
-rw-r--r--src/mame/video/sf.c2
-rw-r--r--src/mame/video/skykid.c2
-rw-r--r--src/mame/video/snes.c6
-rw-r--r--src/mame/video/stactics.c2
-rw-r--r--src/mame/video/suprnova.c2
-rw-r--r--src/mame/video/system16.c4
-rw-r--r--src/mame/video/taito_h.c2
-rw-r--r--src/mame/video/taitoair.c2
-rw-r--r--src/mame/video/taitoic.c10
-rw-r--r--src/mame/video/taitosj.c6
-rw-r--r--src/mame/video/tehkanwc.c2
-rw-r--r--src/mame/video/thoop2.c4
-rw-r--r--src/mame/video/vicdual.c2
-rw-r--r--src/mame/video/vrender0.c4
-rw-r--r--src/mame/video/warpwarp.c4
-rw-r--r--src/mame/video/wc90.c70
-rw-r--r--src/mame/video/wecleman.c7
-rw-r--r--src/mame/video/wgp.c4
-rw-r--r--src/mame/video/wrally.c4
-rw-r--r--src/mame/video/ygv608.c4
-rw-r--r--src/osd/windows/d3d8intf.c10
-rw-r--r--src/osd/windows/d3d9intf.c10
-rw-r--r--src/osd/windows/drawd3d.c2
-rw-r--r--src/osd/windows/input.c8
-rw-r--r--src/version.c2
851 files changed, 3272 insertions, 3277 deletions
diff --git a/docs/config.txt b/docs/config.txt
index cd29497cc89..5c7625d5f7a 100644
--- a/docs/config.txt
+++ b/docs/config.txt
@@ -877,6 +877,13 @@ Debugging options
reporting bugs, please run with mame -verbose and include the
resulting information. The default is OFF (-noverbose).
+-[no]update_in_pause
+
+ Enables updating of the main screen bitmap while the game is paused.
+ This means that the VIDEO_UPDATE callback will be called repeatedly
+ during pause, which can be useful for debugging. The default is OFF
+ (-noupdate_in_pause).
+
-[no]debug
Activates the integrated debugger. This is available only if the
diff --git a/makefile b/makefile
index fff99618e4d..8aff71a3aa5 100644
--- a/makefile
+++ b/makefile
@@ -495,12 +495,16 @@ $(sort $(OBJDIRS)):
# executable targets and dependencies
#-------------------------------------------------
+ifndef EXECUTABLE_DEFINED
+
$(EMULATOR): $(VERSIONOBJ) $(DRVLIBS) $(LIBOSD) $(LIBEMU) $(LIBCPU) $(LIBSOUND) $(LIBUTIL) $(EXPAT) $(ZLIB) $(LIBOCORE) $(RESFILE)
# always recompile the version string
$(CC) $(CDEFS) $(CFLAGS) -c $(SRC)/version.c -o $(VERSIONOBJ)
@echo Linking $@...
$(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $^ $(LIBS) -o $@
+endif
+
#-------------------------------------------------
diff --git a/src/emu/cheat.c b/src/emu/cheat.c
index 599f4d2d250..d4c89b4389e 100644
--- a/src/emu/cheat.c
+++ b/src/emu/cheat.c
@@ -563,7 +563,7 @@ static INT32 menuItemInfoLength = 0;
static UINT32 cheatOptions = 2;
-static const char * kCheatNameTemplates[] =
+static const char *const kCheatNameTemplates[] =
{
"Infinite Credits",
"Infinite Time",
@@ -724,14 +724,14 @@ static const UINT32 kPrefillValueTable[] =
0x01
};
-static const char * kWatchLabelStringList[] =
+static const char *const kWatchLabelStringList[] =
{
"None",
"Address",
"String"
};
-static const char * kWatchDisplayTypeStringList[] =
+static const char *const kWatchDisplayTypeStringList[] =
{
"Hex",
"Decimal",
@@ -2827,7 +2827,7 @@ static int AddEditCheatMenu(int selection)
static int EditCheatMenu(CheatEntry * entry, int index, int selection)
{
- static const char * kTypeNames[] =
+ static const char *const kTypeNames[] =
{
"Normal/Delay",
"Wait",
@@ -2837,7 +2837,7 @@ static int EditCheatMenu(CheatEntry * entry, int index, int selection)
"Select"
};
- static const char * kNumbersTable[] =
+ static const char *const kNumbersTable[] =
{
"0", "1", "2", "3", "4", "5", "6", "7",
"8", "9", "10", "11", "12", "13", "14", "15",
@@ -2845,7 +2845,7 @@ static int EditCheatMenu(CheatEntry * entry, int index, int selection)
"24", "25", "26", "27", "28", "29", "30", "31"
};
- static const char * kOperationNames[] =
+ static const char *const kOperationNames[] =
{
"Write",
"Add/Subtract",
@@ -2857,19 +2857,19 @@ static int EditCheatMenu(CheatEntry * entry, int index, int selection)
"Null"
};
- static const char * kAddSubtractNames[] =
+ static const char *const kAddSubtractNames[] =
{
"Add",
"Subtract"
};
- static const char * kSetClearNames[] =
+ static const char *const kSetClearNames[] =
{
"Set",
"Clear"
};
- static const char * kPrefillNames[] =
+ static const char *const kPrefillNames[] =
{
"None",
"FF",
@@ -2877,13 +2877,13 @@ static int EditCheatMenu(CheatEntry * entry, int index, int selection)
"01"
};
- static const char * kEndiannessNames[] =
+ static const char *const kEndiannessNames[] =
{
"Normal",
"Swap"
};
- static const char * kRegionNames[] =
+ static const char *const kRegionNames[] =
{
"CPU1", "CPU2", "CPU3", "CPU4", "CPU5", "CPU6", "CPU7", "CPU8",
"GFX1", "GFX2", "GFX3", "GFX4", "GFX5", "GFX6", "GFX7", "GFX8",
@@ -2892,7 +2892,7 @@ static int EditCheatMenu(CheatEntry * entry, int index, int selection)
"USER1", "USER2", "USER3", "USER4", "USER5", "USER6", "USER7", "USER8"
};
- static const char * kLocationNames[] =
+ static const char *const kLocationNames[] =
{
"Normal",
"Region",
@@ -2904,7 +2904,7 @@ static int EditCheatMenu(CheatEntry * entry, int index, int selection)
"Unused (7)"
};
- static const char * kCustomLocationNames[] =
+ static const char *const kCustomLocationNames[] =
{
"Comment",
"EEPROM",
@@ -2917,7 +2917,7 @@ static int EditCheatMenu(CheatEntry * entry, int index, int selection)
"Unused (28)", "Unused (29)", "Unused (30)", "Unused (31)"
};
- static const char * kSizeNames[] =
+ static const char *const kSizeNames[] =
{
"8 Bit",
"16 Bit",
@@ -5270,7 +5270,7 @@ static int DoSearchMenuMinimum(int selection)
static int DoSearchMenuClassic(int selection)
{
- static const char * energyStrings[] =
+ static const char *const energyStrings[] =
{
"Less",
"Greater",
@@ -5278,13 +5278,13 @@ static int DoSearchMenuClassic(int selection)
"Greater or Equal",
};
- static const char * equalOrNotStrings[] =
+ static const char *const equalOrNotStrings[] =
{
"Equal",
"Not Equal",
};
- static const char * operandStrings[] =
+ static const char *const operandStrings[] =
{
"Previous Data",
"First Data",
@@ -5800,7 +5800,7 @@ static int DoSearchMenuClassic(int selection)
static int DoSearchMenu(int selection)
{
/* menu stirngs */
- static const char * kOperandNameTable[] =
+ static const char *const kOperandNameTable[] =
{
"Current Data",
"Previous Data",
@@ -5808,7 +5808,7 @@ static int DoSearchMenu(int selection)
"Value"
};
- static const char * kComparisonNameTable[] =
+ static const char *const kComparisonNameTable[] =
{
"Less",
"Greater",
@@ -5820,7 +5820,7 @@ static int DoSearchMenu(int selection)
"Near To"
};
- static const char * kSearchByteNameTable[] =
+ static const char *const kSearchByteNameTable[] =
{
"1",
"2",
@@ -6289,7 +6289,7 @@ static int DoSearchMenu(int selection)
static int SelectSearchRegions(int selection, SearchInfo * search)
{
- static const char * kSearchSpeedList[] =
+ static const char *const kSearchSpeedList[] =
{
"Fast",
"Medium",
@@ -7066,7 +7066,7 @@ static int EditWatch(WatchInfo * entry, int selection)
kMenu_Return
};
- static const char * kWatchSizeStringList[] =
+ static const char *const kWatchSizeStringList[] =
{
"8 Bit",
"16 Bit",
@@ -9246,7 +9246,7 @@ static int ConvertOldCode(int code, int cpu, int * data, int * extendData)
UINT8 customField;
};
- static struct ConversionTable kConversionTable[] =
+ static const struct ConversionTable kConversionTable[] =
{
{ 0, 0x00000000, kCustomField_None },
{ 1, 0x00000001, kCustomField_None },
@@ -9313,7 +9313,7 @@ static int ConvertOldCode(int code, int cpu, int * data, int * extendData)
{ -1, 0x00000000, kCustomField_End }
};
- struct ConversionTable * traverse = kConversionTable;
+ const struct ConversionTable * traverse = kConversionTable;
UINT32 newCode;
UINT8 linkCheat = 0;
diff --git a/src/emu/cpu/adsp2100/2100ops.c b/src/emu/cpu/adsp2100/2100ops.c
index 0d50f217bcf..403b69bd77d 100644
--- a/src/emu/cpu/adsp2100/2100ops.c
+++ b/src/emu/cpu/adsp2100/2100ops.c
@@ -420,7 +420,7 @@ static void wr_topstack(INT32 val) { pc_stack_push_val(val & 0x3fff); }
#define WRITE_REG(grp,reg,val) ((*wr_reg[grp][reg])(val))
-static void (*wr_reg[4][16])(INT32) =
+static void (*const wr_reg[4][16])(INT32) =
{
{
wr_ax0, wr_ax1, wr_mx0, wr_mx1, wr_ay0, wr_ay1, wr_my0, wr_my1,
@@ -681,7 +681,7 @@ INLINE UINT32 pgm_read_dag2(UINT32 op)
#define ALU_GETYREG_UNSIGNED(y) (*(UINT16 *)alu_yregs[y])
#define ALU_GETYREG_SIGNED(y) (*( INT16 *)alu_yregs[y])
-static const void *alu_xregs[8] =
+static const void *const alu_xregs[8] =
{
&adsp2100.core.ax0,
&adsp2100.core.ax1,
@@ -693,7 +693,7 @@ static const void *alu_xregs[8] =
&adsp2100.core.sr.srx.sr1
};
-static const void *alu_yregs[4] =
+static const void *const alu_yregs[4] =
{
&adsp2100.core.ay0,
&adsp2100.core.ay1,
@@ -712,7 +712,7 @@ static const void *alu_yregs[4] =
#define MAC_GETYREG_UNSIGNED(y) (*(UINT16 *)mac_yregs[y])
#define MAC_GETYREG_SIGNED(y) (*( INT16 *)mac_yregs[y])
-static const void *mac_xregs[8] =
+static const void *const mac_xregs[8] =
{
&adsp2100.core.mx0,
&adsp2100.core.mx1,
@@ -724,7 +724,7 @@ static const void *mac_xregs[8] =
&adsp2100.core.sr.srx.sr1
};
-static const void *mac_yregs[4] =
+static const void *const mac_yregs[4] =
{
&adsp2100.core.my0,
&adsp2100.core.my1,
@@ -741,7 +741,7 @@ static const void *mac_yregs[4] =
#define SHIFT_GETXREG_UNSIGNED(x) (*(UINT16 *)shift_xregs[x])
#define SHIFT_GETXREG_SIGNED(x) (*( INT16 *)shift_xregs[x])
-static const void *shift_xregs[8] =
+static const void *const shift_xregs[8] =
{
&adsp2100.core.si,
&adsp2100.core.si,
diff --git a/src/emu/cpu/asap/asap.c b/src/emu/cpu/asap/asap.c
index 91278197f75..b478d0be54f 100644
--- a/src/emu/cpu/asap/asap.c
+++ b/src/emu/cpu/asap/asap.c
@@ -217,7 +217,7 @@ static void jsr_c(void);
static void jsr_c0(void);
static void trapf(void);
-static void (*opcodetable[32][4])(void) =
+static void (*const opcodetable[32][4])(void) =
{
{ trap0, trap0, trap0, trap0 },
{ NULL, NULL, NULL, NULL },
@@ -253,7 +253,7 @@ static void (*opcodetable[32][4])(void) =
{ trapf, trapf, trapf, trapf }
};
-static void (*conditiontable[16])(void) =
+static void (*const conditiontable[16])(void) =
{
bsp, bmz, bgt, ble, bge, blt, bhi, bls,
bcc, bcs, bpl, bmi, bne, beq, bvc, bvs
diff --git a/src/emu/cpu/h6280/tblh6280.c b/src/emu/cpu/h6280/tblh6280.c
index 1cd317e5a03..da4c7b2532d 100644
--- a/src/emu/cpu/h6280/tblh6280.c
+++ b/src/emu/cpu/h6280/tblh6280.c
@@ -308,7 +308,7 @@ OP(_0bf) { int tmp; H6280_CYCLES(4); RD_ZPG; BBS(3); } // 6/8 BBS3 ZPG,REL
OP(_0df) { int tmp; H6280_CYCLES(4); RD_ZPG; BBS(5); } // 6/8 BBS5 ZPG,REL
OP(_0ff) { int tmp; H6280_CYCLES(4); RD_ZPG; BBS(7); } // 6/8 BBS7 ZPG,REL
-static void (*insnh6280[0x100])(void) = {
+static void (*const insnh6280[0x100])(void) = {
h6280_000,h6280_001,h6280_002,h6280_003,h6280_004,h6280_005,h6280_006,h6280_007,
h6280_008,h6280_009,h6280_00a,h6280_00b,h6280_00c,h6280_00d,h6280_00e,h6280_00f,
h6280_010,h6280_011,h6280_012,h6280_013,h6280_014,h6280_015,h6280_016,h6280_017,
diff --git a/src/emu/cpu/hd6309/6309dasm.c b/src/emu/cpu/hd6309/6309dasm.c
index f558de9a633..0b36b6a1804 100644
--- a/src/emu/cpu/hd6309/6309dasm.c
+++ b/src/emu/cpu/hd6309/6309dasm.c
@@ -574,7 +574,7 @@ static const opcodeinfo hd6309_pg2opcodes[] =
{ 0xFB, 4, "ADDF", EXT }
};
-static const opcodeinfo *hd6309_pgpointers[3] =
+static const opcodeinfo *const hd6309_pgpointers[3] =
{
hd6309_pg0opcodes, hd6309_pg1opcodes, hd6309_pg2opcodes
};
diff --git a/src/emu/cpu/hd6309/6309ops.c b/src/emu/cpu/hd6309/6309ops.c
index ed3e6098584..3894d49404c 100644
--- a/src/emu/cpu/hd6309/6309ops.c
+++ b/src/emu/cpu/hd6309/6309ops.c
@@ -1344,7 +1344,7 @@ INLINE void swi( void )
#define decodePB_dst(n) (((n) >> 0) & 0x07)
static UINT8 dummy_byte;
-static unsigned char *regTable[4] = { &(CC), &(A), &(B), &dummy_byte };
+static unsigned char *const regTable[4] = { &(CC), &(A), &(B), &dummy_byte };
static const UINT8 bitTable[] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 };
diff --git a/src/emu/cpu/i86/ea.h b/src/emu/cpu/i86/ea.h
index 3dbb6e0e802..dca12337a5b 100644
--- a/src/emu/cpu/i86/ea.h
+++ b/src/emu/cpu/i86/ea.h
@@ -28,7 +28,7 @@ static unsigned EA_205(void) { i8086_ICount-=9; EO=FETCHOP; EO+=FETCHOP<<8; EO+=
static unsigned EA_206(void) { i8086_ICount-=9; EO=FETCHOP; EO+=FETCHOP<<8; EO+=I.regs.w[BP]; EA=DefaultBase(SS)+(WORD)EO; return EA; }
static unsigned EA_207(void) { i8086_ICount-=9; EO=FETCHOP; EO+=FETCHOP<<8; EO+=I.regs.w[BX]; EA=DefaultBase(DS)+(WORD)EO; return EA; }
-static unsigned (*GetEA[192])(void)={
+static unsigned (*const GetEA[192])(void)={
EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
diff --git a/src/emu/cpu/konami/konamtbl.c b/src/emu/cpu/konami/konamtbl.c
index f2725c3be73..d9a8c770194 100644
--- a/src/emu/cpu/konami/konamtbl.c
+++ b/src/emu/cpu/konami/konamtbl.c
@@ -350,7 +350,7 @@ INLINE void absd( void );
INLINE void opcode2( void );
-static void (*konami_main[0x100])(void) = {
+static void (*const konami_main[0x100])(void) = {
illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal, /* 00 */
opcode2,opcode2,opcode2,opcode2,pshs ,pshu ,puls ,pulu ,
lda_im ,ldb_im ,opcode2,opcode2,adda_im,addb_im,opcode2,opcode2, /* 10 */
@@ -385,7 +385,7 @@ static void (*konami_main[0x100])(void) = {
illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal
};
-static void (*konami_indexed[0x100])(void) = {
+static void (*const konami_indexed[0x100])(void) = {
illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal, /* 00 */
leax ,leay ,leau ,leas ,illegal,illegal,illegal,illegal,
illegal,illegal,lda_ix ,ldb_ix ,illegal,illegal,adda_ix,addb_ix, /* 10 */
@@ -420,7 +420,7 @@ static void (*konami_indexed[0x100])(void) = {
illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal
};
-static void (*konami_direct[0x100])(void) = {
+static void (*const konami_direct[0x100])(void) = {
illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal, /* 00 */
illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,
illegal,illegal,lda_di ,ldb_di ,illegal,illegal,adda_di,addb_di, /* 10 */
@@ -455,7 +455,7 @@ static void (*konami_direct[0x100])(void) = {
illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal
};
-static void (*konami_extended[0x100])(void) = {
+static void (*const konami_extended[0x100])(void) = {
illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal, /* 00 */
illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,
illegal,illegal,lda_ex ,ldb_ex ,illegal,illegal,adda_ex,addb_ex, /* 10 */
diff --git a/src/emu/cpu/m37710/m37710.c b/src/emu/cpu/m37710/m37710.c
index d9e91045be4..230c283c4cb 100644
--- a/src/emu/cpu/m37710/m37710.c
+++ b/src/emu/cpu/m37710/m37710.c
@@ -426,7 +426,7 @@ static void m37710_recalc_timer(int timer)
switch (m37710i_cpu.m37710_regs[0x56+timer] & 0x3)
{
case 0: // timer mode
- time = attotime_mul(ATTOTIME_IN_HZ(16000000), tscales[m37710i_cpu.m37710_regs[tcr[timer]]>>6]);
+ time = attotime_mul(ATTOTIME_IN_HZ(cpunum_get_clock(cpu_getactivecpu())), tscales[m37710i_cpu.m37710_regs[tcr[timer]]>>6]);
time = attotime_mul(time, tval + 1);
#if M37710_DEBUG
@@ -461,7 +461,7 @@ static void m37710_recalc_timer(int timer)
switch (m37710i_cpu.m37710_regs[0x56+timer] & 0x3)
{
case 0: // timer mode
- time = attotime_mul(ATTOTIME_IN_HZ(16000000), tscales[m37710i_cpu.m37710_regs[tcr[timer]]>>6]);
+ time = attotime_mul(ATTOTIME_IN_HZ(cpunum_get_clock(cpu_getactivecpu())), tscales[m37710i_cpu.m37710_regs[tcr[timer]]>>6]);
time = attotime_mul(time, tval + 1);
#if M37710_DEBUG
diff --git a/src/emu/cpu/m6502/t65c02.c b/src/emu/cpu/m6502/t65c02.c
index 9566e3d0548..ddd4a8d2f18 100644
--- a/src/emu/cpu/m6502/t65c02.c
+++ b/src/emu/cpu/m6502/t65c02.c
@@ -371,7 +371,7 @@ OP(7e_wdc) { int tmp; RD_ABX_P; RD_EA; ROR; WB_EA; } /* 6 ROR ABX page pena
OP(de_wdc) { int tmp; RD_ABX_P; RD_EA; DEC; WB_EA; } /* 6 DEC ABX page penalty */
OP(fe_wdc) { int tmp; RD_ABX_P; RD_EA; INC; WB_EA; } /* 6 INC ABX page penalty */
-static void (*insnwdc65c02[0x100])(void) = {
+static void (*const insnwdc65c02[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/m68000/m68kcpu.c b/src/emu/cpu/m68000/m68kcpu.c
index 97b67df5db2..d8b278c772b 100644
--- a/src/emu/cpu/m68000/m68kcpu.c
+++ b/src/emu/cpu/m68000/m68kcpu.c
@@ -995,8 +995,8 @@ static void m68k_post_load(void)
void m68k_state_register(const char *type, int index)
{
+ /* Note, D covers A because the dar array is common, REG_A=REG_D+8 */
state_save_register_item_array(type, index, REG_D);
- state_save_register_item_array(type, index, REG_A);
state_save_register_item(type, index, REG_PPC);
state_save_register_item(type, index, REG_PC);
state_save_register_item(type, index, REG_USP);
diff --git a/src/emu/cpu/m68000/m68kmame.c b/src/emu/cpu/m68000/m68kmame.c
index b213023ccba..84969ed6a88 100644
--- a/src/emu/cpu/m68000/m68kmame.c
+++ b/src/emu/cpu/m68000/m68kmame.c
@@ -178,10 +178,6 @@ static const struct m68k_memory_interface interface_d32 =
};
-/* global access */
-struct m68k_memory_interface m68k_memory_intf;
-
-
static void set_irq_line(int irqline, int state)
{
if (irqline == INPUT_LINE_NMI)
@@ -298,7 +294,7 @@ static offs_t m68008_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UIN
}
#endif /* MAME_DEBUG */
-#endif
+#endif /* HAS_M68008 */
/****************************************************************************
* M68010 section
@@ -814,7 +810,7 @@ void m68008_get_info(UINT32 state, cpuinfo *info)
}
}
-#endif
+#endif /* HAS_M68008 */
/**************************************************************************
* CPU-specific set_info
@@ -859,7 +855,7 @@ void m68010_get_info(UINT32 state, cpuinfo *info)
}
}
-#endif
+#endif /* HAS_M68010 */
/**************************************************************************
* CPU-specific set_info
@@ -1099,7 +1095,7 @@ void m68ec020_get_info(UINT32 state, cpuinfo *info)
}
}
-#endif
+#endif /* HAS_M68EC020 */
/**************************************************************************
* CPU-specific set_info
@@ -1301,5 +1297,5 @@ void m68040_get_info(UINT32 state, cpuinfo *info)
}
}
-#endif
+#endif /* HAS_M68040 */
diff --git a/src/emu/cpu/m6805/m6805.c b/src/emu/cpu/m6805/m6805.c
index 22eafd6420e..c028d2e0a3a 100644
--- a/src/emu/cpu/m6805/m6805.c
+++ b/src/emu/cpu/m6805/m6805.c
@@ -199,7 +199,7 @@ static const UINT8 flags8d[256]= /* decrement */
#define BRANCH(f) { UINT8 t; IMMBYTE(t); if(f) { PC+=SIGNED(t); change_pc(PC); if (t==0xfe) { /* speed up busy loops */ if(m6805_ICount > 0) m6805_ICount = 0; } } }
/* what they say it is ... */
-static unsigned char cycles1[] =
+static const unsigned char cycles1[] =
{
/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
/*0*/ 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
diff --git a/src/emu/cpu/m6809/6809dasm.c b/src/emu/cpu/m6809/6809dasm.c
index 08c19724477..fe4a6797b04 100644
--- a/src/emu/cpu/m6809/6809dasm.c
+++ b/src/emu/cpu/m6809/6809dasm.c
@@ -342,7 +342,7 @@ static const opcodeinfo m6809_pg2opcodes[] =
{ 0xBC, 4, "CMPS", EXT }
};
-static const opcodeinfo *m6809_pgpointers[3] =
+static const opcodeinfo *const m6809_pgpointers[3] =
{
m6809_pg0opcodes, m6809_pg1opcodes, m6809_pg2opcodes
};
diff --git a/src/emu/cpu/m6809/6809tbl.c b/src/emu/cpu/m6809/6809tbl.c
index 66a6afe8424..b0b6bcd3660 100644
--- a/src/emu/cpu/m6809/6809tbl.c
+++ b/src/emu/cpu/m6809/6809tbl.c
@@ -279,7 +279,7 @@ INLINE void pref10(void);
INLINE void pref11(void);
#if (BIG_SWITCH==0)
-static void (*m6809_main[0x100])(void) = {
+static void (*const m6809_main[0x100])(void) = {
neg_di, neg_di, illegal,com_di, lsr_di, illegal,ror_di, asr_di, /* 00 */
asl_di, rol_di, dec_di, illegal,inc_di, tst_di, jmp_di, clr_di,
pref10, pref11, nop, sync, illegal,illegal,lbra, lbsr, /* 10 */
diff --git a/src/emu/cpu/mips/psx.c b/src/emu/cpu/mips/psx.c
index fd0c9582c4b..06a5eedd49d 100644
--- a/src/emu/cpu/mips/psx.c
+++ b/src/emu/cpu/mips/psx.c
@@ -2524,12 +2524,12 @@ static void docop2( int gteop )
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 UINT16 *const *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 };
+ static const UINT32 *const *const p_p_n_cv[] = { p_n_tr, p_n_bk, p_n_fc, p_n_zc };
switch( GTE_FUNCT( gteop ) )
{
@@ -2788,7 +2788,7 @@ static void docop2( int gteop )
}
break;
case 0x1b:
- if( gteop == 0x108041b )
+ if( gteop == 0x108041b || gteop == 0x118041b )
{
GTELOG( "NCCS" );
FLAG = 0;
diff --git a/src/emu/cpu/nec/necea.h b/src/emu/cpu/nec/necea.h
index f754523805e..5a1c3b1f749 100644
--- a/src/emu/cpu/nec/necea.h
+++ b/src/emu/cpu/nec/necea.h
@@ -30,7 +30,7 @@ static unsigned EA_205(void) { E16=FETCH; E16+=FETCH<<8; EO=I.regs.w[IY]+(INT16)
static unsigned EA_206(void) { E16=FETCH; E16+=FETCH<<8; EO=I.regs.w[BP]+(INT16)E16; EA=DefaultBase(SS)+EO; return EA; }
static unsigned EA_207(void) { E16=FETCH; E16+=FETCH<<8; EO=I.regs.w[BW]+(INT16)E16; EA=DefaultBase(DS0)+EO; return EA; }
-static unsigned (*GetEA[192])(void)={
+static unsigned (*const GetEA[192])(void)={
EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
diff --git a/src/emu/cpu/nec/necinstr.h b/src/emu/cpu/nec/necinstr.h
index f07fe442c0c..b4c6e51ce87 100644
--- a/src/emu/cpu/nec/necinstr.h
+++ b/src/emu/cpu/nec/necinstr.h
@@ -246,7 +246,7 @@ static void i_ffpre(void);
static void i_wait(void);
-static void (*nec_instruction[256])(void) =
+static void (*const nec_instruction[256])(void) =
{
i_add_br8, /* 0x00 */
i_add_wr16, /* 0x01 */
diff --git a/src/emu/cpu/pic16c5x/pic16c5x.c b/src/emu/cpu/pic16c5x/pic16c5x.c
index f8ee36e9967..731dda0b54c 100644
--- a/src/emu/cpu/pic16c5x/pic16c5x.c
+++ b/src/emu/cpu/pic16c5x/pic16c5x.c
@@ -107,7 +107,7 @@ static int picmodel;
static int pic16C5x_reset_vector;
static int pic16C5x_icount;
typedef void (*opcode_fn) (void);
-static unsigned cycles_000_other[16];
+static const unsigned cycles_000_other[16];
#define TMR0 internalram[1]
@@ -174,8 +174,8 @@ static unsigned cycles_000_other[16];
/* Easy bit position selectors */
#define POS ((R.opcode.b.l >> 5) & 7)
-static unsigned int bit_clr[8] = { 0xfe, 0xfd, 0xfb, 0xf7, 0xef, 0xdf, 0xbf, 0x7f };
-static unsigned int bit_set[8] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 };
+static const unsigned int bit_clr[8] = { 0xfe, 0xfd, 0xfb, 0xf7, 0xef, 0xdf, 0xbf, 0x7f };
+static const unsigned int bit_set[8] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 };
INLINE void CLR(UINT16 flag) { R.STATUS &= ~flag; }
@@ -615,7 +615,7 @@ static void xorwf(void)
* Cycle Timings
***********************************************************************/
-static unsigned cycles_main[256]=
+static const unsigned cycles_main[256]=
{
/*00*/ 1*CLK, 0*CLK, 1*CLK, 1*CLK, 1*CLK, 0*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK,
/*10*/ 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK,
@@ -635,7 +635,7 @@ static unsigned cycles_main[256]=
/*F0*/ 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK
};
-static opcode_fn opcode_main[256]=
+static const opcode_fn opcode_main[256]=
{
/*00*/ nop, illegal,movwf, movwf, clrw, illegal,clrf, clrf,
/*08*/ subwf, subwf, subwf, subwf, decf, decf, decf, decf,
@@ -672,12 +672,12 @@ static opcode_fn opcode_main[256]=
};
-static unsigned cycles_000_other[16]=
+static const unsigned cycles_000_other[16]=
{
/*00*/ 1*CLK, 0*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 0*CLK, 0*CLK, 0*CLK, 0*CLK, 0*CLK, 0*CLK, 0*CLK, 0*CLK
};
-static opcode_fn opcode_000_other[16]=
+static const opcode_fn opcode_000_other[16]=
{
/*00*/ nop, illegal,option, sleepic,clrwdt, tris, tris, tris,
/*08*/ illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal
diff --git a/src/emu/cpu/powerpc/ppcdrc.c b/src/emu/cpu/powerpc/ppcdrc.c
index 98decf6fdc7..5a5b337b73a 100644
--- a/src/emu/cpu/powerpc/ppcdrc.c
+++ b/src/emu/cpu/powerpc/ppcdrc.c
@@ -1280,7 +1280,9 @@ static void ppcdrc603_init(int index, int clock, const void *_config, int (*irqc
ppc.optable59[i * 32 | 30] = recompile_fnmsubsx;
}
+#if (HAS_PPC602 || HAS_MPC8240)
ppc.optable31[978] = recompile_tlbld;
+#endif /* (HAS_PPC602 || HAS_MPC8240) */
for(i = 0; i < 256; i++)
{
diff --git a/src/emu/cpu/saturn/saturnds.c b/src/emu/cpu/saturn/saturnds.c
index dce67bf487a..15f113035d3 100644
--- a/src/emu/cpu/saturn/saturnds.c
+++ b/src/emu/cpu/saturn/saturnds.c
@@ -191,7 +191,7 @@ typedef enum {
} MNEMONICS;
-static struct {
+static const struct {
const char *name[2];
} mnemonics[]={
{ { "rtn", "RET" } },
diff --git a/src/emu/cpu/sharc/sharcdsm.c b/src/emu/cpu/sharc/sharcdsm.c
index 3845433f9e7..487a3f59834 100644
--- a/src/emu/cpu/sharc/sharcdsm.c
+++ b/src/emu/cpu/sharc/sharcdsm.c
@@ -1052,7 +1052,7 @@ static UINT32 dasm_invalid(UINT32 pc, UINT64 opcode)
return 0;
}
-static SHARC_DASM_OP sharc_dasm_ops[] =
+static const SHARC_DASM_OP sharc_dasm_ops[] =
{
// |0 0 1|
{ 0xe000, 0x2000, dasm_compute_dreg_dmpm },
diff --git a/src/emu/cpu/sharc/sharcops.h b/src/emu/cpu/sharc/sharcops.h
index 77f1a400074..17a6a70b0c0 100644
--- a/src/emu/cpu/sharc/sharcops.h
+++ b/src/emu/cpu/sharc/sharcops.h
@@ -5,7 +5,7 @@ typedef struct
void (* handler)(void);
} SHARC_OP;
-static SHARC_OP sharc_opcode_table[] =
+static const SHARC_OP sharc_opcode_table[] =
{
// |0 0 1|
{ 0xe000, 0x2000, sharcop_compute_dreg_dm_dreg_pm },
diff --git a/src/emu/cpu/tms32010/tms32010.c b/src/emu/cpu/tms32010/tms32010.c
index 580256a896f..d1fe310a504 100644
--- a/src/emu/cpu/tms32010/tms32010.c
+++ b/src/emu/cpu/tms32010/tms32010.c
@@ -634,7 +634,7 @@ static void zals(void)
* Cycle Timings
***********************************************************************/
-static unsigned cycles_main[256]=
+static const unsigned cycles_main[256]=
{
/*00*/ 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK,
/*10*/ 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK,
@@ -654,7 +654,7 @@ static unsigned cycles_main[256]=
/*F0*/ 0*CLK, 0*CLK, 0*CLK, 0*CLK, 2*CLK, 2*CLK, 2*CLK, 0*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK
};
-static unsigned cycles_7F_other[32]=
+static const unsigned cycles_7F_other[32]=
{
/*80*/ 1*CLK, 1*CLK, 1*CLK, 0*CLK, 0*CLK, 0*CLK, 0*CLK, 0*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 2*CLK, 2*CLK, 1*CLK, 1*CLK,
/*90*/ 1*CLK, 0*CLK, 0*CLK, 0*CLK, 0*CLK, 0*CLK, 0*CLK, 0*CLK, 0*CLK, 0*CLK, 0*CLK, 0*CLK, 2*CLK, 2*CLK, 0*CLK, 0*CLK
diff --git a/src/emu/cpu/tms32025/tms32025.c b/src/emu/cpu/tms32025/tms32025.c
index 352f787efba..a7fc99bb273 100644
--- a/src/emu/cpu/tms32025/tms32025.c
+++ b/src/emu/cpu/tms32025/tms32025.c
@@ -1561,7 +1561,7 @@ static void zals(void)
* Cycle Timings
***********************************************************************/
-static unsigned cycles_main[256]=
+static const unsigned cycles_main[256]=
{
/*00*/ 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK,
/*08*/ 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK,
@@ -1597,12 +1597,12 @@ static unsigned cycles_main[256]=
/*F8*/ 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK
};
-static unsigned cycles_DX_subset[8]=
+static const unsigned cycles_DX_subset[8]=
{
/*00*/ 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 0
};
-static unsigned cycles_CE_subset[256]=
+static const unsigned cycles_CE_subset[256]=
{
/*00*/ 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK,
/*08*/ 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK,
diff --git a/src/emu/cpu/tms34010/tms34010.c b/src/emu/cpu/tms34010/tms34010.c
index 9860e91a953..dabb1bd58fd 100644
--- a/src/emu/cpu/tms34010/tms34010.c
+++ b/src/emu/cpu/tms34010/tms34010.c
@@ -98,7 +98,7 @@ static UINT8 screen_to_cpu[MAX_SCREENS];
static UINT8 executing_cpu = 0xff;
/* default configuration */
-static tms34010_config default_config =
+static const tms34010_config default_config =
{
0
};
diff --git a/src/emu/cpu/tms7000/tms70tb.c b/src/emu/cpu/tms7000/tms70tb.c
index c9b6587e234..ef1db21498d 100644
--- a/src/emu/cpu/tms7000/tms70tb.c
+++ b/src/emu/cpu/tms7000/tms70tb.c
@@ -17,7 +17,7 @@
*
*****************************************************************************/
-static void (*opfn[0x100])(void) = {
+static void (*const opfn[0x100])(void) = {
/* 0xX0, 0xX1, 0xX2, 0xX3, 0xX4, 0xX5, 0xX6, 0xX7,
0xX8, 0xX9, 0xXA, 0xXB, 0xXC, 0xXD, 0xXE, 0xXF */
@@ -70,7 +70,7 @@ static void (*opfn[0x100])(void) = {
trap_7, trap_6, trap_5, trap_4, trap_3, trap_2, trap_1, trap_0
};
-static void (*opfn_exl[0x100])(void) = {
+static void (*const opfn_exl[0x100])(void) = {
/* 0xX0, 0xX1, 0xX2, 0xX3, 0xX4, 0xX5, 0xX6, 0xX7,
0xX8, 0xX9, 0xXA, 0xXB, 0xXC, 0xXD, 0xXE, 0xXF */
diff --git a/src/emu/cpu/v30mz/necea.h b/src/emu/cpu/v30mz/necea.h
index 12fb93f3fee..4cd072fd2bc 100644
--- a/src/emu/cpu/v30mz/necea.h
+++ b/src/emu/cpu/v30mz/necea.h
@@ -30,7 +30,7 @@ static unsigned EA_205(void) { E16=FETCH; E16+=FETCH<<8; EO=I.regs.w[IY]+(INT16)
static unsigned EA_206(void) { E16=FETCH; E16+=FETCH<<8; EO=I.regs.w[BP]+(INT16)E16; EA=DefaultBase(SS)+EO; return EA; }
static unsigned EA_207(void) { E16=FETCH; E16+=FETCH<<8; EO=I.regs.w[BW]+(INT16)E16; EA=DefaultBase(DS)+EO; return EA; }
-static unsigned (*GetEA[192])(void)={
+static unsigned (*const GetEA[192])(void)={
EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
diff --git a/src/emu/cpu/v30mz/necinstr.h b/src/emu/cpu/v30mz/necinstr.h
index f07fe442c0c..b4c6e51ce87 100644
--- a/src/emu/cpu/v30mz/necinstr.h
+++ b/src/emu/cpu/v30mz/necinstr.h
@@ -246,7 +246,7 @@ static void i_ffpre(void);
static void i_wait(void);
-static void (*nec_instruction[256])(void) =
+static void (*const nec_instruction[256])(void) =
{
i_add_br8, /* 0x00 */
i_add_wr16, /* 0x01 */
diff --git a/src/emu/cpu/v60/v60mem.c b/src/emu/cpu/v60/v60mem.c
index c29a1a81f33..2f283e31fe0 100644
--- a/src/emu/cpu/v60/v60mem.c
+++ b/src/emu/cpu/v60/v60mem.c
@@ -337,7 +337,7 @@ static void ChangePC_32(offs_t pc)
/* Structures pointing to various I/O functions */
/************************************************/
-static struct cpu_info v60_i =
+static const struct cpu_info v60_i =
{
MemRead8_16, MemWrite8_16, MemRead16_16, MemWrite16_16, MemRead32_16, MemWrite32_16,
PortRead8_16, PortWrite8_16, PortRead16_16, PortWrite16_16, PortRead32_16, PortWrite32_16,
@@ -346,7 +346,7 @@ static struct cpu_info v60_i =
0xfffff0
};
-static struct cpu_info v70_i =
+static const struct cpu_info v70_i =
{
MemRead8_32, MemWrite8_32, MemRead16_32, MemWrite16_32, MemRead32_32, MemWrite32_32,
PortRead8_32, PortWrite8_32, PortRead16_32, PortWrite16_32, PortRead32_32, PortWrite32_32,
diff --git a/src/emu/cpu/z8000/z8000.c b/src/emu/cpu/z8000/z8000.c
index d845083aacc..0a3e089e19b 100644
--- a/src/emu/cpu/z8000/z8000.c
+++ b/src/emu/cpu/z8000/z8000.c
@@ -125,7 +125,7 @@ static UINT8 z8000_zsp[256];
**************************************************************************/
#ifdef LSB_FIRST
/* pointers to byte (8bit) registers */
- static UINT8 *pRB[16] =
+ static UINT8 *const pRB[16] =
{
&Z.regs.B[ 7],&Z.regs.B[ 5],&Z.regs.B[ 3],&Z.regs.B[ 1],
&Z.regs.B[15],&Z.regs.B[13],&Z.regs.B[11],&Z.regs.B[ 9],
@@ -133,7 +133,7 @@ static UINT8 z8000_zsp[256];
&Z.regs.B[14],&Z.regs.B[12],&Z.regs.B[10],&Z.regs.B[ 8]
};
- static UINT16 *pRW[16] =
+ static UINT16 *const pRW[16] =
{
&Z.regs.W[ 3],&Z.regs.W[ 2],&Z.regs.W[ 1],&Z.regs.W[ 0],
&Z.regs.W[ 7],&Z.regs.W[ 6],&Z.regs.W[ 5],&Z.regs.W[ 4],
@@ -142,7 +142,7 @@ static UINT8 z8000_zsp[256];
};
/* pointers to long (32bit) registers */
- static UINT32 *pRL[16] =
+ static UINT32 *const pRL[16] =
{
&Z.regs.L[ 1],&Z.regs.L[ 1],&Z.regs.L[ 0],&Z.regs.L[ 0],
&Z.regs.L[ 3],&Z.regs.L[ 3],&Z.regs.L[ 2],&Z.regs.L[ 2],
@@ -153,7 +153,7 @@ static UINT8 z8000_zsp[256];
#else /* MSB_FIRST */
/* pointers to byte (8bit) registers */
- static UINT8 *pRB[16] =
+ static UINT8 *const pRB[16] =
{
&Z.regs.B[ 0],&Z.regs.B[ 2],&Z.regs.B[ 4],&Z.regs.B[ 6],
&Z.regs.B[ 8],&Z.regs.B[10],&Z.regs.B[12],&Z.regs.B[14],
@@ -162,7 +162,7 @@ static UINT8 z8000_zsp[256];
};
/* pointers to word (16bit) registers */
- static UINT16 *pRW[16] =
+ static UINT16 *const pRW[16] =
{
&Z.regs.W[ 0],&Z.regs.W[ 1],&Z.regs.W[ 2],&Z.regs.W[ 3],
&Z.regs.W[ 4],&Z.regs.W[ 5],&Z.regs.W[ 6],&Z.regs.W[ 7],
@@ -171,7 +171,7 @@ static UINT8 z8000_zsp[256];
};
/* pointers to long (32bit) registers */
- static UINT32 *pRL[16] =
+ static UINT32 *const pRL[16] =
{
&Z.regs.L[ 0],&Z.regs.L[ 0],&Z.regs.L[ 1],&Z.regs.L[ 1],
&Z.regs.L[ 2],&Z.regs.L[ 2],&Z.regs.L[ 3],&Z.regs.L[ 3],
@@ -182,7 +182,7 @@ static UINT8 z8000_zsp[256];
#endif
/* pointers to quad word (64bit) registers */
-static UINT64 *pRQ[16] = {
+static UINT64 *const pRQ[16] = {
&Z.regs.Q[ 0],&Z.regs.Q[ 0],&Z.regs.Q[ 0],&Z.regs.Q[ 0],
&Z.regs.Q[ 1],&Z.regs.Q[ 1],&Z.regs.Q[ 1],&Z.regs.Q[ 1],
&Z.regs.Q[ 2],&Z.regs.Q[ 2],&Z.regs.Q[ 2],&Z.regs.Q[ 2],
diff --git a/src/emu/cpuexec.h b/src/emu/cpuexec.h
index 206cbb982c4..36de52747c1 100644
--- a/src/emu/cpuexec.h
+++ b/src/emu/cpuexec.h
@@ -227,7 +227,7 @@ struct _cpu_config
int vblank_interrupts_per_frame;/* usually 1 */
void (*timed_interrupt)(void); /* for interrupts not tied to VBLANK */
attoseconds_t timed_interrupt_period; /* period for periodic interrupts */
- void * reset_param; /* parameter for cpu_reset */
+ const void *reset_param; /* parameter for cpu_reset */
const char *tag;
};
diff --git a/src/emu/cpuint.c b/src/emu/cpuint.c
index 2d9acfb0061..5ce2795752f 100644
--- a/src/emu/cpuint.c
+++ b/src/emu/cpuint.c
@@ -83,7 +83,7 @@ static int cpu_5_irq_callback(int line);
static int cpu_6_irq_callback(int line);
static int cpu_7_irq_callback(int line);
-int (*cpu_irq_callbacks[MAX_CPU])(int) =
+int (*const cpu_irq_callbacks[MAX_CPU])(int) =
{
cpu_0_irq_callback,
cpu_1_irq_callback,
diff --git a/src/emu/cpuint.h b/src/emu/cpuint.h
index ca45d3006c4..c6dcf7c3f69 100644
--- a/src/emu/cpuint.h
+++ b/src/emu/cpuint.h
@@ -30,7 +30,7 @@ void cpuint_init(running_machine *machine);
void cpuint_reset(void);
-extern int (*cpu_irq_callbacks[])(int);
+extern int (*const cpu_irq_callbacks[])(int);
diff --git a/src/emu/debug/debugcmd.c b/src/emu/debug/debugcmd.c
index 41fe159e064..75c444a6d00 100644
--- a/src/emu/debug/debugcmd.c
+++ b/src/emu/debug/debugcmd.c
@@ -1275,7 +1275,7 @@ static void execute_wpdisenable(int ref, int params, const char *param[])
static void execute_wplist(int ref, int params, const char *param[])
{
- static const char *spacenames[ADDRESS_SPACES] = { "program", "data", "I/O" };
+ static const char *const spacenames[ADDRESS_SPACES] = { "program", "data", "I/O" };
int cpunum, printed = 0;
char buffer[256];
@@ -1292,7 +1292,7 @@ static void execute_wplist(int ref, int params, const char *param[])
{
if (cpuinfo->space[spacenum].first_wp)
{
- static const char *types[] = { "unkn ", "read ", "write", "r/w " };
+ static const char *const types[] = { "unkn ", "read ", "write", "r/w " };
debug_cpu_watchpoint *wp;
debug_console_printf("CPU %d %s space watchpoints:\n", cpunum, spacenames[spacenum]);
diff --git a/src/emu/debug/debugcpu.c b/src/emu/debug/debugcpu.c
index 81099acd348..3d25239aaac 100644
--- a/src/emu/debug/debugcpu.c
+++ b/src/emu/debug/debugcpu.c
@@ -42,7 +42,7 @@
FILE *debug_source_file;
symbol_table *global_symtable;
-static const char *address_space_name[] = { "program", "data", "I/O" };
+static const char *const address_space_name[] = { "program", "data", "I/O" };
static UINT64 wpdata;
static UINT64 wpaddr;
@@ -1317,7 +1317,7 @@ static void check_watchpoints(int cpunum, int spacenum, int type, offs_t address
/* if we do, evaluate the condition */
if (wp->condition == NULL || (expression_execute(wp->condition, &result) == EXPRERR_NONE && result))
{
- static const char *sizes[] =
+ static const char *const sizes[] =
{
"0bytes", "byte", "word", "3bytes", "dword", "5bytes", "6bytes", "7bytes", "qword"
};
diff --git a/src/emu/debug/debughlp.c b/src/emu/debug/debughlp.c
index 68e188130da..d1241aab076 100644
--- a/src/emu/debug/debughlp.c
+++ b/src/emu/debug/debughlp.c
@@ -53,7 +53,7 @@ struct _help_item
TABLE OF HELP
***************************************************************************/
-static help_item static_help_list[] =
+static const help_item static_help_list[] =
{
{
"",
@@ -1035,7 +1035,7 @@ static help_item static_help_list[] =
const char *debug_get_help(const char *tag)
{
static char ambig_message[1024];
- help_item *found = NULL;
+ const help_item *found = NULL;
int i, msglen, foundcount = 0;
int taglen = (int)strlen(tag);
char tagcopy[256];
diff --git a/src/emu/debug/express.c b/src/emu/debug/express.c
index 22aa49d9782..8694c8751d9 100644
--- a/src/emu/debug/express.c
+++ b/src/emu/debug/express.c
@@ -1158,6 +1158,12 @@ static EXPRERR execute_tokens(parsed_expression *expr, UINT64 *result)
/* reset the token stack */
init_token_stack(expr);
+ /* Initialize t1, t2 to keep gcc's warnings-as-errors happy */
+ t1.type = TOK_INVALID;
+ t1.offset = 0;
+ t2.type = TOK_INVALID;
+ t2.offset = 0;
+
/* create a temporary token for holding intermediate number and memory values */
tempnum.type = TOK_NUMBER;
tempnum.offset = 0;
diff --git a/src/emu/drawgfx.c b/src/emu/drawgfx.c
index 89a9f3231ea..43f7b184354 100644
--- a/src/emu/drawgfx.c
+++ b/src/emu/drawgfx.c
@@ -82,7 +82,7 @@ INLINE void write_dword(void *address, UINT32 data)
offset
-------------------------------------------------*/
-INLINE int readbit(const UINT8 *src, int bitnum)
+INLINE int readbit(const UINT8 *src, unsigned int bitnum)
{
return src[bitnum / 8] & (0x80 >> (bitnum % 8));
}
diff --git a/src/emu/driver.h b/src/emu/driver.h
index 7db71669c22..cf4a820c8e1 100644
--- a/src/emu/driver.h
+++ b/src/emu/driver.h
@@ -119,16 +119,17 @@
/* ----- flags for video_attributes ----- */
-/* is the video hardware raser or vector base? */
-#define VIDEO_TYPE_RASTER 0x0000
-#define VIDEO_TYPE_VECTOR 0x0001
+/* is the video hardware raster or vector based? */
+#define VIDEO_TYPE_NONE 0x0000
+#define VIDEO_TYPE_RASTER 0x0001
+#define VIDEO_TYPE_VECTOR 0x0002
/* should VIDEO_UPDATE by called at the start of VBLANK or at the end? */
#define VIDEO_UPDATE_BEFORE_VBLANK 0x0000
-#define VIDEO_UPDATE_AFTER_VBLANK 0x0002
+#define VIDEO_UPDATE_AFTER_VBLANK 0x0004
/* indicates VIDEO_UPDATE will add container bits its */
-#define VIDEO_SELF_RENDER 0x0004
+#define VIDEO_SELF_RENDER 0x0008
/* automatically extend the palette creating a darker copy for shadows */
#define VIDEO_HAS_SHADOWS 0x0010
diff --git a/src/emu/emuopts.c b/src/emu/emuopts.c
index 1b75f35b245..1463b1350b8 100644
--- a/src/emu/emuopts.c
+++ b/src/emu/emuopts.c
@@ -143,6 +143,7 @@ const options_entry mame_core_options[] =
{ NULL, NULL, OPTION_HEADER, "CORE DEBUGGING OPTIONS" },
{ "log", "0", OPTION_BOOLEAN, "generate an error.log file" },
{ "verbose;v", "0", OPTION_BOOLEAN, "display additional diagnostic information" },
+ { "update_in_pause", "0", OPTION_BOOLEAN, "keep calling video updates while in pause" },
#ifdef MAME_DEBUG
{ "debug;d", "1", OPTION_BOOLEAN, "enable/disable debugger" },
{ "debugscript", NULL, 0, "script for debugger" },
diff --git a/src/emu/emuopts.h b/src/emu/emuopts.h
index 982f2556826..eab42ba5b34 100644
--- a/src/emu/emuopts.h
+++ b/src/emu/emuopts.h
@@ -133,6 +133,7 @@
#define OPTION_LOG "log"
#define OPTION_DEBUG "debug"
#define OPTION_DEBUGSCRIPT "debugscript"
+#define OPTION_UPDATEINPAUSE "update_in_pause"
/* core misc options */
#define OPTION_BIOS "bios"
diff --git a/src/emu/hash.c b/src/emu/hash.c
index 5c3a293d604..db92127523b 100644
--- a/src/emu/hash.c
+++ b/src/emu/hash.c
@@ -185,7 +185,7 @@ static const hash_function_desc hash_descs[HASH_NUM_FUNCTIONS] =
},
};
-static const char* info_strings[] =
+static const char *const info_strings[] =
{
"$ND$", // No dump
"$BD$" // Bad dump
diff --git a/src/emu/inptport.c b/src/emu/inptport.c
index 4c698e96ef8..ff17aa3d148 100644
--- a/src/emu/inptport.c
+++ b/src/emu/inptport.c
@@ -264,7 +264,7 @@ static digital_joystick_info joystick_info[MAX_PLAYERS][DIGITAL_JOYSTICKS_PER_PL
static UINT8 ui_memory[__ipt_max];
/* XML attributes for the different types */
-static const char *seqtypestrings[] = { "standard", "decrement", "increment" };
+static const char *const seqtypestrings[] = { "standard", "decrement", "increment" };
/* original input_ports without modifications */
static input_port_entry *input_ports_default;
@@ -2598,9 +2598,9 @@ const char *input_port_name(const input_port_entry *port)
}
-input_seq *input_port_seq(input_port_entry *port, int seqtype)
+const input_seq *input_port_seq(input_port_entry *port, int seqtype)
{
- static input_seq ip_none = SEQ_DEF_0;
+ static const input_seq ip_none = SEQ_DEF_0;
input_seq *portseq;
/* if port is disabled, return no key */
@@ -2639,9 +2639,9 @@ input_seq *input_port_seq(input_port_entry *port, int seqtype)
}
-input_seq *input_port_default_seq(int type, int player, int seqtype)
+const input_seq *input_port_default_seq(int type, int player, int seqtype)
{
- static input_seq ip_none = SEQ_DEF_0;
+ static const input_seq ip_none = SEQ_DEF_0;
/* find the default setting */
int defindex = default_ports_lookup[type][player];
diff --git a/src/emu/inptport.h b/src/emu/inptport.h
index 527bcf453eb..31fc3ce21c9 100644
--- a/src/emu/inptport.h
+++ b/src/emu/inptport.h
@@ -876,8 +876,8 @@ read16_handler port_tag_to_handler16(const char *tag);
read32_handler port_tag_to_handler32(const char *tag);
read64_handler port_tag_to_handler64(const char *tag);
const char *input_port_name(const input_port_entry *in);
-input_seq *input_port_seq(input_port_entry *in, int seqtype);
-input_seq *input_port_default_seq(int type, int player, int seqtype);
+const input_seq *input_port_seq(input_port_entry *in, int seqtype);
+const input_seq *input_port_default_seq(int type, int player, int seqtype);
int input_port_condition(const input_port_entry *in);
void input_port_set_changed_callback(int port, UINT32 mask, void (*callback)(void *, UINT32, UINT32), void *param);
diff --git a/src/emu/input.c b/src/emu/input.c
index 9a961ea0b7a..2f841fadd9a 100644
--- a/src/emu/input.c
+++ b/src/emu/input.c
@@ -337,9 +337,9 @@ static INT32 joystick_deadzone;
static INT32 joystick_saturation;
/* standard joystick mappings */
-const char * joystick_map_8way = "7778...4445";
-const char * joystick_map_4way_sticky = "s8.4s8.44s8.4445";
-const char * joystick_map_4way_diagonal = "4444s8888..444458888.444555888.ss5.222555666.222256666.2222s6666.2222s6666";
+const char joystick_map_8way[] = "7778...4445";
+const char joystick_map_4way_sticky[] = "s8.4s8.44s8.4445";
+const char joystick_map_4way_diagonal[] = "4444s8888..444458888.444555888.ss5.222555666.222256666.2222s6666.2222s6666";
@@ -1549,7 +1549,7 @@ static int joystick_map_parse(const char *mapstring, joystick_map *map)
JOYSTICK_MAP_DOWN | JOYSTICK_MAP_RIGHT,
JOYSTICK_MAP_STICKY
};
- static const char *validchars = "789456123s";
+ static const char validchars[] = "789456123s";
const char *ptr = strchr(validchars, *mapstring++);
/* invalid characters exit immediately */
diff --git a/src/emu/input.h b/src/emu/input.h
index 4f2c82086d8..30fd3fea98f 100644
--- a/src/emu/input.h
+++ b/src/emu/input.h
@@ -485,9 +485,9 @@ typedef struct _input_device input_device;
***************************************************************************/
/* joystick maps */
-extern const char * joystick_map_8way;
-extern const char * joystick_map_4way_sticky;
-extern const char * joystick_map_4way_diagonal;
+extern const char joystick_map_8way[];
+extern const char joystick_map_4way_sticky[];
+extern const char joystick_map_4way_diagonal[];
diff --git a/src/emu/machine/53c810.c b/src/emu/machine/53c810.c
index ec8b30fe50e..8c182413843 100644
--- a/src/emu/machine/53c810.c
+++ b/src/emu/machine/53c810.c
@@ -7,7 +7,7 @@
#define DASM_OPCODES 0
static SCSIInstance *devices[8]; /* SCSI IDs 0-7 */
-static struct LSI53C810interface *intf;
+static const struct LSI53C810interface *intf;
static UINT8 last_id;
static struct {
@@ -659,7 +659,7 @@ static void add_opcode(UINT8 op, UINT8 mask, void (* handler)(void))
}
}
-extern void lsi53c810_init(struct LSI53C810interface *interface)
+extern void lsi53c810_init(const struct LSI53C810interface *interface)
{
int i;
@@ -756,7 +756,7 @@ unsigned lsi53c810_dasm(char *buf, UINT32 pc)
UINT32 dest;
int i;
- static const char *phases[] =
+ static const char *const phases[] =
{
"DATA_OUT", "DATA_IN", "CMD", "STATUS",
"RESERVED_OUT??", "RESERVED_IN??", "MSG_OUT", "MSG_IN"
@@ -777,7 +777,7 @@ unsigned lsi53c810_dasm(char *buf, UINT32 pc)
else if (((op & 0xF8000000) == 0x58000000)
| ((op & 0xF8000000) == 0x60000000))
{
- static struct
+ static const struct
{
UINT32 flag;
const char *text;
diff --git a/src/emu/machine/53c810.h b/src/emu/machine/53c810.h
index 8cbb6065146..8818ee9f3b3 100644
--- a/src/emu/machine/53c810.h
+++ b/src/emu/machine/53c810.h
@@ -5,13 +5,13 @@
struct LSI53C810interface
{
- SCSIConfigTable *scsidevs; /* SCSI devices */
+ const SCSIConfigTable *scsidevs; /* SCSI devices */
void (*irq_callback)(void); /* IRQ callback */
void (*dma_callback)(UINT32, UINT32, int, int); /* DMA callback */
UINT32 (*fetch)(UINT32 dsp);
};
-extern void lsi53c810_init(struct LSI53C810interface *interface);
+extern void lsi53c810_init(const struct LSI53C810interface *interface);
extern void lsi53c810_read_data(int bytes, UINT8 *pData);
extern void lsi53c810_write_data(int bytes, UINT8 *pData);
diff --git a/src/emu/machine/6840ptm.c b/src/emu/machine/6840ptm.c
index 4a0492afb68..5ba50449134 100644
--- a/src/emu/machine/6840ptm.c
+++ b/src/emu/machine/6840ptm.c
@@ -97,7 +97,7 @@ static TIMER_CALLBACK( ptm6840_t3_timeout );
static ptm6840 ptm[PTM_6840_MAX];
#if PTMVERBOSE
-static const char *opmode[] =
+static const char *const opmode[] =
{
"000 continous mode",
"001 freq comparison mode",
diff --git a/src/emu/machine/am53cf96.c b/src/emu/machine/am53cf96.c
index 9e5467138f7..0dce33a9e54 100644
--- a/src/emu/machine/am53cf96.c
+++ b/src/emu/machine/am53cf96.c
@@ -13,7 +13,7 @@
#include "am53cf96.h"
static UINT8 scsi_regs[32], fifo[16], fptr = 0, xfer_state, last_id;
-static struct AM53CF96interface *intf;
+static const struct AM53CF96interface *intf;
static SCSIInstance *devices[8]; // SCSI IDs 0-7
@@ -208,7 +208,7 @@ WRITE32_HANDLER( am53cf96_w )
}
}
-void am53cf96_init( struct AM53CF96interface *interface )
+void am53cf96_init( const struct AM53CF96interface *interface )
{
int i;
diff --git a/src/emu/machine/am53cf96.h b/src/emu/machine/am53cf96.h
index b3e23de8712..ea893904f1d 100644
--- a/src/emu/machine/am53cf96.h
+++ b/src/emu/machine/am53cf96.h
@@ -10,11 +10,11 @@
struct AM53CF96interface
{
- SCSIConfigTable *scsidevs; /* SCSI devices */
+ const SCSIConfigTable *scsidevs; /* SCSI devices */
void (*irq_callback)(void); /* irq callback */
};
-extern void am53cf96_init( struct AM53CF96interface *interface );
+extern void am53cf96_init( const struct AM53CF96interface *interface );
extern void am53cf96_read_data(int bytes, UINT8 *pData);
void am53cf96_write_data(int bytes, UINT8 *pData);
void *am53cf96_get_device(int id);
diff --git a/src/emu/machine/cr589.c b/src/emu/machine/cr589.c
index 4ec39d35845..102631c4fe3 100644
--- a/src/emu/machine/cr589.c
+++ b/src/emu/machine/cr589.c
@@ -14,7 +14,7 @@ typedef struct
} SCSICr589;
static const int identity_offset = 0x3ab;
-static const char *download_identity = "MATSHITA CD98Q4 DOWNLOADGS0N";
+static const char download_identity[] = "MATSHITA CD98Q4 DOWNLOADGS0N";
static int cr589_exec_command( SCSIInstance *scsiInstance, UINT8 *statusCode )
{
@@ -144,7 +144,7 @@ static int cr589_dispatch( int operation, void *file, INT64 intparm, void *ptrpa
return SCSIBase( &SCSIClassCr589, operation, file, intparm, ptrparm );
}
-SCSIClass SCSIClassCr589 =
+const SCSIClass SCSIClassCr589 =
{
&SCSIClassCDROM,
cr589_dispatch,
diff --git a/src/emu/machine/cr589.h b/src/emu/machine/cr589.h
index a0e9313abe9..1f27614eb01 100644
--- a/src/emu/machine/cr589.h
+++ b/src/emu/machine/cr589.h
@@ -1,3 +1,3 @@
#include "scsi.h"
-extern SCSIClass SCSIClassCr589;
+extern const SCSIClass SCSIClassCr589;
diff --git a/src/emu/machine/ds2401.c b/src/emu/machine/ds2401.c
index cd3ebd52274..0d61bad2243 100644
--- a/src/emu/machine/ds2401.c
+++ b/src/emu/machine/ds2401.c
@@ -41,7 +41,7 @@ struct ds2401_chip
int shift;
int rx;
int tx;
- UINT8 *data;
+ const UINT8 *data;
emu_timer *timer;
emu_timer *reset_timer;
attotime t_samp;
@@ -138,15 +138,10 @@ static TIMER_CALLBACK( ds2401_tick )
}
}
-void ds2401_init( int which, UINT8 *data )
+void ds2401_init( int which, const UINT8 *data )
{
struct ds2401_chip *c = &ds2401[ which ];
- if( data == NULL )
- {
- data = auto_malloc( SIZE_DATA );
- }
-
c->state = STATE_IDLE;
c->bit = 0;
c->byte = 0;
@@ -166,7 +161,7 @@ void ds2401_init( int which, UINT8 *data )
state_save_register_item( "ds2401", which, c->shift );
state_save_register_item( "ds2401", which, c->rx );
state_save_register_item( "ds2401", which, c->tx );
- state_save_register_item_pointer( "ds2401", which, data, SIZE_DATA );
+ state_save_register_generic( "ds2401", which, "data", (UINT8 *)&data[0], data[0], SIZE_DATA );
c->timer = timer_alloc( ds2401_tick , NULL);
c->reset_timer = timer_alloc( ds2401_reset , NULL);
diff --git a/src/emu/machine/ds2401.h b/src/emu/machine/ds2401.h
index 52241177e0e..6acd33b786e 100644
--- a/src/emu/machine/ds2401.h
+++ b/src/emu/machine/ds2401.h
@@ -11,7 +11,7 @@
#define DS2401_MAXCHIP ( 3 )
-extern void ds2401_init( int which, UINT8 *data );
+extern void ds2401_init( int which, const UINT8 *data );
extern void ds2401_write( int which, int data );
extern int ds2401_read( int which );
diff --git a/src/emu/machine/idectrl.c b/src/emu/machine/idectrl.c
index bd08522cdfc..a0a746cb92f 100644
--- a/src/emu/machine/idectrl.c
+++ b/src/emu/machine/idectrl.c
@@ -157,15 +157,15 @@ struct ide_state
UINT8 config_register[IDE_CONFIG_REGISTERS];
UINT8 config_register_num;
- struct ide_interface *intf;
+ const struct ide_interface *intf;
hard_disk_file * disk;
emu_timer * last_status_timer;
emu_timer * reset_timer;
UINT8 master_password_enable;
UINT8 user_password_enable;
- UINT8 * master_password;
- UINT8 * user_password;
+ const UINT8 * master_password;
+ const UINT8 * user_password;
};
@@ -289,7 +289,7 @@ static void ide_controller_exit(running_machine *machine)
}
-int ide_controller_init_custom(int which, struct ide_interface *intf, chd_file *diskhandle)
+int ide_controller_init_custom(int which, const struct ide_interface *intf, chd_file *diskhandle)
{
struct ide_state *ide = &idestate[which];
const hard_disk_info *hdinfo;
@@ -380,7 +380,7 @@ int ide_controller_init_custom(int which, struct ide_interface *intf, chd_file *
return 0;
}
-int ide_controller_init(int which, struct ide_interface *intf)
+int ide_controller_init(int which, const struct ide_interface *intf)
{
/* we only support one hard disk right now; get a handle to it */
return ide_controller_init_custom(which, intf, get_disk_handle(0));
@@ -414,7 +414,7 @@ UINT8 *ide_get_features(int which)
}
-void ide_set_master_password(int which, UINT8 *password)
+void ide_set_master_password(int which, const UINT8 *password)
{
struct ide_state *ide = &idestate[which];
@@ -423,7 +423,7 @@ void ide_set_master_password(int which, UINT8 *password)
}
-void ide_set_user_password(int which, UINT8 *password)
+void ide_set_user_password(int which, const UINT8 *password)
{
struct ide_state *ide = &idestate[which];
diff --git a/src/emu/machine/idectrl.h b/src/emu/machine/idectrl.h
index 0112d6d71f4..a73929bc1f8 100644
--- a/src/emu/machine/idectrl.h
+++ b/src/emu/machine/idectrl.h
@@ -14,13 +14,13 @@ struct ide_interface
void (*interrupt)(int state);
};
-int ide_controller_init(int which, struct ide_interface *intf);
-int ide_controller_init_custom(int which, struct ide_interface *intf, chd_file *diskhandle);
+int ide_controller_init(int which, const struct ide_interface *intf);
+int ide_controller_init_custom(int which, const struct ide_interface *intf, chd_file *diskhandle);
void ide_controller_reset(int which);
UINT8 *ide_get_features(int which);
-void ide_set_master_password(int which, UINT8 *password);
-void ide_set_user_password(int which, UINT8 *password);
+void ide_set_master_password(int which, const UINT8 *password);
+void ide_set_user_password(int which, const UINT8 *password);
int ide_bus_0_r(int select, int offset);
void ide_bus_0_w(int select, int offset, int data);
diff --git a/src/emu/machine/laserdsc.c b/src/emu/machine/laserdsc.c
index 3ab6eeb7412..e1b224602e3 100644
--- a/src/emu/machine/laserdsc.c
+++ b/src/emu/machine/laserdsc.c
@@ -363,7 +363,7 @@ static void vp932_state_changed(laserdisc_info *info, UINT8 oldstate);
GLOBAL VARIABLES
***************************************************************************/
-struct CustomSound_interface laserdisc_custom_interface =
+const struct CustomSound_interface laserdisc_custom_interface =
{
custom_start
};
diff --git a/src/emu/machine/laserdsc.h b/src/emu/machine/laserdsc.h
index 78a404b577d..0da43dcc292 100644
--- a/src/emu/machine/laserdsc.h
+++ b/src/emu/machine/laserdsc.h
@@ -60,7 +60,7 @@ typedef struct _laserdisc_info laserdisc_info;
GLOBAL VARIABLES
***************************************************************************/
-extern struct CustomSound_interface laserdisc_custom_interface;
+extern const struct CustomSound_interface laserdisc_custom_interface;
diff --git a/src/emu/machine/mb87078.c b/src/emu/machine/mb87078.c
index c98eccceccb..432e22816d0 100644
--- a/src/emu/machine/mb87078.c
+++ b/src/emu/machine/mb87078.c
@@ -19,7 +19,7 @@ struct MB87078 {
static struct MB87078 chip[MAX_MB87078];
-static float MB87078_gain_decibel[66]={
+static const float MB87078_gain_decibel[66]={
0.0, -0.5, -1.0, -1.5, -2.0, -2.5, -3.0, -3.5,
-4.0, -4.5, -5.0, -5.5, -6.0, -6.5, -7.0, -7.5,
-8.0, -8.5, -9.0, -9.5,-10.0,-10.5,-11.0,-11.5,
@@ -31,7 +31,7 @@ static float MB87078_gain_decibel[66]={
-32.0, -256.0
};
-static int MB87078_gain_percent[66]={
+static const int MB87078_gain_percent[66]={
100,94,89,84,79,74,70,66,
63,59,56,53,50,47,44,42,
39,37,35,33,31,29,28,26,
diff --git a/src/emu/machine/roc10937.c b/src/emu/machine/roc10937.c
index 59a44b7a04a..4b23c8b1df7 100644
--- a/src/emu/machine/roc10937.c
+++ b/src/emu/machine/roc10937.c
@@ -65,7 +65,7 @@ we actually have 18 segments, including the semicolon portions.
This means our segment maths needs to be more than 16-bit to work!
*/
-static UINT32 roc10937charset[]=
+static const UINT32 roc10937charset[]=
{ // 11 10 FEDC BA98 7654 3210
0x0507F, // 0 0 0101 0000 0111 1111 @.
0x044CF, // 0 0 0100 0100 1100 1111 A.
diff --git a/src/emu/machine/rp5h01.c b/src/emu/machine/rp5h01.c
index 32b46da62ec..3abed1220da 100644
--- a/src/emu/machine/rp5h01.c
+++ b/src/emu/machine/rp5h01.c
@@ -4,7 +4,7 @@
/****************************************************************************/
/* local copy of the interface pointer */
-static struct RP5H01_interface *intf;
+static const struct RP5H01_interface *intf;
/* these also work as the address masks */
enum {
@@ -25,7 +25,7 @@ static RP5H01 RP5H01_state[MAX_RP5H01];
/****************************************************************************/
-int RP5H01_init( struct RP5H01_interface *interface ) {
+int RP5H01_init( const struct RP5H01_interface *interface ) {
int i;
/* setup our local copy of the interface */
diff --git a/src/emu/machine/rp5h01.h b/src/emu/machine/rp5h01.h
index b0bb3898c89..9f9fec7dce6 100644
--- a/src/emu/machine/rp5h01.h
+++ b/src/emu/machine/rp5h01.h
@@ -10,7 +10,7 @@ struct RP5H01_interface {
int offset[MAX_RP5H01]; /* memory offset within the above region where data resides */
};
-int RP5H01_init( struct RP5H01_interface *interface );
+int RP5H01_init( const struct RP5H01_interface *interface );
void RP5H01_enable_w( int which, int data ); /* /CE */
void RP5H01_reset_w( int which, int data ); /* RESET */
void RP5H01_clock_w( int which, int data ); /* DATA CLOCK (active low) */
diff --git a/src/emu/machine/scsi.c b/src/emu/machine/scsi.c
index f01f60d5390..33097caffb7 100644
--- a/src/emu/machine/scsi.c
+++ b/src/emu/machine/scsi.c
@@ -1,8 +1,8 @@
#include "scsi.h"
-void SCSIAllocInstance( SCSIClass *scsiClass, SCSIInstance **instance, int diskId )
+void SCSIAllocInstance( const SCSIClass *scsiClass, SCSIInstance **instance, int diskId )
{
- scsiClass->dispatch( SCSIOP_ALLOC_INSTANCE, scsiClass, diskId, instance );
+ scsiClass->dispatch( SCSIOP_ALLOC_INSTANCE, (void *)scsiClass, diskId, instance );
}
void SCSIDeleteInstance( SCSIInstance *instance )
@@ -60,19 +60,19 @@ void SCSIGetPhase( SCSIInstance *instance, int *phase )
*phase = instance->scsiClass->dispatch( SCSIOP_GET_PHASE, instance, 0, NULL );
}
-int SCSIBase( SCSIClass *scsiClass, int operation, void *file, INT64 intparm, UINT8 *ptrparm )
+int SCSIBase( const SCSIClass *scsiClass, int operation, void *file, INT64 intparm, UINT8 *ptrparm )
{
return scsiClass->baseClass->dispatch( operation, file, intparm, ptrparm );
}
-SCSIInstance *SCSIMalloc( SCSIClass *scsiClass )
+SCSIInstance *SCSIMalloc( const SCSIClass *scsiClass )
{
SCSIInstance *scsiInstance = (SCSIInstance *) malloc_or_die( SCSISizeof( scsiClass ) );
scsiInstance->scsiClass = scsiClass;
return scsiInstance;
}
-void *SCSIThis( SCSIClass *scsiClass, SCSIInstance *instance )
+void *SCSIThis( const SCSIClass *scsiClass, SCSIInstance *instance )
{
if( instance != NULL )
{
@@ -90,7 +90,7 @@ void *SCSIThis( SCSIClass *scsiClass, SCSIInstance *instance )
return NULL;
}
-int SCSISizeof( SCSIClass *scsiClass )
+int SCSISizeof( const SCSIClass *scsiClass )
{
int sizeofData = sizeof( SCSIInstance );
diff --git a/src/emu/machine/scsi.h b/src/emu/machine/scsi.h
index 7097cf38147..38464e0a6bc 100644
--- a/src/emu/machine/scsi.h
+++ b/src/emu/machine/scsi.h
@@ -14,14 +14,14 @@ typedef int (*pSCSIDispatch)( int operation, void *file, INT64 intparm, void *pt
typedef struct _SCSIClass
{
- struct _SCSIClass *baseClass;
+ const struct _SCSIClass *baseClass;
pSCSIDispatch dispatch;
int sizeofData;
} SCSIClass;
typedef struct
{
- SCSIClass *scsiClass;
+ const SCSIClass *scsiClass;
} SCSIInstance;
// commands accepted by a SCSI device's dispatch handler
@@ -45,7 +45,7 @@ typedef struct scsiconfigitem
{
int scsiID;
int diskID;
- SCSIClass *scsiClass;
+ const SCSIClass *scsiClass;
} SCSIConfigItem;
#define SCSI_MAX_DEVICES (16)
@@ -53,7 +53,7 @@ typedef struct scsiconfigitem
typedef struct scsiconfigtable
{
int devs_present;
- SCSIConfigItem devices[SCSI_MAX_DEVICES];
+ const SCSIConfigItem devices[SCSI_MAX_DEVICES];
} SCSIConfigTable;
// SCSI IDs
@@ -77,7 +77,7 @@ enum
#define SCSI_PHASE_MESSAGE_OUT ( 6 )
#define SCSI_PHASE_MESSAGE_IN ( 7 )
-extern void SCSIAllocInstance( SCSIClass *scsiClass, SCSIInstance **instance, int diskId );
+extern void SCSIAllocInstance( const SCSIClass *scsiClass, SCSIInstance **instance, int diskId );
extern void SCSIDeleteInstance( SCSIInstance *instance );
extern void SCSISetDevice( SCSIInstance *instance, void *device );
extern void SCSIGetDevice( SCSIInstance *instance, void **device );
@@ -90,10 +90,10 @@ extern void SCSIReadData( SCSIInstance *instance, void *data, int dataLength );
extern void SCSISetPhase( SCSIInstance *instance, int phase );
extern void SCSIGetPhase( SCSIInstance *instance, int *phase );
-extern SCSIInstance *SCSIMalloc( SCSIClass *scsiClass );
-extern int SCSIBase( SCSIClass *scsiClass, int operation, void *file, INT64 intparm, UINT8 *ptrparm );
-extern void *SCSIThis( SCSIClass *scsiClass, SCSIInstance *instance );
-extern int SCSISizeof( SCSIClass *scsiClass );
+extern SCSIInstance *SCSIMalloc( const SCSIClass *scsiClass );
+extern int SCSIBase( const SCSIClass *scsiClass, int operation, void *file, INT64 intparm, UINT8 *ptrparm );
+extern void *SCSIThis( const SCSIClass *scsiClass, SCSIInstance *instance );
+extern int SCSISizeof( const SCSIClass *scsiClass );
extern int SCSILengthFromUINT8( UINT8 *length );
extern int SCSILengthFromUINT16( UINT8 *length );
diff --git a/src/emu/machine/scsicd.c b/src/emu/machine/scsicd.c
index b611eac5614..a3e0f6f6737 100644
--- a/src/emu/machine/scsicd.c
+++ b/src/emu/machine/scsicd.c
@@ -760,7 +760,7 @@ static int scsicd_dispatch(int operation, void *file, INT64 intparm, void *ptrpa
return SCSIBase( &SCSIClassCDROM, operation, file, intparm, ptrparm );
}
-SCSIClass SCSIClassCDROM =
+const SCSIClass SCSIClassCDROM =
{
&SCSIClassDevice,
scsicd_dispatch,
diff --git a/src/emu/machine/scsicd.h b/src/emu/machine/scsicd.h
index 5300a9563b1..67998398631 100644
--- a/src/emu/machine/scsicd.h
+++ b/src/emu/machine/scsicd.h
@@ -10,7 +10,7 @@
#include "machine/scsi.h"
// CD-ROM handler
-extern SCSIClass SCSIClassCDROM;
+extern const SCSIClass SCSIClassCDROM;
#define SCSI_DEVICE_CDROM &SCSIClassCDROM
#endif
diff --git a/src/emu/machine/scsidev.c b/src/emu/machine/scsidev.c
index 11ac55b1193..3e816e70903 100644
--- a/src/emu/machine/scsidev.c
+++ b/src/emu/machine/scsidev.c
@@ -147,7 +147,7 @@ static int scsidev_dispatch( int operation, void *file, INT64 intparm, void *ptr
return 0;
}
-SCSIClass SCSIClassDevice =
+const SCSIClass SCSIClassDevice =
{
NULL,
scsidev_dispatch,
diff --git a/src/emu/machine/scsidev.h b/src/emu/machine/scsidev.h
index f765e187cbe..984ab7f818e 100644
--- a/src/emu/machine/scsidev.h
+++ b/src/emu/machine/scsidev.h
@@ -10,6 +10,6 @@
#include "machine/scsi.h"
// base handler
-extern SCSIClass SCSIClassDevice;
+extern const SCSIClass SCSIClassDevice;
#endif
diff --git a/src/emu/machine/scsihd.c b/src/emu/machine/scsihd.c
index 81d3770eb71..2c11b5dc889 100644
--- a/src/emu/machine/scsihd.c
+++ b/src/emu/machine/scsihd.c
@@ -303,7 +303,7 @@ static int scsihd_dispatch(int operation, void *file, INT64 intparm, void *ptrpa
return SCSIBase( &SCSIClassHARDDISK, operation, file, intparm, ptrparm );
}
-SCSIClass SCSIClassHARDDISK =
+const SCSIClass SCSIClassHARDDISK =
{
&SCSIClassDevice,
scsihd_dispatch,
diff --git a/src/emu/machine/scsihd.h b/src/emu/machine/scsihd.h
index 4adb0c8fbd3..f4549926655 100644
--- a/src/emu/machine/scsihd.h
+++ b/src/emu/machine/scsihd.h
@@ -10,7 +10,7 @@
#include "machine/scsi.h"
// CD-ROM handler
-extern SCSIClass SCSIClassHARDDISK;
+extern const SCSIClass SCSIClassHARDDISK;
#define SCSI_DEVICE_HARDDISK &SCSIClassHARDDISK
#endif
diff --git a/src/emu/machine/smc91c9x.c b/src/emu/machine/smc91c9x.c
index 4735863fe7f..6eff3f50fc5 100644
--- a/src/emu/machine/smc91c9x.c
+++ b/src/emu/machine/smc91c9x.c
@@ -92,7 +92,7 @@
#define EINT_ERCV 0x40
/* Ethernet register names */
-static const char *ethernet_regname[64] =
+static const char *const ethernet_regname[64] =
{
"TCR", "EPH STATUS", "RCR", "COUNTER", "MIR", "MCR", "(0.6)", "BANK",
"CONFIG", "BASE", "IA0-1", "IA2-3", "IA4-5", "GENERAL PURPOSE", "CONTROL", "BANK",
@@ -164,7 +164,7 @@ static void update_ethernet_irq(void);
*
*************************************/
-void smc91c94_init(struct smc91c9x_interface *config)
+void smc91c94_init(const struct smc91c9x_interface *config)
{
ethernet.irq_handler = config->irq_handler;
}
diff --git a/src/emu/machine/smc91c9x.h b/src/emu/machine/smc91c9x.h
index 2cef861294c..6abc6c001a5 100644
--- a/src/emu/machine/smc91c9x.h
+++ b/src/emu/machine/smc91c9x.h
@@ -14,7 +14,7 @@ struct smc91c9x_interface
void (*irq_handler)(int state);
};
-void smc91c94_init(struct smc91c9x_interface *config);
+void smc91c94_init(const struct smc91c9x_interface *config);
void smc91c94_reset(void);
READ16_HANDLER( smc91c94_r );
WRITE16_HANDLER( smc91c94_w );
diff --git a/src/emu/machine/wd33c93.c b/src/emu/machine/wd33c93.c
index 9fa3bb408ae..03b8f4455b0 100644
--- a/src/emu/machine/wd33c93.c
+++ b/src/emu/machine/wd33c93.c
@@ -18,7 +18,7 @@
#define VERBOSE 0
static SCSIInstance *devices[8]; // SCSI IDs 0-7
-static struct WD33C93interface *intf;
+static const struct WD33C93interface *intf;
/* wd register names */
#define WD_OWN_ID 0x00
@@ -457,7 +457,7 @@ static void wd33c93_xferinfo_cmd( void )
}
/* Command handlers */
-static cmd_handler wd33c93_cmds[0x22] =
+static const cmd_handler wd33c93_cmds[0x22] =
{
&wd33c93_reset_cmd, /* 0x00 - WD_CMD_RESET */
&wd33c93_abort_cmd, /* 0x01 - WD_CMD_ABORT */
@@ -785,7 +785,7 @@ READ8_HANDLER(wd33c93_r)
return 0;
}
-extern void wd33c93_init( struct WD33C93interface *interface )
+extern void wd33c93_init( const struct WD33C93interface *interface )
{
int i;
diff --git a/src/emu/machine/wd33c93.h b/src/emu/machine/wd33c93.h
index 99f13944b9d..4e967941465 100644
--- a/src/emu/machine/wd33c93.h
+++ b/src/emu/machine/wd33c93.h
@@ -10,11 +10,11 @@
struct WD33C93interface
{
- SCSIConfigTable *scsidevs; /* SCSI devices */
+ const SCSIConfigTable *scsidevs; /* SCSI devices */
void (*irq_callback)(int state); /* irq callback */
};
-extern void wd33c93_init( struct WD33C93interface *interface );
+extern void wd33c93_init( const struct WD33C93interface *interface );
extern void wd33c93_get_dma_data(int bytes, UINT8 *pData);
extern void wd33c93_write_data(int bytes, UINT8 *pData);
extern void *wd33c93_get_device(int id);
diff --git a/src/emu/machine/z80pio.c b/src/emu/machine/z80pio.c
index 81f293b83c9..aa893e027f7 100644
--- a/src/emu/machine/z80pio.c
+++ b/src/emu/machine/z80pio.c
@@ -167,7 +167,7 @@ static void update_irq_state(z80pio *pio, int ch)
INITIALIZATION/CONFIGURATION
***************************************************************************/
-void z80pio_init(int which, z80pio_interface *intf)
+void z80pio_init(int which, const z80pio_interface *intf)
{
z80pio *pio = pios + which;
diff --git a/src/emu/machine/z80pio.h b/src/emu/machine/z80pio.h
index e699ce0de03..adfb54fb735 100644
--- a/src/emu/machine/z80pio.h
+++ b/src/emu/machine/z80pio.h
@@ -33,7 +33,7 @@ typedef struct _z80pio_interface z80pio_interface;
INITIALIZATION/CONFIGURATION
***************************************************************************/
-void z80pio_init(int which, z80pio_interface *intf);
+void z80pio_init(int which, const z80pio_interface *intf);
void z80pio_reset(int which);
diff --git a/src/emu/mame.c b/src/emu/mame.c
index 2d23eaad4e5..0934fa3ff4f 100644
--- a/src/emu/mame.c
+++ b/src/emu/mame.c
@@ -190,7 +190,7 @@ static output_callback output_cb[OUTPUT_CHANNEL_COUNT];
static void *output_cb_param[OUTPUT_CHANNEL_COUNT];
/* the "disclaimer" that should be printed when run with no parameters */
-const char *mame_disclaimer =
+const char mame_disclaimer[] =
"MAME is an emulator: it reproduces, more or less faithfully, the behaviour of\n"
"several arcade machines. But hardware is useless without software, so an image\n"
"of the ROMs which run on that hardware is required. Such ROMs, like any other\n"
@@ -200,7 +200,7 @@ const char *mame_disclaimer =
"images is a violation of copyright law and should be promptly reported to the\n"
"authors so that appropriate legal action can be taken.\n";
-const char *memory_region_names[REGION_MAX] =
+const char *const memory_region_names[REGION_MAX] =
{
"REGION_INVALID",
"REGION_CPU1",
diff --git a/src/emu/mame.h b/src/emu/mame.h
index 328ee632c8d..97b34c24990 100644
--- a/src/emu/mame.h
+++ b/src/emu/mame.h
@@ -148,7 +148,7 @@ enum
REGION_MAX
};
-extern const char *memory_region_names[REGION_MAX];
+extern const char *const memory_region_names[REGION_MAX];
@@ -249,7 +249,7 @@ struct _mame_system_time
***************************************************************************/
extern running_machine *Machine;
-extern const char *mame_disclaimer;
+extern const char mame_disclaimer[];
extern char giant_string_buffer[];
extern char build_version[];
diff --git a/src/emu/mamecore.c b/src/emu/mamecore.c
index aa3cf98c9d0..dfc2039bcc7 100644
--- a/src/emu/mamecore.c
+++ b/src/emu/mamecore.c
@@ -14,4 +14,4 @@
#include <ctype.h>
/* a giant string buffer for temporary strings */
-char giant_string_buffer[GIANT_STRING_BUFFER_SIZE];
+char giant_string_buffer[GIANT_STRING_BUFFER_SIZE] = { 0 };
diff --git a/src/emu/memory.c b/src/emu/memory.c
index eade6d00fe7..90e027382e2 100644
--- a/src/emu/memory.c
+++ b/src/emu/memory.c
@@ -243,7 +243,7 @@ struct _addrspace_data
UINT64 unmap; /* unmapped value */
table_data read; /* memory read lookup table */
table_data write; /* memory write lookup table */
- data_accessors * accessors; /* pointer to the memory accessors */
+ const data_accessors * accessors; /* pointer to the memory accessors */
address_map * map; /* original memory map */
address_map * adjmap; /* adjusted memory map */
};
@@ -300,7 +300,7 @@ static debug_hook_read_ptr debug_hook_read; /* pointer to debugger callback f
static debug_hook_write_ptr debug_hook_write; /* pointer to debugger callback for memory writes */
#endif
-static data_accessors memory_accessors[ADDRESS_SPACES][4][2] =
+static const data_accessors memory_accessors[ADDRESS_SPACES][4][2] =
{
/* program accessors */
{
@@ -363,7 +363,7 @@ static data_accessors memory_accessors[ADDRESS_SPACES][4][2] =
},
};
-const char *address_space_names[ADDRESS_SPACES] = { "program", "data", "I/O" };
+const char *const address_space_names[ADDRESS_SPACES] = { "program", "data", "I/O" };
/*-------------------------------------------------
@@ -3254,7 +3254,7 @@ static genf *get_static_handler(int databits, int readorwrite, int spacenum, int
static const char *handler_to_string(const table_data *table, UINT8 entry)
{
- static const char *strings[] =
+ static const char *const strings[] =
{
"invalid", "bank 1", "bank 2", "bank 3",
"bank 4", "bank 5", "bank 6", "bank 7",
diff --git a/src/emu/memory.h b/src/emu/memory.h
index 61f59a3d654..87a84ec5e27 100644
--- a/src/emu/memory.h
+++ b/src/emu/memory.h
@@ -591,7 +591,7 @@ struct _address_space
UINT8 * writelookup; /* write table lookup */
handler_data * readhandlers; /* read handlers */
handler_data * writehandlers; /* write handlers */
- data_accessors * accessors; /* pointers to the data access handlers */
+ const data_accessors * accessors; /* pointers to the data access handlers */
};
@@ -728,7 +728,7 @@ enum
ADDRESS_SPACES /* maximum number of address spaces */
};
-extern const char *address_space_names[ADDRESS_SPACES];
+extern const char *const address_space_names[ADDRESS_SPACES];
/* ----- address map lookup table definitions ----- */
#define SUBTABLE_COUNT 64 /* number of slots reserved for subtables */
diff --git a/src/emu/profiler.c b/src/emu/profiler.c
index 7c70ee4abc2..65bfb91648b 100644
--- a/src/emu/profiler.c
+++ b/src/emu/profiler.c
@@ -102,7 +102,7 @@ const char *profiler_get_text(void)
int i,j;
UINT64 total,normalize;
UINT64 computed;
- static const char *names[PROFILER_TOTAL] =
+ static const char *const names[PROFILER_TOTAL] =
{
"CPU 1 ",
"CPU 2 ",
diff --git a/src/emu/rendlay.c b/src/emu/rendlay.c
index 95f92443ede..04b7c6f61c8 100644
--- a/src/emu/rendlay.c
+++ b/src/emu/rendlay.c
@@ -1772,7 +1772,7 @@ static layout_view *load_layout_view(xml_data_node *viewnode, layout_element *el
/* loop over all the layer types we support */
for (layer = 0; layer < ITEM_LAYER_MAX; layer++)
{
- static const char *layer_node_name[ITEM_LAYER_MAX] = { "backdrop", "screen", "overlay", "bezel" };
+ static const char *const layer_node_name[ITEM_LAYER_MAX] = { "backdrop", "screen", "overlay", "bezel" };
xml_data_node *itemnode;
/* initialize the list */
diff --git a/src/emu/sound/c140.c b/src/emu/sound/c140.c
index 180a34b2bab..9cc4922a1e2 100644
--- a/src/emu/sound/c140.c
+++ b/src/emu/sound/c140.c
@@ -138,7 +138,7 @@ static long find_sample(struct c140_info *info, long adrs, long bank, int voice)
{
long newadr = 0;
- static INT16 asic219banks[4] = { 0x1f7, 0x1f1, 0x1f3, 0x1f5 };
+ static const INT16 asic219banks[4] = { 0x1f7, 0x1f1, 0x1f3, 0x1f5 };
adrs=(bank<<16)+adrs;
diff --git a/src/emu/sound/c6280.c b/src/emu/sound/c6280.c
index e2e01f30ddd..49dbfa011b6 100644
--- a/src/emu/sound/c6280.c
+++ b/src/emu/sound/c6280.c
@@ -214,7 +214,7 @@ static void c6280_write(c6280_t *p, int offset, int data)
static void c6280_update(void *param, stream_sample_t **inputs, stream_sample_t **buffer, int length)
{
- static int scale_tab[] = {
+ static const int scale_tab[] = {
0x00, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
0x10, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F
};
diff --git a/src/emu/sound/discrete.c b/src/emu/sound/discrete.c
index 25b3e03024b..bc6d43f979f 100644
--- a/src/emu/sound/discrete.c
+++ b/src/emu/sound/discrete.c
@@ -162,7 +162,7 @@ static void CLIB_DECL discrete_log(const char *text, ...)
*
*************************************/
-static discrete_module module_list[] =
+static const discrete_module module_list[] =
{
{ DSO_OUTPUT ,"DSO_OUTPUT" ,0 ,NULL ,NULL },
{ DSO_CSVLOG ,"DSO_CSVLOG" ,0 ,NULL ,NULL },
diff --git a/src/emu/sound/es5503.c b/src/emu/sound/es5503.c
index 86bb1a5a5f2..c804d7fab73 100644
--- a/src/emu/sound/es5503.c
+++ b/src/emu/sound/es5503.c
@@ -79,10 +79,10 @@ typedef struct
UINT32 output_rate;
} ES5503Chip;
-static UINT16 wavesizes[8] = { 256, 512, 1024, 2048, 4096, 8192, 16384, 32768 };
-static UINT32 wavemasks[8] = { 0x1ff00, 0x1fe00, 0x1fc00, 0x1f800, 0x1f000, 0x1e000, 0x1c000, 0x18000 };
-static UINT32 accmasks[8] = { 0xff, 0x1ff, 0x3ff, 0x7ff, 0xfff, 0x1fff, 0x3fff, 0x7fff };
-static int resshifts[8] = { 9, 10, 11, 12, 13, 14, 15, 16 };
+static const UINT16 wavesizes[8] = { 256, 512, 1024, 2048, 4096, 8192, 16384, 32768 };
+static const UINT32 wavemasks[8] = { 0x1ff00, 0x1fe00, 0x1fc00, 0x1f800, 0x1f000, 0x1e000, 0x1c000, 0x18000 };
+static const UINT32 accmasks[8] = { 0xff, 0x1ff, 0x3ff, 0x7ff, 0xfff, 0x1fff, 0x3fff, 0x7fff };
+static const int resshifts[8] = { 9, 10, 11, 12, 13, 14, 15, 16 };
enum
{
diff --git a/src/emu/sound/flt_rc.c b/src/emu/sound/flt_rc.c
index 0a6c864a746..5e68cbb5b1b 100644
--- a/src/emu/sound/flt_rc.c
+++ b/src/emu/sound/flt_rc.c
@@ -11,7 +11,7 @@ struct filter_rc_info
int type;
};
-flt_rc_config flt_rc_ac_default = {FLT_RC_AC, 10000, 0, 0, CAP_U(1)};
+const flt_rc_config flt_rc_ac_default = {FLT_RC_AC, 10000, 0, 0, CAP_U(1)};
static void filter_rc_update(void *param, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
diff --git a/src/emu/sound/flt_rc.h b/src/emu/sound/flt_rc.h
index 189d98c3651..c8b16324df8 100644
--- a/src/emu/sound/flt_rc.h
+++ b/src/emu/sound/flt_rc.h
@@ -52,7 +52,7 @@ struct _flt_rc_config
double C;
};
-extern flt_rc_config flt_rc_ac_default;
+extern const flt_rc_config flt_rc_ac_default;
void filter_rc_set_RC(int num, int type, double R1, double R2, double R3, double C);
diff --git a/src/emu/sound/fm.c b/src/emu/sound/fm.c
index aca7d18584e..fd1e4a34ecc 100644
--- a/src/emu/sound/fm.c
+++ b/src/emu/sound/fm.c
@@ -2333,7 +2333,7 @@ typedef struct
UINT8 addr_A1; /* address line A1 */
/* ADPCM-A unit */
- UINT8 *pcmbuf; /* pcm rom buffer */
+ const UINT8 *pcmbuf; /* pcm rom buffer */
UINT32 pcm_size; /* size of pcm rom */
UINT8 adpcmTL; /* adpcmA total level */
ADPCM_CH adpcm[6]; /* adpcm channels */
@@ -2353,14 +2353,14 @@ typedef YM2610 YM2608;
#define ADPCM_SHIFT (16) /* frequency step rate */
#define ADPCMA_ADDRESS_SHIFT 8 /* adpcm A address shift */
-static UINT8 *pcmbufA;
+static const UINT8 *pcmbufA;
static UINT32 pcmsizeA;
/* Algorithm and tables verified on real YM2608 and YM2610 */
/* usual ADPCM table (16 * 1.1^N) */
-static int steps[49] =
+static const int steps[49] =
{
16, 17, 19, 21, 23, 25, 28,
31, 34, 37, 41, 45, 50, 55,
@@ -2372,7 +2372,7 @@ static int steps[49] =
};
/* different from the usual ADPCM table */
-static int step_inc[8] = { -1*16, -1*16, -1*16, -1*16, 2*16, 5*16, 7*16, 9*16 };
+static const int step_inc[8] = { -1*16, -1*16, -1*16, -1*16, 2*16, 5*16, 7*16, 9*16 };
/* speedup purposes only */
static int jedi_table[ 49*16 ];
@@ -2599,7 +2599,7 @@ static void FMsave_state_adpcma(const char *name,int num,ADPCM_CH *adpcm)
-static unsigned int YM2608_ADPCM_ROM_addr[2*6] = {
+static const unsigned int YM2608_ADPCM_ROM_addr[2*6] = {
0x0000, 0x01bf, /* bass drum */
0x01c0, 0x043f, /* snare drum */
0x0440, 0x1b7f, /* top cymbal */
@@ -2614,7 +2614,7 @@ static unsigned int YM2608_ADPCM_ROM_addr[2*6] = {
It was verified, using real YM2608, that this ADPCM stream produces 100% correct output signal.
*/
-static unsigned char YM2608_ADPCM_ROM[0x2000] = {
+static const unsigned char YM2608_ADPCM_ROM[0x2000] = {
/* Source: 01BD.ROM */
/* Length: 448 / 0x000001C0 */
@@ -4119,7 +4119,7 @@ void *YM2610Init(void *param, int index, int clock, int rate,
F2610->OPN.ST.IRQ_Handler = IRQHandler;
F2610->OPN.ST.SSG = ssg;
/* ADPCM */
- F2610->pcmbuf = (UINT8 *)pcmroma;
+ F2610->pcmbuf = (const UINT8 *)pcmroma;
F2610->pcm_size = pcmsizea;
/* DELTA-T */
F2610->deltaT.memory = (UINT8 *)pcmromb;
diff --git a/src/emu/sound/k007232.c b/src/emu/sound/k007232.c
index 53c33c346e7..3e4f609bfee 100644
--- a/src/emu/sound/k007232.c
+++ b/src/emu/sound/k007232.c
@@ -58,7 +58,7 @@ typedef struct kdacApcm
#if 0
-static int kdac_note[] = {
+static const int kdac_note[] = {
261.63/8, 277.18/8,
293.67/8, 311.13/8,
329.63/8,
@@ -70,7 +70,7 @@ static int kdac_note[] = {
523.25/8,
};
-static float kdaca_fn[][2] = {
+static const float kdaca_fn[][2] = {
/* B */
{ 0x03f, 493.88/8 }, /* ?? */
{ 0x11f, 493.88/4 }, /* ?? */
diff --git a/src/emu/sound/k053260.c b/src/emu/sound/k053260.c
index 6a6b6fc1d1a..054e281d6c6 100644
--- a/src/emu/sound/k053260.c
+++ b/src/emu/sound/k053260.c
@@ -95,7 +95,7 @@ INLINE int limit( int val, int max, int min ) {
#define MINOUT -0x8000
static void K053260_update( void * param, stream_sample_t **inputs, stream_sample_t **buffer, int length ) {
- static long dpcmcnv[] = { 0,1,2,4,8,16,32,64, -128, -64, -32, -16, -8, -4, -2, -1};
+ static const long dpcmcnv[] = { 0,1,2,4,8,16,32,64, -128, -64, -32, -16, -8, -4, -2, -1};
int i, j, lvol[4], rvol[4], play[4], loop[4], ppcm_data[4], ppcm[4];
unsigned char *rom[4];
diff --git a/src/emu/sound/k054539.c b/src/emu/sound/k054539.c
index 1d5c13a4ab9..1677ed3085b 100644
--- a/src/emu/sound/k054539.c
+++ b/src/emu/sound/k054539.c
@@ -123,7 +123,7 @@ static void K054539_update(void *param, stream_sample_t **inputs, stream_sample_
struct k054539_info *info = param;
#define VOL_CAP 1.80
- static INT16 dpcm[16] = {
+ static const INT16 dpcm[16] = {
0<<8, 1<<8, 4<<8, 9<<8, 16<<8, 25<<8, 36<<8, 49<<8,
-64<<8, -49<<8, -36<<8, -25<<8, -16<<8, -9<<8, -4<<8, -1<<8
};
@@ -368,7 +368,7 @@ else
#if CHANNEL_DEBUG
{
- static char gc_msg[32] = "chip : ";
+ static const char gc_msg[32] = "chip : ";
static int gc_active=0, gc_chip=0, gc_pos[2]={0,0};
double *gc_fptr;
char *gc_cptr;
diff --git a/src/emu/sound/msm5232.c b/src/emu/sound/msm5232.c
index 0853d38acb2..ef065e1f5ec 100644
--- a/src/emu/sound/msm5232.c
+++ b/src/emu/sound/msm5232.c
@@ -179,8 +179,8 @@ static void msm5232_init_tables( MSM5232 *chip )
#if 0
{
/* rate tables (in miliseconds) */
- static int ATBL[8] = { 2,4,8,16, 32,64, 32,64};
- static int DTBL[16]= { 40,80,160,320, 640,1280, 640,1280,
+ static const int ATBL[8] = { 2,4,8,16, 32,64, 32,64};
+ static const int DTBL[16]= { 40,80,160,320, 640,1280, 640,1280,
333,500,1000,2000, 4000,8000, 4000,8000};
for (i=0; i<8; i++)
{
diff --git a/src/emu/sound/multipcm.c b/src/emu/sound/multipcm.c
index 414d7681a0f..8310235d0a9 100644
--- a/src/emu/sound/multipcm.c
+++ b/src/emu/sound/multipcm.c
@@ -35,7 +35,7 @@
#define MULTIPCM_CLOCKDIV (360.0)
#define MULTIPCM_ONE (18)
-static int ctbl[] =
+static const int ctbl[] =
{
0, 1, 2, 3, 4, 5, 6 , -1, // voice number mapping
7, 8, 9, 10,11,12,13, -1,
@@ -43,7 +43,7 @@ static int ctbl[] =
21,22,23,24,25,26,27, -1,
};
-static int decaytbl[16] = // decay times
+static const int decaytbl[16] = // decay times
{
0, 300, 800, 1400,
2100, 3000, 4000, 5200,
diff --git a/src/emu/sound/okim6295.c b/src/emu/sound/okim6295.c
index 6b42a68e020..119897c6409 100644
--- a/src/emu/sound/okim6295.c
+++ b/src/emu/sound/okim6295.c
@@ -86,7 +86,7 @@ const struct OKIM6295interface okim6295_interface_region_4_pin7low = { REGION_SO
static void compute_tables(void)
{
/* nibble to bit map */
- static int nbl2bit[16][4] =
+ static const int nbl2bit[16][4] =
{
{ 1, 0, 0, 0}, { 1, 0, 0, 1}, { 1, 0, 1, 0}, { 1, 0, 1, 1},
{ 1, 1, 0, 0}, { 1, 1, 0, 1}, { 1, 1, 1, 0}, { 1, 1, 1, 1},
diff --git a/src/emu/sound/s14001a.c b/src/emu/sound/s14001a.c
index 306b537db8d..7e50a5b5d1b 100644
--- a/src/emu/sound/s14001a.c
+++ b/src/emu/sound/s14001a.c
@@ -172,7 +172,7 @@ typedef struct
#define REPEATCOUNT ((chip->PlayParams<<1)&0x6) // remember: its 3 bits and the bottom bit is always zero!
#define LOCALSILENCESTATE ((chip->OutputCounter & 0x2) && (MIRRORMODE)) // 1 when silent output, 0 when DAC output.
-static INT8 DeltaTable[4][4] =
+static const INT8 DeltaTable[4][4] =
{
{ 0xCD, 0xCD, 0xEF, 0xEF, },
{ 0xEF, 0xEF, 0x00, 0x00, },
diff --git a/src/emu/sound/scsp.c b/src/emu/sound/scsp.c
index a24ed931946..542c53a448a 100644
--- a/src/emu/sound/scsp.c
+++ b/src/emu/sound/scsp.c
@@ -411,6 +411,8 @@ static int EG_Update(struct _SLOT *slot)
break;
case DECAY1:
slot->EG.volume-=slot->EG.D1R;
+ if(slot->EG.volume<=0)
+ slot->EG.volume=0;
if(slot->EG.volume>>(EG_SHIFT+5)<slot->EG.DL)
slot->EG.state=DECAY2;
break;
@@ -1063,7 +1065,7 @@ SCSPTMPL(1,1,1,3)
typedef void (*_SCSPUpdateModes)(struct _SCSP *,struct _SLOT *,unsigned int,unsigned int);
-static _SCSPUpdateModes SCSPUpdateModes[]=
+static const _SCSPUpdateModes SCSPUpdateModes[]=
{
SCSPTMPL(0,0,0,0)
SCSPTMPL(0,0,0,1)
@@ -1225,18 +1227,18 @@ INLINE INT32 SCSP_UpdateSlot(struct _SCSP *SCSP, struct _SLOT *slot)
switch(LPCTL(slot))
{
case 0: //no loop
- if(addr>LEA(slot))
+ if(addr>=LEA(slot))
{
//slot->active=0;
SCSP_StopSlot(slot,0);
}
break;
case 1: //normal loop
- if(addr>LEA(slot))
+ if(addr>=LEA(slot))
slot->cur_addr=LSA(slot)<<SHIFT;
break;
case 2: //reverse loop
- if(addr>LEA(slot))
+ if(addr>=LEA(slot))
{
slot->cur_addr=LEA(slot)<<SHIFT;
slot->Backwards=1;
@@ -1245,7 +1247,7 @@ INLINE INT32 SCSP_UpdateSlot(struct _SCSP *SCSP, struct _SLOT *slot)
slot->cur_addr=LEA(slot)<<SHIFT;
break;
case 3: //ping-pong
- if(addr>LEA(slot)) //reached end, reverse till start
+ if(addr>=LEA(slot)) //reached end, reverse till start
{
slot->cur_addr=LEA(slot)<<SHIFT;
slot->Backwards=1;
@@ -1302,12 +1304,13 @@ static void SCSP_DoMasterSamples(struct _SCSP *SCSP, int nsamples)
++SCSP->BUFPTR;
SCSP->BUFPTR&=63;
#ifdef USEDSP
- SCSPDSP_SetSample(&SCSP->DSP,sample>>SHIFT,ISEL(slot),IMXL(slot));
+ Enc=((TL(slot))<<0x0)|((IMXL(slot))<<0xd);
+ SCSPDSP_SetSample(&SCSP->DSP,(sample*SCSP->LPANTABLE[Enc])>>SHIFT,ISEL(slot),IMXL(slot));
#endif
Enc=((TL(slot))<<0x0)|((DIPAN(slot))<<0x8)|((DISDL(slot))<<0xd);
{
- smpl+=(sample*SCSP->LPANTABLE[Enc])>>SHIFT;
- smpr+=(sample*SCSP->RPANTABLE[Enc])>>SHIFT;
+ smpl+=(sample*SCSP->LPANTABLE[Enc])>>SHIFT;
+ smpr+=(sample*SCSP->RPANTABLE[Enc])>>SHIFT;
}
}
@@ -1320,14 +1323,14 @@ static void SCSP_DoMasterSamples(struct _SCSP *SCSP, int nsamples)
struct _SLOT *slot=SCSP->Slots+i;
if(EFSDL(slot))
{
- unsigned short Enc=(TL(slot))|((EFPAN(slot))<<0x8)|((EFSDL(slot))<<0xd);
- smpl+=(SCSP->DSP.EFREG[i]*SCSP->LPANTABLE[Enc])>>(SHIFT-4);
- smpr+=(SCSP->DSP.EFREG[i]*SCSP->RPANTABLE[Enc])>>(SHIFT-4);
+ unsigned short Enc=((EFPAN(slot))<<0x8)|((EFSDL(slot))<<0xd);
+ smpl+=(SCSP->DSP.EFREG[i]*SCSP->LPANTABLE[Enc])>>SHIFT;
+ smpr+=(SCSP->DSP.EFREG[i]*SCSP->RPANTABLE[Enc])>>SHIFT;
}
}
- *bufl++ = ICLIP16(smpl>>4);
- *bufr++ = ICLIP16(smpr>>4);
+ *bufl++ = ICLIP16(smpl>>2);
+ *bufr++ = ICLIP16(smpr>>2);
}
}
#endif
diff --git a/src/emu/sound/scspdsp.c b/src/emu/sound/scspdsp.c
index 9a417c47443..bb30dd376be 100644
--- a/src/emu/sound/scspdsp.c
+++ b/src/emu/sound/scspdsp.c
@@ -6,19 +6,49 @@
static UINT16 PACK(INT32 val)
{
- //cut to 16 bits
- INT32 f=((UINT32 ) val)>>8;
- return f;
+ UINT32 temp;
+ int sign,exponent,k;
+
+ sign = (val >> 23) & 0x1;
+ temp = (val ^ (val << 1)) & 0xFFFFFF;
+ exponent = 0;
+ for (k=0; k<12; k++)
+ {
+ if (temp & 0x800000)
+ break;
+ temp <<= 1;
+ exponent += 1;
+ }
+ if (exponent < 12)
+ val = (val << exponent) & 0x3FFFFF;
+ else
+ val <<= 11;
+ val >>= 11;
+ val |= sign << 15;
+ val |= exponent << 11;
+
+ return (UINT16)val;
}
static INT32 UNPACK(UINT16 val)
{
- INT32 r=val<<8;
- r<<=8;
- r>>=8;
- //if(r&0x00800000)
- // r|=0xFF000000;
- return r;
+ int sign,exponent,mantissa;
+ INT32 uval;
+
+ sign = (val >> 15) & 0x1;
+ exponent = (val >> 11) & 0xF;
+ mantissa = val & 0x7FF;
+ uval = mantissa << 11;
+ if (exponent > 11)
+ exponent = 11;
+ else
+ uval |= (sign ^ 1) << 22;
+ uval |= sign << 23;
+ uval <<= 8;
+ uval >>= 8;
+ uval >>= exponent;
+
+ return uval;
}
void SCSPDSP_Init(struct _SCSPDSP *DSP)
@@ -125,7 +155,7 @@ void SCSPDSP_Step(struct _SCSPDSP *DSP)
if(IRA<=0x1f)
INPUTS=DSP->MEMS[IRA];
else if(IRA<=0x2F)
- INPUTS=DSP->MIXS[IRA-0x20]<<8; //MIXS is 16 bit
+ INPUTS=DSP->MIXS[IRA-0x20]<<4; //MIXS is 20 bit
else if(IRA<=0x31)
INPUTS=0;
@@ -298,7 +328,7 @@ void SCSPDSP_Step(struct _SCSPDSP *DSP)
void SCSPDSP_SetSample(struct _SCSPDSP *DSP,INT32 sample,int SEL,int MXL)
{
//DSP->MIXS[SEL]+=sample<<(MXL+1)/*7*/;
- DSP->MIXS[SEL]+=sample<<7;
+ DSP->MIXS[SEL]+=sample;
// if(MXL)
// int a=1;
}
diff --git a/src/emu/sound/scsplfo.c b/src/emu/sound/scsplfo.c
index dc9dcca674c..01023a4ba82 100644
--- a/src/emu/sound/scsplfo.c
+++ b/src/emu/sound/scsplfo.c
@@ -28,10 +28,10 @@ struct _LFO
static int PLFO_TRI[256],PLFO_SQR[256],PLFO_SAW[256],PLFO_NOI[256];
static int ALFO_TRI[256],ALFO_SQR[256],ALFO_SAW[256],ALFO_NOI[256];
-static float LFOFreq[32]={0.17,0.19,0.23,0.27,0.34,0.39,0.45,0.55,0.68,0.78,0.92,1.10,1.39,1.60,1.87,2.27,
+static const float LFOFreq[32]={0.17,0.19,0.23,0.27,0.34,0.39,0.45,0.55,0.68,0.78,0.92,1.10,1.39,1.60,1.87,2.27,
2.87,3.31,3.92,4.79,6.15,7.18,8.60,10.8,14.4,17.2,21.5,28.7,43.1,57.4,86.1,172.3};
-static float ASCALE[8]={0.0,0.4,0.8,1.5,3.0,6.0,12.0,24.0};
-static float PSCALE[8]={0.0,7.0,13.5,27.0,55.0,112.0,230.0,494};
+static const float ASCALE[8]={0.0,0.4,0.8,1.5,3.0,6.0,12.0,24.0};
+static const float PSCALE[8]={0.0,7.0,13.5,27.0,55.0,112.0,230.0,494};
static int PSCALES[8][256];
static int ASCALES[8][256];
@@ -47,7 +47,7 @@ static void LFO_Init(void)
if(i<128)
p=i;
else
- p=255-i;
+ p=i-256;
ALFO_SAW[i]=a;
PLFO_SAW[i]=p;
diff --git a/src/emu/sound/side6581.h b/src/emu/sound/side6581.h
index 8e2a5b8e829..149f5e24edf 100644
--- a/src/emu/sound/side6581.h
+++ b/src/emu/sound/side6581.h
@@ -11,7 +11,7 @@
// C64 C PAL, MOS 6581R4 1686 S
//
-static UINT8 releaseTab[] =
+static const UINT8 releaseTab[] =
{
255, 255, 254, 254, 253, 253, 252, 252, 251, 251, 250, 250, 249, 249, 248,
248, 247, 247, 246, 246, 245, 245, 244, 244, 243, 243, 242, 242, 241, 241,
diff --git a/src/emu/sound/sidenvel.c b/src/emu/sound/sidenvel.c
index 2958b8a9b24..a042f303baa 100644
--- a/src/emu/sound/sidenvel.c
+++ b/src/emu/sound/sidenvel.c
@@ -46,7 +46,7 @@ const UINT8 masterVolumeLevels[16] =
static UINT16 masterAmplModTable[16*256];
-static float attackTimes[16] =
+static const float attackTimes[16] =
{
/* milliseconds */
#if defined(SID_REFTIMES)
@@ -60,7 +60,7 @@ static float attackTimes[16] =
#endif
};
-static float decayReleaseTimes[16] =
+static const float decayReleaseTimes[16] =
{
/* milliseconds */
#if defined(SID_REFTIMES)
diff --git a/src/emu/sound/sidw6581.h b/src/emu/sound/sidw6581.h
index c18445a3f10..d66bf58d85c 100644
--- a/src/emu/sound/sidw6581.h
+++ b/src/emu/sound/sidw6581.h
@@ -8,7 +8,7 @@
* Copyright (C) 1998 Dag Lem <resid@nimrod.no>
*/
-static UINT8 waveform30_6581[4096] =
+static const UINT8 waveform30_6581[4096] =
{
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
@@ -268,7 +268,7 @@ static UINT8 waveform30_6581[4096] =
0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3e,0x3e,0x3f,0x3f,0x7f,0x7f,0x7f,0x7f
};
-static UINT8 waveform50_6581[4096+4096] =
+static const UINT8 waveform50_6581[4096+4096] =
{
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
@@ -528,7 +528,7 @@ static UINT8 waveform50_6581[4096+4096] =
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0
};
-static UINT8 waveform60_6581[4096+4096] =
+static const UINT8 waveform60_6581[4096+4096] =
{
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
@@ -788,7 +788,7 @@ static UINT8 waveform60_6581[4096+4096] =
0x70,0x7c,0x7c,0x7f,0x7c,0x7f,0x7f,0x7f,0x7e,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f
};
-static UINT8 waveform70_6581[4096+4096] =
+static const UINT8 waveform70_6581[4096+4096] =
{
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
diff --git a/src/emu/sound/sidw8580.h b/src/emu/sound/sidw8580.h
index 226d2e18b34..033d550c228 100644
--- a/src/emu/sound/sidw8580.h
+++ b/src/emu/sound/sidw8580.h
@@ -7,7 +7,7 @@
* Created with Deadman's Raw Data to C Header converter
*/
-static UINT8 waveform30_8580[4096] =
+static const UINT8 waveform30_8580[4096] =
{
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
@@ -353,7 +353,7 @@ static UINT8 waveform30_8580[4096] =
0xff,0xff,0xff,0xff
};
-static UINT8 waveform50_8580[4096+4096] =
+static const UINT8 waveform50_8580[4096+4096] =
{
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
@@ -699,7 +699,7 @@ static UINT8 waveform50_8580[4096+4096] =
0x00,0x00,0x00,0x00
};
-static UINT8 waveform60_8580[4096+4096] =
+static const UINT8 waveform60_8580[4096+4096] =
{
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
@@ -1045,7 +1045,7 @@ static UINT8 waveform60_8580[4096+4096] =
0xff,0xff,0xff,0xff
};
-static UINT8 waveform70_8580[4096+4096] =
+static const UINT8 waveform70_8580[4096+4096] =
{
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/sound/sn76477.c b/src/emu/sound/sn76477.c
index 34db6ea018e..a9a25eac9f3 100644
--- a/src/emu/sound/sn76477.c
+++ b/src/emu/sound/sn76477.c
@@ -643,7 +643,7 @@ static double compute_center_to_peak_voltage_out(struct SN76477 *sn)
static void log_enable_line(struct SN76477 *sn)
{
#if VERBOSE
- static const char *desc[] =
+ static const char *const desc[] =
{
"Enabled", "Inhibited"
};
diff --git a/src/emu/sound/sp0256.c b/src/emu/sound/sp0256.c
index 67b34e621f7..22762080ba2 100644
--- a/src/emu/sound/sp0256.c
+++ b/src/emu/sound/sp0256.c
@@ -283,7 +283,7 @@ static int lpc12_update(struct lpc12_t *f, int num_samp, INT16 *out, UINT32 *opt
return i;
}
-static int stage_map[6] = { 0, 1, 2, 3, 4, 5 };
+static const int stage_map[6] = { 0, 1, 2, 3, 4, 5 };
/* ======================================================================== */
/* LPC12_REGDEC -- Decode the register set in the filter bank. */
diff --git a/src/emu/sound/speaker.c b/src/emu/sound/speaker.c
index 4fba85bb5e3..fe5277cb56e 100644
--- a/src/emu/sound/speaker.c
+++ b/src/emu/sound/speaker.c
@@ -11,12 +11,12 @@
#include "streams.h"
#include "speaker.h"
-static INT16 default_levels[2] = {0,32767};
+static const INT16 default_levels[2] = {0,32767};
struct speaker
{
sound_stream *channel;
- INT16 *levels;
+ const INT16 *levels;
int num_levels;
int level;
};
diff --git a/src/emu/sound/tms3615.c b/src/emu/sound/tms3615.c
index 46225348ccd..1b3212627e6 100644
--- a/src/emu/sound/tms3615.c
+++ b/src/emu/sound/tms3615.c
@@ -7,7 +7,7 @@
#define TONES 13
-static int divisor[TONES] = { 478, 451, 426, 402, 379, 358, 338, 319, 301, 284, 268, 253, 239 };
+static const int divisor[TONES] = { 478, 451, 426, 402, 379, 358, 338, 319, 301, 284, 268, 253, 239 };
struct TMS3615 {
sound_stream *channel; /* returned by stream_create() */
diff --git a/src/emu/sound/tms36xx.c b/src/emu/sound/tms36xx.c
index 911e929e08b..250634bb826 100644
--- a/src/emu/sound/tms36xx.c
+++ b/src/emu/sound/tms36xx.c
@@ -301,7 +301,7 @@ static const int tune4[13*6] = {
B(1), B(2), Dx(3), B(3), Dx(4), B(4)
};
-static const int *tunes[] = {NULL,tune1,tune2,tune3,tune4};
+static const int *const tunes[] = {NULL,tune1,tune2,tune3,tune4};
#define DECAY(voice) \
if( tms->vol[voice] > VMIN ) \
diff --git a/src/emu/sound/tms5110.c b/src/emu/sound/tms5110.c
index a1e3ee5131c..96ceea772b7 100644
--- a/src/emu/sound/tms5110.c
+++ b/src/emu/sound/tms5110.c
@@ -709,7 +709,7 @@ static void parse_frame(struct tms5110 *tms)
#if 0
/*This is an example word TEN taken from the TMS5110A datasheet*/
-static unsigned int example_word_TEN[619]={
+static const unsigned int example_word_TEN[619]={
/* 1*/1,0,0,0, 0, 0,0,0,0,0, 1,1,0,0,0, 0,0,0,1,0, 0,1,1,1, 0,1,0,1,
/* 2*/1,0,0,0, 0, 0,0,0,0,0, 1,0,0,1,0, 0,0,1,1,0, 0,0,1,1, 0,1,0,1,
/* 3*/1,1,0,0, 0, 1,0,0,0,0, 1,0,1,0,0, 0,1,0,1,0, 0,1,0,0, 1,0,1,0, 1,0,0,0, 1,0,0,1, 0,1,0,1, 0,0,1, 0,1,0, 0,1,1,
diff --git a/src/emu/sound/tms5220r.c b/src/emu/sound/tms5220r.c
index e373dd045ec..c3d47f04e21 100644
--- a/src/emu/sound/tms5220r.c
+++ b/src/emu/sound/tms5220r.c
@@ -83,7 +83,7 @@ const static short k10table [0x08]={
/* chirp table */
-static char chirptable[51]={
+static const char chirptable[51]={
0x00, 0x2a, (char)0xd4, 0x32,
(char)0xb2, 0x12, 0x25, 0x14,
0x02, (char)0xe1, (char)0xc5, 0x02,
@@ -101,7 +101,7 @@ static char chirptable[51]={
/* interpolation coefficients (in rightshifts, as in actual chip) */
-static char interp_coeff[8] = {
+static const char interp_coeff[8] = {
3, 3, 3, 2, 2, 1, 1, 0
};
diff --git a/src/emu/sound/vlm5030.c b/src/emu/sound/vlm5030.c
index 9d1ea3eef1e..303c2dda0da 100644
--- a/src/emu/sound/vlm5030.c
+++ b/src/emu/sound/vlm5030.c
@@ -174,7 +174,7 @@ static const char VLM_NAME[] = "VLM5030";
/* This is the energy lookup table */
/* sampled from real chip */
-static unsigned short energytable[0x20] =
+static const unsigned short energytable[0x20] =
{
0, 2, 4, 6, 10, 12, 14, 18, /* 0-7 */
22, 26, 30, 34, 38, 44, 48, 54, /* 8-15 */
diff --git a/src/emu/sound/ym2151.c b/src/emu/sound/ym2151.c
index 063cfcc7477..5180db44620 100644
--- a/src/emu/sound/ym2151.c
+++ b/src/emu/sound/ym2151.c
@@ -229,7 +229,7 @@ static UINT32 d1l_tab[16];
#define RATE_STEPS (8)
-static UINT8 eg_inc[19*RATE_STEPS]={
+static const UINT8 eg_inc[19*RATE_STEPS]={
/*cycle:0 1 2 3 4 5 6 7*/
@@ -262,7 +262,7 @@ static UINT8 eg_inc[19*RATE_STEPS]={
#define O(a) (a*RATE_STEPS)
/*note that there is no O(17) in this table - it's directly in the code */
-static UINT8 eg_rate_select[32+64+32]={ /* Envelope Generator rates (32 + 64 rates + 32 RKS) */
+static const UINT8 eg_rate_select[32+64+32]={ /* Envelope Generator rates (32 + 64 rates + 32 RKS) */
/* 32 dummy (infinite time) rates */
O(18),O(18),O(18),O(18),O(18),O(18),O(18),O(18),
O(18),O(18),O(18),O(18),O(18),O(18),O(18),O(18),
@@ -309,7 +309,7 @@ O(16),O(16),O(16),O(16),O(16),O(16),O(16),O(16)
/*mask 2047, 1023, 511, 255, 127, 63, 31, 15, 7, 3, 1, 0, 0, 0, 0, 0 */
#define O(a) (a*1)
-static UINT8 eg_rate_shift[32+64+32]={ /* Envelope Generator counter shifts (32 + 64 rates + 32 RKS) */
+static const UINT8 eg_rate_shift[32+64+32]={ /* Envelope Generator counter shifts (32 + 64 rates + 32 RKS) */
/* 32 infinite time rates */
O(0),O(0),O(0),O(0),O(0),O(0),O(0),O(0),
O(0),O(0),O(0),O(0),O(0),O(0),O(0),O(0),
@@ -362,14 +362,14 @@ O( 0),O( 0),O( 0),O( 0),O( 0),O( 0),O( 0),O( 0)
* DT2=0 DT2=1 DT2=2 DT2=3
* 0 600 781 950
*/
-static UINT32 dt2_tab[4] = { 0, 384, 500, 608 };
+static const UINT32 dt2_tab[4] = { 0, 384, 500, 608 };
/* DT1 defines offset in Hertz from base note
* This table is converted while initialization...
* Detune table shown in YM2151 User's Manual is wrong (verified on the real chip)
*/
-static UINT8 dt1_tab[4*32] = { /* 4*32 DT1 values */
+static const UINT8 dt1_tab[4*32] = { /* 4*32 DT1 values */
/* DT1=0 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -387,7 +387,7 @@ static UINT8 dt1_tab[4*32] = { /* 4*32 DT1 values */
8, 8, 9,10,11,12,13,14,16,17,19,20,22,22,22,22
};
-static UINT16 phaseinc_rom[768]={
+static const UINT16 phaseinc_rom[768]={
1299,1300,1301,1302,1303,1304,1305,1306,1308,1309,1310,1311,1313,1314,1315,1316,
1318,1319,1320,1321,1322,1323,1324,1325,1327,1328,1329,1330,1332,1333,1334,1335,
1337,1338,1339,1340,1341,1342,1343,1344,1346,1347,1348,1349,1351,1352,1353,1354,
@@ -457,7 +457,7 @@ static UINT16 phaseinc_rom[768]={
some 0x80 could be 0x81 as well as some 0x00 could be 0x01.
*/
-static UINT8 lfo_noise_waveform[256] = {
+static const UINT8 lfo_noise_waveform[256] = {
0xFF,0xEE,0xD3,0x80,0x58,0xDA,0x7F,0x94,0x9E,0xE3,0xFA,0x00,0x4D,0xFA,0xFF,0x6A,
0x7A,0xDE,0x49,0xF6,0x00,0x33,0xBB,0x63,0x91,0x60,0x51,0xFF,0x00,0xD8,0x7F,0xDE,
0xDC,0x73,0x21,0x85,0xB2,0x9C,0x5D,0x24,0xCD,0x91,0x9E,0x76,0x7F,0x20,0xFB,0xF3,
diff --git a/src/emu/sound/ym2413.c b/src/emu/sound/ym2413.c
index f4d65b2263a..d688829c2c0 100644
--- a/src/emu/sound/ym2413.c
+++ b/src/emu/sound/ym2413.c
@@ -557,7 +557,7 @@ static const INT8 lfo_pm_table[8*8] = {
- waveform DC and DM select are 100% correct
*/
-static unsigned char table[19][8] = {
+static const unsigned char table[19][8] = {
/* MULT MULT modTL DcDmFb AR/DR AR/DR SL/RR SL/RR */
/* 0 1 2 3 4 5 6 7 */
{0x49, 0x4c, 0x4c, 0x12, 0x00, 0x00, 0x00, 0x00 }, //0
diff --git a/src/emu/sound/ymdeltat.c b/src/emu/sound/ymdeltat.c
index 2c91a0ca066..f37a6cacaf5 100644
--- a/src/emu/sound/ymdeltat.c
+++ b/src/emu/sound/ymdeltat.c
@@ -151,7 +151,7 @@ UINT8 YM_DELTAT_ADPCM_Read(YM_DELTAT *DELTAT)
/* 0-DRAM x1, 1-ROM, 2-DRAM x8, 3-ROM (3 is bad setting - not allowed by the manual) */
-static UINT8 dram_rightshift[4]={3,0,0,0};
+static const UINT8 dram_rightshift[4]={3,0,0,0};
/* DELTA-T ADPCM write register */
void YM_DELTAT_ADPCM_Write(YM_DELTAT *DELTAT,int r,int v)
diff --git a/src/emu/sound/ymz280b.c b/src/emu/sound/ymz280b.c
index 3af8405b342..ddd9acb3376 100644
--- a/src/emu/sound/ymz280b.c
+++ b/src/emu/sound/ymz280b.c
@@ -117,7 +117,7 @@ static TIMER_CALLBACK( update_irq_state_timer_5 );
static TIMER_CALLBACK( update_irq_state_timer_6 );
static TIMER_CALLBACK( update_irq_state_timer_7 );
-static timer_callback update_irq_state_cb[] =
+static const timer_callback update_irq_state_cb[] =
{
update_irq_state_timer_0,
update_irq_state_timer_1,
diff --git a/src/emu/state.c b/src/emu/state.c
index 9b4159f82a5..a0c7073e9e0 100644
--- a/src/emu/state.c
+++ b/src/emu/state.c
@@ -135,7 +135,7 @@ static void ss_c2(UINT8 *, UINT32);
static void ss_c4(UINT8 *, UINT32);
static void ss_c8(UINT8 *, UINT32);
-static void (*ss_conv[])(UINT8 *, UINT32) = { 0, 0, ss_c2, 0, ss_c4, 0, 0, 0, ss_c8 };
+static void (*const ss_conv[])(UINT8 *, UINT32) = { 0, 0, ss_c2, 0, ss_c4, 0, 0, 0, ss_c8 };
diff --git a/src/emu/ui.c b/src/emu/ui.c
index adbef791c1c..2f6a630b09f 100644
--- a/src/emu/ui.c
+++ b/src/emu/ui.c
@@ -1134,13 +1134,16 @@ int sprintf_game_info(char *buffer)
bufptr += sprintf(bufptr, "\n%s\n", ui_getstring(UI_vectorgame));
/* display screen resolution and refresh rate info for raster games */
- else
+ else if (Machine->drv->video_attributes & VIDEO_TYPE_RASTER)
bufptr += sprintf(bufptr,"\n%s:\n%d " UTF8_MULTIPLY " %d (%s) %f" UTF8_NBSP "Hz\n",
ui_getstring(UI_screenres),
Machine->screen[0].visarea.max_x - Machine->screen[0].visarea.min_x + 1,
Machine->screen[0].visarea.max_y - Machine->screen[0].visarea.min_y + 1,
(Machine->gamedrv->flags & ORIENTATION_SWAP_XY) ? "V" : "H",
ATTOSECONDS_TO_HZ(Machine->screen[0].refresh));
+ else
+ *bufptr++ = '\0';
+
return bufptr - buffer;
}
diff --git a/src/emu/uimenu.c b/src/emu/uimenu.c
index 4f1aeaf7e0d..34cd685a7df 100644
--- a/src/emu/uimenu.c
+++ b/src/emu/uimenu.c
@@ -130,7 +130,7 @@ static render_texture *hilight_texture;
static render_texture *arrow_texture;
-static const char *input_format[] =
+static const char *const input_format[] =
{
"%s",
"%s Analog",
@@ -1891,7 +1891,7 @@ static int input_menu_get_game_items(input_item_data *itemlist)
((in->type == IPT_OTHER && in->name != IP_NAME_DEFAULT) || port_type_to_group(in->type, in->player) != IPG_INVALID))
{
UINT16 sortorder;
- input_seq *curseq, *defseq;
+ const input_seq *curseq, *defseq;
/* determine the sorting order */
if (in->type >= IPT_START1 && in->type <= __ipt_analog_end)
diff --git a/src/emu/uitext.c b/src/emu/uitext.c
index 62e4b9abe7b..8d3a0f8cb4a 100644
--- a/src/emu/uitext.c
+++ b/src/emu/uitext.c
@@ -21,7 +21,7 @@ extern const char *mess_default_text[];
static lang_struct lang;
/* All entries in this table must match the enum ordering in "uitext.h" */
-static const char *mame_default_text[] =
+static const char *const mame_default_text[] =
{
APPNAME,
/* copyright stuff */
@@ -215,7 +215,7 @@ static const char *mame_default_text[] =
-static const char **default_text[] =
+static const char *const *const default_text[] =
{
mame_default_text,
#ifdef MESS
diff --git a/src/emu/validity.c b/src/emu/validity.c
index faa37b60768..633e4f3f6c3 100644
--- a/src/emu/validity.c
+++ b/src/emu/validity.c
@@ -654,7 +654,7 @@ static int validate_cpu(int drivnum, const machine_config *drv, const UINT32 *re
{
#define SPACE_SHIFT(a) ((addr_shift < 0) ? ((a) << -addr_shift) : ((a) >> addr_shift))
#define SPACE_SHIFT_END(a) ((addr_shift < 0) ? (((a) << -addr_shift) | ((1 << -addr_shift) - 1)) : ((a) >> addr_shift))
- static const char *spacename[] = { "program", "data", "I/O" };
+ static const char *const spacename[] = { "program", "data", "I/O" };
int databus_width = cputype_databus_width(cpu->type, spacenum);
int addr_shift = cputype_addrbus_shift(cpu->type, spacenum);
int alignunit = databus_width/8;
diff --git a/src/emu/video.c b/src/emu/video.c
index f89b961ed89..fd7324c785c 100644
--- a/src/emu/video.c
+++ b/src/emu/video.c
@@ -121,6 +121,7 @@ struct _video_global
UINT32 speed; /* overall speed (*100) */
UINT32 original_speed; /* originally-specified speed */
UINT8 refresh_speed; /* flag: TRUE if we max out our speed according to the refresh */
+ UINT8 update_in_pause; /* flag: TRUE if video is updated while in pause */
/* frameskipping */
UINT8 empty_skip_count; /* number of empty frames we have skipped */
@@ -284,6 +285,7 @@ void video_init(running_machine *machine)
global.seconds_to_run = options_get_int(mame_options(), OPTION_SECONDS_TO_RUN);
global.original_speed = global.speed = (options_get_float(mame_options(), OPTION_SPEED) * 100.0 + 0.5);
global.refresh_speed = options_get_bool(mame_options(), OPTION_REFRESHSPEED);
+ global.update_in_pause = options_get_bool(mame_options(), OPTION_UPDATEINPAUSE);
/* allocate memory for our private data */
viddata = machine->video_data = auto_malloc(sizeof(*viddata));
@@ -1023,11 +1025,7 @@ void video_frame_update(int debug)
int phase = mame_get_phase(Machine);
/* only render sound and video if we're in the running phase */
-#ifdef MAME_DEBUG
- if (phase == MAME_PHASE_RUNNING)
-#else
- if (phase == MAME_PHASE_RUNNING && (debug || !mame_is_paused(Machine)))
-#endif
+ if (phase == MAME_PHASE_RUNNING && (!mame_is_paused(Machine) || global.update_in_pause))
{
int anything_changed = finish_screen_updates(Machine);
@@ -1522,6 +1520,7 @@ static osd_ticks_t throttle_until_ticks(osd_ticks_t target_ticks)
}
current_ticks = new_ticks;
}
+ profiler_mark(PROFILER_END);
return current_ticks;
}
@@ -1864,6 +1863,7 @@ static void movie_record_frame(running_machine *machine, int scrnum)
{
video_private *viddata = machine->video_data;
internal_screen_info *info = &viddata->scrinfo[scrnum];
+ const rgb_t *palette;
/* only record if we have a file */
if (info->movie_file != NULL)
@@ -1901,7 +1901,8 @@ static void movie_record_frame(running_machine *machine, int scrnum)
}
/* write the next frame */
- error = mng_capture_frame(mame_core_file(info->movie_file), &pnginfo, bitmap, machine->drv->total_colors, palette_entry_list_adjusted(machine->palette));
+ palette = (machine->palette != NULL) ? palette_entry_list_adjusted(machine->palette) : NULL;
+ error = mng_capture_frame(mame_core_file(info->movie_file), &pnginfo, bitmap, machine->drv->total_colors, palette);
png_free(&pnginfo);
if (error != PNGERR_NONE)
{
diff --git a/src/emu/video/rgbutil.h b/src/emu/video/rgbutil.h
index d3c94496976..43821682963 100644
--- a/src/emu/video/rgbutil.h
+++ b/src/emu/video/rgbutil.h
@@ -14,7 +14,7 @@
#define __RGBUTIL__
/* use SSE on 64-bit implementations, where it can be assumed */
-#if defined(__SSE2__) || (defined(PTR64) && defined(_MSC_VER))
+#if (defined(__SSE2__) && defined(PTR64))
#include "rgbsse.h"
#elif defined(__ALTIVEC__)
#include "rgbvmx.h"
diff --git a/src/emu/video/s2636.c b/src/emu/video/s2636.c
index 664399e4834..baff57f0a8e 100644
--- a/src/emu/video/s2636.c
+++ b/src/emu/video/s2636.c
@@ -76,7 +76,7 @@
#include "driver.h"
#include "s2636.h"
-static int SpriteOffset[4] = {0,0x10,0x20,0x40};
+static const int SpriteOffset[4] = {0,0x10,0x20,0x40};
/* To adjust sprites against bitmap */
diff --git a/src/emu/video/tms34061.c b/src/emu/video/tms34061.c
index f601842cd1d..9f7a6ff4a16 100644
--- a/src/emu/video/tms34061.c
+++ b/src/emu/video/tms34061.c
@@ -47,7 +47,7 @@ struct tms34061_data
static struct tms34061_data tms34061;
-static const char *regnames[] =
+static const char *const regnames[] =
{
"HORENDSYNC", "HORENDBLNK", "HORSTARTBLNK", "HORTOTAL",
"VERENDSYNC", "VERENDBLNK", "VERSTARTBLNK", "VERTOTAL",
@@ -74,7 +74,7 @@ static TIMER_CALLBACK( tms34061_interrupt );
*
*************************************/
-void tms34061_start(struct tms34061_interface *interface)
+void tms34061_start(const struct tms34061_interface *interface)
{
/* reset the data */
memset(&tms34061, 0, sizeof(tms34061));
diff --git a/src/emu/video/tms34061.h b/src/emu/video/tms34061.h
index 9ff83a8eb6a..fb3dc6c04e7 100644
--- a/src/emu/video/tms34061.h
+++ b/src/emu/video/tms34061.h
@@ -56,7 +56,7 @@ struct tms34061_display
/* starts/stops the emulator */
-void tms34061_start(struct tms34061_interface *interface);
+void tms34061_start(const struct tms34061_interface *interface);
/* reads/writes to the 34061 */
UINT8 tms34061_r(int col, int row, int func);
diff --git a/src/emu/video/tms9928a.c b/src/emu/video/tms9928a.c
index cf20b9d60ee..5ff8fcaada3 100644
--- a/src/emu/video/tms9928a.c
+++ b/src/emu/video/tms9928a.c
@@ -110,7 +110,7 @@ static void draw_modebogus (running_machine *machine, mame_bitmap *bitmap, const
static void draw_sprites (running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect);
static void change_register (int reg, UINT8 data);
-static void (*ModeHandlers[])(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) = {
+static void (*const ModeHandlers[])(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) = {
draw_mode0, draw_mode1, draw_mode2, draw_mode12,
draw_mode3, draw_modebogus, draw_mode23,
draw_modebogus };
@@ -305,7 +305,7 @@ WRITE8_HANDLER (TMS9928A_register_w) {
static void change_register (int reg, UINT8 val) {
static const UINT8 Mask[8] =
{ 0x03, 0xfb, 0x0f, 0xff, 0x07, 0x7f, 0x07, 0xff };
- static const char *modes[] = {
+ static const char *const modes[] = {
"Mode 0 (GRAPHIC 1)", "Mode 1 (TEXT 1)", "Mode 2 (GRAPHIC 2)",
"Mode 1+2 (TEXT 1 variation)", "Mode 3 (MULTICOLOR)",
"Mode 1+3 (BOGUS)", "Mode 2+3 (MULTICOLOR variation)",
diff --git a/src/emu/video/v9938.c b/src/emu/video/v9938.c
index 1a239f982db..9e41f30eb00 100644
--- a/src/emu/video/v9938.c
+++ b/src/emu/video/v9938.c
@@ -62,7 +62,7 @@ static UINT16 pal_ind16[16], pal_ind256[256], *pal_indYJK;
#define V9938_MODE_UNKNOWN (10)
-static const char *v9938_modes[] = {
+static const char *const v9938_modes[] = {
"TEXT 1", "MULTICOLOR", "GRAPHIC 1", "GRAPHIC 2", "GRAPHIC 3",
"GRAPHIC 4", "GRAPHIC 5", "GRAPHIC 6", "GRAPHIC 7", "TEXT 2",
"UNKNOWN" };
@@ -1504,7 +1504,7 @@ static void VDPpset(register UINT8 SM, register int MXD,
register int DX, register int DY,
register UINT8 CL, register UINT8 OP);
-static int GetVdpTimingValue(register int *);
+static int GetVdpTimingValue(register const int *);
static void SrchEngine(void);
static void LineEngine(void);
@@ -1522,27 +1522,27 @@ static void ReportVdpCommand(register UINT8 Op);
/*************************************************************/
/** Variables visible only in this module **/
/*************************************************************/
-static UINT8 Mask[4] = { 0x0F,0x03,0x0F,0xFF };
-static int PPB[4] = { 2,4,2,1 };
-static int PPL[4] = { 256,512,512,256 };
+static const UINT8 Mask[4] = { 0x0F,0x03,0x0F,0xFF };
+static const int PPB[4] = { 2,4,2,1 };
+static const int PPL[4] = { 256,512,512,256 };
static int VdpOpsCnt=1;
static void (*VdpEngine)(void)=0;
/* SprOn SprOn SprOf SprOf */
/* ScrOf ScrOn ScrOf ScrOn */
-static int srch_timing[8]={ 818, 1025, 818, 830, /* ntsc */
+static const int srch_timing[8]={ 818, 1025, 818, 830, /* ntsc */
696, 854, 696, 684 }; /* pal */
-static int line_timing[8]={ 1063, 1259, 1063, 1161,
+static const int line_timing[8]={ 1063, 1259, 1063, 1161,
904, 1026, 904, 953 };
-static int hmmv_timing[8]={ 439, 549, 439, 531,
+static const int hmmv_timing[8]={ 439, 549, 439, 531,
366, 439, 366, 427 };
-static int lmmv_timing[8]={ 873, 1135, 873, 1056,
+static const int lmmv_timing[8]={ 873, 1135, 873, 1056,
732, 909, 732, 854 };
-static int ymmm_timing[8]={ 586, 952, 586, 610,
+static const int ymmm_timing[8]={ 586, 952, 586, 610,
488, 720, 488, 500 };
-static int hmmm_timing[8]={ 818, 1111, 818, 854,
+static const int hmmm_timing[8]={ 818, 1111, 818, 854,
684, 879, 684, 708 };
-static int lmmm_timing[8]={ 1160, 1599, 1160, 1172,
+static const int lmmm_timing[8]={ 1160, 1599, 1160, 1172,
964, 1257, 964, 977 };
@@ -1695,7 +1695,7 @@ INLINE void VDPpset(UINT8 SM, int MXD, int DX, int DY, UINT8 CL, UINT8 OP)
/** GetVdpTimingValue() **************************************/
/** Get timing value for a certain VDP command **/
/*************************************************************/
-static int GetVdpTimingValue(register int *timing_values)
+static int GetVdpTimingValue(register const int *timing_values)
{
return(timing_values[((VDP[1]>>6)&1)|(VDP[8]&2)|((VDP[9]<<1)&4)]);
}
@@ -2249,12 +2249,12 @@ static UINT8 v9938_vdp_to_cpu (void)
/*************************************************************/
static void ReportVdpCommand(register UINT8 Op)
{
- static const char *Ops[16] =
+ static const char *const Ops[16] =
{
"SET ","AND ","OR ","XOR ","NOT ","NOP ","NOP ","NOP ",
"TSET","TAND","TOR ","TXOR","TNOT","NOP ","NOP ","NOP "
};
- static const char *Commands[16] =
+ static const char *const Commands[16] =
{
" ABRT"," ????"," ????"," ????","POINT"," PSET"," SRCH"," LINE",
" LMMV"," LMMM"," LMCM"," LMMC"," HMMV"," HMMM"," YMMM"," HMMC"
diff --git a/src/emu/video/vooddefs.h b/src/emu/video/vooddefs.h
index 374df64e76b..f15017d3c14 100644
--- a/src/emu/video/vooddefs.h
+++ b/src/emu/video/vooddefs.h
@@ -604,7 +604,7 @@ static const UINT8 banshee_register_access[0x100] =
*
*************************************/
-static const char *voodoo_reg_name[] =
+static const char *const voodoo_reg_name[] =
{
/* 0x000 */
"status", "{intrCtrl}", "vertexAx", "vertexAy",
@@ -681,7 +681,7 @@ static const char *voodoo_reg_name[] =
};
-static const char *banshee_reg_name[] =
+static const char *const banshee_reg_name[] =
{
/* 0x000 */
"status", "intrCtrl", "vertexAx", "vertexAy",
@@ -843,7 +843,7 @@ static const char *banshee_reg_name[] =
*
*************************************/
-static const char *banshee_io_reg_name[] =
+static const char *const banshee_io_reg_name[] =
{
/* 0x000 */
"status", "pciInit0", "sipMonitor", "lfbMemoryConfig",
@@ -924,7 +924,7 @@ static const char *banshee_io_reg_name[] =
*
*************************************/
-static const char *banshee_agp_reg_name[] =
+static const char *const banshee_agp_reg_name[] =
{
/* 0x000 */
"agpReqSize", "agpHostAddressLow","agpHostAddressHigh","agpGraphicsAddress",
@@ -1681,7 +1681,7 @@ struct _voodoo_state
voodoo_reg reg[0x400]; /* raw registers */
const UINT8 *regaccess; /* register access array */
- const char **regnames; /* register names array */
+ const char *const *regnames; /* register names array */
UINT8 alt_regmap; /* enable alternate register map? */
pci_state pci; /* PCI state */
diff --git a/src/lib/util/options.c b/src/lib/util/options.c
index 44534e2247d..e090cae0399 100644
--- a/src/lib/util/options.c
+++ b/src/lib/util/options.c
@@ -110,7 +110,7 @@ static void output_printf(void (*output)(const char *s), const char *format, ...
GLOBAL VARIABLES
***************************************************************************/
-const char *option_unadorned[MAX_UNADORNED_OPTIONS] =
+const char *const option_unadorned[MAX_UNADORNED_OPTIONS] =
{
"<UNADORNED0>",
"<UNADORNED1>",
diff --git a/src/lib/util/options.h b/src/lib/util/options.h
index 35abc73f226..742f41bde89 100644
--- a/src/lib/util/options.h
+++ b/src/lib/util/options.h
@@ -87,7 +87,7 @@ typedef enum _options_range_type options_range_type;
GLOBAL VARIABLES
***************************************************************************/
-extern const char *option_unadorned[MAX_UNADORNED_OPTIONS];
+extern const char *const option_unadorned[MAX_UNADORNED_OPTIONS];
diff --git a/src/mame/audio/atarijsa.c b/src/mame/audio/atarijsa.c
index c6ef071a726..193cfd0c511 100644
--- a/src/mame/audio/atarijsa.c
+++ b/src/mame/audio/atarijsa.c
@@ -791,7 +791,7 @@ ADDRESS_MAP_END
*
*************************************/
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
atarigen_ym2151_irq_gen
};
diff --git a/src/mame/audio/berzerk.c b/src/mame/audio/berzerk.c
index 7728212bda8..c7908a84fdf 100644
--- a/src/mame/audio/berzerk.c
+++ b/src/mame/audio/berzerk.c
@@ -15,13 +15,13 @@
#define BERZERK_AUDIO_DEBUG (0)
-static struct S14001A_interface berzerk_s14001a_interface =
+static const struct S14001A_interface berzerk_s14001a_interface =
{
REGION_SOUND1 /* voice data region */
};
-static struct CustomSound_interface custom_interface =
+static const struct CustomSound_interface custom_interface =
{
berzerk_sh_start
};
diff --git a/src/mame/audio/cage.c b/src/mame/audio/cage.c
index 9c5f6afcec1..7db002f4669 100644
--- a/src/mame/audio/cage.c
+++ b/src/mame/audio/cage.c
@@ -87,7 +87,7 @@ static UINT32 *speedup_ram;
#define SPORT_DATA_TX 0x48
#define SPORT_DATA_RX 0x4c
-static const char *register_names[] =
+static const char *const register_names[] =
{
"TMS32031-DMA global control", NULL, NULL, NULL,
"TMS32031-DMA source address", NULL, "TMS32031-DMA destination address", NULL,
@@ -590,7 +590,7 @@ static WRITE32_HANDLER( speedup_w )
*
*************************************/
-static struct tms32031_config cage_config =
+static const struct tms32031_config cage_config =
{
0x400000
};
diff --git a/src/mame/audio/cclimber.c b/src/mame/audio/cclimber.c
index f7d04174167..93e8aee3d0f 100644
--- a/src/mame/audio/cclimber.c
+++ b/src/mame/audio/cclimber.c
@@ -75,7 +75,7 @@ WRITE8_HANDLER( cclimber_sample_trigger_w )
}
-struct AY8910interface cclimber_ay8910_interface =
+const struct AY8910interface cclimber_ay8910_interface =
{
0,
0,
diff --git a/src/mame/audio/cinemat.c b/src/mame/audio/cinemat.c
index a3c24a2b845..5e65d971cd6 100644
--- a/src/mame/audio/cinemat.c
+++ b/src/mame/audio/cinemat.c
@@ -1468,7 +1468,7 @@ static WRITE8_HANDLER( sound_output_w )
}
-static struct AY8910interface demon_ay8910_interface_1 =
+static const struct AY8910interface demon_ay8910_interface_1 =
{
sound_porta_r,
sound_portb_r,
@@ -1476,7 +1476,7 @@ static struct AY8910interface demon_ay8910_interface_1 =
sound_portb_w
};
-static struct AY8910interface demon_ay8910_interface_3 =
+static const struct AY8910interface demon_ay8910_interface_3 =
{
0,
0,
@@ -1543,7 +1543,7 @@ static ADDRESS_MAP_START( demon_sound_ports, ADDRESS_SPACE_IO, 8 )
ADDRESS_MAP_END
-static struct z80_irq_daisy_chain daisy_chain[] =
+static const struct z80_irq_daisy_chain daisy_chain[] =
{
{ z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 },
{ 0,0,0,0,-1 }
diff --git a/src/mame/audio/dkong.c b/src/mame/audio/dkong.c
index 421689f46fd..a55a903e266 100644
--- a/src/mame/audio/dkong.c
+++ b/src/mame/audio/dkong.c
@@ -1265,7 +1265,7 @@ ADDRESS_MAP_END
*
*************************************/
-static const char *dkongjr_sample_names[] =
+static const char *const dkongjr_sample_names[] =
{
"*dkongjr",
"jump.wav",
@@ -1283,13 +1283,13 @@ static const char *dkongjr_sample_names[] =
0 /* end of array */
};
-static struct Samplesinterface dkongjr_samples_interface =
+static const struct Samplesinterface dkongjr_samples_interface =
{
8, /* 8 channels */
dkongjr_sample_names
};
-static const char *radarsc1_sample_names[] =
+static const char *const radarsc1_sample_names[] =
{
"*radarsc1",
"10.wav",
@@ -1304,14 +1304,14 @@ static const char *radarsc1_sample_names[] =
0 /* end of array */
};
-static struct Samplesinterface radarsc1_samples_interface =
+static const 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 };
+static const struct NESinterface nes_interface_1 = { REGION_CPU2 };
+static const struct NESinterface nes_interface_2 = { REGION_CPU3 };
/*************************************
*
diff --git a/src/mame/audio/gotya.c b/src/mame/audio/gotya.c
index 46fbfdff0dc..df47bfc52c3 100644
--- a/src/mame/audio/gotya.c
+++ b/src/mame/audio/gotya.c
@@ -9,7 +9,7 @@ struct gotya_sample
};
-static struct gotya_sample gotya_samples[] =
+static const struct gotya_sample gotya_samples[] =
{
{ 0x01, 0, 0 },
{ 0x02, 1, 0 },
diff --git a/src/mame/audio/gyruss.c b/src/mame/audio/gyruss.c
index 92c0bdbddc1..9c6cbed2e7f 100644
--- a/src/mame/audio/gyruss.c
+++ b/src/mame/audio/gyruss.c
@@ -21,7 +21,7 @@
/* Bit 3 comes from the QA output of the LS90 producing a sequence of */
/* 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 */
-static int gyruss_timer[10] =
+static const int gyruss_timer[10] =
{
0x00, 0x01, 0x02, 0x03, 0x04, 0x09, 0x0a, 0x0b, 0x0a, 0x0d
};
diff --git a/src/mame/audio/irem.c b/src/mame/audio/irem.c
index 0cf69bad491..6a20a89651f 100644
--- a/src/mame/audio/irem.c
+++ b/src/mame/audio/irem.c
@@ -98,7 +98,7 @@ if (data&0x0f) popmessage("analog sound %x",data&0x0f);
}
-static struct AY8910interface irem_ay8910_interface_1 =
+static const struct AY8910interface irem_ay8910_interface_1 =
{
soundlatch_r,
0,
@@ -106,7 +106,7 @@ static struct AY8910interface irem_ay8910_interface_1 =
irem_msm5205_w
};
-static struct AY8910interface irem_ay8910_interface_2 =
+static const struct AY8910interface irem_ay8910_interface_2 =
{
0,
0,
@@ -114,13 +114,13 @@ static struct AY8910interface irem_ay8910_interface_2 =
0
};
-static struct MSM5205interface irem_msm5205_interface_1 =
+static const struct MSM5205interface irem_msm5205_interface_1 =
{
irem_adpcm_int, /* interrupt function */
MSM5205_S96_4B /* default to 4KHz, but can be changed at run time */
};
-static struct MSM5205interface irem_msm5205_interface_2 =
+static const struct MSM5205interface irem_msm5205_interface_2 =
{
0, /* interrupt function */
MSM5205_SEX_4B /* default to 4KHz, but can be changed at run time, slave */
diff --git a/src/mame/audio/mcr.c b/src/mame/audio/mcr.c
index 1ca52c94ea7..60834cd280e 100644
--- a/src/mame/audio/mcr.c
+++ b/src/mame/audio/mcr.c
@@ -412,7 +412,7 @@ void ssio_reset_w(int state)
READ8_HANDLER( ssio_input_port_r )
{
- static const char *port[] = { "SSIO.IP0", "SSIO.IP1", "SSIO.IP2", "SSIO.IP3", "SSIO.IP4" };
+ static const char *const port[] = { "SSIO.IP0", "SSIO.IP1", "SSIO.IP2", "SSIO.IP3", "SSIO.IP4" };
UINT8 result = readinputportbytag_safe(port[offset], 0xff);
if (ssio_custom_input[offset])
result = (result & ~ssio_custom_input_mask[offset]) |
@@ -443,7 +443,7 @@ void ssio_set_custom_output(int which, int mask, write8_handler handler)
/********* sound interfaces ***********/
-static struct AY8910interface ssio_ay8910_interface_1 =
+static const struct AY8910interface ssio_ay8910_interface_1 =
{
0,
0,
@@ -451,7 +451,7 @@ static struct AY8910interface ssio_ay8910_interface_1 =
ssio_portb0_w
};
-static struct AY8910interface ssio_ay8910_interface_2 =
+static const struct AY8910interface ssio_ay8910_interface_2 =
{
0,
0,
diff --git a/src/mame/audio/namcoc7x.h b/src/mame/audio/namcoc7x.h
index 68225480277..b6ac15e2efa 100644
--- a/src/mame/audio/namcoc7x.h
+++ b/src/mame/audio/namcoc7x.h
@@ -24,7 +24,7 @@ void namcoc7x_on_driver_init(void);
void namcoc7x_set_host_ram(UINT32 *hostram);
#define NAMCO_C7X_HARDWARE \
-static struct C352interface namcoc7x_c352_interface = \
+static const struct C352interface namcoc7x_c352_interface = \
{ \
REGION_SOUND1 \
};
diff --git a/src/mame/audio/polepos.c b/src/mame/audio/polepos.c
index 1f912352753..78748e226a1 100644
--- a/src/mame/audio/polepos.c
+++ b/src/mame/audio/polepos.c
@@ -26,7 +26,7 @@ static sound_stream *stream;
#define POLEPOS_R167_SHUNT 1.0/(1.0/POLEPOS_R166 + 1.0/250)
#define POLEPOS_R168_SHUNT 1.0/(1.0/POLEPOS_R166 + 1.0/250)
-static double volume_table[8] =
+static const double volume_table[8] =
{
(POLEPOS_R168_SHUNT + POLEPOS_R167_SHUNT + POLEPOS_R166_SHUNT + 2200) / 10000,
(POLEPOS_R168_SHUNT + POLEPOS_R167_SHUNT + POLEPOS_R166 + 2200) / 10000,
@@ -40,8 +40,8 @@ static double volume_table[8] =
static filter2_context filter_engine[3];
-static double r_filt_out[3] = {RES_K(4.7), RES_K(7.5), RES_K(10)};
-static double r_filt_total = 1.0 / (1.0/RES_K(4.7) + 1.0/RES_K(7.5) + 1.0/RES_K(10));
+static const double r_filt_out[3] = {RES_K(4.7), RES_K(7.5), RES_K(10)};
+static const double r_filt_total = 1.0 / (1.0/RES_K(4.7) + 1.0/RES_K(7.5) + 1.0/RES_K(10));
/************************************/
/* Stream updater */
diff --git a/src/mame/audio/rockola.c b/src/mame/audio/rockola.c
index 1cc0988e4b7..d0aed2200b7 100644
--- a/src/mame/audio/rockola.c
+++ b/src/mame/audio/rockola.c
@@ -751,7 +751,7 @@ static int hd38880_data_bytes;
static double hd38880_speed;
-static void rockola_speech_w(UINT8 data, UINT16 *table, int start)
+static void rockola_speech_w(UINT8 data, const UINT16 *table, int start)
{
/*
bit description
@@ -894,7 +894,7 @@ static void rockola_speech_w(UINT8 data, UINT16 *table, int start)
WRITE8_HANDLER( vanguard_speech_w )
{
- static UINT16 vanguard_table[16] =
+ static const UINT16 vanguard_table[16] =
{
0x04000,
0x04325,
@@ -919,7 +919,7 @@ WRITE8_HANDLER( vanguard_speech_w )
WRITE8_HANDLER( fantasy_speech_w )
{
- static UINT16 fantasy_table[16] =
+ static const UINT16 fantasy_table[16] =
{
0x04000,
0x04297,
diff --git a/src/mame/audio/scramble.c b/src/mame/audio/scramble.c
index 734fc187c8f..3a7632a1393 100644
--- a/src/mame/audio/scramble.c
+++ b/src/mame/audio/scramble.c
@@ -36,7 +36,7 @@
/* Bit 7 comes from the QA output of the LS90 producing a sequence of */
/* 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 */
-static int scramble_timer[10] =
+static const int scramble_timer[10] =
{
0x00, 0x10, 0x20, 0x30, 0x40, 0x90, 0xa0, 0xb0, 0xa0, 0xd0
};
@@ -78,7 +78,7 @@ READ8_HANDLER( scramble_portB_r )
/* Bit 7 comes from the QA output of the LS90 producing a sequence of */
/* 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 */
-static int frogger_timer[10] =
+static const int frogger_timer[10] =
{
0x00, 0x10, 0x08, 0x18, 0x40, 0x90, 0x88, 0x98, 0x88, 0xd0
};
diff --git a/src/mame/audio/segag80r.c b/src/mame/audio/segag80r.c
index 36dfd14a42e..be2f5d6e093 100644
--- a/src/mame/audio/segag80r.c
+++ b/src/mame/audio/segag80r.c
@@ -418,7 +418,7 @@ static const struct Samplesinterface sega005_samples_interface =
};
-static struct CustomSound_interface sega005_custom_interface =
+static const struct CustomSound_interface sega005_custom_interface =
{
sega005_custom_start
};
@@ -782,7 +782,7 @@ static const struct Samplesinterface monsterb_samples_interface =
};
-static struct TMS36XXinterface monsterb_tms3617_interface =
+static const struct TMS36XXinterface monsterb_tms3617_interface =
{
TMS3617,
{0.5,0.5,0.5,0.5,0.5,0.5} /* decay times of voices */
diff --git a/src/mame/audio/segasnd.c b/src/mame/audio/segasnd.c
index fb3d4fd61f9..fede97adc14 100644
--- a/src/mame/audio/segasnd.c
+++ b/src/mame/audio/segasnd.c
@@ -264,7 +264,7 @@ ADDRESS_MAP_END
*
*************************************/
-static struct sp0250_interface sp0250_interface =
+static const struct sp0250_interface sp0250_interface =
{
speech_drq_w
};
@@ -902,7 +902,7 @@ ADDRESS_MAP_END
*
*************************************/
-static struct CustomSound_interface usb_custom_interface =
+static const struct CustomSound_interface usb_custom_interface =
{
usb_start
};
diff --git a/src/mame/audio/seibu.h b/src/mame/audio/seibu.h
index 88c2bd1b2e0..cf45f6caf47 100644
--- a/src/mame/audio/seibu.h
+++ b/src/mame/audio/seibu.h
@@ -76,14 +76,14 @@ WRITE8_HANDLER( seibu_adpcm_ctl_2_w );
#define SEIBU_SOUND_SYSTEM_YM3812_HARDWARE \
\
-static struct YM3812interface ym3812_interface = \
+static const struct YM3812interface ym3812_interface = \
{ \
seibu_ym3812_irqhandler \
};
#define SEIBU_SOUND_SYSTEM_ADPCM_HARDWARE \
\
-static struct CustomSound_interface adpcm_interface = \
+static const struct CustomSound_interface adpcm_interface = \
{ \
seibu_adpcm_start, \
seibu_adpcm_stop \
@@ -91,14 +91,14 @@ static struct CustomSound_interface adpcm_interface = \
#define SEIBU_SOUND_SYSTEM_YM2151_HARDWARE \
\
-static struct YM2151interface ym2151_interface = \
+static const struct YM2151interface ym2151_interface = \
{ \
seibu_ym2151_irqhandler \
};
#define SEIBU_SOUND_SYSTEM_YM2203_HARDWARE \
\
-static struct YM2203interface ym2203_interface = \
+static const struct YM2203interface ym2203_interface = \
{ \
0,0,0,0,seibu_ym2203_irqhandler \
};
diff --git a/src/mame/audio/senjyo.c b/src/mame/audio/senjyo.c
index 7520692020c..af27f5ef980 100644
--- a/src/mame/audio/senjyo.c
+++ b/src/mame/audio/senjyo.c
@@ -11,7 +11,7 @@ static void pio_interrupt(int state)
cpunum_set_input_line(1, 0, state);
}
-static z80pio_interface pio_intf =
+static const z80pio_interface pio_intf =
{
pio_interrupt,
0,
diff --git a/src/mame/audio/spiders.c b/src/mame/audio/spiders.c
index 7b1083325d7..15a5ec1a548 100644
--- a/src/mame/audio/spiders.c
+++ b/src/mame/audio/spiders.c
@@ -57,7 +57,7 @@ static const discrete_lfsr_desc spiders_lfsr =
};
-static discrete_dac_r1_ladder spiders_fire_dac =
+static const discrete_dac_r1_ladder spiders_fire_dac =
{
1,
{RES_K(10)}, // R29
@@ -67,7 +67,7 @@ static discrete_dac_r1_ladder spiders_fire_dac =
CAP_N(100) // C100
};
-static discrete_dac_r1_ladder spiders_web_exp_dac =
+static const discrete_dac_r1_ladder spiders_web_exp_dac =
{
1,
{RES_K(10)}, // R44
diff --git a/src/mame/audio/t5182.c b/src/mame/audio/t5182.c
index 2b58d6c1f9e..a60b240b188 100644
--- a/src/mame/audio/t5182.c
+++ b/src/mame/audio/t5182.c
@@ -233,7 +233,7 @@ static READ8_HANDLER(t5182_sharedram_semaphore_main_r)
}
-struct YM2151interface t5182_ym2151_interface =
+const struct YM2151interface t5182_ym2151_interface =
{
t5182_ym2151_irq_handler
};
diff --git a/src/mame/audio/t5182.h b/src/mame/audio/t5182.h
index b5c1a9c4c8c..16cf21cf2dc 100644
--- a/src/mame/audio/t5182.h
+++ b/src/mame/audio/t5182.h
@@ -11,4 +11,4 @@ WRITE8_HANDLER(t5182_sharedram_semaphore_main_release_w);
extern UINT8 *t5182_sharedram;
-extern struct YM2151interface t5182_ym2151_interface;
+extern const struct YM2151interface t5182_ym2151_interface;
diff --git a/src/mame/audio/taito_en.c b/src/mame/audio/taito_en.c
index 937ed800aa2..420fea70de8 100644
--- a/src/mame/audio/taito_en.c
+++ b/src/mame/audio/taito_en.c
@@ -260,7 +260,7 @@ void taito_f3_soundsystem_reset(void)
//cpunum_set_input_line(1, INPUT_LINE_RESET, ASSERT_LINE);
}
-struct ES5505interface es5505_interface =
+const struct ES5505interface es5505_interface =
{
REGION_SOUND1, /* Bank 0: Unused by F3 games? */
REGION_SOUND1, /* Bank 1: All games seem to use this */
diff --git a/src/mame/audio/taito_en.h b/src/mame/audio/taito_en.h
index 9a2f819c60c..6c4b0b8b2db 100644
--- a/src/mame/audio/taito_en.h
+++ b/src/mame/audio/taito_en.h
@@ -25,4 +25,4 @@ void taito_f3_soundsystem_reset(void);
ADDRESS_MAP_EXTERN(f3_sound_map);
-extern struct ES5505interface es5505_interface;
+extern const struct ES5505interface es5505_interface;
diff --git a/src/mame/audio/tank8.c b/src/mame/audio/tank8.c
index 211ead0498b..c424d356c78 100644
--- a/src/mame/audio/tank8.c
+++ b/src/mame/audio/tank8.c
@@ -86,7 +86,7 @@ static const discrete_op_amp_filt_info tank8_filt =
0 /* VEE */
};
-static discrete_dac_r1_ladder tank8_dac =
+static const discrete_dac_r1_ladder tank8_dac =
{
1,
{RES_K(4.7)}, // R89
diff --git a/src/mame/audio/targ.c b/src/mame/audio/targ.c
index 15f01fa7426..1e6f830255d 100644
--- a/src/mame/audio/targ.c
+++ b/src/mame/audio/targ.c
@@ -28,7 +28,7 @@ static int sound_a_freq;
static UINT8 tone_pointer;
static UINT8 tone_offset;
-static UINT8 tone_prom[32] =
+static const UINT8 tone_prom[32] =
{
0xE5,0xE5,0xED,0xED,0xE5,0xE5,0xED,0xED,0xE7,0xE7,0xEF,0xEF,0xE7,0xE7,0xEF,0xEF,
0xC1,0xE1,0xC9,0xE9,0xC5,0xE5,0xCD,0xED,0xC3,0xE3,0xCB,0xEB,0xC7,0xE7,0xCF,0xEF
diff --git a/src/mame/audio/timeplt.c b/src/mame/audio/timeplt.c
index 32d4daa37ca..1fda06b08f8 100644
--- a/src/mame/audio/timeplt.c
+++ b/src/mame/audio/timeplt.c
@@ -55,7 +55,7 @@ ADDRESS_MAP_START( locomotn_sound_writemem, ADDRESS_SPACE_PROGRAM, 8 )
ADDRESS_MAP_END
-struct AY8910interface timeplt_ay8910_interface =
+const struct AY8910interface timeplt_ay8910_interface =
{
soundlatch_r,
timeplt_portB_r
@@ -79,7 +79,7 @@ struct AY8910interface timeplt_ay8910_interface =
/* Bit 7 comes from the QA output of the LS90 producing a sequence of */
/* 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 */
-static int timeplt_timer[10] =
+static const int timeplt_timer[10] =
{
0x00, 0x10, 0x20, 0x30, 0x40, 0x90, 0xa0, 0xb0, 0xa0, 0xd0
};
diff --git a/src/mame/audio/timeplt.h b/src/mame/audio/timeplt.h
index b784e846b80..d9bee89f2e4 100644
--- a/src/mame/audio/timeplt.h
+++ b/src/mame/audio/timeplt.h
@@ -2,5 +2,5 @@ ADDRESS_MAP_EXTERN(timeplt_sound_readmem);
ADDRESS_MAP_EXTERN(timeplt_sound_writemem);
ADDRESS_MAP_EXTERN(locomotn_sound_readmem);
ADDRESS_MAP_EXTERN(locomotn_sound_writemem);
-extern struct AY8910interface timeplt_ay8910_interface;
+extern const struct AY8910interface timeplt_ay8910_interface;
WRITE8_HANDLER( timeplt_sh_irqtrigger_w );
diff --git a/src/mame/audio/williams.c b/src/mame/audio/williams.c
index a9988c2588c..c424b768ef8 100644
--- a/src/mame/audio/williams.c
+++ b/src/mame/audio/williams.c
@@ -158,14 +158,14 @@ static const pia6821_interface cvsd_pia_intf =
****************************************************************************/
/* YM2151 structure (CVSD variant) */
-static struct YM2151interface cvsd_ym2151_interface =
+static const struct YM2151interface cvsd_ym2151_interface =
{
cvsd_ym2151_irq
};
/* YM2151 structure (ADPCM variant) */
-static struct YM2151interface adpcm_ym2151_interface =
+static const struct YM2151interface adpcm_ym2151_interface =
{
adpcm_ym2151_irq
};
diff --git a/src/mame/drivers/20pacgal.c b/src/mame/drivers/20pacgal.c
index b0fd88d3239..0fa5da74254 100644
--- a/src/mame/drivers/20pacgal.c
+++ b/src/mame/drivers/20pacgal.c
@@ -226,7 +226,7 @@ static GFXDECODE_START( 20pacgal )
GFXDECODE_ENTRY( 0, 0, spritelayout, 0, 64 )
GFXDECODE_END
-static struct namco_interface namco_interface =
+static const struct namco_interface namco_interface =
{
3, /* number of voices */
-1, /* memory region */
diff --git a/src/mame/drivers/2mindril.c b/src/mame/drivers/2mindril.c
index 8c40edf5574..039527de58b 100644
--- a/src/mame/drivers/2mindril.c
+++ b/src/mame/drivers/2mindril.c
@@ -184,7 +184,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(0,5,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2610interface ym2610_interface =
+static const struct YM2610interface ym2610_interface =
{
irqhandler,
0,
diff --git a/src/mame/drivers/40love.c b/src/mame/drivers/40love.c
index f85be1dc7b5..a78275f41d8 100644
--- a/src/mame/drivers/40love.c
+++ b/src/mame/drivers/40love.c
@@ -1078,7 +1078,7 @@ static GFXDECODE_START( 40love )
GFXDECODE_ENTRY( REGION_GFX1, 0, sprite_layout, 0, 64 )
GFXDECODE_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
0,
0,
@@ -1086,7 +1086,7 @@ static struct AY8910interface ay8910_interface =
sound_control_3_w
};
-static struct MSM5232interface msm5232_interface =
+static const struct MSM5232interface msm5232_interface =
{
{ 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6 } /* 1.0 uF capacitors (verified on real PCB) */
};
diff --git a/src/mame/drivers/88games.c b/src/mame/drivers/88games.c
index fed86db8801..724d41d2acb 100644
--- a/src/mame/drivers/88games.c
+++ b/src/mame/drivers/88games.c
@@ -75,7 +75,7 @@ static READ8_HANDLER( cheat1_r )
{
int res;
static int cheat = 0;
- static int bits[] = { 0xee, 0xff, 0xbb, 0xaa };
+ static const int bits[] = { 0xee, 0xff, 0xbb, 0xaa };
res = readinputportbytag("IN1");
@@ -93,7 +93,7 @@ static READ8_HANDLER( cheat2_r )
{
int res;
static int cheat = 0;
- static int bits[] = { 0xee, 0xff, 0xbb, 0xaa };
+ static const int bits[] = { 0xee, 0xff, 0xbb, 0xaa };
res = readinputportbytag("IN2");
@@ -275,12 +275,12 @@ INPUT_PORTS_END
-static struct upd7759_interface upd7759_interface_1 =
+static const struct upd7759_interface upd7759_interface_1 =
{
REGION_SOUND1 /* memory region */
};
-static struct upd7759_interface upd7759_interface_2 =
+static const struct upd7759_interface upd7759_interface_2 =
{
REGION_SOUND2 /* memory region */
};
diff --git a/src/mame/drivers/actfancr.c b/src/mame/drivers/actfancr.c
index bcc0cff7128..d30679ec7c2 100644
--- a/src/mame/drivers/actfancr.c
+++ b/src/mame/drivers/actfancr.c
@@ -380,7 +380,7 @@ static void sound_irq(int linestate)
cpunum_set_input_line(1,0,linestate); /* IRQ */
}
-static struct YM3812interface ym3812_interface =
+static const struct YM3812interface ym3812_interface =
{
sound_irq
};
diff --git a/src/mame/drivers/aeroboto.c b/src/mame/drivers/aeroboto.c
index 667ca3b221a..a368c737d5a 100644
--- a/src/mame/drivers/aeroboto.c
+++ b/src/mame/drivers/aeroboto.c
@@ -244,7 +244,7 @@ GFXDECODE_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
soundlatch_r,
soundlatch2_r
diff --git a/src/mame/drivers/aerofgt.c b/src/mame/drivers/aerofgt.c
index dc29057534b..17a770c8235 100644
--- a/src/mame/drivers/aerofgt.c
+++ b/src/mame/drivers/aerofgt.c
@@ -1380,14 +1380,14 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2610interface ym2610_interface =
+static const struct YM2610interface ym2610_interface =
{
irqhandler,
REGION_SOUND1,
REGION_SOUND2
};
-static struct YM3812interface ym3812_interface =
+static const struct YM3812interface ym3812_interface =
{
irqhandler /* IRQ Line */
};
diff --git a/src/mame/drivers/afega.c b/src/mame/drivers/afega.c
index e112d120892..3d4cbc19664 100644
--- a/src/mame/drivers/afega.c
+++ b/src/mame/drivers/afega.c
@@ -1071,7 +1071,7 @@ static void irq_handler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2151interface afega_ym2151_intf =
+static const struct YM2151interface afega_ym2151_intf =
{
irq_handler
};
diff --git a/src/mame/drivers/airbustr.c b/src/mame/drivers/airbustr.c
index 67d34077ede..06f52c0a5fb 100644
--- a/src/mame/drivers/airbustr.c
+++ b/src/mame/drivers/airbustr.c
@@ -557,7 +557,7 @@ GFXDECODE_END
/* Sound Interfaces */
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
input_port_3_r, // DSW-1 connected to port A
input_port_4_r // DSW-2 connected to port B
diff --git a/src/mame/drivers/ajax.c b/src/mame/drivers/ajax.c
index 64bc25c5bd9..2fa4d481637 100644
--- a/src/mame/drivers/ajax.c
+++ b/src/mame/drivers/ajax.c
@@ -252,13 +252,13 @@ static void volume_callback1(int v)
K007232_set_volume(1,1,(v & 0x0f) * 0x11/2,(v >> 4) * 0x11/2);
}
-static struct K007232_interface k007232_interface_1 =
+static const struct K007232_interface k007232_interface_1 =
{
REGION_SOUND1,
volume_callback0
};
-static struct K007232_interface k007232_interface_2 =
+static const struct K007232_interface k007232_interface_2 =
{
REGION_SOUND2,
volume_callback1
diff --git a/src/mame/drivers/aleck64.c b/src/mame/drivers/aleck64.c
index 1d2f4b80099..29fc72ad260 100644
--- a/src/mame/drivers/aleck64.c
+++ b/src/mame/drivers/aleck64.c
@@ -408,7 +408,7 @@ static INPUT_PORTS_START( starsldr )
INPUT_PORTS_END
/* ?? */
-static struct mips3_config config =
+static const struct mips3_config config =
{
16384, /* code cache size */
8192, /* data cache size */
diff --git a/src/mame/drivers/alg.c b/src/mame/drivers/alg.c
index d7a5bf638a5..8215836669e 100644
--- a/src/mame/drivers/alg.c
+++ b/src/mame/drivers/alg.c
@@ -436,7 +436,7 @@ INPUT_PORTS_END
*
*************************************/
-static struct CustomSound_interface amiga_custom_interface =
+static const struct CustomSound_interface amiga_custom_interface =
{
amiga_sh_start
};
diff --git a/src/mame/drivers/aliens.c b/src/mame/drivers/aliens.c
index b313308b00b..9f69c6ea7e4 100644
--- a/src/mame/drivers/aliens.c
+++ b/src/mame/drivers/aliens.c
@@ -245,13 +245,13 @@ static void volume_callback(int v)
K007232_set_volume(0,1,0,(v >> 4) * 0x11);
}
-static struct K007232_interface k007232_interface =
+static const struct K007232_interface k007232_interface =
{
REGION_SOUND1, /* memory regions */
volume_callback /* external port callback */
};
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
0,
aliens_snd_bankswitch_w
diff --git a/src/mame/drivers/alpha68k.c b/src/mame/drivers/alpha68k.c
index 557d3d8ead6..41894cc7adc 100644
--- a/src/mame/drivers/alpha68k.c
+++ b/src/mame/drivers/alpha68k.c
@@ -359,8 +359,8 @@ static READ16_HANDLER( kyros_alpha_trigger_r )
- Super Stingray : 0x21,0x22,0x23,0x24,0x34,0x37,0x3a,0x3d,0x40,0x43,0x46,0x49
*/
static unsigned coinvalue=0, microcontroller_data=0;
- static UINT8 coinage1[8][2]={{1,1},{1,5},{1,3},{2,3},{1,2},{1,6},{1,4},{3,2}};
- static UINT8 coinage2[8][2]={{1,1},{5,1},{3,1},{7,1},{2,1},{6,1},{4,1},{8,1}};
+ static const UINT8 coinage1[8][2]={{1,1},{1,5},{1,3},{2,3},{1,2},{1,6},{1,4},{3,2}};
+ static const UINT8 coinage2[8][2]={{1,1},{5,1},{3,1},{7,1},{2,1},{6,1},{4,1},{8,1}};
static int latch;
int source=shared_ram[offset];
@@ -441,8 +441,8 @@ static READ16_HANDLER( alpha_II_trigger_r )
- Gold Medalist : 0x21,0x23,0x24,0x5b
*/
static unsigned coinvalue=0, microcontroller_data=0;
- static UINT8 coinage1[8][2]={{1,1},{1,2},{1,3},{1,4},{1,5},{1,6},{2,3},{3,2}};
- static UINT8 coinage2[8][2]={{1,1},{2,1},{3,1},{4,1},{5,1},{6,1},{7,1},{8,1}};
+ static const UINT8 coinage1[8][2]={{1,1},{1,2},{1,3},{1,4},{1,5},{1,6},{2,3},{3,2}};
+ static const UINT8 coinage2[8][2]={{1,1},{2,1},{3,1},{4,1},{5,1},{6,1},{7,1},{8,1}};
static int latch;
int source=shared_ram[offset];
@@ -537,8 +537,8 @@ static READ16_HANDLER( alpha_V_trigger_r )
- Super Champion Baseball : 0x21,0x23,0x24
*/
static unsigned coinvalue=0, microcontroller_data=0;
- static UINT8 coinage1[8][2]={{1,1},{1,5},{1,3},{2,3},{1,2},{1,6},{1,4},{3,2}};
- static UINT8 coinage2[8][2]={{1,1},{5,1},{3,1},{7,1},{2,1},{6,1},{4,1},{8,1}};
+ static const UINT8 coinage1[8][2]={{1,1},{1,5},{1,3},{2,3},{1,2},{1,6},{1,4},{3,2}};
+ static const UINT8 coinage2[8][2]={{1,1},{5,1},{3,1},{7,1},{2,1},{6,1},{4,1},{8,1}};
static int latch;
int source=shared_ram[offset];
@@ -2018,12 +2018,12 @@ GFXDECODE_END
/******************************************************************************/
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
soundlatch_r
};
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
soundlatch_r
};
@@ -2033,7 +2033,7 @@ static void YM3812_irq(int param)
cpunum_set_input_line(1, 0, (param) ? HOLD_LINE : CLEAR_LINE);
}
-static struct YM3812interface ym3812_interface =
+static const struct YM3812interface ym3812_interface =
{
YM3812_irq
};
diff --git a/src/mame/drivers/ambush.c b/src/mame/drivers/ambush.c
index 4678ecb6577..66efb8bbde0 100644
--- a/src/mame/drivers/ambush.c
+++ b/src/mame/drivers/ambush.c
@@ -169,12 +169,12 @@ static GFXDECODE_START( ambush )
GFXDECODE_END
-static struct AY8910interface ay8910_interface_1 =
+static const struct AY8910interface ay8910_interface_1 =
{
input_port_0_r
};
-static struct AY8910interface ay8910_interface_2 =
+static const struct AY8910interface ay8910_interface_2 =
{
input_port_1_r
};
diff --git a/src/mame/drivers/amidar.c b/src/mame/drivers/amidar.c
index b2c0ad07d0b..b8308a554cc 100644
--- a/src/mame/drivers/amidar.c
+++ b/src/mame/drivers/amidar.c
@@ -53,7 +53,7 @@ static WRITE8_HANDLER(amidar_soundram_w)
amidar_soundram[offset & 0x03ff] = data;
}
-static struct AY8910interface amidar_ay8910_interface_2 =
+static const struct AY8910interface amidar_ay8910_interface_2 =
{
soundlatch_r,
scramble_portB_r
diff --git a/src/mame/drivers/ampoker.c b/src/mame/drivers/ampoker.c
index 3f41b61bae1..53c661680a4 100644
--- a/src/mame/drivers/ampoker.c
+++ b/src/mame/drivers/ampoker.c
@@ -843,7 +843,7 @@ GFXDECODE_END
* AY8910 Interfase *
*******************/
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
0, 0, 0, 0 /* no ports used */
};
diff --git a/src/mame/drivers/amspdwy.c b/src/mame/drivers/amspdwy.c
index 15a6760b28d..f2011d28afb 100644
--- a/src/mame/drivers/amspdwy.c
+++ b/src/mame/drivers/amspdwy.c
@@ -263,7 +263,7 @@ static void irq_handler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2151interface amspdwy_ym2151_interface =
+static const struct YM2151interface amspdwy_ym2151_interface =
{
irq_handler
};
diff --git a/src/mame/drivers/angelkds.c b/src/mame/drivers/angelkds.c
index a81e2bb38b8..760b6710099 100644
--- a/src/mame/drivers/angelkds.c
+++ b/src/mame/drivers/angelkds.c
@@ -565,7 +565,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,
0,
diff --git a/src/mame/drivers/appoooh.c b/src/mame/drivers/appoooh.c
index 1ce8318b6f2..698ae456568 100644
--- a/src/mame/drivers/appoooh.c
+++ b/src/mame/drivers/appoooh.c
@@ -216,7 +216,7 @@ GFXDECODE_END
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
appoooh_adpcm_int,/* interrupt function */
MSM5205_S64_4B /* 6KHz */
diff --git a/src/mame/drivers/aquarium.c b/src/mame/drivers/aquarium.c
index 523c89c809a..af6d72c251a 100644
--- a/src/mame/drivers/aquarium.c
+++ b/src/mame/drivers/aquarium.c
@@ -358,7 +358,7 @@ static void irq_handler(int irq)
cpunum_set_input_line( 1, 0 , irq ? ASSERT_LINE : CLEAR_LINE );
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
irq_handler
};
diff --git a/src/mame/drivers/arabian.c b/src/mame/drivers/arabian.c
index 827d32070ee..2186caa4668 100644
--- a/src/mame/drivers/arabian.c
+++ b/src/mame/drivers/arabian.c
@@ -331,7 +331,7 @@ INPUT_PORTS_END
*
*************************************/
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
0,
0,
diff --git a/src/mame/drivers/arcadia.c b/src/mame/drivers/arcadia.c
index d03b52fb554..cc2cd8984af 100644
--- a/src/mame/drivers/arcadia.c
+++ b/src/mame/drivers/arcadia.c
@@ -273,7 +273,7 @@ INPUT_PORTS_END
*
*************************************/
-static struct CustomSound_interface amiga_custom_interface =
+static const struct CustomSound_interface amiga_custom_interface =
{
amiga_sh_start
};
diff --git a/src/mame/drivers/argus.c b/src/mame/drivers/argus.c
index 671ff067c44..ef37a1b54e6 100644
--- a/src/mame/drivers/argus.c
+++ b/src/mame/drivers/argus.c
@@ -171,7 +171,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(1, 0, irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,
0,
diff --git a/src/mame/drivers/arkanoid.c b/src/mame/drivers/arkanoid.c
index 11b46970e1e..755b03cb181 100644
--- a/src/mame/drivers/arkanoid.c
+++ b/src/mame/drivers/arkanoid.c
@@ -753,7 +753,7 @@ GFXDECODE_END
/* Sound Interfaces */
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
input_port_5_r,
input_port_4_r
diff --git a/src/mame/drivers/artmagic.c b/src/mame/drivers/artmagic.c
index 6c7bced7f53..a45e6c677a3 100644
--- a/src/mame/drivers/artmagic.c
+++ b/src/mame/drivers/artmagic.c
@@ -449,7 +449,7 @@ ADDRESS_MAP_END
*
*************************************/
-static tms34010_config tms_config =
+static const tms34010_config tms_config =
{
TRUE, /* halt on reset */
0, /* the screen operated on */
diff --git a/src/mame/drivers/ashnojoe.c b/src/mame/drivers/ashnojoe.c
index 2d80c6c823f..f4d7681b53f 100644
--- a/src/mame/drivers/ashnojoe.c
+++ b/src/mame/drivers/ashnojoe.c
@@ -330,13 +330,13 @@ static void ashnojoe_adpcm_int (int data)
cpunum_set_input_line(1, INPUT_LINE_NMI, PULSE_LINE);
}
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
ashnojoe_adpcm_int, /* interrupt function */
MSM5205_S48_4B /* 4KHz 4-bit */
};
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,
0,
diff --git a/src/mame/drivers/asterix.c b/src/mame/drivers/asterix.c
index 55dfa52dcdf..fcf0c6909fa 100644
--- a/src/mame/drivers/asterix.c
+++ b/src/mame/drivers/asterix.c
@@ -266,7 +266,7 @@ static INPUT_PORTS_START( asterix )
PORT_BIT( 0xf800, IP_ACTIVE_HIGH, IPT_UNKNOWN )
INPUT_PORTS_END
-static struct K053260_interface k053260_interface =
+static const struct K053260_interface k053260_interface =
{
REGION_SOUND1 /* memory region */
};
diff --git a/src/mame/drivers/asteroid.c b/src/mame/drivers/asteroid.c
index 270fe202335..068f42e374f 100644
--- a/src/mame/drivers/asteroid.c
+++ b/src/mame/drivers/asteroid.c
@@ -192,7 +192,7 @@ static WRITE8_HANDLER( astdelux_coin_counter_w )
static WRITE8_HANDLER( llander_led_w )
{
- static const char *lampname[] =
+ static const char *const lampname[] =
{
"lamp0", "lamp1", "lamp2", "lamp3", "lamp4"
};
@@ -609,7 +609,7 @@ INPUT_PORTS_END
*
*************************************/
-static struct POKEYinterface pokey_interface =
+static const struct POKEYinterface pokey_interface =
{
{ 0 },
input_port_3_r
diff --git a/src/mame/drivers/astrocde.c b/src/mame/drivers/astrocde.c
index a76bb77e255..fb7c433f713 100644
--- a/src/mame/drivers/astrocde.c
+++ b/src/mame/drivers/astrocde.c
@@ -246,7 +246,7 @@ static WRITE8_HANDLER( seawolf2_sound_2_w ) // Port 41
static UINT32 ebases_trackball_r(void *param)
{
- static const char *names[] = { "TRACKX2", "TRACKY2", "TRACKX1", "TRACKY1" };
+ static const char *const names[] = { "TRACKX2", "TRACKY2", "TRACKX1", "TRACKY1" };
return readinputportbytag(names[input_select]);
}
@@ -462,7 +462,7 @@ static READ8_HANDLER( demndrgn_io_r )
static UINT32 demndragn_joystick_r(void *param)
{
- static const char *names[] = { "MOVEX", "MOVEY" };
+ static const char *const names[] = { "MOVEX", "MOVEY" };
return readinputportbytag(names[input_select]);
}
@@ -1226,7 +1226,7 @@ static const struct Samplesinterface gorf_samples_interface =
*
*************************************/
-static struct z80_irq_daisy_chain tenpin_daisy_chain[] =
+static const struct z80_irq_daisy_chain tenpin_daisy_chain[] =
{
{ z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 }, /* CTC number 0 */
{ 0, 0, 0, 0, -1 } /* end mark */
diff --git a/src/mame/drivers/asuka.c b/src/mame/drivers/asuka.c
index a5e0bfc3428..f8b41955516 100644
--- a/src/mame/drivers/asuka.c
+++ b/src/mame/drivers/asuka.c
@@ -815,7 +815,7 @@ static void irq_handler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2610interface ym2610_interface =
+static const struct YM2610interface ym2610_interface =
{
irq_handler,
REGION_SOUND1, /* Delta-T */
@@ -823,13 +823,13 @@ static struct YM2610interface ym2610_interface =
};
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
irq_handler,
sound_bankswitch_w
};
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
asuka_msm5205_vck, /* VCK function */
MSM5205_S48_4B /* 8 kHz */
diff --git a/src/mame/drivers/atarisy1.c b/src/mame/drivers/atarisy1.c
index fedfdf98585..cd0d6cc24b1 100644
--- a/src/mame/drivers/atarisy1.c
+++ b/src/mame/drivers/atarisy1.c
@@ -384,7 +384,7 @@ static READ8_HANDLER( via_pb_r )
}
-static struct via6522_interface via_interface =
+static const struct via6522_interface via_interface =
{
/*inputs : A/B */ via_pa_r, via_pb_r,
/*inputs : CA/B1,CA/B2 */ 0, 0, 0, 0,
@@ -722,7 +722,7 @@ GFXDECODE_END
*
*************************************/
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
atarigen_ym2151_irq_gen
};
diff --git a/src/mame/drivers/atarisy2.c b/src/mame/drivers/atarisy2.c
index f9b0ff210f9..d8fdd961a80 100644
--- a/src/mame/drivers/atarisy2.c
+++ b/src/mame/drivers/atarisy2.c
@@ -298,7 +298,7 @@ static WRITE16_HANDLER( int_enable_w )
static WRITE16_HANDLER( bankselect_w )
{
- static int bankoffset[64] =
+ static const int bankoffset[64] =
{
0x28000, 0x20000, 0x18000, 0x10000,
0x2a000, 0x22000, 0x1a000, 0x12000,
@@ -1268,13 +1268,13 @@ GFXDECODE_END
*
*************************************/
-static struct POKEYinterface pokey_interface_1 =
+static const struct POKEYinterface pokey_interface_1 =
{
{ 0 },
input_port_11_r
};
-static struct POKEYinterface pokey_interface_2 =
+static const struct POKEYinterface pokey_interface_2 =
{
{ 0 },
input_port_12_r
@@ -1288,7 +1288,7 @@ static struct POKEYinterface pokey_interface_2 =
*
*************************************/
-static struct t11_setup t11_data =
+static const struct t11_setup t11_data =
{
0x36ff /* initial mode word has DAL15,14,11,8 pulled low */
};
diff --git a/src/mame/drivers/ataxx.c b/src/mame/drivers/ataxx.c
index f352d3de640..dd96d4900fb 100644
--- a/src/mame/drivers/ataxx.c
+++ b/src/mame/drivers/ataxx.c
@@ -310,7 +310,7 @@ GFXDECODE_END
*
*************************************/
-static struct CustomSound_interface i80186_custom_interface =
+static const struct CustomSound_interface i80186_custom_interface =
{
leland_80186_sh_start
};
diff --git a/src/mame/drivers/atetris.c b/src/mame/drivers/atetris.c
index 84704b9546e..2559d1eef3d 100644
--- a/src/mame/drivers/atetris.c
+++ b/src/mame/drivers/atetris.c
@@ -306,14 +306,14 @@ GFXDECODE_END
*
*************************************/
-static struct POKEYinterface pokey_interface_1 =
+static const struct POKEYinterface pokey_interface_1 =
{
{ 0 },
input_port_0_r
};
-static struct POKEYinterface pokey_interface_2 =
+static const struct POKEYinterface pokey_interface_2 =
{
{ 0 },
input_port_1_r
diff --git a/src/mame/drivers/attckufo.c b/src/mame/drivers/attckufo.c
index 28110e46340..3be48abac95 100644
--- a/src/mame/drivers/attckufo.c
+++ b/src/mame/drivers/attckufo.c
@@ -46,7 +46,7 @@ LOIPOIO-B
#include "includes/attckufo.h"
-static struct CustomSound_interface attckufo_sound_interface =
+static const struct CustomSound_interface attckufo_sound_interface =
{
attckufo_custom_start
};
diff --git a/src/mame/drivers/backfire.c b/src/mame/drivers/backfire.c
index b5113ef7aef..2d1a03460b5 100644
--- a/src/mame/drivers/backfire.c
+++ b/src/mame/drivers/backfire.c
@@ -470,7 +470,7 @@ static void sound_irq_gen(int state)
logerror("sound irq\n");
}
-static struct YMZ280Binterface ymz280b_intf =
+static const struct YMZ280Binterface ymz280b_intf =
{
REGION_SOUND1,
sound_irq_gen
diff --git a/src/mame/drivers/bagman.c b/src/mame/drivers/bagman.c
index da7e02835d5..6bc3b78dc18 100644
--- a/src/mame/drivers/bagman.c
+++ b/src/mame/drivers/bagman.c
@@ -547,13 +547,13 @@ GFXDECODE_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
input_port_0_r,
input_port_1_r,
};
-static struct TMS5110interface tms5110_interface =
+static const struct TMS5110interface tms5110_interface =
{
0, /*irq callback function*/
bagman_speech_rom_read_bit /*M0 callback function. Called whenever chip requests a single bit of data*/
diff --git a/src/mame/drivers/balsente.c b/src/mame/drivers/balsente.c
index ce6ad22a89a..2d179362f28 100644
--- a/src/mame/drivers/balsente.c
+++ b/src/mame/drivers/balsente.c
@@ -1650,7 +1650,7 @@ INPUT_PORTS_END
*
*************************************/
-static struct cem3394_interface cem_interface =
+static const struct cem3394_interface cem_interface =
{
431.894,
1300.0,
diff --git a/src/mame/drivers/baraduke.c b/src/mame/drivers/baraduke.c
index 80b635822e7..d6cef558d10 100644
--- a/src/mame/drivers/baraduke.c
+++ b/src/mame/drivers/baraduke.c
@@ -423,7 +423,7 @@ GFXDECODE_END
-static struct namco_interface namco_interface =
+static const struct namco_interface namco_interface =
{
8, /* number of voices */
-1, /* memory region */
diff --git a/src/mame/drivers/battlane.c b/src/mame/drivers/battlane.c
index 661541bdfc1..e2621fe8594 100644
--- a/src/mame/drivers/battlane.c
+++ b/src/mame/drivers/battlane.c
@@ -246,7 +246,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(0, M6809_FIRQ_LINE, irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM3526interface ym3526_interface =
+static const struct YM3526interface ym3526_interface =
{
irqhandler
};
diff --git a/src/mame/drivers/battlera.c b/src/mame/drivers/battlera.c
index b1e5147cd57..fca4b10b246 100644
--- a/src/mame/drivers/battlera.c
+++ b/src/mame/drivers/battlera.c
@@ -259,7 +259,7 @@ GFXDECODE_END
/******************************************************************************/
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
battlera_adpcm_int,/* interrupt function */
MSM5205_S48_4B /* 8KHz */
diff --git a/src/mame/drivers/bbusters.c b/src/mame/drivers/bbusters.c
index c3b526a4dbe..957d890b1bb 100644
--- a/src/mame/drivers/bbusters.c
+++ b/src/mame/drivers/bbusters.c
@@ -642,13 +642,13 @@ static void sound_irq( int irq )
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2608interface ym2608_interface =
+static const struct YM2608interface ym2608_interface =
{
0,0,0,0,sound_irq,
REGION_SOUND1
};
-static struct YM2610interface ym2610_interface =
+static const struct YM2610interface ym2610_interface =
{
sound_irq,
REGION_SOUND2,
diff --git a/src/mame/drivers/bfcobra.c b/src/mame/drivers/bfcobra.c
index 2d25a14025f..f48435f1faa 100644
--- a/src/mame/drivers/bfcobra.c
+++ b/src/mame/drivers/bfcobra.c
@@ -750,7 +750,7 @@ INLINE void z80_bank(int num, int data)
if (data < 0x08)
{
/* TODO: Don't need this table! */
- static UINT32 offs_table[2][8] =
+ static const UINT32 offs_table[2][8] =
{
{ 0x10000, 0x14000, 0x18000, 0x1c000, 0x00000, 0x04000, 0x08000, 0x0c000 },
{ 0x00000, 0x04000, 0x08000, 0x0c000, 0x10000, 0x14000, 0x18000, 0x1c000 }
@@ -1367,7 +1367,7 @@ static void m6809_data_irq(int state)
/*
What are the correct ACIA clocks ?
*/
-static struct acia6850_interface z80_acia_if =
+static const struct acia6850_interface z80_acia_if =
{
500000,
500000,
@@ -1379,7 +1379,7 @@ static struct acia6850_interface z80_acia_if =
z80_acia_irq
};
-static struct acia6850_interface m6809_acia_if =
+static const struct acia6850_interface m6809_acia_if =
{
500000,
500000,
@@ -1391,7 +1391,7 @@ static struct acia6850_interface m6809_acia_if =
NULL
};
-static struct acia6850_interface data_acia_if =
+static const struct acia6850_interface data_acia_if =
{
500000,
500000,
@@ -1474,7 +1474,7 @@ static DRIVER_INIT( bfcobra )
state_save_register_global_pointer(video_ram, 0x20000);
}
-static struct upd7759_interface upd7759_interface =
+static const struct upd7759_interface upd7759_interface =
{
REGION_SOUND1
};
diff --git a/src/mame/drivers/bfm_sc2.c b/src/mame/drivers/bfm_sc2.c
index 19c9ac8f3f0..46c6294a23e 100644
--- a/src/mame/drivers/bfm_sc2.c
+++ b/src/mame/drivers/bfm_sc2.c
@@ -3031,7 +3031,7 @@ static INPUT_PORTS_START( pokio )
INPUT_PORTS_END
- static struct upd7759_interface upd7759_interface =
+ static const struct upd7759_interface upd7759_interface =
{
REGION_SOUND1, /* memory region */
0
diff --git a/src/mame/drivers/bigevglf.c b/src/mame/drivers/bigevglf.c
index e4303cfef10..11050c9763f 100644
--- a/src/mame/drivers/bigevglf.c
+++ b/src/mame/drivers/bigevglf.c
@@ -468,7 +468,7 @@ static MACHINE_RESET( bigevglf )
}
-static struct MSM5232interface msm5232_interface =
+static const struct MSM5232interface msm5232_interface =
{
{ 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6 } /* 0.65 (???) uF capacitors */
};
diff --git a/src/mame/drivers/bishi.c b/src/mame/drivers/bishi.c
index 1b581c98c44..d2ab34dd799 100644
--- a/src/mame/drivers/bishi.c
+++ b/src/mame/drivers/bishi.c
@@ -256,7 +256,7 @@ static void sound_irq_gen(int state)
cpunum_set_input_line(0, MC68000_IRQ_1, CLEAR_LINE);
}
-static struct YMZ280Binterface ymz280b_intf =
+static const struct YMZ280Binterface ymz280b_intf =
{
REGION_SOUND1,
sound_irq_gen
diff --git a/src/mame/drivers/bking2.c b/src/mame/drivers/bking2.c
index 2cc29242aa5..0d594ccf905 100644
--- a/src/mame/drivers/bking2.c
+++ b/src/mame/drivers/bking2.c
@@ -465,7 +465,7 @@ static const gfx_layout charlayout =
8*8 /* every char takes 8 consecutive bytes */
};
-static gfx_layout crowlayout =
+static const gfx_layout crowlayout =
{
16,32, /* 16*32 characters */
16, /* 16 characters */
@@ -482,7 +482,7 @@ static gfx_layout crowlayout =
128*8 /* every sprite takes 128 consecutive bytes */
};
-static gfx_layout balllayout =
+static const gfx_layout balllayout =
{
8,16, /* 8*16 sprites */
8, /* 8 sprites */
@@ -508,7 +508,7 @@ static WRITE8_HANDLER( portb_w )
if (data != 0x00) logerror("portB = %02x\n",data);
}
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
0,
0,
diff --git a/src/mame/drivers/bladestl.c b/src/mame/drivers/bladestl.c
index f9ac1ceaeb7..e5e875f9b94 100644
--- a/src/mame/drivers/bladestl.c
+++ b/src/mame/drivers/bladestl.c
@@ -415,7 +415,7 @@ GFXDECODE_END
***************************************************************************/
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,
0,
@@ -423,7 +423,7 @@ static struct YM2203interface ym2203_interface =
bladestl_port_B_w
};
-static struct upd7759_interface upd7759_interface =
+static const struct upd7759_interface upd7759_interface =
{
REGION_SOUND1 /* memory regions */
};
diff --git a/src/mame/drivers/blktiger.c b/src/mame/drivers/blktiger.c
index 4e6ddba3c16..191d1e780ce 100644
--- a/src/mame/drivers/blktiger.c
+++ b/src/mame/drivers/blktiger.c
@@ -250,7 +250,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,
0,
diff --git a/src/mame/drivers/blockout.c b/src/mame/drivers/blockout.c
index 109158ae9d1..8738aa0ef85 100644
--- a/src/mame/drivers/blockout.c
+++ b/src/mame/drivers/blockout.c
@@ -306,7 +306,7 @@ static void blockout_irq_handler(int irq)
cpunum_set_input_line_and_vector(1,0,irq ? ASSERT_LINE : CLEAR_LINE,0xff);
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
blockout_irq_handler
};
diff --git a/src/mame/drivers/blueprnt.c b/src/mame/drivers/blueprnt.c
index f73d03eb347..836eba16ae3 100644
--- a/src/mame/drivers/blueprnt.c
+++ b/src/mame/drivers/blueprnt.c
@@ -276,7 +276,7 @@ GFXDECODE_END
/* Sound Interfaces */
-static struct AY8910interface ay8910_interface_1 =
+static const struct AY8910interface ay8910_interface_1 =
{
0,
soundlatch_r,
@@ -284,7 +284,7 @@ static struct AY8910interface ay8910_interface_1 =
0
};
-static struct AY8910interface ay8910_interface_2 =
+static const struct AY8910interface ay8910_interface_2 =
{
input_port_2_r,
input_port_3_r
diff --git a/src/mame/drivers/bmcbowl.c b/src/mame/drivers/bmcbowl.c
index 63d4abd7701..4f86859a88f 100644
--- a/src/mame/drivers/bmcbowl.c
+++ b/src/mame/drivers/bmcbowl.c
@@ -460,7 +460,7 @@ static WRITE8_HANDLER(input_mux_w)
}
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
dips1_r,
0,
@@ -469,7 +469,7 @@ static struct AY8910interface ay8910_interface =
};
-static struct via6522_interface via_interface =
+static const struct via6522_interface via_interface =
{
/*inputs : A/B */ 0, via_b_in,
/*inputs : CA/B1,CA/B2 */ 0, 0, 0, 0,
diff --git a/src/mame/drivers/bnstars.c b/src/mame/drivers/bnstars.c
index 1f236d757e4..1bee526b5c0 100644
--- a/src/mame/drivers/bnstars.c
+++ b/src/mame/drivers/bnstars.c
@@ -1306,12 +1306,12 @@ static ADDRESS_MAP_START( bnstars_z80_map, ADDRESS_SPACE_PROGRAM, 8 )
ADDRESS_MAP_END
#endif
-static struct YMF271interface ymf271_interface1 =
+static const struct YMF271interface ymf271_interface1 =
{
REGION_SOUND1
};
-static struct YMF271interface ymf271_interface2 =
+static const struct YMF271interface ymf271_interface2 =
{
REGION_SOUND2
};
diff --git a/src/mame/drivers/boogwing.c b/src/mame/drivers/boogwing.c
index b5cbf254990..6f038f1b8d3 100644
--- a/src/mame/drivers/boogwing.c
+++ b/src/mame/drivers/boogwing.c
@@ -276,7 +276,7 @@ static WRITE8_HANDLER( sound_bankswitch_w )
OKIM6295_set_bank_base(0, (data & 1) * 0x40000);
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
sound_irq,
sound_bankswitch_w
diff --git a/src/mame/drivers/bottom9.c b/src/mame/drivers/bottom9.c
index 54877a1e21c..e02df10d8a0 100644
--- a/src/mame/drivers/bottom9.c
+++ b/src/mame/drivers/bottom9.c
@@ -383,13 +383,13 @@ static void volume_callback1(int v)
K007232_set_volume(1,1,0,(v & 0x0f) * 0x11);
}
-static struct K007232_interface k007232_interface_1 =
+static const struct K007232_interface k007232_interface_1 =
{
REGION_SOUND1,
volume_callback0
};
-static struct K007232_interface k007232_interface_2 =
+static const struct K007232_interface k007232_interface_2 =
{
REGION_SOUND2,
volume_callback1
diff --git a/src/mame/drivers/brkthru.c b/src/mame/drivers/brkthru.c
index 7027a0cfff1..064fd2e39ea 100644
--- a/src/mame/drivers/brkthru.c
+++ b/src/mame/drivers/brkthru.c
@@ -405,7 +405,7 @@ static void irqhandler(int linestate)
cpunum_set_input_line(1,M6809_IRQ_LINE,linestate);
}
-static struct YM3526interface ym3526_interface =
+static const struct YM3526interface ym3526_interface =
{
irqhandler
};
diff --git a/src/mame/drivers/btoads.c b/src/mame/drivers/btoads.c
index 6c8a5086bf9..906c4af1d94 100644
--- a/src/mame/drivers/btoads.c
+++ b/src/mame/drivers/btoads.c
@@ -302,7 +302,7 @@ INPUT_PORTS_END
*
*************************************/
-static tms34010_config tms_config =
+static const tms34010_config tms_config =
{
FALSE, /* halt on reset */
0, /* the screen operated on */
diff --git a/src/mame/drivers/bublbobl.c b/src/mame/drivers/bublbobl.c
index 23520bf969c..6812b2f9188 100644
--- a/src/mame/drivers/bublbobl.c
+++ b/src/mame/drivers/bublbobl.c
@@ -720,7 +720,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(2, 0, irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,
0,
diff --git a/src/mame/drivers/buggychl.c b/src/mame/drivers/buggychl.c
index b63fb25bd17..bf932743553 100644
--- a/src/mame/drivers/buggychl.c
+++ b/src/mame/drivers/buggychl.c
@@ -403,7 +403,7 @@ static WRITE8_HANDLER( portB_1_w )
}
-static struct AY8910interface ay8910_interface_1 =
+static const struct AY8910interface ay8910_interface_1 =
{
0,
0,
@@ -411,7 +411,7 @@ static struct AY8910interface ay8910_interface_1 =
portB_0_w
};
-static struct AY8910interface ay8910_interface_2 =
+static const struct AY8910interface ay8910_interface_2 =
{
0,
0,
@@ -419,7 +419,7 @@ static struct AY8910interface ay8910_interface_2 =
portB_1_w
};
-static struct MSM5232interface msm5232_interface =
+static const struct MSM5232interface msm5232_interface =
{
{ 0.39e-6, 0.39e-6, 0.39e-6, 0.39e-6, 0.39e-6, 0.39e-6, 0.39e-6, 0.39e-6 } /* default 0.39 uF capacitors (not verified) */
};
diff --git a/src/mame/drivers/bwidow.c b/src/mame/drivers/bwidow.c
index d677986ab00..9e8d2518bfb 100644
--- a/src/mame/drivers/bwidow.c
+++ b/src/mame/drivers/bwidow.c
@@ -659,14 +659,14 @@ INPUT_PORTS_END
*
*************************************/
-static struct POKEYinterface pokey_interface_1 =
+static const struct POKEYinterface pokey_interface_1 =
{
{ 0 },
input_port_1_r
};
-static struct POKEYinterface pokey_interface_2 =
+static const struct POKEYinterface pokey_interface_2 =
{
{ 0 },
input_port_2_r
diff --git a/src/mame/drivers/bwing.c b/src/mame/drivers/bwing.c
index 29860e77a04..ea7266f9ef6 100644
--- a/src/mame/drivers/bwing.c
+++ b/src/mame/drivers/bwing.c
@@ -35,7 +35,7 @@ Known issues:
//****************************************************************************
// Imports
-extern gfx_layout bwing_tilelayout;
+extern const gfx_layout bwing_tilelayout;
extern WRITE8_HANDLER( bwing_paletteram_w );
extern WRITE8_HANDLER( bwing_videoram_w );
diff --git a/src/mame/drivers/bzone.c b/src/mame/drivers/bzone.c
index c8ac766d606..be58865cfa4 100644
--- a/src/mame/drivers/bzone.c
+++ b/src/mame/drivers/bzone.c
@@ -539,27 +539,27 @@ INPUT_PORTS_END
*
*************************************/
-static struct POKEYinterface bzone_pokey_interface =
+static const struct POKEYinterface bzone_pokey_interface =
{
{ 0 },
input_port_3_r
};
-static struct CustomSound_interface bzone_custom_interface =
+static const struct CustomSound_interface bzone_custom_interface =
{
bzone_sh_start
};
-static struct POKEYinterface redbaron_pokey_interface =
+static const struct POKEYinterface redbaron_pokey_interface =
{
{ 0 },
redbaron_joy_r
};
-static struct CustomSound_interface redbaron_custom_interface =
+static const struct CustomSound_interface redbaron_custom_interface =
{
redbaron_sh_start
};
diff --git a/src/mame/drivers/cabal.c b/src/mame/drivers/cabal.c
index 5e2fe23fb74..17c8c89d164 100644
--- a/src/mame/drivers/cabal.c
+++ b/src/mame/drivers/cabal.c
@@ -513,7 +513,7 @@ static GFXDECODE_START( cabal )
GFXDECODE_END
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
seibu_ym3812_irqhandler
};
@@ -523,20 +523,20 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2151interface cabalbl_ym2151_interface =
+static const struct YM2151interface cabalbl_ym2151_interface =
{
irqhandler
};
SEIBU_SOUND_SYSTEM_ADPCM_HARDWARE
-static struct MSM5205interface msm5205_interface_1 =
+static const struct MSM5205interface msm5205_interface_1 =
{
0,
MSM5205_SEX_4B
};
-static struct MSM5205interface msm5205_interface_2 =
+static const struct MSM5205interface msm5205_interface_2 =
{
0,
MSM5205_SEX_4B
diff --git a/src/mame/drivers/capbowl.c b/src/mame/drivers/capbowl.c
index dc9b85e6255..d37dc30fda8 100644
--- a/src/mame/drivers/capbowl.c
+++ b/src/mame/drivers/capbowl.c
@@ -329,7 +329,7 @@ INPUT_PORTS_END
*
*************************************/
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
ticket_dispenser_r,
0,
diff --git a/src/mame/drivers/cardline.c b/src/mame/drivers/cardline.c
index a5e7cc746a2..b84292f4063 100644
--- a/src/mame/drivers/cardline.c
+++ b/src/mame/drivers/cardline.c
@@ -150,7 +150,7 @@ static INPUT_PORTS_START( cardline )
PORT_BIT( 0xf5, IP_ACTIVE_HIGH, IPT_SPECIAL ) // h/w status bits
INPUT_PORTS_END
-static gfx_layout charlayout =
+static const gfx_layout charlayout =
{
8,8,
RGN_FRAC(1,1),
diff --git a/src/mame/drivers/carrera.c b/src/mame/drivers/carrera.c
index ea458280417..7b090719e99 100644
--- a/src/mame/drivers/carrera.c
+++ b/src/mame/drivers/carrera.c
@@ -271,7 +271,7 @@ static READ8_HANDLER( unknown_r )
}
/* these are set as input, but I have no idea which input port it uses is for the AY */
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
unknown_r,
unknown_r,
diff --git a/src/mame/drivers/cave.c b/src/mame/drivers/cave.c
index 6c50f9990e4..5699277c9d8 100644
--- a/src/mame/drivers/cave.c
+++ b/src/mame/drivers/cave.c
@@ -443,7 +443,7 @@ static NVRAM_HANDLER( cave )
}
}
-static struct EEPROM_interface eeprom_interface_93C46_8bit =
+static const struct EEPROM_interface eeprom_interface_93C46_8bit =
{
7, // address bits 7
8, // data bits 8
@@ -2098,7 +2098,7 @@ static MACHINE_RESET( cave )
EEPROM_get_data_pointer(0)[cave_region_byte] = readinputport(2);
}
-static struct YMZ280Binterface ymz280b_intf =
+static const struct YMZ280Binterface ymz280b_intf =
{
REGION_SOUND1,
sound_irq_gen
@@ -2109,12 +2109,12 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
irqhandler
};
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,0,0,0,irqhandler
};
diff --git a/src/mame/drivers/cbuster.c b/src/mame/drivers/cbuster.c
index b7cb4a0791c..34d82435797 100644
--- a/src/mame/drivers/cbuster.c
+++ b/src/mame/drivers/cbuster.c
@@ -335,7 +335,7 @@ static void sound_irq(int state)
cpunum_set_input_line(1,1,state); /* IRQ 2 */
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
sound_irq
};
diff --git a/src/mame/drivers/ccastles.c b/src/mame/drivers/ccastles.c
index c96680a5007..a310074ce4b 100644
--- a/src/mame/drivers/ccastles.c
+++ b/src/mame/drivers/ccastles.c
@@ -448,7 +448,7 @@ GFXDECODE_END
*
*************************************/
-static struct POKEYinterface pokey_interface =
+static const struct POKEYinterface pokey_interface =
{
{ 0 },
input_port_1_r
diff --git a/src/mame/drivers/cchasm.c b/src/mame/drivers/cchasm.c
index f700d49a529..2aefba2aeff 100644
--- a/src/mame/drivers/cchasm.c
+++ b/src/mame/drivers/cchasm.c
@@ -159,7 +159,7 @@ static MACHINE_START( cchasm )
*
*************************************/
-static struct z80_irq_daisy_chain daisy_chain[] =
+static const struct z80_irq_daisy_chain daisy_chain[] =
{
{ z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 }, /* CTC number 0 */
{ 0,0,0,0,-1 } /* end mark */
diff --git a/src/mame/drivers/centiped.c b/src/mame/drivers/centiped.c
index 8dffcb20061..a6a23eed2f6 100644
--- a/src/mame/drivers/centiped.c
+++ b/src/mame/drivers/centiped.c
@@ -1595,27 +1595,27 @@ GFXDECODE_END
*
*************************************/
-static struct AY8910interface centipdb_ay8910_interface =
+static const struct AY8910interface centipdb_ay8910_interface =
{
caterplr_rand_r
};
-static struct POKEYinterface milliped_pokey_interface_1 =
+static const struct POKEYinterface milliped_pokey_interface_1 =
{
{ 0 },
input_port_4_r
};
-static struct POKEYinterface milliped_pokey_interface_2 =
+static const struct POKEYinterface milliped_pokey_interface_2 =
{
{ 0 },
input_port_5_r
};
-static struct POKEYinterface warlords_pokey_interface =
+static const struct POKEYinterface warlords_pokey_interface =
{
{ input_port_4_r,input_port_5_r,input_port_6_r,input_port_7_r }
};
diff --git a/src/mame/drivers/chaknpop.c b/src/mame/drivers/chaknpop.c
index cb57f921744..21f34f9b0f1 100644
--- a/src/mame/drivers/chaknpop.c
+++ b/src/mame/drivers/chaknpop.c
@@ -106,13 +106,13 @@ static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0xc000, 0xffff) AM_WRITE(MWA8_BANK1) // bitmap plane 1-4
ADDRESS_MAP_END
-static struct AY8910interface ay8910_interface_1 =
+static const struct AY8910interface ay8910_interface_1 =
{
input_port_5_r, // DSW A
input_port_4_r // DSW B
};
-static struct AY8910interface ay8910_interface_2 =
+static const struct AY8910interface ay8910_interface_2 =
{
0,
0,
diff --git a/src/mame/drivers/cham24.c b/src/mame/drivers/cham24.c
index 857e831a09f..35eb7504452 100644
--- a/src/mame/drivers/cham24.c
+++ b/src/mame/drivers/cham24.c
@@ -189,7 +189,7 @@ static INPUT_PORTS_START( cham24 )
INPUT_PORTS_END
-static struct NESinterface cham24_interface_1 =
+static const struct NESinterface cham24_interface_1 =
{
REGION_CPU1
};
diff --git a/src/mame/drivers/champbas.c b/src/mame/drivers/champbas.c
index 7fae02b16df..521f65bfab6 100644
--- a/src/mame/drivers/champbas.c
+++ b/src/mame/drivers/champbas.c
@@ -252,7 +252,7 @@ GFXDECODE_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
input_port_0_r,
input_port_1_r
diff --git a/src/mame/drivers/champbwl.c b/src/mame/drivers/champbwl.c
index 0c29295bb84..f609f695a95 100644
--- a/src/mame/drivers/champbwl.c
+++ b/src/mame/drivers/champbwl.c
@@ -323,7 +323,7 @@ static GFXDECODE_START( champbwl )
GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 32 )
GFXDECODE_END
-static struct x1_010_interface champbwl_sound_intf =
+static const struct x1_010_interface champbwl_sound_intf =
{
0x0000 /* address */
};
diff --git a/src/mame/drivers/changela.c b/src/mame/drivers/changela.c
index 23ad19926a2..a0adb2c28e6 100644
--- a/src/mame/drivers/changela.c
+++ b/src/mame/drivers/changela.c
@@ -448,12 +448,12 @@ static INPUT_PORTS_START( changela )
INPUT_PORTS_END
-static struct AY8910interface ay8910_interface_1 = {
+static const struct AY8910interface ay8910_interface_1 = {
input_port_0_r,
input_port_1_r
};
-static struct AY8910interface ay8910_interface_2 = {
+static const struct AY8910interface ay8910_interface_2 = {
input_port_2_r,
input_port_3_r
};
diff --git a/src/mame/drivers/cherrym.c b/src/mame/drivers/cherrym.c
index 001639501ea..9186cba8fd6 100644
--- a/src/mame/drivers/cherrym.c
+++ b/src/mame/drivers/cherrym.c
@@ -363,7 +363,7 @@ static GFXDECODE_START( cherrym )
GFXDECODE_ENTRY( REGION_GFX2, 0x0020, spritelayout, 0, 16 )
GFXDECODE_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
input_port_6_r, //
input_port_7_r, //
diff --git a/src/mame/drivers/cherrym2.c b/src/mame/drivers/cherrym2.c
index 53fc6e576d8..c434767b1f9 100644
--- a/src/mame/drivers/cherrym2.c
+++ b/src/mame/drivers/cherrym2.c
@@ -340,7 +340,7 @@ static GFXDECODE_START( alt )
GFXDECODE_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
input_port_6_r, //
input_port_7_r, //
diff --git a/src/mame/drivers/chinagat.c b/src/mame/drivers/chinagat.c
index 5541ea44b5c..d6ce26e19e8 100644
--- a/src/mame/drivers/chinagat.c
+++ b/src/mame/drivers/chinagat.c
@@ -460,14 +460,14 @@ static void chinagat_irq_handler(int irq) {
cpunum_set_input_line( 2, 0, irq ? ASSERT_LINE : CLEAR_LINE );
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
chinagat_irq_handler
};
/* This on the bootleg board, instead of the m6295 */
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
saiyugb1_m5205_irq_w, /* Interrupt function */
MSM5205_S64_4B /* vclk input mode (6030Hz, 4-bit) */
@@ -480,7 +480,7 @@ static INTERRUPT_GEN( chinagat_interrupt )
}
/* This is only on the second bootleg board */
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,
0,
diff --git a/src/mame/drivers/chinsan.c b/src/mame/drivers/chinsan.c
index 72b79e9ba9d..26634e5880e 100644
--- a/src/mame/drivers/chinsan.c
+++ b/src/mame/drivers/chinsan.c
@@ -94,7 +94,7 @@ static WRITE8_HANDLER( ym_port_w2 )
}
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
input_port_0_r,
input_port_1_r,
diff --git a/src/mame/drivers/chqflag.c b/src/mame/drivers/chqflag.c
index 3f91d5c0186..06919d4f729 100644
--- a/src/mame/drivers/chqflag.c
+++ b/src/mame/drivers/chqflag.c
@@ -330,7 +330,7 @@ static void chqflag_ym2151_irq_w(int data)
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
chqflag_ym2151_irq_w
};
@@ -351,13 +351,13 @@ static void volume_callback1(int v)
K007232_set_volume(1,0,(v & 0x0f)*0x11/2,(v >> 4)*0x11/2);
}
-static struct K007232_interface k007232_interface_1 =
+static const struct K007232_interface k007232_interface_1 =
{
REGION_SOUND1,
volume_callback0
};
-static struct K007232_interface k007232_interface_2 =
+static const struct K007232_interface k007232_interface_2 =
{
REGION_SOUND2,
volume_callback1
diff --git a/src/mame/drivers/cidelsa.c b/src/mame/drivers/cidelsa.c
index de9a57f96a2..270043cc924 100644
--- a/src/mame/drivers/cidelsa.c
+++ b/src/mame/drivers/cidelsa.c
@@ -47,7 +47,7 @@ static UINT8 cidelsa_ef_r(void)
return (cdp1869_prd & 0x01) + (readinputportbytag("EF") & 0xfe);
}
-static CDP1802_CONFIG cidelsa_cdp1802_config =
+static const CDP1802_CONFIG cidelsa_cdp1802_config =
{
cidelsa_mode_r,
cidelsa_ef_r,
@@ -148,7 +148,7 @@ static WRITE8_HANDLER ( draco_ay8910_port_b_w )
*/
}
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
0,
0,
diff --git a/src/mame/drivers/cinemat.c b/src/mame/drivers/cinemat.c
index 5b9b813cf7b..192e4161aaf 100644
--- a/src/mame/drivers/cinemat.c
+++ b/src/mame/drivers/cinemat.c
@@ -957,14 +957,14 @@ INPUT_PORTS_END
*
*************************************/
-static struct CCPUConfig config_nojmi =
+static const struct CCPUConfig config_nojmi =
{
joystick_read,
cinemat_vector_callback,
0
};
-static struct CCPUConfig config_jmi =
+static const struct CCPUConfig config_jmi =
{
NULL,
cinemat_vector_callback,
diff --git a/src/mame/drivers/citycon.c b/src/mame/drivers/citycon.c
index cf299a3a41f..12eec71abf5 100644
--- a/src/mame/drivers/citycon.c
+++ b/src/mame/drivers/citycon.c
@@ -196,7 +196,7 @@ GFXDECODE_END
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
soundlatch_r,
soundlatch2_r,
diff --git a/src/mame/drivers/cloak.c b/src/mame/drivers/cloak.c
index 070f4d34aea..577c191ec21 100644
--- a/src/mame/drivers/cloak.c
+++ b/src/mame/drivers/cloak.c
@@ -311,13 +311,13 @@ GFXDECODE_END
*
*************************************/
-static struct POKEYinterface pokey_interface_1 =
+static const struct POKEYinterface pokey_interface_1 =
{
{ 0 },
input_port_3_r
};
-static struct POKEYinterface pokey_interface_2 =
+static const struct POKEYinterface pokey_interface_2 =
{
{ 0 },
input_port_4_r
diff --git a/src/mame/drivers/cloud9.c b/src/mame/drivers/cloud9.c
index 8a2dbe8e0ac..43aebcae3d3 100644
--- a/src/mame/drivers/cloud9.c
+++ b/src/mame/drivers/cloud9.c
@@ -440,7 +440,7 @@ GFXDECODE_END
*
*************************************/
-static struct POKEYinterface pokey_interface =
+static const struct POKEYinterface pokey_interface =
{
{ 0 },
input_port_2_r
diff --git a/src/mame/drivers/clshroad.c b/src/mame/drivers/clshroad.c
index 0c009d17775..a3e947f3bb8 100644
--- a/src/mame/drivers/clshroad.c
+++ b/src/mame/drivers/clshroad.c
@@ -294,7 +294,7 @@ GFXDECODE_END
-static struct CustomSound_interface custom_interface =
+static const struct CustomSound_interface custom_interface =
{
wiping_sh_start
};
diff --git a/src/mame/drivers/cninja.c b/src/mame/drivers/cninja.c
index de101ee8fa7..fa4aa6ced56 100644
--- a/src/mame/drivers/cninja.c
+++ b/src/mame/drivers/cninja.c
@@ -846,13 +846,13 @@ static WRITE8_HANDLER( sound_bankswitch_w )
OKIM6295_set_bank_base(1, (data & 1) * 0x40000);
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
sound_irq,
sound_bankswitch_w
};
-static struct YM2151interface ym2151_interface2 =
+static const struct YM2151interface ym2151_interface2 =
{
sound_irq2
};
diff --git a/src/mame/drivers/coinmstr.c b/src/mame/drivers/coinmstr.c
index 13384c55f77..b006dd3bb11 100644
--- a/src/mame/drivers/coinmstr.c
+++ b/src/mame/drivers/coinmstr.c
@@ -617,7 +617,7 @@ static MACHINE_RESET( trailblz )
pia_reset();
}
-static struct AY8910interface ay8912_interface =
+static const struct AY8910interface ay8912_interface =
{
input_port_4_r
};
diff --git a/src/mame/drivers/cojag.c b/src/mame/drivers/cojag.c
index 316d477d974..76c8b3f90a2 100644
--- a/src/mame/drivers/cojag.c
+++ b/src/mame/drivers/cojag.c
@@ -204,7 +204,7 @@ static UINT8 eeprom_enable;
static UINT32 *rom_base;
-static struct ide_interface ide_intf =
+static const struct ide_interface ide_intf =
{
jaguar_external_int
};
@@ -964,7 +964,7 @@ INPUT_PORTS_END
*
*************************************/
-static struct r3000_config config =
+static const struct r3000_config config =
{
0, /* 1 if we have an FPU, 0 otherwise */
4096, /* code cache size */
@@ -972,13 +972,13 @@ static struct r3000_config config =
};
-static struct jaguar_config gpu_config =
+static const struct jaguar_config gpu_config =
{
jaguar_gpu_cpu_int
};
-static struct jaguar_config dsp_config =
+static const struct jaguar_config dsp_config =
{
jaguar_dsp_cpu_int
};
diff --git a/src/mame/drivers/combatsc.c b/src/mame/drivers/combatsc.c
index 1f34f5b8e53..44dec6d56e1 100644
--- a/src/mame/drivers/combatsc.c
+++ b/src/mame/drivers/combatsc.c
@@ -639,7 +639,7 @@ static GFXDECODE_START( combascb )
GFXDECODE_ENTRY( REGION_GFX2, 0x40000, sprite_layout, 0, 8*16 )
GFXDECODE_END
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,
0,
@@ -647,7 +647,7 @@ static struct YM2203interface ym2203_interface =
0
};
-static struct upd7759_interface upd7759_interface =
+static const struct upd7759_interface upd7759_interface =
{
REGION_SOUND1, /* memory region */
0
diff --git a/src/mame/drivers/compgolf.c b/src/mame/drivers/compgolf.c
index 6c378bfaedc..9cba0e70f84 100644
--- a/src/mame/drivers/compgolf.c
+++ b/src/mame/drivers/compgolf.c
@@ -198,7 +198,7 @@ static void sound_irq(int linestate)
cpunum_set_input_line(0,0,linestate);
}
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,
0,
diff --git a/src/mame/drivers/coolpool.c b/src/mame/drivers/coolpool.c
index bd4258188f3..a9d451d7460 100644
--- a/src/mame/drivers/coolpool.c
+++ b/src/mame/drivers/coolpool.c
@@ -646,7 +646,7 @@ INPUT_PORTS_END
*
*************************************/
-static tms34010_config tms_config_amerdart =
+static const tms34010_config tms_config_amerdart =
{
FALSE, /* halt on reset */
0, /* the screen operated on */
@@ -659,7 +659,7 @@ static tms34010_config tms_config_amerdart =
};
-static tms34010_config tms_config_coolpool =
+static const tms34010_config tms_config_coolpool =
{
FALSE, /* halt on reset */
0, /* the screen operated on */
diff --git a/src/mame/drivers/couple.c b/src/mame/drivers/couple.c
index 4079e5861c8..35d70411b1d 100644
--- a/src/mame/drivers/couple.c
+++ b/src/mame/drivers/couple.c
@@ -119,7 +119,7 @@ static WRITE8_HANDLER( merit_prot_w )
}
#if 0
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
input_port_4_r,
};
diff --git a/src/mame/drivers/cowrace.c b/src/mame/drivers/cowrace.c
index 3a1f30b3bf1..5dd9447904b 100644
--- a/src/mame/drivers/cowrace.c
+++ b/src/mame/drivers/cowrace.c
@@ -149,7 +149,7 @@ static INPUT_PORTS_START( cowrace )
PORT_START // IN0
INPUT_PORTS_END
-static struct YM2203interface ym2203_interface_1 =
+static const struct YM2203interface ym2203_interface_1 =
{
soundlatch_r, OKIM6295_status_0_r, // read A,B
0, OKIM6295_data_0_w, // write A,B
diff --git a/src/mame/drivers/cps1.c b/src/mame/drivers/cps1.c
index a1be3a62d1e..a6cf8099e1d 100644
--- a/src/mame/drivers/cps1.c
+++ b/src/mame/drivers/cps1.c
@@ -162,7 +162,7 @@ Stephh's log (2006.09.20) :
READ16_HANDLER( cps1_dsw_r )
{
- static const char *dswname[3] = { "DSWA", "DSWB", "DSWC" };
+ static const char *const dswname[3] = { "DSWA", "DSWB", "DSWC" };
int control = readinputportbytag(dswname[offset]);
return control << 8 | control;
}
@@ -306,7 +306,7 @@ INTERRUPT_GEN( cps1_interrupt )
*
********************************************************************/
-struct QSound_interface qsound_interface =
+const struct QSound_interface qsound_interface =
{
REGION_SOUND1
};
@@ -3463,7 +3463,7 @@ static void cps1_irq_handler_mus(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
cps1_irq_handler_mus
};
diff --git a/src/mame/drivers/cps2.c b/src/mame/drivers/cps2.c
index 7f8e0538b82..ddfe03e4894 100644
--- a/src/mame/drivers/cps2.c
+++ b/src/mame/drivers/cps2.c
@@ -1342,7 +1342,7 @@ GFXDECODE_END
-static struct m68k_encryption_interface cps2_encryption =
+static const struct m68k_encryption_interface cps2_encryption =
{
CPS2_Read8, CPS2_Read16, CPS2_Read32,
CPS2_Read16, CPS2_Read32
diff --git a/src/mame/drivers/cps3.c b/src/mame/drivers/cps3.c
index b37fb87c72b..6aafda60f05 100644
--- a/src/mame/drivers/cps3.c
+++ b/src/mame/drivers/cps3.c
@@ -2478,7 +2478,7 @@ static INTERRUPT_GEN(cps3_other_interrupt)
//static struct sh2_config sh2cp_conf_slave = { 1 };
-static struct CustomSound_interface custom_interface =
+static const struct CustomSound_interface custom_interface =
{
cps3_sh_start
};
@@ -2497,13 +2497,13 @@ static TIMER_CALLBACK( fastboot_timer_callback )
cpunum_set_reg(0,SH2_VBR, 0x6000000);
}
-static SCSIConfigTable dev_table =
+static const SCSIConfigTable dev_table =
{
1, /* 1 SCSI device */
{ { SCSI_ID_1, 0, SCSI_DEVICE_CDROM } } /* SCSI ID 2, using CD 0, and it's a CD-ROM */
};
-static struct WD33C93interface scsi_intf =
+static const struct WD33C93interface scsi_intf =
{
&dev_table, /* SCSI device table */
NULL /* command completion IRQ */
diff --git a/src/mame/drivers/crgolf.c b/src/mame/drivers/crgolf.c
index 075310ff61d..681a6381ac0 100644
--- a/src/mame/drivers/crgolf.c
+++ b/src/mame/drivers/crgolf.c
@@ -346,7 +346,7 @@ INPUT_PORTS_END
*
*************************************/
-static struct MSM5205interface msm5205_intf =
+static const struct MSM5205interface msm5205_intf =
{
vck_callback,
MSM5205_S64_4B
diff --git a/src/mame/drivers/crimfght.c b/src/mame/drivers/crimfght.c
index c07cfe12b69..cddcded40d4 100644
--- a/src/mame/drivers/crimfght.c
+++ b/src/mame/drivers/crimfght.c
@@ -341,7 +341,7 @@ INPUT_PORTS_END
***************************************************************************/
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
0,
crimfght_snd_bankswitch_w
@@ -353,7 +353,7 @@ static void volume_callback(int v)
K007232_set_volume(0,1,0,(v >> 4) * 0x11);
}
-static struct K007232_interface k007232_interface =
+static const struct K007232_interface k007232_interface =
{
REGION_SOUND1, /* memory regions */
volume_callback /* external port callback */
diff --git a/src/mame/drivers/crospang.c b/src/mame/drivers/crospang.c
index eb8600ceb5d..f6fbf055be0 100644
--- a/src/mame/drivers/crospang.c
+++ b/src/mame/drivers/crospang.c
@@ -395,7 +395,7 @@ static void irqhandler(int linestate)
cpunum_set_input_line(1,0,linestate);
}
-static struct YM3812interface ym3812_interface =
+static const struct YM3812interface ym3812_interface =
{
irqhandler /* IRQ Line */
};
diff --git a/src/mame/drivers/crshrace.c b/src/mame/drivers/crshrace.c
index 5879b2f3b48..696a2fe6561 100644
--- a/src/mame/drivers/crshrace.c
+++ b/src/mame/drivers/crshrace.c
@@ -610,7 +610,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2610interface ym2610_interface =
+static const struct YM2610interface ym2610_interface =
{
irqhandler,
REGION_SOUND1,
diff --git a/src/mame/drivers/crystal.c b/src/mame/drivers/crystal.c
index 47e01d11edb..556a5357d73 100644
--- a/src/mame/drivers/crystal.c
+++ b/src/mame/drivers/crystal.c
@@ -814,7 +814,7 @@ static INPUT_PORTS_START(crystal)
INPUT_PORTS_END
-static struct VR0Interface vr0_interface =
+static const struct VR0Interface vr0_interface =
{
0x04800000
};
diff --git a/src/mame/drivers/cubocd32.c b/src/mame/drivers/cubocd32.c
index f2c4dd4b015..c8068652bce 100644
--- a/src/mame/drivers/cubocd32.c
+++ b/src/mame/drivers/cubocd32.c
@@ -257,7 +257,7 @@ INPUT_PORTS_END
*
*************************************/
-static struct CustomSound_interface amiga_custom_interface =
+static const struct CustomSound_interface amiga_custom_interface =
{
amiga_sh_start
};
diff --git a/src/mame/drivers/cvs.c b/src/mame/drivers/cvs.c
index 4617fa0780d..34e51bfed0f 100644
--- a/src/mame/drivers/cvs.c
+++ b/src/mame/drivers/cvs.c
@@ -219,7 +219,7 @@ static READ8_HANDLER( cvs_393hz_Clock_r )
else return 0;
}
-static struct TMS5110interface tms5110_interface =
+static const struct TMS5110interface tms5110_interface =
{
0, /*irq callback function*/
cvs_speech_rom_read_bit /*M0 callback function. Called whenever chip requests a single bit of data*/
diff --git a/src/mame/drivers/cyberbal.c b/src/mame/drivers/cyberbal.c
index 7e81b42914a..a38475dee34 100644
--- a/src/mame/drivers/cyberbal.c
+++ b/src/mame/drivers/cyberbal.c
@@ -428,7 +428,7 @@ GFXDECODE_END
*
*************************************/
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
atarigen_ym2151_irq_gen
};
diff --git a/src/mame/drivers/cybertnk.c b/src/mame/drivers/cybertnk.c
index 29bba4f7ddb..2369e7365a4 100644
--- a/src/mame/drivers/cybertnk.c
+++ b/src/mame/drivers/cybertnk.c
@@ -556,7 +556,7 @@ static INTERRUPT_GEN( slave_irq )
}
}
-static struct Y8950interface y8950_interface = {
+static const struct Y8950interface y8950_interface = {
0, /* TODO */
REGION_SOUND1 /* memory region */
};
diff --git a/src/mame/drivers/darius.c b/src/mame/drivers/darius.c
index c74be14940b..2d3115eabda 100644
--- a/src/mame/drivers/darius.c
+++ b/src/mame/drivers/darius.c
@@ -547,7 +547,7 @@ static void darius_adpcm_int (int data)
}
}
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
darius_adpcm_int, /* interrupt function */
MSM5205_S48_4B /* 8KHz */
@@ -832,7 +832,7 @@ static void irqhandler(int irq) /* assumes Z80 sandwiched between 68Ks */
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2203interface ym2203_interface_1 =
+static const struct YM2203interface ym2203_interface_1 =
{
0, /* portA read */
0,
@@ -841,7 +841,7 @@ static struct YM2203interface ym2203_interface_1 =
irqhandler
};
-static struct YM2203interface ym2203_interface_2 =
+static const struct YM2203interface ym2203_interface_2 =
{
0, /* portA read */
0,
diff --git a/src/mame/drivers/darkhors.c b/src/mame/drivers/darkhors.c
index 84ec4a28547..f96b22c164a 100644
--- a/src/mame/drivers/darkhors.c
+++ b/src/mame/drivers/darkhors.c
@@ -558,7 +558,7 @@ INPUT_PORTS_END
***************************************************************************/
-static gfx_layout layout_16x16x8 =
+static const gfx_layout layout_16x16x8 =
{
16,16,
RGN_FRAC(1,4),
diff --git a/src/mame/drivers/darkseal.c b/src/mame/drivers/darkseal.c
index 157c88809d5..8644d94c583 100644
--- a/src/mame/drivers/darkseal.c
+++ b/src/mame/drivers/darkseal.c
@@ -278,7 +278,7 @@ static void sound_irq(int state)
cpunum_set_input_line(1,1,state); /* IRQ 2 */
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
sound_irq
};
diff --git a/src/mame/drivers/dassault.c b/src/mame/drivers/dassault.c
index d5e3e29375b..a3e6f754724 100644
--- a/src/mame/drivers/dassault.c
+++ b/src/mame/drivers/dassault.c
@@ -542,7 +542,7 @@ static WRITE8_HANDLER( sound_bankswitch_w )
OKIM6295_set_bank_base(1, (data & 1) * 0x40000);
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
sound_irq,
sound_bankswitch_w
diff --git a/src/mame/drivers/dblewing.c b/src/mame/drivers/dblewing.c
index 83147937c03..b21b92dc39a 100644
--- a/src/mame/drivers/dblewing.c
+++ b/src/mame/drivers/dblewing.c
@@ -532,7 +532,7 @@ static void sound_irq(int irq)
// mame_printf_debug("sound irq\n");
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
sound_irq
};
diff --git a/src/mame/drivers/dbz.c b/src/mame/drivers/dbz.c
index 61410aa153c..a53765ecc78 100644
--- a/src/mame/drivers/dbz.c
+++ b/src/mame/drivers/dbz.c
@@ -406,7 +406,7 @@ INPUT_PORTS_END
/**********************************************************************************/
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
dbz_sound_irq
};
diff --git a/src/mame/drivers/ddayjlc.c b/src/mame/drivers/ddayjlc.c
index e683a8c9a81..d9c922b1b44 100644
--- a/src/mame/drivers/ddayjlc.c
+++ b/src/mame/drivers/ddayjlc.c
@@ -378,7 +378,7 @@ static VIDEO_UPDATE( ddayjlc )
return 0;
}
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
soundlatch_r
};
diff --git a/src/mame/drivers/ddealer.c b/src/mame/drivers/ddealer.c
index c5b7de49f26..3efd7d7e3eb 100644
--- a/src/mame/drivers/ddealer.c
+++ b/src/mame/drivers/ddealer.c
@@ -213,7 +213,7 @@ MACHINE_DRIVER_END
static READ16_HANDLER( ddealer_mcu_r )
{
- static int resp[] =
+ static const int resp[] =
{
0x93, 0xc7, 0x00, 0x8000,
0x2d, 0x6d, 0x00, 0x8000,
diff --git a/src/mame/drivers/ddenlovr.c b/src/mame/drivers/ddenlovr.c
index 2d0ed88b8b0..e54bbfe73a5 100644
--- a/src/mame/drivers/ddenlovr.c
+++ b/src/mame/drivers/ddenlovr.c
@@ -6569,7 +6569,7 @@ static MACHINE_DRIVER_START( akamaru )
MACHINE_DRIVER_END
-static struct AY8910interface quiz365_ay8910_interface =
+static const struct AY8910interface quiz365_ay8910_interface =
{
quiz365_input_r,
0,
@@ -6909,7 +6909,7 @@ static INTERRUPT_GEN( rtc_nmi_irq )
cpunum_set_input_line(0, INPUT_LINE_NMI, PULSE_LINE);
}
-static struct AY8910interface mjmyster_ay8910_interface =
+static const struct AY8910interface mjmyster_ay8910_interface =
{
0,
0,
@@ -6957,7 +6957,7 @@ static INTERRUPT_GEN( hginga_irq )
cpunum_set_input_line_and_vector(0, 0, HOLD_LINE, 0xf8);
}
-static struct AY8910interface hginga_ay8910_interface =
+static const struct AY8910interface hginga_ay8910_interface =
{
// A B
hginga_dsw_r, 0, // R
diff --git a/src/mame/drivers/ddragon.c b/src/mame/drivers/ddragon.c
index 1dea5ad9b68..3e2cc1a741c 100644
--- a/src/mame/drivers/ddragon.c
+++ b/src/mame/drivers/ddragon.c
@@ -953,12 +953,12 @@ static void irq_handler(int irq)
cpunum_set_input_line( snd_cpu, ym_irq , irq ? ASSERT_LINE : CLEAR_LINE );
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
irq_handler
};
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
dd_adpcm_int, /* interrupt function */
MSM5205_S48_4B /* 8kHz */
diff --git a/src/mame/drivers/ddragon3.c b/src/mame/drivers/ddragon3.c
index d889b795b2a..f06ef69b703 100644
--- a/src/mame/drivers/ddragon3.c
+++ b/src/mame/drivers/ddragon3.c
@@ -480,7 +480,7 @@ static void dd3_ymirq_handler(int irq)
cpunum_set_input_line( 1, 0 , irq ? ASSERT_LINE : CLEAR_LINE );
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
dd3_ymirq_handler
};
diff --git a/src/mame/drivers/ddrible.c b/src/mame/drivers/ddrible.c
index ae0248df1e5..f2d16de5bfb 100644
--- a/src/mame/drivers/ddrible.c
+++ b/src/mame/drivers/ddrible.c
@@ -322,7 +322,7 @@ static GFXDECODE_START( ddrible )
GFXDECODE_ENTRY( REGION_GFX2, 0x40000, spritelayout, 64, 16 ) /* colors 0-15 but using lookup table */
GFXDECODE_END
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,
ddrible_vlm5030_busy_r,
@@ -330,7 +330,7 @@ static struct YM2203interface ym2203_interface =
0
};
-static struct VLM5030interface vlm5030_interface =
+static const struct VLM5030interface vlm5030_interface =
{
REGION_SOUND1,/* memory region of speech rom */
0x10000 /* memory size 64Kbyte * 2 bank */
diff --git a/src/mame/drivers/ddz.c b/src/mame/drivers/ddz.c
index 4b5a57c875d..0a79e61eb42 100644
--- a/src/mame/drivers/ddz.c
+++ b/src/mame/drivers/ddz.c
@@ -45,7 +45,7 @@ static INPUT_PORTS_START(ddz)
INPUT_PORTS_END
-static struct VR0Interface vr0_interface =
+static const struct VR0Interface vr0_interface =
{
0x04800000
};
diff --git a/src/mame/drivers/dec0.c b/src/mame/drivers/dec0.c
index 4ef54eb6323..869d251a598 100644
--- a/src/mame/drivers/dec0.c
+++ b/src/mame/drivers/dec0.c
@@ -912,12 +912,12 @@ static void sound_irq2(int linestate)
cpunum_set_input_line(1,1,linestate); /* IRQ2 */
}
-static struct YM3812interface ym3812_interface =
+static const struct YM3812interface ym3812_interface =
{
sound_irq
};
-static struct YM3812interface ym3812b_interface =
+static const struct YM3812interface ym3812b_interface =
{
sound_irq2
};
@@ -1965,10 +1965,10 @@ ROM_END
ROM_START( secretag )
ROM_REGION( 0x60000, REGION_CPU1, 0 ) /* 68000 code */
- ROM_LOAD16_BYTE( "fb14.bin", 0x00000, 0x10000, CRC(9be6ac90) SHA1(1c78af9da63add7c77c8d2ce24924505481381b1) )
- ROM_LOAD16_BYTE( "fb12.bin", 0x00001, 0x10000, CRC(28904b6b) SHA1(c3fd42c3ba5b19c3483df3ac9e44016570762de7) )
- ROM_LOAD16_BYTE( "fb15.bin", 0x20000, 0x10000, CRC(106bb26c) SHA1(e5d05124b6dfc54e41dcf40916633caaa9a19823) )
- ROM_LOAD16_BYTE( "fb13.bin", 0x20001, 0x10000, CRC(90523413) SHA1(7ea65525f2d7c577255aa01260acc5f43d136b3c) )
+ ROM_LOAD16_BYTE( "fb14-3.17l", 0x00000, 0x10000, CRC(9be6ac90) SHA1(1c78af9da63add7c77c8d2ce24924505481381b1) )
+ ROM_LOAD16_BYTE( "fb12-3.9l", 0x00001, 0x10000, CRC(28904b6b) SHA1(c3fd42c3ba5b19c3483df3ac9e44016570762de7) )
+ ROM_LOAD16_BYTE( "fb15.19l", 0x20000, 0x10000, CRC(106bb26c) SHA1(e5d05124b6dfc54e41dcf40916633caaa9a19823) )
+ ROM_LOAD16_BYTE( "fb13.11l", 0x20001, 0x10000, CRC(90523413) SHA1(7ea65525f2d7c577255aa01260acc5f43d136b3c) )
ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* Sound CPU */
ROM_LOAD( "fa10.5h", 0x00000, 0x10000, CRC(dfd2ff25) SHA1(3dcd6d50b92b49daae4b51581abe9c95f764e848) )
diff --git a/src/mame/drivers/dec8.c b/src/mame/drivers/dec8.c
index dcf6143b9a5..5fc27b43253 100644
--- a/src/mame/drivers/dec8.c
+++ b/src/mame/drivers/dec8.c
@@ -2019,22 +2019,22 @@ static void oscar_irqhandler(int linestate)
cpunum_set_input_line(2,0,linestate); /* M6502_IRQ_LINE */
}
-static struct YM3526interface ym3526_interface =
+static const struct YM3526interface ym3526_interface =
{
irqhandler
};
-static struct YM3526interface oscar_ym3526_interface =
+static const struct YM3526interface oscar_ym3526_interface =
{
oscar_irqhandler
};
-static struct YM3812interface ym3812_interface =
+static const struct YM3812interface ym3812_interface =
{
irqhandler
};
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
csilver_adpcm_int, /* interrupt function */
MSM5205_S48_4B /* 8KHz */
diff --git a/src/mame/drivers/deco156.c b/src/mame/drivers/deco156.c
index ee8596cd2ea..2e92b2489ba 100644
--- a/src/mame/drivers/deco156.c
+++ b/src/mame/drivers/deco156.c
@@ -409,7 +409,7 @@ static void sound_irq_gen(int state)
logerror("sound irq\n");
}
-static struct YMZ280Binterface ymz280b_intf =
+static const struct YMZ280Binterface ymz280b_intf =
{
REGION_SOUND1,
sound_irq_gen
diff --git a/src/mame/drivers/deco32.c b/src/mame/drivers/deco32.c
index b38938911a9..039f7eaf656 100644
--- a/src/mame/drivers/deco32.c
+++ b/src/mame/drivers/deco32.c
@@ -1798,13 +1798,13 @@ static WRITE8_HANDLER( sound_bankswitch_w )
OKIM6295_set_bank_base(1, ((data >> 1)& 1) * 0x40000);
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
sound_irq,
sound_bankswitch_w
};
-static struct YM2151interface ym2151_interface_nslasher =
+static const struct YM2151interface ym2151_interface_nslasher =
{
sound_irq_nslasher,
sound_bankswitch_w
diff --git a/src/mame/drivers/deco_mlc.c b/src/mame/drivers/deco_mlc.c
index d86c62fec72..e94e69155fc 100644
--- a/src/mame/drivers/deco_mlc.c
+++ b/src/mame/drivers/deco_mlc.c
@@ -425,7 +425,7 @@ static MACHINE_RESET( mlc )
raster_irq_timer = timer_alloc(interrupt_gen, NULL);
}
-static struct YMZ280Binterface ymz280b_intf =
+static const struct YMZ280Binterface ymz280b_intf =
{
REGION_SOUND1,
0
diff --git a/src/mame/drivers/deniam.c b/src/mame/drivers/deniam.c
index d956902e5f8..95f1566f10c 100644
--- a/src/mame/drivers/deniam.c
+++ b/src/mame/drivers/deniam.c
@@ -311,7 +311,7 @@ static void irqhandler(int linestate)
cpunum_set_input_line(1,0,linestate);
}
-static struct YM3812interface ym3812_interface =
+static const struct YM3812interface ym3812_interface =
{
irqhandler
};
diff --git a/src/mame/drivers/dietgo.c b/src/mame/drivers/dietgo.c
index 2893f223bda..ebf825788ee 100644
--- a/src/mame/drivers/dietgo.c
+++ b/src/mame/drivers/dietgo.c
@@ -195,7 +195,7 @@ static void sound_irq(int state)
cpunum_set_input_line(1,1,state); /* IRQ 2 */
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
sound_irq
};
diff --git a/src/mame/drivers/discoboy.c b/src/mame/drivers/discoboy.c
index 64fe032ef5e..b16b8e6d2a5 100644
--- a/src/mame/drivers/discoboy.c
+++ b/src/mame/drivers/discoboy.c
@@ -464,7 +464,7 @@ GFXDECODE_END
-static struct MSM5205interface discoboy_msm5205_interface =
+static const struct MSM5205interface discoboy_msm5205_interface =
{
splash_msm5205_int, /* IRQ handler */
MSM5205_S48_4B /* ??? unknown hz */
diff --git a/src/mame/drivers/djmain.c b/src/mame/drivers/djmain.c
index d29cb32106e..7e0bb8d277e 100644
--- a/src/mame/drivers/djmain.c
+++ b/src/mame/drivers/djmain.c
@@ -1152,7 +1152,7 @@ GFXDECODE_END
*
*************************************/
-static struct ide_interface ide_intf =
+static const struct ide_interface ide_intf =
{
ide_interrupt,
};
@@ -1165,7 +1165,7 @@ static struct ide_interface ide_intf =
*
*************************************/
-static struct K054539interface k054539_interface =
+static const struct K054539interface k054539_interface =
{
REGION_SOUND1
};
@@ -1731,7 +1731,7 @@ static DRIVER_INIT( beatmania )
ide_controller_init(0, &ide_intf);
}
-static UINT8 beatmania_master_password[2 + 32] =
+static const UINT8 beatmania_master_password[2 + 32] =
{
0x01, 0x00,
0x4d, 0x47, 0x43, 0x28, 0x4b, 0x29, 0x4e, 0x4f,
@@ -1742,7 +1742,7 @@ static UINT8 beatmania_master_password[2 + 32] =
static DRIVER_INIT( hmcompmx )
{
- static UINT8 hmcompmx_user_password[2 + 32] =
+ static const UINT8 hmcompmx_user_password[2 + 32] =
{
0x00, 0x00,
0x44, 0x42, 0x56, 0x4b, 0x3a, 0x34, 0x38, 0x2a,
@@ -1759,7 +1759,7 @@ static DRIVER_INIT( hmcompmx )
static DRIVER_INIT( bm4thmix )
{
- static UINT8 bm4thmix_user_password[2 + 32] =
+ static const UINT8 bm4thmix_user_password[2 + 32] =
{
0x00, 0x00,
0x44, 0x42, 0x29, 0x4b, 0x2f, 0x2c, 0x4c, 0x32,
@@ -1775,7 +1775,7 @@ static DRIVER_INIT( bm4thmix )
static DRIVER_INIT( bm5thmix )
{
- static UINT8 bm5thmix_user_password[2 + 32] =
+ static const UINT8 bm5thmix_user_password[2 + 32] =
{
0x00, 0x00,
0x44, 0x42, 0x56, 0x4b, 0x37, 0x35, 0x4a, 0x23,
@@ -1792,7 +1792,7 @@ static DRIVER_INIT( bm5thmix )
static DRIVER_INIT( bmclubmx )
{
- static UINT8 bmclubmx_user_password[2 + 32] =
+ static const UINT8 bmclubmx_user_password[2 + 32] =
{
0x00, 0x00,
0x44, 0x20, 0x30, 0x57, 0x3c, 0x3f, 0x38, 0x32,
@@ -1810,7 +1810,7 @@ static DRIVER_INIT( bmclubmx )
static DRIVER_INIT( bmcompm2 )
{
- static UINT8 bmcompm2_user_password[2 + 32] =
+ static const UINT8 bmcompm2_user_password[2 + 32] =
{
0x00, 0x00,
0x3a, 0x20, 0x31, 0x3e, 0x46, 0x2c, 0x35, 0x46,
@@ -1827,7 +1827,7 @@ static DRIVER_INIT( bmcompm2 )
static DRIVER_INIT( hmcompm2 )
{
- static UINT8 hmcompm2_user_password[2 + 32] =
+ static const UINT8 hmcompm2_user_password[2 + 32] =
{
0x00, 0x00,
0x3b, 0x39, 0x24, 0x3e, 0x4e, 0x59, 0x5c, 0x32,
@@ -1844,7 +1844,7 @@ static DRIVER_INIT( hmcompm2 )
static DRIVER_INIT( bmdct )
{
- static UINT8 bmdct_user_password[2 + 32] =
+ static const UINT8 bmdct_user_password[2 + 32] =
{
0x00, 0x00,
0x52, 0x47, 0x30, 0x3f, 0x2f, 0x39, 0x54, 0x5e,
@@ -1861,7 +1861,7 @@ static DRIVER_INIT( bmdct )
static DRIVER_INIT( bmcorerm )
{
- static UINT8 bmcorerm_user_password[2 + 32] =
+ static const UINT8 bmcorerm_user_password[2 + 32] =
{
0x00, 0x00,
0x44, 0x42, 0x56, 0x4b, 0x3f, 0x4d, 0x4a, 0x27,
@@ -1878,7 +1878,7 @@ static DRIVER_INIT( bmcorerm )
static DRIVER_INIT( bm6thmix )
{
- static UINT8 bm6thmix_user_password[2 + 32] =
+ static const UINT8 bm6thmix_user_password[2 + 32] =
{
0x00, 0x00,
0x44, 0x42, 0x56, 0x4b, 0x3d, 0x4d, 0x4a, 0x23,
@@ -1895,7 +1895,7 @@ static DRIVER_INIT( bm6thmix )
static DRIVER_INIT( bm7thmix )
{
- static UINT8 bm7thmix_user_password[2 + 32] =
+ static const UINT8 bm7thmix_user_password[2 + 32] =
{
0x00, 0x00,
0x44, 0x42, 0x56, 0x4b, 0x3f, 0x4e, 0x4a, 0x25,
@@ -1913,7 +1913,7 @@ static DRIVER_INIT( bm7thmix )
#if 0
static DRIVER_INIT( bmfinal )
{
- static UINT8 bmfinal_user_password[2 + 32] =
+ static const UINT8 bmfinal_user_password[2 + 32] =
{
0x00, 0x00,
0x44, 0x42, 0x56, 0x4b, 0x3f, 0x4f, 0x4a, 0x23,
diff --git a/src/mame/drivers/dkong.c b/src/mame/drivers/dkong.c
index 142d8282ddb..097f79ca1c1 100644
--- a/src/mame/drivers/dkong.c
+++ b/src/mame/drivers/dkong.c
@@ -230,7 +230,7 @@ static void p8257_ctl_w(UINT8 data);
*
*************************************/
-static struct dma8257_interface dk_dma =
+static const struct dma8257_interface dk_dma =
{
0,
CLOCK_1H,
@@ -243,7 +243,7 @@ static struct dma8257_interface dk_dma =
{ 0, 0, 0, 0 }
};
-static struct dma8257_interface hb_dma =
+static const struct dma8257_interface hb_dma =
{
0,
CLOCK_1H,
diff --git a/src/mame/drivers/dlair.c b/src/mame/drivers/dlair.c
index 2d18f8853e6..151747ae64e 100644
--- a/src/mame/drivers/dlair.c
+++ b/src/mame/drivers/dlair.c
@@ -133,7 +133,7 @@ static z80sio_interface sio_intf =
};
-static struct z80_irq_daisy_chain dleuro_daisy_chain[] =
+static const struct z80_irq_daisy_chain dleuro_daisy_chain[] =
{
{ z80sio_reset, z80sio_irq_state, z80sio_irq_ack, z80sio_irq_reti, 0 },
{ z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 },
@@ -783,7 +783,7 @@ GFXDECODE_END
*
*************************************/
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
input_port_0_r,
input_port_1_r
diff --git a/src/mame/drivers/docastle.c b/src/mame/drivers/docastle.c
index 5d21b288aeb..8c14aa67ab8 100644
--- a/src/mame/drivers/docastle.c
+++ b/src/mame/drivers/docastle.c
@@ -616,7 +616,7 @@ GFXDECODE_END
/* Sound Interfaces */
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
idsoccer_adpcm_int, // interrupt function
MSM5205_S64_4B // 6 kHz ???
diff --git a/src/mame/drivers/dominob.c b/src/mame/drivers/dominob.c
index 1e2faddfa6c..184f0063152 100644
--- a/src/mame/drivers/dominob.c
+++ b/src/mame/drivers/dominob.c
@@ -241,7 +241,7 @@ static GFXDECODE_START( dominob )
GFXDECODE_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
input_port_5_r,
input_port_4_r
diff --git a/src/mame/drivers/dooyong.c b/src/mame/drivers/dooyong.c
index f89ad145e99..508543dc5d2 100644
--- a/src/mame/drivers/dooyong.c
+++ b/src/mame/drivers/dooyong.c
@@ -907,7 +907,7 @@ static READ8_HANDLER( unk_r )
return 0;
}
-static struct YM2203interface ym2203_interface_1 =
+static const struct YM2203interface ym2203_interface_1 =
{
unk_r,
0,
@@ -916,12 +916,12 @@ static struct YM2203interface ym2203_interface_1 =
irqhandler
};
-static struct YM2203interface ym2203_interface_2 =
+static const struct YM2203interface ym2203_interface_2 =
{
unk_r
};
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
irqhandler
};
diff --git a/src/mame/drivers/drmicro.c b/src/mame/drivers/drmicro.c
index b28e01c47cd..afff24bc22e 100644
--- a/src/mame/drivers/drmicro.c
+++ b/src/mame/drivers/drmicro.c
@@ -219,7 +219,7 @@ static GFXDECODE_START( drmicro )
GFXDECODE_ENTRY( REGION_GFX2, 0x0000, spritelayout8, 256, 32 ) /* sprites */
GFXDECODE_END
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
pcm_w, /* IRQ handler */
MSM5205_S64_4B /* 6 KHz */
diff --git a/src/mame/drivers/drtomy.c b/src/mame/drivers/drtomy.c
index cf5f3d68e1b..1c318ea1258 100644
--- a/src/mame/drivers/drtomy.c
+++ b/src/mame/drivers/drtomy.c
@@ -52,8 +52,8 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
int i, x, y, ex, ey;
const gfx_element *gfx = machine->gfx[0];
- static int x_offset[2] = {0x0,0x2};
- static int y_offset[2] = {0x0,0x1};
+ static const int x_offset[2] = {0x0,0x2};
+ static const int y_offset[2] = {0x0,0x1};
for (i = 3; i < 0x1000/2; i+=4){
int sx = drtomy_spriteram[i+2] & 0x01ff;
diff --git a/src/mame/drivers/dunhuang.c b/src/mame/drivers/dunhuang.c
index 77194fc3332..7d72b73485f 100644
--- a/src/mame/drivers/dunhuang.c
+++ b/src/mame/drivers/dunhuang.c
@@ -661,7 +661,7 @@ GFXDECODE_END
Machine Drivers
***************************************************************************/
-static struct AY8910interface dunhuang_ay8910_interface =
+static const struct AY8910interface dunhuang_ay8910_interface =
{
// A B
0, dunhuang_dsw_r, // R
diff --git a/src/mame/drivers/dwarfd.c b/src/mame/drivers/dwarfd.c
index 3a1daf26cad..22bdbb1f648 100644
--- a/src/mame/drivers/dwarfd.c
+++ b/src/mame/drivers/dwarfd.c
@@ -674,7 +674,7 @@ static PALETTE_INIT(dwarfd)
palette_set_color(machine, 6, MAKE_RGB(255, 0, 0));
}
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
input_port_3_r,
input_port_2_r,
diff --git a/src/mame/drivers/dynax.c b/src/mame/drivers/dynax.c
index aa3bfe9f072..a6c421b9889 100644
--- a/src/mame/drivers/dynax.c
+++ b/src/mame/drivers/dynax.c
@@ -3576,7 +3576,7 @@ INPUT_PORTS_END
Hana no Mai
***************************************************************************/
-static struct YM2203interface hanamai_ym2203_interface =
+static const struct YM2203interface hanamai_ym2203_interface =
{
input_port_1_r, /* Port A Read: DSW */
input_port_0_r, /* Port B Read: DSW */
@@ -3585,7 +3585,7 @@ static struct YM2203interface hanamai_ym2203_interface =
sprtmtch_sound_callback /* IRQ handler */
};
-static struct MSM5205interface hanamai_msm5205_interface =
+static const struct MSM5205interface hanamai_msm5205_interface =
{
adpcm_int, /* IRQ handler */
MSM5205_S48_4B /* 8 KHz, 4 Bits */
@@ -3642,7 +3642,7 @@ MACHINE_DRIVER_END
Hana Oriduru
***************************************************************************/
-static struct AY8910interface hnoridur_ay8910_interface =
+static const struct AY8910interface hnoridur_ay8910_interface =
{
input_port_0_r /* Port A Read: DSW */
};
@@ -3691,7 +3691,7 @@ MACHINE_DRIVER_END
Sports Match
***************************************************************************/
-static struct YM2203interface sprtmtch_ym2203_interface =
+static const struct YM2203interface sprtmtch_ym2203_interface =
{
input_port_3_r, /* Port A Read: DSW */
input_port_4_r, /* Port B Read: DSW */
@@ -3861,7 +3861,7 @@ MACHINE_DRIVER_END
// dual monitor, 2 CPU's, 2 blitters
-static struct YM2203interface jantouki_ym2203_interface =
+static const struct YM2203interface jantouki_ym2203_interface =
{
0, /* Port A Read: DSW */
0, /* Port B Read: DSW */
@@ -3870,7 +3870,7 @@ static struct YM2203interface jantouki_ym2203_interface =
jantouki_sound_callback /* IRQ handler */
};
-static struct MSM5205interface jantouki_msm5205_interface =
+static const struct MSM5205interface jantouki_msm5205_interface =
{
adpcm_int_cpu1, /* IRQ handler */
MSM5205_S48_4B /* 8 KHz, 4 Bits */
@@ -4033,7 +4033,7 @@ MACHINE_DRIVER_END
Hanafuda Hana Tengoku
***************************************************************************/
-static struct AY8910interface htengoku_ay8910_interface =
+static const struct AY8910interface htengoku_ay8910_interface =
{
// A B
htengoku_dsw_r, 0, // R
@@ -4091,7 +4091,7 @@ static INTERRUPT_GEN( tenkai_interrupt )
}
}
-static struct AY8910interface tenkai_ay8910_interface =
+static const struct AY8910interface tenkai_ay8910_interface =
{
// A // B
tenkai_dsw_r, 0, // Read
diff --git a/src/mame/drivers/enigma2.c b/src/mame/drivers/enigma2.c
index e55db4e5e60..a1387a9f47a 100644
--- a/src/mame/drivers/enigma2.c
+++ b/src/mame/drivers/enigma2.c
@@ -392,7 +392,7 @@ static UINT32 p2_controls_r(void *param)
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
sound_latch_r,
0,
diff --git a/src/mame/drivers/eolithsp.c b/src/mame/drivers/eolithsp.c
index 3f760da6534..6c156c4be54 100644
--- a/src/mame/drivers/eolithsp.c
+++ b/src/mame/drivers/eolithsp.c
@@ -29,7 +29,7 @@ void eolith_speedup_read(void)
}
-static struct
+static const struct
{
const char *s_name;
UINT32 speedup_address;
diff --git a/src/mame/drivers/ettrivia.c b/src/mame/drivers/ettrivia.c
index 00d04f4e467..8fac5071def 100644
--- a/src/mame/drivers/ettrivia.c
+++ b/src/mame/drivers/ettrivia.c
@@ -200,12 +200,12 @@ static VIDEO_UPDATE( ettrivia )
return 0;
}
-static struct AY8910interface ay8912_interface_2 =
+static const struct AY8910interface ay8912_interface_2 =
{
input_port_1_r
};
-static struct AY8910interface ay8912_interface_3 =
+static const struct AY8910interface ay8912_interface_3 =
{
input_port_0_r
};
diff --git a/src/mame/drivers/exerion.c b/src/mame/drivers/exerion.c
index c3b5047255a..77d6e7c0527 100644
--- a/src/mame/drivers/exerion.c
+++ b/src/mame/drivers/exerion.c
@@ -261,7 +261,7 @@ GFXDECODE_END
*
*************************************/
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
exerion_porta_r,
0,
diff --git a/src/mame/drivers/exidy.c b/src/mame/drivers/exidy.c
index 4705373dff8..804beacdfbb 100644
--- a/src/mame/drivers/exidy.c
+++ b/src/mame/drivers/exidy.c
@@ -811,7 +811,7 @@ static const struct Samplesinterface targ_samples_interface =
};
-static struct CustomSound_interface exidy_custom_interface =
+static const struct CustomSound_interface exidy_custom_interface =
{
exidy_sh_start
};
diff --git a/src/mame/drivers/exidy440.c b/src/mame/drivers/exidy440.c
index 15260721054..4d7bb4ae85e 100644
--- a/src/mame/drivers/exidy440.c
+++ b/src/mame/drivers/exidy440.c
@@ -1040,7 +1040,7 @@ INPUT_PORTS_END
*
*************************************/
-static struct CustomSound_interface custom_interface =
+static const struct CustomSound_interface custom_interface =
{
exidy440_sh_start,
exidy440_sh_stop
diff --git a/src/mame/drivers/exprraid.c b/src/mame/drivers/exprraid.c
index 43c0250b15d..3c9269a26da 100644
--- a/src/mame/drivers/exprraid.c
+++ b/src/mame/drivers/exprraid.c
@@ -283,7 +283,7 @@ static void irqhandler(int linestate)
cpunum_set_input_line_and_vector(1,0,linestate,0xff);
}
-static struct YM3526interface ym3526_interface =
+static const struct YM3526interface ym3526_interface =
{
irqhandler
};
diff --git a/src/mame/drivers/exterm.c b/src/mame/drivers/exterm.c
index 001db75acf8..98f57a58286 100644
--- a/src/mame/drivers/exterm.c
+++ b/src/mame/drivers/exterm.c
@@ -441,7 +441,7 @@ INPUT_PORTS_END
*
*************************************/
-static tms34010_config master_config =
+static const tms34010_config master_config =
{
FALSE, /* halt on reset */
0, /* the screen operated on */
@@ -453,7 +453,7 @@ static tms34010_config master_config =
exterm_from_shiftreg_master /* read from shiftreg function */
};
-static tms34010_config slave_config =
+static const tms34010_config slave_config =
{
TRUE, /* halt on reset */
0, /* the screen operated on */
diff --git a/src/mame/drivers/exzisus.c b/src/mame/drivers/exzisus.c
index 9378237d1fd..4539db9d03e 100644
--- a/src/mame/drivers/exzisus.c
+++ b/src/mame/drivers/exzisus.c
@@ -315,7 +315,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(1, 0, irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
irqhandler
};
diff --git a/src/mame/drivers/f1gp.c b/src/mame/drivers/f1gp.c
index 4a1d2327f68..830ddaab5eb 100644
--- a/src/mame/drivers/f1gp.c
+++ b/src/mame/drivers/f1gp.c
@@ -535,7 +535,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(2,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2610interface ym2610_interface =
+static const struct YM2610interface ym2610_interface =
{
irqhandler,
REGION_SOUND1,
diff --git a/src/mame/drivers/fantland.c b/src/mame/drivers/fantland.c
index 7f17cd529c5..d159fa24a63 100644
--- a/src/mame/drivers/fantland.c
+++ b/src/mame/drivers/fantland.c
@@ -755,7 +755,7 @@ static void galaxygn_sound_irq(int line)
cpunum_set_input_line_and_vector(1, 0, line ? ASSERT_LINE : CLEAR_LINE, 0x80/4);
}
-static struct YM2151interface galaxygn_ym2151_interface =
+static const struct YM2151interface galaxygn_ym2151_interface =
{
galaxygn_sound_irq
};
@@ -798,7 +798,7 @@ MACHINE_DRIVER_END
// OKI M5205 running at 384kHz [18.432/48]. Sample rate = 384000 / 48
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
borntofi_adpcm_int, /* IRQ handler */
MSM5205_S48_4B /* 8 kHz, 4 Bits */
diff --git a/src/mame/drivers/fastlane.c b/src/mame/drivers/fastlane.c
index 75ab46fd265..546a32ac87c 100644
--- a/src/mame/drivers/fastlane.c
+++ b/src/mame/drivers/fastlane.c
@@ -261,13 +261,13 @@ static void volume_callback1(int v)
K007232_set_volume(1,1,0,(v & 0x0f) * 0x11);
}
-static struct K007232_interface k007232_interface_1 =
+static const struct K007232_interface k007232_interface_1 =
{
REGION_SOUND1,
volume_callback0
};
-static struct K007232_interface k007232_interface_2 =
+static const struct K007232_interface k007232_interface_2 =
{
REGION_SOUND2,
volume_callback1
diff --git a/src/mame/drivers/filetto.c b/src/mame/drivers/filetto.c
index 834cc7f065e..ffccb4aa636 100644
--- a/src/mame/drivers/filetto.c
+++ b/src/mame/drivers/filetto.c
@@ -390,7 +390,7 @@ static void pc_timer0_w(int state)
// pic8259_0_issue_irq(0);
}
-static struct pit8253_config pc_pit8253_config =
+static const struct pit8253_config pc_pit8253_config =
{
TYPE8253,
{
diff --git a/src/mame/drivers/findout.c b/src/mame/drivers/findout.c
index 8446aaed6e3..e67b5e46b38 100644
--- a/src/mame/drivers/findout.c
+++ b/src/mame/drivers/findout.c
@@ -178,7 +178,7 @@ static WRITE8_HANDLER( signature_w )
if (data == 0) signature_pos = 0;
else
{
- static UINT8 signature[8] = { 0xff, 0x01, 0xfd, 0x05, 0xf5, 0x15, 0xd5, 0x55 };
+ static const UINT8 signature[8] = { 0xff, 0x01, 0xfd, 0x05, 0xf5, 0x15, 0xd5, 0x55 };
signature_answer = signature[signature_pos++];
diff --git a/src/mame/drivers/firebeat.c b/src/mame/drivers/firebeat.c
index b7e754dee1d..bea9ea452e2 100644
--- a/src/mame/drivers/firebeat.c
+++ b/src/mame/drivers/firebeat.c
@@ -1339,11 +1339,11 @@ static WRITE32_HANDLER( sound_w )
}
}
-static int cab_data[2] = { 0x0, 0x8 };
-static int kbm_cab_data[2] = { 0x2, 0x8 };
-static int ppd_cab_data[2] = { 0x1, 0x9 };
+static const int cab_data[2] = { 0x0, 0x8 };
+static const int kbm_cab_data[2] = { 0x2, 0x8 };
+static const int ppd_cab_data[2] = { 0x1, 0x9 };
static int cab_data_ptr = 0;
-static int * cur_cab_data = cab_data;
+static const int * cur_cab_data = cab_data;
static READ32_HANDLER( cabinet_r )
{
@@ -1783,7 +1783,7 @@ static void sound_irq_callback(int state)
{
}
-static struct YMZ280Binterface ymz280b_intf =
+static const struct YMZ280Binterface ymz280b_intf =
{
REGION_SOUND1,
sound_irq_callback, // irq
@@ -1974,7 +1974,7 @@ static MACHINE_RESET( firebeat )
cdda_set_cdrom(0, cd);
}
-static ppc_config firebeat_ppc_cfg =
+static const ppc_config firebeat_ppc_cfg =
{
PPC_MODEL_403GCX
};
diff --git a/src/mame/drivers/firetrap.c b/src/mame/drivers/firetrap.c
index a64c62bf969..254df91463d 100644
--- a/src/mame/drivers/firetrap.c
+++ b/src/mame/drivers/firetrap.c
@@ -531,7 +531,7 @@ GFXDECODE_END
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
firetrap_adpcm_int, /* interrupt function */
MSM5205_S48_4B /* 8KHz ? */
diff --git a/src/mame/drivers/flkatck.c b/src/mame/drivers/flkatck.c
index d220e9ab269..f1f001def0e 100644
--- a/src/mame/drivers/flkatck.c
+++ b/src/mame/drivers/flkatck.c
@@ -260,7 +260,7 @@ static void volume_callback0(int v)
K007232_set_volume(0,1,0,(v & 0x0f) * 0x11);
}
-static struct K007232_interface k007232_interface =
+static const struct K007232_interface k007232_interface =
{
REGION_SOUND1, /* memory region */
volume_callback0 /* external port callback */
diff --git a/src/mame/drivers/flower.c b/src/mame/drivers/flower.c
index 312c2916d8b..7c392c1f912 100644
--- a/src/mame/drivers/flower.c
+++ b/src/mame/drivers/flower.c
@@ -224,7 +224,7 @@ static GFXDECODE_START( flower )
GFXDECODE_ENTRY( REGION_GFX3, 0, flower_tilelayout, 0, 16 )
GFXDECODE_END
-static struct CustomSound_interface custom_interface =
+static const struct CustomSound_interface custom_interface =
{
flower_sh_start
};
diff --git a/src/mame/drivers/flstory.c b/src/mame/drivers/flstory.c
index e8a1003b6a1..e5ac450691a 100644
--- a/src/mame/drivers/flstory.c
+++ b/src/mame/drivers/flstory.c
@@ -716,7 +716,7 @@ static GFXDECODE_START( flstory )
GFXDECODE_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
0,
0,
@@ -724,7 +724,7 @@ static struct AY8910interface ay8910_interface =
sound_control_3_w
};
-static struct MSM5232interface msm5232_interface =
+static const struct MSM5232interface msm5232_interface =
{
{ 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6 } /* 1.0 uF capacitors (verified on real PCB) */
};
diff --git a/src/mame/drivers/foodf.c b/src/mame/drivers/foodf.c
index 27fd7af25ed..9ce0883f660 100644
--- a/src/mame/drivers/foodf.c
+++ b/src/mame/drivers/foodf.c
@@ -356,7 +356,7 @@ static READ8_HANDLER( pot_r )
return (readinputport(5) >> offset) << 7;
}
-static struct POKEYinterface pokey_interface =
+static const struct POKEYinterface pokey_interface =
{
{ pot_r,pot_r,pot_r,pot_r,pot_r,pot_r,pot_r,pot_r }
};
diff --git a/src/mame/drivers/frogger.c b/src/mame/drivers/frogger.c
index 985d9c101a6..c9a785925d7 100644
--- a/src/mame/drivers/frogger.c
+++ b/src/mame/drivers/frogger.c
@@ -223,7 +223,7 @@ static INPUT_PORTS_START( froggrmc )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
INPUT_PORTS_END
-static struct AY8910interface frogger_ay8910_interface =
+static const struct AY8910interface frogger_ay8910_interface =
{
soundlatch_r,
frogger_portB_r
diff --git a/src/mame/drivers/fromanc2.c b/src/mame/drivers/fromanc2.c
index 57bb0cb8d6c..86fb449a2dc 100644
--- a/src/mame/drivers/fromanc2.c
+++ b/src/mame/drivers/fromanc2.c
@@ -687,7 +687,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(1, 0, irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2610interface ym2610_interface =
+static const struct YM2610interface ym2610_interface =
{
irqhandler,
0,
diff --git a/src/mame/drivers/fromance.c b/src/mame/drivers/fromance.c
index 1cbc6ee4f87..9552ba4c5be 100644
--- a/src/mame/drivers/fromance.c
+++ b/src/mame/drivers/fromance.c
@@ -1041,7 +1041,7 @@ GFXDECODE_END
*
*************************************/
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
fromance_adpcm_int, /* IRQ handler */
MSM5205_S48_4B /* 8 KHz */
diff --git a/src/mame/drivers/funkybee.c b/src/mame/drivers/funkybee.c
index 2b56457b66c..11a4dce0b82 100644
--- a/src/mame/drivers/funkybee.c
+++ b/src/mame/drivers/funkybee.c
@@ -294,7 +294,7 @@ static GFXDECODE_START( funkybee )
GFXDECODE_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
input_port_3_r
};
diff --git a/src/mame/drivers/funkyjet.c b/src/mame/drivers/funkyjet.c
index dbc23ac9bcb..47f4de79180 100644
--- a/src/mame/drivers/funkyjet.c
+++ b/src/mame/drivers/funkyjet.c
@@ -357,7 +357,7 @@ static void sound_irq(int state)
cpunum_set_input_line(1,1,state); /* IRQ 2 */
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
sound_irq
};
diff --git a/src/mame/drivers/funworld.c b/src/mame/drivers/funworld.c
index 50fdd13fa87..cc56ce8bde7 100644
--- a/src/mame/drivers/funworld.c
+++ b/src/mame/drivers/funworld.c
@@ -1389,7 +1389,7 @@ static const pia6821_interface pia1_intf =
* Sound Interface *
************************/
-static struct AY8910interface ay8910_intf =
+static const struct AY8910interface ay8910_intf =
{
0, // portA in
0, // portB in
diff --git a/src/mame/drivers/fuukifg2.c b/src/mame/drivers/fuukifg2.c
index 1a91be22558..9281fdb394b 100644
--- a/src/mame/drivers/fuukifg2.c
+++ b/src/mame/drivers/fuukifg2.c
@@ -504,7 +504,7 @@ static void soundirq(int state)
cpunum_set_input_line(1, 0, state);
}
-static struct YM3812interface fuuki16_ym3812_intf =
+static const struct YM3812interface fuuki16_ym3812_intf =
{
soundirq /* IRQ Line */
};
diff --git a/src/mame/drivers/fuukifg3.c b/src/mame/drivers/fuukifg3.c
index 170e31750ef..60ff8288498 100644
--- a/src/mame/drivers/fuukifg3.c
+++ b/src/mame/drivers/fuukifg3.c
@@ -577,12 +577,12 @@ static void irqhandler(int irq)
cpunum_set_input_line(1, 0, irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YMF278B_interface ymf278b_interface =
+static const struct YMF278B_interface ymf278b_interface =
{
REGION_SOUND1
};
-static struct YMF262interface ymf262_interface =
+static const struct YMF262interface ymf262_interface =
{
irqhandler /* irq */
};
diff --git a/src/mame/drivers/gaelco2.c b/src/mame/drivers/gaelco2.c
index ae092f138eb..c2eb3de0a6e 100644
--- a/src/mame/drivers/gaelco2.c
+++ b/src/mame/drivers/gaelco2.c
@@ -183,7 +183,7 @@ PORT_START /* COINSW & SERVICESW */
PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
-static struct gaelcosnd_interface maniacsq_snd_interface =
+static const struct gaelcosnd_interface maniacsq_snd_interface =
{
REGION_GFX1, /* memory region */
{ 0*0x0080000, 1*0x0080000, 0, 0 }, /* start of each ROM bank */
@@ -334,7 +334,7 @@ PORT_START /* COINSW & Service */
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, -6.0 / 240, 0) PORT_SENSITIVITY(35) PORT_KEYDELTA(15) PORT_PLAYER(2)
INPUT_PORTS_END
-static struct gaelcosnd_interface bang_snd_interface =
+static const struct gaelcosnd_interface bang_snd_interface =
{
REGION_GFX1, /* memory region */
{ 0*0x0200000, 1*0x0200000, 2*0x0200000, 3*0x0200000 } /* start of each ROM bank */
@@ -537,7 +537,7 @@ PORT_START /* COINSW & Service */
PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
-static struct gaelcosnd_interface alighunt_snd_interface =
+static const struct gaelcosnd_interface alighunt_snd_interface =
{
REGION_GFX1, /* memory region */
{ 0*0x0400000, 1*0x0400000, 2*0x0400000, 3*0x0400000 } /* start of each ROM bank */
@@ -798,7 +798,7 @@ PORT_START /* Fake: To switch between monitors at run time */
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_SERVICE4 ) PORT_TOGGLE
INPUT_PORTS_END
-static struct gaelcosnd_interface touchgo_snd_interface =
+static const struct gaelcosnd_interface touchgo_snd_interface =
{
REGION_GFX1, /* memory region */
{ 0*0x0400000, 1*0x0400000, 0, 0 } /* start of each ROM bank */
@@ -1001,7 +1001,7 @@ PORT_START /* COINSW & Service */
/* bits 6 & 7 are used for accessing the NVRAM */
INPUT_PORTS_END
-static struct gaelcosnd_interface snowboar_snd_interface =
+static const struct gaelcosnd_interface snowboar_snd_interface =
{
REGION_GFX1, /* memory region */
{ 0*0x0400000, 1*0x0400000, 0, 0 } /* start of each ROM bank */
@@ -1244,7 +1244,7 @@ PORT_START /* Fake: To switch between monitors at run time */
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_SERVICE4 ) PORT_TOGGLE
INPUT_PORTS_END
-static struct gaelcosnd_interface wrally2_snd_interface =
+static const struct gaelcosnd_interface wrally2_snd_interface =
{
REGION_GFX1, /* memory region */
{ 0*0x0200000, 1*0x0200000, 0, 0 } /* start of each ROM bank */
diff --git a/src/mame/drivers/gaelco3d.c b/src/mame/drivers/gaelco3d.c
index 80471ae79a0..9c0b64746b6 100644
--- a/src/mame/drivers/gaelco3d.c
+++ b/src/mame/drivers/gaelco3d.c
@@ -928,7 +928,7 @@ INPUT_PORTS_END
*
*************************************/
-static struct tms32031_config tms_config =
+static const struct tms32031_config tms_config =
{
0x1000,
0,
diff --git a/src/mame/drivers/gaiden.c b/src/mame/drivers/gaiden.c
index 121f48ccf3b..f6347e6401e 100644
--- a/src/mame/drivers/gaiden.c
+++ b/src/mame/drivers/gaiden.c
@@ -189,7 +189,7 @@ static WRITE16_HANDLER( wildfang_protection_w )
if (ACCESSING_MSB)
{
static int jumpcode;
- static int jumppoints[] =
+ static const int jumppoints[] =
{
0x0c0c,0x0cac,0x0d42,0x0da2,0x0eea,0x112e,0x1300,0x13fa,
0x159a,0x1630,0x109a,0x1700,0x1750,0x1806,0x18d6,0x1a44,
@@ -286,7 +286,7 @@ same commands as some of the above
*/
/* these are used during startup */
-static int jumppoints_00[0x100] =
+static const int jumppoints_00[0x100] =
{
0x6669, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1,0x4a46, -1,
@@ -299,7 +299,7 @@ static int jumppoints_00[0x100] =
};
/* these are used the rest of the time */
-static int jumppoints_other[0x100] =
+static const int jumppoints_other[0x100] =
{
0x5457,0x494e,0x5f4b,0x4149,0x5345,0x525f,0x4d49,0x5941,
0x5241,0x5349,0x4d4f,0x4a49, -1, -1, -1, -1,
@@ -311,7 +311,7 @@ static int jumppoints_other[0x100] =
-1, -1, -1, -1, -1, -1, -1, -1
};
-static int *raiga_jumppoints = jumppoints_00;
+static const int *raiga_jumppoints = jumppoints_00;
static MACHINE_RESET ( raiga )
{
@@ -954,7 +954,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,0,0,0,irqhandler
};
diff --git a/src/mame/drivers/galaga.c b/src/mame/drivers/galaga.c
index 0149929aaba..9154f4f3853 100644
--- a/src/mame/drivers/galaga.c
+++ b/src/mame/drivers/galaga.c
@@ -795,12 +795,12 @@ static WRITE8_HANDLER( out_1 )
coin_lockout_global_w(data & 1);
}
-static struct namcoio_interface intf0 =
+static const struct namcoio_interface intf0 =
{
{ in0_l, in0_h, in1_l, in1_h }, /* port read handlers */
{ out_0, out_1 } /* port write handlers */
};
-static struct namcoio_interface intf1 =
+static const struct namcoio_interface intf1 =
{
{ dipA_l, dipA_h, dipB_l, dipB_h }, /* port read handlers */
{ NULL, NULL } /* port write handlers */
@@ -1578,7 +1578,7 @@ GFXDECODE_END
/* The resistance path of the namco sound is 16k compared to
* the 10k of the highest gain 54xx filter. Giving a 10/16 gain.
*/
-static struct namco_interface namco_interface =
+static const struct namco_interface namco_interface =
{
3, /* number of voices */
REGION_SOUND1 /* memory region */
@@ -1588,7 +1588,7 @@ static struct namco_interface namco_interface =
* the signal is 1V, or 25%. The relative volume between
* 52xx & 54xx is the same.
*/
-static struct namco_52xx_interface namco_52xx_interface =
+static const struct namco_52xx_interface namco_52xx_interface =
{
REGION_SOUND2, /* memory region */
4000, /* Playback frequency - from 555 timer 6M */
diff --git a/src/mame/drivers/galaxian.c b/src/mame/drivers/galaxian.c
index 4c901c284fd..52a6bc4dca6 100644
--- a/src/mame/drivers/galaxian.c
+++ b/src/mame/drivers/galaxian.c
@@ -4236,12 +4236,12 @@ static GFXDECODE_START( _4in1 )
GFXDECODE_ENTRY( REGION_GFX1, 0x4000, _4in1_spritelayout, 0, 8 )
GFXDECODE_END
-static struct AY8910interface checkmaj_ay8910_interface =
+static const struct AY8910interface checkmaj_ay8910_interface =
{
soundlatch_r
};
-static struct AY8910interface bongo_ay8910_interface =
+static const struct AY8910interface bongo_ay8910_interface =
{
input_port_3_r
};
diff --git a/src/mame/drivers/galpani3.c b/src/mame/drivers/galpani3.c
index 567b88fa024..27ef6635508 100644
--- a/src/mame/drivers/galpani3.c
+++ b/src/mame/drivers/galpani3.c
@@ -363,7 +363,7 @@ static ADDRESS_MAP_START( galpani3_map, ADDRESS_SPACE_PROGRAM, 16 )
ADDRESS_MAP_END
-static struct YMZ280Binterface ymz280b_intf =
+static const struct YMZ280Binterface ymz280b_intf =
{
REGION_SOUND1,
0 // irq ?
diff --git a/src/mame/drivers/galspnbl.c b/src/mame/drivers/galspnbl.c
index 2251208b46a..a575454b157 100644
--- a/src/mame/drivers/galspnbl.c
+++ b/src/mame/drivers/galspnbl.c
@@ -289,7 +289,7 @@ static void irqhandler(int linestate)
cpunum_set_input_line(1,0,linestate);
}
-static struct YM3812interface ym3812_interface =
+static const struct YM3812interface ym3812_interface =
{
irqhandler
};
diff --git a/src/mame/drivers/gamecstl.c b/src/mame/drivers/gamecstl.c
index 33acae10e12..19c1688c149 100644
--- a/src/mame/drivers/gamecstl.c
+++ b/src/mame/drivers/gamecstl.c
@@ -474,13 +474,13 @@ static MACHINE_DRIVER_START(gamecstl)
MACHINE_DRIVER_END
-static struct pci_device_info intel82439tx =
+static const struct pci_device_info intel82439tx =
{
intel82439tx_pci_r,
intel82439tx_pci_w
};
-static struct pci_device_info intel82371ab =
+static const struct pci_device_info intel82371ab =
{
intel82371ab_pci_r,
intel82371ab_pci_w
@@ -501,12 +501,12 @@ static void ide_interrupt(int state)
pic8259_set_irq_line(1, 6, state);
}
-static struct kbdc8042_interface at8042 =
+static const struct kbdc8042_interface at8042 =
{
KBDC8042_AT386, set_gate_a20, keyboard_interrupt
};
-static struct ide_interface ide_intf =
+static const struct ide_interface ide_intf =
{
ide_interrupt
};
diff --git a/src/mame/drivers/gameplan.c b/src/mame/drivers/gameplan.c
index bce79ce97e2..0bfb5bec2de 100644
--- a/src/mame/drivers/gameplan.c
+++ b/src/mame/drivers/gameplan.c
@@ -285,7 +285,7 @@ static void via_irq(int state)
}
-static struct via6522_interface gameplan_via_0_interface =
+static const struct via6522_interface gameplan_via_0_interface =
{
0, 0, /*inputs : A/B */
/*vblank*/0, 0, 0, 0, /*inputs : CA/B1,CA/B2 */
@@ -295,7 +295,7 @@ static struct via6522_interface gameplan_via_0_interface =
};
-static struct via6522_interface leprechn_via_0_interface =
+static const struct via6522_interface leprechn_via_0_interface =
{
0, 0, /*inputs : A/B */
/*vblank*/0, 0, 0, 0, /*inputs : CA/B1,CA/B2 */
@@ -365,7 +365,7 @@ static WRITE8_HANDLER( coin_w )
}
-static struct via6522_interface via_1_interface =
+static const struct via6522_interface via_1_interface =
{
io_port_r, 0, /*inputs : A/B */
0, 0, 0, 0, /*inputs : CA/B1,CA/B2 */
@@ -406,7 +406,7 @@ static WRITE8_HANDLER( sound_trigger_w )
}
-static struct via6522_interface via_2_interface =
+static const struct via6522_interface via_2_interface =
{
0, soundlatch2_r, /*inputs : A/B */
0, 0, 0, 0, /*inputs : CA/B1,CA/B2 */
@@ -1395,7 +1395,7 @@ INPUT_PORTS_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
input_port_6_r,
input_port_7_r,
diff --git a/src/mame/drivers/gaplus.c b/src/mame/drivers/gaplus.c
index ebc845aa78b..2382e4e7cb7 100644
--- a/src/mame/drivers/gaplus.c
+++ b/src/mame/drivers/gaplus.c
@@ -200,18 +200,18 @@ static WRITE8_HANDLER( out_lamps1 )
}
/* chip #0: player inputs, buttons, coins */
-static struct namcoio_interface intf0 =
+static const struct namcoio_interface intf0 =
{
{ in1_h, in0_l, in0_h, in1_l }, /* port read handlers */
{ NULL, NULL } /* port write handlers */
};
-static struct namcoio_interface intf0_lamps =
+static const struct namcoio_interface intf0_lamps =
{
{ in1_h, in0_l, in0_h, in1_l }, /* port read handlers */
{ out_lamps0, out_lamps1 } /* port write handlers */
};
/* chip #1: dip switches */
-static struct namcoio_interface intf1 =
+static const struct namcoio_interface intf1 =
{
{ dipA_h, dipB_l, dipB_h, dipA_l }, /* port read handlers */
{ NULL, NULL } /* port write handlers */
@@ -731,7 +731,7 @@ static GFXDECODE_START( gaplus )
GFXDECODE_ENTRY( REGION_GFX2, 0x0000, spritelayout, 64*4, 64 )
GFXDECODE_END
-static struct namco_interface namco_interface =
+static const struct namco_interface namco_interface =
{
8, /* number of voices */
REGION_SOUND1 /* memory region */
diff --git a/src/mame/drivers/gbusters.c b/src/mame/drivers/gbusters.c
index d3f3d061cda..5cb1584e5a3 100644
--- a/src/mame/drivers/gbusters.c
+++ b/src/mame/drivers/gbusters.c
@@ -287,7 +287,7 @@ static void volume_callback(int v)
K007232_set_volume(0,1,0,(v & 0x0f) * 0x11);
}
-static struct K007232_interface k007232_interface =
+static const struct K007232_interface k007232_interface =
{
REGION_SOUND1, /* memory regions */
volume_callback /* external port callback */
diff --git a/src/mame/drivers/gcpinbal.c b/src/mame/drivers/gcpinbal.c
index 96327204b8f..7ff3ad688ed 100644
--- a/src/mame/drivers/gcpinbal.c
+++ b/src/mame/drivers/gcpinbal.c
@@ -366,7 +366,7 @@ GFXDECODE_END
(SOUND)
**************************************************************/
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
NULL, /* VCK function */
MSM5205_S48_4B /* 8 kHz */
diff --git a/src/mame/drivers/gijoe.c b/src/mame/drivers/gijoe.c
index ede39d44fd7..dafc2b962de 100644
--- a/src/mame/drivers/gijoe.c
+++ b/src/mame/drivers/gijoe.c
@@ -331,7 +331,7 @@ static INPUT_PORTS_START( gijoe )
PORT_DIPUNUSED( 0x8000, IP_ACTIVE_LOW )
INPUT_PORTS_END
-static struct K054539interface k054539_interface =
+static const struct K054539interface k054539_interface =
{
REGION_SOUND1,
NULL,
diff --git a/src/mame/drivers/ginganin.c b/src/mame/drivers/ginganin.c
index 9f58fa20e51..8142e1b2638 100644
--- a/src/mame/drivers/ginganin.c
+++ b/src/mame/drivers/ginganin.c
@@ -339,7 +339,7 @@ static INTERRUPT_GEN( ginganin_sound_interrupt )
/* The Y8950 is basically a YM3526 with ADPCM built in */
-static struct Y8950interface y8950_interface =
+static const struct Y8950interface y8950_interface =
{
0,
REGION_SOUND1 /* ROM region */
diff --git a/src/mame/drivers/gladiatr.c b/src/mame/drivers/gladiatr.c
index a6d4729cf0c..2305997972f 100644
--- a/src/mame/drivers/gladiatr.c
+++ b/src/mame/drivers/gladiatr.c
@@ -256,7 +256,7 @@ static READ8_HANDLER( gladiator_button3_r )
return 0;
}
-static struct TAITO8741interface gsword_8741interface=
+static const struct TAITO8741interface gsword_8741interface=
{
4, /* 4 chips */
{TAITO8741_MASTER,TAITO8741_SLAVE,TAITO8741_PORT,TAITO8741_PORT},/* program mode */
@@ -653,13 +653,13 @@ static READ8_HANDLER(f1_r)
return mame_rand(Machine);
}
-static struct YM2203interface ppking_ym2203_interface =
+static const struct YM2203interface ppking_ym2203_interface =
{
f1_r,
f1_r
};
-static struct YM2203interface gladiatr_ym2203_interface =
+static const struct YM2203interface gladiatr_ym2203_interface =
{
0,
gladiator_dsw3_r, /* port B read */
@@ -668,7 +668,7 @@ static struct YM2203interface gladiatr_ym2203_interface =
gladiator_ym_irq /* NMI request for 2nd cpu */
};
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
0, /* interrupt function */
MSM5205_SEX_4B /* vclk input mode */
diff --git a/src/mame/drivers/goal92.c b/src/mame/drivers/goal92.c
index 4e28ef31097..6ccc5f335f4 100644
--- a/src/mame/drivers/goal92.c
+++ b/src/mame/drivers/goal92.c
@@ -237,7 +237,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(1, INPUT_LINE_NMI, irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,
0,
@@ -258,7 +258,7 @@ static void goal92_adpcm_int(int data)
cpunum_set_input_line(1, INPUT_LINE_NMI, PULSE_LINE);
}
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
goal92_adpcm_int, /* interrupt function */
MSM5205_S96_4B /* 4KHz 4-bit */
diff --git a/src/mame/drivers/goldstar.c b/src/mame/drivers/goldstar.c
index c869afd1e73..d4cddc63f24 100644
--- a/src/mame/drivers/goldstar.c
+++ b/src/mame/drivers/goldstar.c
@@ -50,7 +50,7 @@ static WRITE8_HANDLER( protection_w )
static READ8_HANDLER( protection_r )
{
- static int data[4] = { 0x47, 0x4f, 0x4c, 0x44 };
+ static const int data[4] = { 0x47, 0x4f, 0x4c, 0x44 };
dataoffset %= 4;
return data[dataoffset++];
@@ -277,7 +277,7 @@ GFXDECODE_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
input_port_7_r, /* DSW 4 */
input_port_6_r, /* DSW 3 */
diff --git a/src/mame/drivers/gomoku.c b/src/mame/drivers/gomoku.c
index 90810432ec0..3dd82c425b7 100644
--- a/src/mame/drivers/gomoku.c
+++ b/src/mame/drivers/gomoku.c
@@ -160,7 +160,7 @@ static GFXDECODE_START( gomoku )
GFXDECODE_END
-static struct CustomSound_interface custom_interface =
+static const struct CustomSound_interface custom_interface =
{
gomoku_sh_start
};
diff --git a/src/mame/drivers/gotcha.c b/src/mame/drivers/gotcha.c
index e3d52f7c434..009a32a6ab0 100644
--- a/src/mame/drivers/gotcha.c
+++ b/src/mame/drivers/gotcha.c
@@ -264,7 +264,7 @@ static void irqhandler(int linestate)
cpunum_set_input_line(1,0,linestate);
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
irqhandler
};
diff --git a/src/mame/drivers/gottlieb.c b/src/mame/drivers/gottlieb.c
index ca9a867e471..b5a29e568ab 100644
--- a/src/mame/drivers/gottlieb.c
+++ b/src/mame/drivers/gottlieb.c
@@ -1523,7 +1523,7 @@ static const struct Samplesinterface reactor_samples_interface =
#define gottlieb_samples_interface qbert_samples_interface /* not used */
#define krull_samples_interface qbert_samples_interface /* not used */
-static struct sp0250_interface sp0250_interface =
+static const struct sp0250_interface sp0250_interface =
{
stooges_sp0250_drq
};
diff --git a/src/mame/drivers/gradius3.c b/src/mame/drivers/gradius3.c
index 0d4f329d8ad..3e8021b79bc 100644
--- a/src/mame/drivers/gradius3.c
+++ b/src/mame/drivers/gradius3.c
@@ -325,7 +325,7 @@ static void volume_callback(int v)
K007232_set_volume(0,1,0,(v & 0x0f) * 0x11);
}
-static struct K007232_interface k007232_interface =
+static const struct K007232_interface k007232_interface =
{
REGION_SOUND1, /* memory regions */
volume_callback /* external port callback */
diff --git a/src/mame/drivers/grchamp.c b/src/mame/drivers/grchamp.c
index e1442b2e146..52598fa751e 100644
--- a/src/mame/drivers/grchamp.c
+++ b/src/mame/drivers/grchamp.c
@@ -451,7 +451,7 @@ static WRITE8_HANDLER( grchamp_portB_2_w )
*
*************************************/
-static struct AY8910interface ay8910_interface_1 =
+static const struct AY8910interface ay8910_interface_1 =
{
0,
0,
@@ -459,7 +459,7 @@ static struct AY8910interface ay8910_interface_1 =
grchamp_portB_0_w
};
-static struct AY8910interface ay8910_interface_3 =
+static const struct AY8910interface ay8910_interface_3 =
{
0,
0,
diff --git a/src/mame/drivers/gridlee.c b/src/mame/drivers/gridlee.c
index a5485057ca1..430097c8bcd 100644
--- a/src/mame/drivers/gridlee.c
+++ b/src/mame/drivers/gridlee.c
@@ -402,7 +402,7 @@ INPUT_PORTS_END
*
*************************************/
-static struct CustomSound_interface custom_interface =
+static const struct CustomSound_interface custom_interface =
{
gridlee_sh_start
};
diff --git a/src/mame/drivers/groundfx.c b/src/mame/drivers/groundfx.c
index eb05cf30eeb..ca1d6fc69c5 100644
--- a/src/mame/drivers/groundfx.c
+++ b/src/mame/drivers/groundfx.c
@@ -127,7 +127,7 @@ static const UINT8 default_eeprom[128]=
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
};
-static struct EEPROM_interface groundfx_eeprom_interface =
+static const struct EEPROM_interface groundfx_eeprom_interface =
{
6, /* address bits */
16, /* data bits */
diff --git a/src/mame/drivers/gstriker.c b/src/mame/drivers/gstriker.c
index fb17f03b74b..a23e21316f9 100644
--- a/src/mame/drivers/gstriker.c
+++ b/src/mame/drivers/gstriker.c
@@ -276,7 +276,7 @@ static void gs_ym2610_irq(int irq)
cpunum_set_input_line(1, 0, CLEAR_LINE);
}
-static struct YM2610interface ym2610_interface =
+static const struct YM2610interface ym2610_interface =
{
gs_ym2610_irq,
REGION_SOUND1,
diff --git a/src/mame/drivers/gsword.c b/src/mame/drivers/gsword.c
index baadd8968fa..48dbebeabd8 100644
--- a/src/mame/drivers/gsword.c
+++ b/src/mame/drivers/gsword.c
@@ -242,7 +242,7 @@ static READ8_HANDLER( gsword_8741_3_r )
return 0;
}
-static struct TAITO8741interface gsword_8741interface=
+static const struct TAITO8741interface gsword_8741interface=
{
4, /* 4 chips */
{ TAITO8741_MASTER,TAITO8741_SLAVE,TAITO8741_PORT,TAITO8741_PORT }, /* program mode */
@@ -670,7 +670,7 @@ GFXDECODE_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
0,
0,
@@ -678,7 +678,7 @@ static struct AY8910interface ay8910_interface =
0
};
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
0, /* interrupt function */
MSM5205_SEX_4B /* vclk input mode */
diff --git a/src/mame/drivers/gticlub.c b/src/mame/drivers/gticlub.c
index 80e5ec27eaf..cfff27152c2 100644
--- a/src/mame/drivers/gticlub.c
+++ b/src/mame/drivers/gticlub.c
@@ -728,17 +728,17 @@ static INTERRUPT_GEN( gticlub_vblank )
}
-static ppc_config gticlub_ppc_cfg =
+static const ppc_config gticlub_ppc_cfg =
{
PPC_MODEL_403GA
};
-static sharc_config sharc_cfg =
+static const sharc_config sharc_cfg =
{
BOOT_MODE_EPROM
};
-static struct RF5C400interface rf5c400_interface =
+static const struct RF5C400interface rf5c400_interface =
{
REGION_SOUND1
};
diff --git a/src/mame/drivers/gunbustr.c b/src/mame/drivers/gunbustr.c
index e001e2f239a..45de5f4f502 100644
--- a/src/mame/drivers/gunbustr.c
+++ b/src/mame/drivers/gunbustr.c
@@ -347,7 +347,7 @@ static const UINT8 default_eeprom[128]={
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
};
-static struct EEPROM_interface gunbustr_eeprom_interface =
+static const struct EEPROM_interface gunbustr_eeprom_interface =
{
6, /* address bits */
16, /* data bits */
diff --git a/src/mame/drivers/gyruss.c b/src/mame/drivers/gyruss.c
index c5b0d635dc6..6869dfe2570 100644
--- a/src/mame/drivers/gyruss.c
+++ b/src/mame/drivers/gyruss.c
@@ -338,7 +338,7 @@ GFXDECODE_END
-static struct AY8910interface ay8910_interface_1 =
+static const struct AY8910interface ay8910_interface_1 =
{
0,
0,
@@ -346,7 +346,7 @@ static struct AY8910interface ay8910_interface_1 =
gyruss_filter0_w
};
-static struct AY8910interface ay8910_interface_2 =
+static const struct AY8910interface ay8910_interface_2 =
{
0,
0,
@@ -354,7 +354,7 @@ static struct AY8910interface ay8910_interface_2 =
gyruss_filter1_w
};
-static struct AY8910interface ay8910_interface_3 =
+static const struct AY8910interface ay8910_interface_3 =
{
gyruss_portA_r
};
diff --git a/src/mame/drivers/halleys.c b/src/mame/drivers/halleys.c
index bc20ea3dd7b..a7dcd122804 100644
--- a/src/mame/drivers/halleys.c
+++ b/src/mame/drivers/halleys.c
@@ -287,9 +287,9 @@ static void blit(int offset)
#define XMASK (SCREEN_WIDTH-1)
#define YMASK (SCREEN_HEIGHT-1)
- static UINT8 penxlat[16]={0x03,0x07,0x0b,0x0f,0x02,0x06,0x0a,0x0e,0x01,0x05,0x09,0x0d,0x00,0x04,0x08,0x0c};
- static UINT8 rgbmask[16]={0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0xff,0xff,0xff,0xff,0xff};
- static UINT8 tyremap[ 8]={ 0, 5, 9,13,16,20,24,28};
+ static const UINT8 penxlat[16]={0x03,0x07,0x0b,0x0f,0x02,0x06,0x0a,0x0e,0x01,0x05,0x09,0x0d,0x00,0x04,0x08,0x0c};
+ static const UINT8 rgbmask[16]={0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0xff,0xff,0xff,0xff,0xff};
+ static const UINT8 tyremap[ 8]={ 0, 5, 9,13,16,20,24,28};
UINT8 *param, *src_base;
UINT16 *dst_base;
@@ -1937,7 +1937,7 @@ static MACHINE_RESET( halleys )
}
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
0,
0,
diff --git a/src/mame/drivers/hanaawas.c b/src/mame/drivers/hanaawas.c
index 8638bb8444a..4535a3badcb 100644
--- a/src/mame/drivers/hanaawas.c
+++ b/src/mame/drivers/hanaawas.c
@@ -193,7 +193,7 @@ static GFXDECODE_START( hanaawas )
GFXDECODE_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
input_port_1_r,
0,
diff --git a/src/mame/drivers/hanaroku.c b/src/mame/drivers/hanaroku.c
index 1cee838d752..dbf2e8d7e5a 100644
--- a/src/mame/drivers/hanaroku.c
+++ b/src/mame/drivers/hanaroku.c
@@ -228,7 +228,7 @@ static GFXDECODE_START( hanaroku )
GFXDECODE_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
input_port_3_r,
input_port_4_r
diff --git a/src/mame/drivers/harddriv.c b/src/mame/drivers/harddriv.c
index e3c452a32da..f0b18272d9e 100644
--- a/src/mame/drivers/harddriv.c
+++ b/src/mame/drivers/harddriv.c
@@ -190,7 +190,7 @@ void slapstic_init(int chip);
*************************************/
/* used on the medium-resolution driver boards */
-static tms34010_config gsp_config_driver =
+static const tms34010_config gsp_config_driver =
{
TRUE, /* halt on reset */
0, /* the screen operated on */
@@ -204,7 +204,7 @@ static tms34010_config gsp_config_driver =
/* used on the low-resolution multisync boards for harddrvc, racedrvc, steeltal */
-static tms34010_config gsp_config_multisync =
+static const tms34010_config gsp_config_multisync =
{
TRUE, /* halt on reset */
0, /* the screen operated on */
@@ -218,7 +218,7 @@ static tms34010_config gsp_config_multisync =
/* used on the low-resolution multisync board for stunrun */
-static tms34010_config gsp_config_multisync_stunrun =
+static const tms34010_config gsp_config_multisync_stunrun =
{
TRUE, /* halt on reset */
0, /* the screen operated on */
@@ -231,7 +231,7 @@ static tms34010_config gsp_config_multisync_stunrun =
};
-static tms34010_config msp_config =
+static const tms34010_config msp_config =
{
TRUE, /* halt on reset */
0, /* the screen operated on */
@@ -242,7 +242,7 @@ static tms34010_config msp_config =
};
-static struct dsp32_config dsp32c_config =
+static const struct dsp32_config dsp32c_config =
{
hddsk_update_pif /* a change has occurred on an output pin */
};
diff --git a/src/mame/drivers/hcastle.c b/src/mame/drivers/hcastle.c
index 25cafdf11ec..5c9222d5af0 100644
--- a/src/mame/drivers/hcastle.c
+++ b/src/mame/drivers/hcastle.c
@@ -252,13 +252,13 @@ static void volume_callback(int v)
K007232_set_volume(0,1,0,(v & 0x0f) * 0x11);
}
-static struct K007232_interface k007232_interface =
+static const struct K007232_interface k007232_interface =
{
REGION_SOUND1, /* memory regions */
volume_callback /* external port callback */
};
-static struct YM3812interface ym3812_interface =
+static const struct YM3812interface ym3812_interface =
{
irqhandler
};
diff --git a/src/mame/drivers/hexa.c b/src/mame/drivers/hexa.c
index 9a8e2461baa..3b1ec029d3b 100644
--- a/src/mame/drivers/hexa.c
+++ b/src/mame/drivers/hexa.c
@@ -121,7 +121,7 @@ GFXDECODE_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
input_port_0_r,
input_port_1_r,
diff --git a/src/mame/drivers/hnayayoi.c b/src/mame/drivers/hnayayoi.c
index 85923695311..92598c819f3 100644
--- a/src/mame/drivers/hnayayoi.c
+++ b/src/mame/drivers/hnayayoi.c
@@ -602,7 +602,7 @@ popmessage("irq");
}
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
input_port_0_r,
input_port_1_r,
@@ -611,7 +611,7 @@ static struct YM2203interface ym2203_interface =
irqhandler
};
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
0, /* IRQ handler */
MSM5205_SEX_4B
diff --git a/src/mame/drivers/hng64.c b/src/mame/drivers/hng64.c
index d5a8fc1fcfb..1bd91fb4056 100644
--- a/src/mame/drivers/hng64.c
+++ b/src/mame/drivers/hng64.c
@@ -1421,7 +1421,7 @@ static DRIVER_INIT(hng64_race)
/* ?? */
-static struct mips3_config config =
+static const struct mips3_config config =
{
16384, /* code cache size */
16384 /* data cache size */
diff --git a/src/mame/drivers/holeland.c b/src/mame/drivers/holeland.c
index e4769ebfe5d..e3282861d9d 100644
--- a/src/mame/drivers/holeland.c
+++ b/src/mame/drivers/holeland.c
@@ -280,13 +280,13 @@ GFXDECODE_END
-static struct AY8910interface ay8910_interface_1 =
+static const struct AY8910interface ay8910_interface_1 =
{
input_port_0_r,
input_port_1_r
};
-static struct AY8910interface ay8910_interface_2 =
+static const struct AY8910interface ay8910_interface_2 =
{
input_port_2_r,
input_port_3_r
diff --git a/src/mame/drivers/homedata.c b/src/mame/drivers/homedata.c
index 5bc6bbfa28c..63ce8326821 100644
--- a/src/mame/drivers/homedata.c
+++ b/src/mame/drivers/homedata.c
@@ -1299,7 +1299,7 @@ MACHINE_DRIVER_END
/**************************************************************************/
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
input_port_3_r,
input_port_4_r
diff --git a/src/mame/drivers/homerun.c b/src/mame/drivers/homerun.c
index 1a5e8bc7bb8..f6005137f85 100644
--- a/src/mame/drivers/homerun.c
+++ b/src/mame/drivers/homerun.c
@@ -109,7 +109,7 @@ static ADDRESS_MAP_START( homerun_iomap, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x71, 0x71) AM_READWRITE(YM2203_read_port_0_r, YM2203_write_port_0_w)
ADDRESS_MAP_END
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
input_port_3_r,
0,
diff --git a/src/mame/drivers/hornet.c b/src/mame/drivers/hornet.c
index 64a6a89d20d..8f53173edb3 100644
--- a/src/mame/drivers/hornet.c
+++ b/src/mame/drivers/hornet.c
@@ -845,12 +845,12 @@ static INPUT_PORTS_START( sscope )
INPUT_PORTS_END
-static struct RF5C400interface rf5c400_interface =
+static const struct RF5C400interface rf5c400_interface =
{
REGION_SOUND1
};
-static ppc_config hornet_ppc_cfg =
+static const ppc_config hornet_ppc_cfg =
{
PPC_MODEL_403GA
};
diff --git a/src/mame/drivers/hotblock.c b/src/mame/drivers/hotblock.c
index cb7695cca60..a461911235a 100644
--- a/src/mame/drivers/hotblock.c
+++ b/src/mame/drivers/hotblock.c
@@ -176,7 +176,7 @@ static INTERRUPT_GEN( hotblocks_irq ) /* right? */
cpunum_set_input_line(0, INPUT_LINE_NMI, PULSE_LINE);
}
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
input_port_0_r,
input_port_1_r,
diff --git a/src/mame/drivers/hyhoo.c b/src/mame/drivers/hyhoo.c
index bfc1c27a45d..84517421796 100644
--- a/src/mame/drivers/hyhoo.c
+++ b/src/mame/drivers/hyhoo.c
@@ -255,7 +255,7 @@ static INPUT_PORTS_START( hyhoo2 )
INPUT_PORTS_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
input_port_0_r, // DIPSW-A read
input_port_1_r // DIPSW-B read
diff --git a/src/mame/drivers/hyperspt.c b/src/mame/drivers/hyperspt.c
index e09e99a2636..b2af9c08a83 100644
--- a/src/mame/drivers/hyperspt.c
+++ b/src/mame/drivers/hyperspt.c
@@ -43,7 +43,7 @@ static READ8_HANDLER( konami_IN1_r )
{
int res;
static int cheat = 0;
- static int bits[] = { 0xee, 0xff, 0xbb, 0xaa };
+ static const int bits[] = { 0xee, 0xff, 0xbb, 0xaa };
res = readinputportbytag("IN1");
@@ -450,7 +450,7 @@ GFXDECODE_END
-static struct VLM5030interface hyperspt_vlm5030_interface =
+static const struct VLM5030interface hyperspt_vlm5030_interface =
{
REGION_SOUND1, /* memory region */
0 /* memory size */
diff --git a/src/mame/drivers/hyprduel.c b/src/mame/drivers/hyprduel.c
index 05fd15afd15..d692202c901 100644
--- a/src/mame/drivers/hyprduel.c
+++ b/src/mame/drivers/hyprduel.c
@@ -713,7 +713,7 @@ static void sound_irq(int state)
cpunum_set_input_line(1, 1, HOLD_LINE);
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
sound_irq
};
diff --git a/src/mame/drivers/igs_blit.c b/src/mame/drivers/igs_blit.c
index f5e6421ded7..3f9b1fac449 100644
--- a/src/mame/drivers/igs_blit.c
+++ b/src/mame/drivers/igs_blit.c
@@ -2459,7 +2459,7 @@ static void sound_irq(int state)
// cpunum_set_input_line(0, 3, state);
}
-static struct ics2115_interface pgm_ics2115_interface = {
+static const struct ics2115_interface pgm_ics2115_interface = {
REGION_SOUND1,
sound_irq
};
diff --git a/src/mame/drivers/inufuku.c b/src/mame/drivers/inufuku.c
index e14a69491bf..dccf95d339a 100644
--- a/src/mame/drivers/inufuku.c
+++ b/src/mame/drivers/inufuku.c
@@ -381,7 +381,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(1, 0, irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2610interface ym2610_interface =
+static const struct YM2610interface ym2610_interface =
{
irqhandler,
0,
diff --git a/src/mame/drivers/irobot.c b/src/mame/drivers/irobot.c
index cf9a324756c..3bd0aa354ee 100644
--- a/src/mame/drivers/irobot.c
+++ b/src/mame/drivers/irobot.c
@@ -280,7 +280,7 @@ GFXDECODE_END
*
*************************************/
-static struct POKEYinterface pokey_interface =
+static const struct POKEYinterface pokey_interface =
{
{ 0 },
input_port_4_r
diff --git a/src/mame/drivers/ironhors.c b/src/mame/drivers/ironhors.c
index 12b0b15dd67..0cb05ede3bc 100644
--- a/src/mame/drivers/ironhors.c
+++ b/src/mame/drivers/ironhors.c
@@ -382,7 +382,7 @@ static GFXDECODE_START( farwest )
GFXDECODE_END
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,
0,
diff --git a/src/mame/drivers/itech32.c b/src/mame/drivers/itech32.c
index e4d26724236..c1e33a20471 100644
--- a/src/mame/drivers/itech32.c
+++ b/src/mame/drivers/itech32.c
@@ -640,7 +640,7 @@ static void via_irq(int state)
}
-static struct via6522_interface via_interface =
+static const struct via6522_interface via_interface =
{
/*inputs : A/B */ 0, 0,
/*inputs : CA/B1,CA/B2 */ 0, 0, 0, 0,
@@ -650,7 +650,7 @@ static struct via6522_interface via_interface =
};
-static struct via6522_interface drivedge_via_interface =
+static const struct via6522_interface drivedge_via_interface =
{
/*inputs : A/B */ 0, 0,
/*inputs : CA/B1,CA/B2 */ 0, 0, 0, 0,
@@ -1484,7 +1484,7 @@ INPUT_PORTS_END
*
*************************************/
-static struct ES5506interface es5506_interface =
+static const struct ES5506interface es5506_interface =
{
REGION_SOUND1,
REGION_SOUND2,
diff --git a/src/mame/drivers/itech8.c b/src/mame/drivers/itech8.c
index e29068d465b..e21c3736c1c 100644
--- a/src/mame/drivers/itech8.c
+++ b/src/mame/drivers/itech8.c
@@ -521,7 +521,7 @@ static const pia6821_interface pia_interface =
static void via_irq(int state);
-static struct via6522_interface via_interface =
+static const struct via6522_interface via_interface =
{
/*inputs : A/B */ 0, 0,
/*inputs : CA/B1,CA/B2 */ 0, 0, 0, 0,
@@ -1734,7 +1734,7 @@ INPUT_PORTS_END
*
*************************************/
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,
0,
@@ -1744,7 +1744,7 @@ static struct YM2203interface ym2203_interface =
};
-static struct YM3812interface ym3812_interface =
+static const struct YM3812interface ym3812_interface =
{
generate_sound_irq
};
diff --git a/src/mame/drivers/jack.c b/src/mame/drivers/jack.c
index 98158d49336..0ab899c132d 100644
--- a/src/mame/drivers/jack.c
+++ b/src/mame/drivers/jack.c
@@ -862,7 +862,7 @@ static GFXDECODE_START( joinem )
GFXDECODE_ENTRY( REGION_GFX1, 0, joinem_charlayout, 0, 32 )
GFXDECODE_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
soundlatch_r,
timer_r
diff --git a/src/mame/drivers/jailbrek.c b/src/mame/drivers/jailbrek.c
index 00ccea42d0b..64dda973b0c 100644
--- a/src/mame/drivers/jailbrek.c
+++ b/src/mame/drivers/jailbrek.c
@@ -221,7 +221,7 @@ GFXDECODE_END
-static struct VLM5030interface vlm5030_interface =
+static const struct VLM5030interface vlm5030_interface =
{
REGION_SOUND1, /* memory region of speech rom */
0 /* memory size of speech rom */
diff --git a/src/mame/drivers/jalmah.c b/src/mame/drivers/jalmah.c
index ec6961deef9..953a7588f3b 100644
--- a/src/mame/drivers/jalmah.c
+++ b/src/mame/drivers/jalmah.c
@@ -1293,7 +1293,7 @@ MCU simulations
static READ16_HANDLER( urashima_mcu_r )
{
- static int resp[] = { 0x99, 0xd8, 0x00,
+ static const int resp[] = { 0x99, 0xd8, 0x00,
0x2a, 0x6a, 0x00,
0x9c, 0xd8, 0x00,
0x2f, 0x6f, 0x00,
@@ -1444,7 +1444,7 @@ static WRITE16_HANDLER( urashima_mcu_w )
static READ16_HANDLER( daireika_mcu_r )
{
- static int resp[] = { 0x99, 0xd8, 0x00,
+ static const int resp[] = { 0x99, 0xd8, 0x00,
0x2a, 0x6a, 0x00,
0x9c, 0xd8, 0x00,
0x2f, 0x6f, 0x00,
@@ -1729,7 +1729,7 @@ static WRITE16_HANDLER( daireika_mcu_w )
static READ16_HANDLER( mjzoomin_mcu_r )
{
- static int resp[] = { 0x9c, 0xd8, 0x00,
+ static const int resp[] = { 0x9c, 0xd8, 0x00,
0x2a, 0x6a, 0x00,
0x99, 0xd8, 0x00,
0x2f, 0x6f, 0x00,
@@ -1842,7 +1842,7 @@ static WRITE16_HANDLER( mjzoomin_mcu_w )
static READ16_HANDLER( kakumei_mcu_r )
{
- static int resp[] = { 0x8a, 0xd8, 0x00,
+ static const int resp[] = { 0x8a, 0xd8, 0x00,
0x3c, 0x7c, 0x00,
0x99, 0xd8, 0x00,
0x25, 0x65, 0x00,
@@ -1863,7 +1863,7 @@ static READ16_HANDLER( kakumei_mcu_r )
static READ16_HANDLER( suchipi_mcu_r )
{
- static int resp[] = { 0x8a, 0xd8, 0x00,
+ static const int resp[] = { 0x8a, 0xd8, 0x00,
0x3c, 0x7c, 0x00,
0x99, 0xd8, 0x00,
0x25, 0x65, 0x00,
diff --git a/src/mame/drivers/jchan.c b/src/mame/drivers/jchan.c
index 0534d269ece..7f448ec33f1 100644
--- a/src/mame/drivers/jchan.c
+++ b/src/mame/drivers/jchan.c
@@ -735,7 +735,7 @@ INPUT_PORTS_END
/* sound stuff */
-static struct YMZ280Binterface ymz280b_intf =
+static const struct YMZ280Binterface ymz280b_intf =
{
REGION_SOUND1,
0 // irq ?
diff --git a/src/mame/drivers/jcross.c b/src/mame/drivers/jcross.c
index ab73a6cfc0d..d6415d90f03 100644
--- a/src/mame/drivers/jcross.c
+++ b/src/mame/drivers/jcross.c
@@ -45,7 +45,7 @@ static READ8_HANDLER(sharedram_r){ return jcr_sharedram[offset];}
static WRITE8_HANDLER(sharedram_w){ jcr_sharedram[offset]=data;}
#endif
-static struct namco_interface snkwave_interface =
+static const struct namco_interface snkwave_interface =
{
1,
-1
diff --git a/src/mame/drivers/jongkyo.c b/src/mame/drivers/jongkyo.c
index 8410ba90195..eebb1e2da59 100644
--- a/src/mame/drivers/jongkyo.c
+++ b/src/mame/drivers/jongkyo.c
@@ -580,7 +580,7 @@ static PALETTE_INIT(jongkyo)
}
}
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
keyboard1_r,
keyboard2_r,
diff --git a/src/mame/drivers/jpmimpct.c b/src/mame/drivers/jpmimpct.c
index 682e3376e61..18271a1c2f4 100644
--- a/src/mame/drivers/jpmimpct.c
+++ b/src/mame/drivers/jpmimpct.c
@@ -794,7 +794,7 @@ INPUT_PORTS_END
*
*************************************/
-static struct upd7759_interface upd7759_interface =
+static const struct upd7759_interface upd7759_interface =
{
REGION_SOUND1
};
@@ -812,7 +812,7 @@ static void jpmimpct_tms_irq(int state)
update_irqs();
}
-static tms34010_config tms_config =
+static const tms34010_config tms_config =
{
TRUE, /* halt on reset */
0, /* the screen operated on */
diff --git a/src/mame/drivers/jrpacman.c b/src/mame/drivers/jrpacman.c
index 90fd97068ca..2ae01c206bd 100644
--- a/src/mame/drivers/jrpacman.c
+++ b/src/mame/drivers/jrpacman.c
@@ -248,7 +248,7 @@ GFXDECODE_END
*
*************************************/
-static struct namco_interface namco_interface =
+static const struct namco_interface namco_interface =
{
3, /* number of voices */
REGION_SOUND1 /* memory region */
diff --git a/src/mame/drivers/junofrst.c b/src/mame/drivers/junofrst.c
index a1e84bf7b0e..07e6fcab005 100644
--- a/src/mame/drivers/junofrst.c
+++ b/src/mame/drivers/junofrst.c
@@ -331,7 +331,7 @@ INPUT_PORTS_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
junofrst_portA_r,
0,
diff --git a/src/mame/drivers/kaneko16.c b/src/mame/drivers/kaneko16.c
index 33f954f26a3..8bcaf057548 100644
--- a/src/mame/drivers/kaneko16.c
+++ b/src/mame/drivers/kaneko16.c
@@ -1756,13 +1756,13 @@ static INTERRUPT_GEN( kaneko16_interrupt )
}
}
-static struct AY8910interface ay8910_intf_dsw =
+static const struct AY8910interface ay8910_intf_dsw =
{
input_port_4_r, /* input A: DSW 1 */
input_port_5_r /* input B: DSW 2 */
};
-static struct AY8910interface ay8910_intf_eeprom =
+static const struct AY8910interface ay8910_intf_eeprom =
{
kaneko16_eeprom_r, /* inputs A: 0,EEPROM bit read */
0, /* inputs B */
diff --git a/src/mame/drivers/karnov.c b/src/mame/drivers/karnov.c
index 0a13ef25c08..ceed3d0975c 100644
--- a/src/mame/drivers/karnov.c
+++ b/src/mame/drivers/karnov.c
@@ -671,7 +671,7 @@ static void sound_irq(int linestate)
cpunum_set_input_line(1,0,linestate); /* IRQ */
}
-static struct YM3526interface ym3526_interface =
+static const struct YM3526interface ym3526_interface =
{
sound_irq
};
diff --git a/src/mame/drivers/kchamp.c b/src/mame/drivers/kchamp.c
index b7196d7e04f..f01003a9255 100644
--- a/src/mame/drivers/kchamp.c
+++ b/src/mame/drivers/kchamp.c
@@ -420,7 +420,7 @@ static void msmint( int data ) {
}
}
-static struct MSM5205interface msm_interface =
+static const struct MSM5205interface msm_interface =
{
msmint, /* interrupt function */
MSM5205_S96_4B /* 1 / 96 = 3906.25Hz playback */
diff --git a/src/mame/drivers/kingobox.c b/src/mame/drivers/kingobox.c
index fc563e6e796..f4e73dddccb 100644
--- a/src/mame/drivers/kingobox.c
+++ b/src/mame/drivers/kingobox.c
@@ -536,7 +536,7 @@ static GFXDECODE_START( rk )
GFXDECODE_ENTRY( REGION_GFX4, 0x00000, rk_bglayout, 0, 32 ) /* bg tiles */
GFXDECODE_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
soundlatch_r
};
diff --git a/src/mame/drivers/kinst.c b/src/mame/drivers/kinst.c
index 05015d96aaf..6edcf3c6a9f 100644
--- a/src/mame/drivers/kinst.c
+++ b/src/mame/drivers/kinst.c
@@ -259,7 +259,7 @@ static void ide_interrupt(int state)
}
-static struct ide_interface ide_intf =
+static const struct ide_interface ide_intf =
{
ide_interrupt
};
@@ -643,7 +643,7 @@ INPUT_PORTS_END
*
*************************************/
-static struct mips3_config config =
+static const struct mips3_config config =
{
16384, /* code cache size */
16384 /* data cache size */
diff --git a/src/mame/drivers/kinstb.c b/src/mame/drivers/kinstb.c
index a6567897f90..3252905be6a 100644
--- a/src/mame/drivers/kinstb.c
+++ b/src/mame/drivers/kinstb.c
@@ -203,7 +203,7 @@ static INPUT_PORTS_START( kinstb )
INPUT_PORTS_END
-static struct CustomSound_interface snes_sound_interface =
+static const struct CustomSound_interface snes_sound_interface =
{ snes_sh_start };
static GFXDECODE_START( kinstb )
diff --git a/src/mame/drivers/koikoi.c b/src/mame/drivers/koikoi.c
index 6fe21fd3900..8924eebd59e 100644
--- a/src/mame/drivers/koikoi.c
+++ b/src/mame/drivers/koikoi.c
@@ -238,7 +238,7 @@ static GFXDECODE_START( koikoi )
GFXDECODE_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
0, input_r,
unknown_w, 0
diff --git a/src/mame/drivers/konamigq.c b/src/mame/drivers/konamigq.c
index de16f5f8f2d..7342cb131a2 100644
--- a/src/mame/drivers/konamigq.c
+++ b/src/mame/drivers/konamigq.c
@@ -274,7 +274,7 @@ static ADDRESS_MAP_START( sndwritemem, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x580000, 0x580001) AM_WRITE(MWA16_NOP) /* ?? */
ADDRESS_MAP_END
-static struct K054539interface k054539_interface =
+static const struct K054539interface k054539_interface =
{
REGION_SOUND1
};
@@ -325,7 +325,7 @@ static void scsi_irq(void)
psx_irq_set(0x400);
}
-static SCSIConfigTable dev_table =
+static const SCSIConfigTable dev_table =
{
1, /* 1 SCSI device */
{
@@ -333,7 +333,7 @@ static SCSIConfigTable dev_table =
}
};
-static struct AM53CF96interface scsi_intf =
+static const struct AM53CF96interface scsi_intf =
{
&dev_table, /* SCSI device table */
&scsi_irq, /* command completion IRQ */
diff --git a/src/mame/drivers/konamigv.c b/src/mame/drivers/konamigv.c
index 77ea0c487c0..88e01ac121f 100644
--- a/src/mame/drivers/konamigv.c
+++ b/src/mame/drivers/konamigv.c
@@ -292,7 +292,7 @@ static void scsi_irq(void)
psx_irq_set(0x400);
}
-static SCSIConfigTable dev_table =
+static const SCSIConfigTable dev_table =
{
1, /* 1 SCSI device */
{
@@ -300,7 +300,7 @@ static SCSIConfigTable dev_table =
}
};
-static struct AM53CF96interface scsi_intf =
+static const struct AM53CF96interface scsi_intf =
{
&dev_table, /* SCSI device table */
&scsi_irq, /* command completion IRQ */
@@ -331,7 +331,7 @@ static MACHINE_RESET( konamigv )
state_save_register_global_array(btc_trackball_data);
}
-static struct PSXSPUinterface konamigv_psxspu_interface =
+static const struct PSXSPUinterface konamigv_psxspu_interface =
{
&g_p_n_psxram,
psx_irq_set,
diff --git a/src/mame/drivers/konamigx.c b/src/mame/drivers/konamigx.c
index 2dc85fef79e..8b6fd2f8ccb 100644
--- a/src/mame/drivers/konamigx.c
+++ b/src/mame/drivers/konamigx.c
@@ -1245,7 +1245,7 @@ static ADDRESS_MAP_START( gxsndmap, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x580000, 0x580001) AM_WRITENOP
ADDRESS_MAP_END
-static struct K054539interface k054539_interface =
+static const struct K054539interface k054539_interface =
{
REGION_SOUND1
};
@@ -1268,7 +1268,7 @@ static const gfx_layout bglayout_8bpp =
16*128
};
-static gfx_layout t1_charlayout6 =
+static const gfx_layout t1_charlayout6 =
{
16, 16,
RGN_FRAC(1,1),
@@ -1280,7 +1280,7 @@ static gfx_layout t1_charlayout6 =
16*16*6
};
-static gfx_layout t1_charlayout8 =
+static const gfx_layout t1_charlayout8 =
{
16, 16,
RGN_FRAC(1,1),
@@ -3476,7 +3476,7 @@ typedef struct
#define BPP6 2
#define BPP66 3
-static GXGameInfoT gameDefs[] =
+static const GXGameInfoT gameDefs[] =
{
{ "racinfrc", 11, 0, 0, BPP4 },
{ "racinfru", 11, 0, 0, BPP4 },
diff --git a/src/mame/drivers/konamim2.c b/src/mame/drivers/konamim2.c
index d679ff6b201..feabd9ad6a4 100644
--- a/src/mame/drivers/konamim2.c
+++ b/src/mame/drivers/konamim2.c
@@ -1019,7 +1019,7 @@ static INPUT_PORTS_START( m2 )
INPUT_PORTS_END
-static ppc_config ppc602_config =
+static const ppc_config ppc602_config =
{
PPC_MODEL_602,
0x20, /* Multiplier 2, Bus = 33MHz, Core = 66MHz */
diff --git a/src/mame/drivers/ksayakyu.c b/src/mame/drivers/ksayakyu.c
index cbc0d43a6c3..0933da2e682 100644
--- a/src/mame/drivers/ksayakyu.c
+++ b/src/mame/drivers/ksayakyu.c
@@ -179,7 +179,7 @@ static WRITE8_HANDLER(dummy_w)
//DAC ? communication with main cpu ?
}
-static struct AY8910interface ay8910_interface_1 =
+static const struct AY8910interface ay8910_interface_1 =
{
soundlatch_r,
0,
@@ -187,7 +187,7 @@ static struct AY8910interface ay8910_interface_1 =
dummy_w
};
-static struct AY8910interface ay8910_interface_2 =
+static const struct AY8910interface ay8910_interface_2 =
{
0,
0,
diff --git a/src/mame/drivers/ksys573.c b/src/mame/drivers/ksys573.c
index 1d11a2878da..32ee7e94f86 100644
--- a/src/mame/drivers/ksys573.c
+++ b/src/mame/drivers/ksys573.c
@@ -1316,7 +1316,7 @@ static void flash_init( void )
int chip;
int size;
UINT8 *data;
- static struct
+ static const struct
{
int *start;
int region;
@@ -1515,7 +1515,7 @@ static MACHINE_RESET( konami573 )
flash_bank = -1;
}
-static struct PSXSPUinterface konami573_psxspu_interface =
+static const struct PSXSPUinterface konami573_psxspu_interface =
{
&g_p_n_psxram,
psx_irq_set,
@@ -1713,7 +1713,7 @@ static void gx700pwbf_output( int offset, UINT8 data )
if( gx700pwfbf_output_callback != NULL )
{
int i;
- static int shift[] = { 7, 6, 1, 0, 5, 4, 3, 2 };
+ static const int shift[] = { 7, 6, 1, 0, 5, 4, 3, 2 };
for( i = 0; i < 8; i++ )
{
int oldbit = ( gx700pwbf_output_data[ offset ] >> shift[ i ] ) & 1;
@@ -1802,7 +1802,7 @@ static struct
int bit;
} stage[ 2 ];
-static int mask[] =
+static const int mask[] =
{
0, 6, 2, 4,
0, 4, 0, 4,
@@ -2024,7 +2024,7 @@ static DRIVER_INIT( gtrfrks )
/* GX894 digital i/o */
-static UINT8 ds2401_xid[] =
+static const UINT8 ds2401_xid[] =
{
0x3d, 0xbc, 0x9a, 0x78, 0x56, 0x34, 0x12, 0x01
};
@@ -2157,7 +2157,7 @@ static void gx894pwbba_output( int offset, UINT8 data )
if( gx894pwbba_output_callback != NULL )
{
int i;
- static int shift[] = { 0, 2, 3, 1 };
+ static const int shift[] = { 0, 2, 3, 1 };
for( i = 0; i < 4; i++ )
{
int oldbit = ( gx894pwbba_output_data[ offset ] >> shift[ i ] ) & 1;
diff --git a/src/mame/drivers/kyugo.c b/src/mame/drivers/kyugo.c
index 71629f68947..6fe796db294 100644
--- a/src/mame/drivers/kyugo.c
+++ b/src/mame/drivers/kyugo.c
@@ -476,7 +476,7 @@ GFXDECODE_END
*
*************************************/
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
input_port_0_r,
input_port_1_r
diff --git a/src/mame/drivers/labyrunr.c b/src/mame/drivers/labyrunr.c
index 1b8ee0acacb..723b7acfb2f 100644
--- a/src/mame/drivers/labyrunr.c
+++ b/src/mame/drivers/labyrunr.c
@@ -221,13 +221,13 @@ GFXDECODE_END
***************************************************************************/
-static struct YM2203interface ym2203_interface_1 =
+static const struct YM2203interface ym2203_interface_1 =
{
input_port_0_r,
input_port_1_r
};
-static struct YM2203interface ym2203_interface_2 =
+static const struct YM2203interface ym2203_interface_2 =
{
0,
input_port_2_r
diff --git a/src/mame/drivers/ladyfrog.c b/src/mame/drivers/ladyfrog.c
index 531b525d2c5..83fb6d803b3 100644
--- a/src/mame/drivers/ladyfrog.c
+++ b/src/mame/drivers/ladyfrog.c
@@ -120,7 +120,7 @@ static WRITE8_HANDLER(unk_w)
}
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
0,
0,
@@ -128,7 +128,7 @@ static struct AY8910interface ay8910_interface =
unk_w
};
-static struct MSM5232interface msm5232_interface =
+static const struct MSM5232interface msm5232_interface =
{
{ 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6 }
};
diff --git a/src/mame/drivers/laserbat.c b/src/mame/drivers/laserbat.c
index 2d479c9fea1..a9d26bf81a7 100644
--- a/src/mame/drivers/laserbat.c
+++ b/src/mame/drivers/laserbat.c
@@ -651,7 +651,7 @@ static const pia6821_interface pia_0_intf =
/*irqs : A/B */ zaccaria_irq0a, zaccaria_irq0b
};
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
0,
soundlatch_r,
diff --git a/src/mame/drivers/lastduel.c b/src/mame/drivers/lastduel.c
index 2fe4a458c8c..9267862f89b 100644
--- a/src/mame/drivers/lastduel.c
+++ b/src/mame/drivers/lastduel.c
@@ -234,7 +234,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,0,0,0,irqhandler
};
diff --git a/src/mame/drivers/leland.c b/src/mame/drivers/leland.c
index 49baf152a7d..77136e3c04d 100644
--- a/src/mame/drivers/leland.c
+++ b/src/mame/drivers/leland.c
@@ -696,7 +696,7 @@ GFXDECODE_END
register.
*/
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
leland_sound_port_r,
0,
@@ -705,19 +705,19 @@ static struct AY8910interface ay8910_interface =
};
-static struct CustomSound_interface dac_custom_interface =
+static const struct CustomSound_interface dac_custom_interface =
{
leland_sh_start
};
-static struct CustomSound_interface i80186_custom_interface =
+static const struct CustomSound_interface i80186_custom_interface =
{
leland_80186_sh_start
};
-static struct CustomSound_interface redline_custom_interface =
+static const struct CustomSound_interface redline_custom_interface =
{
redline_80186_sh_start
};
diff --git a/src/mame/drivers/lemmings.c b/src/mame/drivers/lemmings.c
index 7e3804cfb7b..25f8eb97398 100644
--- a/src/mame/drivers/lemmings.c
+++ b/src/mame/drivers/lemmings.c
@@ -264,7 +264,7 @@ static void sound_irq(int state)
cpunum_set_input_line(1,0,state);
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
sound_irq
};
diff --git a/src/mame/drivers/lethal.c b/src/mame/drivers/lethal.c
index 83762a190fc..f23d882f31e 100644
--- a/src/mame/drivers/lethal.c
+++ b/src/mame/drivers/lethal.c
@@ -610,7 +610,7 @@ static INPUT_PORTS_START( lethalej )
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, -1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(2) PORT_REVERSE
INPUT_PORTS_END
-static struct K054539interface k054539_interface =
+static const struct K054539interface k054539_interface =
{
REGION_SOUND1,
NULL,
diff --git a/src/mame/drivers/lethalj.c b/src/mame/drivers/lethalj.c
index 1cdec17f885..620f7ccb2f6 100644
--- a/src/mame/drivers/lethalj.c
+++ b/src/mame/drivers/lethalj.c
@@ -469,7 +469,7 @@ INPUT_PORTS_END
*
*************************************/
-static tms34010_config tms_config =
+static const tms34010_config tms_config =
{
FALSE, /* halt on reset */
0, /* the screen operated on */
@@ -481,7 +481,7 @@ static tms34010_config tms_config =
NULL /* read from shiftreg function */
};
-static tms34010_config tms_config_lethalj =
+static const tms34010_config tms_config_lethalj =
{
FALSE, /* halt on reset */
0, /* the screen operated on */
diff --git a/src/mame/drivers/liberatr.c b/src/mame/drivers/liberatr.c
index 9d22b647c10..317e795f8a1 100644
--- a/src/mame/drivers/liberatr.c
+++ b/src/mame/drivers/liberatr.c
@@ -357,14 +357,14 @@ INPUT_PORTS_END
*
*************************************/
-static struct POKEYinterface pokey_interface_1 =
+static const struct POKEYinterface pokey_interface_1 =
{
{ 0 },
input_port_3_r
};
-static struct POKEYinterface pokey_interface_2 =
+static const struct POKEYinterface pokey_interface_2 =
{
{ 0 },
input_port_2_r
diff --git a/src/mame/drivers/limenko.c b/src/mame/drivers/limenko.c
index 73288f2aaf2..d0eaee5193a 100644
--- a/src/mame/drivers/limenko.c
+++ b/src/mame/drivers/limenko.c
@@ -453,7 +453,7 @@ INPUT_PORTS_END
*****************************************************************************************************/
-static gfx_layout tile_layout =
+static const gfx_layout tile_layout =
{
8,8,
RGN_FRAC(1,1),
diff --git a/src/mame/drivers/lkage.c b/src/mame/drivers/lkage.c
index e9350f028ef..732edd92a45 100644
--- a/src/mame/drivers/lkage.c
+++ b/src/mame/drivers/lkage.c
@@ -313,7 +313,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,
0,
diff --git a/src/mame/drivers/lockon.c b/src/mame/drivers/lockon.c
index 8d0e2a00d4c..c95e689b6b0 100644
--- a/src/mame/drivers/lockon.c
+++ b/src/mame/drivers/lockon.c
@@ -575,7 +575,7 @@ static WRITE8_HANDLER(YM2203_out_b)
set_led_status(1,!(data & 0x10)); // 'LOCK-ON' lamp
}
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
input_port_2_r,
0,
diff --git a/src/mame/drivers/looping.c b/src/mame/drivers/looping.c
index 53ebe26eeeb..4606382b250 100644
--- a/src/mame/drivers/looping.c
+++ b/src/mame/drivers/looping.c
@@ -555,12 +555,12 @@ GFXDECODE_END
*
*************************************/
-static struct TMS5220interface tms5220_interface =
+static const struct TMS5220interface tms5220_interface =
{
looping_spcint
};
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
soundlatch_r
};
diff --git a/src/mame/drivers/lordgun.c b/src/mame/drivers/lordgun.c
index 7a8d7913533..068808d66d8 100644
--- a/src/mame/drivers/lordgun.c
+++ b/src/mame/drivers/lordgun.c
@@ -429,7 +429,7 @@ static void soundirq(int state)
cpunum_set_input_line(1, 0, state);
}
-static struct YM3812interface lordgun_ym3812_interface =
+static const struct YM3812interface lordgun_ym3812_interface =
{
soundirq
};
diff --git a/src/mame/drivers/lsasquad.c b/src/mame/drivers/lsasquad.c
index 0c6fe3d6d00..eee26f49c91 100644
--- a/src/mame/drivers/lsasquad.c
+++ b/src/mame/drivers/lsasquad.c
@@ -575,7 +575,7 @@ static WRITE8_HANDLER( unk )
}
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,
0,
diff --git a/src/mame/drivers/lucky8.c b/src/mame/drivers/lucky8.c
index 8e286bc449f..41472e6a253 100644
--- a/src/mame/drivers/lucky8.c
+++ b/src/mame/drivers/lucky8.c
@@ -357,7 +357,7 @@ static GFXDECODE_START( lucky8 )
GFXDECODE_ENTRY( REGION_GFX2, 0x1000, spritelayout2, 0, 64 )
GFXDECODE_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
input_port_7_r, // DSW3
input_port_8_r, // DSW4
diff --git a/src/mame/drivers/lvcards.c b/src/mame/drivers/lvcards.c
index ca9d5358ecb..3629c8229af 100644
--- a/src/mame/drivers/lvcards.c
+++ b/src/mame/drivers/lvcards.c
@@ -461,7 +461,7 @@ GFXDECODE_END
/* Sound Interfaces */
-static struct AY8910interface lcay8910_interface =
+static const struct AY8910interface lcay8910_interface =
{
input_port_3_r, //DSW0
input_port_4_r //DSW1
diff --git a/src/mame/drivers/lwings.c b/src/mame/drivers/lwings.c
index 58364445796..fac8cccf9ef 100644
--- a/src/mame/drivers/lwings.c
+++ b/src/mame/drivers/lwings.c
@@ -844,7 +844,7 @@ static GFXDECODE_START( trojan )
GFXDECODE_ENTRY( REGION_GFX4, 0, bg2_tilelayout, 0, 8 ) /* colors 0-127 */
GFXDECODE_END
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
0, /* interrupt function */
MSM5205_SEX_4B /* slave mode */
diff --git a/src/mame/drivers/m107.c b/src/mame/drivers/m107.c
index 1d4ac5fe235..600c032a292 100644
--- a/src/mame/drivers/m107.c
+++ b/src/mame/drivers/m107.c
@@ -462,12 +462,12 @@ static void sound_irq(int state)
timer_call_after_resynch(NULL, YM2151_CLEAR,setvector_callback);
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
sound_irq
};
-static struct IremGA20_interface iremGA20_interface =
+static const struct IremGA20_interface iremGA20_interface =
{
REGION_SOUND1
};
diff --git a/src/mame/drivers/m72.c b/src/mame/drivers/m72.c
index 73c1cade25d..a2ee2e1216f 100644
--- a/src/mame/drivers/m72.c
+++ b/src/mame/drivers/m72.c
@@ -1853,7 +1853,7 @@ GFXDECODE_END
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
m72_ym2151_irq_handler
};
diff --git a/src/mame/drivers/m90.c b/src/mame/drivers/m90.c
index 4182a62e707..d116b2906dc 100644
--- a/src/mame/drivers/m90.c
+++ b/src/mame/drivers/m90.c
@@ -639,7 +639,7 @@ GFXDECODE_END
/*****************************************************************************/
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
m72_ym2151_irq_handler
};
diff --git a/src/mame/drivers/m92.c b/src/mame/drivers/m92.c
index 5d3f951fb29..d9ec7a77943 100644
--- a/src/mame/drivers/m92.c
+++ b/src/mame/drivers/m92.c
@@ -933,12 +933,12 @@ static void sound_irq(int state)
timer_call_after_resynch(NULL, YM2151_CLEAR, setvector_callback);
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
sound_irq
};
-static struct IremGA20_interface iremGA20_interface =
+static const struct IremGA20_interface iremGA20_interface =
{
REGION_SOUND1
};
diff --git a/src/mame/drivers/macrossp.c b/src/mame/drivers/macrossp.c
index 3ea484f98f0..9a888c1f0c6 100644
--- a/src/mame/drivers/macrossp.c
+++ b/src/mame/drivers/macrossp.c
@@ -519,7 +519,7 @@ static void irqhandler(int irq)
// cpunum_set_input_line(1,1,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct ES5506interface es5506_interface =
+static const struct ES5506interface es5506_interface =
{
REGION_SOUND1,
REGION_SOUND2,
diff --git a/src/mame/drivers/macs.c b/src/mame/drivers/macs.c
index cda90b068db..1576ea74039 100644
--- a/src/mame/drivers/macs.c
+++ b/src/mame/drivers/macs.c
@@ -340,7 +340,7 @@ static INPUT_PORTS_START( macs )
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
-static struct ST0016interface st0016_interface =
+static const struct ST0016interface st0016_interface =
{
&st0016_charram
};
diff --git a/src/mame/drivers/madalien.c b/src/mame/drivers/madalien.c
index b12d47eb76c..f7581183796 100644
--- a/src/mame/drivers/madalien.c
+++ b/src/mame/drivers/madalien.c
@@ -160,7 +160,7 @@ static VIDEO_START( madalien )
{
rectangle rect = { 0, 127, 0, 127 };
- static crtc6845_interface crtc6845_intf =
+ static const crtc6845_interface crtc6845_intf =
{
0, /* screen we are acting on */
PIXEL_CLOCK / 8, /* the clock of the chip */
@@ -647,7 +647,7 @@ static GFXDECODE_START( madalien )
GFXDECODE_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
NULL,
NULL,
diff --git a/src/mame/drivers/madmotor.c b/src/mame/drivers/madmotor.c
index 520126ceeb1..cf35a2951f5 100644
--- a/src/mame/drivers/madmotor.c
+++ b/src/mame/drivers/madmotor.c
@@ -276,7 +276,7 @@ static void sound_irq(int state)
cpunum_set_input_line(1,1,state); /* IRQ 2 */
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
sound_irq
};
diff --git a/src/mame/drivers/magmax.c b/src/mame/drivers/magmax.c
index 56c03da92ca..b4e00fa520a 100644
--- a/src/mame/drivers/magmax.c
+++ b/src/mame/drivers/magmax.c
@@ -350,7 +350,7 @@ static GFXDECODE_START( magmax )
GFXDECODE_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
0,
0,
diff --git a/src/mame/drivers/mainevt.c b/src/mame/drivers/mainevt.c
index 6d6b6d1bccf..5a304aa6460 100644
--- a/src/mame/drivers/mainevt.c
+++ b/src/mame/drivers/mainevt.c
@@ -691,13 +691,13 @@ static void volume_callback(int v)
K007232_set_volume(0,1,0,(v & 0x0f) * 0x11);
}
-static struct K007232_interface k007232_interface =
+static const struct K007232_interface k007232_interface =
{
REGION_SOUND1, /* memory regions */
volume_callback /* external port callback */
};
-static struct upd7759_interface upd7759_interface =
+static const struct upd7759_interface upd7759_interface =
{
REGION_SOUND2, /* memory region */
0
diff --git a/src/mame/drivers/mainsnk.c b/src/mame/drivers/mainsnk.c
index 99a2ac2d16f..07d4c046bbd 100644
--- a/src/mame/drivers/mainsnk.c
+++ b/src/mame/drivers/mainsnk.c
@@ -358,7 +358,7 @@ static const gfx_layout sprite_layout =
256
};
-static struct namco_interface snkwave_interface =
+static const struct namco_interface snkwave_interface =
{
1,
-1
diff --git a/src/mame/drivers/mappy.c b/src/mame/drivers/mappy.c
index faf81a41af9..4e4c75312da 100644
--- a/src/mame/drivers/mappy.c
+++ b/src/mame/drivers/mappy.c
@@ -626,23 +626,23 @@ static WRITE8_HANDLER( out_lamps )
}
/* chip #0: player inputs, buttons, coins */
-static struct namcoio_interface intf0 =
+static const struct namcoio_interface intf0 =
{
{ in1_h, in0_l, in0_h, in1_l }, /* port read handlers */
{ NULL, NULL } /* port write handlers */
};
-static struct namcoio_interface intf0_lamps =
+static const struct namcoio_interface intf0_lamps =
{
{ in1_h, in0_l, in0_h, in1_l }, /* port read handlers */
{ out_lamps, NULL } /* port write handlers */
};
/* chip #1: dip switches, test/cocktail, optional buttons */
-static struct namcoio_interface intf1 =
+static const struct namcoio_interface intf1 =
{
{ dipB_mux, dipA_l, dipA_h, in2 }, /* port read handlers */
{ out_mux, NULL } /* port write handlers */
};
-static struct namcoio_interface intf1_interleave =
+static const struct namcoio_interface intf1_interleave =
{
{ dipB_muxi, dipA_l, dipA_h, in2 }, /* port read handlers */
{ out_mux, NULL } /* port write handlers */
@@ -1559,7 +1559,7 @@ GFXDECODE_END
-static struct namco_interface namco_interface =
+static const struct namco_interface namco_interface =
{
8, /* number of voices */
REGION_SOUND1 /* memory region */
diff --git a/src/mame/drivers/mario.c b/src/mame/drivers/mario.c
index 98369031a61..0a0a6c29999 100644
--- a/src/mame/drivers/mario.c
+++ b/src/mame/drivers/mario.c
@@ -377,7 +377,7 @@ static const struct Samplesinterface samples_interface =
mario_sample_names
};
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
soundlatch_r
};
diff --git a/src/mame/drivers/marvins.c b/src/mame/drivers/marvins.c
index 49439d4cc68..cad05d0b46e 100644
--- a/src/mame/drivers/marvins.c
+++ b/src/mame/drivers/marvins.c
@@ -94,7 +94,7 @@ extern WRITE8_HANDLER( snkwave_w );
static int sound_cpu_busy;
-static struct namco_interface snkwave_interface =
+static const struct namco_interface snkwave_interface =
{
1, /* number of voices */
-1 /* memory region */
diff --git a/src/mame/drivers/mastboy.c b/src/mame/drivers/mastboy.c
index 581c98f38bd..43421e313db 100644
--- a/src/mame/drivers/mastboy.c
+++ b/src/mame/drivers/mastboy.c
@@ -644,7 +644,7 @@ static void mastboy_adpcm_int(int data)
}
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
mastboy_adpcm_int, /* interrupt function */
MSM5205_SEX_4B /* 4KHz 4-bit */
diff --git a/src/mame/drivers/matmania.c b/src/mame/drivers/matmania.c
index db2a4a81ae0..6b780c6eb70 100644
--- a/src/mame/drivers/matmania.c
+++ b/src/mame/drivers/matmania.c
@@ -383,7 +383,7 @@ static void irqhandler(int linestate)
cpunum_set_input_line(1,1,linestate);
}
-static struct YM3526interface ym3526_interface =
+static const struct YM3526interface ym3526_interface =
{
irqhandler
};
diff --git a/src/mame/drivers/maxaflex.c b/src/mame/drivers/maxaflex.c
index fa25f608fe8..841f2c26775 100644
--- a/src/mame/drivers/maxaflex.c
+++ b/src/mame/drivers/maxaflex.c
@@ -422,7 +422,7 @@ static PALETTE_INIT( atari )
}
-static struct POKEYinterface pokey_interface = {
+static const struct POKEYinterface pokey_interface = {
{ 0 },
0,
0,0,
diff --git a/src/mame/drivers/mayumi.c b/src/mame/drivers/mayumi.c
index a2a9c530b4a..0a25d0de7c1 100644
--- a/src/mame/drivers/mayumi.c
+++ b/src/mame/drivers/mayumi.c
@@ -261,7 +261,7 @@ static GFXDECODE_START( mayumi )
GFXDECODE_ENTRY( REGION_GFX1, 0x00000, charlayout, 0, 32 )
GFXDECODE_END
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
input_port_0_r,
input_port_1_r
diff --git a/src/mame/drivers/mazerbla.c b/src/mame/drivers/mazerbla.c
index 1ffa98bddbd..6c7df0498a9 100644
--- a/src/mame/drivers/mazerbla.c
+++ b/src/mame/drivers/mazerbla.c
@@ -1468,13 +1468,13 @@ static MACHINE_RESET( greatgun )
/* only Great Guns */
-static struct AY8910interface ay8912_interface_1 =
+static const struct AY8910interface ay8912_interface_1 =
{
0,
soundcommand_r
};
-static struct AY8910interface ay8912_interface_2 =
+static const struct AY8910interface ay8912_interface_2 =
{
0,
0,
diff --git a/src/mame/drivers/mcatadv.c b/src/mame/drivers/mcatadv.c
index 864916ffa6c..ca5b51f218a 100644
--- a/src/mame/drivers/mcatadv.c
+++ b/src/mame/drivers/mcatadv.c
@@ -481,7 +481,7 @@ static void sound_irq( int irq )
{
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2610interface mcatadv_ym2610_interface =
+static const struct YM2610interface mcatadv_ym2610_interface =
{
sound_irq, /* irq */
REGION_SOUND1, /* delta_t */
diff --git a/src/mame/drivers/mcr3.c b/src/mame/drivers/mcr3.c
index 86ec5b2eb6d..e04eabb825c 100644
--- a/src/mame/drivers/mcr3.c
+++ b/src/mame/drivers/mcr3.c
@@ -206,7 +206,7 @@ static WRITE8_HANDLER( maxrpm_op5_w )
static WRITE8_HANDLER( maxrpm_op6_w )
{
- static const char *inputs[] = { "MONO.IP1", "MONO.IP1.ALT1", "MONO.IP1.ALT2", "MONO.IP1.ALT3" };
+ static const char *const inputs[] = { "MONO.IP1", "MONO.IP1.ALT1", "MONO.IP1.ALT2", "MONO.IP1.ALT3" };
/*
Reflective Sensor Control:
@@ -388,7 +388,7 @@ static WRITE8_HANDLER( spyhunt_op4_w )
/* bit 5 = STR1 (J1-13) */
if (((last_op4 ^ data) & 0x20) && !(data & 0x20))
{
- static const char *lampname[8] =
+ static const char *const lampname[8] =
{
"lamp0", "lamp1", "lamp2", "lamp3",
"lamp4", "lamp5", "lamp6", "lamp7"
diff --git a/src/mame/drivers/meadows.c b/src/mame/drivers/meadows.c
index e58cce74ed0..864a7cfb9b3 100644
--- a/src/mame/drivers/meadows.c
+++ b/src/mame/drivers/meadows.c
@@ -805,7 +805,7 @@ ROM_END
/* A fake for the missing ball sprites #3 and #4 */
static DRIVER_INIT( gypsyjug )
{
- static UINT8 ball[16*2] =
+ static const UINT8 ball[16*2] =
{
0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00,
0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00,
diff --git a/src/mame/drivers/mediagx.c b/src/mame/drivers/mediagx.c
index d96913e9c4b..29ffef9ad7d 100644
--- a/src/mame/drivers/mediagx.c
+++ b/src/mame/drivers/mediagx.c
@@ -916,17 +916,17 @@ static void ide_interrupt(int state)
pic8259_set_irq_line(1, 6, state);
}
-static struct kbdc8042_interface at8042 =
+static const struct kbdc8042_interface at8042 =
{
KBDC8042_AT386, set_gate_a20, keyboard_interrupt
};
-static struct ide_interface ide_intf =
+static const struct ide_interface ide_intf =
{
ide_interrupt
};
-static struct pci_device_info cx5510 =
+static const struct pci_device_info cx5510 =
{
cx5510_pci_r,
cx5510_pci_w
diff --git a/src/mame/drivers/megadriv.c b/src/mame/drivers/megadriv.c
index 10a02adcb72..3fb0dd2d6a9 100644
--- a/src/mame/drivers/megadriv.c
+++ b/src/mame/drivers/megadriv.c
@@ -1148,7 +1148,7 @@ static UINT16 megadriv_vdp_ctrl_port_r(void)
(megadrive_region_pal<<0); // PAL MODE FLAG checked by striker for region prot..
}
-static UINT8 vc_ntsc_224[] =
+static const UINT8 vc_ntsc_224[] =
{
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
@@ -1169,7 +1169,7 @@ static UINT8 vc_ntsc_224[] =
0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
};
-static UINT8 vc_ntsc_240[] =
+static const UINT8 vc_ntsc_240[] =
{
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
@@ -1190,7 +1190,7 @@ static UINT8 vc_ntsc_240[] =
0x00, 0x01, 0x02, 0x03, 0x04, 0x05
};
-static UINT8 vc_pal_224[] =
+static const UINT8 vc_pal_224[] =
{
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
@@ -1214,7 +1214,7 @@ static UINT8 vc_pal_224[] =
0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
};
-static UINT8 vc_pal_240[] =
+static const UINT8 vc_pal_240[] =
{
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
diff --git a/src/mame/drivers/megasys1.c b/src/mame/drivers/megasys1.c
index e0227aed05a..622aa0a8a6e 100644
--- a/src/mame/drivers/megasys1.c
+++ b/src/mame/drivers/megasys1.c
@@ -641,7 +641,7 @@ GFXDECODE_END
/* Provided by Jim Hernandez: 3.5MHz for FM, 30KHz (!) for ADPCM */
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
megasys1_sound_irq
};
@@ -814,7 +814,7 @@ static void irq_handler(int irq)
}
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,
0,
diff --git a/src/mame/drivers/megatech.c b/src/mame/drivers/megatech.c
index eac9cdb11ea..4dad7339c19 100644
--- a/src/mame/drivers/megatech.c
+++ b/src/mame/drivers/megatech.c
@@ -1308,7 +1308,7 @@ ROM_END
/* 44 */ GAME( 1990, mt_arrow, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Arrow Flash (Mega-Tech)", GAME_NOT_WORKING )
/* 45 */ // unknown
/* 46 */ // unknown
-/* 47 */ GAME( 1990, mt_astrm, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Alien Storm (Mega-Tech", GAME_NOT_WORKING )
+/* 47 */ GAME( 1990, mt_astrm, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Alien Storm (Mega-Tech)", GAME_NOT_WORKING )
/* 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
diff --git a/src/mame/drivers/megazone.c b/src/mame/drivers/megazone.c
index f3181eca2d7..298a0a64ccf 100644
--- a/src/mame/drivers/megazone.c
+++ b/src/mame/drivers/megazone.c
@@ -315,7 +315,7 @@ GFXDECODE_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
megazone_portA_r,
0,
diff --git a/src/mame/drivers/meijinsn.c b/src/mame/drivers/meijinsn.c
index b18ab8799e1..392e35505fa 100644
--- a/src/mame/drivers/meijinsn.c
+++ b/src/mame/drivers/meijinsn.c
@@ -74,8 +74,8 @@ static WRITE16_HANDLER( sound_w )
static READ16_HANDLER( alpha_mcu_r )
{
static unsigned coinvalue=0;
- static UINT8 coinage1[2][2]={{1,1},{1,2}};
- static UINT8 coinage2[2][2]={{1,5},{2,1}};
+ static const UINT8 coinage1[2][2]={{1,1},{1,2}};
+ static const UINT8 coinage2[2][2]={{1,5},{2,1}};
static int latch;
int source=shared_ram[offset];
@@ -288,7 +288,7 @@ static INTERRUPT_GEN( meijinsn_interrupt )
cpunum_set_input_line(0, 2, HOLD_LINE);
}
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
soundlatch_r
};
diff --git a/src/mame/drivers/merit.c b/src/mame/drivers/merit.c
index 4ae1eb0ed97..6a629349cdc 100644
--- a/src/mame/drivers/merit.c
+++ b/src/mame/drivers/merit.c
@@ -780,7 +780,7 @@ static const ppi8255_interface ppi8255_intf =
{ NULL, misc_w }, /* Port C write */
};
-static struct AY8910interface merit_ay8912_interface =
+static const struct AY8910interface merit_ay8912_interface =
{
0,0,
led2_w,0
diff --git a/src/mame/drivers/metlclsh.c b/src/mame/drivers/metlclsh.c
index d7a6212c284..b20473a8788 100644
--- a/src/mame/drivers/metlclsh.c
+++ b/src/mame/drivers/metlclsh.c
@@ -291,7 +291,7 @@ static void metlclsh_irqhandler(int linestate)
cpunum_set_input_line(0,M6809_IRQ_LINE,linestate);
}
-static struct YM3526interface ym3526_interface =
+static const struct YM3526interface ym3526_interface =
{
metlclsh_irqhandler
};
diff --git a/src/mame/drivers/metro.c b/src/mame/drivers/metro.c
index e709c3ae435..44e45fc88d3 100644
--- a/src/mame/drivers/metro.c
+++ b/src/mame/drivers/metro.c
@@ -517,7 +517,7 @@ static void metro_sound_irq_handler(int state)
cpunum_set_input_line(1, UPD7810_INTF2, state ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
metro_sound_irq_handler /* irq handler */
};
@@ -555,7 +555,7 @@ static WRITE16_HANDLER( ymf278b_w )
}
-static struct YMF278B_interface ymf278b_interface =
+static const struct YMF278B_interface ymf278b_interface =
{
REGION_SOUND1,
ymf278b_interrupt
@@ -1942,7 +1942,7 @@ static void blzntrnd_irqhandler(int irq)
cpunum_set_input_line(1, 0, irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2610interface blzntrnd_ym2610_interface =
+static const struct YM2610interface blzntrnd_ym2610_interface =
{
blzntrnd_irqhandler,
REGION_SOUND1,
@@ -3679,7 +3679,7 @@ GFXDECODE_END
***************************************************************************/
-static UPD7810_CONFIG metro_cpu_config =
+static const UPD7810_CONFIG metro_cpu_config =
{
TYPE_7810,
metro_io_callback
diff --git a/src/mame/drivers/mexico86.c b/src/mame/drivers/mexico86.c
index dc7625d9456..f379b43fcb7 100644
--- a/src/mame/drivers/mexico86.c
+++ b/src/mame/drivers/mexico86.c
@@ -369,7 +369,7 @@ GFXDECODE_END
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
input_port_3_r,
input_port_4_r
diff --git a/src/mame/drivers/mhavoc.c b/src/mame/drivers/mhavoc.c
index f1a4f6dcb9b..e0a5156319f 100644
--- a/src/mame/drivers/mhavoc.c
+++ b/src/mame/drivers/mhavoc.c
@@ -502,7 +502,7 @@ INPUT_PORTS_END
*
*************************************/
-static struct POKEYinterface pokey_interface =
+static const struct POKEYinterface pokey_interface =
{
{ 0 },
input_port_3_r
diff --git a/src/mame/drivers/micro3d.c b/src/mame/drivers/micro3d.c
index ca32d16644e..a03db9b7913 100644
--- a/src/mame/drivers/micro3d.c
+++ b/src/mame/drivers/micro3d.c
@@ -840,12 +840,12 @@ ADDRESS_MAP_END
-static struct upd7759_interface upd7759_interface =
+static const struct upd7759_interface upd7759_interface =
{
REGION_SOUND1
};
-static tms34010_config vgb_config =
+static const tms34010_config vgb_config =
{
FALSE, /* halt on reset ????? - check this */
0, /* the screen operated on */
diff --git a/src/mame/drivers/midas.c b/src/mame/drivers/midas.c
index f2cae93cc8b..19337d71ece 100644
--- a/src/mame/drivers/midas.c
+++ b/src/mame/drivers/midas.c
@@ -429,7 +429,7 @@ static void livequiz_irqhandler (int state)
logerror("YMZ280 is generating an interrupt. State=%08x\n",state);
}
-static struct YMZ280Binterface ymz280b_interface =
+static const struct YMZ280Binterface ymz280b_interface =
{
REGION_SOUND1,
livequiz_irqhandler
diff --git a/src/mame/drivers/midtunit.c b/src/mame/drivers/midtunit.c
index c5eb7e2ed8a..d6c630b95c3 100644
--- a/src/mame/drivers/midtunit.c
+++ b/src/mame/drivers/midtunit.c
@@ -580,7 +580,7 @@ INPUT_PORTS_END
*
*************************************/
-static tms34010_config tms_config =
+static const tms34010_config tms_config =
{
FALSE, /* halt on reset */
0, /* the screen operated on */
diff --git a/src/mame/drivers/midvunit.c b/src/mame/drivers/midvunit.c
index 3439b5810d4..c60b5d3a83b 100644
--- a/src/mame/drivers/midvunit.c
+++ b/src/mame/drivers/midvunit.c
@@ -337,7 +337,7 @@ static WRITE32_HANDLER( crusnwld_serial_data_w )
/* values from offset 3, 6, and 10 must add up to 0x904752a2 */
static UINT16 bit_index;
-static UINT32 bit_data[0x10] =
+static const UINT32 bit_data[0x10] =
{
0x3017c636,0x3017c636,0x3017c636,0x3017c636,
0x3017c636,0x3017c636,0x3017c636,0x3017c636,
@@ -503,7 +503,7 @@ static ADDRESS_MAP_START( midvunit_map, ADDRESS_SPACE_PROGRAM, 32 )
ADDRESS_MAP_END
-static struct tms32031_config midvplus_config = { 0, NULL, midvplus_xf1_w };
+static const struct tms32031_config midvplus_config = { 0, NULL, midvplus_xf1_w };
static ADDRESS_MAP_START( midvplus_map, ADDRESS_SPACE_PROGRAM, 32 )
AM_RANGE(0x000000, 0x01ffff) AM_RAM AM_BASE(&ram_base)
@@ -1388,7 +1388,7 @@ static DRIVER_INIT( offroadc )
}
-static struct ide_interface ide_intf =
+static const struct ide_interface ide_intf =
{
0
};
diff --git a/src/mame/drivers/midwunit.c b/src/mame/drivers/midwunit.c
index acbb1a3baf9..19e468691fc 100644
--- a/src/mame/drivers/midwunit.c
+++ b/src/mame/drivers/midwunit.c
@@ -611,7 +611,7 @@ INPUT_PORTS_END
*
*************************************/
-static tms34010_config tms_config =
+static const tms34010_config tms_config =
{
FALSE, /* halt on reset */
0, /* the screen operated on */
diff --git a/src/mame/drivers/midxunit.c b/src/mame/drivers/midxunit.c
index 8defa400216..34e233f5dc1 100644
--- a/src/mame/drivers/midxunit.c
+++ b/src/mame/drivers/midxunit.c
@@ -169,7 +169,7 @@ INPUT_PORTS_END
*
*************************************/
-static tms34010_config tms_config =
+static const tms34010_config tms_config =
{
FALSE, /* halt on reset */
0, /* the screen operated on */
diff --git a/src/mame/drivers/midyunit.c b/src/mame/drivers/midyunit.c
index 4c39858a649..e810b4a7c84 100644
--- a/src/mame/drivers/midyunit.c
+++ b/src/mame/drivers/midyunit.c
@@ -852,7 +852,7 @@ INPUT_PORTS_END
*
*************************************/
-static tms34010_config zunit_tms_config =
+static const tms34010_config zunit_tms_config =
{
FALSE, /* halt on reset */
0, /* the screen operated on */
@@ -864,7 +864,7 @@ static tms34010_config zunit_tms_config =
midyunit_from_shiftreg /* read from shiftreg function */
};
-static tms34010_config yunit_tms_config =
+static const tms34010_config yunit_tms_config =
{
FALSE, /* halt on reset */
0, /* the screen operated on */
diff --git a/src/mame/drivers/midzeus.c b/src/mame/drivers/midzeus.c
index 807c290bfdb..0ee6d1f89f6 100644
--- a/src/mame/drivers/midzeus.c
+++ b/src/mame/drivers/midzeus.c
@@ -25,6 +25,14 @@
#define CPU_CLOCK 60000000
+#define BEAM_DY 3
+#define BEAM_DX 3
+#define BEAM_XOFFS 20 /* table in the code indicates an offset of 20 with a beam height of 7 */
+
+static UINT32 gun_control;
+static UINT8 gun_irq_state;
+static emu_timer * gun_timer[2];
+static INT32 gun_x[2], gun_y[2];
static UINT32 *ram_base;
static UINT8 cmos_protected;
@@ -34,6 +42,9 @@ static emu_timer *timer[2];
static UINT32 *tms32031_control;
+static TIMER_CALLBACK( invasn_gun_callback );
+
+
/*************************************
*
@@ -49,6 +60,9 @@ static MACHINE_RESET( midzeus )
timer[0] = timer_alloc(NULL, NULL);
timer[1] = timer_alloc(NULL, NULL);
+
+ gun_timer[0] = timer_alloc(invasn_gun_callback, NULL);
+ gun_timer[1] = timer_alloc(invasn_gun_callback, NULL);
}
@@ -124,6 +138,82 @@ static WRITE32_HANDLER( tms32031_control_w )
}
+/*************************************
+ *
+ * Lightgun handling
+ *
+ *************************************/
+
+static void update_gun_irq(void)
+{
+ if (gun_irq_state & gun_control & 0x03)
+ cpunum_set_input_line(0, 3, ASSERT_LINE);
+ else
+ cpunum_set_input_line(0, 3, CLEAR_LINE);
+}
+
+
+static TIMER_CALLBACK( invasn_gun_callback )
+{
+ int player = param;
+ int beamy = video_screen_get_vpos(0);
+
+ gun_irq_state |= 0x01 << player;
+ update_gun_irq();
+
+ beamy++;
+ if (beamy <= machine->screen[0].visarea.max_y && beamy <= gun_y[player] + BEAM_DY)
+ timer_adjust(gun_timer[player], video_screen_get_time_until_pos(0, beamy, MAX(0, gun_x[player] - BEAM_DX)), player, attotime_never);
+}
+
+
+static WRITE32_HANDLER( invasn_gun_w )
+{
+ UINT32 old_control = gun_control;
+ int player;
+
+ COMBINE_DATA(&gun_control);
+
+ /* bits 0-1 enable IRQs (?) */
+ /* bits 2-3 reset IRQ states */
+ gun_irq_state &= ~((gun_control >> 2) & 3);
+ update_gun_irq();
+
+ for (player = 0; player < 2; player++)
+ {
+ UINT8 pmask = 0x04 << player;
+ if (((old_control ^ gun_control) & pmask) != 0 && (gun_control & pmask) == 0)
+ {
+ const rectangle *visarea = &Machine->screen[0].visarea;
+ static const char *names[2][2] =
+ {
+ { "GUNX1", "GUNY1" },
+ { "GUNX2", "GUNY2" }
+ };
+ gun_x[player] = readinputportbytag(names[player][0]) * (visarea->max_x + 1 - visarea->min_x) / 255 + visarea->min_x + BEAM_XOFFS;
+ gun_y[player] = readinputportbytag(names[player][1]) * (visarea->max_y + 1 - visarea->min_y) / 255 + visarea->min_y;
+ timer_adjust(gun_timer[player], video_screen_get_time_until_pos(0, MAX(0, gun_y[player] - BEAM_DY), MAX(0, gun_x[player] - BEAM_DX)), player, attotime_never);
+ }
+ }
+}
+
+static READ32_HANDLER( invasn_gun_r )
+{
+ int beamx = video_screen_get_hpos(0);
+ int beamy = video_screen_get_vpos(0);
+ UINT32 result = 0xffff;
+ int player;
+
+ for (player = 0; player < 2; player++)
+ {
+ int diffx = beamx - gun_x[player];
+ int diffy = beamy - gun_y[player];
+ if (diffx >= -BEAM_DX && diffx <= BEAM_DX && diffy >= -BEAM_DY && diffy <= BEAM_DY)
+ result ^= 0x1000 << player;
+ }
+ return result;
+}
+
/*************************************
*
@@ -155,7 +245,6 @@ static ADDRESS_MAP_START( zeus_map, ADDRESS_SPACE_PROGRAM, 32 )
AM_RANGE(0x880000, 0x8803ff) AM_READWRITE(zeus_r, zeus_w) AM_BASE(&zeusbase)
AM_RANGE(0x8d0000, 0x8d0003) AM_READWRITE(unknown_8d0000_r, unknown_8d0000_w) AM_BASE(&unknown_8d0000)
AM_RANGE(0x990000, 0x99000f) AM_READWRITE(midway_ioasic_r, midway_ioasic_w)
-//9d0000 -- page select?
AM_RANGE(0x9e0000, 0x9e0000) AM_WRITENOP // watchdog?
AM_RANGE(0x9f0000, 0x9f7fff) AM_READWRITE(cmos_r, cmos_w) AM_BASE(&generic_nvram32) AM_SIZE(&generic_nvram_size)
AM_RANGE(0x9f8000, 0x9f8000) AM_WRITE(cmos_protect_w)
@@ -171,7 +260,6 @@ static ADDRESS_MAP_START( zeus2_map, ADDRESS_SPACE_PROGRAM, 32 )
AM_RANGE(0x880000, 0x8801ff) AM_READWRITE(zeus2_r, zeus2_w) AM_BASE(&zeusbase)
AM_RANGE(0x8d0000, 0x8d0003) AM_READWRITE(unknown_8d0000_r, unknown_8d0000_w) AM_BASE(&unknown_8d0000)
AM_RANGE(0x990000, 0x99000f) AM_READWRITE(midway_ioasic_r, midway_ioasic_w)
-//9d0000 -- page select?
AM_RANGE(0x9e0000, 0x9e0000) AM_WRITENOP // watchdog?
AM_RANGE(0x9f0000, 0x9f7fff) AM_READWRITE(cmos_r, cmos_w) AM_BASE(&generic_nvram32) AM_SIZE(&generic_nvram_size)
AM_RANGE(0x9f8000, 0x9f8000) AM_WRITE(cmos_protect_w)
@@ -364,32 +452,27 @@ static INPUT_PORTS_START( invasn )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BILL1 ) /* Bill */
PORT_START
- PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_8WAY
- PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_8WAY
- PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_8WAY
- PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_8WAY
- PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
- PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
- PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
- PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_8WAY
- PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_8WAY
- PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_8WAY
- PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_8WAY
- PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
- PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
- PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
- PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x000f, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x00e0, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x0f00, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0xe000, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START
- PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1)
- PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
- PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1)
- PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2)
- PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
- PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2)
- PORT_BIT( 0xff80, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ PORT_START_TAG("GUNX1") /* fake analog X */
+ PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(10)
+
+ PORT_START_TAG("GUNY1") /* fake analog Y */
+ PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(70) PORT_KEYDELTA(10)
+
+ PORT_START_TAG("GUNX2") /* fake analog X */
+ PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_PLAYER(2)
+
+ PORT_START_TAG("GUNY2") /* fake analog Y */
+ PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(70) PORT_KEYDELTA(10) PORT_PLAYER(2)
INPUT_PORTS_END
@@ -782,15 +865,11 @@ static DRIVER_INIT( mk4 )
}
-static READ32_HANDLER( gun_r )
-{
- return ~0;
-}
static DRIVER_INIT( invasn )
{
dcs2_init(0, 0);
- midway_ioasic_init(MIDWAY_IOASIC_STANDARD, 461/* unknown */, 94, NULL);
- memory_install_read32_handler(0, ADDRESS_SPACE_PROGRAM, 0x9c0000, 0x9c0000, 0, 0, gun_r);
+ midway_ioasic_init(MIDWAY_IOASIC_STANDARD, 468/* or 488 */, 94, NULL);
+ memory_install_readwrite32_handler(0, ADDRESS_SPACE_PROGRAM, 0x9c0000, 0x9c0000, 0, 0, invasn_gun_r, invasn_gun_w);
}
@@ -816,8 +895,8 @@ static DRIVER_INIT( thegrid )
*
*************************************/
-GAME( 1997, mk4, 0, midzeus, mk4, mk4, ROT0, "Midway", "Mortal Kombat 4 (3.0)", GAME_NOT_WORKING | GAME_NO_SOUND )
-GAME( 1997, mk4a, mk4, midzeus, mk4, mk4, ROT0, "Midway", "Mortal Kombat 4 (2.1)", GAME_NOT_WORKING | GAME_NO_SOUND )
-GAME( 1999, invasn, 0, midzeus, invasn, invasn, ROT0, "Midway", "Invasion (Midway)", GAME_NOT_WORKING | GAME_NO_SOUND )
-GAME( 1999, crusnexo, 0, midzeus2, crusnexo, crusnexo, ROT0, "Midway", "Cruis'n Exotica", GAME_NOT_WORKING | GAME_NO_SOUND )
-GAME( 2001, thegrid, 0, midzeus2, thegrid, thegrid, ROT0, "Midway", "The Grid (version 1.1)", GAME_NOT_WORKING | GAME_NO_SOUND )
+GAME( 1997, mk4, 0, midzeus, mk4, mk4, ROT0, "Midway", "Mortal Kombat 4 (3.0)", GAME_IMPERFECT_GRAPHICS )
+GAME( 1997, mk4a, mk4, midzeus, mk4, mk4, ROT0, "Midway", "Mortal Kombat 4 (2.1)", GAME_IMPERFECT_GRAPHICS )
+GAME( 1999, invasn, 0, midzeus, invasn, invasn, ROT0, "Midway", "Invasion (Midway)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS )
+GAME( 1999, crusnexo, 0, midzeus2, crusnexo, crusnexo, ROT0, "Midway", "Cruis'n Exotica", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_NO_SOUND )
+GAME( 2001, thegrid, 0, midzeus2, thegrid, thegrid, ROT0, "Midway", "The Grid (version 1.1)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_NO_SOUND )
diff --git a/src/mame/drivers/mirax.c b/src/mame/drivers/mirax.c
index 47b9a16fe3e..f565eef3484 100644
--- a/src/mame/drivers/mirax.c
+++ b/src/mame/drivers/mirax.c
@@ -141,7 +141,7 @@ static ADDRESS_MAP_START( io_map, ADDRESS_SPACE_IO, 8 )
ADDRESS_MAP_END
-static gfx_layout layout16 =
+static const gfx_layout layout16 =
{
16,16,
RGN_FRAC(1,3),
@@ -154,7 +154,7 @@ static gfx_layout layout16 =
16*16
};
-static gfx_layout layout8 =
+static const gfx_layout layout8 =
{
8,8,
RGN_FRAC(1,3),
diff --git a/src/mame/drivers/missb2.c b/src/mame/drivers/missb2.c
index e055cdcee22..1a13e362a16 100644
--- a/src/mame/drivers/missb2.c
+++ b/src/mame/drivers/missb2.c
@@ -349,7 +349,7 @@ static void irqhandler(int irq)
// cpunum_set_input_line(2,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM3526interface ym3526_interface =
+static const struct YM3526interface ym3526_interface =
{
irqhandler
};
diff --git a/src/mame/drivers/missile.c b/src/mame/drivers/missile.c
index e1fe2670585..8d969877637 100644
--- a/src/mame/drivers/missile.c
+++ b/src/mame/drivers/missile.c
@@ -871,7 +871,7 @@ INPUT_PORTS_END
*
*************************************/
-static struct POKEYinterface pokey_interface =
+static const struct POKEYinterface pokey_interface =
{
{ 0 },
input_port_3_r
diff --git a/src/mame/drivers/mitchell.c b/src/mame/drivers/mitchell.c
index cb0bf50ee6c..b97c35cc33c 100644
--- a/src/mame/drivers/mitchell.c
+++ b/src/mame/drivers/mitchell.c
@@ -1422,7 +1422,7 @@ static void spangbl_adpcm_int(int data)
}
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
spangbl_adpcm_int, /* interrupt function */
MSM5205_S48_4B /* 4KHz 4-bit */
diff --git a/src/mame/drivers/mjkjidai.c b/src/mame/drivers/mjkjidai.c
index 1f1a95c3b1d..9d55ccedb11 100644
--- a/src/mame/drivers/mjkjidai.c
+++ b/src/mame/drivers/mjkjidai.c
@@ -343,7 +343,7 @@ static GFXDECODE_START( mjkjidai )
GFXDECODE_END
-static struct CustomSound_interface adpcm_interface =
+static const struct CustomSound_interface adpcm_interface =
{
mjkjidai_adpcm_start
};
diff --git a/src/mame/drivers/mjsister.c b/src/mame/drivers/mjsister.c
index 23dacdcf116..abe768c9a2d 100644
--- a/src/mame/drivers/mjsister.c
+++ b/src/mame/drivers/mjsister.c
@@ -296,7 +296,7 @@ INPUT_PORTS_END
/****************************************************************************/
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
input_port_0_r,
input_port_1_r
diff --git a/src/mame/drivers/mjsiyoub.c b/src/mame/drivers/mjsiyoub.c
index d946ecf8812..55d65c19220 100644
--- a/src/mame/drivers/mjsiyoub.c
+++ b/src/mame/drivers/mjsiyoub.c
@@ -65,13 +65,13 @@ static INPUT_PORTS_START( mjsiyoub )
INPUT_PORTS_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
0, /* Input A: DSW 2 */
0, /* Input B: DSW 1 */
};
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
0, /* IRQ handler */
MSM5205_S48_4B /* 8 KHz, 4 Bits ?? */
diff --git a/src/mame/drivers/mlanding.c b/src/mame/drivers/mlanding.c
index e03a7da2ce7..6f5cc5e95ad 100644
--- a/src/mame/drivers/mlanding.c
+++ b/src/mame/drivers/mlanding.c
@@ -346,13 +346,13 @@ static GFXDECODE_START( mlanding )
GFXDECODE_ENTRY( REGION_GFX1, 0, tiles8x8_layout, 0, 16 )
GFXDECODE_END
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
ml_msm5205_vck, /* VCK function */
MSM5205_S48_4B /* 8 kHz */
};
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
irq_handler,
sound_bankswitch_w
diff --git a/src/mame/drivers/model1.c b/src/mame/drivers/model1.c
index 3c009545102..5b75723ebd0 100644
--- a/src/mame/drivers/model1.c
+++ b/src/mame/drivers/model1.c
@@ -1077,12 +1077,12 @@ static ADDRESS_MAP_START( model1_snd, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0xf00000, 0xf0ffff) AM_RAM
ADDRESS_MAP_END
-static struct MultiPCM_interface m1_multipcm_interface_1 =
+static const struct MultiPCM_interface m1_multipcm_interface_1 =
{
REGION_SOUND1
};
-static struct MultiPCM_interface m1_multipcm_interface_2 =
+static const struct MultiPCM_interface m1_multipcm_interface_2 =
{
REGION_SOUND2
};
diff --git a/src/mame/drivers/model2.c b/src/mame/drivers/model2.c
index 53d2758c2ed..8ae4881ea52 100644
--- a/src/mame/drivers/model2.c
+++ b/src/mame/drivers/model2.c
@@ -951,7 +951,7 @@ static WRITE32_HANDLER( model2_serial_w )
/* Protection handling */
-static UINT8 ZGUNProt[] =
+static const UINT8 ZGUNProt[] =
{
0x7F,0x4E,0x1B,0x1E,0xA8,0x48,0xF5,0x49,0x31,0x32,0x4A,0x09,0x89,0x29,0xC0,0x41,
0x3A,0x49,0x85,0x24,0xA0,0x4D,0x21,0x31,0xEA,0xC3,0x3F,0xAF,0x0E,0x4B,0x25,0x02,
@@ -962,7 +962,7 @@ static UINT8 ZGUNProt[] =
0x94,0xD5,0x73,0x09,0xE4,0x3D,0x2D,0x92,0xC9,0xA7,0xA3,0x53,0x42,0x82,0x55,0x67,
0xE4,0x66,0xD0,0x4A,0x7D,0x4A,0x13,0xDE,0xD7,0x9F,0x38,0xAA,0x00,0x56,0x85,0x0A
};
-static UINT8 DCOPKey1326[]=
+static const UINT8 DCOPKey1326[]=
{
0x43,0x66,0x54,0x11,0x99,0xfe,0xcc,0x8e,0xdd,0x87,0x11,0x89,0x22,0xdf,0x44,0x09
};
@@ -1694,19 +1694,19 @@ static void scsp_irq(int irq)
}
}
-static struct SCSPinterface scsp_interface =
+static const struct SCSPinterface scsp_interface =
{
REGION_CPU2,
0,
scsp_irq
};
-static struct MultiPCM_interface m1_multipcm_interface_1 =
+static const struct MultiPCM_interface m1_multipcm_interface_1 =
{
REGION_SOUND1
};
-static struct MultiPCM_interface m1_multipcm_interface_2 =
+static const struct MultiPCM_interface m1_multipcm_interface_2 =
{
REGION_SOUND2
};
@@ -1775,7 +1775,7 @@ ADDRESS_MAP_END
/*****************************************************************************/
-static struct mb86233_config tgp_config =
+static const struct mb86233_config tgp_config =
{
copro_fifoin_pop,
copro_fifoout_push,
@@ -1865,7 +1865,7 @@ static MACHINE_DRIVER_START( model2a )
MACHINE_DRIVER_END
-static sharc_config sharc_cfg =
+static const sharc_config sharc_cfg =
{
BOOT_MODE_HOST
};
diff --git a/src/mame/drivers/model3.c b/src/mame/drivers/model3.c
index 518e8b935b7..e28e7988a22 100644
--- a/src/mame/drivers/model3.c
+++ b/src/mame/drivers/model3.c
@@ -967,7 +967,7 @@ static NVRAM_HANDLER( model3 )
}
}
-static SCSIConfigTable scsi_dev_table =
+static const SCSIConfigTable scsi_dev_table =
{
1, /* 1 SCSI device */
{
@@ -975,7 +975,7 @@ static SCSIConfigTable scsi_dev_table =
}
};
-static struct LSI53C810interface scsi_intf =
+static const struct LSI53C810interface scsi_intf =
{
&scsi_dev_table, /* SCSI device table */
&scsi_irq_callback,
@@ -1333,7 +1333,7 @@ static WRITE64_HANDLER(network_w)
static int prot_data_ptr = 0;
-static UINT16 vs299_prot_data[] =
+static const UINT16 vs299_prot_data[] =
{
0xc800, 0x4a20, 0x5041, 0x4e41, 0x4920, 0x4154, 0x594c, 0x4220,
0x4152, 0x4953, 0x204c, 0x5241, 0x4547, 0x544e, 0x4e49, 0x2041,
@@ -1350,7 +1350,7 @@ static UINT16 vs299_prot_data[] =
0x4149, 0x4620, 0x5f43, 0x4553, 0x4147
};
-static UINT16 swt_prot_data[] =
+static const UINT16 swt_prot_data[] =
{
0xffff,
0x3d3d, 0x3d3d, 0x203d, 0x5453, 0x5241, 0x5720, 0x5241, 0x2053,
@@ -1362,7 +1362,7 @@ static UINT16 swt_prot_data[] =
0x614b, 0x6f79, 0x6f6b, 0x5920, 0x6d61, 0x6d61, 0x746f, 0x0a6f,
};
-static UINT16 fvipers2_prot_data[] =
+static const UINT16 fvipers2_prot_data[] =
{
0x2a2a,
0x2a2a, 0x2a2a, 0x2a2a, 0x2a2a, 0x2a2a, 0x2a2a, 0x202a, 0x5b5b,
@@ -1375,7 +1375,7 @@ static UINT16 fvipers2_prot_data[] =
0x2e64, 0x2a20, 0x2a2a, 0x2a2a, 0x2a2a, 0x2a2a, 0x2a2a, 0x2a2a,
};
-static UINT16 spikeout_prot_data[] =
+static const UINT16 spikeout_prot_data[] =
{
0x0000,
0x4f4d, 0x4544, 0x2d4c, 0x2033, 0x7953, 0x7473, 0x6d65, 0x5020,
@@ -1386,7 +1386,7 @@ static UINT16 spikeout_prot_data[] =
0x6465, 0x202e, 0x2020, 0x0020
};
-static UINT16 eca_prot_data[] =
+static const UINT16 eca_prot_data[] =
{
0x0000,
0x2d2f, 0x202d, 0x4d45, 0x5245, 0x4547, 0x434e, 0x2059, 0x4143,
@@ -4003,14 +4003,14 @@ static void scsp_irq(int irq)
}
}
-static struct SCSPinterface scsp_interface =
+static const struct SCSPinterface scsp_interface =
{
REGION_CPU2,
0,
scsp_irq
};
-static struct SCSPinterface scsp2_interface =
+static const struct SCSPinterface scsp2_interface =
{
REGION_SOUND3,
0,
@@ -4042,21 +4042,21 @@ static INTERRUPT_GEN(model3_interrupt)
model3_vblank &= 1;
}
-static ppc_config model3_10 =
+static const ppc_config model3_10 =
{
PPC_MODEL_603E, /* 603e, Stretch, 1.3 */
0x10, /* Multiplier 1, Bus = 66MHz, Core = 66MHz */
BUS_FREQUENCY_66MHZ
};
-static ppc_config model3_15 =
+static const ppc_config model3_15 =
{
PPC_MODEL_603E, /* 603e, Stretch, 1.3 */
0x15, /* Multiplier 1.5, Bus = 66MHz, Core = 100MHz */
BUS_FREQUENCY_66MHZ
};
-static ppc_config model3_2x =
+static const ppc_config model3_2x =
{
PPC_MODEL_603R, /* 603e-PID7t, Goldeneye, 2.1 */
0x25, /* Multiplier 2.5, Bus = 66MHz, Core = 166MHz */
diff --git a/src/mame/drivers/momoko.c b/src/mame/drivers/momoko.c
index e26c22e0ed3..eb576cfca06 100644
--- a/src/mame/drivers/momoko.c
+++ b/src/mame/drivers/momoko.c
@@ -243,7 +243,7 @@ GFXDECODE_END
/****************************************************************************/
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
soundlatch_r
};
diff --git a/src/mame/drivers/moo.c b/src/mame/drivers/moo.c
index c4391a98261..d61d4ad5a17 100644
--- a/src/mame/drivers/moo.c
+++ b/src/mame/drivers/moo.c
@@ -606,7 +606,7 @@ static INPUT_PORTS_START( bucky )
INPUT_PORTS_END
-static struct K054539interface k054539_interface =
+static const struct K054539interface k054539_interface =
{
REGION_SOUND1
};
diff --git a/src/mame/drivers/mosaic.c b/src/mame/drivers/mosaic.c
index fddd6ae0133..fa043c2f584 100644
--- a/src/mame/drivers/mosaic.c
+++ b/src/mame/drivers/mosaic.c
@@ -32,7 +32,7 @@ static WRITE8_HANDLER( protection_w )
}
else
{
- static int jumptable[] =
+ static const int jumptable[] =
{
0x02be, 0x0314, 0x0475, 0x0662, 0x0694, 0x08f3, 0x0959, 0x096f,
0x0992, 0x09a4, 0x0a50, 0x0d69, 0x0eee, 0x0f98, 0x1040, 0x1075,
@@ -274,7 +274,7 @@ GFXDECODE_END
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
input_port_2_r
};
diff --git a/src/mame/drivers/mpu4drvr.c b/src/mame/drivers/mpu4drvr.c
index 1b57b5346cb..6d870b695cf 100644
--- a/src/mame/drivers/mpu4drvr.c
+++ b/src/mame/drivers/mpu4drvr.c
@@ -300,7 +300,7 @@ static void m68k_acia_irq(int state)
update_mpu68_interrupts();
}
-static struct acia6850_interface m6809_acia_if =
+static const struct acia6850_interface m6809_acia_if =
{
MPU4_MASTER_CLOCK/44,//This isn't a real division, this is just to work around
MPU4_MASTER_CLOCK/44,//the ACIA code's hard coding
@@ -312,7 +312,7 @@ static struct acia6850_interface m6809_acia_if =
m6809_acia_irq
};
-static struct acia6850_interface m68k_acia_if =
+static const struct acia6850_interface m68k_acia_if =
{
MPU4_MASTER_CLOCK/44,
MPU4_MASTER_CLOCK/44,
diff --git a/src/mame/drivers/mquake.c b/src/mame/drivers/mquake.c
index 79b4dac4455..e35dcbbf42e 100644
--- a/src/mame/drivers/mquake.c
+++ b/src/mame/drivers/mquake.c
@@ -319,13 +319,13 @@ INPUT_PORTS_END
*
*************************************/
-static struct CustomSound_interface amiga_custom_interface =
+static const struct CustomSound_interface amiga_custom_interface =
{
amiga_sh_start
};
-static struct ES5503interface es5503_intf =
+static const struct ES5503interface es5503_intf =
{
NULL,
NULL,
diff --git a/src/mame/drivers/ms32.c b/src/mame/drivers/ms32.c
index 88fadf6aef8..c33329a5b25 100644
--- a/src/mame/drivers/ms32.c
+++ b/src/mame/drivers/ms32.c
@@ -1370,7 +1370,7 @@ static ADDRESS_MAP_START( ms32_snd_writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x8000, 0xffff) AM_WRITE(MWA8_ROM)
ADDRESS_MAP_END
-static struct YMF271interface ymf271_interface =
+static const struct YMF271interface ymf271_interface =
{
REGION_SOUND1
};
diff --git a/src/mame/drivers/msisaac.c b/src/mame/drivers/msisaac.c
index aa288a8e184..6d04aad4d26 100644
--- a/src/mame/drivers/msisaac.c
+++ b/src/mame/drivers/msisaac.c
@@ -517,7 +517,7 @@ static GFXDECODE_START( msisaac )
GFXDECODE_ENTRY( REGION_GFX2, 0, tile_layout, 0, 64 )
GFXDECODE_END
-static struct MSM5232interface msm5232_interface =
+static const struct MSM5232interface msm5232_interface =
{
{ 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6 } /* 0.65 (???) uF capacitors (match the sample, not verified) */
};
diff --git a/src/mame/drivers/mugsmash.c b/src/mame/drivers/mugsmash.c
index 92ad43c1ae5..37e398f934e 100644
--- a/src/mame/drivers/mugsmash.c
+++ b/src/mame/drivers/mugsmash.c
@@ -421,7 +421,7 @@ static void irq_handler(int irq)
cpunum_set_input_line( 1, 0 , irq ? ASSERT_LINE : CLEAR_LINE );
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
irq_handler
};
diff --git a/src/mame/drivers/multigam.c b/src/mame/drivers/multigam.c
index 6dd4bb476cf..6d25f3f735a 100644
--- a/src/mame/drivers/multigam.c
+++ b/src/mame/drivers/multigam.c
@@ -206,7 +206,7 @@ static INPUT_PORTS_START( multigam )
PORT_DIPSETTING( 0x06, "10 min" )
INPUT_PORTS_END
-static struct NESinterface multigam_interface_1 =
+static const struct NESinterface multigam_interface_1 =
{
REGION_CPU1
};
diff --git a/src/mame/drivers/mw8080bw.c b/src/mame/drivers/mw8080bw.c
index 88ce86811b0..8a306f30d53 100644
--- a/src/mame/drivers/mw8080bw.c
+++ b/src/mame/drivers/mw8080bw.c
@@ -274,7 +274,7 @@ static WRITE8_HANDLER( seawolf_explosion_lamp_w )
*/
int i;
- static const char *lamp_names[] =
+ static const char *const lamp_names[] =
{
"EXP_LAMP_0", "EXP_LAMP_1", "EXP_LAMP_2", "EXP_LAMP_3",
"EXP_LAMP_4", "EXP_LAMP_5", "EXP_LAMP_6", "EXP_LAMP_7",
diff --git a/src/mame/drivers/mystwarr.c b/src/mame/drivers/mystwarr.c
index 43181d7ee41..d4cf877ba4d 100644
--- a/src/mame/drivers/mystwarr.c
+++ b/src/mame/drivers/mystwarr.c
@@ -812,7 +812,7 @@ static ADDRESS_MAP_START( sound_writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0xfff0, 0xfff3) AM_WRITE(MWA8_NOP) // unknown write
ADDRESS_MAP_END
-static struct K054539interface k054539_interface =
+static const struct K054539interface k054539_interface =
{
REGION_SOUND1
};
diff --git a/src/mame/drivers/namcona1.c b/src/mame/drivers/namcona1.c
index c4f11498dcd..54abd7d49e9 100644
--- a/src/mame/drivers/namcona1.c
+++ b/src/mame/drivers/namcona1.c
@@ -1289,7 +1289,7 @@ static MACHINE_RESET( namcona1_mcu )
// bit 7 => port 7
static READ8_HANDLER( portana_r )
{
- static UINT8 bitnum[8] = { 0x40, 0x20, 0x10, 0x01, 0x02, 0x04, 0x08, 0x80 };
+ static const UINT8 bitnum[8] = { 0x40, 0x20, 0x10, 0x01, 0x02, 0x04, 0x08, 0x80 };
UINT8 port = readinputport(2);
return (port & bitnum[offset>>1]) ? 0xff : 0x00;
@@ -1334,7 +1334,7 @@ static INTERRUPT_GEN( mcu_interrupt )
}
}
-static struct C140interface C140_interface_typeA =
+static const struct C140interface C140_interface_typeA =
{
C140_TYPE_ASIC219,
0
diff --git a/src/mame/drivers/namcond1.c b/src/mame/drivers/namcond1.c
index f3c08d90687..402e1674981 100644
--- a/src/mame/drivers/namcond1.c
+++ b/src/mame/drivers/namcond1.c
@@ -264,7 +264,7 @@ static ADDRESS_MAP_START( nd1h8iomap, ADDRESS_SPACE_IO, 8 )
AM_RANGE(H8_ADC_0_L, H8_ADC_3_H) AM_NOP // MCU reads these, but the games have no analog controls
ADDRESS_MAP_END
-static struct C352interface c352_interface =
+static const struct C352interface c352_interface =
{
REGION_SOUND1
};
diff --git a/src/mame/drivers/namcos1.c b/src/mame/drivers/namcos1.c
index 799e9cbd878..97e28586122 100644
--- a/src/mame/drivers/namcos1.c
+++ b/src/mame/drivers/namcos1.c
@@ -965,12 +965,12 @@ static void namcos1_sound_interrupt( int irq )
cpunum_set_input_line( 2, M6809_FIRQ_LINE, irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
namcos1_sound_interrupt
};
-static struct namco_interface namco_interface =
+static const struct namco_interface namco_interface =
{
8, /* number of voices */
-1, /* memory region */
diff --git a/src/mame/drivers/namcos11.c b/src/mame/drivers/namcos11.c
index a2790e0d2b8..d6bfb465d87 100644
--- a/src/mame/drivers/namcos11.c
+++ b/src/mame/drivers/namcos11.c
@@ -789,7 +789,7 @@ static ADDRESS_MAP_START( namcos11_map, ADDRESS_SPACE_PROGRAM, 32 )
AM_RANGE(0xfffe0130, 0xfffe0133) AM_WRITENOP
ADDRESS_MAP_END
-static struct
+static const struct
{
const char *s_name;
read32_handler keycus_r;
diff --git a/src/mame/drivers/namcos12.c b/src/mame/drivers/namcos12.c
index 3cbbd05f6d6..211ca245c6c 100644
--- a/src/mame/drivers/namcos12.c
+++ b/src/mame/drivers/namcos12.c
@@ -14,42 +14,35 @@
- golgo13 assumes the test switch is a switch, not a button - must hold down F2 to stay in test mode
+Namco System 12 - Arcade PSX Hardware
+=====================================
+
Game & software revision Company/Year CPU board Mother board Daughter board Keycus
------------------------------------------------------------------------------------------------------------------------
-*Aerosmith - Quest for Fame (C) Namco, 2001
Aqua Rush (AQ1/VER.A1) (C) Namco, 1999 COH-700 SYSTEM12 MOTHER(C) SYSTEM12 M5F2 KC053
-*Attack Pla-Rail (C) Tomy/Namco, 199?
Derby Quiz My Dream Horse (MDH1/VER.A2) (C) Namco, 1998 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M10X64 KC035
Ehrgeiz (EG2/VER.A) (C) Square/Namco, 1998 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M4F6 KC021
Ehrgeiz (EG3/VER.A) (C) Square/Namco, 1998 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M4F6 KC021
Fighting Layer (FTL0/VER.A) (C) Arika/Namco, 1998 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M5F4 KC037
-*Fighting Spirit Biography 3 (C) Namco, 1997
Ghoul Panic (OB2/VER.A) (C) Namco/Raizing,1999 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M4F6 KC045
Golgo 13 (GLG1/VER.A) (C) Raizing/Namco,1999 COH-700 SYSTEM12 MOTHER(C) SYSTEM12 M8F6 KC054
Golgo 13 Kiseki no Dandou (GLS1/VER.A) (C) Raizing/Namco,2000 COH-700 SYSTEM12 MOTHER(C) SYSTEM12 M8F6 KC059
-*Kaiun Quiz (C) Namco, 199?
-*Kart Duel (C) Namco, 2000
+Kaiun Quiz (KW1/VER.A1) (C) Namco/Moss, 1999 COH-700 SYSTEM12 MOTHER(C) SYSTEM12 M10X64 KC050
Libero Grande (LG2/VER.A) (C) Namco, 1997 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M8F2F KC014
Mr Driller (DRI1/VER.A2) (C) Namco, 1999 COH-700 SYSTEM12 MOTHER(C) SYSTEM12 M8F2F KC048
-*Oh Bakyuuun (C) Namco/Raizing,1999
-*Over Kuhn (C) Namco, 1999
Paca Paca Passion (PPP1/VER.A2) (C) Produce/Namco,1999 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M8F2F KC038
Paca Paca Passion Special (PSP1/VER.A) (C) Produce/Namco,1999 COH-700 SYSTEM12 MOTHER(C) SYSTEM12 M5F2 KC052
Paca Paca Passion 2 (PKS1/VER.A) (C) Produce/Namco,1999 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M5F2 KC046
Point Blank 2 (GNB5/VER.A) (C) Namco, 1999 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M4F0 KC042
Soul Calibur (SOC11/VER.A2) (C) Namco, 1998 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M5F2 KC020
Soul Calibur (SOC11/VER.B) (C) Namco, 1998 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M5F2 KC020
-Soul Calibur (SOC13/VER.B) (C) Namco, 1998 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M5F4 KC020
Soul Calibur (SOC11/VER.C) (C) Namco, 1998 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M5F4 KC020
+Soul Calibur (SOC13/VER.B) (C) Namco, 1998 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M5F4 KC020
Soul Calibur (SOC14/VER.C) (C) Namco, 1998 COH-700 SYSTEM12 MOTHER JO 11-04-98 none
-*Soul Calibur Ver.B (C) Namco, 199?
-*Submarines (C) Namco, 199?
-*Super World Stadium '98 (C) Namco, 1998
+Super World Stadium '98 (SS81/VER.A) (C) Namco, 1998 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M4F6 KC025
Super World Stadium '99 (SS91/VER.A3) (C) Namco, 1999 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M5F4 KC043
-*Super World Stadium 2000 (C) Namco, 2000
-*Super World Stadium 2001 (C) Namco, 2001
-*Techno Drive (C) Namco, 1998
-*TeknoWerk (C) Namco, 1999
+Super World Stadium 2000 (SS01/VER.A3) (C) Namco, 2000 COH-700 SYSTEM12 MOTHER(C) SYSTEM12 M5F4 KC055
+Super World Stadium 2001 (SS11/VER.A2) (C) Namco, 2001 COH-716 SYSTEM12 MOTHER(C) SYSTEM12 F2M5 KC061
Tenkomori Shooting (TKM1/VER.A1) (C) Namco, 1998 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M4F6 KC036
Tenkomori Shooting (TKM2/VER.A1) (C) Namco, 1998 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M4F6 KC036
Tekken 3 (TET1/VER.E1) (C) Namco, 1996 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M8F2F KC006
@@ -58,13 +51,45 @@ Tekken 3 (TET3/VER.A) (C) Namco, 1996 COH-700 SYS
Tekken 3 (TET3/VER.B) (C) Namco, 1996 COH-700 SYSTEM12 MOTHER SYSTEM12 M8F2F KC006
Tekken Tag Tournament (TEG3/VER.B) (C) Namco, 1999 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M8F4 KC044
Tekken Tag Tournament (TEG3/VER.C1) (C) Namco, 1999 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M8F4 KC044
-*Toukon Retsuden 3 (C) Namco, 1997
-*Truck Kyosokyoku (C) Namco, 2000
-*Um Jammer Lammy (C) Namco, 1999
+Toukon Retsuden 3 (TR1/VER.A) (C) Namco, 1997 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M8F2F KC019
+
+
+Wanted Games
+------------
+Aerosmith - Quest for Fame (C) Namco, 2001
+http://www.bandainamcogames.co.jp/aa/am/vg/questforfame/
+
+Attack Pla-Rail (C) Tomy/Namco, 199?
+Possibly some kind of redemption game for kids
+
+Kart Duel (C) Namco, 2000
+http://www.bandainamcogames.co.jp/aa/am/vg/kartduel/
+
+Oh Bakyuuun (C) Namco/Raizing,1999
+http://www.8ing.net/prd/ohbakyun/index.html
+
+Soul Calibur Ver.B (C) Namco, 199?
+Probably doesn't exist
+
+Submarines (C) Namco, 199?
+http://www.arcadeflyers.com/?page=thumbs&db=videodb&id=5531
+This was cancelled, only the flyer exists.
+It was shown only at an amusement show. Possibly a prototype still exists. Possibly not.
+
+Techno Drive (C) Namco, 1998
+http://www.bandainamcogames.co.jp/aa/am/em/techno-drive/main/index.php
+
+Tekno Werk (C) Namco, 1999
+Some kind of music game similar to Konami's Keyboard Mania series
+
+Truck Kyosokyoku (C) Namco, 2000
+http://www.bandainamcogames.co.jp/aa/am/vg/truckkyosokyoku/
-* - Denotes not dumped yet. If you can help with the remaining undumped S12 games,
- please contact me at http://www.mameworld.net/gurudumps/
- Note that this list above may not be 100% complete. Alternative versions are also welcome :-)
+Um Jammer Lammy (C) Namco, 1999
+http://www.bandainamcogames.co.jp/aa/am/vg/umjammerlammy/#nbgiWrapper
+
+If you can help with the remaining undumped S12 games, please contact me at http://www.mameworld.net/gurudumps/
+Note that this list above may not be 100% complete. Alternative versions are also welcome :-)
The Namco System 12 system comprises 3 mandatory PCB's....
MOTHER PCB - This is the main PCB. It holds all sound circuitry, sound ROMs, program ROMs, shared RAM, bank-switching
@@ -73,7 +98,7 @@ MOTHER PCB - This is the main PCB. It holds all sound circuitry, sound ROMs, pr
some of the PALs are different and it has the capability to use 1x TSOP56 ROM in the program location,
instead of the regular TSOP40/48 ROMs. The first 2 revisions appear to be identical.
CPU PCB - All games use the exact same PCB. Contains main CPU/RAM and GPU/Video RAM
-ROM PCB - There are eight known revisions of this PCB (so far). They're mostly identical except for the type and
+ROM PCB - There are nine known revisions of this PCB (so far). They're mostly identical except for the type and
number of ROMs used. Most have a PAL and a CPLD known as a 'KEYCUS'. Some also have an additional CPLD for
protection.
@@ -110,7 +135,7 @@ Rev. (C) Main Board is only slightly different to the other revs. Mostly some PA
PCB is wired for 1x 32M TSOP56 FlashROM (replaces 2E & 2J) and 2x 16M TSOP48 FlashROMs (replaces 2R/2P/2N/2L).
One other difference is that the motherboard has a serial number sticker on it and the program ROMs also contain
that same serial number, so all the games running on the Rev. C mother board have serialised ROMs. I'm not sure why,
-they're not exactly _easily_ tracable and no one cares either way ;-)
+they're not exactly _easily_ traceable and no one cares either way ;-)
|--------------------------------------------------------------|
|-| SOUND.11S |--------------| AT28C16 |
| |--------------| |
@@ -192,6 +217,7 @@ Notes:
D6345 : NEC uPD6345 Serial 8-bit Shift Register IC (SOIC16)
PRG.2L/PRG.2P: Main program ROMs, Intel 28F016S5 2M x8 FLASHROM (both TSOP40)
+ or Fujitsu 29F016A 2M x8 FLASHROM (both TSOP48)
These ROMs are populated on the following games....
Test Mode S/W
@@ -202,6 +228,7 @@ Notes:
Ehrgeiz EG3 Ver.A EG3/VER.A MOTHER(B)
Golgo 13 GLG1 Ver.A GLG1/VER.A MOTHER(C) (ROMs serialised)
Golgo 13 Kiseki no Dandou GLS1 Ver.A GLS1/VER.A MOTHER(C) (ROMs serialised)
+ Kaiun Quiz KW1 Ver.A KW1/VER.A1 MOTHER(C) (ROMs serialised)
Libero Grande LG2 Ver.A LG2/VER.A MOTHER(B)
Mr Driller DRI1 Ver.A DRI1/VER.A2 MOTHER(C) (ROMs serialised)
Paca Paca Passion PPP1 Ver.A PPP1/VER.A2 MOTHER(B)
@@ -211,6 +238,8 @@ Notes:
Soul Calibur SOC1 Ver.A SOC11/VER.A2 MOTHER(B)
Soul Calibur SOC3 Ver.B SOC13/VER.B MOTHER(B)
Soul Calibur SOC1 Ver.C SOC11/VER.C MOTHER(B)
+ Super World Stadium 2000 SS01 Ver.A SS01/VER.A3 MOTHER(C) (ROMs serialised)
+ Super World Stadium 2001 SS11 Ver.A SS11/VER.A2 MOTHER(C) (ROMs serialised)
Tekken Tag Tournament TEG3 Ver.B TEG3/VER.B MOTHER(B)
Tekken Tag Tournament TEG3 Ver.B TEG3/VER.C1 MOTHER(B)
@@ -233,6 +262,7 @@ Notes:
Ghoul Panic OB2 Ver.A OB2/VER.A MOTHER(B)
Soul Calibur SOC1 Ver.B SOC11/VER.B MOTHER(B)
Soul Calibur TET1 Ver.C SOC14/VER.C MOTHER (factory upgraded from Tekken 3 to Soul Calibur)
+ Super World Stadium '98 SS81 Ver.A SS81/VER.A MOTHER(B)
Super World Stadium '99 SS91 Ver.A SS91/VER.A3 MOTHER(B)
Tekken 3 TET1 Ver.A TET1/VER.E1 MOTHER(B)
Tekken 3 TET2 Ver.A TET2/VER.A MOTHER
@@ -254,7 +284,8 @@ All of the PCBs are the same size (approx 2" x 7") containing one custom connect
PAL and a KEYCUS (which is a PLCC CPLD) and in some cases an extra TQFP CPLD.
The PCBs are named with a special coding. First a letter M, denoting MASKROM (always SOP44), then a number denoting how
many ROMs of that type, then another letter F, denoting FLASHROM (always TSOP40/48/56), then a number denoting how many
-ROMs of that type.
+ROMs of that type. That number is always the maximum amount of that ROM type that can be used on the PCB. The actual number
+of ROMs populated on the PCB can be less.
********
*Type 1*
@@ -281,7 +312,7 @@ Notes:
|----------|----|----| |----------|----|
WAVEx: 64M SOP44 MASKROM (R6 populated)
- FLx : Intel E28F016 TSOP40 16M FlashROM (R8 not populated)
+ FLx : Intel E28F016 TSOP40 16M FlashROM or Fujitsu 29F016A TSOP48 16M FlashROM (R8 not populated)
ROM0x: 64M SOP44 MASKROM (size fixed at 64M, no configure options)
IC3 : MACH211 CPLD (PLCC44, labelled 'KEYCUS' and stamped with 'KC' & a 3-digit number which is different per game.)
IC4 : PALCE 16V8H (PLCC20, PCB labelled 'A_DECO', chip stamped 'A DECO')
@@ -320,6 +351,10 @@ Point Blank 2 GNB5/VER.A Same PCB but sticker says.... KC042
(i.e no FlashROMs) (note these ROMs contains the same data as)
(the ones used on System 11 Point Blank 2)
+Super World SS81/VER.A SYSTEM 12 M4F6 PCB 8661960901 (8661970901) KC025 SS81 WAVE0, SS81 WAVE1
+Stadium '98 SS81 FL1U, SS81 FL1L, SS81 FL2U
+ SS81 FL2L, SS81 FL3U, SS81 FL3L
+
********
*Type 2*
********
@@ -428,6 +463,10 @@ Stadium '99 (sticker KC0
SS91 FL4L, SS91 FL4H
SS91 FL3L, SS91 FL3H
+Super World SS01/VER.A3 SYSTEM 12 M5F4 PCB 8661961200 (8661971200) KC055 SS01 WAVE0, SS01 WAVE1
+Stadium 2000 SS01 ROM0, SS01 ROM1, SS01 ROM2
+ SS01 FL3L, SS01 FL3H
+
Soul Calibur SOC13/VER.B SYSTEM 12 M5F4 PCB 8661961200 (8661971200) KC020 SOC1 WAVE0
SOC1 ROM0, SOC1 ROM1, SOC1 ROM2
SOC1 FL4L, SOC1 FL4H
@@ -512,6 +551,8 @@ Libero Grande LG2/VER.A SYSTEM 12 M8F2F PCB 8661960301 (8661970301) KC01
LG1 ROM0U, LG1 ROM0L
LG1 FL3L, LG1 FL3U
+Toukon TR1/VER.A SYSTEM 12 M8F2F PCB 8661960301 (8661970301) KC019 TR1 WAVE0, TR1 WAVE1 R4, R7
+Retsuden 3 TR1 ROM0U, TR1 ROM0L
********
*Type 5*
@@ -621,38 +662,47 @@ Kiseki no Dandou
********
*Type 7*
********
-SYSTEM 12 M10X64 PCB ?????????? (??????????)
+SYSTEM 12 M10X64 PCB 8661961500 (8661971500)
|----------------------------------------------------------|
|WAVE0 |
-| ROM0L ROM0U ROM2L ROM3L ROM4L |
-| |
-| ROM1L ROM1U ROM2U ROM3U ROM4U |
+| ROM3L ROM3U ROM2L ROM2U ROM1L ROM0L |
+| IC4 |
+| ROM1U ROM0U |
| |
|WAVE1 |
| KEYCUS |-------------------| |
| |-------------------| |
|----------------------------------------------------------|
Notes:
- Due to the lack of documentation, the follow is unknown.....
- - The presence or absence of zero Ohm resistor jumpers to set the ROM sizes.
- - The locations of the ROMs and KEYCUS.
- - The PCB number.
- - The presence or absence of a PAL.
+ This PCB has zero Ohm resistor jumpers to set the ROM sizes.
+ Note X means 'not populated', O means 'populated'
+ |----------|----|----|
+ | MASK | R4 | R5 |
+ |----------|----|----|
+ | WAVE 32M | O | X |
+ | 64M | X | O |
+ |----------|----|----|
- WAVEx : 64M SOP44 MASKROM
- ROMx : 64M SOP44 MASKROM
- KEYCUS: MACH211 CPLD (PLCC44, labelled 'KEYCUS' and stamped with 'KC' & a 3-digit number which is different per game.)
+ WAVEx : 32M/64M SOP44 MASKROM
+ ROMx : 64M SOP44 MASKROM (size fixed at 64M, no configure options)
+ KEYCUS: CY37064 CPLD (PLCC44, labelled 'KEYCUS' and stamped with 'KC' & a 3-digit number which is different per game.)
+ IC4 : PALCE 16V8H (PLCC20, PCB labelled 'A_DECO', chip stamped 'S12M10X')
This PCB is used on:
Software
Game Revision PCB KEYCUS ROMs Populated
-----------------------------------------------------------------------------------------------------------
-Derby Quiz My MDH1/VER.A2 SYSTEM 12 M10X64 PCB ?????????? (??????????) KC035 MDH1 WAVE0
+Derby Quiz My MDH1/VER.A2 SYSTEM 12 M10X64 PCB 8661961500 (8661971500) KC035 MDH1 WAVE0
Dream Horse MDH1 ROM0L, MDH1 ROM1L
MDH1 ROM2L, MDH1 ROM0U
MDH1 ROM1U, MDH1 ROM2U
+Kaiun Quiz KW1/VER.A1 SYSTEM 12 M10X64 PCB 8661961500 (8661971500) KC050 KW1 WAVE0
+ KW1 ROM0L, KW1 ROM1L
+ KW1 ROM2L, KW1 ROM0U
+ KW1 ROM1U, KW1 ROM2U
+
********
*Type 8*
********
@@ -694,10 +744,45 @@ Soul Calibur SOC14/VER.C JO 11-04-98 ----
ROM1-1, ROM2, ROM2-1
FL3, FL4
+********
+*Type 9*
+********
+SYSTEM 12 F2M5 PCB 8661962600 (8661972600)
+|----------------------------------------------------------|
+|WAVE0.IC2 IC4 |
+| ROM0.IC7 |
+| FL1L.IC5 FL1U.IC6 |
+| ROM1.IC8 |
+| |
+|WAVE1.IC1 ROM2.IC9|
+| IC3 |-------------------| |
+| |-------------------| |
+|----------------------------------------------------------|
+Notes:
+ WAVEx: 64M SOP44 MASKROM
+ FLx : Intel Flash DA28F640J5 64M FlashROM (SSOP56)
+ ROMx : 64M SOP44 MASKROM
+ IC3 : CY37064 CPLD (PLCC44, labelled 'KEYCUS' and stamped with 'KC' & a 3-digit number which is different per game.)
+ IC4 : GAL22V10 (PLCC28, PCB labelled 'S12F2M', chip stamped 'S12F2M')
+
+This PCB is used on:
+
+ Software
+Game Revision PCB KEYCUS ROMs Populated
+-------------------------------------------------------------------------------------------------------------------
+Super World SS11/VER.A2 SYSTEM 12 F2M5 PCB 8661962600 (8661972600) KC061 SS01 WAVE0, SS01 WAVE1
+Stadium 2001 SS01 ROM0, SS01 ROM1, SS01 ROM2
+ SS11FL1L, SS11FL1U
+
CPU PCB
-------
-COH-700 GP-15
+
+There are 2 known types (so far). Type 1 is the most common.
+
+Type 1
+------
+COH-700 GP-15 (manufactured by Sony)
|-------------------------------------------|
| 74F74 74ALS08 |
| |
@@ -727,6 +812,23 @@ Notes:
CXD8661R : Sony CXD8661R R3000A-based CPU (QFP208)
MC44200FT : Motorola MC44200FT Triple 8-bit Video DAC (QFP44)
+Type 2
+------
+ SYSTEM12 COH716 PCB 8661962301 (8661972301)
+ (manufactured by Namco, probably in 2001, under licence from Sony)
+ Component layout is identical to COH-700 PCB with some updated components. Generally
+ it has 2X the amount of video RAM and 4X the amount of program RAM that the COH-700 PCB has.
+ KM4132G271Q replaced with OKI 54V25632A 256k x 32-bit x 2 Banks SGRAM (x2, QFP100)
+ KM416V1204 replaced with Samsung Electronics K4E6416120D 4M x16 EDO DRAM (x2, TSOP44)
+ Updated Sony CXD8561CQ GPU (QFP208)
+ Updated Sony CXD8606BQ R3000A-based CPU (QFP208)
+ Updated Motorola MC141685FT Video DAC (QFP44)
+
+ The Type 2 PCB is used only by Super World Stadium 2001 (so far)
+ Note, this CPU PCB was tested with some of the older S12 games and
+ they worked fine, so it seems to be 100% compatible with all S12 games.
+ The older COH-700 CPU board will also work with SWS2001.
+
NETWORK PCB
-----------
@@ -838,7 +940,14 @@ INLINE void verboselog( int n_level, const char *s_fmt, ... )
va_start( v, s_fmt );
vsprintf( buf, s_fmt, v );
va_end( v );
- logerror( "%08x: %s", activecpu_get_pc(), buf );
+ if( cpu_getactivecpu() != -1 )
+ {
+ logerror( "%08x: %s", activecpu_get_pc(), buf );
+ }
+ else
+ {
+ logerror( "(timer) : %s", buf );
+ }
}
}
@@ -931,37 +1040,56 @@ static WRITE32_HANDLER( dmaoffset_w )
static void namcos12_rom_read( UINT32 n_address, INT32 n_size )
{
- INT32 n_left;
+ int n_region;
+ int n_offset;
+
+ INT32 n_ramleft;
+ INT32 n_romleft;
+
UINT32 *p_n_src;
UINT32 *p_n_dst;
- verboselog( 1, "namcos12_rom_read( %08x, %08x )\n", n_address, n_size );
-
if( ( m_n_dmaoffset >= 0x80000000 ) || ( m_n_dmabias == 0x1f300000 ) )
{
- p_n_src = (UINT32 *)( memory_region( REGION_USER1 ) + ( m_n_dmaoffset & 0x003fffff ) );
+ n_region = REGION_USER1;
+ n_offset = m_n_dmaoffset & 0x003fffff;
+ verboselog( 1, "namcos12_rom_read( %08x, %08x ) boot %08x\n", n_address, n_size, n_offset );
}
else if( m_n_tektagdmaoffset >= 0x00000000 && m_n_tektagdmaoffset <= 0x03800000 )
{
- p_n_src = (UINT32 *)( memory_region( REGION_USER2 ) + ( m_n_tektagdmaoffset & 0x7fffffff ) );
+ n_region = REGION_USER2;
+ n_offset = m_n_tektagdmaoffset & 0x7fffffff;
+ verboselog( 1, "namcos12_rom_read( %08x, %08x ) tektag1 %08x\n", n_address, n_size, n_offset );
}
else if( m_n_tektagdmaoffset >= 0x04000000 && m_n_tektagdmaoffset <= 0x04400000 )
{
- p_n_src = (UINT32 *)( memory_region( REGION_USER1 ) + ( m_n_tektagdmaoffset & 0x003fffff ) );
+ n_region = REGION_USER1;
+ n_offset = m_n_tektagdmaoffset & 0x003fffff;
+ verboselog( 1, "namcos12_rom_read( %08x, %08x ) tektag2 %08x\n", n_address, n_size, n_offset );
}
else
{
- p_n_src = (UINT32 *)( memory_region( REGION_USER2 ) + ( m_n_dmaoffset & 0x7fffffff ) );
+ n_region = REGION_USER2;
+ n_offset = m_n_dmaoffset & 0x7fffffff;
+ verboselog( 1, "namcos12_rom_read( %08x, %08x ) game %08x\n", n_address, n_size, n_offset );
}
+ p_n_src = (UINT32 *)( memory_region( n_region ) + n_offset );
+ n_romleft = ( memory_region_length( n_region ) - n_offset ) / 4;
+ if( n_size > n_romleft )
+ {
+ verboselog( 1, "namcos12_rom_read dma truncated %d to %d passed end of rom\n", n_size, n_romleft );
+ n_size = n_romleft;
+ }
p_n_dst = &g_p_n_psxram[ n_address / 4 ];
-
- n_left = ( g_n_psxramsize - n_address ) / 4;
- if( n_size > n_left )
+ n_ramleft = ( g_n_psxramsize - n_address ) / 4;
+ if( n_size > n_ramleft )
{
- n_size = n_left;
+ verboselog( 1, "namcos12_rom_read dma truncated %d to %d passed end of ram\n", n_size, n_ramleft );
+ n_size = n_ramleft;
}
+
while( n_size > 0 )
{
*( p_n_dst++ ) = *( p_n_src++ );
@@ -1131,6 +1259,8 @@ static MACHINE_RESET( namcos12 )
strcmp( machine->gamedrv->name, "tenkomoj" ) == 0 ||
strcmp( machine->gamedrv->name, "tenkomor" ) == 0 ||
strcmp( machine->gamedrv->name, "ptblank2" ) == 0 ||
+ strcmp( machine->gamedrv->name, "sws2000" ) == 0 ||
+ strcmp( machine->gamedrv->name, "sws2001" ) == 0 ||
strcmp( machine->gamedrv->name, "ghlpanic" ) == 0 )
{
/* this is based on guesswork, it might not even be keycus. */
@@ -1192,7 +1322,7 @@ static READ8_HANDLER( s12_mcu_rtc_r )
{
UINT8 ret = 0;
mame_system_time systime;
- static int weekday[7] = { 7, 1, 2, 3, 4, 5, 6 };
+ static const int weekday[7] = { 7, 1, 2, 3, 4, 5, 6 };
mame_get_current_datetime(Machine, &systime);
@@ -1328,7 +1458,7 @@ static ADDRESS_MAP_START( s12h8iomap, ADDRESS_SPACE_IO, 8 )
AM_RANGE(H8_ADC_3_H, H8_ADC_3_L) AM_NOP
ADDRESS_MAP_END
-static struct C352interface c352_interface =
+static const struct C352interface c352_interface =
{
REGION_SOUND1
};
@@ -1666,6 +1796,26 @@ ROM_START( ghlpanic )
ROM_LOAD( "ob1wave.ic2", 0x000000, 0x800000, CRC(e7bc7202) SHA1(f0f598304866ebe62642eaac6b7d8709baa14fe1) )
ROM_END
+ROM_START( kaiunqz )
+ ROM_REGION32_LE( 0x00400000, REGION_USER1, 0 ) /* main prg */
+ ROM_LOAD16_BYTE( "kw1vera.2l", 0x000000, 0x200000, CRC(fd1d2324) SHA1(eedb4627dfa17e9aac2c99592628f1fa7060edb5) )
+ ROM_LOAD16_BYTE( "kw1vera.2p", 0x000001, 0x200000, CRC(d8bdea6b) SHA1(d32118846a1f43eecff7f56dcda03adf04975784) )
+
+ ROM_REGION32_LE( 0x3000000, REGION_USER2, 0 ) /* main data */
+ ROM_LOAD16_BYTE( "kw1rom0l.12", 0x0000000, 0x800000, CRC(e0768f0b) SHA1(3ffec7c789a95fcff7f06432723f155b99a20c42) )
+ ROM_LOAD16_BYTE( "kw1rom0u.11", 0x0000001, 0x800000, CRC(04101a16) SHA1(c2d79333ee382e2fea229bba23918fb5f88a25d4) )
+ ROM_LOAD16_BYTE( "kw1rom1l.10", 0x1000000, 0x800000, CRC(6a4edfa6) SHA1(a59fa28446b28db28b38368c794af71e673f69a2) )
+ ROM_LOAD16_BYTE( "kw1rom1u.9", 0x1000001, 0x800000, CRC(e6150b0d) SHA1(7dd1ba524246aea007e7bd6d3e7d457033b23a09) )
+ ROM_LOAD16_BYTE( "kw1rom2l.7", 0x2000000, 0x800000, CRC(21c376e4) SHA1(4b82494c1e13ebcea3c4e97803c0667be73bf6ae) )
+ ROM_LOAD16_BYTE( "kw1rom2u.8", 0x2000001, 0x800000, CRC(d850c222) SHA1(802c1782b323802eae871e2b9ccc5eae34277861) )
+
+ ROM_REGION( 0x0080000, REGION_CPU2, 0 ) /* sound prg */
+ ROM_LOAD16_WORD_SWAP( "kw1vera.11s", 0x000000, 0x080000, CRC(d863fafa) SHA1(3c2bb38c24165e3a1a4d1d257fcfc019b63d5199) )
+
+ ROM_REGION( 0x0800000, REGION_SOUND1, 0 ) /* samples */
+ ROM_LOAD( "kw1wave0.2", 0x000000, 0x800000, CRC(060e52ae) SHA1(7ea95cae9d3c648163b225d0c7d365644be90241) )
+ROM_END
+
ROM_START( lbgrande )
ROM_REGION32_LE( 0x00400000, REGION_USER1, 0 ) /* main prg */
ROM_LOAD16_BYTE( "lg2vera.2l", 0x0000000, 0x200000, CRC(5ed6b152) SHA1(fdab457862bd6e0a3178c9329bd0978b6aa3ae2f) )
@@ -1889,6 +2039,27 @@ ROM_START( soulclbd )
ROM_LOAD( "soc1wave0.2", 0x0000000, 0x800000, CRC(c100618d) SHA1(b87f88ee42ad9c5affa674e5f816d902143fed99) )
ROM_END
+ROM_START( sws98 )
+ ROM_REGION32_LE( 0x00400000, REGION_USER1, 0 ) /* main prg */
+ ROM_LOAD16_BYTE( "ss81vera.2l", 0x0000000, 0x200000, CRC(94b1f34c) SHA1(0c8491fda366b5b2874e5f49959dccd11d372e46) )
+ ROM_LOAD16_BYTE( "ss81vera.2p", 0x0000001, 0x200000, CRC(7d0ed33d) SHA1(34342ce57b29ee15c6279c099bb145ac7ad262f3) )
+
+ ROM_REGION32_LE( 0x2000000, REGION_USER2, 0 ) /* main data */
+ ROM_LOAD16_BYTE( "ss81fl1l.9", 0x1000000, 0x200000, CRC(b0b5dc77) SHA1(abce4e6ae60858b7c7408d10975b7a1e0d183115) )
+ ROM_LOAD16_BYTE( "ss81fl1u.10", 0x1000001, 0x200000, CRC(e526dba5) SHA1(889fdfba17282eb05a3e254af81ee15c3e16acc4) )
+ ROM_LOAD16_BYTE( "ss81fl2l.7", 0x1400000, 0x200000, CRC(2dc6f6b5) SHA1(e6c7bb804d7d027acca5adb15b0bb95321905ff3) )
+ ROM_LOAD16_BYTE( "ss81fl2u.8", 0x1400001, 0x200000, CRC(c8341c9f) SHA1(b7c5a960a238e963c7ec5bdb0751a8730d3b09f7) )
+ ROM_LOAD16_BYTE( "ss81fl3l.5", 0x1800000, 0x200000, CRC(ce5d2a96) SHA1(08f3955e1ce949ce436f6f2f19fd42204682ae8c) )
+ ROM_LOAD16_BYTE( "ss81fl3u.6", 0x1800001, 0x200000, CRC(02df4df8) SHA1(01fd66c905cde9ca073dc4b6dbd826c5fe96b79b) )
+
+ ROM_REGION( 0x0080000, REGION_CPU2, 0 ) /* sound prg */
+ ROM_LOAD16_WORD_SWAP( "ss81vera.11s", 0x0000000, 0x080000, CRC(c6bc5c31) SHA1(c6ef46c3fa8a7749618126d360e614ea6c8d9c54) )
+
+ ROM_REGION( 0x1000000, REGION_SOUND1, 0 ) /* samples */
+ ROM_LOAD( "ss81wave0.2", 0x0000000, 0x800000, CRC(1c5e2ff1) SHA1(4f29dfd49f6b5c3ca3b758823d368051354bd673) )
+ ROM_LOAD( "ss81wave1.1", 0x0800000, 0x800000, CRC(5f4c8861) SHA1(baee7182c32bc064d805de5a16948faf78941ac4) )
+ROM_END
+
ROM_START( sws99 )
ROM_REGION32_LE( 0x00400000, REGION_USER1, 0 ) /* main prg */
ROM_LOAD16_BYTE( "ss91vera.2e", 0x0000000, 0x200000, CRC(4dd928d7) SHA1(d76c0f52d1a2cd101a6879e6ff57ed1c52b5e228) )
@@ -1911,6 +2082,46 @@ ROM_START( sws99 )
ROM_LOAD( "ss91wave1.1", 0x0800000, 0x800000, CRC(5f4c8861) SHA1(baee7182c32bc064d805de5a16948faf78941ac4) )
ROM_END
+ROM_START( sws2000 )
+ ROM_REGION32_LE( 0x00400000, REGION_USER1, 0 ) /* main prg */
+ ROM_LOAD16_BYTE( "ss01vera.2l", 0x000000, 0x200000, CRC(6ddbdcaa) SHA1(cff31d75e7780851b2c2c025ee34fd8990e2f502) )
+ ROM_LOAD16_BYTE( "ss01vera.2p", 0x000001, 0x200000, CRC(6ade7d28) SHA1(3e8d7bc9a284324c4de0ac265872b613d108cb57) )
+
+ ROM_REGION32_LE( 0x2000000, REGION_USER2, 0 ) /* main data */
+ ROM_LOAD( "ss01rom0.9", 0x0000000, 0x800000, CRC(c08cc59c) SHA1(f2d8064491c98acbb40260d7f13d0f9b394c1383) )
+ ROM_LOAD( "ss01rom1.10", 0x0800000, 0x800000, CRC(d4aa1dc6) SHA1(68fcb60aadf35668d7d746da1e29d5d985e40aec) )
+ ROM_LOAD( "ss01rom2.11", 0x1000000, 0x800000, CRC(3371904a) SHA1(58bbf98a44560bc021bac4bc513fe89deea85b50) )
+ ROM_LOAD16_BYTE( "ss01fl3l.7", 0x1800000, 0x200000, CRC(35bad813) SHA1(19ceffb78695c8c22b30659aad56ac237ffb56ac) )
+ ROM_LOAD16_BYTE( "ss01fl3h.8", 0x1800001, 0x200000, CRC(a14828fc) SHA1(fd8a052451f74f420f4a4a2b902e0c2e83e3239b) )
+
+ ROM_REGION( 0x0080000, REGION_CPU2, 0 ) /* sound prg */
+ ROM_LOAD16_WORD_SWAP( "ss01vera.11s", 0x000000, 0x080000, CRC(641e6584) SHA1(dfc0ac21bea5b19dbce5d50fb681854889d756dc) )
+
+ ROM_REGION( 0x1000000, REGION_SOUND1, 0 ) /* samples */
+ ROM_LOAD( "ss01wave0.2", 0x000000, 0x800000, CRC(1c5e2ff1) SHA1(4f29dfd49f6b5c3ca3b758823d368051354bd673) )
+ ROM_LOAD( "ss01wave1.1", 0x800000, 0x800000, CRC(5f4c8861) SHA1(baee7182c32bc064d805de5a16948faf78941ac4) )
+ROM_END
+
+ROM_START( sws2001 )
+ ROM_REGION32_LE( 0x00400000, REGION_USER1, 0 ) /* main prg */
+ ROM_LOAD16_BYTE( "ss11vera.2l", 0x000000, 0x200000, CRC(a7b4dbe5) SHA1(1bcb8d127388e2ead9ca04b527779896c69daf7f) )
+ ROM_LOAD16_BYTE( "ss11vera.2p", 0x000001, 0x200000, CRC(3ef76b4e) SHA1(34c21b6002d3f88aa3f4b4606c8aace24be92920) )
+
+ ROM_REGION32_LE( 0x2800000, REGION_USER2, 0 ) /* main data */
+ ROM_LOAD( "ss01rom0.9", 0x0000000, 0x800000, CRC(c08cc59c) SHA1(f2d8064491c98acbb40260d7f13d0f9b394c1383) )
+ ROM_LOAD( "ss01rom1.10", 0x0800000, 0x800000, CRC(d4aa1dc6) SHA1(68fcb60aadf35668d7d746da1e29d5d985e40aec) )
+ ROM_LOAD( "ss01rom2.11", 0x1000000, 0x800000, CRC(3371904a) SHA1(58bbf98a44560bc021bac4bc513fe89deea85b50) )
+ ROM_LOAD16_BYTE( "ss11fl1l.5", 0x1800000, 0x800000, CRC(0546a2b4) SHA1(b61457c9c5136f94ace48e83de8043ce20ca4d99) )
+ ROM_LOAD16_BYTE( "ss11fl1u.6", 0x1800001, 0x800000, CRC(b3de0b2c) SHA1(a89d3a2eb0952a98cc4765af2897b94136ca58ad) )
+
+ ROM_REGION( 0x0080000, REGION_CPU2, 0 ) /* sound prg */
+ ROM_LOAD16_WORD_SWAP( "ss01vera.11s", 0x000000, 0x080000, CRC(641e6584) SHA1(dfc0ac21bea5b19dbce5d50fb681854889d756dc) )
+
+ ROM_REGION( 0x1000000, REGION_SOUND1, 0 ) /* samples */
+ ROM_LOAD( "ss01wave0.2", 0x000000, 0x800000, CRC(1c5e2ff1) SHA1(4f29dfd49f6b5c3ca3b758823d368051354bd673) )
+ ROM_LOAD( "ss01wave1.1", 0x800000, 0x800000, CRC(5f4c8861) SHA1(baee7182c32bc064d805de5a16948faf78941ac4) )
+ROM_END
+
ROM_START( tekken3 )
ROM_REGION32_LE( 0x00400000, REGION_USER1, 0 ) /* main prg */
ROM_LOAD16_BYTE( "tet1vere.2e", 0x0000000, 0x200000, CRC(8b01113b) SHA1(45fdfd58293641ed16bc59c633a85a9cf64ccbaf) )
@@ -2149,11 +2360,29 @@ ROM_START( tenkomoj )
ROM_LOAD( "tkm1wave1.1", 0x0800000, 0x800000, CRC(7567796b) SHA1(99e4b867477da2ccddfa9bebc4be84adc5cba53c) )
ROM_END
+ROM_START( toukon3 )
+ ROM_REGION32_LE( 0x00400000, REGION_USER1, 0 ) /* main prg */
+ ROM_LOAD16_BYTE( "tr1vera.2e", 0x000000, 0x200000, CRC(126ebb73) SHA1(de429e335e03f2b5116fc50f556a5507475a0535) )
+ ROM_LOAD16_BYTE( "tr1vera.2j", 0x000001, 0x200000, CRC(2edb3ad2) SHA1(d1d2d78b781c7f6fb5a201785295daa825ad057e) )
+
+ ROM_REGION32_LE( 0x1c00000, REGION_USER2, 0 ) /* main data */
+ ROM_LOAD16_BYTE( "tr1rom0l.6", 0x0000000, 0x400000, CRC(42946d26) SHA1(dc7944cb6daceda41ecee7a4e3f549cba916ab87) )
+ ROM_LOAD16_BYTE( "tr1rom0u.9", 0x0000001, 0x400000, CRC(e3cd0be0) SHA1(f27d14cd086b5961be33e635662aca89a5e8c857) )
+
+ ROM_REGION( 0x0080000, REGION_CPU2, 0 ) /* sound prg */
+ ROM_LOAD16_WORD_SWAP( "tr1vera.11s", 0x0000000, 0x080000, CRC(f9ecbd19) SHA1(ad64f95ef85ee5c45dcf15217ea5adff61fddba6) )
+
+ ROM_REGION( 0x1000000, REGION_SOUND1, 0 ) /* samples */
+ ROM_LOAD( "tr1wave0.5", 0x0000000, 0x400000, CRC(07d10e55) SHA1(3af8f7019a221981984741181b6be98e2315d441) )
+ ROM_LOAD( "tr1wave1.4", 0x0400000, 0x400000, CRC(34539cdd) SHA1(afb7079c0f447fbda285a5b97a37c04baf26db75) )
+ROM_END
+
GAME( 1996, tekken3, 0, coh700, namcos12, namcos12, ROT0, "Namco", "Tekken 3 (TET1/VER.E1)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC006 */
GAME( 1996, tekken3a, tekken3, coh700, namcos12, namcos12, ROT0, "Namco", "Tekken 3 (TET2/VER.B)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC006 */
GAME( 1996, tekken3b, tekken3, coh700, namcos12, namcos12, ROT0, "Namco", "Tekken 3 (TET3/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC006 */
GAME( 1996, tekken3c, tekken3, coh700, namcos12, namcos12, ROT0, "Namco", "Tekken 3 (TET2/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC006 */
GAME( 1997, lbgrande, 0, coh700, namcos12, namcos12, ROT0, "Namco", "Libero Grande (LG2/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC006 */
+GAME( 1997, toukon3, 0, coh700, namcos12, namcos12, ROT0, "Tomy/Namco", "Shin Nihon Pro Wrestling Toukon Retsuden 3 Arcade Edition (TR1/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC019 */
GAME( 1998, soulclbr, 0, coh700, namcos12, namcos12, ROT0, "Namco", "Soul Calibur (SOC14/VER.C)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
GAME( 1998, soulclba, soulclbr, coh700, namcos12, namcos12, ROT0, "Namco", "Soul Calibur (SOC11/VER.C)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) /* KC020 */
GAME( 1998, soulclbb, soulclbr, coh700, namcos12, namcos12, ROT0, "Namco", "Soul Calibur (SOC13/VER.B)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) /* KC020 */
@@ -2161,7 +2390,9 @@ GAME( 1998, soulclbc, soulclbr, coh700, namcos12, namcos12, ROT0, "Namco",
GAME( 1998, soulclbd, soulclbr, coh700, namcos12, namcos12, ROT0, "Namco", "Soul Calibur (SOC11/VER.A2)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) /* KC020 */
GAME( 1998, ehrgeiz, 0, coh700, namcos12, namcos12, ROT0, "Square/Namco", "Ehrgeiz (EG3/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC021 */
GAME( 1998, ehrgeiza, ehrgeiz, coh700, namcos12, namcos12, ROT0, "Square/Namco", "Ehrgeiz (EG2/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC021 */
+GAME( 1999, kaiunqz, 0, coh700, namcos12, namcos12, ROT0, "Namco", "Kaiun Quiz (KW1/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* KC050 */
GAME( 1998, mdhorse, 0, coh700, namcos12, namcos12, ROT0, "Namco", "Derby Quiz My Dream Horse (MDH1/VER.A2)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC035 */
+GAME( 1998, sws98, 0, coh700, namcos12, namcos12, ROT0, "Namco", "Super World Stadium '98 (SS81/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC0?? */
GAME( 1998, tenkomor, 0, coh700, namcos12, namcos12, ROT90, "Namco", "Tenkomori Shooting (TKM2/VER.A1)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC036 */
GAME( 1998, tenkomoj, tenkomor, coh700, namcos12, namcos12, ROT90, "Namco", "Tenkomori Shooting (TKM1/VER.A1)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC036 */
GAME( 1998, fgtlayer, 0, coh700, namcos12, namcos12, ROT0, "Arika/Namco", "Fighting Layer (FTL0/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC037 */
@@ -2179,3 +2410,6 @@ GAME( 1999, pacappsp, 0, coh700, namcos12, namcos12, ROT0, "Produce/Na
GAME( 1999, aquarush, 0, coh700, namcos12, namcos12, ROT0, "Namco", "Aqua Rush (AQ1/VER.A1)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC053 */
GAME( 1999, golgo13, 0, coh700, golgo13, golgo13, ROT0, "Raizing/Namco", "Golgo 13 (GLG1/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC054 */
GAME( 1999, g13knd, 0, coh700, golgo13, golgo13, ROT0, "Raizing/Namco", "Golgo 13 Kiseki no Dandou (GLS1/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC059 */
+GAME( 2000, sws2000, 0, coh700, namcos12, namcos12, ROT0, "Namco", "Super World Stadium 2000 (SS01/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* KC055 */
+GAME( 2001, sws2001, sws2000, coh700, namcos12, namcos12, ROT0, "Namco", "Super World Stadium 2001 (SS11/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* KC061 */
+
diff --git a/src/mame/drivers/namcos2.c b/src/mame/drivers/namcos2.c
index 1541f2af8f2..178d0c6bafb 100644
--- a/src/mame/drivers/namcos2.c
+++ b/src/mame/drivers/namcos2.c
@@ -1530,7 +1530,7 @@ static GFXDECODE_START( luckywld )
GFXDECODE_ENTRY( REGION_GFX2, 0x000000, chr_layout, 16*256, 16 )
GFXDECODE_END
-static struct C140interface C140_interface =
+static const struct C140interface C140_interface =
{
C140_TYPE_SYSTEM2,
REGION_SOUND1
diff --git a/src/mame/drivers/namcos21.c b/src/mame/drivers/namcos21.c
index d3dd871f434..6e496730312 100644
--- a/src/mame/drivers/namcos21.c
+++ b/src/mame/drivers/namcos21.c
@@ -1502,13 +1502,13 @@ static GFXDECODE_START( namcos21 )
GFXDECODE_ENTRY( REGION_GFX1, 0x000000, tile_layout, 0x1000, 0x10 )
GFXDECODE_END
-static struct C140interface C140_interface_typeA =
+static const struct C140interface C140_interface_typeA =
{
C140_TYPE_SYSTEM21_A,
REGION_SOUND1
};
-static struct C140interface C140_interface_typeB =
+static const struct C140interface C140_interface_typeB =
{
C140_TYPE_SYSTEM21_B,
REGION_SOUND1
diff --git a/src/mame/drivers/namcos22.c b/src/mame/drivers/namcos22.c
index 445321a940d..5afc84a2b55 100644
--- a/src/mame/drivers/namcos22.c
+++ b/src/mame/drivers/namcos22.c
@@ -1798,7 +1798,7 @@ static INTERRUPT_GEN( mcu_interrupt )
}
}
-static struct C352interface c352_interface =
+static const struct C352interface c352_interface =
{
REGION_SOUND1
};
diff --git a/src/mame/drivers/namcos23.c b/src/mame/drivers/namcos23.c
index f476d06f6c7..5591cc13646 100644
--- a/src/mame/drivers/namcos23.c
+++ b/src/mame/drivers/namcos23.c
@@ -700,7 +700,7 @@ static READ8_HANDLER( s23_mcu_rtc_r )
{
UINT8 ret = 0;
mame_system_time systime;
- static int weekday[7] = { 7, 1, 2, 3, 4, 5, 6 };
+ static const int weekday[7] = { 7, 1, 2, 3, 4, 5, 6 };
mame_get_current_datetime(Machine, &systime);
@@ -837,7 +837,7 @@ static GFXDECODE_START( namcos23 )
GFXDECODE_ENTRY( 0, 0, namcos23_cg_layout, 0, 0x80 )
GFXDECODE_END
-static struct mips3_config config =
+static const struct mips3_config config =
{
8192, /* code cache size - VERIFIED */
8192 /* data cache size - VERIFIED */
@@ -847,7 +847,7 @@ static INTERRUPT_GEN( namcos23_interrupt )
{
}
-static struct C352interface c352_interface =
+static const struct C352interface c352_interface =
{
REGION_SOUND1
};
diff --git a/src/mame/drivers/namcos86.c b/src/mame/drivers/namcos86.c
index b09afe5099e..4adc9df4fc7 100644
--- a/src/mame/drivers/namcos86.c
+++ b/src/mame/drivers/namcos86.c
@@ -1046,14 +1046,14 @@ GFXDECODE_END
/*******************************************************************/
-static struct namco_interface namco_interface =
+static const struct namco_interface namco_interface =
{
8, /* number of voices */
-1, /* memory region */
0 /* stereo */
};
-static struct namco_63701x_interface namco_63701x_interface =
+static const struct namco_63701x_interface namco_63701x_interface =
{
REGION_SOUND1 /* memory region */
};
diff --git a/src/mame/drivers/naomi.c b/src/mame/drivers/naomi.c
index 495e14acfc6..72284a76c59 100644
--- a/src/mame/drivers/naomi.c
+++ b/src/mame/drivers/naomi.c
@@ -443,7 +443,7 @@ Naomi 2 / GD-ROM | | |
#define CPU_CLOCK 200000000
/* MD2 MD1 MD0 MD6 MD4 MD3 MD5 MD7 MD8 */
-static struct sh4_config sh4cpu_config = { 1, 0, 1, 0, 0, 0, 1, 1, 0, CPU_CLOCK };
+static const struct sh4_config sh4cpu_config = { 1, 0, 1, 0, 0, 0, 1, 1, 0, CPU_CLOCK };
static UINT64 *dc_sound_ram;
diff --git a/src/mame/drivers/naughtyb.c b/src/mame/drivers/naughtyb.c
index 2bd256de3dd..0b1f4654a8c 100644
--- a/src/mame/drivers/naughtyb.c
+++ b/src/mame/drivers/naughtyb.c
@@ -143,7 +143,7 @@ static READ8_HANDLER( dsw0_port_r )
static READ8_HANDLER( popflame_protection_r ) /* Not used by bootleg/hack */
{
- static int values[4] = { 0x78, 0x68, 0x48, 0x38|0x80 };
+ static const int values[4] = { 0x78, 0x68, 0x48, 0x38|0x80 };
static int count;
count = (count + 1) % 4;
@@ -351,17 +351,17 @@ GFXDECODE_END
-static struct CustomSound_interface naughtyb_custom_interface =
+static const struct CustomSound_interface naughtyb_custom_interface =
{
naughtyb_sh_start
};
-static struct CustomSound_interface popflame_custom_interface =
+static const struct CustomSound_interface popflame_custom_interface =
{
popflame_sh_start
};
-static struct TMS36XXinterface tms3615_interface =
+static const struct TMS36XXinterface tms3615_interface =
{
TMS3615, /* TMS36xx subtype */
/*
@@ -706,6 +706,35 @@ ROM_START( trvmstra )
ROM_LOAD( "comic_hi.u7", 0x1c000, 0x4000, CRC(8e8b5f71) SHA1(71514af2af2468a13cf5cc4237fa2590d7a16b27) )
ROM_END
+ROM_START( trvmstrb )
+ ROM_REGION( 0x10000, REGION_CPU1, 0 )
+ ROM_LOAD( "ic30-3.bin", 0x0000, 0x1000, CRC(d3eb4197) SHA1(5843ffc8ec82ffe9a6519180e54c82b0375cc3dc) )
+ ROM_LOAD( "ic28.bin", 0x1000, 0x1000, CRC(70322d65) SHA1(498102236390f2e15444943e0fff8a53f37db083) )
+ ROM_LOAD( "ic26.bin", 0x2000, 0x1000, CRC(31dfa9cf) SHA1(007c6ef2381ce9e707932c66a451805cec342eeb) )
+
+ ROM_REGION( 0x2000, REGION_GFX1, ROMREGION_DISPOSE )
+ ROM_LOAD( "ic44.bin", 0x0000, 0x1000, CRC(dac8cff7) SHA1(21da2b2ceb4a726d03b2e49a2df75ca66b89a197) )
+ ROM_LOAD( "ic46.bin", 0x1000, 0x1000, CRC(a97ab879) SHA1(67b86d056896f10e0c055fb58c97341cf75c3d17) )
+
+ ROM_REGION( 0x2000, REGION_GFX2, ROMREGION_DISPOSE )
+ ROM_LOAD( "ic48.bin", 0x0000, 0x1000, CRC(79952015) SHA1(8407c2bab476a60d945d82201f01bf59ae9e0dad) )
+ ROM_LOAD( "ic50.bin", 0x1000, 0x1000, CRC(f09da428) SHA1(092d0eea41c8bbd48d7a3aff54c15f85262b21ff) )
+
+ ROM_REGION( 0x0200, REGION_PROMS, 0 )
+ ROM_LOAD( "ic64.bin", 0x0000, 0x0100, CRC(e9915da8) SHA1(7c64ea76e39eaff724179d52ff5482df363fcf56) ) /* palette low & high bits */
+ ROM_RELOAD( 0x0100, 0x0100 )
+
+ ROM_REGION( 0x20000, REGION_USER1, 0 ) /* Questions roms */
+ ROM_LOAD( "earlytv_lo.u2", 0x00000, 0x4000, CRC(dbfce45f) SHA1(5d96186c96dee810b0ef63964cb3614fd486aefa) )
+ ROM_LOAD( "earlytv_hi.u1", 0x04000, 0x4000, CRC(c8f5a02d) SHA1(8a566f83f9bd39ab508085af942957a7ed941813) )
+ ROM_LOAD( "sex_lo.u4", 0x08000, 0x4000, CRC(27a4ff7a) SHA1(7479c69b85ea1f4bb3d368a11cb036f707b65b6b) )
+ ROM_LOAD( "sex_hi.u3", 0x0c000, 0x4000, CRC(de84fc2f) SHA1(ac5736ca6654fc649f2e8e4a996c2b0f1e86947b) )
+ ROM_LOAD( "rock_lo.u6", 0x10000, 0x4000, CRC(ec1df27b) SHA1(95f32b366123742a4576aef272209c8d59cc6b0a) )
+ ROM_LOAD( "rock_hi.u5", 0x14000, 0x4000, CRC(8a4eccc9) SHA1(e3a03f511a84b3321a59f9e9672da27b96931713) )
+ ROM_LOAD( "lifesci_lo.u8", 0x18000, 0x4000, CRC(b58ba9eb) SHA1(4fdd62a464dec84c880e1be598a7896a957d9339) )
+ ROM_LOAD( "lifesci_hi.u7", 0x1c000, 0x4000, CRC(e03dfa12) SHA1(e668ea5bccc95d8a53a1de1d96583beef6636edb) )
+ROM_END
+
/* These 'Trivia Genius' roms were found on a Naughty Boy pcb, factory?-retooled somewhat to use 8 2732s instead of 16 2716s. The pcb is a real Naughty Boy PCB, with Jaleco markings. Latest chip datecodes on the PCB are from 85 (on the two proms) but the other chips are dated 81 and 82 (which makes sense if they're formerly naughty boy pcbs).
This may be a hacked/bootlegged version of trivia master, hacked to run on a naughty boy pcb, or (if ALL versions of trivia master ran on naughty boy pcbs) may be a 'second source bootleg', a bootleg of the trivia master naughty boy conversion.
*/
@@ -786,4 +815,5 @@ GAME( 1982, popflamb, popflame, popflame, naughtyb, 0, ROT90, "Jaleco", "
GAME( 1982, popflamn, popflame, naughtyb, naughtyb, 0, ROT90, "Jaleco", "Pop Flamer (bootleg on Naughty Boy PCB)", 0 )
GAME( 1985, trvmstr, 0, naughtyb, trvmstr, trvmstr, ROT90, "Enerdyne Technologies Inc.", "Trivia Master (set 1)", 0 )
GAME( 1985, trvmstra, trvmstr, naughtyb, trvmstr, trvmstr, ROT90, "Enerdyne Technologies Inc.", "Trivia Master (set 2)", 0 )
+GAME( 1985, trvmstrb, trvmstr, naughtyb, trvmstr, trvmstr, ROT90, "Enerdyne Technologies Inc.", "Trivia Master (set 3)", 0 )
GAME( 1985, trvgns, 0, naughtyb, trvmstr, trvmstr, ROT90, "bootleg?", "Trivia Genius", 0 )
diff --git a/src/mame/drivers/nbmj8688.c b/src/mame/drivers/nbmj8688.c
index ec5ccfc4046..84996ebbb32 100644
--- a/src/mame/drivers/nbmj8688.c
+++ b/src/mame/drivers/nbmj8688.c
@@ -3126,7 +3126,7 @@ static INPUT_PORTS_START( nightlov )
INPUT_PORTS_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
nb1413m3_dipsw1_r, // DIPSW-A read
nb1413m3_dipsw2_r // DIPSW-B read
diff --git a/src/mame/drivers/nbmj8891.c b/src/mame/drivers/nbmj8891.c
index 51f8122694e..9c2190ab094 100644
--- a/src/mame/drivers/nbmj8891.c
+++ b/src/mame/drivers/nbmj8891.c
@@ -3013,7 +3013,7 @@ INPUT_PORTS_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
input_port_0_r, // DIPSW-A read
input_port_1_r // DIPSW-B read
diff --git a/src/mame/drivers/nbmj8991.c b/src/mame/drivers/nbmj8991.c
index 41586c0a974..c0e88f3236e 100644
--- a/src/mame/drivers/nbmj8991.c
+++ b/src/mame/drivers/nbmj8991.c
@@ -1746,7 +1746,7 @@ static INPUT_PORTS_START( av2mj2rg )
INPUT_PORTS_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
input_port_0_r, // DIPSW-A read
input_port_1_r // DIPSW-B read
diff --git a/src/mame/drivers/nbmj9195.c b/src/mame/drivers/nbmj9195.c
index b84871051ca..c9d7ce20946 100644
--- a/src/mame/drivers/nbmj9195.c
+++ b/src/mame/drivers/nbmj9195.c
@@ -4118,13 +4118,13 @@ static INPUT_PORTS_START( mjegolf )
INPUT_PORTS_END
-static struct z80_irq_daisy_chain daisy_chain_main[] =
+static const struct z80_irq_daisy_chain daisy_chain_main[] =
{
{ z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 }, /* device 0 = CTC_0 */
{ 0, 0, 0, 0, -1 } /* end mark */
};
-static struct z80_irq_daisy_chain daisy_chain_sound[] =
+static const struct z80_irq_daisy_chain daisy_chain_sound[] =
{
{ z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 1 }, /* device 0 = CTC_1 */
{ 0, 0, 0, 0, -1 } /* end mark */
diff --git a/src/mame/drivers/nemesis.c b/src/mame/drivers/nemesis.c
index 077d169142f..b2b9d9b094b 100644
--- a/src/mame/drivers/nemesis.c
+++ b/src/mame/drivers/nemesis.c
@@ -2088,12 +2088,12 @@ GFXDECODE_END
/******************************************************************************/
-static struct AY8910interface ay8910_interface_1 =
+static const struct AY8910interface ay8910_interface_1 =
{
nemesis_portA_r
};
-static struct AY8910interface ay8910_interface_2 =
+static const struct AY8910interface ay8910_interface_2 =
{
0,
0,
@@ -2101,7 +2101,7 @@ static struct AY8910interface ay8910_interface_2 =
k005289_control_B_w
};
-static struct k005289_interface k005289_interface =
+static const struct k005289_interface k005289_interface =
{
REGION_SOUND1 /* prom memory region */
};
@@ -2112,17 +2112,17 @@ static void sound_irq(int state)
/*cpunum_set_input_line(1,0,HOLD_LINE);*/
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
sound_irq
};
-static struct YM3812interface ym3812_interface =
+static const struct YM3812interface ym3812_interface =
{
sound_irq
};
-static struct VLM5030interface vlm5030_interface =
+static const struct VLM5030interface vlm5030_interface =
{
REGION_SOUND1, /* memory region */
0 /* memory length */
@@ -2134,7 +2134,7 @@ static void volume_callback(int v)
K007232_set_volume(0,1,0,(v & 0x0f) * 0x11);
}
-static struct K007232_interface k007232_interface =
+static const struct K007232_interface k007232_interface =
{
REGION_SOUND2, /* memory regions */
volume_callback /* external port callback */
diff --git a/src/mame/drivers/ninjakd2.c b/src/mame/drivers/ninjakd2.c
index 7e319b266d2..7a38b8d1f98 100644
--- a/src/mame/drivers/ninjakd2.c
+++ b/src/mame/drivers/ninjakd2.c
@@ -462,7 +462,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,0,0,0,irqhandler
};
diff --git a/src/mame/drivers/ninjaw.c b/src/mame/drivers/ninjaw.c
index 99d9b128c6e..f62c420ba5f 100644
--- a/src/mame/drivers/ninjaw.c
+++ b/src/mame/drivers/ninjaw.c
@@ -595,7 +595,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2610interface ym2610_interface =
+static const struct YM2610interface ym2610_interface =
{
irqhandler,
REGION_SOUND2, /* Delta-T */
@@ -622,7 +622,7 @@ static int subwoofer_sh_start(const sound_config *msound)
return 0;
}
-static struct CustomSound_interface subwoofer_interface =
+static const struct CustomSound_interface subwoofer_interface =
{
subwoofer_sh_start,
0, /* none */
diff --git a/src/mame/drivers/niyanpai.c b/src/mame/drivers/niyanpai.c
index 259c3ee4a3b..2e6c7517172 100644
--- a/src/mame/drivers/niyanpai.c
+++ b/src/mame/drivers/niyanpai.c
@@ -839,7 +839,7 @@ static INTERRUPT_GEN( niyanpai_interrupt )
cpunum_set_input_line(0, 1, HOLD_LINE);
}
-static struct z80_irq_daisy_chain daisy_chain_sound[] =
+static const struct z80_irq_daisy_chain daisy_chain_sound[] =
{
{ z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 }, /* device 0 = CTC_1 */
{ 0, 0, 0, 0, -1 } /* end mark */
diff --git a/src/mame/drivers/nmg5.c b/src/mame/drivers/nmg5.c
index 8e377aefce2..88ba9aeec9f 100644
--- a/src/mame/drivers/nmg5.c
+++ b/src/mame/drivers/nmg5.c
@@ -961,7 +961,7 @@ static void soundirq(int state)
cpunum_set_input_line(1, 0, state);
}
-static struct YM3812interface ym3812_intf =
+static const struct YM3812interface ym3812_intf =
{
soundirq /* IRQ Line */
};
diff --git a/src/mame/drivers/nmk16.c b/src/mame/drivers/nmk16.c
index 4655f1f93a3..d98730c79d7 100644
--- a/src/mame/drivers/nmk16.c
+++ b/src/mame/drivers/nmk16.c
@@ -244,7 +244,7 @@ static READ16_HANDLER( tharrier_mcu_r )
all word accesses are to the input port */
if (ACCESSING_MSB && !ACCESSING_LSB)
{
- static UINT8 to_main[] =
+ static const UINT8 to_main[] =
{
0x82,0xc7,0x00,0x2c,0x6c,0x00,0x9f,0xc7,0x00,0x29,0x69,0x00,0x8b,0xc7,0x00
};
@@ -2878,7 +2878,7 @@ GFXDECODE_END
-static struct YM2203interface ym2203_nmk004_interface =
+static const struct YM2203interface ym2203_nmk004_interface =
{
0,0,0,0,NMK004_irq
};
@@ -2888,7 +2888,7 @@ static void ym2203_irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,0,0,0,ym2203_irqhandler
};
@@ -4850,7 +4850,7 @@ ROM_END
-static UINT8 decode_byte(UINT8 src, UINT8 *bitp)
+static UINT8 decode_byte(UINT8 src, const UINT8 *bitp)
{
UINT8 ret, i;
@@ -4867,7 +4867,7 @@ static UINT32 bjtwin_address_map_bg0(UINT32 addr)
}
-static UINT16 decode_word(UINT16 src, UINT8 *bitp)
+static UINT16 decode_word(UINT16 src, const UINT8 *bitp)
{
UINT16 ret, i;
@@ -4891,7 +4891,7 @@ static void decode_gfx(void)
UINT8 *rom;
int A;
- static UINT8 decode_data_bg[8][8] =
+ static const UINT8 decode_data_bg[8][8] =
{
{0x3,0x0,0x7,0x2,0x5,0x1,0x4,0x6},
{0x1,0x2,0x6,0x5,0x4,0x0,0x3,0x7},
@@ -4903,7 +4903,7 @@ static void decode_gfx(void)
{0x3,0x4,0x7,0x6,0x2,0x0,0x5,0x1},
};
- static UINT8 decode_data_sprite[8][16] =
+ static const UINT8 decode_data_sprite[8][16] =
{
{0x9,0x3,0x4,0x5,0x7,0x1,0xb,0x8,0x0,0xd,0x2,0xc,0xe,0x6,0xf,0xa},
{0x1,0x3,0xc,0x4,0x0,0xf,0xb,0xa,0x8,0x5,0xe,0x6,0xd,0x2,0x7,0x9},
@@ -4943,13 +4943,13 @@ static void decode_tdragonb(void)
int A;
/* The Main 68k Program of the Bootleg is Bitswapped */
- static UINT8 decode_data_tdragonb[1][16] =
+ static const UINT8 decode_data_tdragonb[1][16] =
{
{0xe,0xc,0xa,0x8,0x7,0x5,0x3,0x1,0xf,0xd,0xb,0x9,0x6,0x4,0x2,0x0},
};
/* Graphic Roms Could Also Do With Rearranging to make things simpler */
- static UINT8 decode_data_tdragonbgfx[1][8] =
+ static const UINT8 decode_data_tdragonbgfx[1][8] =
{
{0x7,0x6,0x5,0x3,0x4,0x2,0x1,0x0},
};
@@ -4988,7 +4988,7 @@ static void decode_ssmissin(void)
int A;
/* Graphic Roms Could Also Do With Rearranging to make things simpler */
- static UINT8 decode_data_tdragonbgfx[1][8] =
+ static const UINT8 decode_data_tdragonbgfx[1][8] =
{
{0x7,0x6,0x5,0x3,0x4,0x2,0x1,0x0},
};
diff --git a/src/mame/drivers/nova2001.c b/src/mame/drivers/nova2001.c
index bb194946101..3a21a9296c2 100644
--- a/src/mame/drivers/nova2001.c
+++ b/src/mame/drivers/nova2001.c
@@ -173,7 +173,7 @@ GFXDECODE_END
-static struct AY8910interface ay8910_interface_1 =
+static const struct AY8910interface ay8910_interface_1 =
{
0,
0,
@@ -181,7 +181,7 @@ static struct AY8910interface ay8910_interface_1 =
nova2001_scroll_y_w
};
-static struct AY8910interface ay8910_interface_2 =
+static const struct AY8910interface ay8910_interface_2 =
{
input_port_3_r,
input_port_4_r
diff --git a/src/mame/drivers/nss.c b/src/mame/drivers/nss.c
index 6451e8398f6..84582b8e93a 100644
--- a/src/mame/drivers/nss.c
+++ b/src/mame/drivers/nss.c
@@ -443,7 +443,7 @@ static INPUT_PORTS_START( snes )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
INPUT_PORTS_END
-static struct CustomSound_interface snes_sound_interface =
+static const struct CustomSound_interface snes_sound_interface =
{ snes_sh_start };
static GFXDECODE_START( nss )
diff --git a/src/mame/drivers/nwk-tr.c b/src/mame/drivers/nwk-tr.c
index f1729ab4e7c..fca61e280e0 100644
--- a/src/mame/drivers/nwk-tr.c
+++ b/src/mame/drivers/nwk-tr.c
@@ -74,7 +74,7 @@ static int K001604_layer_size;
#define K001604_NUM_TILES_LAYER0 16384
#define K001604_NUM_TILES_LAYER1 4096
-static gfx_layout K001604_char_layout_layer_8x8 =
+static const gfx_layout K001604_char_layout_layer_8x8 =
{
8, 8,
K001604_NUM_TILES_LAYER0,
@@ -85,7 +85,7 @@ static gfx_layout K001604_char_layout_layer_8x8 =
8*128
};
-static gfx_layout K001604_char_layout_layer_16x16 =
+static const gfx_layout K001604_char_layout_layer_16x16 =
{
16, 16,
K001604_NUM_TILES_LAYER1,
@@ -885,17 +885,17 @@ static INPUT_PORTS_START( nwktr )
INPUT_PORTS_END
-static struct RF5C400interface rf5c400_interface =
+static const struct RF5C400interface rf5c400_interface =
{
REGION_SOUND1
};
-static ppc_config nwktr_ppc_cfg =
+static const ppc_config nwktr_ppc_cfg =
{
PPC_MODEL_403GA
};
-static sharc_config sharc_cfg =
+static const sharc_config sharc_cfg =
{
BOOT_MODE_EPROM
};
diff --git a/src/mame/drivers/nycaptor.c b/src/mame/drivers/nycaptor.c
index db2927d5eca..2777fc6e3c0 100644
--- a/src/mame/drivers/nycaptor.c
+++ b/src/mame/drivers/nycaptor.c
@@ -294,7 +294,7 @@ static WRITE8_HANDLER(unk_w)
}
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
0,
0,
@@ -302,7 +302,7 @@ static struct AY8910interface ay8910_interface =
unk_w
};
-static struct MSM5232interface msm5232_interface =
+static const struct MSM5232interface msm5232_interface =
{
{ 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6 } /* 0.65 (???) uF capacitors (match the sample, not verified) */
};
diff --git a/src/mame/drivers/nyny.c b/src/mame/drivers/nyny.c
index 8a58065bc70..e31fd5e307f 100644
--- a/src/mame/drivers/nyny.c
+++ b/src/mame/drivers/nyny.c
@@ -208,7 +208,7 @@ static void ic48_1_74123_output_changed(int output)
}
-static TTL74123_interface ic48_1_intf =
+static const TTL74123_interface ic48_1_intf =
{
TTL74123_GROUNDED, /* the hook up type */
RES_K(22), /* resistor connected to RCext */
@@ -454,7 +454,7 @@ static WRITE8_HANDLER( nyny_ay8910_37_port_b_w )
}
-static struct AY8910interface ay8910_37_interface =
+static const struct AY8910interface ay8910_37_interface =
{
0,
0,
@@ -463,7 +463,7 @@ static struct AY8910interface ay8910_37_interface =
};
-static struct AY8910interface ay8910_64_interface =
+static const struct AY8910interface ay8910_64_interface =
{
input_port_3_r,
input_port_2_r
diff --git a/src/mame/drivers/ojankohs.c b/src/mame/drivers/ojankohs.c
index 9f42fec5250..2804495075f 100644
--- a/src/mame/drivers/ojankohs.c
+++ b/src/mame/drivers/ojankohs.c
@@ -924,25 +924,25 @@ static GFXDECODE_START( ojankohs )
GFXDECODE_END
-static struct AY8910interface ojankohs_ay8910_interface =
+static const struct AY8910interface ojankohs_ay8910_interface =
{
ojankohs_ay8910_0_r, /* read port #0 */
ojankohs_ay8910_1_r /* read port #1 */
};
-static struct AY8910interface ojankoy_ay8910_interface =
+static const struct AY8910interface ojankoy_ay8910_interface =
{
ojankoy_ay8910_0_r, /* read port #0 */
ojankoy_ay8910_1_r, /* read port #1 */
};
-static struct AY8910interface ojankoc_ay8910_interface =
+static const struct AY8910interface ojankoc_ay8910_interface =
{
input_port_0_r, /* read port #0 */
input_port_1_r /* read port #1 */
};
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
ojankohs_adpcm_int, /* IRQ handler */
MSM5205_S48_4B /* 8 KHz */
diff --git a/src/mame/drivers/omegrace.c b/src/mame/drivers/omegrace.c
index 0c7ee4d9707..7fcddb40987 100644
--- a/src/mame/drivers/omegrace.c
+++ b/src/mame/drivers/omegrace.c
@@ -277,7 +277,7 @@ static READ8_HANDLER( omegrace_vg_status_r )
* 5 4 3 2 1 0 for encoder 2 (not shifted..)
*/
-static UINT8 spinnerTable[64] =
+static const UINT8 spinnerTable[64] =
{
0x00, 0x04, 0x14, 0x10, 0x18, 0x1c, 0x5c, 0x58,
0x50, 0x54, 0x44, 0x40, 0x48, 0x4c, 0x6c, 0x68,
diff --git a/src/mame/drivers/oneshot.c b/src/mame/drivers/oneshot.c
index c870e6f52c6..2979d95d001 100644
--- a/src/mame/drivers/oneshot.c
+++ b/src/mame/drivers/oneshot.c
@@ -361,7 +361,7 @@ static void irq_handler(int irq)
cpunum_set_input_line(1, 0, irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM3812interface ym3812_interface =
+static const struct YM3812interface ym3812_interface =
{
irq_handler
};
diff --git a/src/mame/drivers/onetwo.c b/src/mame/drivers/onetwo.c
index 91efcd29034..714a56f954f 100644
--- a/src/mame/drivers/onetwo.c
+++ b/src/mame/drivers/onetwo.c
@@ -255,7 +255,7 @@ static void irqhandler(int linestate)
cpunum_set_input_line(1,0,linestate);
}
-static struct YM3812interface ym3812_interface =
+static const struct YM3812interface ym3812_interface =
{
irqhandler /* IRQ Line */
};
diff --git a/src/mame/drivers/opwolf.c b/src/mame/drivers/opwolf.c
index 4cb7cd7de87..3129deb94e0 100644
--- a/src/mame/drivers/opwolf.c
+++ b/src/mame/drivers/opwolf.c
@@ -138,13 +138,13 @@ static WRITE16_HANDLER( cchip_w )
static READ16_HANDLER( opwolf_in_r )
{
- static const char *inname[2] = { "IN0", "IN1" };
+ static const char *const inname[2] = { "IN0", "IN1" };
return readinputportbytag(inname[offset]);
}
static READ16_HANDLER( opwolf_dsw_r )
{
- static const char *dswname[2] = { "DSWA", "DSWB" };
+ static const char *const dswname[2] = { "DSWA", "DSWB" };
return readinputportbytag(dswname[offset]);
}
@@ -542,14 +542,14 @@ static void irq_handler(int irq)
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
irq_handler,
sound_bankswitch_w
};
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
opwolf_msm5205_vck, /* VCK function */
MSM5205_S48_4B /* 8 kHz */
diff --git a/src/mame/drivers/othunder.c b/src/mame/drivers/othunder.c
index 697d2b5610e..986128568cf 100644
--- a/src/mame/drivers/othunder.c
+++ b/src/mame/drivers/othunder.c
@@ -419,7 +419,7 @@ static READ16_HANDLER( othunder_TC0220IOC_r )
static READ16_HANDLER( othunder_lightgun_r )
{
- static const char *dswname[4] = { P1X_PORT_TAG, P1Y_PORT_TAG, P2X_PORT_TAG, P2Y_PORT_TAG };
+ static const char *const dswname[4] = { P1X_PORT_TAG, P1Y_PORT_TAG, P2X_PORT_TAG, P2Y_PORT_TAG };
return readinputportbytag(dswname[offset]);
}
@@ -689,7 +689,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2610interface ym2610_interface =
+static const struct YM2610interface ym2610_interface =
{
irqhandler,
REGION_SOUND2, /* Delta-T */
diff --git a/src/mame/drivers/overdriv.c b/src/mame/drivers/overdriv.c
index b900332d854..c3e63336d88 100644
--- a/src/mame/drivers/overdriv.c
+++ b/src/mame/drivers/overdriv.c
@@ -385,7 +385,7 @@ GFXDECODE_END
-static struct K053260_interface k053260_interface =
+static const struct K053260_interface k053260_interface =
{
REGION_SOUND1
};
diff --git a/src/mame/drivers/pacland.c b/src/mame/drivers/pacland.c
index 72bc22731a3..b15923db899 100644
--- a/src/mame/drivers/pacland.c
+++ b/src/mame/drivers/pacland.c
@@ -400,7 +400,7 @@ GFXDECODE_END
-static struct namco_interface namco_interface =
+static const struct namco_interface namco_interface =
{
8, /* number of voices */
-1, /* memory region */
diff --git a/src/mame/drivers/pacman.c b/src/mame/drivers/pacman.c
index bcbfae28e43..b37a98f38cb 100644
--- a/src/mame/drivers/pacman.c
+++ b/src/mame/drivers/pacman.c
@@ -3048,7 +3048,7 @@ GFXDECODE_END
*
*************************************/
-static struct namco_interface namco_interface =
+static const struct namco_interface namco_interface =
{
3, /* number of voices */
REGION_SOUND1 /* memory region */
@@ -3314,7 +3314,7 @@ static MACHINE_DRIVER_START( crush4 )
MDRV_GFXDECODE(crush4)
MACHINE_DRIVER_END
-static struct AY8910interface crushs_ay8910_interface =
+static const struct AY8910interface crushs_ay8910_interface =
{
NULL
};
diff --git a/src/mame/drivers/pandoras.c b/src/mame/drivers/pandoras.c
index 2ec2c337e02..f8cc6662d51 100644
--- a/src/mame/drivers/pandoras.c
+++ b/src/mame/drivers/pandoras.c
@@ -388,7 +388,7 @@ static READ8_HANDLER( pandoras_portB_r )
return (activecpu_gettotalcycles() / 512) & 0x0f;
}
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
pandoras_portA_r, // not used
pandoras_portB_r
diff --git a/src/mame/drivers/parodius.c b/src/mame/drivers/parodius.c
index c648d92916e..67f90e87232 100644
--- a/src/mame/drivers/parodius.c
+++ b/src/mame/drivers/parodius.c
@@ -286,7 +286,7 @@ INPUT_PORTS_END
***************************************************************************/
-static struct K053260_interface k053260_interface =
+static const struct K053260_interface k053260_interface =
{
REGION_SOUND1 /* memory region */
};
diff --git a/src/mame/drivers/pastelg.c b/src/mame/drivers/pastelg.c
index bf4fccd421a..8d2e61c28be 100644
--- a/src/mame/drivers/pastelg.c
+++ b/src/mame/drivers/pastelg.c
@@ -191,7 +191,7 @@ static INPUT_PORTS_START( pastelg )
INPUT_PORTS_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
input_port_1_r,
input_port_0_r
diff --git a/src/mame/drivers/pcktgal.c b/src/mame/drivers/pcktgal.c
index 95aa05a4284..6e80cb4fe11 100644
--- a/src/mame/drivers/pcktgal.c
+++ b/src/mame/drivers/pcktgal.c
@@ -225,7 +225,7 @@ GFXDECODE_END
/***************************************************************************/
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
pcktgal_adpcm_int, /* interrupt function */
MSM5205_S48_4B /* 8KHz */
diff --git a/src/mame/drivers/pengo.c b/src/mame/drivers/pengo.c
index 3f00200fd60..fbfbb3350e7 100644
--- a/src/mame/drivers/pengo.c
+++ b/src/mame/drivers/pengo.c
@@ -329,7 +329,7 @@ GFXDECODE_END
*
*************************************/
-static struct namco_interface namco_interface =
+static const struct namco_interface namco_interface =
{
3, /* number of voices */
REGION_SOUND1 /* memory region */
diff --git a/src/mame/drivers/pgm.c b/src/mame/drivers/pgm.c
index f6b1c287fcd..6e4c8e26e30 100644
--- a/src/mame/drivers/pgm.c
+++ b/src/mame/drivers/pgm.c
@@ -460,7 +460,7 @@ static void sound_irq(int level)
cpunum_set_input_line(1, 0, level);
}
-static struct ics2115_interface pgm_ics2115_interface = {
+static const struct ics2115_interface pgm_ics2115_interface = {
REGION_SOUND1,
sound_irq
};
diff --git a/src/mame/drivers/phoenix.c b/src/mame/drivers/phoenix.c
index 30edd8b23c3..fab040de6a0 100644
--- a/src/mame/drivers/phoenix.c
+++ b/src/mame/drivers/phoenix.c
@@ -674,19 +674,19 @@ static GFXDECODE_START( pleiads )
GFXDECODE_END
-static struct TMS36XXinterface phoenix_tms36xx_interface =
+static const struct TMS36XXinterface phoenix_tms36xx_interface =
{
MM6221AA, /* TMS36xx subtype(s) */
{0.50,0,0,1.05,0,0}, /* decay times of voices */
0.21 /* tune speed (time between beats) */
};
-static struct CustomSound_interface phoenix_custom_interface =
+static const struct CustomSound_interface phoenix_custom_interface =
{
phoenix_sh_start
};
-static struct TMS36XXinterface pleiads_tms36xx_interface =
+static const struct TMS36XXinterface pleiads_tms36xx_interface =
{
TMS3615, /* TMS36xx subtype(s) */
/*
@@ -698,12 +698,12 @@ static struct TMS36XXinterface pleiads_tms36xx_interface =
{0.33,0.33,0,0.33,0,0.33}
};
-static struct CustomSound_interface pleiads_custom_interface =
+static const struct CustomSound_interface pleiads_custom_interface =
{
pleiads_sh_start
};
-static struct AY8910interface survival_ay8910_interface =
+static const struct AY8910interface survival_ay8910_interface =
{
0,
survival_protection_r
diff --git a/src/mame/drivers/pipedrm.c b/src/mame/drivers/pipedrm.c
index ab24a3c3f1f..4e2001bf417 100644
--- a/src/mame/drivers/pipedrm.c
+++ b/src/mame/drivers/pipedrm.c
@@ -531,14 +531,14 @@ static void irqhandler(int irq)
}
-static struct YM2608interface ym2608_interface =
+static const struct YM2608interface ym2608_interface =
{
0,0,0,0,irqhandler,
REGION_SOUND1
};
-static struct YM2610interface ym2610_interface =
+static const struct YM2610interface ym2610_interface =
{
irqhandler,
REGION_SOUND1,
diff --git a/src/mame/drivers/pipeline.c b/src/mame/drivers/pipeline.c
index f743adb4a9c..d4d8b16ad0d 100644
--- a/src/mame/drivers/pipeline.c
+++ b/src/mame/drivers/pipeline.c
@@ -300,7 +300,7 @@ static z80ctc_interface ctc_intf =
0, // ZC/TO2 callback
};
-static struct z80_irq_daisy_chain daisy_chain_sound[] =
+static const struct z80_irq_daisy_chain daisy_chain_sound[] =
{
{ z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 }, /* device 0 = CTC_1 */
{ 0, 0, 0, 0, -1 } /* end mark */
@@ -317,7 +317,7 @@ static const ppi8255_interface ppi8255_intf =
{ vidctrl_w, protection_w, NULL }, /* Port C write */
};
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,
0,
diff --git a/src/mame/drivers/pitnrun.c b/src/mame/drivers/pitnrun.c
index b20bbd7a68c..22c0cc028de 100644
--- a/src/mame/drivers/pitnrun.c
+++ b/src/mame/drivers/pitnrun.c
@@ -271,7 +271,7 @@ static const gfx_layout charlayout =
8*8*2
};
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
soundlatch_r,
soundlatch_r
diff --git a/src/mame/drivers/pkscram.c b/src/mame/drivers/pkscram.c
index 6ea17fc3966..efdff56d92b 100644
--- a/src/mame/drivers/pkscram.c
+++ b/src/mame/drivers/pkscram.c
@@ -264,7 +264,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(0,2,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,0,0,0,
irqhandler
diff --git a/src/mame/drivers/pkunwar.c b/src/mame/drivers/pkunwar.c
index 9282cb3185b..5d7a471cc0f 100644
--- a/src/mame/drivers/pkunwar.c
+++ b/src/mame/drivers/pkunwar.c
@@ -151,12 +151,12 @@ GFXDECODE_END
-static struct AY8910interface ay8910_interface_1 = {
+static const struct AY8910interface ay8910_interface_1 = {
input_port_0_r,
input_port_1_r
};
-static struct AY8910interface ay8910_interface_2 = {
+static const struct AY8910interface ay8910_interface_2 = {
input_port_2_r,
input_port_3_r
};
diff --git a/src/mame/drivers/playch10.c b/src/mame/drivers/playch10.c
index f3973a7e6a4..8a27dea1b01 100644
--- a/src/mame/drivers/playch10.c
+++ b/src/mame/drivers/playch10.c
@@ -724,7 +724,7 @@ static INTERRUPT_GEN( playch10_interrupt ) {
cpunum_set_input_line(0, INPUT_LINE_NMI, PULSE_LINE);
}
-static struct NESinterface nes_interface =
+static const struct NESinterface nes_interface =
{
REGION_CPU2
};
diff --git a/src/mame/drivers/plygonet.c b/src/mame/drivers/plygonet.c
index b6100b9a718..898c8259b72 100644
--- a/src/mame/drivers/plygonet.c
+++ b/src/mame/drivers/plygonet.c
@@ -657,7 +657,7 @@ static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0xfff1, 0xfff3) AM_WRITE(MWA8_NOP)
ADDRESS_MAP_END
-static struct K054539interface k054539_interface =
+static const struct K054539interface k054539_interface =
{
REGION_SOUND1
};
diff --git a/src/mame/drivers/pntnpuzl.c b/src/mame/drivers/pntnpuzl.c
index bb3f678ee26..f4a6af41933 100644
--- a/src/mame/drivers/pntnpuzl.c
+++ b/src/mame/drivers/pntnpuzl.c
@@ -344,7 +344,7 @@ static WRITE16_HANDLER( pntnpuzl_280018_w )
static READ16_HANDLER( pntnpuzl_280014_r )
{
- static int startup[3] = { 0x80, 0x0c, 0x00 };
+ static const int startup[3] = { 0x80, 0x0c, 0x00 };
int res;
if (serial_out == 0x11)
diff --git a/src/mame/drivers/polepos.c b/src/mame/drivers/polepos.c
index 9f08882e658..0b1889b1bd1 100644
--- a/src/mame/drivers/polepos.c
+++ b/src/mame/drivers/polepos.c
@@ -397,12 +397,12 @@ static WRITE8_HANDLER( out_1 )
coin_lockout_global_w(data & 1);
}
-static struct namcoio_interface intf0 =
+static const struct namcoio_interface intf0 =
{
{ in0_l, in0_h, dipB_l, dipB_h }, /* port read handlers */
{ out_0, out_1 } /* port write handlers */
};
-static struct namcoio_interface intf1 =
+static const struct namcoio_interface intf1 =
{
{ in1_l, in1_h, dipA_l, dipA_h }, /* port read handlers */
{ NULL, NULL } /* port write handlers */
@@ -825,7 +825,7 @@ GFXDECODE_END
* Sound interfaces
*********************************************************************/
-static struct namco_interface namco_interface =
+static const struct namco_interface namco_interface =
{
8, /* number of voices */
REGION_SOUND1, /* memory region */
@@ -852,7 +852,7 @@ static struct namco_interface namco_interface =
* to allow headroom when more the one effect is played.
*/
-static struct namco_52xx_interface namco_52xx_interface =
+static const struct namco_52xx_interface namco_52xx_interface =
{
REGION_SOUND3, /* memory region */
0, /* Use internal Playback frequency */
@@ -863,7 +863,7 @@ static struct namco_52xx_interface namco_52xx_interface =
.5 /* Combined gain of both filters */
};
-static struct CustomSound_interface custom_interface =
+static const struct CustomSound_interface custom_interface =
{
polepos_sh_start,
NULL,
diff --git a/src/mame/drivers/policetr.c b/src/mame/drivers/policetr.c
index 29aa6721751..a061c21653a 100644
--- a/src/mame/drivers/policetr.c
+++ b/src/mame/drivers/policetr.c
@@ -464,7 +464,7 @@ INPUT_PORTS_END
*
*************************************/
-static struct r3000_config config =
+static const struct r3000_config config =
{
0, /* 1 if we have an FPU, 0 otherwise */
4096, /* code cache size */
diff --git a/src/mame/drivers/popeye.c b/src/mame/drivers/popeye.c
index 317d49cb796..245ef60c4de 100644
--- a/src/mame/drivers/popeye.c
+++ b/src/mame/drivers/popeye.c
@@ -469,7 +469,7 @@ static READ8_HANDLER( popeye_portA_r )
return res;
}
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
popeye_portA_r,
0,
diff --git a/src/mame/drivers/powerins.c b/src/mame/drivers/powerins.c
index 0f9ef6402ce..26fcf4fe9ba 100644
--- a/src/mame/drivers/powerins.c
+++ b/src/mame/drivers/powerins.c
@@ -336,7 +336,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0, 0, 0, 0,
irqhandler
diff --git a/src/mame/drivers/prehisle.c b/src/mame/drivers/prehisle.c
index 274d0ffbe6a..aa2dd67df58 100644
--- a/src/mame/drivers/prehisle.c
+++ b/src/mame/drivers/prehisle.c
@@ -219,12 +219,12 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM3812interface ym3812_interface =
+static const struct YM3812interface ym3812_interface =
{
irqhandler
};
-static struct upd7759_interface upd7759_interface =
+static const struct upd7759_interface upd7759_interface =
{
REGION_SOUND1 /* memory region */
};
diff --git a/src/mame/drivers/progolf.c b/src/mame/drivers/progolf.c
index e3eb588b20b..77cdc6de392 100644
--- a/src/mame/drivers/progolf.c
+++ b/src/mame/drivers/progolf.c
@@ -120,7 +120,7 @@ static INPUT_PORTS_START( progolf )
PORT_BIT( 0x80, IP_ACTIVE_HIGH,IPT_COIN2 ) PORT_IMPULSE(2)
INPUT_PORTS_END
-static gfx_layout charlayout =
+static const gfx_layout charlayout =
{
8,8, /* 8*8 characters */
1024, /* 1024 characters */
@@ -131,7 +131,7 @@ static gfx_layout charlayout =
8*8 /* every char takes 8 consecutive bytes */
};
-static gfx_layout spritelayout =
+static const gfx_layout spritelayout =
{
16,16, /* 16*16 sprites */
256, /* 256 sprites */
@@ -144,7 +144,7 @@ static gfx_layout spritelayout =
32*8 /* every sprite takes 32 consecutive bytes */
};
-static gfx_layout progolf_charlayout =
+static const gfx_layout progolf_charlayout =
{
8,8, /* 8*8 characters */
RGN_FRAC(1,3), /* 512 characters */
@@ -155,7 +155,7 @@ static gfx_layout progolf_charlayout =
8*8 /* every char takes 8 consecutive bytes */
};
-static gfx_layout progolf_charlayout2 =
+static const gfx_layout progolf_charlayout2 =
{
8,8, /* 8*8 characters */
RGN_FRAC(1,1), /* 512 characters */
@@ -167,7 +167,7 @@ static gfx_layout progolf_charlayout2 =
};
#if 1
-static gfx_layout progolf_spritelayout2 =
+static const gfx_layout progolf_spritelayout2 =
{
16,16, /* 16*16 sprites */
RGN_FRAC(1,1), /* 256 sprites */
diff --git a/src/mame/drivers/psikyo.c b/src/mame/drivers/psikyo.c
index d382d3a822e..ab01188d677 100644
--- a/src/mame/drivers/psikyo.c
+++ b/src/mame/drivers/psikyo.c
@@ -1552,7 +1552,7 @@ GFXDECODE_END
***************************************************************************/
-static struct YM2610interface sngkace_ym2610_interface =
+static const struct YM2610interface sngkace_ym2610_interface =
{
sound_irq, /* irq */
REGION_SOUND1, /* delta_t */
@@ -1606,7 +1606,7 @@ MACHINE_DRIVER_END
***************************************************************************/
-static struct YM2610interface gunbird_ym2610_interface =
+static const struct YM2610interface gunbird_ym2610_interface =
{
sound_irq, /* irq */
REGION_SOUND1, /* delta_t */
@@ -1669,7 +1669,7 @@ static void irqhandler(int linestate)
cpunum_set_input_line(1, 0, CLEAR_LINE);
}
-static struct YMF278B_interface ymf278b_interface =
+static const struct YMF278B_interface ymf278b_interface =
{
REGION_SOUND1,
irqhandler
diff --git a/src/mame/drivers/psikyo4.c b/src/mame/drivers/psikyo4.c
index 96efe286556..fda706363a7 100644
--- a/src/mame/drivers/psikyo4.c
+++ b/src/mame/drivers/psikyo4.c
@@ -481,7 +481,7 @@ static void irqhandler(int linestate)
cpunum_set_input_line(0, 12, CLEAR_LINE);
}
-static struct YMF278B_interface ymf278b_interface =
+static const struct YMF278B_interface ymf278b_interface =
{
REGION_SOUND1,
irqhandler
diff --git a/src/mame/drivers/psikyosh.c b/src/mame/drivers/psikyosh.c
index 148d27b16bf..642548f4feb 100644
--- a/src/mame/drivers/psikyosh.c
+++ b/src/mame/drivers/psikyosh.c
@@ -318,7 +318,7 @@ static GFXDECODE_START( psikyosh )
GFXDECODE_ENTRY( REGION_GFX1, 0, layout_16x16x8, 0x000, 0x100 ) // 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
@@ -587,7 +587,7 @@ static void irqhandler(int linestate)
cpunum_set_input_line(0, 12, CLEAR_LINE);
}
-static struct YMF278B_interface ymf278b_interface =
+static const struct YMF278B_interface ymf278b_interface =
{
REGION_SOUND1,
irqhandler
diff --git a/src/mame/drivers/psychic5.c b/src/mame/drivers/psychic5.c
index aef6af609aa..ee37820a8f2 100644
--- a/src/mame/drivers/psychic5.c
+++ b/src/mame/drivers/psychic5.c
@@ -539,7 +539,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,0,0,0,irqhandler
};
diff --git a/src/mame/drivers/pturn.c b/src/mame/drivers/pturn.c
index f000440e659..a13bd63cdbf 100644
--- a/src/mame/drivers/pturn.c
+++ b/src/mame/drivers/pturn.c
@@ -85,7 +85,7 @@ static int fgpalette=0;
static int bgcolor=0;
-static UINT8 tile_lookup[0x10]=
+static const UINT8 tile_lookup[0x10]=
{
0x00, 0x10, 0x40, 0x50,
0x20, 0x30, 0x60, 0x70,
diff --git a/src/mame/drivers/puckpkmn.c b/src/mame/drivers/puckpkmn.c
index d3a970aee6e..8c9e15452d8 100644
--- a/src/mame/drivers/puckpkmn.c
+++ b/src/mame/drivers/puckpkmn.c
@@ -148,7 +148,7 @@ static ADDRESS_MAP_START( puckpkmn_writemem, ADDRESS_SPACE_PROGRAM, 16 )
ADDRESS_MAP_END
-static struct YM3438interface ym3438_intf =
+static const struct YM3438interface ym3438_intf =
{
genesis_irq2_interrupt /* IRQ handler */
};
diff --git a/src/mame/drivers/punchout.c b/src/mame/drivers/punchout.c
index 2f3f7c26e4d..6ba7b311ebb 100644
--- a/src/mame/drivers/punchout.c
+++ b/src/mame/drivers/punchout.c
@@ -764,13 +764,13 @@ GFXDECODE_END
-static struct NESinterface nes_interface =
+static const struct NESinterface nes_interface =
{
REGION_CPU2
};
-static struct VLM5030interface vlm5030_interface =
+static const struct VLM5030interface vlm5030_interface =
{
REGION_SOUND1, /* memory region of speech rom */
0 /* memory size of speech rom */
diff --git a/src/mame/drivers/pushman.c b/src/mame/drivers/pushman.c
index f83a6136d8b..7e82bfa12af 100644
--- a/src/mame/drivers/pushman.c
+++ b/src/mame/drivers/pushman.c
@@ -423,7 +423,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,0,0,0,irqhandler
};
diff --git a/src/mame/drivers/qdrmfgp.c b/src/mame/drivers/qdrmfgp.c
index b9653e53906..d18e2b4a0b9 100644
--- a/src/mame/drivers/qdrmfgp.c
+++ b/src/mame/drivers/qdrmfgp.c
@@ -593,12 +593,12 @@ INPUT_PORTS_END
*
*************************************/
-static struct ide_interface ide_intf =
+static const struct ide_interface ide_intf =
{
ide_interrupt,
};
-static struct ide_interface gp2_ide_intf =
+static const struct ide_interface gp2_ide_intf =
{
gp2_ide_interrupt,
};
@@ -616,14 +616,14 @@ static void sound_irq(void)
cpunum_set_input_line(0, 1, HOLD_LINE);
}
-static struct K054539interface k054539_interface =
+static const struct K054539interface k054539_interface =
{
REGION_SOUND1,
NULL,
sound_irq
};
-static struct K054539interface gp2_k054539_interface =
+static const struct K054539interface gp2_k054539_interface =
{
REGION_SOUND1
};
diff --git a/src/mame/drivers/quantum.c b/src/mame/drivers/quantum.c
index 4c6115873e9..a4ca4e1a00e 100644
--- a/src/mame/drivers/quantum.c
+++ b/src/mame/drivers/quantum.c
@@ -216,12 +216,12 @@ INPUT_PORTS_END
*
*************************************/
-static struct POKEYinterface pokey_interface_1 =
+static const struct POKEYinterface pokey_interface_1 =
{
{ input_1_r,input_1_r,input_1_r,input_1_r,input_1_r,input_1_r,input_1_r,input_1_r }
};
-static struct POKEYinterface pokey_interface_2 =
+static const struct POKEYinterface pokey_interface_2 =
{
{ input_2_r,input_2_r,input_2_r,input_2_r,input_2_r,input_2_r,input_2_r,input_2_r }
};
diff --git a/src/mame/drivers/quizdna.c b/src/mame/drivers/quizdna.c
index a595ea33f21..6360f66e594 100644
--- a/src/mame/drivers/quizdna.c
+++ b/src/mame/drivers/quizdna.c
@@ -443,7 +443,7 @@ static GFXDECODE_START( quizdna )
GFXDECODE_END
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
input_port_1_r,
input_port_0_r
diff --git a/src/mame/drivers/r2dtank.c b/src/mame/drivers/r2dtank.c
index fe401ae9843..1dfd730d9b4 100644
--- a/src/mame/drivers/r2dtank.c
+++ b/src/mame/drivers/r2dtank.c
@@ -186,14 +186,14 @@ static WRITE8_HANDLER( AY8910_port_w )
}
-static struct AY8910interface ay8910_1_interface =
+static const struct AY8910interface ay8910_1_interface =
{
input_port_3_r,
0
};
-static struct AY8910interface ay8910_2_interface =
+static const struct AY8910interface ay8910_2_interface =
{
input_port_1_r,
input_port_2_r
@@ -226,7 +226,7 @@ static UINT32 get_ttl74123_output(void *param)
}
-static TTL74123_interface ttl74123_intf =
+static const TTL74123_interface ttl74123_intf =
{
TTL74123_GROUNDED, /* the hook up type */
RES_K(22), /* resistor connected to RCext */
diff --git a/src/mame/drivers/raiders5.c b/src/mame/drivers/raiders5.c
index bc0f4c64c4e..973bbf0a603 100644
--- a/src/mame/drivers/raiders5.c
+++ b/src/mame/drivers/raiders5.c
@@ -206,13 +206,13 @@ GFXDECODE_END
-static struct AY8910interface ay8910_interface_1 =
+static const struct AY8910interface ay8910_interface_1 =
{
input_port_0_r,
input_port_1_r
};
-static struct AY8910interface ay8910_interface_2 =
+static const struct AY8910interface ay8910_interface_2 =
{
input_port_2_r,
input_port_3_r
diff --git a/src/mame/drivers/rainbow.c b/src/mame/drivers/rainbow.c
index 61ab20f7110..10198823772 100644
--- a/src/mame/drivers/rainbow.c
+++ b/src/mame/drivers/rainbow.c
@@ -601,7 +601,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
irqhandler,
bankswitch_w
diff --git a/src/mame/drivers/rallyx.c b/src/mame/drivers/rallyx.c
index 56f2b332ca4..d8755809d98 100644
--- a/src/mame/drivers/rallyx.c
+++ b/src/mame/drivers/rallyx.c
@@ -811,7 +811,7 @@ static GFXDECODE_START( jungler )
GFXDECODE_END
-static struct namco_interface namco_interface =
+static const struct namco_interface namco_interface =
{
3, /* number of voices */
REGION_SOUND1 /* memory region */
diff --git a/src/mame/drivers/rastan.c b/src/mame/drivers/rastan.c
index ab2b6b64fc9..bebbc1d4776 100644
--- a/src/mame/drivers/rastan.c
+++ b/src/mame/drivers/rastan.c
@@ -363,13 +363,13 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
irqhandler,
rastan_bankswitch_w
};
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
rastan_msm5205_vck, /* VCK function */
MSM5205_S48_4B /* 8 kHz */
diff --git a/src/mame/drivers/rcasino.c b/src/mame/drivers/rcasino.c
index ecff4f264b4..f6b43bffe93 100644
--- a/src/mame/drivers/rcasino.c
+++ b/src/mame/drivers/rcasino.c
@@ -283,7 +283,7 @@ static GFXDECODE_START( rcasino )
GFXDECODE_ENTRY( REGION_GFX2, 0x0000, charlayout2, 0, 16 )
GFXDECODE_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
input_port_2_r, // DSW1
input_port_3_r, // DSW2
diff --git a/src/mame/drivers/realbrk.c b/src/mame/drivers/realbrk.c
index 3536be74c83..3337261d542 100644
--- a/src/mame/drivers/realbrk.c
+++ b/src/mame/drivers/realbrk.c
@@ -654,7 +654,7 @@ GFXDECODE_END
Billiard Academy Real Break
***************************************************************************/
-static struct YMZ280Binterface realbrk_ymz280b_intf =
+static const struct YMZ280Binterface realbrk_ymz280b_intf =
{
REGION_SOUND1,
0
diff --git a/src/mame/drivers/redalert.c b/src/mame/drivers/redalert.c
index 76a8d622f9c..5615020306e 100644
--- a/src/mame/drivers/redalert.c
+++ b/src/mame/drivers/redalert.c
@@ -299,7 +299,7 @@ static GFXDECODE_START( demoneye )
GFXDECODE_END
/* Arbitrary colortable */
-static UINT16 colortable_source[] =
+static const UINT16 colortable_source[] =
{
0,7,
0,6,
@@ -344,7 +344,7 @@ static INTERRUPT_GEN( redalert_interrupt )
}
}
-static struct AY8910interface redalert_ay8910_interface =
+static const struct AY8910interface redalert_ay8910_interface =
{
redalert_AY8910_A_r, /* Port A Read */
0, /* Port B Read */
diff --git a/src/mame/drivers/renegade.c b/src/mame/drivers/renegade.c
index c4a4cb5a55a..2b6ab7328d9 100644
--- a/src/mame/drivers/renegade.c
+++ b/src/mame/drivers/renegade.c
@@ -764,12 +764,12 @@ static void irqhandler(int linestate)
cpunum_set_input_line(1, M6809_FIRQ_LINE, linestate);
}
-static struct YM3526interface ym3526_interface =
+static const struct YM3526interface ym3526_interface =
{
irqhandler
};
-static struct CustomSound_interface adpcm_interface =
+static const struct CustomSound_interface adpcm_interface =
{
renegade_adpcm_start
};
diff --git a/src/mame/drivers/rmhaihai.c b/src/mame/drivers/rmhaihai.c
index 57c3f72f0fc..59f09c93b53 100644
--- a/src/mame/drivers/rmhaihai.c
+++ b/src/mame/drivers/rmhaihai.c
@@ -494,13 +494,13 @@ GFXDECODE_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
input_port_0_r,
input_port_1_r
};
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
0, /* interrupt function */
MSM5205_SEX_4B /* vclk input mode */
diff --git a/src/mame/drivers/rockola.c b/src/mame/drivers/rockola.c
index 0d113979df0..9d73dcc433e 100644
--- a/src/mame/drivers/rockola.c
+++ b/src/mame/drivers/rockola.c
@@ -708,7 +708,7 @@ GFXDECODE_END
/* Sound Interfaces */
-static struct CustomSound_interface custom_interface =
+static const struct CustomSound_interface custom_interface =
{
rockola_sh_start
};
diff --git a/src/mame/drivers/rockrage.c b/src/mame/drivers/rockrage.c
index 768a2792c48..04104454d08 100644
--- a/src/mame/drivers/rockrage.c
+++ b/src/mame/drivers/rockrage.c
@@ -283,7 +283,7 @@ GFXDECODE_END
***************************************************************************/
-static struct VLM5030interface vlm5030_interface =
+static const struct VLM5030interface vlm5030_interface =
{
REGION_SOUND1, /* memory region of speech rom */
0
diff --git a/src/mame/drivers/rohga.c b/src/mame/drivers/rohga.c
index 42317101122..98d801b0e3c 100644
--- a/src/mame/drivers/rohga.c
+++ b/src/mame/drivers/rohga.c
@@ -803,7 +803,7 @@ static WRITE8_HANDLER( sound_bankswitch_w )
OKIM6295_set_bank_base(1, ((data & 2)>>1) * 0x40000);
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
sound_irq,
sound_bankswitch_w
diff --git a/src/mame/drivers/rollerg.c b/src/mame/drivers/rollerg.c
index 6e5fe311df4..207c038e9a6 100644
--- a/src/mame/drivers/rollerg.c
+++ b/src/mame/drivers/rollerg.c
@@ -236,7 +236,7 @@ INPUT_PORTS_END
***************************************************************************/
-static struct K053260_interface k053260_interface =
+static const struct K053260_interface k053260_interface =
{
REGION_SOUND1 /* memory region */
};
diff --git a/src/mame/drivers/route16.c b/src/mame/drivers/route16.c
index 6030ccb431e..2ea3fef4149 100644
--- a/src/mame/drivers/route16.c
+++ b/src/mame/drivers/route16.c
@@ -566,7 +566,7 @@ INPUT_PORTS_END
-static struct AY8910interface stratvox_ay8910_interface =
+static const struct AY8910interface stratvox_ay8910_interface =
{
0,
0,
diff --git a/src/mame/drivers/royalmah.c b/src/mame/drivers/royalmah.c
index b9eb50395d0..03c33c4cf1a 100644
--- a/src/mame/drivers/royalmah.c
+++ b/src/mame/drivers/royalmah.c
@@ -3302,7 +3302,7 @@ static INPUT_PORTS_START( mjdejavu )
INPUT_PORTS_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
royalmah_player_1_port_r,
royalmah_player_2_port_r
diff --git a/src/mame/drivers/rpunch.c b/src/mame/drivers/rpunch.c
index c52e71d90ea..f222db16fc6 100644
--- a/src/mame/drivers/rpunch.c
+++ b/src/mame/drivers/rpunch.c
@@ -594,13 +594,13 @@ GFXDECODE_END
*
*************************************/
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
ym2151_irq_gen
};
-static struct upd7759_interface upd7759_interface =
+static const struct upd7759_interface upd7759_interface =
{
REGION_SOUND1
};
diff --git a/src/mame/drivers/runaway.c b/src/mame/drivers/runaway.c
index 87bac649499..5b4f85d75f5 100644
--- a/src/mame/drivers/runaway.c
+++ b/src/mame/drivers/runaway.c
@@ -339,13 +339,13 @@ static GFXDECODE_START( qwak )
GFXDECODE_END
-static struct POKEYinterface pokey_interface_1 =
+static const struct POKEYinterface pokey_interface_1 =
{
{ 0 },
input_port_3_r
};
-static struct POKEYinterface pokey_interface_2 =
+static const struct POKEYinterface pokey_interface_2 =
{
{ runaway_pot_r,runaway_pot_r,runaway_pot_r,runaway_pot_r,runaway_pot_r,runaway_pot_r,runaway_pot_r,runaway_pot_r }
};
diff --git a/src/mame/drivers/rungun.c b/src/mame/drivers/rungun.c
index a6920e751f4..a89e785b6c0 100644
--- a/src/mame/drivers/rungun.c
+++ b/src/mame/drivers/rungun.c
@@ -301,7 +301,7 @@ static ADDRESS_MAP_START( sound_writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0xfff0, 0xfff3) AM_WRITE(MWA8_NOP)
ADDRESS_MAP_END
-static struct K054539interface k054539_interface =
+static const struct K054539interface k054539_interface =
{
REGION_SOUND1
};
diff --git a/src/mame/drivers/sandscrp.c b/src/mame/drivers/sandscrp.c
index 0b8a63b5500..5d618ef381f 100644
--- a/src/mame/drivers/sandscrp.c
+++ b/src/mame/drivers/sandscrp.c
@@ -353,7 +353,7 @@ static void irq_handler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2203interface ym2203_intf_sandscrp =
+static const struct YM2203interface ym2203_intf_sandscrp =
{
input_port_4_r, /* Port A Read - DSW 1 */
input_port_5_r, /* Port B Read - DSW 2 */
diff --git a/src/mame/drivers/sbasketb.c b/src/mame/drivers/sbasketb.c
index bf3e3dc9006..f7c40409d44 100644
--- a/src/mame/drivers/sbasketb.c
+++ b/src/mame/drivers/sbasketb.c
@@ -227,7 +227,7 @@ static GFXDECODE_START( sbasketb )
GFXDECODE_END
-static struct VLM5030interface sbasketb_vlm5030_interface =
+static const struct VLM5030interface sbasketb_vlm5030_interface =
{
REGION_SOUND1, /* memory region */
0 /* memory size */
diff --git a/src/mame/drivers/scobra.c b/src/mame/drivers/scobra.c
index 5b4d9dfbf72..9c2cc6ae10d 100644
--- a/src/mame/drivers/scobra.c
+++ b/src/mame/drivers/scobra.c
@@ -82,7 +82,7 @@ GFXDECODE_END
-static struct AY8910interface hustler_ay8910_interface =
+static const struct AY8910interface hustler_ay8910_interface =
{
soundlatch_r,
frogger_portB_r
@@ -1373,7 +1373,7 @@ MM_COMMON2
INPUT_PORTS_END
-static struct AY8910interface scobra_ay8910_interface_2 =
+static const struct AY8910interface scobra_ay8910_interface_2 =
{
soundlatch_r,
scramble_portB_r
diff --git a/src/mame/drivers/scramble.c b/src/mame/drivers/scramble.c
index 2c1e8bc822a..0dc982ba756 100644
--- a/src/mame/drivers/scramble.c
+++ b/src/mame/drivers/scramble.c
@@ -1930,13 +1930,13 @@ static GFXDECODE_START( ad2083 )
GFXDECODE_ENTRY( REGION_GFX1, 0x0000, ad2083_spritelayout, 0, 8 )
GFXDECODE_END
-static struct AY8910interface scramble_ay8910_interface_2 =
+static const struct AY8910interface scramble_ay8910_interface_2 =
{
soundlatch_r,
scramble_portB_r
};
-static struct AY8910interface sfx_ay8910_interface_1 =
+static const struct AY8910interface sfx_ay8910_interface_1 =
{
0,
0,
@@ -1944,23 +1944,23 @@ static struct AY8910interface sfx_ay8910_interface_1 =
sfx_sh_irqtrigger_w
};
-static struct AY8910interface explorer_ay8910_interface_1 =
+static const struct AY8910interface explorer_ay8910_interface_1 =
{
scramble_portB_r
};
-static struct AY8910interface explorer_ay8910_interface_2 =
+static const struct AY8910interface explorer_ay8910_interface_2 =
{
hotshock_soundlatch_r
};
-static struct AY8910interface hotshock_ay8910_interface_2 =
+static const struct AY8910interface hotshock_ay8910_interface_2 =
{
hotshock_soundlatch_r,
scramble_portB_r
};
-static struct AY8910interface scorpion_ay8910_interface_1 =
+static const struct AY8910interface scorpion_ay8910_interface_1 =
{
0,
0,
@@ -1968,12 +1968,12 @@ static struct AY8910interface scorpion_ay8910_interface_1 =
scorpion_sound_cmd_w,
};
-static struct AY8910interface triplep_ay8910_interface =
+static const struct AY8910interface triplep_ay8910_interface =
{
0
};
-static struct TMS5110interface tms5110_interface =
+static const struct TMS5110interface tms5110_interface =
{
0, /* irq callback function */
ad2083_speech_rom_read_bit /* M0 callback function. Called whenever chip requests a single bit of data */
@@ -2169,7 +2169,7 @@ static ADDRESS_MAP_START( frogger_sound_writeport, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x80, 0x80) AM_WRITE(AY8910_control_port_0_w)
ADDRESS_MAP_END
-static struct AY8910interface frogger_ay8910_interface =
+static const struct AY8910interface frogger_ay8910_interface =
{
soundlatch_r,
frogger_portB_r
diff --git a/src/mame/drivers/seattle.c b/src/mame/drivers/seattle.c
index a35277a764f..2ee0746766f 100644
--- a/src/mame/drivers/seattle.c
+++ b/src/mame/drivers/seattle.c
@@ -587,7 +587,7 @@ static void ide_interrupt(int state)
}
-static struct ide_interface ide_intf =
+static const struct ide_interface ide_intf =
{
ide_interrupt
};
@@ -614,7 +614,7 @@ static void ethernet_interrupt(int state)
}
-static struct smc91c9x_interface ethernet_intf =
+static const struct smc91c9x_interface ethernet_intf =
{
ethernet_interrupt
};
@@ -2447,7 +2447,7 @@ INPUT_PORTS_END
*
*************************************/
-static struct mips3_config config =
+static const struct mips3_config config =
{
16384, /* code cache size */
16384, /* data cache size */
diff --git a/src/mame/drivers/segac2.c b/src/mame/drivers/segac2.c
index 84025f4336b..f0ef4717e52 100644
--- a/src/mame/drivers/segac2.c
+++ b/src/mame/drivers/segac2.c
@@ -1264,12 +1264,12 @@ INPUT_PORTS_END
Sound interfaces
******************************************************************************/
-static struct upd7759_interface upd7759_intf =
+static const struct upd7759_interface upd7759_intf =
{
REGION_SOUND1 /* Memory pointer (gen.h) */
};
-static struct YM3438interface ym3438_intf =
+static const struct YM3438interface ym3438_intf =
{
genesis_irq2_interrupt /* IRQ handler */
};
diff --git a/src/mame/drivers/segae.c b/src/mame/drivers/segae.c
index df2d224f6d0..f2e9feb652a 100644
--- a/src/mame/drivers/segae.c
+++ b/src/mame/drivers/segae.c
@@ -352,7 +352,7 @@ ADDRESS_MAP_END
/* Precalculated tables for H/V counters. Note the position the counter 'jumps' is marked with with
an empty comment */
-static UINT8 hc_256[] =
+static const UINT8 hc_256[] =
{
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
@@ -379,7 +379,7 @@ static UINT8 hc_256[] =
};
-static UINT8 vc_ntsc_192[] =
+static const UINT8 vc_ntsc_192[] =
{
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
@@ -400,7 +400,7 @@ static UINT8 vc_ntsc_192[] =
0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
};
-static UINT8 vc_ntsc_224[] =
+static const UINT8 vc_ntsc_224[] =
{
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
@@ -421,7 +421,7 @@ static UINT8 vc_ntsc_224[] =
0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
};
-static UINT8 vc_ntsc_240[] =
+static const UINT8 vc_ntsc_240[] =
{
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
@@ -444,7 +444,7 @@ static UINT8 vc_ntsc_240[] =
-static UINT8 vc_pal_192[] =
+static const UINT8 vc_pal_192[] =
{
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
@@ -469,7 +469,7 @@ static UINT8 vc_pal_192[] =
};
-static UINT8 vc_pal_224[] =
+static const UINT8 vc_pal_224[] =
{
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
@@ -493,7 +493,7 @@ static UINT8 vc_pal_224[] =
0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
};
-static UINT8 vc_pal_240[] =
+static const UINT8 vc_pal_240[] =
{
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
@@ -517,14 +517,14 @@ static UINT8 vc_pal_240[] =
0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
};
-static struct
+static const struct
{
UINT8 sms2_name[40];
int sms2_valid;
int sms2_height;
int sms2_tilemap_height;
- UINT8* sms_vcounter_table;
- UINT8* sms_hcounter_table;
+ const UINT8* sms_vcounter_table;
+ const UINT8* sms_hcounter_table;
} sms_mode_table[] =
{
diff --git a/src/mame/drivers/segahang.c b/src/mame/drivers/segahang.c
index ba62db8b034..99712565d2a 100644
--- a/src/mame/drivers/segahang.c
+++ b/src/mame/drivers/segahang.c
@@ -789,19 +789,19 @@ INPUT_PORTS_END
*
*************************************/
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,0,0,0,sound_irq
};
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
sound_irq
};
-static struct SEGAPCMinterface segapcm_interface =
+static const struct SEGAPCMinterface segapcm_interface =
{
BANK_512,
REGION_SOUND1
diff --git a/src/mame/drivers/segaorun.c b/src/mame/drivers/segaorun.c
index 0b67ff0b3eb..720f6b18408 100644
--- a/src/mame/drivers/segaorun.c
+++ b/src/mame/drivers/segaorun.c
@@ -391,7 +391,7 @@ static READ16_HANDLER( outrun_custom_io_r )
case 0x30/2:
{
- static const char *ports[] = { "ADC0", "ADC1", "ADC2", "ADC3", "ADC4", "ADC5", "ADC6", "ADC7" };
+ static const char *const ports[] = { "ADC0", "ADC1", "ADC2", "ADC3", "ADC4", "ADC5", "ADC6", "ADC7" };
return readinputportbytag_safe(ports[adc_select], 0x0010);
}
@@ -454,7 +454,7 @@ static READ16_HANDLER( shangon_custom_io_r )
case 0x3020/2:
{
- static const char *ports[] = { "ADC0", "ADC1", "ADC2", "ADC3" };
+ static const char *const ports[] = { "ADC0", "ADC1", "ADC2", "ADC3" };
return readinputportbytag_safe(ports[adc_select], 0x0010);
}
}
@@ -772,7 +772,7 @@ INPUT_PORTS_END
*
*************************************/
-static struct SEGAPCMinterface segapcm_interface =
+static const struct SEGAPCMinterface segapcm_interface =
{
BANK_512,
REGION_SOUND1
diff --git a/src/mame/drivers/segas16a.c b/src/mame/drivers/segas16a.c
index cc3be60695a..1fa5d0fc5dd 100644
--- a/src/mame/drivers/segas16a.c
+++ b/src/mame/drivers/segas16a.c
@@ -746,7 +746,7 @@ static READ16_HANDLER( sdi_custom_io_r )
static READ16_HANDLER( sjryuko_custom_io_r )
{
- static const char *portname[] = { "MJ0", "MJ1", "MJ2", "MJ3", "MJ4", "MJ5" };
+ static const char *const portname[] = { "MJ0", "MJ1", "MJ2", "MJ3", "MJ4", "MJ5" };
switch (offset & (0x3000/2))
{
@@ -1748,7 +1748,7 @@ INPUT_PORTS_END
*
*************************************/
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
NULL,
n7751_control_w
diff --git a/src/mame/drivers/segas16b.c b/src/mame/drivers/segas16b.c
index bacd9112130..e12f25343bd 100644
--- a/src/mame/drivers/segas16b.c
+++ b/src/mame/drivers/segas16b.c
@@ -978,7 +978,7 @@ static const struct segaic16_memory_map_entry rom_171_5797_info[] =
{ 0 }
};
-static const struct segaic16_memory_map_entry *region_info_list[] =
+static const struct segaic16_memory_map_entry *const region_info_list[] =
{
&rom_171_5358_info_small[0],
&rom_171_5358_info[0],
@@ -1575,7 +1575,7 @@ static READ16_HANDLER( hwchamp_custom_io_r )
static WRITE16_HANDLER( hwchamp_custom_io_w )
{
- static const char *portname[4] = { "MONITOR", "LEFT", "RIGHT", "DUMMY" };
+ static const char *const portname[4] = { "MONITOR", "LEFT", "RIGHT", "DUMMY" };
switch (offset & (0x3000/2))
{
@@ -1660,7 +1660,7 @@ static READ16_HANDLER( sdi_custom_io_r )
static READ16_HANDLER( sjryuko_custom_io_r )
{
- static const char *portname[] = { "MJ0", "MJ1", "MJ2", "MJ3", "MJ4", "MJ5" };
+ static const char *const portname[] = { "MJ0", "MJ1", "MJ2", "MJ3", "MJ4", "MJ5" };
switch (offset & (0x3000/2))
{
@@ -3095,7 +3095,7 @@ INPUT_PORTS_END
*
*************************************/
-static struct upd7759_interface upd7759_interface =
+static const struct upd7759_interface upd7759_interface =
{
0,
upd7759_generate_nmi
diff --git a/src/mame/drivers/segas24.c b/src/mame/drivers/segas24.c
index f50186afeb5..507856cefda 100644
--- a/src/mame/drivers/segas24.c
+++ b/src/mame/drivers/segas24.c
@@ -532,7 +532,7 @@ static UINT8 dcclub_io_r(int port)
{
switch(port) {
case 0: {
- static UINT8 pos[16] = { 0, 1, 3, 2, 6, 4, 12, 8, 9 };
+ static const UINT8 pos[16] = { 0, 1, 3, 2, 6, 4, 12, 8, 9 };
return (readinputport(0) & 0xf) | ((~pos[readinputport(5)>>4]<<4) & 0xf0);
}
case 1:
@@ -763,13 +763,13 @@ static WRITE16_HANDLER( ym_data_w )
// Protection magic latch
-static UINT8 mahmajn_mlt[8] = { 5, 1, 6, 2, 3, 7, 4, 0 };
-static UINT8 mahmajn2_mlt[8] = { 6, 0, 5, 3, 1, 4, 2, 7 };
-static UINT8 gqh_mlt[8] = { 3, 7, 4, 0, 2, 6, 5, 1 };
-static UINT8 bnzabros_mlt[8] = { 2, 4, 0, 5, 7, 3, 1, 6 };
-static UINT8 qrouka_mlt[8] = { 1, 6, 4, 7, 0, 5, 3, 2 };
-static UINT8 quizmeku_mlt[8] = { 0, 3, 2, 4, 6, 1, 7, 5 };
-static UINT8 dcclub_mlt[8] = { 4, 3, 7, 0, 2, 6, 1, 5 };
+static const UINT8 mahmajn_mlt[8] = { 5, 1, 6, 2, 3, 7, 4, 0 };
+static const UINT8 mahmajn2_mlt[8] = { 6, 0, 5, 3, 1, 4, 2, 7 };
+static const UINT8 gqh_mlt[8] = { 3, 7, 4, 0, 2, 6, 5, 1 };
+static const UINT8 bnzabros_mlt[8] = { 2, 4, 0, 5, 7, 3, 1, 6 };
+static const UINT8 qrouka_mlt[8] = { 1, 6, 4, 7, 0, 5, 3, 2 };
+static const UINT8 quizmeku_mlt[8] = { 0, 3, 2, 4, 6, 1, 7, 5 };
+static const UINT8 dcclub_mlt[8] = { 4, 3, 7, 0, 2, 6, 1, 5 };
static UINT8 mlatch;
static const UINT8 *mlatch_table;
@@ -1104,7 +1104,7 @@ static DRIVER_INIT(dcclub)
static DRIVER_INIT(qrouka)
{
- system24temp_sys16_io_set_callbacks(hotrod_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
+ system24temp_sys16_io_set_callbacks(gground_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
mlatch_table = qrouka_mlt;
track_size = 0;
}
@@ -1298,7 +1298,7 @@ static INPUT_PORTS_START( system24_Service )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("All Service")
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN3 )
@@ -1746,18 +1746,8 @@ static INPUT_PORTS_START( quizmeku )
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
INPUT_PORTS_END
-static INPUT_PORTS_START( qrouka ) /* Missing stick input for the 3rd & 4th player */
- PORT_INCLUDE( system24_generic )
-
- PORT_MODIFY("P1")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START3 )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
-
- PORT_MODIFY("P2")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START4 )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4)
+static INPUT_PORTS_START( qrouka )
+ PORT_INCLUDE( quizmeku )
PORT_MODIFY("SERVICE")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN4 )
@@ -1766,11 +1756,8 @@ static INPUT_PORTS_START( qrouka ) /* Missing stick input for the 3rd & 4th play
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_MODIFY("DSW")
- PORT_DIPNAME( 0x01, 0x00, "Play Mode" ) PORT_DIPLOCATION("SWB:1")
- PORT_DIPSETTING( 0x01, "2 Player" )
- PORT_DIPSETTING( 0x00, "4 Player" )
- PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:2")
- PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
+ PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWB:3")
+ PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, "Coin Chute" ) PORT_DIPLOCATION("SWB:4")
PORT_DIPSETTING( 0x08, "Common" )
@@ -1780,11 +1767,6 @@ static INPUT_PORTS_START( qrouka ) /* Missing stick input for the 3rd & 4th play
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x30, "4" )
PORT_DIPSETTING( 0x20, "5" )
- PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:7,8")
- PORT_DIPSETTING( 0x80, DEF_STR( Easy ) )
- PORT_DIPSETTING( 0xc0, DEF_STR( Normal ) )
- PORT_DIPSETTING( 0x40, DEF_STR( Hard ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
INPUT_PORTS_END
static INPUT_PORTS_START( mahmajn )
@@ -1861,7 +1843,7 @@ static INPUT_PORTS_START( gground )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE4 ) PORT_NAME("P3 Service")
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE4 ) //enabled with "Separate"
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3)
@@ -1902,7 +1884,7 @@ INPUT_PORTS_END
*
*************************************/
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
irq_ym
};
@@ -2299,9 +2281,9 @@ ROM_END
/* 02 */GAME( 1988, sspirtfc, sspirits, system24, sspirits, sspirits, ROT270, "Sega", "Scramble Spirits (World set 2?, Floppy Based, FD1094 317-0058-02c)",GAME_NOT_WORKING ) /* MISSING disk image */
/* 03 */GAME( 1988, gground, 0, system24, gground, gground, ROT270, "Sega", "Gain Ground (World, 3 Players, Floppy Based, FD1094 317-0058-03c?)", 0 )
/* 03 */GAME( 1988, ggroundj, gground, system24, gground, gground, ROT270, "Sega", "Gain Ground (Japan, 2 Players, Floppy Based, FD1094 317-0058-03b)", 0 )
-/* 04 */GAME( 1989, crkdown, 0, system24, crkdown, crkdown, ROT0, "Sega", "Crack Down (World,Floppy Based, FD1094 317-0058-04c)", GAME_IMPERFECT_GRAPHICS ) // clipping probs / solid layer probs? (radar display)
-/* 04 */GAME( 1989, crkdownu, crkdown, system24, crkdown, crkdown, ROT0, "Sega", "Crack Down (US,Floppy Based, FD1094 317-0058-04d)", GAME_IMPERFECT_GRAPHICS ) // clipping probs / solid layer probs? (radar display)
-/* 04 */GAME( 1989, crkdownj, crkdown, system24, crkdown, crkdown, ROT0, "Sega", "Crack Down (Japan,Floppy Based, FD1094 317-0058-04b)", GAME_IMPERFECT_GRAPHICS ) // clipping probs / solid layer probs? (radar display)
+/* 04 */GAME( 1989, crkdown, 0, system24, crkdown, crkdown, ROT0, "Sega", "Crack Down (World, Floppy Based, FD1094 317-0058-04c)", GAME_IMPERFECT_GRAPHICS ) // clipping probs / solid layer probs? (radar display)
+/* 04 */GAME( 1989, crkdownu, crkdown, system24, crkdown, crkdown, ROT0, "Sega", "Crack Down (US, Floppy Based, FD1094 317-0058-04d)", GAME_IMPERFECT_GRAPHICS ) // clipping probs / solid layer probs? (radar display)
+/* 04 */GAME( 1989, crkdownj, crkdown, system24, crkdown, crkdown, ROT0, "Sega", "Crack Down (Japan, Floppy Based, FD1094 317-0058-04b)", GAME_IMPERFECT_GRAPHICS ) // clipping probs / solid layer probs? (radar display)
/* 05 */GAME( 1989, sgmast, 0, system24, sgmast, sgmast, ROT0, "Sega", "Super Masters Golf (World?, Floppy Based, FD1094 317-0058-05d?)", GAME_NOT_WORKING|GAME_UNEMULATED_PROTECTION ) // NOT decrypted
/* 05 */GAME( 1989, sgmastc, sgmast, system24, sgmast, sgmast, ROT0, "Sega", "Jumbo Ozaki Super Masters Golf (World, Floppy Based, FD1094 317-0058-05c)", GAME_IMPERFECT_GRAPHICS ) // some gfx offset / colour probs?
/* 05 */GAME( 1989, sgmastj, sgmast, system24, sgmastj, sgmast, ROT0, "Sega", "Jumbo Ozaki Super Masters Golf (Japan, Floppy Based, FD1094 317-0058-05b)", GAME_IMPERFECT_GRAPHICS ) // some gfx offset / colour probs?
diff --git a/src/mame/drivers/segas32.c b/src/mame/drivers/segas32.c
index 1a32c3fa6d0..4a3b524013e 100644
--- a/src/mame/drivers/segas32.c
+++ b/src/mame/drivers/segas32.c
@@ -860,7 +860,7 @@ static READ16_HANDLER( analog_custom_io_r )
static WRITE16_HANDLER( analog_custom_io_w )
{
- static const char *names[] = { "ANALOG1", "ANALOG2", "ANALOG3", "ANALOG4" };
+ static const char *const names[] = { "ANALOG1", "ANALOG2", "ANALOG3", "ANALOG4" };
switch (offset)
{
case 0x10/2:
@@ -876,7 +876,7 @@ static WRITE16_HANDLER( analog_custom_io_w )
static READ16_HANDLER( extra_custom_io_r )
{
- static const char *names[] = { "EXTRA1", "EXTRA2", "EXTRA3", "EXTRA4" };
+ static const char *const names[] = { "EXTRA1", "EXTRA2", "EXTRA3", "EXTRA4" };
switch (offset)
{
case 0x20/2:
@@ -893,7 +893,7 @@ static READ16_HANDLER( extra_custom_io_r )
static WRITE16_HANDLER( orunners_custom_io_w )
{
- static const char *names[] = { "ANALOG1", "ANALOG2", "ANALOG3", "ANALOG4", "ANALOG5", "ANALOG6", "ANALOG7", "ANALOG8" };
+ static const char *const names[] = { "ANALOG1", "ANALOG2", "ANALOG3", "ANALOG4", "ANALOG5", "ANALOG6", "ANALOG7", "ANALOG8" };
switch (offset)
{
case 0x10/2:
@@ -913,7 +913,7 @@ static WRITE16_HANDLER( orunners_custom_io_w )
static READ16_HANDLER( sonic_custom_io_r )
{
- static const char *names[] = { "TRACKX1", "TRACKY1", "TRACKX2", "TRACKY2", "TRACKX3", "TRACKY3" };
+ static const char *const names[] = { "TRACKX1", "TRACKY1", "TRACKX2", "TRACKY2", "TRACKX3", "TRACKY3" };
switch (offset)
{
@@ -933,7 +933,7 @@ static READ16_HANDLER( sonic_custom_io_r )
static WRITE16_HANDLER( sonic_custom_io_w )
{
- static const char *names[] = { "TRACKX1", "TRACKY1", "TRACKX2", "TRACKY2", "TRACKX3", "TRACKY3" };
+ static const char *const names[] = { "TRACKX1", "TRACKY1", "TRACKX2", "TRACKY2", "TRACKX3", "TRACKY3" };
switch (offset)
{
diff --git a/src/mame/drivers/segaxbd.c b/src/mame/drivers/segaxbd.c
index 17512373d25..1553e7d4bbd 100644
--- a/src/mame/drivers/segaxbd.c
+++ b/src/mame/drivers/segaxbd.c
@@ -235,7 +235,7 @@ static MACHINE_RESET( xboard )
static READ16_HANDLER( adc_r )
{
- static const char *ports[] = { "ADC0", "ADC1", "ADC2", "ADC3", "ADC4", "ADC5", "ADC6", "ADC7" };
+ static const char *const ports[] = { "ADC0", "ADC1", "ADC2", "ADC3", "ADC4", "ADC5", "ADC6", "ADC7" };
int which = (iochip_regs[0][2] >> 2) & 7;
/* on the write, latch the selected input port and stash the value */
@@ -1082,13 +1082,13 @@ INPUT_PORTS_END
*
*************************************/
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
sound_cpu_irq
};
-static struct SEGAPCMinterface segapcm_interface =
+static const struct SEGAPCMinterface segapcm_interface =
{
BANK_512,
REGION_SOUND1
diff --git a/src/mame/drivers/segaybd.c b/src/mame/drivers/segaybd.c
index 019c42ba79e..efc1f3c6cfe 100644
--- a/src/mame/drivers/segaybd.c
+++ b/src/mame/drivers/segaybd.c
@@ -354,7 +354,7 @@ static READ16_HANDLER( analog_r )
static WRITE16_HANDLER( analog_w )
{
- static const char *ports[] = { "ADC0", "ADC1", "ADC2", "ADC3", "ADC4", "ADC5", "ADC6" };
+ static const char *const ports[] = { "ADC0", "ADC1", "ADC2", "ADC3", "ADC4", "ADC5", "ADC6" };
int selected = ((offset & 3) == 3) ? (3 + (misc_io_data[0x08/2] & 3)) : (offset & 3);
int value = readinputportbytag_safe(ports[selected], 0xff);
analog_data[offset & 3] = value;
@@ -933,13 +933,13 @@ INPUT_PORTS_END
*
*************************************/
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
sound_cpu_irq
};
-static struct SEGAPCMinterface segapcm_interface =
+static const struct SEGAPCMinterface segapcm_interface =
{
BANK_12M | BANK_MASKF8,
REGION_SOUND1
diff --git a/src/mame/drivers/seibuspi.c b/src/mame/drivers/seibuspi.c
index dada511c049..8f6825c96e2 100644
--- a/src/mame/drivers/seibuspi.c
+++ b/src/mame/drivers/seibuspi.c
@@ -1111,7 +1111,7 @@ static void irqhandler(int state)
}
}
-static struct YMF271interface ymf271_interface =
+static const struct YMF271interface ymf271_interface =
{
REGION_SOUND1,
flashrom_read,
diff --git a/src/mame/drivers/seicross.c b/src/mame/drivers/seicross.c
index 501877c7f2b..fbba6e6a08b 100644
--- a/src/mame/drivers/seicross.c
+++ b/src/mame/drivers/seicross.c
@@ -388,7 +388,7 @@ GFXDECODE_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
0,
friskyt_portB_r,
diff --git a/src/mame/drivers/senjyo.c b/src/mame/drivers/senjyo.c
index 0f32da485b5..f66f1414006 100644
--- a/src/mame/drivers/senjyo.c
+++ b/src/mame/drivers/senjyo.c
@@ -640,7 +640,7 @@ GFXDECODE_END
-static struct z80_irq_daisy_chain daisy_chain[] =
+static const struct z80_irq_daisy_chain daisy_chain[] =
{
{ z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti , 0 }, /* device 0 = CTC_0 , high priority */
{ z80pio_reset, z80pio_irq_state, z80pio_irq_ack, z80pio_irq_reti , 0 }, /* device 1 = PIO_0 , low priority */
diff --git a/src/mame/drivers/seta.c b/src/mame/drivers/seta.c
index 74e0a80b554..a855e3ab069 100644
--- a/src/mame/drivers/seta.c
+++ b/src/mame/drivers/seta.c
@@ -1340,11 +1340,11 @@ static WRITE16_HANDLER( timer_regs_w )
***************************************************************************/
-static struct x1_010_interface seta_sound_intf =
+static const struct x1_010_interface seta_sound_intf =
{
0x0000, /* address */
};
-static struct x1_010_interface seta_sound_intf2 =
+static const struct x1_010_interface seta_sound_intf2 =
{
0x1000, /* address */
};
@@ -1354,7 +1354,7 @@ static void utoukond_ym3438_interrupt(int linestate)
cpunum_set_input_line(1, INPUT_LINE_NMI, linestate);
}
-static struct YM3438interface utoukond_ym3438_intf =
+static const struct YM3438interface utoukond_ym3438_intf =
{
utoukond_ym3438_interrupt // IRQ handler
};
@@ -6378,7 +6378,7 @@ static INTERRUPT_GEN( seta_sub_interrupt )
Thundercade
***************************************************************************/
-static struct YM2203interface tndrcade_ym2203_interface =
+static const struct YM2203interface tndrcade_ym2203_interface =
{
dsw1_r, /* input A: DSW 1 */
dsw2_r /* input B: DSW 2 */
@@ -9000,7 +9000,7 @@ static DRIVER_INIT(wiggie)
memcpy(temp,&src[i],16);
for (j = 0;j < 16;j++)
{
- static int convtable[16] =
+ static const int convtable[16] =
{
0x0, 0x1, 0x8, 0x9,
0x2, 0x3, 0xa, 0xb,
diff --git a/src/mame/drivers/seta2.c b/src/mame/drivers/seta2.c
index 88bd838b996..f7de99139f0 100644
--- a/src/mame/drivers/seta2.c
+++ b/src/mame/drivers/seta2.c
@@ -1741,7 +1741,7 @@ static INTERRUPT_GEN( samshoot_interrupt )
}
}
-static struct x1_010_interface x1_010_sound_intf =
+static const struct x1_010_interface x1_010_sound_intf =
{
0x0000, /* address */
};
diff --git a/src/mame/drivers/sf.c b/src/mame/drivers/sf.c
index 05490f5dbe4..c548c4441d4 100644
--- a/src/mame/drivers/sf.c
+++ b/src/mame/drivers/sf.c
@@ -69,7 +69,7 @@ static void write_dword(offs_t offset,UINT32 data)
static WRITE16_HANDLER( protection_w )
{
- static int maplist[4][10] = {
+ static const int maplist[4][10] = {
{ 1, 0, 3, 2, 4, 5, 6, 7, 8, 9 },
{ 4, 5, 6, 7, 1, 0, 3, 2, 8, 9 },
{ 3, 2, 1, 0, 6, 7, 4, 5, 8, 9 },
@@ -107,10 +107,10 @@ static WRITE16_HANDLER( protection_w )
}
case 2:
{
- static int delta1[10] = {
+ static const int delta1[10] = {
0x1f80, 0x1c80, 0x2700, 0x2400, 0x2b80, 0x2e80, 0x3300, 0x3600, 0x3a80, 0x3d80
};
- static int delta2[10] = {
+ static const int delta2[10] = {
0x2180, 0x1800, 0x3480, 0x2b00, 0x3e00, 0x4780, 0x5100, 0x5a80, 0x6400, 0x6d80
};
@@ -161,7 +161,7 @@ static WRITE16_HANDLER( protection_w )
/* We simulate them with 3 buttons the same way the other versions
internally do */
-static int scale[8] = { 0x00, 0x40, 0xe0, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe };
+static const int scale[8] = { 0x00, 0x40, 0xe0, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe };
static READ16_HANDLER( button1_r )
{
@@ -803,12 +803,12 @@ static void irq_handler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
irq_handler
};
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
0, /* interrupt function */
MSM5205_SEX_4B /* 8KHz playback ? */
diff --git a/src/mame/drivers/shadfrce.c b/src/mame/drivers/shadfrce.c
index 32864a1ed61..604d54b73be 100644
--- a/src/mame/drivers/shadfrce.c
+++ b/src/mame/drivers/shadfrce.c
@@ -536,7 +536,7 @@ static void irq_handler(int irq)
cpunum_set_input_line( 1, 0, irq ? ASSERT_LINE : CLEAR_LINE );
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
irq_handler
};
diff --git a/src/mame/drivers/shangha3.c b/src/mame/drivers/shangha3.c
index 7ff8fabff60..72b5d2563a7 100644
--- a/src/mame/drivers/shangha3.c
+++ b/src/mame/drivers/shangha3.c
@@ -53,7 +53,7 @@ write read
static READ16_HANDLER( shangha3_prot_r )
{
static int count;
- static int result[] = { 0x0,0x1,0x3,0x7,0xf,0xe,0xc,0x8,0x0};
+ static const int result[] = { 0x0,0x1,0x3,0x7,0xf,0xe,0xc,0x8,0x0};
logerror("PC %04x: read 20004e\n",activecpu_get_pc());
@@ -476,7 +476,7 @@ GFXDECODE_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
input_port_3_r,
input_port_2_r
@@ -487,7 +487,7 @@ static void irqhandler(int linestate)
cpunum_set_input_line(1, INPUT_LINE_NMI, linestate);
}
-static struct YM3438interface ym3438_interface =
+static const struct YM3438interface ym3438_interface =
{
irqhandler
};
diff --git a/src/mame/drivers/shanghai.c b/src/mame/drivers/shanghai.c
index 0162dfc7e3b..cc910b0e3b9 100644
--- a/src/mame/drivers/shanghai.c
+++ b/src/mame/drivers/shanghai.c
@@ -37,7 +37,7 @@ static UINT16 cl0,cl1,ccmp;
static INT16 cpx,cpy;
-static int instruction_length[64] =
+static const int instruction_length[64] =
{
0, 3, 2, 1, /* 0x */
0, 0,-1, 2, /* 1x */
@@ -57,7 +57,7 @@ static int instruction_length[64] =
5, 5, 5, 5 /* Fx */
};
-static const char *instruction_name[64] =
+static const char *const instruction_name[64] =
{
"undef","ORG ","WPR ","RPR ", /* 0x */
"undef","undef","WPTN ","RPTN ", /* 1x */
@@ -971,7 +971,7 @@ INPUT_PORTS_END
-static struct YM2203interface sh_ym2203_interface =
+static const struct YM2203interface sh_ym2203_interface =
{
input_port_3_r,
input_port_4_r
diff --git a/src/mame/drivers/shisen.c b/src/mame/drivers/shisen.c
index b73b6b6a907..8dd4ebccd7c 100644
--- a/src/mame/drivers/shisen.c
+++ b/src/mame/drivers/shisen.c
@@ -103,7 +103,6 @@ static ADDRESS_MAP_START( sound_writeport, ADDRESS_SPACE_IO, 8 )
ADDRESS_MAP_END
-
static INPUT_PORTS_START( shisen )
PORT_START_TAG("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
@@ -136,74 +135,81 @@ static INPUT_PORTS_START( shisen )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START_TAG("DSW1")
- PORT_DIPNAME( 0x03, 0x03, "Timer" )
- PORT_DIPSETTING( 0x03, "Slow" )
+ PORT_DIPNAME( 0x03, 0x03, "Timer" ) PORT_DIPLOCATION("SW1:1,2")
+ PORT_DIPSETTING( 0x03, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x02, DEF_STR( Normal ) )
- PORT_DIPSETTING( 0x01, "Fast" )
- PORT_DIPSETTING( 0x00, "Fastest" )
- PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( Hard ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
+ PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:3,4")
PORT_DIPSETTING( 0x0c, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x08, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x04, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) /* Gets filled in based on the coin mode */
+ PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coinage ) ) PORT_CONDITION("DSW2",0x04,PORTCOND_EQUALS,0x04) PORT_DIPLOCATION("SW1:5,6,7,8")
+ PORT_DIPSETTING( 0xa0, DEF_STR( 6C_1C ) )
+ PORT_DIPSETTING( 0xb0, DEF_STR( 5C_1C ) )
+ PORT_DIPSETTING( 0xc0, DEF_STR( 4C_1C ) )
+ PORT_DIPSETTING( 0xd0, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x10, DEF_STR( 8C_3C ) )
+ PORT_DIPSETTING( 0xe0, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( 5C_3C ) )
+ PORT_DIPSETTING( 0x30, DEF_STR( 3C_2C ) )
+ PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( 2C_3C ) )
+ PORT_DIPSETTING( 0x90, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) )
+ PORT_DIPSETTING( 0x70, DEF_STR( 1C_4C ) )
+ PORT_DIPSETTING( 0x60, DEF_STR( 1C_5C ) )
+ PORT_DIPSETTING( 0x50, DEF_STR( 1C_6C ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) )
+ PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_CONDITION("DSW2",0x04,PORTCOND_NOTEQUALS,0x04) PORT_DIPLOCATION("SW1:5,6")
+ PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) )
+ PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) )
+ PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) )
+ PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_CONDITION("DSW2",0x04,PORTCOND_NOTEQUALS,0x04) PORT_DIPLOCATION("SW1:7,8")
+ PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) )
PORT_START_TAG("DSW2")
- PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) )
+ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW2:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
+ PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x04, 0x04, "Coin Mode" )
- PORT_DIPSETTING( 0x04, "Mode 1" )
- PORT_DIPSETTING( 0x00, "Mode 2" )
- PORT_DIPNAME( 0x08, 0x08, "Nude Pictures" )
+ PORT_DIPNAME( 0x04, 0x04, "Coin Chute" ) PORT_DIPLOCATION("SW2:3")
+ PORT_DIPSETTING( 0x04, "Common" )
+ PORT_DIPSETTING( 0x00, "Separate" )
+ PORT_DIPNAME( 0x08, 0x08, "Nude Pictures" ) PORT_DIPLOCATION("SW2:4")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
- PORT_DIPNAME( 0x10, 0x10, "Women Select" )
+ PORT_DIPNAME( 0x10, 0x10, "Women Select" ) PORT_DIPLOCATION("SW2:5")
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x10, DEF_STR( Yes ) )
/* In stop mode, press 2 to stop and 1 to restart */
- PORT_DIPNAME( 0x20, 0x20, "Stop Mode (Cheat)")
+ PORT_DIPNAME( 0x20, 0x20, "Stop Mode (Cheat)") PORT_DIPLOCATION("SW2:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_DIPNAME( 0x40, 0x40, "Play Mode" )
+ PORT_DIPNAME( 0x40, 0x40, "Play Mode" ) PORT_DIPLOCATION("SW2:7")
PORT_DIPSETTING( 0x00, "1 Player" )
PORT_DIPSETTING( 0x40, "2 Player" )
- PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
-
- /* Fake port to support the two different coin modes */
- PORT_START_TAG("FAKE")
- PORT_DIPNAME( 0x0f, 0x0f, "Coinage Mode 1" ) /* mapped on coin mode 1 */
- PORT_DIPSETTING( 0x0a, DEF_STR( 6C_1C ) )
- PORT_DIPSETTING( 0x0b, DEF_STR( 5C_1C ) )
- PORT_DIPSETTING( 0x0c, DEF_STR( 4C_1C ) )
- PORT_DIPSETTING( 0x0d, DEF_STR( 3C_1C ) )
- PORT_DIPSETTING( 0x01, DEF_STR( 8C_3C ) )
- PORT_DIPSETTING( 0x0e, DEF_STR( 2C_1C ) )
- PORT_DIPSETTING( 0x02, DEF_STR( 5C_3C ) )
- PORT_DIPSETTING( 0x03, DEF_STR( 3C_2C ) )
- PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) )
- PORT_DIPSETTING( 0x04, DEF_STR( 2C_3C ) )
- PORT_DIPSETTING( 0x09, DEF_STR( 1C_2C ) )
- PORT_DIPSETTING( 0x08, DEF_STR( 1C_3C ) )
- PORT_DIPSETTING( 0x07, DEF_STR( 1C_4C ) )
- PORT_DIPSETTING( 0x06, DEF_STR( 1C_5C ) )
- PORT_DIPSETTING( 0x05, DEF_STR( 1C_6C ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) )
- PORT_DIPNAME( 0x30, 0x30, "Coin A Mode 2" ) /* mapped on coin mode 2 */
- PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) )
- PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) )
- PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) )
- PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) )
- PORT_DIPNAME( 0xc0, 0xc0, "Coin B Mode 2" )
- PORT_DIPSETTING( 0xc0, DEF_STR( 1C_2C ) )
- PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) )
- PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) )
- PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) )
+ PORT_SERVICE_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW2:8" )
INPUT_PORTS_END
+static INPUT_PORTS_START( matchit )
+ PORT_INCLUDE( shisen )
+
+ PORT_MODIFY("DSW2")
+ PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW2:4")
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW2:5")
+ PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+INPUT_PORTS_END
static const gfx_layout charlayout =
@@ -224,7 +230,7 @@ GFXDECODE_END
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
m72_ym2151_irq_handler
};
@@ -414,7 +420,7 @@ ROM_START( matchit )
/* no samples on this board */
ROM_END
-GAME( 1989, sichuan2, 0, shisen, shisen, 0, ROT0, "Tamtex", "Sichuan II (hack?) (set 1)", 0 )
-GAME( 1989, sichuana, sichuan2, shisen, shisen, 0, ROT0, "Tamtex", "Sichuan II (hack?) (set 2)", 0 )
-GAME( 1989, shisen, sichuan2, shisen, shisen, 0, ROT0, "Tamtex", "Shisensho - Joshiryo-Hen (Japan)", 0 )
-GAME( 1989, matchit, sichuan2, shisen, shisen, 0, ROT0, "Tamtex", "Match It", 0 )
+GAME( 1989, matchit, 0, shisen, matchit, 0, ROT0, "Tamtex", "Match It", 0 )
+GAME( 1989, shisen, matchit, shisen, shisen, 0, ROT0, "Tamtex", "Shisensho - Joshiryo-Hen (Japan)", 0 )
+GAME( 1989, sichuan2, matchit, shisen, shisen, 0, ROT0, "hack", "Sichuan II (hack set 1)", 0 )
+GAME( 1989, sichuana, matchit, shisen, shisen, 0, ROT0, "hack", "Sichuan II (hack set 2)", 0 )
diff --git a/src/mame/drivers/shootout.c b/src/mame/drivers/shootout.c
index 113a5a91f72..bc308ff937f 100644
--- a/src/mame/drivers/shootout.c
+++ b/src/mame/drivers/shootout.c
@@ -272,12 +272,12 @@ static void shootout_snd2_irq(int linestate)
cpunum_set_input_line(0,0,linestate);
}
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,0,0,0,shootout_snd_irq
};
-static struct YM2203interface ym2203_interface2 =
+static const struct YM2203interface ym2203_interface2 =
{
0,
0,
diff --git a/src/mame/drivers/sidearms.c b/src/mame/drivers/sidearms.c
index 243ec1b0d6a..303cdafdf82 100644
--- a/src/mame/drivers/sidearms.c
+++ b/src/mame/drivers/sidearms.c
@@ -702,12 +702,12 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,0,0,0,irqhandler
};
-static struct YM2151interface whizz_ym2151_interface =
+static const struct YM2151interface whizz_ym2151_interface =
{
irqhandler
};
diff --git a/src/mame/drivers/sidepckt.c b/src/mame/drivers/sidepckt.c
index b5c13031ca6..9265b9263ac 100644
--- a/src/mame/drivers/sidepckt.c
+++ b/src/mame/drivers/sidepckt.c
@@ -282,7 +282,7 @@ static void irqhandler(int linestate)
cpunum_set_input_line(1,0,linestate);
}
-static struct YM3526interface ym3526_interface =
+static const struct YM3526interface ym3526_interface =
{
irqhandler
};
diff --git a/src/mame/drivers/simpsons.c b/src/mame/drivers/simpsons.c
index 3b06ea6a227..90ed24d96c8 100644
--- a/src/mame/drivers/simpsons.c
+++ b/src/mame/drivers/simpsons.c
@@ -225,7 +225,7 @@ INPUT_PORTS_END
***************************************************************************/
-static struct K053260_interface k053260_interface =
+static const struct K053260_interface k053260_interface =
{
REGION_SOUND1 /* memory region */
};
diff --git a/src/mame/drivers/skydiver.c b/src/mame/drivers/skydiver.c
index 42cf98624e8..2d6b880792e 100644
--- a/src/mame/drivers/skydiver.c
+++ b/src/mame/drivers/skydiver.c
@@ -100,7 +100,7 @@ static int skydiver_nmion;
*
*************************************/
-static UINT16 colortable_source[] =
+static const UINT16 colortable_source[] =
{
0x02, 0x00,
0x02, 0x01,
diff --git a/src/mame/drivers/skykid.c b/src/mame/drivers/skykid.c
index d4aae3a6906..4c0b9b77751 100644
--- a/src/mame/drivers/skykid.c
+++ b/src/mame/drivers/skykid.c
@@ -439,7 +439,7 @@ GFXDECODE_END
-static struct namco_interface namco_interface =
+static const struct namco_interface namco_interface =
{
8, /* number of voices */
-1, /* memory region */
diff --git a/src/mame/drivers/skylncr.c b/src/mame/drivers/skylncr.c
index ab46d0e62a6..eee705a1dbb 100644
--- a/src/mame/drivers/skylncr.c
+++ b/src/mame/drivers/skylncr.c
@@ -409,7 +409,7 @@ static INPUT_PORTS_START( skylncr )
INPUT_PORTS_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
input_port_6_r, input_port_7_r,
0, 0
diff --git a/src/mame/drivers/slapfght.c b/src/mame/drivers/slapfght.c
index 921bf5a9b20..0e4a36a0729 100644
--- a/src/mame/drivers/slapfght.c
+++ b/src/mame/drivers/slapfght.c
@@ -829,13 +829,13 @@ GFXDECODE_END
-static struct AY8910interface ay8910_interface_1 =
+static const struct AY8910interface ay8910_interface_1 =
{
input_port_0_r,
input_port_1_r
};
-static struct AY8910interface ay8910_interface_2 =
+static const struct AY8910interface ay8910_interface_2 =
{
input_port_2_r,
input_port_3_r
diff --git a/src/mame/drivers/slapshot.c b/src/mame/drivers/slapshot.c
index 75ae3a5c70e..972c4d4ff3d 100644
--- a/src/mame/drivers/slapshot.c
+++ b/src/mame/drivers/slapshot.c
@@ -532,7 +532,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2610interface ym2610_interface =
+static const struct YM2610interface ym2610_interface =
{
irqhandler,
REGION_SOUND2, /* Delta-T */
diff --git a/src/mame/drivers/sliver.c b/src/mame/drivers/sliver.c
index 49299332cad..ba670d221b9 100644
--- a/src/mame/drivers/sliver.c
+++ b/src/mame/drivers/sliver.c
@@ -93,7 +93,7 @@ static mame_bitmap *sliver_bitmap_bg;
static UINT16 tempbuf[8];
-static int gfxlookup[][4]=
+static const int gfxlookup[][4]=
{
{ 0x0000000, 0x0000000, 512, 256 },
{ 0x0060000, 0x0007fa5, 512, 256 },
diff --git a/src/mame/drivers/snk.c b/src/mame/drivers/snk.c
index 5a3866c32a8..352454a83d0 100644
--- a/src/mame/drivers/snk.c
+++ b/src/mame/drivers/snk.c
@@ -364,20 +364,20 @@ static void snk_sound_callback1_w( int state ){ /* ? */
if( state ) snk_sound_register |= 0x02;
}
-static struct YM3526interface ym3526_interface_0 = {
+static const struct YM3526interface ym3526_interface_0 = {
snk_sound_callback0_w /* ? */
};
-static struct YM3526interface ym3526_interface_1 = {
+static const struct YM3526interface ym3526_interface_1 = {
snk_sound_callback1_w /* ? */
};
-static struct Y8950interface y8950_interface = {
+static const struct Y8950interface y8950_interface = {
snk_sound_callback1_w, /* ? */
REGION_SOUND1 /* memory region */
};
-static struct YM3812interface ym3812_interface = {
+static const struct YM3812interface ym3812_interface = {
snk_sound_callback0_w /* ? */
};
diff --git a/src/mame/drivers/snk68.c b/src/mame/drivers/snk68.c
index 34bb0619f7d..f4a4f8d2a59 100644
--- a/src/mame/drivers/snk68.c
+++ b/src/mame/drivers/snk68.c
@@ -682,12 +682,12 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM3812interface ym3812_interface =
+static const struct YM3812interface ym3812_interface =
{
irqhandler
};
-static struct upd7759_interface upd7759_interface =
+static const struct upd7759_interface upd7759_interface =
{
REGION_SOUND1 /* memory region */
};
diff --git a/src/mame/drivers/snowbros.c b/src/mame/drivers/snowbros.c
index e8c4d9b1d3c..d5d18e2a838 100644
--- a/src/mame/drivers/snowbros.c
+++ b/src/mame/drivers/snowbros.c
@@ -1521,14 +1521,14 @@ static void irqhandler(int irq)
/* SnowBros Sound */
-static struct YM3812interface ym3812_interface =
+static const struct YM3812interface ym3812_interface =
{
irqhandler
};
/* SemiCom Sound */
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
irqhandler
};
diff --git a/src/mame/drivers/spbactn.c b/src/mame/drivers/spbactn.c
index 36e51ab381e..33eb9e39e4f 100644
--- a/src/mame/drivers/spbactn.c
+++ b/src/mame/drivers/spbactn.c
@@ -346,7 +346,7 @@ static void irqhandler(int linestate)
cpunum_set_input_line(1,0,linestate);
}
-static struct YM3812interface ym3812_interface =
+static const struct YM3812interface ym3812_interface =
{
irqhandler
};
diff --git a/src/mame/drivers/spcforce.c b/src/mame/drivers/spcforce.c
index ec0e4c430e8..7ded2d38f6f 100644
--- a/src/mame/drivers/spcforce.c
+++ b/src/mame/drivers/spcforce.c
@@ -228,7 +228,7 @@ GFXDECODE_END
/* 1-bit RGB palette */
-static UINT16 colortable_source[] =
+static const UINT16 colortable_source[] =
{
0, 1, 2, 3, 4, 5, 6, 7,
0, 0, 1, 2, 3, 4, 5, 6, /* not sure about these, but they are only used */
diff --git a/src/mame/drivers/spdodgeb.c b/src/mame/drivers/spdodgeb.c
index 0ac42fc995a..979d9b8b555 100644
--- a/src/mame/drivers/spdodgeb.c
+++ b/src/mame/drivers/spdodgeb.c
@@ -416,12 +416,12 @@ static void irq_handler(int irq)
cpunum_set_input_line(1,M6809_FIRQ_LINE,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM3812interface ym3812_interface =
+static const struct YM3812interface ym3812_interface =
{
irq_handler
};
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
spd_adpcm_int, /* interrupt function */
MSM5205_S48_4B /* 8kHz? */
diff --git a/src/mame/drivers/speglsht.c b/src/mame/drivers/speglsht.c
index 8e31c420f9d..d088fc75665 100644
--- a/src/mame/drivers/speglsht.c
+++ b/src/mame/drivers/speglsht.c
@@ -243,7 +243,7 @@ INPUT_PORTS_END
static GFXDECODE_START( speglsht )
GFXDECODE_END
-static struct ST0016interface st0016_interface =
+static const struct ST0016interface st0016_interface =
{
&st0016_charram
};
@@ -253,7 +253,7 @@ static struct ST0016interface st0016_interface =
cpunum_set_input_line(1, R3000_IRQ4, ASSERT_LINE);
}
-static struct r3000_config config =
+static const struct r3000_config config =
{
0,
4096, /* code cache size */
diff --git a/src/mame/drivers/spiders.c b/src/mame/drivers/spiders.c
index 942a534377c..5c8a64a7312 100644
--- a/src/mame/drivers/spiders.c
+++ b/src/mame/drivers/spiders.c
@@ -343,7 +343,7 @@ static void ic60_74123_output_changed(int output)
}
-static TTL74123_interface ic60_intf =
+static const TTL74123_interface ic60_intf =
{
TTL74123_GROUNDED, /* the hook up type */
RES_K(22), /* resistor connected to RCext */
diff --git a/src/mame/drivers/splash.c b/src/mame/drivers/splash.c
index 1a477a9c4cb..b5b33fee289 100644
--- a/src/mame/drivers/splash.c
+++ b/src/mame/drivers/splash.c
@@ -422,7 +422,7 @@ static GFXDECODE_START( splash )
GFXDECODE_ENTRY( REGION_GFX1, 0x000000, tilelayout16,0,128 )
GFXDECODE_END
-static struct MSM5205interface splash_msm5205_interface =
+static const struct MSM5205interface splash_msm5205_interface =
{
splash_msm5205_int, /* IRQ handler */
MSM5205_S48_4B /* 8KHz */
@@ -471,7 +471,7 @@ static void ym_irq(int state)
logerror("2203 IRQ: %d\n", state);
}
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,0,0,0,ym_irq
};
diff --git a/src/mame/drivers/spy.c b/src/mame/drivers/spy.c
index 3957e309291..29c2c188390 100644
--- a/src/mame/drivers/spy.c
+++ b/src/mame/drivers/spy.c
@@ -507,13 +507,13 @@ static void volume_callback1(int v)
K007232_set_volume(1,1,0,(v & 0x0f) * 0x11);
}
-static struct K007232_interface k007232_interface_1 =
+static const struct K007232_interface k007232_interface_1 =
{
REGION_SOUND1,
volume_callback0
};
-static struct K007232_interface k007232_interface_2 =
+static const struct K007232_interface k007232_interface_2 =
{
REGION_SOUND2,
volume_callback1
@@ -525,7 +525,7 @@ static void irqhandler(int linestate)
cpunum_set_input_line(1, INPUT_LINE_NMI, linestate);
}
-static struct YM3812interface ym3812_interface =
+static const struct YM3812interface ym3812_interface =
{
irqhandler
};
diff --git a/src/mame/drivers/srmp2.c b/src/mame/drivers/srmp2.c
index 41459064d59..5560f145c85 100644
--- a/src/mame/drivers/srmp2.c
+++ b/src/mame/drivers/srmp2.c
@@ -1035,14 +1035,14 @@ INPUT_PORTS_END
***************************************************************************/
-static struct AY8910interface srmp2_ay8910_interface =
+static const struct AY8910interface srmp2_ay8910_interface =
{
input_port_2_r, /* Input A: DSW 2 */
input_port_1_r, /* Input B: DSW 1 */
};
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
srmp2_adpcm_int, /* IRQ handler */
MSM5205_S48_4B /* 8 KHz, 4 Bits */
diff --git a/src/mame/drivers/srmp5.c b/src/mame/drivers/srmp5.c
index b5a6d1544e3..bb289f425d0 100644
--- a/src/mame/drivers/srmp5.c
+++ b/src/mame/drivers/srmp5.c
@@ -213,7 +213,7 @@ static ADDRESS_MAP_START( st0016_io, ADDRESS_SPACE_IO, 8 )
ADDRESS_MAP_END
-static struct r3000_config config =
+static const struct r3000_config config =
{
1, /* 1 if we have an FPU, 0 otherwise */
4096, /* code cache size */
@@ -615,7 +615,7 @@ PORT_START
PORT_DIPSETTING( 0x00000000, DEF_STR( On ) )
INPUT_PORTS_END
-static struct ST0016interface st0016_interface =
+static const struct ST0016interface st0016_interface =
{
&st0016_charram
};
diff --git a/src/mame/drivers/ssf2md.c b/src/mame/drivers/ssf2md.c
index b0255d19e4e..e598d129418 100644
--- a/src/mame/drivers/ssf2md.c
+++ b/src/mame/drivers/ssf2md.c
@@ -12,7 +12,7 @@ ROM_END
static READ16_HANDLER( ssf2ghw_dsw_r )
{
- static const char *dswname[3] = { "DSWA", "DSWB", "DSWC" };
+ static const char *const dswname[3] = { "DSWA", "DSWB", "DSWC" };
return readinputportbytag(dswname[offset]);
}
diff --git a/src/mame/drivers/sshangha.c b/src/mame/drivers/sshangha.c
index 93ec2016e61..869581d97ea 100644
--- a/src/mame/drivers/sshangha.c
+++ b/src/mame/drivers/sshangha.c
@@ -331,7 +331,7 @@ static void irqhandler(int state)
cpunum_set_input_line(1,0,state);
}
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,0,0,0,irqhandler
};
diff --git a/src/mame/drivers/ssrj.c b/src/mame/drivers/ssrj.c
index 5d1688eefab..172d2a18e31 100644
--- a/src/mame/drivers/ssrj.c
+++ b/src/mame/drivers/ssrj.c
@@ -161,7 +161,7 @@ static GFXDECODE_START( ssrj )
GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 8*4 )
GFXDECODE_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
0, /* not used ? */
input_port_3_r,
diff --git a/src/mame/drivers/ssv.c b/src/mame/drivers/ssv.c
index 710534b9f92..d1c705422bb 100644
--- a/src/mame/drivers/ssv.c
+++ b/src/mame/drivers/ssv.c
@@ -30,14 +30,14 @@ STA-0001 SAM-5127 93 Survival Arts Sammy
STA-0001 SAM-5127 93 Dyna Gears Sammy
STA-0001B VISCO-001B 94 Drift Out '94 Visco
STA-0001B GOLF ROM 94 Eagle Shot Golf Sammy
-STA-0001B ? 94 Twin Eagle II - The Rescue Mission Seta
-STA-0001B VISCO 95 Mobil Suit Gundam Final Shooting (1) Banpresto
+STA-0001B STS0003 94 Twin Eagle II - The Rescue Mission (1) Seta
+STA-0001B VISCO 95 Mobil Suit Gundam Final Shooting (2) Banpresto
STA-0001B P1-102A 95 Mahjong Hyper Reaction Sammy
? ? 95 Ultra X Weapons / Ultra Keibitai Banpresto + Tsuburaya Prod.
STA-0001B VISCO-JJ1 96 Lovely Pop Mahjong JangJang Shimasho Visco
STA-0001B VISCO-001B 96 Storm Blade Visco
STA-0001B P1-105A 96? Meosis Magic Sammy
-STA-0001B ? 97 Joryuu Syougi Kyoushitsu (2) Visco
+STA-0001B ? 97 Joryuu Syougi Kyoushitsu (3) Visco
STA-0001B VISCO-JJ1 97 Koi Koi Shimasho 2 Visco
STA-0001B P1-112A 97 Mahjong Hyper Reaction 2 Sammy
STA-0001B ? 97 Monster Slider Visco / Datt
@@ -51,8 +51,9 @@ STA-0001B SSV_SUB 00 Vasara Visco
STA-0001B SSV_SUB 01 Vasara 2 Visco
-----------------------------------------------------------------------------------
-(1) Uses ST-0009 & ST-0020 & Light Gun
-(2) Uses NEC V810 CPU as sub cpu for the AI (basically the same as the majinsen games on st0016)
+(1) Uses ST010 MCU / Math chip
+(2) Uses ST-0009 & ST-0020 & Light Gun
+(3) Uses NEC V810 CPU as sub cpu for the AI (basically the same as the majinsen games on st0016)
SSV Hardware Overview
Sammy/Seta/Visco, 1993-2001
@@ -2675,7 +2676,7 @@ GFXDECODE_END
***************************************************************************/
-static struct ES5506interface es5506_interface =
+static const struct ES5506interface es5506_interface =
{
REGION_SOUND1,
REGION_SOUND2,
@@ -4336,33 +4337,64 @@ ROM_END
/***************************************************************************
Twin Eagle II
+SETA, 1994
+
+STS0003 TWIN EAGLE
+|-------------------------------------|
+| |
+| |
+| SX002-09.u2 |
+| |
+| SX002-08.u3 |
+| |
+| SX002-11.u7 SX002-07.u6 |
+| |
+| |
+| SX002-10.u14 SX002-06.u13 |
+| |
+| SX002-05.u16 |
+| |
+| SX002-12.u22 SX002-04.u19 |
+| |
+| SX002-13 |
+| SX002-03.u22 |
+| |
+| SX002-02.u28 |
+| |
+| SX002-01.u32 |
+| SETA ST010 |
+|-------------------------------------|
+
+SX002-13 is GAL16V8B (undumped)
+SETA ST010 is some type of MCU/Math chip?
+All roms are 16M Mask roms
***************************************************************************/
ROM_START( twineag2 )
ROM_REGION16_LE( 0x200000, REGION_USER1, 0 ) /* V60 Code */
- ROM_LOAD16_WORD( "sx002_12", 0x000000, 0x200000, CRC(846044dc) SHA1(c1c85de1c466fb7c3580824baa1571cd0fed6ec6) )
+ ROM_LOAD16_WORD( "sx002-12.u22", 0x000000, 0x200000, CRC(846044dc) SHA1(c1c85de1c466fb7c3580824baa1571cd0fed6ec6) )
ROM_REGION( 0x1800000, REGION_GFX1, ROMREGION_DISPOSE ) /* Sprites */
- ROM_LOAD( "sx002_01", 0x0000000, 0x200000, CRC(6d6896b5) SHA1(e8efd29b9f951bff6664e47cb5fd67f1d8f40608) )
- ROM_LOAD( "sx002_02", 0x0200000, 0x200000, CRC(3f47e97a) SHA1(5b0fdc762cf704c8bd92c4a4a42dba4a127b3d49) )
- ROM_LOAD( "sx002_03", 0x0400000, 0x200000, CRC(544f18bf) SHA1(539e6df1ded4e9ac8974c697215cc1e5c5a40cda) )
+ ROM_LOAD( "sx002-01.u32", 0x0000000, 0x200000, CRC(6d6896b5) SHA1(e8efd29b9f951bff6664e47cb5fd67f1d8f40608) ) /* A0 */
+ ROM_LOAD( "sx002-02.u28", 0x0200000, 0x200000, CRC(3f47e97a) SHA1(5b0fdc762cf704c8bd92c4a4a42dba4a127b3d49) ) /* A1 */
+ ROM_LOAD( "sx002-03.u25", 0x0400000, 0x200000, CRC(544f18bf) SHA1(539e6df1ded4e9ac8974c697215cc1e5c5a40cda) ) /* A2, A3 is unpopulated */
- ROM_LOAD( "sx002_04", 0x0600000, 0x200000, CRC(58c270e2) SHA1(7629ba978b18252f375bdc16ed62388d64a35ca1) )
- ROM_LOAD( "sx002_05", 0x0800000, 0x200000, CRC(3c310229) SHA1(9a8b81d5f17ce3078627a697aaf07f1b3ba6e08c) )
- ROM_LOAD( "sx002_06", 0x0a00000, 0x200000, CRC(46d5b1f3) SHA1(3ec03eddb159eb391ccdce5a0a867a54b3350150) )
+ ROM_LOAD( "sx002-04.u19", 0x0600000, 0x200000, CRC(58c270e2) SHA1(7629ba978b18252f375bdc16ed62388d64a35ca1) ) /* B0 */
+ ROM_LOAD( "sx002-05.u16", 0x0800000, 0x200000, CRC(3c310229) SHA1(9a8b81d5f17ce3078627a697aaf07f1b3ba6e08c) ) /* B1 */
+ ROM_LOAD( "sx002-06.u13", 0x0a00000, 0x200000, CRC(46d5b1f3) SHA1(3ec03eddb159eb391ccdce5a0a867a54b3350150) ) /* B2, B3 is unpopulated */
- ROM_LOAD( "sx002_07", 0x0c00000, 0x200000, CRC(c30fa397) SHA1(d4575868c1b63f9e94bf24539a3fd8a85df93d0b) )
- ROM_LOAD( "sx002_08", 0x0e00000, 0x200000, CRC(64edcefa) SHA1(55a71afe87da93e35c5ba291e970bdcd91b52a7a) )
- ROM_LOAD( "sx002_09", 0x1000000, 0x200000, CRC(51527c56) SHA1(378155a585e5b847bd8ae1f17cb651138d844e33) )
+ ROM_LOAD( "sx002-07.u6", 0x0c00000, 0x200000, CRC(c30fa397) SHA1(d4575868c1b63f9e94bf24539a3fd8a85df93d0b) ) /* C0 */
+ ROM_LOAD( "sx002-08.u3", 0x0e00000, 0x200000, CRC(64edcefa) SHA1(55a71afe87da93e35c5ba291e970bdcd91b52a7a) ) /* C1 */
+ ROM_LOAD( "sx002-09.u2", 0x1000000, 0x200000, CRC(51527c56) SHA1(378155a585e5b847bd8ae1f17cb651138d844e33) ) /* C2, C3 is unpopulated */
ROM_FILL( 0x1200000, 0x600000, 0 )
ROM_REGION16_BE( 0x400000, REGION_SOUND1, ROMREGION_ERASE | 0 ) /* Samples */
- ROM_LOAD16_BYTE( "sx002_10", 0x000000, 0x200000, CRC(b0669dfa) SHA1(ff805f59864ac4ccee3e249c06804d844d3df59c) )
+ ROM_LOAD16_BYTE( "sx002-10.u14", 0x000000, 0x200000, CRC(b0669dfa) SHA1(ff805f59864ac4ccee3e249c06804d844d3df59c) )
ROM_REGION16_BE( 0x400000, REGION_SOUND2, ROMREGION_ERASE | 0 ) /* Samples */
- ROM_LOAD16_BYTE( "sx002_11", 0x000000, 0x200000, CRC(b8dd621a) SHA1(f9b43e018f2bb121e4f4e9554419cd32b870556b) )
+ ROM_LOAD16_BYTE( "sx002-11.u7", 0x000000, 0x200000, CRC(b8dd621a) SHA1(f9b43e018f2bb121e4f4e9554419cd32b870556b) )
ROM_REGION16_BE( 0x400000, REGION_SOUND3, 0 ) /* Samples */
ROM_COPY( REGION_SOUND1, 0x000000, 0x000000, 0x400000 )
diff --git a/src/mame/drivers/st0016.c b/src/mame/drivers/st0016.c
index 4d97880ab4e..dcd5f0d9121 100644
--- a/src/mame/drivers/st0016.c
+++ b/src/mame/drivers/st0016.c
@@ -402,7 +402,7 @@ static INTERRUPT_GEN(st0016_int)
}
extern UINT8 *st0016_charram;
-static struct ST0016interface st0016_interface =
+static const struct ST0016interface st0016_interface =
{
&st0016_charram
};
diff --git a/src/mame/drivers/stadhero.c b/src/mame/drivers/stadhero.c
index 5ed99add325..f35c64d7d33 100644
--- a/src/mame/drivers/stadhero.c
+++ b/src/mame/drivers/stadhero.c
@@ -269,7 +269,7 @@ static void irqhandler(int linestate)
cpunum_set_input_line(1,0,linestate);
}
-static struct YM3812interface ym3812_interface =
+static const struct YM3812interface ym3812_interface =
{
irqhandler
};
diff --git a/src/mame/drivers/starcrus.c b/src/mame/drivers/starcrus.c
index c640ca50b74..feb585ae739 100644
--- a/src/mame/drivers/starcrus.c
+++ b/src/mame/drivers/starcrus.c
@@ -150,7 +150,7 @@ static GFXDECODE_START( starcrus )
GFXDECODE_END
-static UINT16 colortable_source[] =
+static const UINT16 colortable_source[] =
{
0x00, 0x01, /* White on Black */
};
diff --git a/src/mame/drivers/starwars.c b/src/mame/drivers/starwars.c
index d6c678dadba..a03b6bcd5a7 100644
--- a/src/mame/drivers/starwars.c
+++ b/src/mame/drivers/starwars.c
@@ -63,8 +63,8 @@ static MACHINE_RESET( starwars )
starwars_out_w(4, 0);
}
- /* reset the mathbox */
- swmathbox_reset();
+ /* reset the matrix processor */
+ starwars_mproc_reset();
}
@@ -178,10 +178,10 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x46a0, 0x46bf) AM_WRITE(starwars_nstore_w)
AM_RANGE(0x46c0, 0x46c2) AM_WRITE(starwars_adc_select_w)
AM_RANGE(0x46e0, 0x46e0) AM_WRITE(starwars_soundrst_w)
- AM_RANGE(0x4700, 0x4707) AM_WRITE(swmathbx_w)
- AM_RANGE(0x4700, 0x4700) AM_READ(swmathbx_reh_r)
- AM_RANGE(0x4701, 0x4701) AM_READ(swmathbx_rel_r)
- AM_RANGE(0x4703, 0x4703) AM_READ(swmathbx_prng_r) /* pseudo random number generator */
+ AM_RANGE(0x4700, 0x4707) AM_WRITE(starwars_math_w)
+ AM_RANGE(0x4700, 0x4700) AM_READ(starwars_div_reh_r)
+ AM_RANGE(0x4701, 0x4701) AM_READ(starwars_div_rel_r)
+ AM_RANGE(0x4703, 0x4703) AM_READ(starwars_prng_r) /* pseudo random number generator */
AM_RANGE(0x4800, 0x4fff) AM_RAM /* CPU and Math RAM */
AM_RANGE(0x5000, 0x5fff) AM_RAM AM_BASE(&starwars_mathram) /* CPU and Math RAM */
AM_RANGE(0x6000, 0x7fff) AM_ROMBANK(1) /* banked ROM */
@@ -563,7 +563,7 @@ static DRIVER_INIT( starwars )
/* prepare the mathbox */
starwars_is_esb = 0;
- swmathbox_init();
+ starwars_mproc_init();
/* initialize banking */
memory_configure_bank(1, 0, 2, memory_region(REGION_CPU1) + 0x6000, 0x10000 - 0x6000);
@@ -591,9 +591,9 @@ static DRIVER_INIT( esb )
/* install additional banking */
memory_install_read8_handler(0, ADDRESS_SPACE_PROGRAM, 0xa000, 0xffff, 0, 0, MRA8_BANK2);
- /* prepare the mathbox */
+ /* prepare the matrix processor */
starwars_is_esb = 1;
- swmathbox_init();
+ starwars_mproc_init();
/* initialize banking */
memory_configure_bank(1, 0, 2, memory_region(REGION_CPU1) + 0x6000, 0x10000 - 0x6000);
diff --git a/src/mame/drivers/stfight.c b/src/mame/drivers/stfight.c
index d309c774133..ef51119d6b5 100644
--- a/src/mame/drivers/stfight.c
+++ b/src/mame/drivers/stfight.c
@@ -476,7 +476,7 @@ static GFXDECODE_START( stfight )
GFXDECODE_ENTRY( REGION_GFX4, 0x0000, spritelayout, 16*4+16*16+16*16, 16 )
GFXDECODE_END
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
stfight_adpcm_int, /* interrupt function */
MSM5205_S48_4B /* 8KHz */
diff --git a/src/mame/drivers/stv.c b/src/mame/drivers/stv.c
index 43bacb02ec6..f82e5be6934 100644
--- a/src/mame/drivers/stv.c
+++ b/src/mame/drivers/stv.c
@@ -933,7 +933,7 @@ offsets:
7h
7l PORT-AD
*/
-static UINT8 port_ad[] =
+static const UINT8 port_ad[] =
{
0xcc,0xb2,0x99,0x7f,0x66,0x4c,0x33,0x19
};
@@ -2642,8 +2642,8 @@ static GFXDECODE_START( stv )
GFXDECODE_END
-static struct sh2_config sh2_conf_master = { 0 };
-static struct sh2_config sh2_conf_slave = { 1 };
+static const struct sh2_config sh2_conf_master = { 0 };
+static const struct sh2_config sh2_conf_slave = { 1 };
static int scsp_last_line = 0;
@@ -2670,7 +2670,7 @@ static void scsp_irq(int irq)
}
}
-static struct SCSPinterface scsp_interface =
+static const struct SCSPinterface scsp_interface =
{
0,
0,
diff --git a/src/mame/drivers/suna16.c b/src/mame/drivers/suna16.c
index abcdeb91d75..5f04db9556b 100644
--- a/src/mame/drivers/suna16.c
+++ b/src/mame/drivers/suna16.c
@@ -1011,7 +1011,7 @@ static void bestbest_ym3526_irqhandler(int state)
cpunum_set_input_line(1, INPUT_LINE_IRQ0, state);
}
-static struct YM3526interface bestbest_ym3526_interface =
+static const struct YM3526interface bestbest_ym3526_interface =
{
bestbest_ym3526_irqhandler
};
@@ -1021,7 +1021,7 @@ static WRITE8_HANDLER( bestbest_ay8910_port_a_w )
// ?
}
-static struct AY8910interface bestbest_ay8910_interface =
+static const struct AY8910interface bestbest_ay8910_interface =
{
0, 0,
bestbest_ay8910_port_a_w, 0
diff --git a/src/mame/drivers/suna8.c b/src/mame/drivers/suna8.c
index ab6fa48edfd..1cb8054a9d1 100644
--- a/src/mame/drivers/suna8.c
+++ b/src/mame/drivers/suna8.c
@@ -1531,7 +1531,7 @@ static void soundirq(int state)
/* 1 x 24 MHz crystal */
-static struct AY8910interface hardhead_ay8910_interface =
+static const struct AY8910interface hardhead_ay8910_interface =
{
0,
0,
@@ -1648,7 +1648,7 @@ MACHINE_DRIVER_END
/* 1 x 24 MHz crystal */
-static struct YM3812interface brickzn_ym3812_interface =
+static const struct YM3812interface brickzn_ym3812_interface =
{
soundirq /* IRQ Line */
};
@@ -1754,7 +1754,7 @@ MACHINE_DRIVER_END
Star Fighter
***************************************************************************/
-static struct AY8910interface starfigh_ay8910_interface =
+static const struct AY8910interface starfigh_ay8910_interface =
{
0,
0,
diff --git a/src/mame/drivers/supbtime.c b/src/mame/drivers/supbtime.c
index ab3ce120c2b..1fcc516f986 100644
--- a/src/mame/drivers/supbtime.c
+++ b/src/mame/drivers/supbtime.c
@@ -365,7 +365,7 @@ static void sound_irq(int state)
cpunum_set_input_line(1,1,state); /* IRQ 2 */
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
sound_irq
};
diff --git a/src/mame/drivers/superdq.c b/src/mame/drivers/superdq.c
index 668805c4e74..d529c6dd3f7 100644
--- a/src/mame/drivers/superdq.c
+++ b/src/mame/drivers/superdq.c
@@ -175,7 +175,7 @@ static WRITE8_HANDLER( superdq_videoram_w )
static WRITE8_HANDLER( superdq_io_w )
{
int i;
- static UINT8 black_color_entries[] = {7,15,16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};
+ static const UINT8 black_color_entries[] = {7,15,16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};
if ( data & 0x40 ) /* bit 6 = irqack */
cpunum_set_input_line(0, 0, CLEAR_LINE);
diff --git a/src/mame/drivers/superqix.c b/src/mame/drivers/superqix.c
index 54d3cb5e862..17fb60b997d 100644
--- a/src/mame/drivers/superqix.c
+++ b/src/mame/drivers/superqix.c
@@ -869,25 +869,25 @@ static const struct Samplesinterface pbillian_samples_interface =
pbillian_sh_start
};
-static struct AY8910interface pbillian_ay8910_interface =
+static const struct AY8910interface pbillian_ay8910_interface =
{
pbillian_ay_port_a_r, /* port Aread */
input_port_2_r /* port Bread */
};
-static struct AY8910interface hotsmash_ay8910_interface =
+static const struct AY8910interface hotsmash_ay8910_interface =
{
hotsmash_ay_port_a_r, /* port Aread */
input_port_2_r /* port Bread */
};
-static struct AY8910interface sqix_ay8910_interface_1 =
+static const struct AY8910interface sqix_ay8910_interface_1 =
{
input_port_3_r, /* port Aread */
in4_mcu_r, /* port Bread */
};
-static struct AY8910interface sqix_ay8910_interface_2 =
+static const struct AY8910interface sqix_ay8910_interface_2 =
{
input_port_1_r, /* port Aread */
sqix_from_mcu_r, /* port Bread */
@@ -895,13 +895,13 @@ static struct AY8910interface sqix_ay8910_interface_2 =
sqix_z80_mcu_w /* port Bwrite */
};
-static struct AY8910interface bootleg_ay8910_interface_1 =
+static const struct AY8910interface bootleg_ay8910_interface_1 =
{
input_port_3_r, /* port Aread */
input_port_4_r /* port Bread */
};
-static struct AY8910interface bootleg_ay8910_interface_2 =
+static const struct AY8910interface bootleg_ay8910_interface_2 =
{
input_port_1_r, /* port Aread */
bootleg_in0_r /* port Bread */
@@ -1246,7 +1246,7 @@ static DRIVER_INIT( perestro )
memcpy(temp,&src[i],16);
for (j = 0;j < 16;j++)
{
- static int convtable[16] =
+ static const int convtable[16] =
{
0xc, 0x9, 0xb, 0xa,
0x8, 0xd, 0xf, 0xe,
diff --git a/src/mame/drivers/suprgolf.c b/src/mame/drivers/suprgolf.c
index 27e2da87f48..05d71d7385c 100644
--- a/src/mame/drivers/suprgolf.c
+++ b/src/mame/drivers/suprgolf.c
@@ -261,7 +261,7 @@ static void irqhandler(int irq)
// cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
input_port_5_r,
input_port_6_r,
diff --git a/src/mame/drivers/suprnova.c b/src/mame/drivers/suprnova.c
index 23c6789088f..27dda8af305 100644
--- a/src/mame/drivers/suprnova.c
+++ b/src/mame/drivers/suprnova.c
@@ -929,7 +929,7 @@ GFXDECODE_END
/***** MACHINE DRIVER *****/
-static struct YMZ280Binterface ymz280b_intf =
+static const struct YMZ280Binterface ymz280b_intf =
{
REGION_SOUND1,
0 // irq ?
diff --git a/src/mame/drivers/suprridr.c b/src/mame/drivers/suprridr.c
index 5830cbd63c6..4b396d3407e 100644
--- a/src/mame/drivers/suprridr.c
+++ b/src/mame/drivers/suprridr.c
@@ -307,7 +307,7 @@ GFXDECODE_END
*
*************************************/
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
sound_data_r
};
diff --git a/src/mame/drivers/suprslam.c b/src/mame/drivers/suprslam.c
index f543ce5fff7..030e828cc6d 100644
--- a/src/mame/drivers/suprslam.c
+++ b/src/mame/drivers/suprslam.c
@@ -316,7 +316,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2610interface ym2610_interface =
+static const struct YM2610interface ym2610_interface =
{
irqhandler,
REGION_SOUND1,
diff --git a/src/mame/drivers/surpratk.c b/src/mame/drivers/surpratk.c
index 62f70f6d8c5..3ed49ccae34 100644
--- a/src/mame/drivers/surpratk.c
+++ b/src/mame/drivers/surpratk.c
@@ -226,7 +226,7 @@ static void irqhandler(int linestate)
cpunum_set_input_line(0,KONAMI_FIRQ_LINE,linestate);
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
irqhandler
};
diff --git a/src/mame/drivers/system1.c b/src/mame/drivers/system1.c
index 19fff673b5d..6ff69dc5907 100644
--- a/src/mame/drivers/system1.c
+++ b/src/mame/drivers/system1.c
@@ -334,7 +334,7 @@ ADDRESS_MAP_END
/* protection values from real hardware, these were verified to be the same on the title
screen and in the first level... they're all jumps that the MCU appears to put in RAM
at some point */
-static int shtngtab[]=
+static const int shtngtab[]=
{
0xC3,0xC1,0x39,
0xC3,0x6F,0x0A,
diff --git a/src/mame/drivers/system16.c b/src/mame/drivers/system16.c
index 2b932f3243b..e71d6de4d39 100644
--- a/src/mame/drivers/system16.c
+++ b/src/mame/drivers/system16.c
@@ -159,9 +159,9 @@ Notes:
void fd1094_machine_init(void);
void fd1094_driver_init(void (*set_decrypted)(UINT8 *));
-static void sys16_video_config(void (*update)(void), int sprxoffs, int *bank)
+static void sys16_video_config(void (*update)(void), int sprxoffs, const int *bank)
{
- static int bank_default[16] =
+ static const int bank_default[16] =
{
0x0,0x1,0x2,0x3,
0x4,0x5,0x6,0x7,
@@ -264,7 +264,7 @@ static void tturfbl_msm5205_callback(int data)
cpunum_set_input_line(1, INPUT_LINE_NMI, PULSE_LINE);
}
-static struct MSM5205interface tturfbl_msm5205_interface =
+static const struct MSM5205interface tturfbl_msm5205_interface =
{
tturfbl_msm5205_callback,
MSM5205_S48_4B
@@ -640,7 +640,7 @@ static void bayroute_update_proc( void )
static MACHINE_RESET( bayroute )
{
- static int bank[16] = {
+ static const int bank[16] = {
0,0,0,0,
0,0,0,3,
0,0,0,2,
@@ -805,7 +805,7 @@ static MACHINE_RESET( dduxbl )
static DRIVER_INIT( dduxbl )
{
- static int bank[16] = { //*
+ static const int bank[16] = { //*
0,0,0,0,
0,0,0,4,
0,0,0,3,
@@ -922,7 +922,7 @@ static void eswatbl_update_proc( void )
static MACHINE_RESET( eswatbl )
{
- static int bank[] = {
+ static const int bank[16] = {
0,1, 4,5,
8,9, 12,13,
2,3, 6,7,
@@ -1277,7 +1277,7 @@ static void goldnaxe_update_proc( void )
static MACHINE_RESET( goldnaxe )
{
- static int bank[16] = {
+ static const int bank[16] = {
0,1,4,5,
8,9,0,0,
2,3,6,7,
@@ -1758,7 +1758,7 @@ static void shinobl_update_proc( void )
static MACHINE_RESET( shinobl )
{
- static int bank[] = {
+ static const int bank[16] = {
0,2,4,6,
1,3,5,7
};
@@ -2047,7 +2047,7 @@ static void tturfbl_update_proc( void )
static MACHINE_RESET( tturfbl )
{
- static int bank[16] = {
+ static const int bank[16] = {
0,0,0,0,
0,0,0,3,
0,0,0,2,
@@ -2186,7 +2186,7 @@ static void wb3bbl_update_proc( void )
static MACHINE_RESET( wb3bbl )
{
- static int bank[16] = {
+ static const int bank[16] = {
2,0,
1,0,
3,0,
diff --git a/src/mame/drivers/system18.c b/src/mame/drivers/system18.c
index 7b4ae4b0b10..19417ca9562 100644
--- a/src/mame/drivers/system18.c
+++ b/src/mame/drivers/system18.c
@@ -184,7 +184,7 @@ static void shdancbl_msm5205_callback(int data)
cpunum_set_input_line(1, INPUT_LINE_NMI, PULSE_LINE);
}
-static struct MSM5205interface shdancbl_msm5205_interface =
+static const struct MSM5205interface shdancbl_msm5205_interface =
{
shdancbl_msm5205_callback,
MSM5205_S48_4B
diff --git a/src/mame/drivers/tail2nos.c b/src/mame/drivers/tail2nos.c
index 0e734bb5326..6c570e12e37 100644
--- a/src/mame/drivers/tail2nos.c
+++ b/src/mame/drivers/tail2nos.c
@@ -249,7 +249,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2608interface ym2608_interface =
+static const struct YM2608interface ym2608_interface =
{
0,
0,
diff --git a/src/mame/drivers/taito_b.c b/src/mame/drivers/taito_b.c
index 7680f84e63b..bfafd36b8ca 100644
--- a/src/mame/drivers/taito_b.c
+++ b/src/mame/drivers/taito_b.c
@@ -2581,21 +2581,21 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2610interface ym2610_interface_rsaga2 =
+static const struct YM2610interface ym2610_interface_rsaga2 =
{
irqhandler,
REGION_SOUND1,
REGION_SOUND2
};
-static struct YM2610interface ym2610_interface_crimec =
+static const struct YM2610interface ym2610_interface_crimec =
{
irqhandler,
REGION_SOUND1,
REGION_SOUND1
};
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,
0,
@@ -2627,7 +2627,7 @@ static void mb87078_gain_changed(int channel, int percent)
}
}
-static struct MB87078interface mb87078_interface =
+static const struct MB87078interface mb87078_interface =
{
mb87078_gain_changed /*callback function for gain change*/
};
diff --git a/src/mame/drivers/taito_f2.c b/src/mame/drivers/taito_f2.c
index 277683d3b4b..75035cc6c1c 100644
--- a/src/mame/drivers/taito_f2.c
+++ b/src/mame/drivers/taito_f2.c
@@ -3823,7 +3823,7 @@ static void irq_handler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2610interface ym2610_interface =
+static const struct YM2610interface ym2610_interface =
{
irq_handler,
REGION_SOUND2, /* Delta-T */
@@ -3836,7 +3836,7 @@ static WRITE8_HANDLER( camltrya_porta_w )
// Implement //
}
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0, /* portA read */
0,
diff --git a/src/mame/drivers/taito_h.c b/src/mame/drivers/taito_h.c
index 86fe110c4f2..2879a789c00 100644
--- a/src/mame/drivers/taito_h.c
+++ b/src/mame/drivers/taito_h.c
@@ -163,14 +163,14 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2610interface syvalion_ym2610_interface =
+static const struct YM2610interface syvalion_ym2610_interface =
{
irqhandler,
REGION_SOUND1,
REGION_SOUND2
};
-static struct YM2610interface dleague_ym2610_interface =
+static const struct YM2610interface dleague_ym2610_interface =
{
irqhandler,
REGION_SOUND1,
diff --git a/src/mame/drivers/taito_l.c b/src/mame/drivers/taito_l.c
index 4e550d41525..4dc6f4e0a37 100644
--- a/src/mame/drivers/taito_l.c
+++ b/src/mame/drivers/taito_l.c
@@ -77,7 +77,7 @@ READ8_HANDLER( taitol_bankc_r );
-static void (*rambank_modify_notifiers[12])(int) =
+static void (*const rambank_modify_notifiers[12])(int) =
{
taitol_chardef14_m, // 14
taitol_chardef15_m, // 15
@@ -2244,7 +2244,7 @@ static WRITE8_HANDLER( portA_w )
}
}
-static struct YM2203interface ym2203_interface_triple =
+static const struct YM2203interface ym2203_interface_triple =
{
0,
0,
@@ -2253,7 +2253,7 @@ static struct YM2203interface ym2203_interface_triple =
irqhandler
};
-static struct YM2203interface ym2203_interface_champwr =
+static const struct YM2203interface ym2203_interface_champwr =
{
0,
0,
@@ -2263,20 +2263,20 @@ static struct YM2203interface ym2203_interface_champwr =
};
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
champwr_msm5205_vck,/* VCK function */
MSM5205_S48_4B /* 8 kHz */
};
-static struct YM2610interface ym2610_interface =
+static const struct YM2610interface ym2610_interface =
{
irqhandler,
REGION_SOUND1,
REGION_SOUND1
};
-static struct YM2203interface ym2203_interface_single =
+static const struct YM2203interface ym2203_interface_single =
{
portA_r,
portB_r
diff --git a/src/mame/drivers/taito_x.c b/src/mame/drivers/taito_x.c
index 2ecd39fc8d2..0d74f48d58d 100644
--- a/src/mame/drivers/taito_x.c
+++ b/src/mame/drivers/taito_x.c
@@ -975,21 +975,21 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2610interface ym2610_interface =
+static const struct YM2610interface ym2610_interface =
{
irqhandler,
REGION_SOUND1,
REGION_SOUND1
};
-static struct YM2610interface ballbros_ym2610_interface =
+static const struct YM2610interface ballbros_ym2610_interface =
{
irqhandler,
REGION_SOUND1,
REGION_SOUND2
};
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
irqhandler
};
diff --git a/src/mame/drivers/taito_z.c b/src/mame/drivers/taito_z.c
index 31c65b164cd..069c65a15a4 100644
--- a/src/mame/drivers/taito_z.c
+++ b/src/mame/drivers/taito_z.c
@@ -1134,7 +1134,7 @@ logerror("CPU #0 PC %06x: warning - read unmapped stick offset %06x\n",activecpu
return 0xff;
}
-static UINT8 nightstr_stick[128]=
+static const UINT8 nightstr_stick[128]=
{
0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0xbe,0xbf,0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,
0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,
@@ -2752,14 +2752,14 @@ static void irqhandlerb(int irq)
// cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2610interface ym2610_interface =
+static const struct YM2610interface ym2610_interface =
{
irqhandler,
REGION_SOUND2, /* Delta-T */
REGION_SOUND1 /* ADPCM */
};
-static struct YM2610interface ym2610_interfaceb =
+static const struct YM2610interface ym2610_interfaceb =
{
irqhandlerb,
REGION_SOUND2, /* Delta-T */
@@ -2786,7 +2786,7 @@ static int subwoofer_sh_start(const sound_config *msound)
return 0;
}
-static struct CustomSound_interface subwoofer_interface =
+static const struct CustomSound_interface subwoofer_interface =
{
subwoofer_sh_start,
0, /* none */
diff --git a/src/mame/drivers/taitoair.c b/src/mame/drivers/taitoair.c
index 90bb668c62f..c50ec6b74dd 100644
--- a/src/mame/drivers/taitoair.c
+++ b/src/mame/drivers/taitoair.c
@@ -575,7 +575,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2610interface airsys_ym2610_interface =
+static const struct YM2610interface airsys_ym2610_interface =
{
irqhandler,
REGION_SOUND2,
diff --git a/src/mame/drivers/taitosj.c b/src/mame/drivers/taitosj.c
index 0c71b76f6bf..65069275ab1 100644
--- a/src/mame/drivers/taitosj.c
+++ b/src/mame/drivers/taitosj.c
@@ -1827,7 +1827,7 @@ static GFXDECODE_START( taitosj )
GFXDECODE_END
-static UINT8 voltable[256] =
+static const UINT8 voltable[256] =
{
0xff,0xfe,0xfc,0xfb,0xf9,0xf7,0xf6,0xf4,0xf3,0xf2,0xf1,0xef,0xee,0xec,0xeb,0xea,
0xe8,0xe7,0xe5,0xe4,0xe2,0xe1,0xe0,0xdf,0xde,0xdd,0xdc,0xdb,0xd9,0xd8,0xd7,0xd6,
@@ -1863,13 +1863,13 @@ static WRITE8_HANDLER( dac_vol_w )
}
-static struct AY8910interface ay8910_interface_1 =
+static const struct AY8910interface ay8910_interface_1 =
{
input_port_6_r,
input_port_7_r
};
-static struct AY8910interface ay8910_interface_2 =
+static const struct AY8910interface ay8910_interface_2 =
{
0,
0,
@@ -1877,7 +1877,7 @@ static struct AY8910interface ay8910_interface_2 =
dac_vol_w /* port Bwrite */
};
-static struct AY8910interface ay8910_interface_3 =
+static const struct AY8910interface ay8910_interface_3 =
{
0,
0,
@@ -1885,7 +1885,7 @@ static struct AY8910interface ay8910_interface_3 =
0
};
-static struct AY8910interface ay8910_interface_4 =
+static const struct AY8910interface ay8910_interface_4 =
{
0,
0,
diff --git a/src/mame/drivers/taitowlf.c b/src/mame/drivers/taitowlf.c
index 5f238337b91..a05e7d3cc41 100644
--- a/src/mame/drivers/taitowlf.c
+++ b/src/mame/drivers/taitowlf.c
@@ -439,13 +439,13 @@ static MACHINE_DRIVER_START(taitowlf)
MACHINE_DRIVER_END
-static struct pci_device_info intel82439tx =
+static const struct pci_device_info intel82439tx =
{
intel82439tx_pci_r,
intel82439tx_pci_w
};
-static struct pci_device_info intel82371ab =
+static const struct pci_device_info intel82371ab =
{
intel82371ab_pci_r,
intel82371ab_pci_w
@@ -466,12 +466,12 @@ static void ide_interrupt(int state)
pic8259_set_irq_line(1, 6, state);
}
-static struct kbdc8042_interface at8042 =
+static const struct kbdc8042_interface at8042 =
{
KBDC8042_AT386, set_gate_a20, keyboard_interrupt
};
-static struct ide_interface ide_intf =
+static const struct ide_interface ide_intf =
{
ide_interrupt
};
diff --git a/src/mame/drivers/tankbust.c b/src/mame/drivers/tankbust.c
index a9a4b51dc42..816e21d5d8f 100644
--- a/src/mame/drivers/tankbust.c
+++ b/src/mame/drivers/tankbust.c
@@ -358,7 +358,7 @@ static GFXDECODE_START( tankbust )
GFXDECODE_ENTRY( REGION_GFX3, 0, charlayout2, 0x60, 16 ) /* txt tilemap characters*/
GFXDECODE_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
tankbust_soundlatch_r,
tankbust_soundtimer_r
diff --git a/src/mame/drivers/taotaido.c b/src/mame/drivers/taotaido.c
index 0d5105c474e..c514c8914f2 100644
--- a/src/mame/drivers/taotaido.c
+++ b/src/mame/drivers/taotaido.c
@@ -349,7 +349,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2610interface ym2610_interface =
+static const struct YM2610interface ym2610_interface =
{
irqhandler,
REGION_SOUND1,
diff --git a/src/mame/drivers/tatsumi.c b/src/mame/drivers/tatsumi.c
index 9e894c95dff..6af1ba6f712 100644
--- a/src/mame/drivers/tatsumi.c
+++ b/src/mame/drivers/tatsumi.c
@@ -497,7 +497,7 @@ static void sound_irq(int state)
cpunum_set_input_line(2, INPUT_LINE_IRQ0, state);
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
sound_irq
};
diff --git a/src/mame/drivers/tattack.c b/src/mame/drivers/tattack.c
index 098727cc721..2e87372d72d 100644
--- a/src/mame/drivers/tattack.c
+++ b/src/mame/drivers/tattack.c
@@ -144,7 +144,7 @@ PORT_START
INPUT_PORTS_END
-static gfx_layout charlayout =
+static const gfx_layout charlayout =
{
8,8,
RGN_FRAC(1,1),
diff --git a/src/mame/drivers/taxidrvr.c b/src/mame/drivers/taxidrvr.c
index 2a59ca70b1a..154cedcab0d 100644
--- a/src/mame/drivers/taxidrvr.c
+++ b/src/mame/drivers/taxidrvr.c
@@ -342,7 +342,7 @@ GFXDECODE_END
-static struct AY8910interface ay8910_interface_1 =
+static const struct AY8910interface ay8910_interface_1 =
{
p8910_0a_r,
0,
@@ -350,7 +350,7 @@ static struct AY8910interface ay8910_interface_1 =
p8910_0b_w
};
-static struct AY8910interface ay8910_interface_2 =
+static const struct AY8910interface ay8910_interface_2 =
{
p8910_1a_r
};
diff --git a/src/mame/drivers/tbowl.c b/src/mame/drivers/tbowl.c
index 98e585ea992..04b6f352b42 100644
--- a/src/mame/drivers/tbowl.c
+++ b/src/mame/drivers/tbowl.c
@@ -560,12 +560,12 @@ static void irqhandler(int linestate)
cpunum_set_input_line(2,0,linestate);
}
-static struct YM3526interface ym3812_interface =
+static const struct YM3526interface ym3812_interface =
{
irqhandler
};
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
tbowl_adpcm_int, /* interrupt function */
MSM5205_S48_4B /* 8KHz */
diff --git a/src/mame/drivers/tceptor.c b/src/mame/drivers/tceptor.c
index 1bcf8c5aa2d..5b7f502e1c8 100644
--- a/src/mame/drivers/tceptor.c
+++ b/src/mame/drivers/tceptor.c
@@ -489,7 +489,7 @@ GFXDECODE_END
/*******************************************************************/
-static struct namco_interface namco_interface =
+static const struct namco_interface namco_interface =
{
8, /* number of voices */
-1, /* memory region */
diff --git a/src/mame/drivers/tecmo.c b/src/mame/drivers/tecmo.c
index 4fc6bd79fc5..26726bddf14 100644
--- a/src/mame/drivers/tecmo.c
+++ b/src/mame/drivers/tecmo.c
@@ -549,12 +549,12 @@ static void irqhandler(int linestate)
cpunum_set_input_line(1,0,linestate);
}
-static struct YM3526interface ym3812_interface =
+static const struct YM3526interface ym3812_interface =
{
irqhandler
};
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
tecmo_adpcm_int, /* interrupt function */
MSM5205_S48_4B /* 8KHz */
diff --git a/src/mame/drivers/tecmo16.c b/src/mame/drivers/tecmo16.c
index fdfd24c005d..495db9b3b14 100644
--- a/src/mame/drivers/tecmo16.c
+++ b/src/mame/drivers/tecmo16.c
@@ -430,7 +430,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
irqhandler
};
diff --git a/src/mame/drivers/tecmosys.c b/src/mame/drivers/tecmosys.c
index fc43b59a532..b5cd617d67f 100644
--- a/src/mame/drivers/tecmosys.c
+++ b/src/mame/drivers/tecmosys.c
@@ -521,13 +521,13 @@ static void sound_irq(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YMF262interface ymf262_interface =
+static const struct YMF262interface ymf262_interface =
{
sound_irq /* irq */
};
-static struct YMZ280Binterface ymz280b_interface =
+static const struct YMZ280Binterface ymz280b_interface =
{
REGION_SOUND1,
0 /* irq */
diff --git a/src/mame/drivers/tehkanwc.c b/src/mame/drivers/tehkanwc.c
index ca273c79ff6..3368d1a7c1b 100644
--- a/src/mame/drivers/tehkanwc.c
+++ b/src/mame/drivers/tehkanwc.c
@@ -772,7 +772,7 @@ GFXDECODE_END
-static struct AY8910interface ay8910_interface_1 =
+static const struct AY8910interface ay8910_interface_1 =
{
0,
0,
@@ -780,13 +780,13 @@ static struct AY8910interface ay8910_interface_1 =
tehkanwc_portB_w
};
-static struct AY8910interface ay8910_interface_2 =
+static const struct AY8910interface ay8910_interface_2 =
{
tehkanwc_portA_r,
tehkanwc_portB_r
};
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
tehkanwc_adpcm_int, /* interrupt function */
MSM5205_S48_4B /* 8KHz */
diff --git a/src/mame/drivers/tempest.c b/src/mame/drivers/tempest.c
index 8d096321ef8..c78efa8caac 100644
--- a/src/mame/drivers/tempest.c
+++ b/src/mame/drivers/tempest.c
@@ -558,13 +558,13 @@ INPUT_PORTS_END
*
*************************************/
-static struct POKEYinterface pokey_interface_1 =
+static const struct POKEYinterface pokey_interface_1 =
{
{ input_port_1_bit_r,input_port_1_bit_r,input_port_1_bit_r,input_port_1_bit_r,
input_port_1_bit_r,input_port_1_bit_r,input_port_1_bit_r,input_port_1_bit_r }
};
-static struct POKEYinterface pokey_interface_2 =
+static const struct POKEYinterface pokey_interface_2 =
{
{ input_port_2_bit_r,input_port_2_bit_r,input_port_2_bit_r,input_port_2_bit_r,
input_port_2_bit_r,input_port_2_bit_r,input_port_2_bit_r,input_port_2_bit_r }
diff --git a/src/mame/drivers/tetrisp2.c b/src/mame/drivers/tetrisp2.c
index cc6dc638229..97ba8bd6d68 100644
--- a/src/mame/drivers/tetrisp2.c
+++ b/src/mame/drivers/tetrisp2.c
@@ -995,7 +995,7 @@ GFXDECODE_END
***************************************************************************/
-static struct YMZ280Binterface ymz280b_intf =
+static const struct YMZ280Binterface ymz280b_intf =
{
REGION_SOUND1,
0 // irq
diff --git a/src/mame/drivers/thedeep.c b/src/mame/drivers/thedeep.c
index 3bfa997c05b..e89900adc8f 100644
--- a/src/mame/drivers/thedeep.c
+++ b/src/mame/drivers/thedeep.c
@@ -325,7 +325,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2203interface thedeep_ym2203_intf =
+static const struct YM2203interface thedeep_ym2203_intf =
{
0,0,0,0,
irqhandler
diff --git a/src/mame/drivers/thepit.c b/src/mame/drivers/thepit.c
index cef1a4a171e..0b4337f0105 100644
--- a/src/mame/drivers/thepit.c
+++ b/src/mame/drivers/thepit.c
@@ -633,7 +633,7 @@ static GFXDECODE_START( suprmous )
GFXDECODE_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
soundlatch_r
};
diff --git a/src/mame/drivers/thunderx.c b/src/mame/drivers/thunderx.c
index f00c52a621b..b2e886c773a 100644
--- a/src/mame/drivers/thunderx.c
+++ b/src/mame/drivers/thunderx.c
@@ -685,7 +685,7 @@ static void volume_callback(int v)
K007232_set_volume(0,1,0,(v & 0x0f) * 0x11);
}
-static struct K007232_interface k007232_interface =
+static const struct K007232_interface k007232_interface =
{
REGION_SOUND1, /* memory regions */
volume_callback /* external port callback */
diff --git a/src/mame/drivers/tiamc1.c b/src/mame/drivers/tiamc1.c
index d40420b6b29..dfb35e26027 100644
--- a/src/mame/drivers/tiamc1.c
+++ b/src/mame/drivers/tiamc1.c
@@ -267,7 +267,7 @@ static GFXDECODE_START( tiamc1 )
GFXDECODE_ENTRY( REGION_GFX1, 0x0000, sprites16x16_layout, 0, 16 )
GFXDECODE_END
-static struct CustomSound_interface tiamc1_custom_interface =
+static const struct CustomSound_interface tiamc1_custom_interface =
{
tiamc1_sh_start
};
diff --git a/src/mame/drivers/tickee.c b/src/mame/drivers/tickee.c
index 7b399d54bb6..354cb23070e 100644
--- a/src/mame/drivers/tickee.c
+++ b/src/mame/drivers/tickee.c
@@ -261,13 +261,13 @@ INPUT_PORTS_END
*
*************************************/
-static struct AY8910interface ay8910_interface_1 =
+static const struct AY8910interface ay8910_interface_1 =
{
input_port_0_r,
input_port_2_r
};
-static struct AY8910interface ay8910_interface_2 =
+static const struct AY8910interface ay8910_interface_2 =
{
port1_r,
port2_r
@@ -281,7 +281,7 @@ static struct AY8910interface ay8910_interface_2 =
*
*************************************/
-static tms34010_config tms_config =
+static const tms34010_config tms_config =
{
FALSE, /* halt on reset */
0, /* the screen operated on */
diff --git a/src/mame/drivers/tigeroad.c b/src/mame/drivers/tigeroad.c
index 449eee62610..85ddd1ff2bb 100644
--- a/src/mame/drivers/tigeroad.c
+++ b/src/mame/drivers/tigeroad.c
@@ -51,10 +51,10 @@ static UINT16 *ram16;
other locations are less frequently used.
*/
-static int f1dream_613ea_lookup[16] = {
+static const int f1dream_613ea_lookup[16] = {
0x0052, 0x0031, 0x00a7, 0x0043, 0x0007, 0x008a, 0x00b1, 0x0066, 0x009f, 0x00cc, 0x0009, 0x004d, 0x0033, 0x0028, 0x00d0, 0x0025};
-static int f1dream_613eb_lookup[256] = {
+static const int f1dream_613eb_lookup[256] = {
0x0001, 0x00b5, 0x00b6, 0x00b6, 0x00b6, 0x00b6, 0x00b6, 0x00b6, 0x00b7, 0x0001, 0x00b8, 0x002f, 0x002f, 0x002f, 0x002f, 0x00b9,
0x00aa, 0x0031, 0x00ab, 0x00ab, 0x00ab, 0x00ac, 0x00ad, 0x00ad, 0x00ae, 0x00af, 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x0091,
0x009c, 0x009d, 0x009e, 0x009f, 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x009b, 0x0091,
@@ -72,7 +72,7 @@ static int f1dream_613eb_lookup[256] = {
0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001e, 0x001e, 0x001e, 0x001f, 0x0020,
0x000c, 0x000d, 0x000e, 0x0001, 0x000f, 0x0010, 0x0011, 0x0012, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x0013 };
-static int f1dream_17b74_lookup[128] = {
+static const int f1dream_17b74_lookup[128] = {
0x0003, 0x0040, 0x0005, 0x0080, 0x0003, 0x0080, 0x0005, 0x00a0, 0x0003, 0x0040, 0x0005, 0x00c0, 0x0003, 0x0080, 0x0005, 0x00e0,
0x0003, 0x0040, 0x0006, 0x0000, 0x0003, 0x0080, 0x0006, 0x0020, 0x0003, 0x0040, 0x0006, 0x0040, 0x0003, 0x0080, 0x0006, 0x0060,
0x0000, 0x00a0, 0x0009, 0x00e0, 0x0000, 0x00e0, 0x000a, 0x0000, 0x0000, 0x00a0, 0x000a, 0x0020, 0x0000, 0x00e0, 0x000a, 0x0040,
@@ -82,7 +82,7 @@ static int f1dream_17b74_lookup[128] = {
0x0000, 0x00a0, 0x0009, 0x00e0, 0x0000, 0x00e0, 0x000a, 0x0000, 0x0000, 0x00a0, 0x000a, 0x0020, 0x0000, 0x00e0, 0x000a, 0x0040,
0x0000, 0x00a0, 0x000a, 0x0060, 0x0000, 0x00e0, 0x000a, 0x0080, 0x0000, 0x00a0, 0x000a, 0x00a0, 0x0000, 0x00e0, 0x000a, 0x00c0 };
-static int f1dream_2450_lookup[32] = {
+static const int f1dream_2450_lookup[32] = {
0x0003, 0x0080, 0x0006, 0x0060, 0x0000, 0x00e0, 0x000a, 0x00c0, 0x0003, 0x0080, 0x0006, 0x0060, 0x0000, 0x00e0, 0x000a, 0x00c0,
0x0003, 0x0080, 0x0006, 0x0060, 0x0000, 0x00e0, 0x000a, 0x00c0, 0x0003, 0x0080, 0x0006, 0x0060, 0x0000, 0x00e0, 0x000a, 0x00c0 };
@@ -531,12 +531,12 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,0,0,0,irqhandler
};
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
0, /* interrupt function */
MSM5205_SEX_4B /* 4KHz playback ? */
diff --git a/src/mame/drivers/timelimt.c b/src/mame/drivers/timelimt.c
index 73d5e96c5c8..117c704ddb2 100644
--- a/src/mame/drivers/timelimt.c
+++ b/src/mame/drivers/timelimt.c
@@ -31,9 +31,13 @@ extern size_t timelimt_bg_videoram_size;
static int nmi_enabled = 0;
-static MACHINE_RESET( timelimt )
+static MACHINE_START( timelimt )
{
soundlatch_setclearedvalue( 0 );
+}
+
+static MACHINE_RESET( timelimt )
+{
nmi_enabled = 0;
}
@@ -239,7 +243,7 @@ GFXDECODE_END
/***************************************************************************/
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
soundlatch_r
};
@@ -269,6 +273,7 @@ static MACHINE_DRIVER_START( timelimt )
MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION)
MDRV_INTERLEAVE(50)
+ MDRV_MACHINE_START(timelimt)
MDRV_MACHINE_RESET(timelimt)
/* video hardware */
diff --git a/src/mame/drivers/tmnt.c b/src/mame/drivers/tmnt.c
index 3281088175c..6eb192b7a34 100644
--- a/src/mame/drivers/tmnt.c
+++ b/src/mame/drivers/tmnt.c
@@ -2463,7 +2463,7 @@ static void cbj_irq_handler(int state)
cbj_snd_irqlatch = state;
}
-static struct YM2151interface ym2151_interface_cbj =
+static const struct YM2151interface ym2151_interface_cbj =
{
cbj_irq_handler
};
@@ -2474,13 +2474,13 @@ static void volume_callback(int v)
K007232_set_volume(0,1,0,(v & 0x0f) * 0x11);
}
-static struct K007232_interface k007232_interface =
+static const struct K007232_interface k007232_interface =
{
REGION_SOUND1, /* memory regions */
volume_callback /* external port callback */
};
-static struct upd7759_interface upd7759_interface =
+static const struct upd7759_interface upd7759_interface =
{
REGION_SOUND2 /* memory region */
};
@@ -2492,7 +2492,7 @@ static const struct Samplesinterface samples_interface =
tmnt_decode_sample
};
-static struct K053260_interface k053260_interface =
+static const struct K053260_interface k053260_interface =
{
REGION_SOUND1 /* memory region */
};
@@ -2785,7 +2785,7 @@ static void sound_nmi(void)
cpunum_set_input_line(1, INPUT_LINE_NMI, PULSE_LINE);
}
-static struct K054539interface k054539_interface =
+static const struct K054539interface k054539_interface =
{
REGION_SOUND1,
NULL,
@@ -4247,7 +4247,7 @@ static DRIVER_INIT( tmnt )
/* 9 low bits of the sprite line address, which bit to pick it from. */
/* For example, when the PROM contains 4, which applies to 4x2 sprites, */
/* bit OA1 comes from CA5, OA2 from CA0, and so on. */
- static UINT8 bit_pick_table[10][8] =
+ static const UINT8 bit_pick_table[10][8] =
{
/*0(1x1) 1(2x1) 2(1x2) 3(2x2) 4(4x2) 5(2x4) 6(4x4) 7(8x8) */
{ CA3, CA3, CA3, CA3, CA3, CA3, CA3, CA3 }, /* CA3 */
diff --git a/src/mame/drivers/tnzs.c b/src/mame/drivers/tnzs.c
index abee876897a..1cf7d11ac6a 100644
--- a/src/mame/drivers/tnzs.c
+++ b/src/mame/drivers/tnzs.c
@@ -1246,7 +1246,7 @@ static GFXDECODE_START( insectx )
GFXDECODE_END
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
input_port_0_r, /* DSW1 connected to port A */
input_port_1_r /* DSW2 connected to port B */
@@ -1259,7 +1259,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(2, INPUT_LINE_NMI, irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2203interface kageki_ym2203_interface =
+static const struct YM2203interface kageki_ym2203_interface =
{
kageki_csport_r,
0,
@@ -1267,13 +1267,13 @@ static struct YM2203interface kageki_ym2203_interface =
kageki_csport_w
};
-static struct YM2203interface ym2203b_interface =
+static const struct YM2203interface ym2203b_interface =
{
0,0,0,0,
irqhandler
};
-static struct YM2203interface kabukiz_ym2203_interface =
+static const struct YM2203interface kabukiz_ym2203_interface =
{
0,0,kabukiz_sound_bank_w,kabukiz_sample_w,
irqhandler
diff --git a/src/mame/drivers/toaplan1.c b/src/mame/drivers/toaplan1.c
index b5d28e832b7..83009685ba5 100644
--- a/src/mame/drivers/toaplan1.c
+++ b/src/mame/drivers/toaplan1.c
@@ -1572,7 +1572,7 @@ static void irqhandler(int linestate)
cpunum_set_input_line(1,0,linestate);
}
-static struct YM3812interface ym3812_interface =
+static const struct YM3812interface ym3812_interface =
{
irqhandler
};
diff --git a/src/mame/drivers/toaplan2.c b/src/mame/drivers/toaplan2.c
index 552cda01b79..ab03a119e2a 100644
--- a/src/mame/drivers/toaplan2.c
+++ b/src/mame/drivers/toaplan2.c
@@ -3265,12 +3265,12 @@ static void irqhandler(int linestate)
cpunum_set_input_line(1,0,linestate);
}
-static struct YM3812interface ym3812_interface =
+static const struct YM3812interface ym3812_interface =
{
irqhandler
};
-static struct YMZ280Binterface ymz280b_interface =
+static const struct YMZ280Binterface ymz280b_interface =
{
REGION_SOUND1,
bbakraid_irqhandler
diff --git a/src/mame/drivers/toki.c b/src/mame/drivers/toki.c
index 93323fdb709..730c658588f 100644
--- a/src/mame/drivers/toki.c
+++ b/src/mame/drivers/toki.c
@@ -413,7 +413,7 @@ GFXDECODE_END
SEIBU_SOUND_SYSTEM_YM3812_HARDWARE
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
toki_adpcm_int, /* interrupt function */
MSM5205_S96_4B /* 4KHz */
diff --git a/src/mame/drivers/topspeed.c b/src/mame/drivers/topspeed.c
index 5dec30ad522..d9dced4b6ff 100644
--- a/src/mame/drivers/topspeed.c
+++ b/src/mame/drivers/topspeed.c
@@ -661,13 +661,13 @@ static void irq_handler(int irq) /* assumes Z80 sandwiched between 68Ks */
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
irq_handler,
sound_bankswitch_w
};
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
topspeed_msm5205_vck, /* VCK function */
MSM5205_S48_4B /* 8 kHz */
diff --git a/src/mame/drivers/toypop.c b/src/mame/drivers/toypop.c
index 64a48e0f7d1..f149dd8b84f 100644
--- a/src/mame/drivers/toypop.c
+++ b/src/mame/drivers/toypop.c
@@ -81,26 +81,26 @@ static WRITE8_HANDLER( flip )
}
/* chip #0: player inputs, buttons, coins */
-static struct namcoio_interface intf0_coin =
+static const struct namcoio_interface intf0_coin =
{
{ in1_h, in0_l, in0_h, in1_l }, /* port read handlers */
{ out_coin0, out_coin1 } /* port write handlers */
};
-static struct namcoio_interface intf0 =
+static const struct namcoio_interface intf0 =
{
{ in1_h, in0_l, in0_h, in1_l }, /* port read handlers */
{ NULL, NULL } /* port write handlers */
};
/* chip #1: dip switches */
-static struct namcoio_interface intf1 =
+static const struct namcoio_interface intf1 =
{
{ dipA_h, dipB_l, dipB_h, dipA_l }, /* port read handlers */
{ flip, NULL } /* port write handlers */
};
/* chip #2: test/cocktail, optional buttons */
-static struct namcoio_interface intf2 =
+static const struct namcoio_interface intf2 =
{
{ NULL, in2_l, in2_h, in3 }, /* port read handlers */
{ NULL, NULL } /* port write handlers */
@@ -557,7 +557,7 @@ GFXDECODE_END
-static struct namco_interface namco_interface =
+static const struct namco_interface namco_interface =
{
8, /* number of voices */
REGION_SOUND1 /* memory region */
diff --git a/src/mame/drivers/trackfld.c b/src/mame/drivers/trackfld.c
index f82e1acbd08..797b35dc73b 100644
--- a/src/mame/drivers/trackfld.c
+++ b/src/mame/drivers/trackfld.c
@@ -844,13 +844,13 @@ static GFXDECODE_START( trackfld )
GFXDECODE_END
-static struct VLM5030interface trackfld_vlm5030_interface =
+static const struct VLM5030interface trackfld_vlm5030_interface =
{
REGION_SOUND1, /* memory region */
0 /* memory size */
};
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
NULL, /* VCK function */
MSM5205_S48_4B /* 8 kHz */
diff --git a/src/mame/drivers/trvquest.c b/src/mame/drivers/trvquest.c
index fe081f869ca..9478d87d26b 100644
--- a/src/mame/drivers/trvquest.c
+++ b/src/mame/drivers/trvquest.c
@@ -224,7 +224,7 @@ static void via_irq(int state)
}
-static struct via6522_interface via_0_interface =
+static const struct via6522_interface via_0_interface =
{
/*inputs : A/B */ input_port_0_r, input_port_1_r,
/*inputs : CA/B1,CA/B2 */ NULL, NULL, NULL, NULL,
@@ -233,7 +233,7 @@ static struct via6522_interface via_0_interface =
/*irq */ NULL
};
-static struct via6522_interface via_1_interface =
+static const struct via6522_interface via_1_interface =
{
/*inputs : A/B */ input_port_2_r, input_port_3_r,
/*inputs : CA/B1,CA/B2 */ NULL, NULL, NULL, NULL,
@@ -242,7 +242,7 @@ static struct via6522_interface via_1_interface =
/*irq */ via_irq
};
-static struct via6522_interface via_2_interface =
+static const struct via6522_interface via_2_interface =
{
/*inputs : A/B */ NULL, trvquest_vblank_r,
/*inputs : CA/B1,CA/B2 */ NULL, NULL, NULL, NULL,
diff --git a/src/mame/drivers/tubep.c b/src/mame/drivers/tubep.c
index 4d79e542df9..453d46396e0 100644
--- a/src/mame/drivers/tubep.c
+++ b/src/mame/drivers/tubep.c
@@ -882,7 +882,7 @@ GFXDECODE_END
*
*************************************/
-static struct AY8910interface ay8910_interface_1 =
+static const struct AY8910interface ay8910_interface_1 =
{
0,
0,
@@ -890,7 +890,7 @@ static struct AY8910interface ay8910_interface_1 =
ay8910_portB_0_w /* write port B */
};
-static struct AY8910interface ay8910_interface_2 =
+static const struct AY8910interface ay8910_interface_2 =
{
0,
0,
@@ -898,7 +898,7 @@ static struct AY8910interface ay8910_interface_2 =
ay8910_portB_1_w /* write port B */
};
-static struct AY8910interface ay8910_interface_3 =
+static const struct AY8910interface ay8910_interface_3 =
{
0,
0,
@@ -906,7 +906,7 @@ static struct AY8910interface ay8910_interface_3 =
ay8910_portB_2_w /* write port B */
};
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
rjammer_adpcm_vck, /* VCK function */
MSM5205_S48_4B /* 8 KHz (changes at run time) */
diff --git a/src/mame/drivers/tumbleb.c b/src/mame/drivers/tumbleb.c
index aeeeb9f371c..fb9fc7a286e 100644
--- a/src/mame/drivers/tumbleb.c
+++ b/src/mame/drivers/tumbleb.c
@@ -464,7 +464,7 @@ static INTERRUPT_GEN( tumbleb2_interrupt )
tumbleb2_playmusic();
}
-static int tumbleb_sound_lookup[256] = {
+static const int tumbleb_sound_lookup[256] = {
/*0 1 2 3 4 5 6 7 8 9 a b c d e f*/
0x00, -2, 0x00, 0x00, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, 0x00, -2, /* 0 */
-2, 0x00, -2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 1 */
@@ -2159,7 +2159,7 @@ static void semicom_irqhandler(int irq)
}
-static struct YM2151interface semicom_ym2151_interface =
+static const struct YM2151interface semicom_ym2151_interface =
{
semicom_irqhandler
};
diff --git a/src/mame/drivers/tumblep.c b/src/mame/drivers/tumblep.c
index fbfac564ed7..1cb94cced3f 100644
--- a/src/mame/drivers/tumblep.c
+++ b/src/mame/drivers/tumblep.c
@@ -310,7 +310,7 @@ static void sound_irq(int state)
cpunum_set_input_line(1,1,state); /* IRQ 2 */
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
sound_irq
};
diff --git a/src/mame/drivers/tunhunt.c b/src/mame/drivers/tunhunt.c
index 222766c0785..ebcdbd29db4 100644
--- a/src/mame/drivers/tunhunt.c
+++ b/src/mame/drivers/tunhunt.c
@@ -296,13 +296,13 @@ GFXDECODE_END
*
*************************************/
-static struct POKEYinterface pokey_interface_1 =
+static const struct POKEYinterface pokey_interface_1 =
{
{ 0 },
dsw1_r
};
-static struct POKEYinterface pokey_interface_2 =
+static const struct POKEYinterface pokey_interface_2 =
{
{ input_port_1_r,input_port_2_r,dsw2_0r,dsw2_1r,dsw2_2r,dsw2_3r,dsw2_4r }
};
diff --git a/src/mame/drivers/twin16.c b/src/mame/drivers/twin16.c
index e8b13f4299f..b0f9e8a03ee 100644
--- a/src/mame/drivers/twin16.c
+++ b/src/mame/drivers/twin16.c
@@ -933,13 +933,13 @@ static void volume_callback(int v)
K007232_set_volume(0,1,0,(v & 0x0f) * 0x11);
}
-static struct K007232_interface k007232_interface =
+static const struct K007232_interface k007232_interface =
{
REGION_SOUND1, /* memory regions */
volume_callback /* external port callback */
};
-static struct upd7759_interface upd7759_interface =
+static const struct upd7759_interface upd7759_interface =
{
REGION_SOUND2 /* memory region */
};
diff --git a/src/mame/drivers/twincobr.c b/src/mame/drivers/twincobr.c
index 908dab04fc3..fa06d9f216d 100644
--- a/src/mame/drivers/twincobr.c
+++ b/src/mame/drivers/twincobr.c
@@ -638,7 +638,7 @@ static void irqhandler(int linestate)
cpunum_set_input_line(1,0,linestate);
}
-static struct YM3812interface ym3812_interface =
+static const struct YM3812interface ym3812_interface =
{
irqhandler
};
diff --git a/src/mame/drivers/twins.c b/src/mame/drivers/twins.c
index 0f935a72283..6ff6f2b73ad 100644
--- a/src/mame/drivers/twins.c
+++ b/src/mame/drivers/twins.c
@@ -157,7 +157,7 @@ static INPUT_PORTS_START(twins)
INPUT_PORTS_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
input_port_0_r,
input_port_1_r
diff --git a/src/mame/drivers/tx1.c b/src/mame/drivers/tx1.c
index 8b02ce58c7b..73c8e16042c 100644
--- a/src/mame/drivers/tx1.c
+++ b/src/mame/drivers/tx1.c
@@ -725,7 +725,7 @@ GFXDECODE_END
/* TX-1 Sound Hardware */
/****************************/
-static struct AY8910interface tx1_ay8910_interface =
+static const struct AY8910interface tx1_ay8910_interface =
{
0, /* Probably hooked up to discrete sound filters */
0,
@@ -785,7 +785,7 @@ static WRITE8_HANDLER(BB_YM2149_1_B_w)
/* YM2149 IC19 - front left */
-static struct AY8910interface buggyboy_ay8910_interface_1 =
+static const struct AY8910interface buggyboy_ay8910_interface_1 =
{
input_port_2_r,
input_port_3_r,
@@ -795,7 +795,7 @@ static struct AY8910interface buggyboy_ay8910_interface_1 =
/* YM2149 IC24 - front right */
-static struct AY8910interface buggyboy_ay8910_interface_2 =
+static const struct AY8910interface buggyboy_ay8910_interface_2 =
{
0,
0,
diff --git a/src/mame/drivers/ultrsprt.c b/src/mame/drivers/ultrsprt.c
index 4cbeac415fb..a4cc26a23e4 100644
--- a/src/mame/drivers/ultrsprt.c
+++ b/src/mame/drivers/ultrsprt.c
@@ -247,12 +247,12 @@ static NVRAM_HANDLER(ultrsprt)
eeprom_handler(file, read_or_write);
}
-static ppc_config ultrsprt_ppc_cfg =
+static const ppc_config ultrsprt_ppc_cfg =
{
PPC_MODEL_403GA
};
-static struct K054539interface k054539_interface =
+static const struct K054539interface k054539_interface =
{
REGION_SOUND1
};
diff --git a/src/mame/drivers/upscope.c b/src/mame/drivers/upscope.c
index 7d78151ef07..adbd578e312 100644
--- a/src/mame/drivers/upscope.c
+++ b/src/mame/drivers/upscope.c
@@ -272,7 +272,7 @@ INPUT_PORTS_END
*
*************************************/
-static struct CustomSound_interface amiga_custom_interface =
+static const struct CustomSound_interface amiga_custom_interface =
{
amiga_sh_start
};
diff --git a/src/mame/drivers/vaportra.c b/src/mame/drivers/vaportra.c
index 65d50b6a5f6..66cfb486454 100644
--- a/src/mame/drivers/vaportra.c
+++ b/src/mame/drivers/vaportra.c
@@ -262,7 +262,7 @@ static void sound_irq(int state)
cpunum_set_input_line(1,1,state); /* IRQ 2 */
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
sound_irq
};
diff --git a/src/mame/drivers/vastar.c b/src/mame/drivers/vastar.c
index 10a84765fb0..55864b51a60 100644
--- a/src/mame/drivers/vastar.c
+++ b/src/mame/drivers/vastar.c
@@ -312,7 +312,7 @@ GFXDECODE_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
input_port_3_r,
input_port_4_r
diff --git a/src/mame/drivers/vball.c b/src/mame/drivers/vball.c
index dc850efb9f5..d6c2d984708 100644
--- a/src/mame/drivers/vball.c
+++ b/src/mame/drivers/vball.c
@@ -391,7 +391,7 @@ static void vball_irq_handler(int irq)
cpunum_set_input_line( 1, 0 , irq ? ASSERT_LINE : CLEAR_LINE );
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
vball_irq_handler
};
diff --git a/src/mame/drivers/vegas.c b/src/mame/drivers/vegas.c
index 3ca0d54e285..91840111dc8 100644
--- a/src/mame/drivers/vegas.c
+++ b/src/mame/drivers/vegas.c
@@ -1272,7 +1272,7 @@ static void ide_interrupt(int state)
update_nile_irqs();
}
-static struct ide_interface ide_intf =
+static const struct ide_interface ide_intf =
{
ide_interrupt
};
@@ -2203,7 +2203,7 @@ INPUT_PORTS_END
*
*************************************/
-static struct mips3_config config =
+static const struct mips3_config config =
{
16384, /* code cache size */
16384, /* data cache size */
@@ -2440,7 +2440,7 @@ ROM_END
static void init_common(int ioasic, int serialnum)
{
- static struct smc91c9x_interface ethernet_intf =
+ static const struct smc91c9x_interface ethernet_intf =
{
ethernet_interrupt
};
diff --git a/src/mame/drivers/vendetta.c b/src/mame/drivers/vendetta.c
index 16988002548..d8d4b3a8455 100644
--- a/src/mame/drivers/vendetta.c
+++ b/src/mame/drivers/vendetta.c
@@ -566,7 +566,7 @@ INPUT_PORTS_END
***************************************************************************/
-static struct K053260_interface k053260_interface =
+static const struct K053260_interface k053260_interface =
{
REGION_SOUND1 /* memory region */
};
diff --git a/src/mame/drivers/vertigo.c b/src/mame/drivers/vertigo.c
index 921e5e09447..61a48c75c3e 100644
--- a/src/mame/drivers/vertigo.c
+++ b/src/mame/drivers/vertigo.c
@@ -107,7 +107,7 @@ INPUT_PORTS_END
*
*************************************/
-static struct CustomSound_interface custom_interface =
+static const struct CustomSound_interface custom_interface =
{
exidy440_sh_start,
exidy440_sh_stop
diff --git a/src/mame/drivers/victory.c b/src/mame/drivers/victory.c
index a53894ac766..9369145ac2d 100644
--- a/src/mame/drivers/victory.c
+++ b/src/mame/drivers/victory.c
@@ -306,7 +306,7 @@ INPUT_PORTS_END
*
*************************************/
-static struct CustomSound_interface custom_interface =
+static const struct CustomSound_interface custom_interface =
{
victory_sh_start,
0,
diff --git a/src/mame/drivers/videopin.c b/src/mame/drivers/videopin.c
index 254ab3471f6..24724ad1893 100644
--- a/src/mame/drivers/videopin.c
+++ b/src/mame/drivers/videopin.c
@@ -117,7 +117,7 @@ static READ8_HANDLER( videopin_misc_r )
static WRITE8_HANDLER( videopin_led_w )
{
int i = (video_screen_get_vpos(0) >> 5) & 7;
- static const char* matrix[8][4] =
+ static const char *const matrix[8][4] =
{
{ "LED26", "LED18", "LED11", "LED13" },
{ "LED25", "LED17", "LED10", "LED08" },
diff --git a/src/mame/drivers/vigilant.c b/src/mame/drivers/vigilant.c
index 31eef45fca0..5c3a05dbe0e 100644
--- a/src/mame/drivers/vigilant.c
+++ b/src/mame/drivers/vigilant.c
@@ -567,12 +567,12 @@ GFXDECODE_END
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
m72_ym2151_irq_handler
};
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,0,0,0,m72_ym2151_irq_handler
};
diff --git a/src/mame/drivers/viper.c b/src/mame/drivers/viper.c
index c7e1c8f41f2..486880e4d11 100644
--- a/src/mame/drivers/viper.c
+++ b/src/mame/drivers/viper.c
@@ -157,7 +157,7 @@ static WRITE64_HANDLER(epic_64be_w)
static int cf_card_ide = 0;
-static UINT8 cf_card_tuples[] =
+static const UINT8 cf_card_tuples[] =
{
0x01, // Device Tuple
0x01, // Tuple size
@@ -608,7 +608,7 @@ static INPUT_PORTS_START(viper)
INPUT_PORTS_END
-static ppc_config viper_ppc_cfg =
+static const ppc_config viper_ppc_cfg =
{
PPC_MODEL_MPC8240,
0x30,
@@ -659,19 +659,19 @@ static void ide_interrupt(int state)
{
}
-static struct pci_device_info mpc8240 =
+static const struct pci_device_info mpc8240 =
{
mpc8240_pci_r,
mpc8240_pci_w
};
-static struct pci_device_info voodoo3 =
+static const struct pci_device_info voodoo3 =
{
voodoo3_pci_r,
voodoo3_pci_w
};
-static struct ide_interface ide_intf =
+static const struct ide_interface ide_intf =
{
ide_interrupt
};
diff --git a/src/mame/drivers/volfied.c b/src/mame/drivers/volfied.c
index 5beade74828..3bf1d7d4d4a 100644
--- a/src/mame/drivers/volfied.c
+++ b/src/mame/drivers/volfied.c
@@ -240,7 +240,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(1, 0, irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
input_port_0_r, /* DSW A */
input_port_1_r, /* DSW B */
diff --git a/src/mame/drivers/vroulet.c b/src/mame/drivers/vroulet.c
index f4220f8e573..3039ffffce1 100644
--- a/src/mame/drivers/vroulet.c
+++ b/src/mame/drivers/vroulet.c
@@ -218,7 +218,7 @@ GFXDECODE_END
/* Sound Interface */
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
input_port_3_r,// DSWA
input_port_4_r,// DSWB
diff --git a/src/mame/drivers/vsnes.c b/src/mame/drivers/vsnes.c
index 0e4383fe8aa..9d5d4df73f6 100644
--- a/src/mame/drivers/vsnes.c
+++ b/src/mame/drivers/vsnes.c
@@ -2069,12 +2069,12 @@ static INPUT_PORTS_START( supxevs )
PORT_DIPSETTING( 0xc0, "Wrong 3" )
INPUT_PORTS_END
-static struct NESinterface nes_interface_1 =
+static const struct NESinterface nes_interface_1 =
{
REGION_CPU1
};
-static struct NESinterface nes_interface_2 =
+static const struct NESinterface nes_interface_2 =
{
REGION_CPU2
};
diff --git a/src/mame/drivers/wardner.c b/src/mame/drivers/wardner.c
index 7a300387413..fcb66f7c89f 100644
--- a/src/mame/drivers/wardner.c
+++ b/src/mame/drivers/wardner.c
@@ -444,7 +444,7 @@ static void irqhandler(int linestate)
cpunum_set_input_line(1,0,linestate);
}
-static struct YM3812interface ym3812_interface =
+static const struct YM3812interface ym3812_interface =
{
irqhandler
};
diff --git a/src/mame/drivers/warpwarp.c b/src/mame/drivers/warpwarp.c
index a51da90e812..d1b803f1a45 100644
--- a/src/mame/drivers/warpwarp.c
+++ b/src/mame/drivers/warpwarp.c
@@ -818,12 +818,12 @@ static GFXDECODE_START( color )
GFXDECODE_END
-static struct CustomSound_interface geebee_custom_interface =
+static const struct CustomSound_interface geebee_custom_interface =
{
geebee_sh_start
};
-static struct CustomSound_interface warpwarp_custom_interface =
+static const struct CustomSound_interface warpwarp_custom_interface =
{
warpwarp_sh_start
};
diff --git a/src/mame/drivers/warriorb.c b/src/mame/drivers/warriorb.c
index ce4773c0504..2d69b3cfcf5 100644
--- a/src/mame/drivers/warriorb.c
+++ b/src/mame/drivers/warriorb.c
@@ -445,7 +445,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2610interface ym2610_interface =
+static const struct YM2610interface ym2610_interface =
{
irqhandler,
REGION_SOUND2, /* Delta-T */
@@ -469,7 +469,7 @@ static int subwoofer_sh_start(const sound_config *msound)
return 0;
}
-static struct CustomSound_interface subwoofer_interface =
+static const struct CustomSound_interface subwoofer_interface =
{
subwoofer_sh_start,
0, /* none */
diff --git a/src/mame/drivers/wc90.c b/src/mame/drivers/wc90.c
index 100e30d40b6..c366809bb68 100644
--- a/src/mame/drivers/wc90.c
+++ b/src/mame/drivers/wc90.c
@@ -336,7 +336,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(2,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2608interface ym2608_interface =
+static const struct YM2608interface ym2608_interface =
{
0,0,0,0,irqhandler,
REGION_SOUND1
diff --git a/src/mame/drivers/wc90b.c b/src/mame/drivers/wc90b.c
index df58afe090e..00dc69b9a86 100644
--- a/src/mame/drivers/wc90b.c
+++ b/src/mame/drivers/wc90b.c
@@ -363,7 +363,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(2, INPUT_LINE_NMI, irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,0,0,0,irqhandler
};
@@ -381,7 +381,7 @@ static void adpcm_int(int data)
}
-static struct MSM5205interface msm5205_interface =
+static const struct MSM5205interface msm5205_interface =
{
adpcm_int, /* interrupt function */
MSM5205_S96_4B /* 4KHz 4-bit */
diff --git a/src/mame/drivers/wecleman.c b/src/mame/drivers/wecleman.c
index d12fc09051a..54f2ebde2a5 100644
--- a/src/mame/drivers/wecleman.c
+++ b/src/mame/drivers/wecleman.c
@@ -723,17 +723,17 @@ static WRITE16_HANDLER( hotchase_soundlatch_w )
}
}
-static struct K007232_interface hotchase_k007232_interface_1 =
+static const struct K007232_interface hotchase_k007232_interface_1 =
{
REGION_SOUND1
};
-static struct K007232_interface hotchase_k007232_interface_2 =
+static const struct K007232_interface hotchase_k007232_interface_2 =
{
REGION_SOUND2
};
-static struct K007232_interface hotchase_k007232_interface_3 =
+static const struct K007232_interface hotchase_k007232_interface_3 =
{
REGION_SOUND3
};
@@ -1099,7 +1099,7 @@ static INTERRUPT_GEN( wecleman_interrupt )
cpunum_set_input_line(0, 5, HOLD_LINE); /* to read input ports */
}
-static struct K007232_interface wecleman_k007232_interface =
+static const struct K007232_interface wecleman_k007232_interface =
{
REGION_SOUND1 /* but the 2 channels use different ROMs !*/
};
diff --git a/src/mame/drivers/welltris.c b/src/mame/drivers/welltris.c
index b6c651f6c54..7c503aa2e77 100644
--- a/src/mame/drivers/welltris.c
+++ b/src/mame/drivers/welltris.c
@@ -720,7 +720,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(1, 0, irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2610interface ym2610_interface =
+static const struct YM2610interface ym2610_interface =
{
irqhandler,
REGION_SOUND1,
diff --git a/src/mame/drivers/wgp.c b/src/mame/drivers/wgp.c
index 2babf92a8c5..ec80d9f83ae 100644
--- a/src/mame/drivers/wgp.c
+++ b/src/mame/drivers/wgp.c
@@ -951,7 +951,7 @@ static void irqhandler(int irq) // assumes Z80 sandwiched between 68Ks
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2610interface ym2610_interface =
+static const struct YM2610interface ym2610_interface =
{
irqhandler,
REGION_SOUND2, /* Delta-T */
diff --git a/src/mame/drivers/wink.c b/src/mame/drivers/wink.c
index 625a9444fe1..7e4b5b5e434 100644
--- a/src/mame/drivers/wink.c
+++ b/src/mame/drivers/wink.c
@@ -298,7 +298,7 @@ static READ8_HANDLER( sound_r )
return sound_flag;
}
-static struct AY8910interface ay8912_interface =
+static const struct AY8910interface ay8912_interface =
{
sound_r
};
diff --git a/src/mame/drivers/wiping.c b/src/mame/drivers/wiping.c
index 25b575f6feb..9ee7f2d294c 100644
--- a/src/mame/drivers/wiping.c
+++ b/src/mame/drivers/wiping.c
@@ -297,7 +297,7 @@ GFXDECODE_END
-static struct CustomSound_interface custom_interface =
+static const struct CustomSound_interface custom_interface =
{
wiping_sh_start
};
diff --git a/src/mame/drivers/witch.c b/src/mame/drivers/witch.c
index c7380bfe75a..b428d80810e 100644
--- a/src/mame/drivers/witch.c
+++ b/src/mame/drivers/witch.c
@@ -413,7 +413,7 @@ static WRITE8_HANDLER(yscroll_w)
static READ8_HANDLER(portA_r) { return readinputportbytag("YM_PortA"); }
static READ8_HANDLER(portB_r) { return readinputportbytag("YM_PortB");}
-static struct YM2203interface ym2203_interface_0 =
+static const struct YM2203interface ym2203_interface_0 =
{
portA_r,
portB_r,
@@ -421,7 +421,7 @@ static struct YM2203interface ym2203_interface_0 =
NULL
};
-static struct YM2203interface ym2203_interface_1 =
+static const struct YM2203interface ym2203_interface_1 =
{
NULL,
NULL,
@@ -655,7 +655,7 @@ F180 kkkbbppp ; Read on port 0xA005
INPUT_PORTS_END
-static struct ES8712interface es8712_interface =
+static const struct ES8712interface es8712_interface =
{
REGION_SOUND1
};
diff --git a/src/mame/drivers/wolfpack.c b/src/mame/drivers/wolfpack.c
index 32ce955952b..9282f7a98d1 100644
--- a/src/mame/drivers/wolfpack.c
+++ b/src/mame/drivers/wolfpack.c
@@ -7,7 +7,7 @@ Atari Wolf Pack (prototype) driver
#include "driver.h"
#include "sound/s14001a.h"
-static struct S14001A_interface wolfpack_s14001a_interface =
+static const struct S14001A_interface wolfpack_s14001a_interface =
{
REGION_SOUND1 /* voice data region */
};
diff --git a/src/mame/drivers/wwfsstar.c b/src/mame/drivers/wwfsstar.c
index 7e42277e690..2bbfc9eb13f 100644
--- a/src/mame/drivers/wwfsstar.c
+++ b/src/mame/drivers/wwfsstar.c
@@ -347,7 +347,7 @@ static void wwfsstar_ymirq_handler(int irq)
cpunum_set_input_line( 1, 0 , irq ? ASSERT_LINE : CLEAR_LINE );
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
wwfsstar_ymirq_handler
};
diff --git a/src/mame/drivers/wwfwfest.c b/src/mame/drivers/wwfwfest.c
index f885059ec93..524269c9d01 100644
--- a/src/mame/drivers/wwfwfest.c
+++ b/src/mame/drivers/wwfwfest.c
@@ -385,7 +385,7 @@ static void dd3_ymirq_handler(int irq)
cpunum_set_input_line( 1, 0 , irq ? ASSERT_LINE : CLEAR_LINE );
}
-static struct YM2151interface ym2151_interface =
+static const struct YM2151interface ym2151_interface =
{
dd3_ymirq_handler
};
diff --git a/src/mame/drivers/xain.c b/src/mame/drivers/xain.c
index c6196412b04..f9d213c3b1c 100644
--- a/src/mame/drivers/xain.c
+++ b/src/mame/drivers/xain.c
@@ -458,7 +458,7 @@ static void irqhandler(int irq)
cpunum_set_input_line(2,M6809_FIRQ_LINE,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2203interface ym2203_interface =
+static const struct YM2203interface ym2203_interface =
{
0,0,0,0,irqhandler
};
diff --git a/src/mame/drivers/xexex.c b/src/mame/drivers/xexex.c
index c070a90ee5d..8e2638e0379 100644
--- a/src/mame/drivers/xexex.c
+++ b/src/mame/drivers/xexex.c
@@ -464,7 +464,7 @@ INPUT_PORTS_END
-static struct K054539interface k054539_interface =
+static const struct K054539interface k054539_interface =
{
REGION_SOUND1,
ym_set_mixing
diff --git a/src/mame/drivers/xmen.c b/src/mame/drivers/xmen.c
index 96e3fbc2db7..d749ba97402 100644
--- a/src/mame/drivers/xmen.c
+++ b/src/mame/drivers/xmen.c
@@ -499,7 +499,7 @@ INPUT_PORTS_END
-static struct K054539interface k054539_interface =
+static const struct K054539interface k054539_interface =
{
REGION_SOUND1
};
diff --git a/src/mame/drivers/xtheball.c b/src/mame/drivers/xtheball.c
index 2dce3ff2191..d955c919fce 100644
--- a/src/mame/drivers/xtheball.c
+++ b/src/mame/drivers/xtheball.c
@@ -333,7 +333,7 @@ INPUT_PORTS_END
*
*************************************/
-static tms34010_config tms_config =
+static const tms34010_config tms_config =
{
FALSE, /* halt on reset */
0, /* the screen operated on */
diff --git a/src/mame/drivers/xxmissio.c b/src/mame/drivers/xxmissio.c
index 1fe10a7aec0..26a06d4aa4c 100644
--- a/src/mame/drivers/xxmissio.c
+++ b/src/mame/drivers/xxmissio.c
@@ -269,13 +269,13 @@ GFXDECODE_END
/****************************************************************************/
-static struct YM2203interface ym2203_interface_1 =
+static const struct YM2203interface ym2203_interface_1 =
{
input_port_2_r,
input_port_3_r
};
-static struct YM2203interface ym2203_interface_2 =
+static const struct YM2203interface ym2203_interface_2 =
{
0,
0,
diff --git a/src/mame/drivers/yamato.c b/src/mame/drivers/yamato.c
index c3cf8f75cf9..06487ca9982 100644
--- a/src/mame/drivers/yamato.c
+++ b/src/mame/drivers/yamato.c
@@ -454,7 +454,7 @@ static INPUT_PORTS_START( toprollr )
INPUT_PORTS_END
-static gfx_layout charlayout =
+static const gfx_layout charlayout =
{
8,8, /* 8*8 characters */
512, /* 512 characters (256 in Crazy Climber) */
@@ -464,7 +464,7 @@ static gfx_layout charlayout =
{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
8*8 /* every char takes 8 consecutive bytes */
};
-static gfx_layout bscharlayout =
+static const gfx_layout bscharlayout =
{
8,8, /* 8*8 characters */
512,//256, /* 256 characters */
@@ -476,7 +476,7 @@ static gfx_layout bscharlayout =
{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
8*8 /* every char takes 8 consecutive bytes */
};
-static gfx_layout spritelayout =
+static const gfx_layout spritelayout =
{
16,16, /* 16*16 sprites */
128, /* 128 sprites (64 in Crazy Climber) */
@@ -490,7 +490,7 @@ static gfx_layout spritelayout =
};
-static gfx_layout trcharlayout =
+static const gfx_layout trcharlayout =
{
8,8,
RGN_FRAC(1,2),
@@ -501,7 +501,7 @@ static gfx_layout trcharlayout =
8*8
};
-static gfx_layout trspritelayout =
+static const gfx_layout trspritelayout =
{
16,16, /* 16*16 sprites */
RGN_FRAC(1,2), /* 128 sprites (64 in Crazy Climber) */
diff --git a/src/mame/drivers/yiear.c b/src/mame/drivers/yiear.c
index 4d5bddb9117..a7f1633b285 100644
--- a/src/mame/drivers/yiear.c
+++ b/src/mame/drivers/yiear.c
@@ -248,7 +248,7 @@ GFXDECODE_END
-static struct VLM5030interface vlm5030_interface =
+static const struct VLM5030interface vlm5030_interface =
{
REGION_SOUND1, /* memory region */
0 /* memory size of speech rom */
diff --git a/src/mame/drivers/yunsun16.c b/src/mame/drivers/yunsun16.c
index 21196bfe9c3..7879fdf03fb 100644
--- a/src/mame/drivers/yunsun16.c
+++ b/src/mame/drivers/yunsun16.c
@@ -519,7 +519,7 @@ static void soundirq(int state)
cpunum_set_input_line(1, 0, state);
}
-static struct YM3812interface magicbub_ym3812_intf =
+static const struct YM3812interface magicbub_ym3812_intf =
{
soundirq /* IRQ Line */
};
diff --git a/src/mame/drivers/yunsung8.c b/src/mame/drivers/yunsung8.c
index 5329ede358d..c1214d91099 100644
--- a/src/mame/drivers/yunsung8.c
+++ b/src/mame/drivers/yunsung8.c
@@ -516,7 +516,7 @@ static void yunsung8_adpcm_int(int irq)
cpunum_set_input_line(1, INPUT_LINE_NMI, PULSE_LINE);
}
-static struct MSM5205interface yunsung8_msm5205_interface =
+static const struct MSM5205interface yunsung8_msm5205_interface =
{
yunsung8_adpcm_int, /* interrupt function */
MSM5205_S96_4B /* 4KHz, 4 Bits */
diff --git a/src/mame/drivers/zaccaria.c b/src/mame/drivers/zaccaria.c
index 17d621f82a2..0072135545b 100644
--- a/src/mame/drivers/zaccaria.c
+++ b/src/mame/drivers/zaccaria.c
@@ -91,7 +91,7 @@ static WRITE8_HANDLER( ay8910_port0a_w )
if (data & 1) /* DAC enable */
{
/* TODO: is this right? it sound awful */
- static int table[4] = { 0x05, 0x1b, 0x0b, 0x55 };
+ static const int table[4] = { 0x05, 0x1b, 0x0b, 0x55 };
DAC_signed_data_w(0,table[(data & 0x06) >> 1]);
}
else
@@ -641,7 +641,7 @@ static GFXDECODE_START( zaccaria )
GFXDECODE_END
-static struct AY8910interface ay8910_interface =
+static const struct AY8910interface ay8910_interface =
{
0,
soundlatch2_r,
@@ -649,7 +649,7 @@ static struct AY8910interface ay8910_interface =
0
};
-static struct TMS5220interface tms5220_interface =
+static const struct TMS5220interface tms5220_interface =
{
tms5220_irq_handler /* IRQ handler */
};
diff --git a/src/mame/drivers/zaxxon.c b/src/mame/drivers/zaxxon.c
index 812d5a67ad5..bc452ff7da8 100644
--- a/src/mame/drivers/zaxxon.c
+++ b/src/mame/drivers/zaxxon.c
@@ -416,7 +416,7 @@ static READ8_HANDLER( razmataz_counter_r )
static UINT32 razmataz_dial_r(void *param)
{
- static const char *dialname[2] = { "DIAL0", "DIAL1" };
+ static const char *const dialname[2] = { "DIAL0", "DIAL1" };
int num = (FPTR)param;
int delta, res;
diff --git a/src/mame/drivers/zn.c b/src/mame/drivers/zn.c
index f831231e559..e908bf4817f 100644
--- a/src/mame/drivers/zn.c
+++ b/src/mame/drivers/zn.c
@@ -103,7 +103,7 @@ static const UINT8 tt16[ 8 ] = { 0xc0, 0x04, 0xf9, 0xe1, 0x60, 0x70, 0xf2, 0x02
static const UINT8 kn01[ 8 ] = { 0xf8, 0xe1, 0xe2, 0xfe, 0x3c, 0x30, 0x70, 0x80 }; /* brute forced */
static const UINT8 kn02[ 8 ] = { 0x01, 0x18, 0xe2, 0xfe, 0x3c, 0x30, 0x70, 0x80 }; /* brute forced */
-static struct
+static const struct
{
const char *s_name;
const UINT8 *p_n_mainsec;
@@ -407,7 +407,7 @@ static void zn_driver_init( void )
at28c16_init( 0, memory_region( REGION_USER4 ), NULL );
}
-static struct PSXSPUinterface psxspu_interface =
+static const struct PSXSPUinterface psxspu_interface =
{
&g_p_n_psxram,
psx_irq_set,
@@ -614,7 +614,7 @@ static ADDRESS_MAP_START( qsound_readport, ADDRESS_SPACE_IO, 8 )
AM_RANGE(0x00, 0x00) AM_READ(soundlatch_r)
ADDRESS_MAP_END
-static struct QSound_interface qsound_interface =
+static const struct QSound_interface qsound_interface =
{
REGION_SOUND1
};
@@ -1305,7 +1305,7 @@ static void irq_handler(int irq)
cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
-static struct YM2610interface ym2610_interface =
+static const struct YM2610interface ym2610_interface =
{
irq_handler,
REGION_SOUND1, /* Delta-T */
@@ -1765,7 +1765,7 @@ static void atpsx_interrupt(int state)
}
}
-static struct ide_interface atpsx_intf =
+static const struct ide_interface atpsx_intf =
{
atpsx_interrupt
};
@@ -2060,7 +2060,7 @@ static ADDRESS_MAP_START( psarc_snd_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x100020, 0xffffff) AM_WRITENOP
ADDRESS_MAP_END
-static struct YMF271interface ymf271_interface =
+static const struct YMF271interface ymf271_interface =
{
REGION_SOUND1
};
@@ -2284,7 +2284,7 @@ static void jdredd_ide_interrupt(int state)
}
}
-static struct ide_interface jdredd_ide_intf =
+static const struct ide_interface jdredd_ide_intf =
{
jdredd_ide_interrupt
};
@@ -2929,7 +2929,7 @@ static ADDRESS_MAP_START( cbaj_z80_port_map, ADDRESS_SPACE_IO, 8)
AM_RANGE( 0x91, 0x91 ) AM_READ( cbaj_z80_ready_r )
ADDRESS_MAP_END
-static struct YMZ280Binterface ymz280b_intf =
+static const struct YMZ280Binterface ymz280b_intf =
{
REGION_SOUND1,
0
diff --git a/src/mame/drivers/zr107.c b/src/mame/drivers/zr107.c
index 649f5c76221..72dd6d04ffd 100644
--- a/src/mame/drivers/zr107.c
+++ b/src/mame/drivers/zr107.c
@@ -388,7 +388,7 @@ static ADDRESS_MAP_START( sound_memmap, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x580000, 0x580001) AM_WRITENOP
ADDRESS_MAP_END
-static struct K054539interface k054539_interface =
+static const struct K054539interface k054539_interface =
{
REGION_SOUND1
};
@@ -547,7 +547,7 @@ static INPUT_PORTS_START( jetwave )
INPUT_PORTS_END
-static ppc_config zr107_ppc_cfg =
+static const ppc_config zr107_ppc_cfg =
{
PPC_MODEL_403GA
};
diff --git a/src/mame/includes/amiga.h b/src/mame/includes/amiga.h
index 85131bec248..d0c26ffb5a6 100644
--- a/src/mame/includes/amiga.h
+++ b/src/mame/includes/amiga.h
@@ -369,7 +369,7 @@ extern UINT16 *amiga_custom_regs;
extern UINT16 *amiga_expansion_ram;
extern UINT16 *amiga_autoconfig_mem;
-extern const char *amiga_custom_names[0x100];
+extern const char *const amiga_custom_names[0x100];
extern UINT16 (*amiga_chip_ram_r)(offs_t offset);
extern void (*amiga_chip_ram_w)(offs_t offset, UINT16 data);
diff --git a/src/mame/includes/cclimber.h b/src/mame/includes/cclimber.h
index c4b804e512b..c1cca6e4285 100644
--- a/src/mame/includes/cclimber.h
+++ b/src/mame/includes/cclimber.h
@@ -38,7 +38,7 @@ WRITE8_HANDLER( swimmer_sidepanel_enable_w );
/*----------- defined in audio/cclimber.c -----------*/
-extern struct AY8910interface cclimber_ay8910_interface;
+extern const struct AY8910interface cclimber_ay8910_interface;
extern const struct Samplesinterface cclimber_samples_interface;
WRITE8_HANDLER( cclimber_sample_trigger_w );
WRITE8_HANDLER( cclimber_sample_rate_w );
diff --git a/src/mame/includes/cps1.h b/src/mame/includes/cps1.h
index 6eb87a3fe06..3c03805a19f 100644
--- a/src/mame/includes/cps1.h
+++ b/src/mame/includes/cps1.h
@@ -14,7 +14,7 @@ WRITE16_HANDLER( cps1_eeprom_port_w );
INTERRUPT_GEN( cps1_qsound_interrupt );
-extern struct QSound_interface qsound_interface;
+extern const struct QSound_interface qsound_interface;
READ16_HANDLER( cps1_dsw_r );
READ16_HANDLER( cps1_in0_r );
diff --git a/src/mame/includes/galaga.h b/src/mame/includes/galaga.h
index 9dd0c5916f7..2827bd90499 100644
--- a/src/mame/includes/galaga.h
+++ b/src/mame/includes/galaga.h
@@ -33,7 +33,7 @@ struct star
extern UINT8 *galaga_videoram;
extern UINT8 *galaga_ram1,*galaga_ram2,*galaga_ram3;
extern UINT8 galaga_starcontrol[];
-extern struct star star_seed_tab[];
+extern const struct star star_seed_tab[];
PALETTE_INIT( galaga );
READ8_HANDLER( galaga_videoram_r );
diff --git a/src/mame/includes/mcr.h b/src/mame/includes/mcr.h
index 02890ea7360..7bcf74a12dc 100644
--- a/src/mame/includes/mcr.h
+++ b/src/mame/includes/mcr.h
@@ -20,12 +20,12 @@ WRITE8_HANDLER( mcr_ipu_sio_transmit );
extern attotime mcr68_timing_factor;
-extern struct z80_irq_daisy_chain mcr_daisy_chain[];
-extern struct z80_irq_daisy_chain mcr_ipu_daisy_chain[];
+extern const struct z80_irq_daisy_chain mcr_daisy_chain[];
+extern const struct z80_irq_daisy_chain mcr_ipu_daisy_chain[];
extern UINT8 mcr_cocktail_flip;
-extern gfx_layout mcr_bg_layout;
-extern gfx_layout mcr_sprite_layout;
+extern const gfx_layout mcr_bg_layout;
+extern const gfx_layout mcr_sprite_layout;
extern UINT32 mcr_cpu_board;
extern UINT32 mcr_sprite_board;
diff --git a/src/mame/includes/n64.h b/src/mame/includes/n64.h
index ee14cb9084e..931f64b0301 100644
--- a/src/mame/includes/n64.h
+++ b/src/mame/includes/n64.h
@@ -42,7 +42,7 @@ extern void rdp_process_list(void);
/*----------- defined in machine/n64.c -----------*/
-extern rsp_config n64_rsp_config;
+extern const rsp_config n64_rsp_config;
extern UINT32 *rdram;
extern UINT32 *rsp_imem;
diff --git a/src/mame/includes/starwars.h b/src/mame/includes/starwars.h
index 528ebc33e28..c3e30813003 100644
--- a/src/mame/includes/starwars.h
+++ b/src/mame/includes/starwars.h
@@ -22,14 +22,14 @@ READ8_HANDLER( starwars_input_1_r );
READ8_HANDLER( starwars_adc_r );
WRITE8_HANDLER( starwars_adc_select_w );
-void swmathbox_init(void);
-void swmathbox_reset(void);
+void starwars_mproc_init(void);
+void starwars_mproc_reset(void);
-READ8_HANDLER( swmathbx_prng_r );
-READ8_HANDLER( swmathbx_reh_r );
-READ8_HANDLER( swmathbx_rel_r );
+READ8_HANDLER( starwars_prng_r );
+READ8_HANDLER( starwars_div_reh_r );
+READ8_HANDLER( starwars_div_rel_r );
-WRITE8_HANDLER( swmathbx_w );
+WRITE8_HANDLER( starwars_math_w );
/*----------- defined in audio/starwars.c -----------*/
diff --git a/src/mame/includes/system16.h b/src/mame/includes/system16.h
index 27bceee56d4..b5f2022f451 100644
--- a/src/mame/includes/system16.h
+++ b/src/mame/includes/system16.h
@@ -90,7 +90,7 @@ extern UINT16 *sys16_extraram2;
extern UINT16 *sys16_extraram3;
/* sound */
-extern struct upd7759_interface sys16_upd7759_interface;
+extern const struct upd7759_interface sys16_upd7759_interface;
extern int sys18_sound_info[4*2];
@@ -233,7 +233,7 @@ extern int sys16_gr_bitmap_width;
extern int sys16_sprxoffset;
extern int sys16_bgxoffset;
extern int sys16_fgxoffset;
-extern int *sys16_obj_bank;
+extern const int *sys16_obj_bank;
extern int sys16_textlayer_lo_min;
extern int sys16_textlayer_lo_max;
extern int sys16_textlayer_hi_min;
diff --git a/src/mame/machine/amiga.c b/src/mame/machine/amiga.c
index 2bdd46ca2c0..0be6e7d78cf 100644
--- a/src/mame/machine/amiga.c
+++ b/src/mame/machine/amiga.c
@@ -79,7 +79,7 @@ static autoconfig_device *cur_autoconfig;
static emu_timer * amiga_irq_timer;
static emu_timer * amiga_blitter_timer;
-const char *amiga_custom_names[0x100] =
+const char *const amiga_custom_names[0x100] =
{
/* 0x000 */
"BLTDDAT", "DMACONR", "VPOSR", "VHPOSR",
@@ -925,7 +925,7 @@ static TIMER_CALLBACK( amiga_blitter_proc )
/* logging */
if (LOG_BLITS)
{
- static const char *type[] = { "ASCENDING", "LINE", "DESCENDING", "LINE" };
+ static const char *const type[] = { "ASCENDING", "LINE", "DESCENDING", "LINE" };
logerror("BLIT %s: %dx%d %04x %04x\n", type[CUSTOM_REG(REG_BLTCON1) & 0x0003], CUSTOM_REG(REG_BLTSIZH), CUSTOM_REG(REG_BLTSIZV), CUSTOM_REG(REG_BLTCON0), CUSTOM_REG(REG_BLTCON1));
if (CUSTOM_REG(REG_BLTCON0) & 0x0800)
logerror(" A: addr=%06X mod=%3d shift=%2d maskl=%04x maskr=%04x\n", CUSTOM_REG_LONG(REG_BLTAPTH), CUSTOM_REG_SIGNED(REG_BLTAMOD), CUSTOM_REG(REG_BLTCON0) >> 12, CUSTOM_REG(REG_BLTAFWM), CUSTOM_REG(REG_BLTALWM));
diff --git a/src/mame/machine/bagman.c b/src/mame/machine/bagman.c
index 6c9bedf4b0b..d23e8219b1f 100644
--- a/src/mame/machine/bagman.c
+++ b/src/mame/machine/bagman.c
@@ -35,7 +35,7 @@ static UINT8 outvalue[8];
** 1 - fuse blown: disconnected from input (equal to 1)
** 0 - fuse not blown: connected to input (ie. x, not x, q, not q accordingly)
*/
-static UINT8 fusemap[64*32]=
+static const UINT8 fusemap[64*32]=
{
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,0,1,1,1,1,0,1,1,0,1,1,1,1,0,1,1,0,1,1,1,0,1,1,1,1,1,
diff --git a/src/mame/machine/balsente.c b/src/mame/machine/balsente.c
index 3d76236ed43..c581a09a2fc 100644
--- a/src/mame/machine/balsente.c
+++ b/src/mame/machine/balsente.c
@@ -1066,7 +1066,7 @@ WRITE8_HANDLER( balsente_chip_select_w )
#if LOG_CEM_WRITES
if (temp != cem3394_get_parameter(i, reg))
{
- static const char *names[] =
+ static const char *const names[] =
{
"VCO_FREQUENCY",
"FINAL_GAIN",
diff --git a/src/mame/machine/beezer.c b/src/mame/machine/beezer.c
index 66a6e3036a5..4509848f79f 100644
--- a/src/mame/machine/beezer.c
+++ b/src/mame/machine/beezer.c
@@ -20,7 +20,7 @@ static WRITE8_HANDLER( b_via_1_pa_w );
static WRITE8_HANDLER( b_via_1_pb_w );
static void b_via_1_irq (int level);
-static struct via6522_interface b_via_0_interface =
+static const struct via6522_interface b_via_0_interface =
{
/*inputs : A/B */ 0, b_via_0_pb_r,
/*inputs : CA/B1,CA/B2 */ 0, via_1_ca2_r, b_via_0_ca2_r, via_1_ca1_r,
@@ -29,7 +29,7 @@ static struct via6522_interface b_via_0_interface =
/*irq */ b_via_0_irq
};
-static struct via6522_interface b_via_1_interface =
+static const struct via6522_interface b_via_1_interface =
{
/*inputs : A/B */ b_via_1_pa_r, b_via_1_pb_r,
/*inputs : CA/B1,CA/B2 */ via_0_cb2_r, 0, via_0_cb1_r, 0,
diff --git a/src/mame/machine/bfm_bd1.c b/src/mame/machine/bfm_bd1.c
index a3bac92df10..83027954252 100644
--- a/src/mame/machine/bfm_bd1.c
+++ b/src/mame/machine/bfm_bd1.c
@@ -71,7 +71,7 @@ static const char BD1ASCII[] =
*/
-static UINT16 BD1charset[]=
+static const UINT16 BD1charset[]=
{ // FEDC BA98 7654 3210
0xA626, // 1010 0110 0010 0110 @.
0xE027, // 1110 0000 0010 0111 A.
diff --git a/src/mame/machine/bublbobl.c b/src/mame/machine/bublbobl.c
index e57a3a0e79f..9c2f0571cee 100644
--- a/src/mame/machine/bublbobl.c
+++ b/src/mame/machine/bublbobl.c
@@ -63,7 +63,7 @@ WRITE8_HANDLER( bublbobl_nmitrigger_w )
}
-static UINT8 tokio_prot_data[] =
+static const UINT8 tokio_prot_data[] =
{
0x6c,
0x7f,0x5f,0x7f,0x6f,0x5f,0x77,0x5f,0x7f,0x5f,0x7f,0x5f,0x7f,0x5b,0x7f,0x5f,0x7f,
@@ -337,7 +337,7 @@ WRITE8_HANDLER( boblbobl_ic43_a_w )
WRITE8_HANDLER( boblbobl_ic43_b_w )
{
- static int xor[4] = { 4, 1, 8, 2 };
+ static const int xor[4] = { 4, 1, 8, 2 };
// logerror("%04x: ic43_b_w (offs %d) %02x\n",activecpu_get_pc(),offset,data);
ic43_b = (data >> 4) ^ xor[offset];
diff --git a/src/mame/machine/carpolo.c b/src/mame/machine/carpolo.c
index 6ebadeacd3e..5512e2e5c6b 100644
--- a/src/mame/machine/carpolo.c
+++ b/src/mame/machine/carpolo.c
@@ -483,27 +483,27 @@ static const pia6821_interface pia_1_intf =
/*irqs : A/B */ 0, 0
};
-static struct TTL74148_interface TTL74148_3S_intf =
+static const struct TTL74148_interface TTL74148_3S_intf =
{
TTL74148_3S_cb
};
-static struct TTL7474_interface TTL7474_2S_1_intf =
+static const struct TTL7474_interface TTL7474_2S_1_intf =
{
TTL7474_2S_1_cb
};
-static struct TTL7474_interface TTL7474_2S_2_intf =
+static const struct TTL7474_interface TTL7474_2S_2_intf =
{
TTL7474_2S_2_cb
};
-static struct TTL7474_interface TTL7474_2U_1_intf =
+static const struct TTL7474_interface TTL7474_2U_1_intf =
{
TTL7474_2U_1_cb
};
-static struct TTL7474_interface TTL7474_2U_2_intf =
+static const struct TTL7474_interface TTL7474_2U_2_intf =
{
TTL7474_2U_2_cb
};
diff --git a/src/mame/machine/cchip.c b/src/mame/machine/cchip.c
index 8424f33b711..4b216d65a9c 100644
--- a/src/mame/machine/cchip.c
+++ b/src/mame/machine/cchip.c
@@ -47,7 +47,7 @@ static UINT8 cc_port = 0;
/* This code for sound communication is a hack, it will not be
identical to the code derived from the real c-chip */
-static UINT8 superman_code[40] =
+static const UINT8 superman_code[40] =
{
0x48, 0xe7, 0x80, 0x80, /* MOVEM.L D0/A0,-(A7) ( Preserve Regs ) */
0x20, 0x6d, 0x1c, 0x40, /* MOVEA.L ($1C40,A5),A0 ( Load sound pointer in A0 ) */
diff --git a/src/mame/machine/copsnrob.c b/src/mame/machine/copsnrob.c
index 53186c867a6..ed5b3f78b61 100644
--- a/src/mame/machine/copsnrob.c
+++ b/src/mame/machine/copsnrob.c
@@ -7,7 +7,7 @@
#include "driver.h"
#include "copsnrob.h"
-static int gun_mask[] = {0x7e, 0x7d, 0x7b, 0x77, 0x6f, 0x5f, 0x3f};
+static const int gun_mask[] = {0x7e, 0x7d, 0x7b, 0x77, 0x6f, 0x5f, 0x3f};
// The gun control is a 7 position switch. I'm doing the following to
// emulate it:
diff --git a/src/mame/machine/cubocd32.c b/src/mame/machine/cubocd32.c
index 5ff4a4c64b1..3380ba3591c 100644
--- a/src/mame/machine/cubocd32.c
+++ b/src/mame/machine/cubocd32.c
@@ -229,7 +229,7 @@ static UINT32 akiko_c2p_read(void)
}
#if LOG_AKIKO
-static const char* akiko_reg_names[] =
+static const char *const akiko_reg_names[] =
{
/*0*/ "ID",
/*1*/ "CDROM STATUS 1",
diff --git a/src/mame/machine/daikaiju.c b/src/mame/machine/daikaiju.c
index a4f6423a2c1..ccd7fcbeca8 100644
--- a/src/mame/machine/daikaiju.c
+++ b/src/mame/machine/daikaiju.c
@@ -129,7 +129,7 @@ static int daikaiju_xor, daikaiju_command, daikaiju_length, daikaiju_prev, daika
static int daikaiju_buffer[256];
-static int xortable[]=
+static const int xortable[]=
{
0xF5, 0xD5, 0x6A, 0x26, 0x00, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x16, 0x00, 0xCB, 0x23, 0x19,
0x11, 0x00, 0xC0, 0x19, 0xD1, 0xF1, 0xC9, -1
diff --git a/src/mame/machine/deco102.c b/src/mame/machine/deco102.c
index ede2d8dd861..1c85dafd908 100644
--- a/src/mame/machine/deco102.c
+++ b/src/mame/machine/deco102.c
@@ -14,11 +14,11 @@ extern void deco102_decrypt(int region, int address_xor, int data_select_xor, in
static UINT16 decrypt(UINT16 data, int address, int select_xor)
{
- static UINT16 xors[16] =
+ static const UINT16 xors[16] =
{
0xb52c,0x2458,0x139a,0xc998,0xce8e,0x5144,0x0429,0xaad4,0xa331,0x3645,0x69a3,0xac64,0x1a53,0x5083,0x4dea,0xd237
};
- static UINT8 bitswaps[16][16] =
+ static const UINT8 bitswaps[16][16] =
{
{ 12,8,13,11,14,10,15,9, 3,2,1,0,4,5,6,7 }, { 10,11,14,12,15,13,8,9, 6,7,5,3,0,4,2,1 },
{ 14,13,15,9,8,12,11,10, 7,4,1,5,6,0,3,2 }, { 15,14,8,9,10,11,13,12, 1,2,7,3,4,6,0,5 },
@@ -30,7 +30,7 @@ static UINT16 decrypt(UINT16 data, int address, int select_xor)
{ 13,8,12,14,11,15,10,9, 7,6,5,4,3,2,1,0 }, { 15,14,13,12,11,10,9,8, 0,6,7,4,3,2,1,5 }
};
int j, xor;
- UINT8 *bs;
+ const UINT8 *bs;
// calculate bitswap to use
j = ((address ^ select_xor) & 0xf0) >> 4;
diff --git a/src/mame/machine/equites.c b/src/mame/machine/equites.c
index 5d0fc9b48e1..53abfe39927 100644
--- a/src/mame/machine/equites.c
+++ b/src/mame/machine/equites.c
@@ -54,8 +54,8 @@ extern WRITE8_HANDLER(equites_dac0_w);
extern WRITE8_HANDLER(equites_dac1_w);
extern UINT16 *equites_8404ram;
-extern struct MSM5232interface equites_5232intf;
-extern struct AY8910interface equites_8910intf;
+extern struct const MSM5232interface equites_5232intf;
+extern struct const AY8910interface equites_8910intf;
static ADDRESS_MAP_START( equites_s_readmem, ADDRESS_SPACE_PROGRAM, 8 )
{ 0x0000, 0xbfff, MRA8_ROM }, // sound program
@@ -92,7 +92,7 @@ extern UINT16 *equites_workram;
/******************************************************************************/
// Locals
-static UINT16 e_ent_addr[8][4] =
+static const UINT16 e_ent_addr[8][4] =
{
{0xce25, 0xcd3c, 0xcd89, 0xcdd5},
{ 0, 0xce6e, 0xcebe, 0xcff2},
@@ -104,7 +104,7 @@ static UINT16 e_ent_addr[8][4] =
{ 0, 0, 0, 0},
};
-static UINT16 e_exit_pos[8][4] =
+static const UINT16 e_exit_pos[8][4] =
{
{0x1878, 0x4878, 0x7878, 0x3878},
{ 0, 0x3878, 0x4878, 0x4878},
@@ -116,7 +116,7 @@ static UINT16 e_exit_pos[8][4] =
{ 0, 0, 0, 0},
};
-static UINT16 e_swap_addr[4][4] =
+static const UINT16 e_swap_addr[4][4] =
{
{ 0, 0x92ec, 0, 0x92ec},
{ 0, 0x92ec, 0, 0x92ec},
@@ -124,7 +124,7 @@ static UINT16 e_swap_addr[4][4] =
{ 0, 0x92d2, 0, 0x92d2},
};
-static UINT16 e_respawn_addr[4][4] =
+static const UINT16 e_respawn_addr[4][4] =
{
{ 0, 0x9382, 0, 0x9382},
{ 0, 0x9382, 0, 0x9382},
@@ -132,26 +132,26 @@ static UINT16 e_respawn_addr[4][4] =
{ 0, 0x0cc8, 0, 0x9382},
};
-static UINT16 h_respawn_addr[2][4] =
+static const UINT16 h_respawn_addr[2][4] =
{
{0x1026, 0x0fb6, 0x0fb6, 0x0fb6},
{0x11ac, 0x20b0, 0x1c44, 0x1996},
};
-static UINT16 s_respawn_addr[3][6] =
+static const UINT16 s_respawn_addr[3][6] =
{
{0x0b6a, 0x0b52, 0x29da, 0x0846, 0x1610, 0x0c84}, // game over seq
{0x347e, 0x0e10, 0x0c2c, 0x0c2c, 0x0c2c, 0x0c2c}, // depth seq
{0x0c2e, 0x1fbe, 0x166a, 0x0c84, 0x0c2c, 0x0c2c}, // level change seq
};
-static UINT16 s_lvdata_addr[6] = {0xccc2, 0xd04a, 0xd408, 0xd796, 0xdaa8, 0xdbd6};
+static const UINT16 s_lvdata_addr[6] = {0xccc2, 0xd04a, 0xd408, 0xd796, 0xdaa8, 0xdbd6};
-static UINT16 s_objdata_addr[6] = {0xb7ce, 0xba64, 0xbdbc, 0xc0f2, 0xc446, 0xc810};
+static const UINT16 s_objdata_addr[6] = {0xb7ce, 0xba64, 0xbdbc, 0xc0f2, 0xc446, 0xc810};
-static UINT8 s_spawn_list[8] = {0x07, 0x08, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26};
+static const UINT8 s_spawn_list[8] = {0x07, 0x08, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26};
-static UINT8 s_pow_list[8] = {0, 0, 2, 2, 2, 2, 2, 1};
+static const UINT8 s_pow_list[8] = {0, 0, 2, 2, 2, 2, 2, 1};
static struct MRULE
{
@@ -428,12 +428,12 @@ WRITE8_HANDLER(equites_dac1_w)
/******************************************************************************/
// Alpha "Soundboard 7" Chip Definitions
-struct MSM5232interface equites_5232intf =
+const struct MSM5232interface equites_5232intf =
{
{ 0.39e-6, 0.39e-6, 0.39e-6, 0.39e-6, 0.39e-6, 0.39e-6, 0.39e-6, 0.39e-6 } // needs verification
};
-struct AY8910interface equites_8910intf =
+const struct AY8910interface equites_8910intf =
{
0,
0,
diff --git a/src/mame/machine/fd1089.c b/src/mame/machine/fd1089.c
index 05971a0e879..5f77d3e9ec5 100644
--- a/src/mame/machine/fd1089.c
+++ b/src/mame/machine/fd1089.c
@@ -6323,7 +6323,7 @@ struct parameters
int s7,s6,s5,s4,s3,s2,s1,s0;
};
-static UINT8 basetable_fd1089[0x100] =
+static const UINT8 basetable_fd1089[0x100] =
{
0x00,0x1c,0x75,0x69,0x5d,0x41,0x24,0x38,0x4b,0x67,0xae,0x82,0xea,0xc6,0x03,0x2f,
0x46,0x6a,0xaf,0x83,0xe7,0xcb,0x02,0x2e,0x01,0x1d,0x78,0x64,0x5c,0x40,0x29,0x35,
@@ -6345,7 +6345,7 @@ static UINT8 basetable_fd1089[0x100] =
/* common to FD1089A and FD1089B */
-static struct parameters addr_params[16] =
+static const struct parameters addr_params[16] =
{
{ 0x26, 3,1,7,5,2,4,6,0 },
{ 0x08, 6,7,4,2,0,5,1,3 },
@@ -6368,7 +6368,7 @@ static struct parameters addr_params[16] =
static int decode_fd1089a(int val,int table,int opcode)
{
- static struct parameters data_params[16] =
+ static const struct parameters data_params[16] =
{
{ 0x94, 7,6,4,2,1,5,0,3 },
{ 0x3f, 7,3,1,2,4,6,0,5 },
@@ -6387,8 +6387,8 @@ static int decode_fd1089a(int val,int table,int opcode)
{ 0x71, 4,3,7,1,5,6,0,2 },
{ 0x57, 6,4,7,2,0,5,3,1 },
};
- struct parameters *p = &addr_params[table >> 4];
- struct parameters *q;
+ const struct parameters *p = &addr_params[table >> 4];
+ const struct parameters *q;
int family = table & 0x0e;
@@ -6445,7 +6445,7 @@ static int decode_fd1089a(int val,int table,int opcode)
static int decode_fd1089b(int val,int table,int opcode)
{
- struct parameters *p = &addr_params[table >> 4];
+ const struct parameters *p = &addr_params[table >> 4];
/* special case - don't decrypt */
diff --git a/src/mame/machine/konamigx.c b/src/mame/machine/konamigx.c
index ba336815a5b..8781f534d23 100644
--- a/src/mame/machine/konamigx.c
+++ b/src/mame/machine/konamigx.c
@@ -920,8 +920,8 @@ static int vinmix, vmixon, osinmix, osmixon;
static void konamigx_precache_registers(void)
{
// (see sprite color coding scheme on p.46 & 47)
- static int coregmasks[5] = {0xf,0xe,0xc,0x8,0x0};
- static int coregshifts[5]= {4,5,6,7,8};
+ static const int coregmasks[5] = {0xf,0xe,0xc,0x8,0x0};
+ static const int coregshifts[5]= {4,5,6,7,8};
int i;
K053246_objset1 = K053246_read_register(5);
@@ -1232,8 +1232,8 @@ void konamigx_mixer(running_machine *machine, mame_bitmap *bitmap, const rectang
tilemap *sub2, int sub2flags,
int mixerflags)
{
- static int xoffset[8] = { 0, 1, 4, 5, 16, 17, 20, 21 };
- static int yoffset[8] = { 0, 2, 8, 10, 32, 34, 40, 42 };
+ static const int xoffset[8] = { 0, 1, 4, 5, 16, 17, 20, 21 };
+ static const int yoffset[8] = { 0, 2, 8, 10, 32, 34, 40, 42 };
static int parity = 0;
int objbuf[GX_MAX_OBJECTS];
@@ -2049,7 +2049,7 @@ void konamigx_esc_alert(UINT32 *srcbase, int srcoffs, int count, int mode) // (W
{
// hand-filled but should be close
-static UINT8 ztable[7][8] =
+static const UINT8 ztable[7][8] =
{
{5,4,3,2,1,7,6,0},
{4,3,2,1,0,7,6,5},
@@ -2060,7 +2060,7 @@ static UINT8 ztable[7][8] =
{5,4,3,2,1,7,6,0}
};
-static UINT8 ptable[7][8] =
+static const UINT8 ptable[7][8] =
{
{0x00,0x00,0x00,0x10,0x20,0x00,0x00,0x30},
{0x20,0x20,0x20,0x20,0x20,0x00,0x20,0x20},
@@ -2074,7 +2074,7 @@ static UINT8 ptable[7][8] =
INT32 data1, data2, i, j, vpos, hpos, voffs, hoffs, vcorr, hcorr, vmask, hmask, magicid;
UINT32 *src, *srcend, *obj, *objend;
UINT16 *dst;
- UINT8 *zcode, *pcode;
+ const UINT8 *zcode, *pcode;
if (!count || !srcbase) return;
diff --git a/src/mame/machine/mcr.c b/src/mame/machine/mcr.c
index 4478f8af296..5e2b20dca3a 100644
--- a/src/mame/machine/mcr.c
+++ b/src/mame/machine/mcr.c
@@ -101,7 +101,7 @@ static WRITE8_HANDLER( ipu_break_changed );
*
*************************************/
-gfx_layout mcr_bg_layout =
+const gfx_layout mcr_bg_layout =
{
8,8,
RGN_FRAC(1,2),
@@ -113,7 +113,7 @@ gfx_layout mcr_bg_layout =
};
-gfx_layout mcr_sprite_layout =
+const gfx_layout mcr_sprite_layout =
{
32,32,
RGN_FRAC(1,4),
@@ -199,14 +199,14 @@ static void ipu_ctc_interrupt(int state)
}
-struct z80_irq_daisy_chain mcr_daisy_chain[] =
+const struct z80_irq_daisy_chain mcr_daisy_chain[] =
{
{ z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 }, /* CTC number 0 */
{ 0, 0, 0, 0, -1 } /* end mark */
};
-struct z80_irq_daisy_chain mcr_ipu_daisy_chain[] =
+const struct z80_irq_daisy_chain mcr_ipu_daisy_chain[] =
{
{ z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 1 }, /* CTC number 1 */
{ z80pio_reset, z80pio_irq_state, z80pio_irq_ack, z80pio_irq_reti, 1 }, /* PIO number 1 */
@@ -238,7 +238,7 @@ static z80ctc_interface nflfoot_ctc_intf =
};
-static z80pio_interface nflfoot_pio_intf =
+static const z80pio_interface nflfoot_pio_intf =
{
ipu_ctc_interrupt,
0,
diff --git a/src/mame/machine/mexico86.c b/src/mame/machine/mexico86.c
index bb5dd1fbfff..2f3263b1c2f 100644
--- a/src/mame/machine/mexico86.c
+++ b/src/mame/machine/mexico86.c
@@ -107,7 +107,7 @@ logerror("initialising MCU\n");
if (mexico86_protection_ram[0xe0] > 0 && mexico86_protection_ram[0xe0] < 4)
{
- static UINT8 answers[3][16] =
+ static const UINT8 answers[3][16] =
{
{ 0x00,0x40,0x48,0x50,0x58,0x60,0x68,0x70,0x78,0x80,0x88,0x00,0x00,0x00,0x00,0x00 },
{ 0x00,0x04,0x08,0x0C,0x10,0x14,0x18,0x1C,0x20,0x31,0x2B,0x35,0x00,0x00,0x00,0x00 },
@@ -130,7 +130,7 @@ logerror("initialising MCU\n");
// The following is missing from Knight Boy
// this should be equivalent to the obfuscated kiki_clogic() below
{
- static int db[16]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x10,0x18,0x00,0x00,0x00,0x00};
+ static const int db[16]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x10,0x18,0x00,0x00,0x00,0x00};
int sy = mexico86_protection_ram[0xa0] + ((0x18)>>1);
int sx = mexico86_protection_ram[0xa1] + ((0x18)>>1);
@@ -175,7 +175,7 @@ INTERRUPT_GEN( kikikai_interrupt )
static void kiki_clogic(int address, int latch)
{
- static UINT8 db[16]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x10,0x18,0x00,0x00,0x00,0x00};
+ static const UINT8 db[16]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x10,0x18,0x00,0x00,0x00,0x00};
static UINT8 queue[64];
static int qfront = 0, state = 0;
int sy, sx, hw, i, qptr, diff1, diff2;
diff --git a/src/mame/machine/midwayic.c b/src/mame/machine/midwayic.c
index 21c145ddc8d..23bb83edf03 100644
--- a/src/mame/machine/midwayic.c
+++ b/src/mame/machine/midwayic.c
@@ -72,7 +72,7 @@ struct ioasic_state
UINT8 dcs_cpu;
UINT8 shuffle_type;
UINT8 shuffle_active;
- UINT8 * shuffle_map;
+ const UINT8 * shuffle_map;
void (*irq_callback)(int);
UINT8 irq_state;
UINT16 sound_irq_state;
@@ -589,7 +589,7 @@ static void ioasic_register_state(void)
void midway_ioasic_init(int shuffle, int upper, int yearoffs, void (*irq_callback)(int))
{
- static UINT8 shuffle_maps[][16] =
+ static const UINT8 shuffle_maps[][16] =
{
{ 0x0,0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8,0x9,0xa,0xb,0xc,0xd,0xe,0xf }, /* WarGods, WG3DH, SFRush, MK4 */
{ 0x4,0x5,0x6,0x7,0xb,0xa,0x9,0x8,0x3,0x2,0x1,0x0,0xf,0xe,0xd,0xc }, /* Blitz, Blitz99 */
diff --git a/src/mame/machine/model1.c b/src/mame/machine/model1.c
index 93f32644bc8..a07b40125b5 100644
--- a/src/mame/machine/model1.c
+++ b/src/mame/machine/model1.c
@@ -2157,7 +2157,7 @@ WRITE16_HANDLER( model1_vr_tgp_w )
}
/* TGP config */
-struct mb86233_config model1_vr_tgp_config =
+const struct mb86233_config model1_vr_tgp_config =
{
copro_fifoin_pop,
copro_fifoout_push
diff --git a/src/mame/machine/model3.c b/src/mame/machine/model3.c
index 6575f3d7a4f..58e1dde4d6a 100644
--- a/src/mame/machine/model3.c
+++ b/src/mame/machine/model3.c
@@ -22,7 +22,7 @@ static int m3_step;
#define NEXT(new_state) fsm[state][new_state]
static INT32 state; // current state
-static INT32 fsm[][2] = {
+static const INT32 fsm[][2] = {
{ 1, 0 }, // 0 Test-Logic/Reset
{ 1, 2 }, // 1 Run-Test/Idle
{ 3, 9 }, // 2 Select-DR-Scan
diff --git a/src/mame/machine/n64.c b/src/mame/machine/n64.c
index 1925c5702e9..8a25201ce9b 100644
--- a/src/mame/machine/n64.c
+++ b/src/mame/machine/n64.c
@@ -564,7 +564,7 @@ WRITE32_HANDLER( n64_dp_reg_w )
}
-rsp_config n64_rsp_config =
+const rsp_config n64_rsp_config =
{
n64_dp_reg_r,
n64_dp_reg_w,
diff --git a/src/mame/machine/namcoio.c b/src/mame/machine/namcoio.c
index 38e135ccefc..5f6c3fe7748 100644
--- a/src/mame/machine/namcoio.c
+++ b/src/mame/machine/namcoio.c
@@ -277,7 +277,7 @@ static void namcoio_51XX_write(int chip,int data)
verified on Namco original hardware, but they are the same in all the bootlegs,
so we can assume they are right.
*/
-static int joy_map[16] =
+static const int joy_map[16] =
/* LDRU, LDR, LDU, LD, LRU, LR, LU, L, DRU, DR, DU, D, RU, R, U, center */
{ 0xf, 0xe, 0xd, 0x5, 0xc, 0x9, 0x7, 0x6, 0xb, 0x3, 0xa, 0x4, 0x1, 0x2, 0x0, 0x8 };
diff --git a/src/mame/machine/neoboot.c b/src/mame/machine/neoboot.c
index 849f87ab24a..f709708085e 100644
--- a/src/mame/machine/neoboot.c
+++ b/src/mame/machine/neoboot.c
@@ -414,7 +414,7 @@ void decrypt_cthd2003(void)
static WRITE16_HANDLER ( cthd2003_bankswitch_w )
{
int bankaddress;
- static int cthd2003_banks[8] =
+ static const int cthd2003_banks[8] =
{
1,0,1,0,1,0,3,2,
};
diff --git a/src/mame/machine/neoprot.c b/src/mame/machine/neoprot.c
index 5a350202f38..65969b102ed 100644
--- a/src/mame/machine/neoprot.c
+++ b/src/mame/machine/neoprot.c
@@ -189,7 +189,7 @@ void mslugx_install_protection(void)
static WRITE16_HANDLER( kof99_bankswitch_w )
{
int bankaddress;
- static int bankoffset[64] =
+ static const int bankoffset[64] =
{
0x000000, 0x100000, 0x200000, 0x300000,
0x3cc000, 0x4cc000, 0x3f2000, 0x4f2000,
@@ -221,7 +221,7 @@ static WRITE16_HANDLER( garou_bankswitch_w )
{
/* thanks to Razoola and Mr K for the info */
int bankaddress;
- static int bankoffset[64] =
+ static const int bankoffset[64] =
{
0x000000, 0x100000, 0x200000, 0x300000, // 00
0x280000, 0x380000, 0x2d0000, 0x3d0000, // 04
@@ -258,7 +258,7 @@ static WRITE16_HANDLER( garouo_bankswitch_w )
{
/* thanks to Razoola and Mr K for the info */
int bankaddress;
- static int bankoffset[64] =
+ static const int bankoffset[64] =
{
0x000000, 0x100000, 0x200000, 0x300000, // 00
0x280000, 0x380000, 0x2d0000, 0x3d0000, // 04
@@ -297,7 +297,7 @@ static WRITE16_HANDLER( mslug3_bankswitch_w )
{
/* thanks to Razoola and Mr K for the info */
int bankaddress;
- static int bankoffset[64] =
+ static const int bankoffset[64] =
{
0x000000, 0x020000, 0x040000, 0x060000, // 00
0x070000, 0x090000, 0x0b0000, 0x0d0000, // 04
@@ -333,7 +333,7 @@ static WRITE16_HANDLER( kof2000_bankswitch_w )
{
/* thanks to Razoola and Mr K for the info */
int bankaddress;
- static int bankoffset[64] =
+ static const int bankoffset[64] =
{
0x000000, 0x100000, 0x200000, 0x300000, // 00
0x3f7800, 0x4f7800, 0x3ff800, 0x4ff800, // 04
diff --git a/src/mame/machine/nmk004.c b/src/mame/machine/nmk004.c
index ca38777b8c9..160505281fa 100644
--- a/src/mame/machine/nmk004.c
+++ b/src/mame/machine/nmk004.c
@@ -587,7 +587,7 @@ popmessage("%02x %02x%02x%02x%02x %02x %02x%02x%02x%02x %02x %02x%02x%02x%02x",
static void fm_voices_update(void)
{
- static int ym2203_registers[0x18] =
+ static const int ym2203_registers[0x18] =
{
0x30,0x38,0x34,0x3C,0x40,0x48,0x44,0x4C,0x50,0x58,0x54,0x5C,0x60,0x68,0x64,0x6C,
0x70,0x78,0x74,0x7C,0x80,0x88,0x84,0x8C
@@ -896,11 +896,11 @@ static void psg_update(int channel)
static void get_command(void)
{
- static UINT8 from_main[] =
+ static const UINT8 from_main[] =
{
0x00,0x22,0x62,0x8c,0xc7,0x00,0x00,0x3f,0x7f,0x89,0xc7,0x00,0x00,0x2b,0x6b
};
- static UINT8 to_main[] =
+ static const UINT8 to_main[] =
{
0x82,0xc7,0x00,0x2c,0x6c,0x00,0x9f,0xc7,0x00,0x29,0x69,0x00,0x8b,0xc7,0x00
};
@@ -1019,7 +1019,7 @@ void NMK004_irq(int irq)
static TIMER_CALLBACK( real_nmk004_init )
{
- static UINT8 ym2203_init[] =
+ static const UINT8 ym2203_init[] =
{
0x07,0x38,0x08,0x00,0x09,0x00,0x0A,0x00,0x24,0xB3,0x25,0x00,0x26,0xF9,0x27,0x15,
0x28,0x00,0x28,0x01,0x28,0x02,0x40,0x00,0x41,0x00,0x42,0x00,0x44,0x00,0x45,0x00,
diff --git a/src/mame/machine/pckeybrd.c b/src/mame/machine/pckeybrd.c
index 929b9089cb1..38ccedd9f9b 100644
--- a/src/mame/machine/pckeybrd.c
+++ b/src/mame/machine/pckeybrd.c
@@ -58,7 +58,7 @@ to the scancode set I have here. - KT 22/Jun/2000 */
/* key set 3 */
-static int at_keyboard_scancode_set_2_3[]=
+static const int at_keyboard_scancode_set_2_3[]=
{
0,
0x076,
@@ -199,7 +199,7 @@ typedef struct extended_keyboard_code
} extended_keyboard_code;
-static extended_keyboard_code keyboard_mf2_code[0x10][2/*numlock off, on*/]={
+static const extended_keyboard_code keyboard_mf2_code[0x10][2/*numlock off, on*/]={
{ { "\xe0\x1c", "\xe0\x9c" } }, // keypad enter
{ { "\xe0\x1d", "\xe0\x9d" } }, // right control
{ { "\xe0\x35", "\xe0\xb5" } },
@@ -220,7 +220,7 @@ static extended_keyboard_code keyboard_mf2_code[0x10][2/*numlock off, on*/]={
/* I don't think these keys change if num-lock is active! */
/* pc-at extended keyboard make/break codes for code set 3 */
-static extended_keyboard_code at_keyboard_extended_codes_set_2_3[]=
+static const extended_keyboard_code at_keyboard_extended_codes_set_2_3[]=
{
/*keypad enter */
{
@@ -477,7 +477,7 @@ static void at_keyboard_extended_scancode_insert(int code, int pressed)
case 2:
case 3:
{
- extended_keyboard_code *key = &at_keyboard_extended_codes_set_2_3[code];
+ const extended_keyboard_code *key = &at_keyboard_extended_codes_set_2_3[code];
if (pressed)
{
diff --git a/src/mame/machine/pcshare.c b/src/mame/machine/pcshare.c
index a6a58ff025b..c0f91d84d0f 100644
--- a/src/mame/machine/pcshare.c
+++ b/src/mame/machine/pcshare.c
@@ -104,7 +104,7 @@ static void pc_com_refresh_connected(int n, int data)
/* PC interface to PC-com hardware. Done this way because PCW16 also
uses PC-com hardware and doesn't have the same setup! */
-static uart8250_interface com_interface[4]=
+static const uart8250_interface com_interface[4]=
{
{
TYPE8250,
@@ -201,7 +201,7 @@ static const struct pit8253_config pc_pit8254_config =
#ifdef MESS
-static PC_LPT_CONFIG lpt_config[3]={
+static const PC_LPT_CONFIG lpt_config[3]={
{
1,
LPT_UNIDIRECTIONAL,
@@ -219,7 +219,7 @@ static PC_LPT_CONFIG lpt_config[3]={
}
};
-static CENTRONICS_CONFIG cent_config[3]={
+static const CENTRONICS_CONFIG cent_config[3]={
{
PRINTER_IBM,
pc_lpt_handshake_in
@@ -367,7 +367,7 @@ static void pc_dma_write_byte(int channel, offs_t offset, UINT8 data)
-static struct dma8237_interface pc_dma =
+static const struct dma8237_interface pc_dma =
{
0,
1.0e-6, // 1us
diff --git a/src/mame/machine/pgmcrypt.c b/src/mame/machine/pgmcrypt.c
index 68f48ec4c1e..f3b5a3223c2 100644
--- a/src/mame/machine/pgmcrypt.c
+++ b/src/mame/machine/pgmcrypt.c
@@ -320,7 +320,7 @@ void pgm_killbld_decrypt(void)
#ifdef UNUSED_FUNCTION
-static UINT8 dfront_tab[256] = {
+static const UINT8 dfront_tab[256] = {
0x51, 0xc4, 0xe3, 0x10, 0x1c, 0xad, 0x8a, 0x39, 0x8c, 0xe0, 0xa5, 0x04, 0x0f, 0xe4, 0x35, 0xc3,
0x2d, 0x6b, 0x32, 0xe2, 0x60, 0x54, 0x63, 0x06, 0xa3, 0xf1, 0x0b, 0x5f, 0x6c, 0x5c, 0xb3, 0xec,
0x77, 0x61, 0x69, 0xe7, 0x3c, 0xb7, 0x42, 0x72, 0x1a, 0x70, 0xb0, 0x96, 0xa4, 0x28, 0xc0, 0xfb,
@@ -380,7 +380,7 @@ void pgm_dfront_decrypt(void)
}
-static UINT8 ddp2_tab[256] = {
+static const UINT8 ddp2_tab[256] = {
0x2a, 0x4a, 0x39, 0x98, 0xac, 0x39, 0xb2, 0x55, 0x72, 0xf3, 0x7b, 0x3c, 0xee, 0x94, 0x6e, 0xd5,
0xcd, 0xbc, 0x9a, 0xd0, 0x45, 0x7d, 0x49, 0x68, 0xb1, 0x61, 0x54, 0xef, 0xa2, 0x84, 0x29, 0x20,
0x32, 0x52, 0x82, 0x04, 0x38, 0x69, 0x9f, 0x24, 0x46, 0xf4, 0x3f, 0xc2, 0xf1, 0x25, 0xac, 0x2d,
@@ -435,7 +435,7 @@ void pgm_ddp2_decrypt(void)
#endif
-static UINT8 mm_tab[256] = {
+static const UINT8 mm_tab[256] = {
0xd0, 0x45, 0xbc, 0x84, 0x93, 0x60, 0x7d, 0x49, 0x68, 0xb1, 0x54, 0xa2, 0x05, 0x29, 0x41, 0x20,
0x04, 0x08, 0x52, 0x25, 0x89, 0xf4, 0x69, 0x9f, 0x24, 0x46, 0x3d, 0xf1, 0xf9, 0xab, 0xa6, 0x2d,
0x18, 0x19, 0x6d, 0x33, 0x79, 0x23, 0x3b, 0x1d, 0xe0, 0xb8, 0x61, 0x1a, 0xe1, 0x4c, 0x5d, 0x3f,
diff --git a/src/mame/machine/pgmprot.c b/src/mame/machine/pgmprot.c
index 9ecdade6a75..3d96723d24c 100644
--- a/src/mame/machine/pgmprot.c
+++ b/src/mame/machine/pgmprot.c
@@ -16,38 +16,38 @@ static UINT32 PSTARS_VAL;
static UINT16 pstar_e7,pstar_b1,pstar_ce;
static UINT16 pstar_ram[3];
-static int Pstar_ba[0x1E]={
+static const int Pstar_ba[0x1E]={
0x02,0x00,0x00,0x01,0x00,0x03,0x00,0x00, //0
0x02,0x00,0x06,0x00,0x22,0x04,0x00,0x03, //8
0x00,0x00,0x06,0x00,0x20,0x07,0x00,0x03, //10
0x00,0x21,0x01,0x00,0x00,0x63
};
-static int Pstar_b0[0x10]={
+static const int Pstar_b0[0x10]={
0x09,0x0A,0x0B,0x00,0x01,0x02,0x03,0x04,
0x05,0x06,0x07,0x08,0x00,0x00,0x00,0x00
};
-static int Pstar_ae[0x10]={
+static const int Pstar_ae[0x10]={
0x5D,0x86,0x8C ,0x8B,0xE0,0x8B,0x62,0xAF,
0xB6,0xAF,0x10A,0xAF,0x00,0x00,0x00,0x00
};
-static int Pstar_a0[0x10]={
+static const int Pstar_a0[0x10]={
0x02,0x03,0x04,0x05,0x06,0x01,0x0A,0x0B,
0x0C,0x0D,0x0E,0x09,0x00,0x00,0x00,0x00,
};
-static int Pstar_9d[0x10]={
+static const int Pstar_9d[0x10]={
0x05,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
-static int Pstar_90[0x10]={
+static const int Pstar_90[0x10]={
0x0C,0x10,0x0E,0x0C,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
-static int Pstar_8c[0x23]={
+static const int Pstar_8c[0x23]={
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,
0x01,0x01,0x01,0x01,0x02,0x02,0x02,0x02,
@@ -55,7 +55,7 @@ static int Pstar_8c[0x23]={
0x03,0x03,0x03
};
-static int Pstar_80[0x1a3]={
+static const int Pstar_80[0x1a3]={
0x03,0x03,0x04,0x04,0x04,0x04,0x05,0x05,
0x05,0x05,0x06,0x06,0x03,0x03,0x04,0x04,
0x05,0x05,0x05,0x05,0x06,0x06,0x07,0x07,
@@ -317,7 +317,7 @@ static UINT32 bt(UINT32 v, int bit)
static void asic3_compute_hold(void)
{
// The mode is dependant on the region
- static int modes[4] = { 1, 1, 3, 2 };
+ static const int modes[4] = { 1, 1, 3, 2 };
int mode = modes[readinputport(4) & 3];
switch(mode) {
diff --git a/src/mame/machine/playch10.c b/src/mame/machine/playch10.c
index ca9f98cf7fb..c2518b6f41b 100644
--- a/src/mame/machine/playch10.c
+++ b/src/mame/machine/playch10.c
@@ -254,7 +254,7 @@ READ8_HANDLER( pc10_in1_r )
}
/* RP5H01 interface */
-static struct RP5H01_interface rp5h01_interface =
+static const struct RP5H01_interface rp5h01_interface =
{
1,
{ REGION_USER1 },
diff --git a/src/mame/machine/psx.c b/src/mame/machine/psx.c
index be4ffe996b3..d1d9216b3f3 100644
--- a/src/mame/machine/psx.c
+++ b/src/mame/machine/psx.c
@@ -997,7 +997,7 @@ static UINT16 m_p_n_mdec_r5[ 256 * 3 ];
static UINT16 m_p_n_mdec_g5[ 256 * 3 ];
static UINT16 m_p_n_mdec_b5[ 256 * 3 ];
-static UINT32 m_p_n_mdec_zigzag[ DCTSIZE2 ] =
+static const UINT32 m_p_n_mdec_zigzag[ DCTSIZE2 ] =
{
0, 1, 8, 16, 9, 2, 3, 10,
17, 24, 32, 25, 18, 11, 4, 5,
diff --git a/src/mame/machine/scramble.c b/src/mame/machine/scramble.c
index 5dc2aae78ee..1259075a52a 100644
--- a/src/mame/machine/scramble.c
+++ b/src/mame/machine/scramble.c
@@ -66,7 +66,7 @@ MACHINE_RESET( explorer )
static READ8_HANDLER( scrambls_input_port_2_r )
{
- static UINT8 mask[] = { 0x20, 0x20, 0x80, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0 };
+ static const UINT8 mask[] = { 0x20, 0x20, 0x80, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0 };
UINT8 res;
diff --git a/src/mame/machine/scudsp.c b/src/mame/machine/scudsp.c
index 7f7320961a7..daef9dc69d1 100644
--- a/src/mame/machine/scudsp.c
+++ b/src/mame/machine/scudsp.c
@@ -877,7 +877,7 @@ void dsp_execute_program()
SCU DSP Disassembler
************************************************************************/
-static const char* ALU_Commands[] =
+static const char *const ALU_Commands[] =
{
"", /* 0000 */
"AND", /* 0001 */
@@ -897,7 +897,7 @@ static const char* ALU_Commands[] =
"RL8", /* 1111 */
};
-static const char* X_Commands[] =
+static const char *const X_Commands[] =
{
"", /* 000 */
"", /* 001 */ /* NOP? check instruction @ 0x0B */
@@ -906,7 +906,7 @@ static const char* X_Commands[] =
"MOV %s,X", /* 100 */
};
-static const char* Y_Commands[] =
+static const char *const Y_Commands[] =
{
"", /* 000 */
"CLR A", /* 001 */
@@ -915,7 +915,7 @@ static const char* Y_Commands[] =
"MOV %s,Y", /* 100 */
};
-static const char* D1_Commands[] =
+static const char *const D1_Commands[] =
{
"", /* 00 */
"MOV %I8,%d", /* 01 */
@@ -923,7 +923,7 @@ static const char* D1_Commands[] =
"MOV %S,%d", /* 11 */
};
-static const char* SourceMemory[] =
+static const char *const SourceMemory[] =
{
"M0", /* 000 */
"M1", /* 001 */
@@ -935,7 +935,7 @@ static const char* SourceMemory[] =
"MC3", /* 111 */
};
-static const char* SourceMemory2[] =
+static const char *const SourceMemory2[] =
{
"M0", /* 0000 */
"M1", /* 0001 */
@@ -955,7 +955,7 @@ static const char* SourceMemory2[] =
"???", /* 1111 */
};
-static const char* DestMemory[] =
+static const char *const DestMemory[] =
{
"MC0", /* 0000 */
"MC1", /* 0001 */
@@ -975,7 +975,7 @@ static const char* DestMemory[] =
"CT3", /* 1111 */
};
-static const char* DestDMAMemory[] =
+static const char *const DestDMAMemory[] =
{
"M0", /* 000 */
"M1", /* 001 */
@@ -987,19 +987,19 @@ static const char* DestDMAMemory[] =
"???", /* 111 */
};
-static const char* MVI_Command[] =
+static const char *const MVI_Command[] =
{
"MVI %I,%d", /* 0 */
"MVI %I,%d,%f", /* 1 */
};
-static const char* JMP_Command[] =
+static const char *const JMP_Command[] =
{
"JMP %IA",
"JMP %f,%IA",
};
-static const char* DMA_Command[] =
+static const char *const DMA_Command[] =
{
"DMA%H%A D0,%M,%I",
"DMA%H%A %s,D0,%I",
diff --git a/src/mame/machine/segacrpt.c b/src/mame/machine/segacrpt.c
index 66c682adf94..2d11dbfc216 100644
--- a/src/mame/machine/segacrpt.c
+++ b/src/mame/machine/segacrpt.c
@@ -184,7 +184,7 @@ static void lfkp(int mask)
for (A = 0x0000;A < 0x8000-14;A++)
{
- static char text[] = "INSERT COIN";
+ static const char text[] = "INSERT COIN";
int i;
diff --git a/src/mame/machine/segas32.c b/src/mame/machine/segas32.c
index 0026d3beaac..6f0c38ff86e 100644
--- a/src/mame/machine/segas32.c
+++ b/src/mame/machine/segas32.c
@@ -83,7 +83,7 @@ READ16_HANDLER( ga2_dpram_r )
#if 0 // simulation
READ16_HANDLER(ga2_sprite_protection_r)
{
- static UINT32 prot[16] =
+ static const UINT16 prot[16] =
{
0x0a, 0,
0xc5, 0,
@@ -100,7 +100,7 @@ READ16_HANDLER(ga2_sprite_protection_r)
READ16_HANDLER(ga2_wakeup_protection_r)
{
- static const char *prot =
+ static const char prot[] =
"wake up! GOLDEN AXE The Revenge of Death-Adder! ";
return prot[offset];
}
@@ -310,7 +310,7 @@ WRITE16_HANDLER(arabfgt_protection_w)
READ16_HANDLER(arf_wakeup_protection_r)
{
- static const char *prot =
+ static const char prot[] =
"wake up! ARF! ";
return prot[offset];
}
diff --git a/src/mame/machine/snes.c b/src/mame/machine/snes.c
index 6119ea42f39..e9d25715a71 100644
--- a/src/mame/machine/snes.c
+++ b/src/mame/machine/snes.c
@@ -46,9 +46,9 @@ static UINT16 snes_htmult; /* in 512 wide, we run HTOTAL double and halve it on
// full graphic variables
static UINT16 vram_fgr_high, vram_fgr_increment, vram_fgr_count, vram_fgr_mask, vram_fgr_shift, vram_read_buffer;
-static UINT16 vram_fgr_inctab[4] = { 1, 32, 128, 128 };
-static UINT16 vram_fgr_inccnts[4] = { 0, 32, 64, 128 };
-static UINT16 vram_fgr_shiftab[4] = { 0, 5, 6, 7 };
+static const UINT16 vram_fgr_inctab[4] = { 1, 32, 128, 128 };
+static const UINT16 vram_fgr_inccnts[4] = { 0, 32, 64, 128 };
+static const UINT16 vram_fgr_shiftab[4] = { 0, 5, 6, 7 };
struct snes_cart_info snes_cart = { SNES_MODE_20, 0x40000, 0x40000 };
diff --git a/src/mame/machine/starwars.c b/src/mame/machine/starwars.c
index 97ed1b697e2..0795edc4764 100644
--- a/src/mame/machine/starwars.c
+++ b/src/mame/machine/starwars.c
@@ -17,7 +17,7 @@
#define kYaw 1
#define kThrust 2
-/* Constants for mathbox operations */
+/* Constants for matrix processor operations */
#define NOP 0x00
#define LAC 0x01
#define READ_ACC 0x02
@@ -31,6 +31,7 @@
/* Debugging flag */
#define MATHDEBUG 0
+#define MASTER_CLOCK (12096000)
UINT8 *starwars_mathram;
UINT8 *starwars_ram_overlay;
@@ -49,11 +50,18 @@ static UINT8 *PROM_STR; /* Storage for instruction strobe only */
static UINT8 *PROM_MAS; /* Storage for direct address only */
static UINT8 *PROM_AM; /* Storage for address mode select only */
+static int math_run;
+static emu_timer *math_timer;
/* Local function prototypes */
-static void run_mbox(void);
+static void run_mproc(void);
+static TIMER_CALLBACK( math_run_clear )
+{
+ math_run = 0;
+}
+
/*************************************
*
@@ -122,10 +130,11 @@ READ8_HANDLER( starwars_input_1_r )
{
int x = readinputport(1);
- /* Kludge to enable Starwars Mathbox Self-test */
- /* The mathbox looks like it's running, from this address... :) */
- if (activecpu_get_pc() == 0xf978 || activecpu_get_pc() == 0xf655)
+ /* set the matrix processor flag */
+ if (math_run)
x |= 0x80;
+ else
+ x &= ~0x80;
/* set the AVG done flag */
if (avgdvg_done())
@@ -169,11 +178,11 @@ WRITE8_HANDLER( starwars_adc_select_w )
/*************************************
*
- * Mathbox initialization
+ * Matrix Processor initialization
*
*************************************/
-void swmathbox_init(void)
+void starwars_mproc_init(void)
{
UINT8 *src = memory_region(REGION_USER2);
int cnt, val;
@@ -195,30 +204,33 @@ void swmathbox_init(void)
PROM_MAS[cnt] = val & 0x007f;
PROM_AM[cnt] = (val >> 7) & 0x0001;
}
+
+ math_timer = timer_alloc(math_run_clear, NULL);
}
/*************************************
*
- * Mathbox reset
+ * Matrix Processor reset
*
*************************************/
-void swmathbox_reset(void)
+void starwars_mproc_reset(void)
{
MPA = BIC = 0;
+ math_run = 0;
}
/*************************************
*
- * Mathbox execution
+ * Matrix Processor execution
*
*************************************/
-void run_mbox(void)
+void run_mproc(void)
{
static INT16 A, B, C;
static INT32 ACC;
@@ -229,13 +241,20 @@ void run_mbox(void)
int M_STOP = 100000; /* Limit on number of instructions allowed before halt */
int MA;
int IP15_8, IP7, IP6_0; /* Instruction PROM values */
+ int mptime;
+ logerror("Running Matrix Processor...\n");
- logerror("Running Mathbox...\n");
+ mptime = 0;
+ math_run = 1;
/* loop until finished */
while (M_STOP > 0)
{
+
+ /* each step of the matrix processor takes five clock cycles */
+ mptime += 5;
+
/* fetch the current instruction data */
IP15_8 = PROM_STR[MPA];
IP7 = PROM_AM[MPA];
@@ -341,6 +360,11 @@ void run_mbox(void)
*/
A = (A & 0x8000)? 0xffff: 0;
B = (B & 0x8000)? 0xffff: 0;
+
+ /* The multiply-add holds the main matrix processor counter
+ * for 33 cycles
+ */
+ mptime += 33;
}
/* 0x40 - LDB */
@@ -362,6 +386,8 @@ void run_mbox(void)
M_STOP--; /* Decrease count */
}
+
+ timer_adjust(math_timer, attotime_mul(ATTOTIME_IN_HZ(MASTER_CLOCK), mptime), 1, attotime_zero);
}
@@ -372,7 +398,7 @@ void run_mbox(void)
*
*************************************/
-READ8_HANDLER( swmathbx_prng_r )
+READ8_HANDLER( starwars_prng_r )
{
/*
* The PRNG is a modified 23 bit LFSR. Taps are at 4 and 22 so the
@@ -394,23 +420,23 @@ READ8_HANDLER( swmathbx_prng_r )
/*************************************
*
- * Mathbox divider
+ * Starwars divider
*
*************************************/
-READ8_HANDLER( swmathbx_reh_r )
+READ8_HANDLER( starwars_div_reh_r )
{
return (quotient_shift & 0xff00) >> 8;
}
-READ8_HANDLER( swmathbx_rel_r )
+READ8_HANDLER( starwars_div_rel_r )
{
return quotient_shift & 0x00ff;
}
-WRITE8_HANDLER( swmathbx_w )
+WRITE8_HANDLER( starwars_math_w )
{
int i;
@@ -419,7 +445,7 @@ WRITE8_HANDLER( swmathbx_w )
{
case 0: /* mw0 */
MPA = data << 2; /* Set starting PROM address */
- run_mbox(); /* and run the Mathbox */
+ run_mproc(); /* and run the Matrix Processor */
break;
case 1: /* mw1 */
diff --git a/src/mame/machine/stfight.c b/src/mame/machine/stfight.c
index 92c3c28a9c0..842f530766b 100644
--- a/src/mame/machine/stfight.c
+++ b/src/mame/machine/stfight.c
@@ -170,7 +170,7 @@ WRITE8_HANDLER( stfight_coin_w )
* Machine hardware for MSM5205 ADPCM sound control
*/
-static int sampleLimits[] =
+static const int sampleLimits[] =
{
0x0000, // machine gun fire?
0x1000, // player getting shot
diff --git a/src/mame/machine/stvprot.c b/src/mame/machine/stvprot.c
index 3ac6d603877..d46fc65e662 100644
--- a/src/mame/machine/stvprot.c
+++ b/src/mame/machine/stvprot.c
@@ -116,7 +116,7 @@ Wrong vectors (at least not where I tested it):
0x060427FC (1st) (resets the sh2)
0x0603B1B2 (1st) (crashes the sh2)
*/
-static UINT32 vector_prot[] = { 0x0603B1B2,0x234 };
+static const UINT32 vector_prot[] = { 0x0603B1B2,0x234 };
static READ32_HANDLER( a_bus_ctrl_r )
{
diff --git a/src/mame/machine/system16.c b/src/mame/machine/system16.c
index d4d315bda77..a457640fdfa 100644
--- a/src/mame/machine/system16.c
+++ b/src/mame/machine/system16.c
@@ -59,7 +59,7 @@ static void sound_cause_nmi( int chip ){
}
-struct upd7759_interface sys16_upd7759_interface =
+const struct upd7759_interface sys16_upd7759_interface =
{
0, /* memory region 3 contains the sample data */
sound_cause_nmi
diff --git a/src/mame/machine/twincobr.c b/src/mame/machine/twincobr.c
index 2fded5e44b3..50c45396e44 100644
--- a/src/mame/machine/twincobr.c
+++ b/src/mame/machine/twincobr.c
@@ -24,7 +24,7 @@ static int dsp_execute;
static UINT32 dsp_addr_w, main_ram_seg;
#if LOG_DSP_CALLS
-const static int toaplan_port_type[2] = { 0x7800c, 0x5c };
+static const int toaplan_port_type[2] = { 0x7800c, 0x5c };
#endif
UINT8 *twincobr_sharedram;
diff --git a/src/mame/machine/vertigo.c b/src/mame/machine/vertigo.c
index 0b8b3f3a225..2ec573bbf58 100644
--- a/src/mame/machine/vertigo.c
+++ b/src/mame/machine/vertigo.c
@@ -39,7 +39,7 @@ static UINT8 irq_state;
static UINT8 adc_result;
/* 8254 timer config */
-static struct pit8253_config pit8254_config =
+static const struct pit8253_config pit8254_config =
{
TYPE8254,
{
@@ -59,7 +59,7 @@ static struct pit8253_config pit8254_config =
}
};
-static struct TTL74148_interface irq_encoder =
+static const struct TTL74148_interface irq_encoder =
{
update_irq
};
diff --git a/src/mame/machine/volfied.c b/src/mame/machine/volfied.c
index d8b9ffe61d6..95d93a9c463 100644
--- a/src/mame/machine/volfied.c
+++ b/src/mame/machine/volfied.c
@@ -260,7 +260,7 @@ static const UINT16 palette_data_11[0x50] =
0xce39, 0x1c02, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
};
-static const UINT16* palette_data_lookup[] =
+static const UINT16 *const palette_data_lookup[] =
{
0,
palette_data_01,
diff --git a/src/mame/machine/vsnes.c b/src/mame/machine/vsnes.c
index fbcdd2b03fa..13bfddc5dfd 100644
--- a/src/mame/machine/vsnes.c
+++ b/src/mame/machine/vsnes.c
@@ -16,7 +16,7 @@ static int vsnes_do_vrom_bank;
/* Locals */
static int input_latch[4];
-static UINT8 *remapped_colortable;
+static const UINT8 *remapped_colortable;
static int sound_fix=0;
/*************************************
@@ -27,7 +27,7 @@ static int sound_fix=0;
/* RP2C04-001 */
/* check 0x08 */
-static UINT8 rp2c04001_colortable[] =
+static const UINT8 rp2c04001_colortable[] =
{
0x35, 0xff, 0x16, 0x22, 0x1c, 0xff, 0xff, 0x15, /* 0x00 - 0x07 */
0x20, 0x00, 0x27, 0x05, 0x04, 0x27, 0x08, 0x30, /* 0x08 - 0x0f */
@@ -41,7 +41,7 @@ static UINT8 rp2c04001_colortable[] =
/* RP2C04-002 */
/* 0x04, 0x24 */
-static UINT8 rp2c04002_colortable[] =
+static const UINT8 rp2c04002_colortable[] =
{
0xff, 0x27, 0x18, 0xff, 0x3a, 0x25, 0x2b, 0x31, /* 0x00 - 0x07 */
0x15, 0x13, 0x38, 0x34, 0x20, 0x23, 0xff, 0x0b, /* 0x08 - 0x0f */
@@ -55,7 +55,7 @@ static UINT8 rp2c04002_colortable[] =
/* RP2C04-003 */
/* check 0x0f, 0x2e, 0x34 */
-static UINT8 rp2c04003_colortable[] =
+static const UINT8 rp2c04003_colortable[] =
{
0xff, 0xff, 0xff, 0x10, 0x1a, 0x30, 0x31, 0x09, /* 0x00 - 0x07 */
0x01, 0x0f, 0x36, 0x08, 0x15, 0xff, 0xff, 0x30, /* 0x08 - 0x0f */
@@ -69,7 +69,7 @@ static UINT8 rp2c04003_colortable[] =
/* RP2C05-004 */
/* check 0x03 0x1d, 0x38, 0x3b*/
-static UINT8 rp2c05004_colortable[] =
+static const UINT8 rp2c05004_colortable[] =
{
0x18, 0xff, 0x1c, 0x89, 0xff, 0xff, 0x01, 0x17, /* 0x00 - 0x07 */
0x10, 0x0f, 0x2a, 0xff, 0x36, 0x37, 0x1a, 0xff, /* 0x08 - 0x0f */
@@ -1075,7 +1075,7 @@ DRIVER_INIT( supxevs )
static READ8_HANDLER( tko_security_r )
{
static int security_counter;
- static UINT8 security_data[] = {
+ static const UINT8 security_data[] = {
0xff, 0xbf, 0xb7, 0x97, 0x97, 0x17, 0x57, 0x4f,
0x6f, 0x6b, 0xeb, 0xa9, 0xb1, 0x90, 0x94, 0x14,
0x56, 0x4e, 0x6f, 0x6b, 0xeb, 0xa9, 0xb1, 0x90,
diff --git a/src/mame/mamedriv.c b/src/mame/mamedriv.c
index 05a4f754825..7d2854cddc7 100644
--- a/src/mame/mamedriv.c
+++ b/src/mame/mamedriv.c
@@ -565,6 +565,7 @@ const game_driver * const drivers[] =
DRIVER( popflamn ) /* (c) 1982 Jaleco */
DRIVER( trvmstr ) /* (c) 1985 Enerdyne Technologies Inc. */
DRIVER( trvmstra ) /* (c) 1985 Enerdyne Technologies Inc. */
+ DRIVER( trvmstrb ) /* (c) 1985 Enerdyne Technologies Inc. */
DRIVER( trvgns ) /* (c) 198? Enerdyne Technologies Inc. */
@@ -2820,6 +2821,7 @@ V-V TP-027
DRIVER( tekken3b ) /* Tekken 3 (TET3/VER.A) */
DRIVER( tekken3c ) /* Tekken 3 (TET2/VER.A) */
DRIVER( lbgrande ) /* Libero Grande (LG2/VER.A) */
+ DRIVER( toukon3 ) /* Shin Nihon Pro Wrestling Toukon Retsuden 3 Arcade Edition (TR1/VER.A) */
DRIVER( soulclbr ) /* Soul Calibur (SOC14/VER.C) */
DRIVER( soulclba ) /* Soul Calibur (SOC11/VER.C) */
DRIVER( soulclbb ) /* Soul Calibur (SOC13/VER.B) */
@@ -2827,7 +2829,9 @@ V-V TP-027
DRIVER( soulclbd ) /* Soul Calibur (SOC11/VER.A2) */
DRIVER( ehrgeiz ) /* Ehrgeiz (EG3/VER.A) */
DRIVER( ehrgeiza ) /* Ehrgeiz (EG2/VER.A) */
+ DRIVER( kaiunqz ) /* Kaiun Quiz (KW1/VER.A) */
DRIVER( mdhorse ) /* Derby Quiz My Dream Horse (MDH1/VER.A2) */
+ DRIVER( sws98 ) /* Super World Stadium '98 (SS81/VER.A) */
DRIVER( tenkomor ) /* Tenkomori Shooting (TKM2/VER.A1) */
DRIVER( tenkomoj ) /* Tenkomori Shooting (TKM1/VER.A1) */
DRIVER( fgtlayer ) /* Fighting Layer (FTL0/VER.A) */
@@ -2845,6 +2849,8 @@ V-V TP-027
DRIVER( pacappsp ) /* Paca Paca Passion Special (PSP1/VER.A) */
DRIVER( golgo13 ) /* Golgo 13 (GLG1/VER.A) */
DRIVER( g13knd ) /* Golgo 13 Kiseki no Dandou (GLS1/VER.A) */
+ DRIVER( sws2000 ) /* Super World Stadium 2000 (SS01/VER.A) */
+ DRIVER( sws2001 ) /* Super World Stadium 2001 (SS11/VER.A) */
/* Namco System 10 */
DRIVER( mrdrilr2 ) /* Mr Driller 2 (DR21 Ver.A) */
diff --git a/src/mame/video/20pacgal.c b/src/mame/video/20pacgal.c
index 230762173a9..ff2a8b4377b 100644
--- a/src/mame/video/20pacgal.c
+++ b/src/mame/video/20pacgal.c
@@ -108,7 +108,7 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
for (offs = 0x80-2;offs >= 0;offs-=2)
{
- static int gfx_offs[2][2] =
+ static const int gfx_offs[2][2] =
{
{ 0, 1 },
{ 2, 3 }
diff --git a/src/mame/video/atari.c b/src/mame/video/atari.c
index 9f35c763909..5e372abf145 100644
--- a/src/mame/video/atari.c
+++ b/src/mame/video/atari.c
@@ -460,10 +460,10 @@ static void prio_init(void)
************************************************************************/
static void cclk_init(void)
{
- static UINT8 _pf_21[4] = {T00,T01,T10,T11};
- static UINT8 _pf_1b[4] = {G00,G01,G10,G11};
- static UINT8 _pf_210b[4] = {PBK,PF0,PF1,PF2};
- static UINT8 _pf_310b[4] = {PBK,PF0,PF1,PF3};
+ static const UINT8 _pf_21[4] = {T00,T01,T10,T11};
+ static const UINT8 _pf_1b[4] = {G00,G01,G10,G11};
+ static const UINT8 _pf_210b[4] = {PBK,PF0,PF1,PF2};
+ static const UINT8 _pf_310b[4] = {PBK,PF0,PF1,PF3};
int i;
UINT8 * dst;
@@ -1088,7 +1088,7 @@ static TIMER_CALLBACK( antic_issue_dli )
}
-static renderer_function renderer[2][19][5] = {
+static const renderer_function renderer[2][19][5] = {
/* no playfield narrow normal wide */
{
{antic_mode_0_xx,antic_mode_0_xx,antic_mode_0_xx,antic_mode_0_xx},
diff --git a/src/mame/video/avgdvg.c b/src/mame/video/avgdvg.c
index 30fcfacce94..df6d96783bb 100644
--- a/src/mame/video/avgdvg.c
+++ b/src/mame/video/avgdvg.c
@@ -130,7 +130,7 @@ static emu_timer *vg_run_timer, *vg_halt_timer;
static int flip_x, flip_y;
static vgdata vgd, *vg;
-static vgconf *vgc;
+static const vgconf *vgc;
static int nvect;
static vgvector vectbuf[MAXVECT];
@@ -1274,7 +1274,7 @@ MACHINE_RESET( avgdvg )
*
*************************************/
-static vgconf dvg_default =
+static const vgconf dvg_default =
{
{
dvg_dmapush,
@@ -1292,7 +1292,7 @@ static vgconf dvg_default =
dvg_vgrst
};
-static vgconf avg_default =
+static const vgconf avg_default =
{
{
avg_latch0,
@@ -1310,7 +1310,7 @@ static vgconf avg_default =
avg_vgrst
};
-static vgconf avg_mhavoc =
+static const vgconf avg_mhavoc =
{
{
avg_latch0,
@@ -1328,7 +1328,7 @@ static vgconf avg_mhavoc =
mhavoc_vgrst
};
-static vgconf avg_starwars =
+static const vgconf avg_starwars =
{
{
avg_latch0,
@@ -1346,7 +1346,7 @@ static vgconf avg_starwars =
avg_vgrst
};
-static vgconf avg_tempest =
+static const vgconf avg_tempest =
{
{
avg_latch0,
@@ -1364,7 +1364,7 @@ static vgconf avg_tempest =
avg_vgrst
};
-static vgconf avg_bzone =
+static const vgconf avg_bzone =
{
{
avg_latch0,
@@ -1382,7 +1382,7 @@ static vgconf avg_bzone =
avg_vgrst
};
-static vgconf avg_quantum =
+static const vgconf avg_quantum =
{
{
quantum_st2st3,
diff --git a/src/mame/video/blktiger.c b/src/mame/video/blktiger.c
index e9f672a2ad5..8f17dbbc202 100644
--- a/src/mame/video/blktiger.c
+++ b/src/mame/video/blktiger.c
@@ -35,7 +35,7 @@ static TILE_GET_INFO( get_bg_tile_info )
{
/* the tile priority table is a guess compiled by looking at the game. It
was not derived from a PROM so it could be wrong. */
- static int split_table[16] =
+ static const int split_table[16] =
{
3,0,2,2, /* the fourth could be 1 instead of 2 */
0,1,0,0,
diff --git a/src/mame/video/bwing.c b/src/mame/video/bwing.c
index 38fe4fdf19f..10e7bd52828 100644
--- a/src/mame/video/bwing.c
+++ b/src/mame/video/bwing.c
@@ -48,7 +48,7 @@ static void fill_srxlat(int *xlat)
//****************************************************************************
// Exports
-gfx_layout bwing_tilelayout =
+const gfx_layout bwing_tilelayout =
{
16, 16,
BW_NTILES,
diff --git a/src/mame/video/capbowl.c b/src/mame/video/capbowl.c
index 54b93f0d19e..4647c7b383e 100644
--- a/src/mame/video/capbowl.c
+++ b/src/mame/video/capbowl.c
@@ -26,7 +26,7 @@ static void generate_interrupt(int state)
cpunum_set_input_line(0, M6809_FIRQ_LINE, state);
}
-static struct tms34061_interface tms34061intf =
+static const struct tms34061_interface tms34061intf =
{
0, /* the screen we are acting on */
8, /* VRAM address is (row << rowshift) | col */
diff --git a/src/mame/video/cps1.c b/src/mame/video/cps1.c
index bb2b0d15813..2ffa1fa87a2 100644
--- a/src/mame/video/cps1.c
+++ b/src/mame/video/cps1.c
@@ -407,6 +407,7 @@ static const struct CPS1config cps1_config_table[]=
{"xmcotah", NOBATTRY, 4,4,4, 0x0000,0xffff,0x0000,0xffff, 8 },
{"xmcotaj", NOBATTRY, 4,4,4, 0x0000,0xffff,0x0000,0xffff, 8 },
{"xmcotaj1",NOBATTRY, 4,4,4, 0x0000,0xffff,0x0000,0xffff, 8 },
+ {"xmcotaj2",NOBATTRY, 4,4,4, 0x0000,0xffff,0x0000,0xffff, 8 },
{"xmcotajr",NOBATTRY, 4,4,4, 0x0000,0xffff,0x0000,0xffff, 8 },
{"xmcotaa", NOBATTRY, 4,4,4, 0x0000,0xffff,0x0000,0xffff, 8 },
{"hsf2", NOBATTRY, 4,4,0, 0x0000,0xffff,0x0000,0xffff, 9 },
diff --git a/src/mame/video/cvs.c b/src/mame/video/cvs.c
index e1b5e2cfdd7..0f28b1b47b9 100644
--- a/src/mame/video/cvs.c
+++ b/src/mame/video/cvs.c
@@ -55,7 +55,7 @@ static mame_bitmap *scrolled_background;
int cvs_collision_register=0;
-static int ModeOffset[4] = {223,191,255,127};
+static const int ModeOffset[4] = {223,191,255,127};
/******************************************************
* Convert Colour prom to format for Mame Colour Map *
diff --git a/src/mame/video/ddrible.c b/src/mame/video/ddrible.c
index b844e6212eb..acc6588505b 100644
--- a/src/mame/video/ddrible.c
+++ b/src/mame/video/ddrible.c
@@ -199,8 +199,8 @@ static void draw_sprites(running_machine* machine, mame_bitmap *bitmap, const re
}
{
- static int x_offset[2] = { 0x00, 0x01 };
- static int y_offset[2] = { 0x00, 0x02 };
+ static const int x_offset[2] = { 0x00, 0x01 };
+ static const int y_offset[2] = { 0x00, 0x02 };
int x,y, ex, ey;
for( y=0; y < height; y++ ){
diff --git a/src/mame/video/digdug.c b/src/mame/video/digdug.c
index 59b8db0cbac..cb9397c7482 100644
--- a/src/mame/video/digdug.c
+++ b/src/mame/video/digdug.c
@@ -260,7 +260,7 @@ static void draw_sprites(running_machine* machine, mame_bitmap *bitmap, const re
for (offs = 0;offs < 0x80;offs += 2)
{
- static int gfx_offs[2][2] =
+ static const int gfx_offs[2][2] =
{
{ 0, 1 },
{ 2, 3 }
diff --git a/src/mame/video/djmain.c b/src/mame/video/djmain.c
index 93fd8bf08b3..90e681289b9 100644
--- a/src/mame/video/djmain.c
+++ b/src/mame/video/djmain.c
@@ -37,9 +37,9 @@ static void draw_sprites(running_machine* machine, mame_bitmap *bitmap, const re
for (pri_code = NUM_SPRITES - 1; pri_code >= 0; pri_code--)
{
- static int xoffset[8] = { 0, 1, 4, 5, 16, 17, 20, 21 };
- static int yoffset[8] = { 0, 2, 8, 10, 32, 34, 40, 42 };
- static int sizetab[4] = { 1, 2, 4, 8 };
+ static const int xoffset[8] = { 0, 1, 4, 5, 16, 17, 20, 21 };
+ static const int yoffset[8] = { 0, 2, 8, 10, 32, 34, 40, 42 };
+ static const int sizetab[4] = { 1, 2, 4, 8 };
int x, y;
int ox, oy;
int flipx, flipy;
diff --git a/src/mame/video/gaelco.c b/src/mame/video/gaelco.c
index 34802995472..7cbab3d9b5c 100644
--- a/src/mame/video/gaelco.c
+++ b/src/mame/video/gaelco.c
@@ -128,8 +128,8 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
int i, x, y, ex, ey;
const gfx_element *gfx = machine->gfx[0];
- static int x_offset[2] = {0x0,0x2};
- static int y_offset[2] = {0x0,0x1};
+ static const int x_offset[2] = {0x0,0x2};
+ static const int y_offset[2] = {0x0,0x1};
for (i = 0x800 - 4 - 1; i >= 3; i -= 4){
int sx = gaelco_spriteram[i+2] & 0x01ff;
diff --git a/src/mame/video/gaelco2.c b/src/mame/video/gaelco2.c
index fb74193927c..ffacd698c7a 100644
--- a/src/mame/video/gaelco2.c
+++ b/src/mame/video/gaelco2.c
@@ -217,7 +217,7 @@ WRITE16_HANDLER( gaelco2_vram_w )
#define ADJUST_COLOR(c) ((c < 0) ? 0 : ((c > 255) ? 255 : c))
/* table used for color adjustment */
-static int pen_color_adjust[16] = {
+static const int pen_color_adjust[16] = {
+RGB_CHG*0, -RGB_CHG*1, -RGB_CHG*2, -RGB_CHG*3, -RGB_CHG*4, -RGB_CHG*5, -RGB_CHG*6, -RGB_CHG*7,
+RGB_CHG*8, +RGB_CHG*7, +RGB_CHG*6, +RGB_CHG*5, +RGB_CHG*4, +RGB_CHG*3, +RGB_CHG*2, +RGB_CHG*1
};
diff --git a/src/mame/video/galaga.c b/src/mame/video/galaga.c
index 57747b71d97..03c35176b24 100644
--- a/src/mame/video/galaga.c
+++ b/src/mame/video/galaga.c
@@ -40,7 +40,7 @@ There are 63 stars in each set, 126 displayed at any one time
*/
-struct star star_seed_tab[252]=
+const struct star star_seed_tab[252]=
{
/* also shared by Bosconian */
@@ -501,7 +501,7 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
for (offs = 0;offs < 0x80;offs += 2)
{
- static int gfx_offs[2][2] =
+ static const int gfx_offs[2][2] =
{
{ 0, 1 },
{ 2, 3 }
diff --git a/src/mame/video/gaplus.c b/src/mame/video/gaplus.c
index 1d61d0fd858..ab60b7b1306 100644
--- a/src/mame/video/gaplus.c
+++ b/src/mame/video/gaplus.c
@@ -275,7 +275,7 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
/* is it on? */
if ((spriteram_3[offs+1] & 2) == 0)
{
- static int gfx_offs[2][2] =
+ static const int gfx_offs[2][2] =
{
{ 0, 1 },
{ 2, 3 }
diff --git a/src/mame/video/gladiatr.c b/src/mame/video/gladiatr.c
index 410349750be..80b962885d4 100644
--- a/src/mame/video/gladiatr.c
+++ b/src/mame/video/gladiatr.c
@@ -204,7 +204,7 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
for (offs = 0;offs < 0x80;offs += 2)
{
- static int tile_offset[2][2] =
+ static const int tile_offset[2][2] =
{
{0x0,0x1},
{0x2,0x3},
diff --git a/src/mame/video/gradius3.c b/src/mame/video/gradius3.c
index 3321068698c..14b75ecfc1f 100644
--- a/src/mame/video/gradius3.c
+++ b/src/mame/video/gradius3.c
@@ -39,7 +39,7 @@ static void gradius3_sprite_callback(int *code,int *color,int *priority_mask,int
#define L0 0xaa
#define L1 0xcc
#define L2 0xf0
- static int primask[2][4] =
+ static const int primask[2][4] =
{
{ L0|L2, L0, L0|L2, L0|L1|L2 },
{ L1|L2, L2, 0, L0|L1|L2 }
diff --git a/src/mame/video/gtia.c b/src/mame/video/gtia.c
index 1ac255bd66c..9fd51d01804 100644
--- a/src/mame/video/gtia.c
+++ b/src/mame/video/gtia.c
@@ -932,7 +932,7 @@ static void render_##player##_w4(UINT8 *dst) \
dst[31] |= color; \
} \
} \
-static void (*render_##player[4])(UINT8 *dst)={ \
+static void (*const render_##player[4])(UINT8 *dst)={ \
render_##player##_w1, \
render_##player##_w2, \
render_##player##_w2, \
@@ -977,7 +977,7 @@ static void render_##missile##_w4(UINT8 *dst) \
dst[ 7] |= color; \
} \
} \
-static void (*render_##missile[4])(UINT8 *dst) = { \
+static void (*const render_##missile[4])(UINT8 *dst) = { \
render_##missile##_w1, \
render_##missile##_w2, \
render_##missile##_w2, \
diff --git a/src/mame/video/homedata.c b/src/mame/video/homedata.c
index 9eaa5519684..5028bd975d1 100644
--- a/src/mame/video/homedata.c
+++ b/src/mame/video/homedata.c
@@ -716,11 +716,12 @@ VIDEO_UPDATE( mrokumei )
tilemap_draw(bitmap, cliprect, bg_tilemap[homedata_visible_page][1], 0, 0);
return 0;
}
-/*
+
+#ifdef UNUSED_FUNCTION
VIDEO_UPDATE( reikaids )
{
int flags;
- static int pritable[8][4] =
+ static const int pritable[8][4] =
{
{ 3,1,0,2 },
{ 1,3,0,2 },
@@ -749,12 +750,12 @@ VIDEO_UPDATE( reikaids )
tilemap_draw(bitmap, cliprect, bg_tilemap[homedata_visible_page][pritable[pri][3-i]], 0, 0);
return 0;
}
+#endif
-*/
VIDEO_UPDATE( reikaids )
{
int flags;
- static int pritable[2][8][4] = /* table of priorities derived from the PROM */
+ static const int pritable[2][8][4] = /* table of priorities derived from the PROM */
{
{
{ 3,1,0,2 },
diff --git a/src/mame/video/itech8.c b/src/mame/video/itech8.c
index e202867e59c..8c76da3721a 100644
--- a/src/mame/video/itech8.c
+++ b/src/mame/video/itech8.c
@@ -170,7 +170,7 @@ static void generate_interrupt(int state)
}
-static struct tms34061_interface tms34061intf =
+static const struct tms34061_interface tms34061intf =
{
0, /* the screen we are acting on */
8, /* VRAM address is (row << rowshift) | col */
diff --git a/src/mame/video/jagobj.c b/src/mame/video/jagobj.c
index 56facd66336..f481eb2d42d 100644
--- a/src/mame/video/jagobj.c
+++ b/src/mame/video/jagobj.c
@@ -222,7 +222,7 @@ static void bitmap_4_7(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos)
bitmap_4_draw(firstpix, iwidth, src, xpos, 7, -1);
}
-static void (*bitmap4[8])(INT32, INT32, UINT32 *, INT32) =
+static void (*const bitmap4[8])(INT32, INT32, UINT32 *, INT32) =
{
bitmap_4_0,
bitmap_4_1,
@@ -352,7 +352,7 @@ static void bitmap_8_7(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos)
bitmap_8_draw(firstpix, iwidth, src, xpos, 7, -1);
}
-static void (*bitmap8[8])(INT32, INT32, UINT32 *, INT32) =
+static void (*const bitmap8[8])(INT32, INT32, UINT32 *, INT32) =
{
bitmap_8_0,
bitmap_8_1,
@@ -459,7 +459,7 @@ static void bitmap_16_7(INT32 firstpix, INT32 iwidth, UINT32 *src, INT32 xpos)
bitmap_16_draw(firstpix, iwidth, src, xpos, 7, -1);
}
-static void (*bitmap16[8])(INT32, INT32, UINT32 *, INT32) =
+static void (*const bitmap16[8])(INT32, INT32, UINT32 *, INT32) =
{
bitmap_16_0,
bitmap_16_1,
diff --git a/src/mame/video/konamiic.c b/src/mame/video/konamiic.c
index af766f192ba..8fd2037bd19 100644
--- a/src/mame/video/konamiic.c
+++ b/src/mame/video/konamiic.c
@@ -1353,8 +1353,8 @@ if (input_code_pressed(KEYCODE_D))
int yflip = source[offs[4]] & 0x20; /* flip y */
int color = base_color + ((source[offs[1]] & 0xf0) >> 4);
int width,height;
- static int x_offset[4] = {0x0,0x1,0x4,0x5};
- static int y_offset[4] = {0x0,0x2,0x8,0xa};
+ static const int x_offset[4] = {0x0,0x1,0x4,0x5};
+ static const int y_offset[4] = {0x0,0x2,0x8,0xa};
int x,y, ex, ey;
if (attr & 0x01) sx -= 256;
@@ -1730,8 +1730,8 @@ void K007420_sprites_draw(mame_bitmap *bitmap,const rectangle *cliprect)
for (offs = K007420_SPRITERAM_SIZE - 8; offs >= 0; offs -= 8)
{
int ox,oy,code,color,flipx,flipy,zoom,w,h,x,y,bank;
- static int xoffset[4] = { 0, 1, 4, 5 };
- static int yoffset[4] = { 0, 2, 8, 10 };
+ static const int xoffset[4] = { 0, 1, 4, 5 };
+ static const int yoffset[4] = { 0, 2, 8, 10 };
code = K007420_ram[offs+1];
color = K007420_ram[offs+2];
@@ -2682,10 +2682,10 @@ void K051960_sprites_draw(mame_bitmap *bitmap,const rectangle *cliprect,int min_
40 41 44 45 56 57 60 61
42 43 46 47 58 59 62 63
*/
- static int xoffset[8] = { 0, 1, 4, 5, 16, 17, 20, 21 };
- static int yoffset[8] = { 0, 2, 8, 10, 32, 34, 40, 42 };
- static int width[8] = { 1, 2, 1, 2, 4, 2, 4, 8 };
- static int height[8] = { 1, 1, 2, 2, 2, 4, 4, 8 };
+ static const int xoffset[8] = { 0, 1, 4, 5, 16, 17, 20, 21 };
+ static const int yoffset[8] = { 0, 2, 8, 10, 32, 34, 40, 42 };
+ static const int width[8] = { 1, 2, 1, 2, 4, 2, 4, 8 };
+ static const int height[8] = { 1, 1, 2, 2, 2, 4, 4, 8 };
offs = sortedlist[pri_code];
@@ -4153,8 +4153,8 @@ void K053247_sprites_draw(running_machine *machine, mame_bitmap *bitmap,const re
40 41 44 45 56 57 60 61
42 43 46 47 58 59 62 63
*/
- static int xoffset[8] = { 0, 1, 4, 5, 16, 17, 20, 21 };
- static int yoffset[8] = { 0, 2, 8, 10, 32, 34, 40, 42 };
+ static const int xoffset[8] = { 0, 1, 4, 5, 16, 17, 20, 21 };
+ static const int yoffset[8] = { 0, 2, 8, 10, 32, 34, 40, 42 };
int sortedlist[NUM_SPRITES];
int offs,zcode;
@@ -4551,7 +4551,7 @@ static void K051316_vh_start(running_machine *machine,int chip, int gfx_memory_r
void (*callback)(int *code,int *color,int *flags))
{
int gfx_index;
- static tile_get_info_callback get_tile_info[3] = { K051316_get_tile_info0,K051316_get_tile_info1,K051316_get_tile_info2 };
+ static const tile_get_info_callback get_tile_info[3] = { K051316_get_tile_info0,K051316_get_tile_info1,K051316_get_tile_info2 };
/* find first empty slot to decode gfx */
for (gfx_index = 0; gfx_index < MAX_GFX_ELEMENTS; gfx_index++)
@@ -5421,13 +5421,13 @@ static void (*K056832_callback)(int layer, int *code, int *color, int *flags);
INLINE void K056832_get_tile_info( running_machine *machine, tile_data *tileinfo, int tile_index, int pageIndex )
{
- static struct K056832_SHIFTMASKS
+ static const struct K056832_SHIFTMASKS
{
int flips, palm1, pals2, palm2;
}
K056832_shiftmasks[4] = {{6,0x3f,0,0x00},{4,0x0f,2,0x30},{2,0x03,2,0x3c},{0,0x00,2,0x3f}};
- struct K056832_SHIFTMASKS *smptr;
+ const struct K056832_SHIFTMASKS *smptr;
int layer, flip, fbits, attr, code, color, flags;
UINT16 *pMem;
@@ -7101,7 +7101,7 @@ void K055555_vh_start(void)
void K055555_write_reg(UINT8 regnum, UINT8 regdat)
{
#if VERBOSE
- static const char *rnames[46] =
+ static const char *const rnames[46] =
{
"BGC CBLK", "BGC SET", "COLSET0", "COLSET1", "COLSET2", "COLSET3", "COLCHG ON",
"A PRI 0", "A PRI 1", "A COLPRI", "B PRI 0", "B PRI 1", "B COLPRI", "C PRI", "D PRI",
diff --git a/src/mame/video/liberatr.c b/src/mame/video/liberatr.c
index 8dbe752addb..5f796d2d30f 100644
--- a/src/mame/video/liberatr.c
+++ b/src/mame/video/liberatr.c
@@ -289,7 +289,7 @@ static void get_pens(pen_t *pens)
/* handle the hardware flip of the bit order from 765 to 576 that
hardware does between vram and color ram */
- static offs_t penmap[] = { 0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08,
+ static const offs_t penmap[] = { 0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08,
0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00,
0x10, 0x12, 0x14, 0x16, 0x11, 0x13, 0x15, 0x17 };
diff --git a/src/mame/video/lordgun.c b/src/mame/video/lordgun.c
index 28e59356418..46b489433ea 100644
--- a/src/mame/video/lordgun.c
+++ b/src/mame/video/lordgun.c
@@ -156,7 +156,7 @@ VIDEO_START( lordgun )
***************************************************************************/
-static int lordgun_gun_x_table[] =
+static const int lordgun_gun_x_table[] =
{
-100, 0x001,0x001,0x002,0x002,0x003,0x003,0x004,0x005,0x006,0x007,0x008,0x009,0x00A,0x00B,0x00C,
0x00D,0x00E,0x00F,0x010,0x011,0x012,0x013,0x014,0x015,0x016,0x017,0x018,0x019,0x01A,0x01B,0x01C,
diff --git a/src/mame/video/midtunit.c b/src/mame/video/midtunit.c
index f7f4e841877..dd7966d6f11 100644
--- a/src/mame/video/midtunit.c
+++ b/src/mame/video/midtunit.c
@@ -556,7 +556,7 @@ DMA_DRAW_FUNC(prefix##_c0c1_xf, bpp, extract, XFLIP_YES, skip, scale, PIXEL_COLO
DMA_DRAW_FUNC(prefix##_c0p1_xf, bpp, extract, XFLIP_YES, skip, scale, PIXEL_COLOR, PIXEL_COPY) \
DMA_DRAW_FUNC(prefix##_p0c1_xf, bpp, extract, XFLIP_YES, skip, scale, PIXEL_COPY, PIXEL_COLOR) \
\
-static dma_draw_func prefix[32] = \
+static const dma_draw_func prefix[32] = \
{ \
/* B0:N / B1:N B0:Y / B1:N B0:N / B1:Y B0:Y / B1:Y */ \
dma_draw_none, prefix##_p0, prefix##_p1, prefix##_p0p1, /* no color */ \
diff --git a/src/mame/video/midyunit.c b/src/mame/video/midyunit.c
index d5db9fa473e..80e6eea942c 100644
--- a/src/mame/video/midyunit.c
+++ b/src/mame/video/midyunit.c
@@ -394,7 +394,7 @@ DMA_DRAW_FUNC(prefix##_c0c1_xf, XFLIP_YES, PIXEL_COLOR, PIXEL_COLOR) \
DMA_DRAW_FUNC(prefix##_c0p1_xf, XFLIP_YES, PIXEL_COLOR, PIXEL_COPY) \
DMA_DRAW_FUNC(prefix##_p0c1_xf, XFLIP_YES, PIXEL_COPY, PIXEL_COLOR) \
\
-static dma_draw_func prefix[32] = \
+static const dma_draw_func prefix[32] = \
{ \
/* B0:N / B1:N B0:Y / B1:N B0:N / B1:Y B0:Y / B1:Y */ \
dma_draw_none, prefix##_p0, prefix##_p1, prefix##_p0p1, /* no color */ \
diff --git a/src/mame/video/midzeus.c b/src/mame/video/midzeus.c
index 794779f2999..7233cab913a 100644
--- a/src/mame/video/midzeus.c
+++ b/src/mame/video/midzeus.c
@@ -8,6 +8,7 @@
#include "eminline.h"
#include "includes/midzeus.h"
#include "video/poly.h"
+#include "video/rgbutil.h"
@@ -33,6 +34,8 @@ struct _poly_extra_data
{
const UINT64 * palbase;
const UINT64 * texbase;
+ UINT16 solidcolor;
+ INT16 zoffset;
UINT16 transcolor;
UINT16 texwidth;
UINT16 color;
@@ -50,18 +53,19 @@ struct _poly_extra_data
UINT32 *zeusbase;
static poly_manager *poly;
+static UINT8 log_fifo;
-static UINT32 zeuscmd_buffer[20];
-static UINT8 zeuscmd_buffer_words;
-static UINT8 zeuscmd_buffer_expected_words;
+static UINT32 zeus_fifo[20];
+static UINT8 zeus_fifo_words;
static INT16 zeus_matrix[3][3];
+static INT16 zeus_matrix2[3][3];
+static UINT8 zeus_usematrix2;
static INT32 zeus_point[3];
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 rectangle zeus_cliprect;
static UINT64 *waveram[2];
@@ -82,11 +86,22 @@ static UINT8 single_step_advance;
static void exit_handler(running_machine *machine);
-static void zeus_write_16bit(offs_t offset, UINT16 data, int logit);
-static void zeus_write_32bit(offs_t offset, UINT32 data, int logit);
-static void zeus_process_write(offs_t offset);
-static void zeuscmd_execute(int words);
-static UINT8 zeuscmd_length(UINT32 word);
+static void zeus_pointer_w(UINT32 which, UINT32 data, int logit);
+static void zeus_register16_w(offs_t offset, UINT16 data, int logit);
+static void zeus_register32_w(offs_t offset, UINT32 data, int logit);
+static void zeus_register_update(offs_t offset);
+static int zeus_fifo_process(const UINT32 *data, int numwords);
+static void zeus_draw_model(UINT32 texdata, int logit);
+static void zeus_draw_quad(const UINT32 *databuffer, UINT32 texdata, int logit);
+
+static void render_poly_4bit(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid);
+static void render_poly_8bit(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid);
+static void render_poly_shade(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid);
+static void render_poly_solid(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid);
+static void render_poly_solid_fixedz(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid);
+
+static void log_fifo_command(const UINT32 *data, int numwords, const char *suffix);
+static void log_waveram(UINT32 length_and_base);
@@ -110,7 +125,7 @@ INLINE UINT64 *waveram_ptr_from_expanded_addr(UINT8 bank, UINT32 addr)
INLINE UINT64 *waveram_ptr_from_texture_addr(UINT8 bank, UINT32 addr, int width)
{
- return &waveram[bank][(addr * width) / 8];
+ return &waveram[bank][((addr & ~1) * width) / 8];
}
@@ -160,10 +175,21 @@ INLINE void waveram_plot_check_depth(int y, int x, UINT16 color, UINT16 depth)
}
+INLINE void waveram_plot_check_depth_nowrite(int y, int x, UINT16 color, UINT16 depth)
+{
+ if (x >= 0 && x < 400 && y >= 0 && y < 256)
+ {
+ UINT16 *depthptr;
+ UINT16 *ptr = waveram_pixel_ptr(zeus_renderbase, y, x, &depthptr);
+ if (depth <= *depthptr)
+ *ptr = color;
+ }
+}
+
+
INLINE UINT8 get_texel_8bit(const UINT64 *base, int y, int x, int width)
{
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;
}
@@ -172,7 +198,6 @@ INLINE UINT8 get_texel_8bit(const UINT64 *base, int y, int x, int width)
INLINE UINT8 get_texel_4bit(const UINT64 *base, int y, int x, int width)
{
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;
}
@@ -197,8 +222,8 @@ VIDEO_START( midzeus )
int i;
/* allocate memory for "wave" RAM */
- waveram[0] = auto_malloc(WAVERAM_WIDTH * WAVERAM_HEIGHT * sizeof(*waveram));
- waveram[1] = auto_malloc(WAVERAM_WIDTH * WAVERAM_HEIGHT * sizeof(*waveram));
+ waveram[0] = auto_malloc(WAVERAM_WIDTH * WAVERAM_HEIGHT * sizeof(*waveram[0]));
+ waveram[1] = auto_malloc(WAVERAM_WIDTH * WAVERAM_HEIGHT * sizeof(*waveram[1]));
state_save_register_global_pointer(waveram[0], WAVERAM_WIDTH * WAVERAM_HEIGHT);
state_save_register_global_pointer(waveram[1], WAVERAM_WIDTH * WAVERAM_HEIGHT);
@@ -250,11 +275,12 @@ VIDEO_UPDATE( midzeus )
if (!input_code_pressed(KEYCODE_W))
{
UINT64 *base = waveram_ptr_from_expanded_addr(1, zeusbase[0xcc]);
+ int xoffs = machine->screen[screen].visarea.min_x;
for (y = cliprect->min_y; y <= cliprect->max_y; y++)
{
UINT16 *dest = (UINT16 *)bitmap->base + y * bitmap->rowpixels;
for (x = cliprect->min_x; x <= cliprect->max_x; x++)
- dest[x] = *waveram_pixel_ptr(base, y, x, NULL);
+ dest[x] = *waveram_pixel_ptr(base, y, x - xoffs, NULL);
}
if (single_step)
@@ -319,845 +345,11 @@ VIDEO_UPDATE( midzeus )
-
-
-
-/*
- Control = $80F6 when doing initial screen clear.
- Writes 256 consecutive values to $B0, must mean autoincrement
- Uses latched value in $B2 (maybe also in $B0)
-
- Control = $82F0 when doing video RAM test write phase.
- Writes 512 values across, but updates address before each one.
-
- Control = $84F1 when doing video RAM test read phase.
- Reads 512 values across, but updates address before each one.
-
- Control = $80F2 when doing screen clear.
- Writes 256 consecutive values to $B0, must mean autoincrement.
- Uses latched value in $B2 (maybe also in $B0)
-
- Control = $80A0/$8050 when plotting pixels.
-
- Control = $42F0 when doing wave RAM test write phase.
- Writes 512 values across, but updates address before each one.
-
- Control = $44F1 when doing wave RAM test read phase.
- Reads 512 values across, but updates address before each one.
-*/
-
-
-/*
-
- Known commands:
-
- $00rrxxxx = another type of register set?
- yyyyyyyy
-
- $0000C040 = set palette to 'yyyyyyyy'
-
- $01rrxxxx = another type of register set?
- yyyyyyyy
-
- $01008000 = set object pointer (equivalent to word 2 of command $67)
- $0100C0B0 = set texture data (equivalent to word 1 of command $67)
- $0100C09C
- $0100C0A3
- $0100C0F0
- $0100C040 = set palette base
-
- $17rrxxxx = 16-bit write 'xxxx' to register 'rr'
-
- $1752xxxx = write 'xxxx' to something that reflects back through $B2
- $1770xxxx = write 'xxxx' to upper 16 bits of X coordinate
- $1772xxxx = write 'xxxx' to upper 16 bits of Y coordinate
- $1774xxxx = write 'xxxx' to upper 16 bits of Z coordinate
-
- $18rr0000 = 32-bit write 'xxxxxxxx' to register ('rr' & 0x7f)
- xxxxxxxx
-
- $1A000000 = pipeline synchronize (guess)
-
- $1C00cccc = load matrix (abc)(def)(ghi) and point (xyz)
- ffffiiii
- bbbbaaaa
- eeeedddd
- hhhhgggg
- xxxxxxxx
- yyyyyyyy
- zzzzzzzz
-
- $6700xxxx = render object described at 'bbbbbb' in waveram
- aabbbbbb
- ccddcccc
-*/
-
-/*
-
-MK4:
-
-Zeus cmd 18 : 18D60000 500A00FF
-Zeus cmd 00 : 0005C0A5 21001125
-Zeus cmd 25 : 25000000 007F0018 01000400 B0F60008
-Zeus cmd 18 : 18D60000 500A00FF
-Zeus cmd 18 : 18CE0000 00FFFFFF
-Zeus cmd 1A : 1A000000
-Zeus cmd 18 : 187E0000 0000FFFF
-Zeus cmd 1A : 1A000000
-Zeus cmd 18 : 18CE0000 00FFFFFF
-Zeus cmd 1A : 1A000000
-Zeus cmd 18 : 187E0000 FF980000
-Zeus cmd 00 : 0080C0A5 3F00102F
-Zeus cmd 17 : 17681370
-Zeus cmd 17 : 176940C4
-Zeus cmd 1C : ( 4000 0000 0000 ) ( 0000 4000 0000 ) ( 0000 0000 4000 ) -152.00 -50.00 1.25000
-Zeus cmd 00 : 0000C040 0318E132 -> palette @ (18E,132)
-Zeus cmd 67 : 67008000 0919F1C4 151 01FA4C -> render @ (19F,1C4)
-Zeus cmd 1C : ( 4000 0000 0000 ) ( 0000 4000 0000 ) ( 0000 0000 4000 ) -135.00 -50.00 1.25000
-Zeus cmd 67 : 67008000 0919F1C4 151 01FA4C
-Zeus cmd 1C : ( 4000 0000 0000 ) ( 0000 4000 0000 ) ( 0000 0000 4000 ) -118.00 -50.00 1.25000
-Zeus cmd 67 : 67008000 0919F1C4 151 01F988
-Zeus cmd 1C : ( 4000 0000 0000 ) ( 0000 4000 0000 ) ( 0000 0000 4000 ) -101.00 -50.00 1.25000
-
-19F1BA: 19DC0000 00000000 19840000 00F01605 25810000 21010000 FFD00000 00000000 FFD00038 000E0000 00080038 0E0E0000 00080000 0E000000 30000000 30000000 30000000 30000000 08000000 00000000
-19F1C4: 19DC0000 00000000 19840000 00F01605 25800000 21010000 FFD0FFFC 00000000 FFD0003C 00100000 0008003C 0E100000 0008FFFC 0E000000 30000000 30000000 30000000 30000000 08000000 00000000
-19F1CE: 19DC0000 00000000 19840000 00F01605 25800000 21010000 FFD0FFFC 00000000 FFD00028 000B0000 00080028 0E0B0000 0008FFFC 0E000000 30000000 30000000 30000000 30000000 08000000 00000000
-19F1D8: 19DC0000 00000000 19840000 00F01605 25800000 21010000 FFD00000 00000000 FFD00034 000D0000 00080034 0E0D0000 00080000 0E000000 30000000 30000000 30000000 30000000 08000000 00000000
-19F1E2: 19DC0000 00000000 19840000 00F01605 25800000 21010000 FFD00000 00000000 FFD00028 000A0000 000C0028 0F0A0000 000C0000 0F000000 30000000 30000000 30000000 30000000 08000000 00000000
-19F1EC: 19DC0000 00000000 19840000 00F01605 25800000 21010000 FFD00000 00000000 FFD00014 00050000 00080014 0E050000 00080000 0E000000 30000000 30000000 30000000 30000000 08000000 00000000
-19F1F6: 19DC0000 00000000 19840000 00F01605 25810000 21010000 FFD0FFFC 00000000 FFD00034 000E0000 00080034 0E0E0000 0008FFFC 0E000000 30000000 30000000 30000000 30000000 08000000 00000000
-1A0000: 19DC0000 00000000 19840000 00F01605 25800000 21010000 FFCC0000 00000000 FFCC0038 000E0000 000C0038 100E0000 000C0000 10000000 30000000 30000000 30000000 30000000 08000000 00000000
-1A000A: 19DC0000 00000000 19840000 00F01605 25800000 21010000 FFCC0000 00000000 FFCC0034 000D0000 000C0034 100D0000 000C0000 10000000 30000000 30000000 30000000 30000000 08000000 00000000
-1A0014: 19DC0000 00000000 19840000 00F01605 25800000 21010000 FFCC0000 00000000 FFCC002C 000B0000 0008002C 0F0B0000 00080000 0F000000 30000000 30000000 30000000 30000000 08000000 00000000
-1A001E: 19DC0000 00000000 19840000 00F01605 25800000 21010000 FFCC0000 00000000 FFCC002C 000B0000 000C002C 100B0000 000C0000 10000000 30000000 30000000 30000000 30000000 08000000 00000000
-1A0028: 19DC0000 00000000 19840000 00F01605 25800000 21010000 FFD00000 00000000 FFD0002C 000B0000 000C002C 0F0B0000 000C0000 0F000000 30000000 30000000 30000000 30000000 08000000 00000000
-1A0032: 19DC0000 00000000 19840000 00F01605 25800000 21010000 FFD00000 00000000 FFD00018 00060000 00080018 0E060000 00080000 0E000000 30000000 30000000 30000000 30000000 08000000 00000000
-1A003C: 19DC0000 40B68800 19840000 00001604 25800000 21010000 FF9CFF64 00000000 FF9C0084 00480000 005C0084 30480000 005CFF64 30000000 30000000 30000000 30000000 30000000 08000000 00000000
-1A0046: 19DC0000 40B68800 19840000 00001604 25800000 21010000 FF80FF48 00000000 FF80009C 00550000 0070009C 3C550000 0070FF48 3C000000 30000000 30000000 30000000 30000000 08000000 00000000
-1A0050: 19DC0000 40B68800 19840000 00001604 25800000 21010000 FF68FF30 00000000 FF6800B0 00600000 008800B0 48600000 0088FF30 48000000 30000000 30000000 30000000 30000000 08000000 00000000
-1A005A: 19DC0000 40B68800 19840000 00001604 25800000 21010000 FF54FF20 00000000 FF5400C4 00690000 00A000C4 53690000 00A0FF20 53000000 30000000 30000000 30000000 30000000 08000000 00000000
-1A0064: 19DC0000 40B68800 19840000 00001604 25800000 21010000 FF44FF10 00000000 FF4400D4 00710000 00B000D4 5B710000 00B0FF10 5B000000 30000000 30000000 30000000 30000000 08000000 00000000
-1A006E: 19DC0000 40B68800 19840000 00001604 25800000 21010000 FF3CFF08 00000000 FF3C00E4 00770000 00B400E4 5E770000 00B4FF08 5E000000 30000000 30000000 30000000 30000000 08000000 00000000
-1A0078: 19DC0000 40B68800 19840000 00001604 25800000 21010000 FF38FEFC 00000000 FF3800E4 007A0000 00C000E4 627A0000 00C0FEFC 62000000 30000000 30000000 30000000 30000000 08000000 00000000
-1A0082: 19DC0000 40B68800 19840000 00001604 25800000 21010000 FF28FEFC 00000000 FF2800EC 007C0000 00C000EC 667C0000 00C0FEFC 66000000 30000000 30000000 30000000 30000000 08000000 00000000
-1A008C: 19DC0000 40B68800 19840000 00001604 25800000 21010000 FF60FF28 00000000 FF6000C0 00660000 009C00C0 4F660000 009CFF28 4F000000 30000000 30000000 30000000 30000000 08000000 00000000
-1A0096: 19DC0000 40B68800 19840000 00001604 25800000 21010000 FF80FF48 00000000 FF80009C 00550000 0078009C 3E550000 0078FF48 3E000000 30000000 30000000 30000000 30000000 08000000 00000000
-1A00A0: 19DC0000 40B68800 19840000 00001604 25800000 21010000 FF94FF5C 00000000 FF940088 004B0000 00640088 344B0000 0064FF5C 34000000 30000000 30000000 30000000 30000000 08000000 00000000
-1A00AA: 19DC0000 40B68800 19840000 00001604 25810000 21010000 FFA4FF6C 00000000 FFA4007C 00440000 0054007C 2C440000 0054FF6C 2C000000 30000000 30000000 30000000 30000000 08000000 00000000
-1A00B4: 19DC0000 40B68800 19840000 00001604 25800000 21010000 FFACFF78 00000000 FFAC0070 003E0000 00480070 273E0000 0048FF78 27000000 30000000 30000000 30000000 30000000 08000000 00000000
-1A00BE: 19DC0000 40B68800 19840000 00001604 25800000 21010000 FFB4FF7C 00000000 FFB4006C 003C0000 0044006C 243C0000 0044FF7C 24000000 30000000 30000000 30000000 30000000 08000000 00000000
-1A00C8: 19DC0000 00000000 19840000 00001605 25800000 21000000 FF42FF02 00000000 FF4200FE 007F0000 00BE00FE 5F7F0000 00BEFF02 5F000000 30000000 30000000 30000000 30000000 08000000 00000000
-1A00D2: 19DC0000 00000000 19840000 00001605 25800000 21010000 FFB0FF70 00000000 FFB0007C 00430000 0054007C 29430000 0054FF70 29000000 30000000 30000000 30000000 30000000 08000000 00000000
-1A00DC: 19DC0000 40B68800 19840000 00001604 25800000 21010000 FA10F810 00000000 FA1007F0 007F0000 05F007F0 5F7F0000 05F0F810 5F000000 30000000 30000000 30000000 30000000 08000000 00000000
-1A00E6: 0C02C0F0 0F18E1BE
- 19DC0000 4B23CB00 19840000 00001605 252978EF 200C0000 04480000 00000000 043D0000 0000001E 043DFFEB 00000015 043DFFEB 00000015 00040000 0A331400 0743178C 0743178C
-1A00F0: 251178D7 200C0000 04480000 00000000 043DFFEB 00000015 043DFFE2 00000000 043DFFE2 00000000 00040000 0743178C 0003175D 0003175D
- 25EF78D7 200C0000 04480000 00000000 043DFFE2 00000000 043DFFEB 0000FFEB 043DFFEB 0000FFEB 00040000 0003175D 38C3178C 38C3178C
- 25D778EF 200C0000 04480000 00000000 043DFFEB 0000FFEB 043D0000 0000FFE2 043D0000 0000FFE2 00040000 38C3178C 35D31400 35D31400
- 25D77811 200C0000 04480000 00000000 043D0000 0000FFE2 043D0015 0000FFEB 043D0015 0000FFEB 00040000 35D31400 38C31474 38C31474
-1A010C: 25EF7829 200C0000 04480000 00000000 043D0015 0000FFEB 043D001E 00000000 043D001E 00000000 00040000 38C31474 000314A3 000314A3
- 25117829 200C0000 04480000 00000000 043D001E 00000000 043D0015 00000015 043D0015 00000015 00040000 000314A3 07431474 07431474
- 25297811 200C0000 04480000 00000000 043D0015 00000015 043D0000 0000001E 043D0000 0000001E 00040000 07431474 0A331400 0A331400
- 0C018000 381A0122
- 252186F3 200C0000 F64A0000 00000000 F652FFEB 00000015 F6520000 0000001E F6520000 0000001E 000C0000 06ECD393 09ACD3FF 09ACD3FF
- 250D86DF 200C0000 F64A0000 00000000 F652FFE2 00000000 F652FFEB 00000015 F652FFEB 00000015 000C0000 001CD366 06DCD392 06DCD392
-1A0130: 25F386DF 200C0000 F64A0000 00000000 F652FFEB 0000FFEB F652FFE2 00000000 F652FFE2 00000000 000C0000 393CD392 3FFCD366 3FFCD366
- 25DF86F3 200C0000 F64A0000 00000000 F6520000 0000FFE2 F652FFEB 0000FFEB F652FFEB 0000FFEB 000C0000 366CD3FF 392CD393 392CD393
- 25DF860D 200C0000 F64A0000 00000000 F6520015 0000FFEB F6520000 0000FFE2 F6520000 0000FFE2 000C0000 392CD06D 366CD001 366CD001
- 25F38621 200C0000 F64A0000 00000000 F652001E 00000000 F6520015 0000FFEB F6520015 0000FFEB 000C0000 3FFCD09A 393CD06E 393CD06E
-1A014C: 250D8621 200C0000 F64A0000 00000000 F6520015 00000015 F652001E 00000000 F652001E 00000000 000C0000 06DCD06E 001CD09A 001CD09A
- 2521860D 200C0000 F6520000 0000001E F6520015 00000015 F64A0000 00000000 F64A0000 00000000 09ACD001 06ECD06D 000C0000 000C0000
- 0C018000 381A015B
- 25D53969 200C0000 0429001D 0000FFE3 04290029 00000000 043D001E 00000000 043D0015 0000FFEB 356110B3 3FA110F7 3EB2D8B3 3902D88D
- 252B3969 200C0000 04290029 00000000 0429001D 0000001D 043D0015 00000015 043D001E 00000000 006110F7 0AA110B3 0702D88D 0152D8B3
- 2569392B 200C0000 0429001D 0000001D 04290000 00000029 043D0000 0000001E 043D0015 00000015 0B3110AA 0F711006 0B32D815 08D2D870
-1A0170: 256939D5 200C0000 04290000 00000029 0429FFE3 0000001D 043DFFEB 00000015 043D0000 0000001E 0F7113FA 0B311356 08D2DB90 0B32DBEB
- 252B3997 200C0000 0429FFE3 0000001D 0429FFD7 00000000 043DFFE2 00000000 043DFFEB 00000015 0AA1134D 00611309 0152DB4D 0702DB73
- 25D53997 200C0000 0429FFD7 00000000 0429FFE3 0000FFE3 043DFFEB 0000FFEB 043DFFE2 00000000 3FA11309 3561134D 3902DB73 3EB2DB4D
- 259739D5 200C0000 0429FFE3 0000FFE3 04290000 0000FFD7 043D0000 0000FFE2 043DFFEB 0000FFEB 34D11356 309113FA 34D2DBEB 3732DB90
-1A018C: 2597392B 200C0000 04290000 0000FFD7 0429001D 0000FFE3 043D0015 0000FFEB 043D0000 0000FFE2 30911006 34D110AA 3732D870 34D2D815
- 0C018000 381A0194
-1A0194: 252BC769 200C0000 F666001D 0000001D F6660029 00000000 F652001E 00000000 F6520015 00000015 0AAEF0B3 006EF0F7 018D20B0 06CD208D
- 25D5C769 200C0000 F6660029 00000000 F666001D 0000FFE3 F6520015 0000FFEB F652001E 00000000 3FAEF0F7 356EF0B3 394D208D 3E8D20B0
- 2597C72B 200C0000 F666001D 0000FFE3 F6660000 0000FFD7 F6520000 0000FFE2 F6520015 0000FFEB 34DEF0AA 309EF006 350D2018 373D206C
- 2597C7D5 200C0000 F6660000 0000FFD7 F666FFE3 0000FFE3 F652FFEB 0000FFEB F6520000 0000FFE2 309EF3FA 34DEF356 373D2394 350D23E8
-1A01B0: 25D5C797 200C0000 F666FFE3 0000FFE3 F666FFD7 00000000 F652FFE2 00000000 F652FFEB 0000FFEB 356EF34D 3FAEF309 3E8D2350 394D2373
- 252BC797 200C0000 F666FFD7 00000000 F666FFE3 0000001D F652FFEB 00000015 F652FFE2 00000000 006EF309 0AAEF34D 06CD2373 018D2350
- 2569C7D5 200C0000 F666FFE3 0000001D F6660000 00000029 F6520000 0000001E F652FFEB 00000015 0B3EF356 0F7EF3FA 0B0D23E8 08DD2394
- 2569C72B 200C0000 F6660000 00000029 F666001D 0000001D F6520015 00000015 F6520000 0000001E 0F7EF006 0B3EF0AA 08DD206C 0B0D2018
-1A01CC: 0C018000 311A01CD
- 25300076 200C0000 F6660029 00000000 F666001D 0000001D 0429001D 0000001D 04290029 00000000 00FF24FA 0A6F24BB 0A60DCBB 00F0DCFA
-1A01D4: 25760030 200C0000 F666001D 0000001D F6660000 00000029 04290000 00000029 0429001D 0000001D 0BBF24A6 0FAF240F 0FA0DC0F 0BB0DCA6
- 257600D0 200C0000 F6660000 00000029 F666FFE3 0000001D 0429FFE3 0000001D 04290000 00000029 0FAF27F1 0BBF275A 0BB0DF5A 0FA0DFF1
- 2530008A 200C0000 F666FFE3 0000001D F666FFD7 00000000 0429FFD7 00000000 0429FFE3 0000001D 0A6F2745 00FF2706 00F0DF06 0A60DF45
- 25D0008A 200C0000 F666FFD7 00000000 F666FFE3 0000FFE3 0429FFE3 0000FFE3 0429FFD7 00000000 3F1F2706 35AF2745 35A0DF45 3F10DF06
-1A01F0: 258A00D0 200C0000 F666FFE3 0000FFE3 F6660000 0000FFD7 04290000 0000FFD7 0429FFE3 0000FFE3 345F275A 306F27F1 3060DFF1 3450DF5A
- 258A0030 200C0000 F6660000 0000FFD7 F666001D 0000FFE3 0429001D 0000FFE3 04290000 0000FFD7 306F240F 345F24A6 3450DCA6 3060DC0F
- 0C018000 071A1000 00000000 00000000
-1A1000: 25D00076 200C0000 F666001D 0000FFE3 F6660029 00000000 04290029 00000000 0429001D 0000FFE3 35AF24BB 3F1F24FA 3F10DCFA 35A0DCBB
- 08000000 00000000
-*/
-
-/*
-
-Note this sequence:
-Zeus cmd 17 : 1757500A
-Zeus cmd 17 : 175600FF
-Zeus cmd 17 : 176F0032
-Zeus cmd 17 : 176E0031
-Zeus cmd 17 : 176D003B
-Zeus cmd 17 : 176C002F
-
-Appears to do the same thing as:
-Zeus cmd 18 : 18D60000 500A00FF
-Zeus cmd 18 : 18EE0000 00320031
-Zeus cmd 18 : 18EC0000 003B002F
-
-
-
-Also this sequence:
-Zeus cmd 17 : 176940C4
-Zeus cmd 17 : 17681370
-
-Seems to have the same purpose as this part of the command stream:
- 19E80000 40C41370
-
-
-
-Invasion startup:
-
-00CC86:zeus16_w(81) = 0000 [00000000]
-00CC86:zeus16_w(80) = 0000 [00000000]
-00CC86:zeus16_w(4B) = 018F [018F0000]
-00CC86:zeus16_w(4A) = 01FE [018F01FE]
-00CC86:zeus16_w(49) = 018F [018F0000]
-00CC86:zeus16_w(48) = 01FE [018F01FE]
-00CC86:zeus16_w(CE) = 7620 [00007620]
-00CC86:zeus16_w(CD) = 0000 [00000000]
-00CC86:zeus16_w(CC) = 0000 [00000000]
-00CC86:zeus16_w(CB) = 0116 [01160000]
-00CC86:zeus16_w(CA) = 0107 [01160107]
-00CC86:zeus16_w(C9) = 0103 [01030000]
-00CC86:zeus16_w(C8) = 00FF [010300FF]
-00CC86:zeus16_w(C7) = 0211 [02110000]
-00CC86:zeus16_w(C6) = 007F [0211007F]
-00CC86:zeus16_w(C5) = 000C [000C0000]
-00CC86:zeus16_w(C4) = 004C [000C004C]
-00CC86:zeus16_w(C3) = 001F [001F0000]
-00CC86:zeus16_w(C2) = E591 [001FE591]
-00CC86:zeus16_w(C1) = 801F [801F0000]
-00CC86:zeus16_w(C0) = 2500 [801F2500]
-00CC86:zeus16_w(86) = 8003 [00008003]
-00CC86:zeus16_w(80) = 0C05 [00000C05]
-00CC86:zeus16_w(8F) = 0206 [02060000]
-00CC86:zeus16_w(8E) = 0000 [02060000]
-00CC86:zeus16_w(8D) = 0226 [02260000]
-00CC86:zeus16_w(8C) = 0000 [02260000]
-00CC86:zeus16_w(8B) = 0000 [00000000]
-00CC86:zeus16_w(8A) = FAFA [0000FAFA]
-00CC86:zeus16_w(89) = 0000 [00000000]
-00CC86:zeus16_w(88) = FAFA [0000FAFA]
-00CC86:zeus16_w(80) = 0001 [00000001]
-00CC86:zeus16_w(8F) = 0207 [02070000]
-00CC86:zeus16_w(8E) = BFFF [0207BFFF]
-00CC86:zeus16_w(8F) = 0206 [0206BFFF]
-00CC86:zeus16_w(8E) = 0000 [02060000]
-00CC86:zeus16_w(8D) = 0227 [02270000]
-00CC86:zeus16_w(8C) = BFFF [0227BFFF]
-00CC86:zeus16_w(8D) = 0226 [0226BFFF]
-00CC86:zeus16_w(8C) = 0000 [02260000]
-00CC86:zeus16_w(8F) = 0207 [02070000]
-00CC86:zeus16_w(8E) = F020 [0207F020]
-00CC86:zeus16_w(8F) = 0206 [0206F020]
-00CC86:zeus16_w(8E) = 0000 [02060000]
-00CC86:zeus16_w(8D) = 0227 [02270000]
-00CC86:zeus16_w(8C) = F020 [0227F020]
-00CC86:zeus16_w(8D) = 0226 [0226F020]
-00CC86:zeus16_w(8C) = 0000 [02260000]
-00CC86:zeus16_w(8F) = 0207 [02070000]
-00CC86:zeus16_w(8E) = DFFF [0207DFFF]
-00CC86:zeus16_w(8F) = 0206 [0206DFFF]
-00CC86:zeus16_w(8E) = 0000 [02060000]
-00CC86:zeus16_w(8D) = 0227 [02270000]
-00CC86:zeus16_w(8C) = DFFF [0227DFFF]
-00CC86:zeus16_w(8D) = 0226 [0226DFFF]
-00CC86:zeus16_w(8C) = 0000 [02260000]
-00CC86:zeus16_w(8F) = 0207 [02070000]
-00CC86:zeus16_w(8E) = DFFF [0207DFFF]
-00CC86:zeus16_w(8F) = 0206 [0206DFFF]
-00CC86:zeus16_w(8E) = 0000 [02060000]
-00CC86:zeus16_w(8D) = 0227 [02270000]
-00CC86:zeus16_w(8C) = DFFF [0227DFFF]
-00CC86:zeus16_w(8D) = 0226 [0226DFFF]
-00CC86:zeus16_w(8C) = 0000 [02260000]
-00CC86:zeus16_w(8F) = 0206 [02060000]
-00CC86:zeus16_w(8E) = 0000 [02060000]
-00CC86:zeus16_w(8D) = 0226 [02260000]
-00CC86:zeus16_w(8C) = 0000 [02260000]
-00CC86:zeus16_w(8B) = 0000 [0000FAFA]
-00CC86:zeus16_w(8A) = D254 [0000D254]
-00CC86:zeus16_w(89) = 8FFF [8FFFFAFA]
-00CC86:zeus16_w(88) = D794 [8FFFD794]
-00CC86:zeus16_w(85) = 0000 [00000000]
-00CC86:zeus16_w(84) = 0000 [00000000]
-00CC86:zeus16_w(83) = 1F1F [1F1F0000]
-00CC86:zeus16_w(82) = 2011 [1F1F2011]
-00CC86:zeus16_w(69) = 0003 [00030000]
-00CC86:zeus16_w(69) = 0000 [00000000]
-00CC86:zeus16_w(68) = 0100 [00000100]
-00CC92:zeus16_w(200) = 0100 [00000100]
-00CC92:zeus16_w(201) = 0000 [00000100]
-00CC92:zeus16_w(202) = 0000 [00000000]
-00CC92:zeus16_w(203) = 0000 [00000000]
-00CC92:zeus16_w(204) = 00D4 [000000D4]
-00CC92:zeus16_w(205) = 0000 [000000D4]
-00CC92:zeus16_w(206) = 0000 [00000000]
-00CC92:zeus16_w(207) = A000 [A0000000]
-00CC92:zeus16_w(208) = 0050 [00000050]
-00CC92:zeus16_w(209) = 0000 [00000050]
-00CC92:zeus16_w(20A) = 0000 [00000000]
-00CC92:zeus16_w(20B) = A000 [A0000000]
-00CC92:zeus16_w(20C) = 0703 [00000703]
-00CC92:zeus16_w(20D) = 0000 [00000703]
-00CC92:zeus16_w(20E) = 0000 [00000000]
-00CC92:zeus16_w(20F) = 0000 [00000000]
-00CC92:zeus16_w(210) = 0050 [00000050]
-00CC92:zeus16_w(211) = 0000 [00000050]
-00CC92:zeus16_w(212) = 0000 [00000000]
-00CC92:zeus16_w(213) = A000 [A0000000]
-00CC92:zeus16_w(214) = 005A [0000005A]
-00CC92:zeus16_w(215) = 01C0 [01C0005A]
-00CC92:zeus16_w(216) = 0000 [00000000]
-00CC92:zeus16_w(217) = B000 [B0000000]
-00CC92:zeus16_w(218) = 00D8 [000000D8]
-00CC92:zeus16_w(219) = 0000 [000000D8]
-00CC92:zeus16_w(21A) = 0000 [00000000]
-00CC92:zeus16_w(21B) = 9000 [90000000]
-00CC92:zeus16_w(21C) = 0607 [00000607]
-00CC92:zeus16_w(21D) = 0000 [00000607]
-00CC92:zeus16_w(21E) = 0000 [00000000]
-00CC92:zeus16_w(21F) = 0000 [00000000]
-00CC92:zeus16_w(220) = C000 [0000C000]
-00CC92:zeus16_w(221) = 0008 [0008C000]
-00CC92:zeus16_w(222) = 0000 [00000000]
-00CC92:zeus16_w(223) = 003F [003F0000]
-00CC92:zeus16_w(224) = 006A [0000006A]
-00CC92:zeus16_w(225) = 01D0 [01D0006A]
-00CC92:zeus16_w(226) = 0025 [00000025]
-00CC92:zeus16_w(227) = B000 [B0000025]
-00CC92:zeus16_w(228) = 0F00 [00000F00]
-00CC92:zeus16_w(229) = 0000 [00000F00]
-00CC92:zeus16_w(22A) = 0001 [00000001]
-00CC92:zeus16_w(22B) = 0000 [00000001]
-00CC92:zeus16_w(22C) = 0E08 [00000E08]
-00CC92:zeus16_w(22D) = 0000 [00000E08]
-00CC92:zeus16_w(22E) = 0000 [00000000]
-00CC92:zeus16_w(22F) = 0000 [00000000]
-00CC92:zeus16_w(230) = 00D4 [000000D4]
-00CC92:zeus16_w(231) = 0000 [000000D4]
-00CC92:zeus16_w(232) = 0000 [00000000]
-00CC92:zeus16_w(233) = A000 [A0000000]
-00CC92:zeus16_w(234) = 0050 [00000050]
-00CC92:zeus16_w(235) = 0000 [00000050]
-00CC92:zeus16_w(236) = 0000 [00000000]
-00CC92:zeus16_w(237) = A000 [A0000000]
-00CC92:zeus16_w(238) = 070E [0000070E]
-00CC92:zeus16_w(239) = 0000 [0000070E]
-00CC92:zeus16_w(23A) = 0000 [00000000]
-00CC92:zeus16_w(23B) = 0000 [00000000]
-00CC92:zeus16_w(23C) = 0050 [00000050]
-00CC92:zeus16_w(23D) = 0000 [00000050]
-00CC92:zeus16_w(23E) = 0000 [00000000]
-00CC92:zeus16_w(23F) = A000 [A0000000]
-00CC92:zeus16_w(240) = 005A [0000005A]
-00CC92:zeus16_w(241) = 01C0 [01C0005A]
-00CC92:zeus16_w(242) = 0000 [00000000]
-00CC92:zeus16_w(243) = B000 [B0000000]
-00CC92:zeus16_w(244) = 00D8 [000000D8]
-00CC92:zeus16_w(245) = 0000 [000000D8]
-00CC92:zeus16_w(246) = 0000 [00000000]
-00CC92:zeus16_w(247) = 8CC0 [8CC00000]
-00CC92:zeus16_w(248) = 0612 [00000612]
-00CC92:zeus16_w(249) = 0000 [00000612]
-00CC92:zeus16_w(24A) = 0000 [00000000]
-00CC92:zeus16_w(24B) = 0000 [00000000]
-00CC92:zeus16_w(24C) = D000 [0000D000]
-00CC92:zeus16_w(24D) = 0008 [0008D000]
-00CC92:zeus16_w(24E) = 8000 [00008000]
-00CC92:zeus16_w(24F) = 003E [003E8000]
-00CC92:zeus16_w(250) = 006A [0000006A]
-00CC92:zeus16_w(251) = 01D0 [01D0006A]
-00CC92:zeus16_w(252) = 0025 [00000025]
-00CC92:zeus16_w(253) = B000 [B0000025]
-00CC92:zeus16_w(254) = 0F00 [00000F00]
-00CC92:zeus16_w(255) = 0000 [00000F00]
-00CC92:zeus16_w(256) = 0001 [00000001]
-00CC92:zeus16_w(257) = 0000 [00000001]
-00CC92:zeus16_w(258) = 0E13 [00000E13]
-00CC92:zeus16_w(259) = 0000 [00000E13]
-00CC92:zeus16_w(25A) = 0000 [00000000]
-00CC92:zeus16_w(25B) = 0000 [00000000]
-00CC92:zeus16_w(25C) = 0F00 [00000F00]
-00CC92:zeus16_w(25D) = 05C0 [05C00F00]
-00CC92:zeus16_w(25E) = 0000 [00000000]
-00CC92:zeus16_w(25F) = B000 [B0000000]
-00CC92:zeus16_w(260) = 0F80 [00000F80]
-00CC92:zeus16_w(261) = 0400 [04000F80]
-00CC92:zeus16_w(262) = 0000 [00000000]
-00CC92:zeus16_w(263) = 9000 [90000000]
-00CC92:zeus16_w(264) = 0F80 [00000F80]
-00CC92:zeus16_w(265) = 0400 [04000F80]
-00CC92:zeus16_w(266) = 0000 [00000000]
-00CC92:zeus16_w(267) = 8CC0 [8CC00000]
-00CC92:zeus16_w(268) = 011A [0000011A]
-00CC92:zeus16_w(269) = 0000 [0000011A]
-00CC92:zeus16_w(26A) = 0000 [00000000]
-00CC92:zeus16_w(26B) = 0000 [00000000]
-00CC92:zeus16_w(26C) = 0F00 [00000F00]
-00CC92:zeus16_w(26D) = 0000 [00000F00]
-00CC92:zeus16_w(26E) = 0000 [00000000]
-00CC92:zeus16_w(26F) = 0000 [00000000]
-00CC92:zeus16_w(270) = A001 [0000A001]
-00CC92:zeus16_w(271) = 0003 [0003A001]
-00CC92:zeus16_w(272) = 0025 [00000025]
-00CC92:zeus16_w(273) = 0000 [00000025]
-00CC92:zeus16_w(274) = 0000 [00000000]
-00CC92:zeus16_w(275) = 40F3 [40F30000]
-00CC92:zeus16_w(276) = 0000 [00000000]
-00CC92:zeus16_w(277) = 0000 [00000000]
-00CC92:zeus16_w(278) = 4000 [00004000]
-00CC92:zeus16_w(279) = 0803 [08034000]
-00CC92:zeus16_w(27A) = 2000 [00002000]
-00CC92:zeus16_w(27B) = 0013 [00132000]
-00CC92:zeus16_w(27C) = 8000 [00008000]
-00CC92:zeus16_w(27D) = 0003 [00038000]
-00CC92:zeus16_w(27E) = 1000 [00001000]
-00CC92:zeus16_w(27F) = 003E [003E1000]
-00CC92:zeus16_w(280) = 20F0 [000020F0]
-00CC92:zeus16_w(281) = 0001 [000120F0]
-00CC92:zeus16_w(282) = 0000 [00000000]
-00CC92:zeus16_w(283) = 93C0 [93C00000]
-00CC92:zeus16_w(284) = 60F2 [000060F2]
-00CC92:zeus16_w(285) = 0001 [000160F2]
-00CC92:zeus16_w(286) = 0000 [00000000]
-00CC92:zeus16_w(287) = 9380 [93800000]
-00CC92:zeus16_w(288) = FFF4 [0000FFF4]
-00CC92:zeus16_w(289) = 0001 [0001FFF4]
-00CC92:zeus16_w(28A) = 0000 [00000000]
-00CC92:zeus16_w(28B) = 90C0 [90C00000]
-00CC92:zeus16_w(28C) = 0000 [00000000]
-00CC92:zeus16_w(28D) = 0000 [00000000]
-00CC92:zeus16_w(28E) = 0000 [00000000]
-00CC92:zeus16_w(28F) = 0000 [00000000]
-00CC92:zeus16_w(290) = 0000 [00000000]
-00CC92:zeus16_w(291) = 0000 [00000000]
-00CC92:zeus16_w(292) = 0000 [00000000]
-00CC92:zeus16_w(293) = 0000 [00000000]
-00CC92:zeus16_w(294) = 0000 [00000000]
-00CC92:zeus16_w(295) = 0000 [00000000]
-00CC92:zeus16_w(296) = 0000 [00000000]
-00CC92:zeus16_w(297) = 0000 [00000000]
-00CC92:zeus16_w(298) = 0000 [00000000]
-00CC92:zeus16_w(299) = 0000 [00000000]
-00CC92:zeus16_w(29A) = 0000 [00000000]
-00CC92:zeus16_w(29B) = 0000 [00000000]
-00CC92:zeus16_w(29C) = 0000 [00000000]
-00CC92:zeus16_w(29D) = 0000 [00000000]
-00CC92:zeus16_w(29E) = 0000 [00000000]
-00CC92:zeus16_w(29F) = 0000 [00000000]
-00CC92:zeus16_w(2A0) = 0000 [00000000]
-00CC92:zeus16_w(2A1) = 0000 [00000000]
-00CC92:zeus16_w(2A2) = 0000 [00000000]
-00CC92:zeus16_w(2A3) = 0000 [00000000]
-00CC92:zeus16_w(2A4) = 0000 [00000000]
-00CC92:zeus16_w(2A5) = 0000 [00000000]
-00CC92:zeus16_w(2A6) = 0000 [00000000]
-00CC92:zeus16_w(2A7) = 0000 [00000000]
-00CC92:zeus16_w(2A8) = 0000 [00000000]
-00CC92:zeus16_w(2A9) = 0000 [00000000]
-00CC92:zeus16_w(2AA) = 0000 [00000000]
-00CC92:zeus16_w(2AB) = 0000 [00000000]
-00CC92:zeus16_w(2AC) = 0000 [00000000]
-00CC92:zeus16_w(2AD) = 0000 [00000000]
-00CC92:zeus16_w(2AE) = 0000 [00000000]
-00CC92:zeus16_w(2AF) = 0000 [00000000]
-00CC92:zeus16_w(2B0) = 0000 [00000000]
-00CC92:zeus16_w(2B1) = 0000 [00000000]
-00CC92:zeus16_w(2B2) = 0000 [00000000]
-00CC92:zeus16_w(2B3) = 0000 [00000000]
-00CC92:zeus16_w(2B4) = 7F00 [00007F00]
-00CC92:zeus16_w(2B5) = 0001 [00017F00]
-00CC92:zeus16_w(2B6) = 0000 [00000000]
-00CC92:zeus16_w(2B7) = 03C0 [03C00000]
-00CC92:zeus16_w(2B8) = C000 [0000C000]
-00CC92:zeus16_w(2B9) = 0003 [0003C000]
-00CC92:zeus16_w(2BA) = 0000 [00000000]
-00CC92:zeus16_w(2BB) = 0000 [00000000]
-00CC92:zeus16_w(2BC) = EF00 [0000EF00]
-00CC92:zeus16_w(2BD) = 0001 [0001EF00]
-00CC92:zeus16_w(2BE) = 0000 [00000000]
-00CC92:zeus16_w(2BF) = 03C0 [03C00000]
-00CC92:zeus16_w(2C0) = 0007 [00000007]
-00CC86:zeus16_w(68) = 0008 [00000008]
-00CC86:zeus16_w(80) = 0C01 [00000C01]
-00CC86:zeus16_w(80) = 0C1D [00000C1D]
-00CC86:zeus16_w(69) = 0003 [00030008]
-00CC86:zeus16_w(69) = 0000 [00000008]
-00CC86:zeus16_w(80) = 0C01 [00000C01]
-00CC86:zeus16_w(80) = FC1D [0000FC1D]
-00CC86:zeus16_w(81) = 0022 [0022FC1D]
-Zeus cmd 1A : 1A000000
-00CFDC:zeus32_w(86) = 00008020
-00CFE0:zeus32_w(8E) = 0207F440
-00CFE1:zeus32_w(100) = 00000000
-00CFE5:zeus32_w(86) = 00008000
-00CFE7:zeus32_w(8E) = 02060000
-00D0FC:zeus32_w(CE) = 00C97020
-00D09A:zeus32_w(80) = 0022FC3F
-00D104:zeus32_w(CE) = 00C87020
-00D034:zeus32_w(84) = 00000100
-00D0C9:zeus32_w(68) = 00000100
-00D0CA:zeus32_w(00) = 0000C3F0
-00D0CC:zeus32_w(5C) = 00000000
-00D0CE:zeus32_w(06) = FFFF0030
-00D0D0:zeus32_w(02) = 000C0000
-00D0D2:zeus32_w(04) = 00000E01
-00D0D4:zeus32_w(4C) = 00808080
-00D0D5:zeus32_w(4E) = 00808080
-00D0D6:zeus32_w(08) = 00000000
-00D0D7:zeus32_w(0C) = 00FF018F
-00D0DD:zeus32_w(0A) = 0000018F
-00D0E3:zeus32_w(0E) = 00FF0000
-00D0E5:zeus32_w(1E) = FFFFFFFF
-00D0E6:zeus32_w(1C) = FFFFFFFF
-00D0E7:zeus32_w(1A) = FFFFFFFF
-00D0E8:zeus32_w(18) = FFFFFFFF
-00D0EA:zeus32_w(46) = 00000000
-00D0EB:zeus32_w(44) = 00000000
-00D0EC:zeus32_w(42) = 00000000
-00D0ED:zeus32_w(40) = 00000000
-00D0EE:zeus32_w(26) = 00000000
-00D0EF:zeus32_w(24) = 00000000
-00D0F0:zeus32_w(22) = 00000000
-00D0F1:zeus32_w(20) = 00000000
-00D09A:zeus32_w(80) = 0022FCFF
-00D0F6:zeus32_w(60) = 00000001
-00D09A:zeus32_w(80) = 0022FC3F
-00D01E:zeus32_w(76) = F8800000
-00D020:zeus32_w(CC) = 00000000
-00D034:zeus32_w(84) = 00000080
-00D0FC:zeus32_w(CE) = 00C97020
-00D09A:zeus32_w(80) = 0022FC3F
-00D104:zeus32_w(CE) = 00C87020
-Zeus cmd 1A : 1A000000
-Zeus cmd 18 : 187E0000 0000FFFF
-Zeus cmd 18 : 187C0000 FFFFFFE0
-Zeus cmd 18 : 187A0000 00800000
-Zeus cmd 18 : 18780000 000000C7
-Zeus cmd 18 : 18760000 F8800000
-Zeus cmd 17 : 176F0032
-Zeus cmd 17 : 176E0031
-Zeus cmd 17 : 176D003B
-Zeus cmd 17 : 176C002B
-Zeus cmd 18 : 184E0000 00808080
-Zeus cmd 18 : 184C0000 00808080
-Zeus cmd 18 : 184A0000 00FF018E
-Zeus cmd 18 : 18480000 00FF018E
-Zeus cmd 17 : 176940C4
-Zeus cmd 17 : 17681370
-Zeus cmd 17 : 1707FFFF
-Zeus cmd 17 : 17060030
-Zeus cmd 17 : 17010000
-Zeus cmd 2D : 2D007FFF
-Zeus cmd 2E : 2E000800 00000000
-Zeus cmd 17 : 1757500A
-Zeus cmd 17 : 175600FF
-Zeus cmd 17 : 17524321
-Zeus cmd 17 : 1752BCDE
-Zeus cmd 01 : 0100C0B0 3F001059
-00D09A:zeus32_w(80) = 0222FC3F
-....
-Zeus cmd 1A : 1A000000
-Zeus cmd 1A : 1A000000
-....
-Zeus cmd 1A : 1A000000
-Zeus cmd 1A : 1A000000
-....
-Zeus cmd 01 : 0100C0B0 3F001059
-00D09A:zeus32_w(80) = 0222FC3F
-....
-Zeus cmd 1A : 1A000000
-Zeus cmd 1A : 1A000000
-....
-00D09A:zeus32_w(80) = FB22FC3F
-00D01E:zeus32_w(76) = F8800000
-00D020:zeus32_w(CC) = 00800000
-00D034:zeus32_w(84) = 00000000
-00D0C9:zeus32_w(68) = 00000100
-00D0CA:zeus32_w(00) = 00000000
-00D0CC:zeus32_w(5C) = 00000000
-00D0CE:zeus32_w(06) = FFFF0030
-00D0D0:zeus32_w(02) = 000C0000
-00D0D2:zeus32_w(04) = 00000E01
-00D0D4:zeus32_w(4C) = 00808080
-00D0D5:zeus32_w(4E) = 00808080
-00D0D6:zeus32_w(08) = 00000000
-00D0D7:zeus32_w(0C) = 00FF018F
-00D0DD:zeus32_w(0A) = 0000018F
-00D0E3:zeus32_w(0E) = 00FF0000
-00D0E5:zeus32_w(1E) = FFFFFFFF
-00D0E6:zeus32_w(1C) = FFFFFFFF
-00D0E7:zeus32_w(1A) = FFFFFFFF
-00D0E8:zeus32_w(18) = FFFFFFFF
-00D0EA:zeus32_w(46) = 00000000
-00D0EB:zeus32_w(44) = 00000000
-00D0EC:zeus32_w(42) = 00000000
-00D0ED:zeus32_w(40) = 00000000
-00D0EE:zeus32_w(26) = 00000000
-00D0EF:zeus32_w(24) = 00000000
-00D0F0:zeus32_w(22) = 00000000
-00D0F1:zeus32_w(20) = 00000000
-00D09A:zeus32_w(80) = FB22FCFF
-00D0F6:zeus32_w(60) = 00000001
-00D09A:zeus32_w(80) = FB22FC3F
-Zeus cmd 17 : 1757500A
-Zeus cmd 17 : 175600FF
-00D09A:zeus32_w(80) = 0222FC3F
-
-
-*/
-static void render_poly_4bit(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid)
-{
- const poly_extra_data *extra = extradata;
- float ooz = extent->param[0].start;
- float uoz = extent->param[1].start;
- float voz = extent->param[2].start;
- float doozdx = extent->param[0].dpdx;
- float duozdx = extent->param[1].dpdx;
- float dvozdx = extent->param[2].dpdx;
- const UINT64 *texbase = extra->texbase;
- const UINT64 *palbase = extra->palbase;
- UINT16 transcolor = extra->transcolor;
- int texwidth = extra->texwidth;
- int x;
-
-if (extra->alpha < 0x80)
- return;
-
- for (x = extent->startx; x < extent->stopx; x++)
- {
- float z = recip_approx(ooz);
- int u = (int)(uoz * z) & ((texwidth * 2) - 1);
- int v = (int)(voz * z) & 255;
- UINT8 texel = get_texel_4bit(texbase, v, u, texwidth);
- if (texel != transcolor)
- {
- 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);
- }
-
- ooz += doozdx;
- uoz += duozdx;
- voz += dvozdx;
- }
-}
-
-
-static void render_poly_8bit(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid)
-{
- const poly_extra_data *extra = extradata;
- float ooz = extent->param[0].start;
- float uoz = extent->param[1].start;
- float voz = extent->param[2].start;
- float doozdx = extent->param[0].dpdx;
- float duozdx = extent->param[1].dpdx;
- float dvozdx = extent->param[2].dpdx;
- const UINT64 *texbase = extra->texbase;
- const UINT64 *palbase = extra->palbase;
- UINT16 transcolor = extra->transcolor;
- int texwidth = extra->texwidth;
- int x;
-
-if (extra->alpha < 0x80)
- return;
-
- for (x = extent->startx; x < extent->stopx; x++)
- {
- float z = recip_approx(ooz);
- int u = (int)(uoz * z) & (texwidth - 1);
- int v = (int)(voz * z) & 255;
- UINT8 texel = get_texel_8bit(texbase, v, u, texwidth);
- if (texel != transcolor)
- {
- 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);
- }
-
- ooz += doozdx;
- uoz += duozdx;
- voz += dvozdx;
- }
-}
-
-
-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)
-{
- UINT32 val1, val2;
- int texwshift;
- int testbit = 0;
-
- val1 = ((texdata >> 10) & 0x3f0000) | (texdata & 0xffff);
- val2 = (texdata >> 16) & 0x3ff;
- texwshift = (val2 >> 6) & 7;
-
- if (logcmd)
- {
- int texwshift = (val2 >> 6) & 7;
- logerror(" -- model @ %08X val2=%03X val1=%06X (w=%d bpp=%d adj=%03X%03X)\n",
- addr_and_count, val2, val1,
- 512 >> texwshift,
- (val2 & 0x20) ? 8 : 4,
- ((val1 << (7 - texwshift)) >> 10) & 0xfff,
- ((val1 << (7 - texwshift)) >> 1) & 0x1ff
- );
- }
-
- if (input_code_pressed(KEYCODE_Z)) testbit = 1;
- if (input_code_pressed(KEYCODE_X)) testbit = 2;
- if (input_code_pressed(KEYCODE_C)) testbit = 3;
- if (input_code_pressed(KEYCODE_V)) testbit = 4;
- if (input_code_pressed(KEYCODE_B)) testbit = 5;
- if (input_code_pressed(KEYCODE_N)) testbit = 6;
- if (input_code_pressed(KEYCODE_M)) testbit = 7;
-
- if (testbit != 0)
- texwshift = testbit;
-
- while (1)
- {
- 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)
- {
- UINT8 cmd = data[datanum] >> 24;
- int offs;
-
- length = (cmd == 0x25 || cmd == 0x30) ? 7 : 1;
-
- if (logcmd)
- {
- logerror("\t");
- for (offs = 0; offs < length; offs++)
- logerror("%08X %08X ", (UINT32)data[datanum + offs], (UINT32)(data[datanum + offs] >> 32));
- logerror("\n");
- }
-
- 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 + 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;
-
- 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);
- 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]);
- }
-
- numverts = poly_zclip_if_less(4, &vert[0], &clipvert[0], 3, 0.0f);
- if (numverts < 3)
- continue;
-
- 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->texwidth = 512 >> texwshift;
- extra->texbase = waveram_ptr_from_texture_addr(0, val1, extra->texwidth);
- extra->palbase = zeus_palbase;
- extra->alpha = zeus_blend;
-
- if (single_step)
- {
- single_step_extra = *extra;
- single_step_val1 = val1;
- single_step_val2 = val2;
- single_step_dx = single_step_dy = 0;
- single_step_advance = FALSE;
- }
-
- poly_render_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 ((UINT32)data[datanum] == 0x0c018000/* mk4 */ || (UINT32)data[datanum] == 0x0c008000/* invasn */)
- next_addr_and_count = data[datanum] >> 32;
- }
- if (datanum != count)
- logerror("Overran data\n");
-
- if (next_addr_and_count == 0)
- break;
- else
- addr_and_count = next_addr_and_count;
- }
-}
-
+/*************************************
+ *
+ * Core read handler
+ *
+ *************************************/
READ32_HANDLER( zeus_r )
{
@@ -1176,9 +368,12 @@ READ32_HANDLER( zeus_r )
result = zeusbase[0x08];
break;
+ case 0xf0:
+ result = video_screen_get_hpos(0);
+ logit = 0;
+ break;
+
case 0xf2:
- // polled frequently during gametime; expected to change often
- // as it is polled multiple times and a consistent value is looked for
result = video_screen_get_vpos(0);
logit = 0;
break;
@@ -1229,6 +424,13 @@ READ32_HANDLER( zeus_r )
}
+
+/*************************************
+ *
+ * Core write handler
+ *
+ *************************************/
+
WRITE32_HANDLER( zeus_w )
{
int logit = zeus_enable_logging || ((offset < 0xb0 || offset > 0xb7) && (offset < 0xe0 || offset > 0xe1));
@@ -1238,27 +440,98 @@ WRITE32_HANDLER( zeus_w )
/* 32-bit mode */
if (zeusbase[0x80] & 0x00020000)
- zeus_write_32bit(offset, data, logit);
+ zeus_register32_w(offset, data, logit);
/* 16-bit mode */
else
- zeus_write_16bit(offset, data, logit);
+ zeus_register16_w(offset, data, logit);
}
READ32_HANDLER( zeus2_r )
{
+ logerror("%06X:zeus_r(%02X)\n", activecpu_get_pc(), offset * 2);
return zeus_r(offset * 2, 0);
}
WRITE32_HANDLER( zeus2_w )
{
- zeus_w(offset * 2, data, mem_mask);
+ logerror("%06X:zeus_w(%02X) = %08X\n", activecpu_get_pc(), offset * 2, data);
}
-static void zeus_write_16bit(offs_t offset, UINT16 data, int logit)
+
+/*************************************
+ *
+ * Handle writes to an internal
+ * pointer register
+ *
+ *************************************/
+
+static void zeus_pointer_w(UINT32 which, UINT32 data, int logit)
+{
+ switch (which & 0xffffff)
+ {
+ case 0x008000:
+ case 0x018000:
+ if (logit)
+ logerror(" -- setptr(objdata)\n");
+ zeus_objdata = data;
+ break;
+
+ // case 0x00c040: -- set in model data in invasn
+ case 0x00c040:
+ if (logit)
+ logerror(" -- setptr(palbase)\n");
+ zeus_palbase = waveram_ptr_from_block_addr(0, data);
+ break;
+
+
+ // case 0x004040: -- set via FIFO command in mk4 (len=02)
+
+ // case 0x02c0f0: -- set in model data in mk4 (len=0f)
+ // case 0x03c0f0: -- set via FIFO command in mk4 (len=00)
+
+ // case 0x02c0e7: -- set via FIFO command in mk4 (len=08)
+
+ // case 0x04c09c: -- set via FIFO command in mk4 (len=08)
+
+ // case 0x05c0a5: -- set via FIFO command in mk4 (len=21)
+ // case 0x80c0a5: -- set via FIFO command in mk4 (len=3f)
+ // case 0x81c0a5: -- set via FIFO command in mk4 (len=35)
+ // case 0x82c0a5: -- set via FIFO command in mk4 (len=41)
+
+
+ // case 0x00c0f0: -- set via FIFO command in invasn (len=0f)
+
+ // case 0x00c0b0: -- set via FIFO command in invasn (len=3f) -- seems to be the same as c0a5
+ // case 0x05c0b0: -- set via FIFO command in invasn (len=21)
+
+ // case 0x00c09c: -- set via FIFO command in invasn (len=06)
+
+ // case 0x00c0a3: -- set via FIFO command in invasn (len=0a)
+
+
+ default:
+ if (logit)
+ logerror(" -- setptr(%06X)\n", which & 0xffffff);
+ break;
+ }
+
+ if (logit)
+ log_waveram(data);
+}
+
+
+
+/*************************************
+ *
+ * Handle register writes
+ *
+ *************************************/
+
+static void zeus_register16_w(offs_t offset, UINT16 data, int logit)
{
/* writes to register $CC need to force a partial update */
if ((offset & ~1) == 0xcc)
@@ -1278,11 +551,11 @@ static void zeus_write_16bit(offs_t offset, UINT16 data, int logit)
/* handle the update */
if ((offset & 1) == 0)
- zeus_process_write(offset);
+ zeus_register_update(offset);
}
-static void zeus_write_32bit(offs_t offset, UINT32 data, int logit)
+static void zeus_register32_w(offs_t offset, UINT32 data, int logit)
{
/* writes to register $CC need to force a partial update */
if ((offset & ~1) == 0xcc)
@@ -1304,151 +577,26 @@ static void zeus_write_32bit(offs_t offset, UINT32 data, int logit)
/* handle the update */
if ((offset & 1) == 0)
- zeus_process_write(offset);
+ zeus_register_update(offset);
}
-/*
-
- New analysis:
-
- Offset
- ------
-
- $06 W Low 16 bits = texture mode
-
- $58 W Usually written after $5A; after writing, waits for $F6 bit 4 to be cleared
-
- $5A W Usually written first, followed by $58
-
- $68 W Written at startup:
- $00030000 = toggled on then off at startup
-
- $76 W
-
- $7C W
-
- $80 W Master control
-
- $40000000 = set along with $02000000 when enabling FIFO empty interrupt
- $02000000 = enable internal data FIFO empty interrupt
- $01000000 = cleared along with $02000000 when disabling FIFO empty interrupt
- $00020000 = 16-bit (0) or 32-bit (1) mode
- $00000080 = set just before writing direct command to $60
- $00000040 = set just before writing direct command to $60
- $00000008 = cleared just before writing to offsets $200-$3FF
-
- $82 W
- $84 W
-
- $00000080 = render page? (generally set when $CC is set to $000000 and clear when $CC is set to $800000)
-
- $86 W
- $88 W
- $8A W
- $8C W
- $8E W
-
- $B0 R/W Data port for direct RAM access
- $B2 R/W Data port for direct RAM access
-
- $B4 W Address for direct RAM access
-
- $07FF0100 = mask for Y coordinate
- $000000FF = mask for X coordinate
-
- $B6 W Direct RAM access control
-
- $80000000 = enable writes to wave RAM 0
- $40000000 = enable writes to wave RAM 1
- $02000000 = perform access on write to B0(0) or B2(1) ?????
- $00800000 = enable writes from [$B2] to depth buffer
- $00400000 = enable writes from [$B0] to depth buffer
- $00200000 = enable writes from [$B2] to RAM buffer
- $00100000 = enable writes from [$B0] to RAM buffer
- $00020000 = auto increment the address
- $00010000 = perform a read when the address is written
- $00000001 = enable direct RAM access
-
- Examples:
- $80A00000 when writing a single pixel (address written each time)
- $80A20001 when writing the right pixel of a pair (autoinc assumed)
- $80F60001 when writing the middle pairs of pixels (autoinc assumed)
- $80520001 when writing the left pixel of a pair (autoinc assumed)
- $82F00001 when testing wave RAM page 1 (address written each pair)
- $42F00001 when testing wave RAM page 0 (address written each pair)
- $82F60001 when uploading to wave RAM page 1 (autoinc assumed)
- $42F60001 when uploading to wave RAM page 0 (autoinc assumed)
-
- $C0 W Written at startup = $801F2500
- $C2 W Written at startup = $0015E591
- $C4 W Written at startup = $000C0042 (HSYNC start/HSYNC end?)
- $C6 W Written at startup = $0211007F (HTOTAL/HBLANK end?)
- $C8 W Written at startup = $010300FF (VSYNC start/VBLANK start?)
- $CA W Written at startup = $01160107 (VTOTAL/VSYNC end?)
- $CC W Written at startup = $00000000 (display start address? switches to $00800000)
- $CE W Written at startup = $00C87620
-
- $E0 W Internal data FIFO
-
- $F2 R Looped on until it returns a stable value; must change frequently; PRNG?
-
- $F4 R Status register
-
- $00000800 = VBLANK? code waits for it to clear to 0 and then reset to 1
- $00000140 = tested together in tight loop until both are 0
- $00000008 = internal data FIFO full
- $00000004 = tested in tight loop along with $00000002 until at least one is set
- $00000002 = tested in tight loop after handling FIFO interrupt until set
-
- $F6 R Status register 2
-
- $00000010 = tested in tight loop after writing 5A/59/58 until set to 0
- $200- W Unknown, but written in a loop with master control bit $00000008 cleared
- $3FF Possible fast buffer clear? One set of writes stores $7F7F to all entries.
- A second set writes $E00,$25,$E01,$25,...,$E7F,$25. A third set writes
- $52,$A0000000,...
-
-Notes:
-
- In 16-bit mode, writes to $E0 are done via $E1 first then $E0
-
--------------------------------------------------------
-
-Old info:
-
- offset B7 = control....
-
- 8000 = page 1 enable
- 4000 = page 0 enable
-
- 0080 = 2nd pixel enable (maybe Z buff?)
- 0040 = 1st pixel enable (maybe Z buff?)
- 0020 = 2nd pixel enable
- 0010 = 1st pixel enable
-
-
- writes 80a2 to write an odd pixel at startup
- writes 80f6 to write the middle pixels
- writes 8052 to write an odd pixel at the end
-
- writes 8050 before writing an odd pixel
- writes 80a0 before writing an even pixel
-
- writes 44f1 before reading from page 0 of wave ram
- writes 84f1 before reading from page 1 of wave ram
-
- writes 42f0 before writing to page 0 of wave ram
- writes 82f0 before writing to page 1 of wave ram
-
-*/
+/*************************************
+ *
+ * Update state after a register write
+ *
+ *************************************/
-static void zeus_process_write(offs_t offset)
+static void zeus_register_update(offs_t offset)
{
/* handle the writes; only trigger on low accesses */
switch (offset)
{
+ case 0x52:
+ zeusbase[0xb2] = zeusbase[0x52];
+ break;
+
case 0x60:
/* invasn writes here to execute a command (?) */
if (zeusbase[0x60] & 1)
@@ -1489,20 +637,45 @@ static void zeus_process_write(offs_t offset)
vert[3].x = (INT16)zeusbase[0x0e];
vert[3].y = (INT16)(zeusbase[0x0e] >> 16);
- extra->transcolor = zeusbase[0x00];
+ extra->solidcolor = zeusbase[0x00];
+ extra->zoffset = 0x7fff;
- poly_render_quad(poly, NULL, &Machine->screen[0].visarea, render_poly_solid, 0, &vert[0], &vert[1], &vert[2], &vert[3]);
+ poly_render_quad(poly, NULL, &zeus_cliprect, render_poly_solid_fixedz, 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");
}
else
logerror("Execute unknown command\n");
}
break;
+ case 0x70:
+ zeus_point[0] = zeusbase[0x70] << 16;
+ break;
+
+ case 0x72:
+ zeus_point[1] = zeusbase[0x72] << 16;
+ break;
+
+ case 0x74:
+ zeus_point[2] = zeusbase[0x74] << 16;
+ break;
+
+ case 0x80:
+ /* this bit enables the "FIFO empty" IRQ; since our virtual FIFO is always empty,
+ we simply assert immediately if this is enabled. invasn needs this for proper
+ operations */
+ if (zeusbase[0x80] & 0x02000000)
+ cpunum_set_input_line(0, 2, ASSERT_LINE);
+ else
+ cpunum_set_input_line(0, 2, CLEAR_LINE);
+ 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 0xb0:
case 0xb2:
if ((zeusbase[0xb6] >> 16) != 0)
@@ -1534,335 +707,724 @@ static void zeus_process_write(offs_t offset)
}
break;
- case 0x70:
- zeus_point[0] = zeusbase[0x70] << 16;
+ case 0xc0:
+ case 0xc2:
+ case 0xc4:
+ case 0xc6:
+ case 0xc8:
+ case 0xca:
+ video_screen_update_partial(0, video_screen_get_vpos(0));
+ {
+ int vtotal = zeusbase[0xca] >> 16;
+ int htotal = zeusbase[0xc6] >> 16;
+ rectangle visarea;
+
+ visarea.min_x = zeusbase[0xc6] & 0xffff;
+ visarea.max_x = htotal - 1;
+ visarea.min_y = 0;
+ visarea.max_y = zeusbase[0xc8] & 0xffff;
+ if (htotal > 0 && vtotal > 0 && visarea.min_x < visarea.max_x && visarea.max_y < vtotal)
+ {
+ video_screen_configure(0, htotal, vtotal, &visarea, HZ_TO_ATTOSECONDS((double)MIDZEUS_VIDEO_CLOCK / 8.0 / (htotal * vtotal)));
+ zeus_cliprect = visarea;
+ zeus_cliprect.max_x -= zeus_cliprect.min_x;
+ zeus_cliprect.min_x = 0;
+ }
+ }
break;
- case 0x72:
- zeus_point[1] = zeusbase[0x72] << 16;
+ case 0xcc:
+ video_screen_update_partial(0, video_screen_get_vpos(0));
+
+ log_fifo = input_code_pressed(KEYCODE_L);
+// single_step = input_code_pressed(KEYCODE_S);
+ if (single_step)
+ popmessage("Single Step");
break;
- case 0x74:
- zeus_point[2] = zeusbase[0x74] << 16;
+ case 0xe0:
+ zeus_fifo[zeus_fifo_words++] = zeusbase[0xe0];
+ if (zeus_fifo_process(zeus_fifo, zeus_fifo_words))
+ zeus_fifo_words = 0;
break;
+ }
+}
+
- case 0x4e:
- zeus_blend = zeusbase[0x4e];
+
+/*************************************
+ *
+ * Process the FIFO
+ *
+ *************************************/
+
+static int zeus_fifo_process(const UINT32 *data, int numwords)
+{
+ /* handle logging */
+ switch (data[0] >> 24)
+ {
+ /* 0x00/0x01: set pointer */
+ /* in model data, this is 0x0C */
+ case 0x00:
+ case 0x01:
+ if (numwords < 2 && data[0] != 0)
+ return FALSE;
+ if (log_fifo)
+ log_fifo_command(data, numwords, "");
+ zeus_pointer_w(data[0] & 0xffffff, data[1], log_fifo);
break;
- case 0x52:
- zeusbase[0xb2] = zeusbase[0x52];
+ /* 0x13: render model based on previously set information */
+ case 0x13: /* invasn */
+ if (log_fifo)
+ log_fifo_command(data, numwords, "");
+ zeus_draw_model((zeusbase[0x06] << 16), log_fifo);
break;
- case 0xcc:
- video_screen_update_partial(0, video_screen_get_vpos(0));
+ /* 0x17: write 16-bit value to low registers */
+ case 0x17:
+ if (log_fifo)
+ log_fifo_command(data, numwords, " -- reg16");
+ zeus_register16_w((data[0] >> 16) & 0x7f, data[0], log_fifo);
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);
+ /* 0x18: write 32-bit value to low registers */
+ /* in model data, this is 0x19 */
+ case 0x18:
+ if (numwords < 2)
+ return FALSE;
+ if (log_fifo)
+ log_fifo_command(data, numwords, " -- reg32");
+ zeus_register32_w((data[0] >> 16) & 0x7f, data[1], log_fifo);
break;
- case 0xe0:
- zeuscmd_buffer[zeuscmd_buffer_words++] = zeusbase[0xe0];
- if (zeuscmd_buffer_words == 1)
- zeuscmd_buffer_expected_words = zeuscmd_length(zeusbase[0xe0]);
- if (zeuscmd_buffer_words == zeuscmd_buffer_expected_words)
+ /* 0x1A: sync pipeline(?) */
+ case 0x1a:
+ if (log_fifo)
+ log_fifo_command(data, numwords, " -- sync\n");
+ break;
+
+ /* 0x1C: write matrix and translation vector */
+ case 0x1c:
+ if ((data[0] & 0xffff) != 0x7fff)
+ {
+ if (numwords < 8)
+ return FALSE;
+ if (log_fifo)
+ {
+ log_fifo_command(data, numwords, "");
+ logerror("\n\t\tmatrix ( %04X %04X %04X ) ( %04X %04X %04X ) ( %04X %04X %04X )\n\t\tvector %8.2f %8.2f %8.5f\n",
+ data[2] & 0xffff,
+ data[2] >> 16,
+ data[0] & 0xffff,
+ data[3] & 0xffff,
+ data[3] >> 16,
+ data[1] >> 16,
+ data[4] & 0xffff,
+ data[4] >> 16,
+ data[1] & 0xffff,
+ (float)(INT32)data[5] * (1.0f / 65536.0f),
+ (float)(INT32)data[6] * (1.0f / 65536.0f),
+ (float)(INT32)data[7] * (1.0f / (65536.0f * 512.0f)));
+ }
+
+ zeus_matrix[0][0] = data[2];
+ zeus_matrix[0][1] = data[2] >> 16;
+ zeus_matrix[0][2] = data[0];
+ zeus_matrix[1][0] = data[3];
+ zeus_matrix[1][1] = data[3] >> 16;
+ zeus_matrix[1][2] = data[1] >> 16;
+ zeus_matrix[2][0] = data[4];
+ zeus_matrix[2][1] = data[4] >> 16;
+ zeus_matrix[2][2] = data[1];
+
+ zeus_usematrix2 = FALSE;
+
+ zeus_point[0] = data[5];
+ zeus_point[1] = data[6];
+ zeus_point[2] = data[7];
+ }
+ else
{
- zeuscmd_execute(zeuscmd_buffer_expected_words);
- zeuscmd_buffer_words = 0;
+ if (numwords < 13)
+ return FALSE;
+ if (log_fifo)
+ {
+ log_fifo_command(data, numwords, "");
+ logerror("\n\t\tmatrix ( %04X %04X %04X ) ( %04X %04X %04X ) ( %04X %04X %04X )\n\t\tmatrix ( %04X %04X %04X ) ( %04X %04X %04X ) ( %04X %04X %04X )\n\t\tvector %8.2f %8.2f %8.5f\n",
+ data[3] & 0xffff,
+ data[3] >> 16,
+ data[7] & 0xffff,
+ data[5] & 0xffff,
+ data[6] & 0xffff,
+ data[2] >> 16,
+ data[1] & 0xffff,
+ data[1] >> 16,
+ data[2] & 0xffff,
+ data[4] & 0xffff,
+ data[4] >> 16,
+ data[5] >> 16,
+ data[8] & 0xffff,
+ data[8] >> 16,
+ data[6] >> 16,
+ data[9] & 0xffff,
+ data[9] >> 16,
+ data[7] >> 16,
+ (float)(INT32)data[10] * (1.0f / 65536.0f),
+ (float)(INT32)data[11] * (1.0f / 65536.0f),
+ (float)(INT32)data[12] * (1.0f / (65536.0f * 512.0f)));
+ }
+
+ zeus_matrix[0][0] = data[3];
+ zeus_matrix[0][1] = data[3] >> 16;
+ zeus_matrix[0][2] = data[7];
+ zeus_matrix[1][0] = data[5];
+ zeus_matrix[1][1] = data[6];
+ zeus_matrix[1][2] = data[2] >> 16;
+ zeus_matrix[2][0] = data[1];
+ zeus_matrix[2][1] = data[1] >> 16;
+ zeus_matrix[2][2] = data[2];
+
+ zeus_matrix2[0][0] = data[4];
+ zeus_matrix2[0][1] = data[4] >> 16;
+ zeus_matrix2[0][2] = data[5] >> 16;
+ zeus_matrix2[1][0] = data[8];
+ zeus_matrix2[1][1] = data[8] >> 16;
+ zeus_matrix2[1][2] = data[6] >> 16;
+ zeus_matrix2[2][0] = data[9];
+ zeus_matrix2[2][1] = data[9] >> 16;
+ zeus_matrix2[2][2] = data[7] >> 16;
+ zeus_usematrix2 = TRUE;
+
+ zeus_point[0] = data[10];
+ zeus_point[1] = data[11];
+ zeus_point[2] = data[12];
}
break;
+
+ /* 0x23: some additional X,Y,Z coordinates */
+ /* 0x2e: save for invasn */
+ case 0x23:
+ case 0x2e:
+ if (numwords < 2)
+ return FALSE;
+ if (log_fifo)
+ {
+ log_fifo_command(data, numwords, "");
+ logerror(" -- additional xyz = %d,%d,%d\n", (INT16)data[0], (INT16)(data[1] >> 16), (INT16)data[1]);
+ }
+ break;
+
+ /* 0x25: display control? */
+ /* 0x30: same for invasn */
+ case 0x25:
+ case 0x30:
+ if (numwords < 4 || ((data[0] & 0x808000) && numwords < 10))
+ return FALSE;
+ if (log_fifo)
+ log_fifo_command(data, numwords, " -- unknown control + hack clear screen\n");
+ if ((data[0] & 0xffff7f) == 0)
+ {
+ /* not right -- just a hack */
+ int x, y;
+ for (y = zeus_cliprect.min_y; y <= zeus_cliprect.max_y; y++)
+ for (x = zeus_cliprect.min_x; x <= zeus_cliprect.max_x; x++)
+ waveram_plot_depth(y, x, 0, 0x7fff);
+ }
+ break;
+
+ /* 0x2d: unknown - invasn */
+ /* 0x70: same for mk4 */
+ case 0x2d:
+ case 0x70:
+ if (log_fifo)
+ log_fifo_command(data, numwords, "\n");
+ break;
+
+ /* 0x67: render model with inline texture info */
+ case 0x67:
+ if (numwords < 3)
+ return FALSE;
+ if (log_fifo)
+ log_fifo_command(data, numwords, "");
+ zeus_objdata = data[1];
+ zeus_draw_model(data[2], log_fifo);
+ break;
+
+ default:
+ printf("Unknown command %08X\n", data[0]);
+ if (log_fifo)
+ log_fifo_command(data, numwords, "\n");
+ break;
}
+ return TRUE;
}
-static void log_waveram(UINT32 length_and_base)
+
+/*************************************
+ *
+ * Draw a model in waveram
+ *
+ *************************************/
+
+static void zeus_draw_model(UINT32 texdata, int logit)
{
- static struct
- {
- UINT32 lab;
- UINT64 checksum;
- } recent_entries[100];
+ UINT32 databuffer[32];
+ int databufcount = 0;
+ int model_done = FALSE;
- UINT32 numoctets = (length_and_base >> 24) + 1;
- const UINT64 *ptr = waveram_ptr_from_block_addr(0, length_and_base);
- UINT64 checksum = length_and_base;
- int foundit = FALSE;
- int i;
+ if (logit)
+ logerror(" -- model @ %08X\n", zeus_objdata);
- for (i = 0; i < numoctets; i++)
- checksum += ptr[i];
+ while (zeus_objdata != 0 && !model_done)
+ {
+ const UINT64 *data = waveram_ptr_from_block_addr(0, zeus_objdata);
+ int count = (zeus_objdata >> 24) + 1;
- for (i = 0; i < ARRAY_LENGTH(recent_entries); i++)
- if (recent_entries[i].lab == length_and_base && recent_entries[i].checksum == checksum)
+ /* reset the objdata address */
+ zeus_objdata = 0;
+
+ /* loop until we run out of data */
+ while (count--)
{
- foundit = TRUE;
- break;
- }
+ int countneeded;
+ UINT8 cmd;
- if (i == ARRAY_LENGTH(recent_entries))
- i--;
- if (i != 0)
- {
- memmove(&recent_entries[1], &recent_entries[0], i * sizeof(recent_entries[0]));
- recent_entries[0].lab = length_and_base;
- recent_entries[0].checksum = checksum;
- }
- if (foundit)
- return;
+ /* accumulate 2 words of data */
+ databuffer[databufcount++] = *data;
+ databuffer[databufcount++] = *data++ >> 32;
- for (i = 0; i < numoctets; i++)
- logerror("\t%02X: %08X %08X\n", i, (UINT32)ptr[i], (UINT32)(ptr[i] >> 32));
+ /* if this is enough, process the command */
+ cmd = databuffer[0] >> 24;
+ countneeded = (cmd == 0x25 || cmd == 0x30) ? 14 : 2;
+ if (databufcount == countneeded)
+ {
+ /* handle logging of the command */
+ if (logit)
+ {
+ int offs;
+ logerror("\t");
+ for (offs = 0; offs < databufcount; offs++)
+ logerror("%08X ", databuffer[offs]);
+ logerror("-- ");
+ }
+
+ /* handle the command */
+ switch (cmd)
+ {
+ case 0x08:
+ if (logit)
+ logerror("end of model\n");
+ model_done = TRUE;
+ break;
+
+ case 0x0c: /* mk4/invasn */
+ zeus_pointer_w(databuffer[0] & 0xffffff, databuffer[1], logit);
+ break;
+
+ case 0x17: /* mk4 */
+ if (logit)
+ logerror("reg16");
+ zeus_register16_w((databuffer[0] >> 16) & 0x7f, databuffer[0], logit);
+ if (((databuffer[0] >> 16) & 0x7f) == 0x06)
+ texdata = (texdata & 0xffff) | (zeusbase[0x06] << 16);
+ break;
+
+ case 0x19: /* invasn */
+ if (logit)
+ logerror("reg32");
+ zeus_register32_w((databuffer[0] >> 16) & 0x7f, databuffer[1], logit);
+ if (((databuffer[0] >> 16) & 0x7f) == 0x06)
+ texdata = (texdata & 0xffff) | (zeusbase[0x06] << 16);
+ break;
+
+ case 0x25: /* mk4 */
+ case 0x30: /* invasn */
+ zeus_draw_quad(databuffer, texdata, logit);
+ break;
+
+ default:
+ if (logit)
+ logerror("unknown\n");
+ break;
+ }
+
+ /* reset the count */
+ databufcount = 0;
+ }
+ }
+ }
}
-static void zeuscmd_execute(int words)
+
+/*************************************
+ *
+ * Draw a quad
+ *
+ *************************************/
+
+static void zeus_draw_quad(const UINT32 *databuffer, UINT32 texdata, int logit)
{
- static int colorcount;
- int logcmd = input_code_pressed(KEYCODE_L);
- int wordnum;
+ poly_draw_scanline callback;
+ poly_extra_data *extra;
+ poly_vertex clipvert[8];
+ poly_vertex vert[4];
+ float uscale, vscale;
+ int val1, val2, texwshift;
+ int numverts;
+ int i;
-/* command observations:
+/*
+int testbit = 0;
+
+if (input_code_pressed(KEYCODE_Z)) testbit = 0x01;
+if (input_code_pressed(KEYCODE_X)) testbit = 0x02;
+if (input_code_pressed(KEYCODE_C)) testbit = 0x04;
+if (input_code_pressed(KEYCODE_V)) testbit = 0x08;
+if (input_code_pressed(KEYCODE_B)) testbit = 0x10;
+if (input_code_pressed(KEYCODE_N)) testbit = 0x20;
+if (input_code_pressed(KEYCODE_M)) testbit = 0x40;
+if (input_code_pressed(KEYCODE_COMMA)) testbit = 0x80;
+if (input_code_pressed(KEYCODE_STOP)) testbit = 0x100;
+*/
+ /* doesn't seem to matter if it is 0x21 or 0x23 */
+// if ((databuffer[1] >> 24) == 0x21 || (databuffer[1] >> 24) == 0x23)
+ texdata = (texdata & 0xffff0000) | ((texdata + databuffer[1]) & 0xffff);
- 0x18800000 | (reg << 16), <data>:
+ val1 = ((texdata >> 10) & 0x3f0000) | (texdata & 0xffff);
+ val2 = (texdata >> 16) & 0x3ff;
+ texwshift = (val2 >> 6) & 7;
- 18F80000 00000C88 -- similar to write to $78 = 00000C78
- 18FA0000 00808000 -- similar to write to $7A = 00800000
- 18C80000 00FF018E -- similar to write to $48 = 00FF0190
- 18CA0000 00FF18E0 -- similar to write to $4A = 00FF1900
+ uscale = (8 >> ((zeusbase[0x04] >> 4) & 3)) * 0.125f * 256.0f;
+ vscale = (8 >> ((zeusbase[0x04] >> 6) & 3)) * 0.125f * 256.0f;
- -- during setup/text screen
- 187E0000 0000FFFF FF980000
- 18C80000 01FF01FF 00FF018E
- 18CA0000 01FF1FF0 00FF18E0
- 18CC0000 00808080
- 18CE0000 00000080 00FFFFFF
- 18D60000 500A00FF
- 18EC0000 003B002F
- 18EE0000 00320031
- 18F80000 00000C88
- 18FA0000 00808000
+ if ((databuffer[1] & 0x000c0000) == 0x000c0000)
+ callback = render_poly_solid;
+ else if (val2 == 0x182)
+ callback = render_poly_shade;
+ else if (val2 & 0x20)
+ callback = render_poly_8bit;
+ else
+ callback = render_poly_4bit;
- -- after text screen
- 187E0000 0000FFFF FF980000
- 18CE0000 0000007B(ramp down to 0) 00FFFFFF
- 18D60000 500A00FF
+ for (i = 0; i < 4; i++)
+ {
+ UINT32 ixy = databuffer[2 + i*2];
+ UINT32 iuvz = databuffer[3 + i*2];
+ INT64 x = (INT16)ixy << 14;
+ INT64 y = (INT16)(ixy >> 16) << 14;
+ INT64 z = (INT16)iuvz << 14;
+ UINT8 u = iuvz >> 16;
+ UINT8 v = iuvz >> 24;
+ INT32 xo, yo, zo;
+/*
+ if (zeus_usematrix2)
+ {
+ xo = x >> 14;
+ yo = y >> 14;
+ zo = z >> 14;
+ x = (INT64)(xo * zeus_matrix2[0][0]) + (INT64)(yo * zeus_matrix2[0][1]) + (INT64)(zo * zeus_matrix2[0][2]);
+ y = (INT64)(xo * zeus_matrix2[1][0]) + (INT64)(yo * zeus_matrix2[1][1]) + (INT64)(zo * zeus_matrix2[1][2]);
+ z = (INT64)(xo * zeus_matrix2[2][0]) + (INT64)(yo * zeus_matrix2[2][1]) + (INT64)(zo * zeus_matrix2[2][2]);
+ }
+ */
+ xo = x >> 14;
+ yo = y >> 14;
+ zo = z >> 14;
+ x = (INT64)(xo * zeus_matrix[0][0]) + (INT64)(yo * zeus_matrix[0][1]) + (INT64)(zo * zeus_matrix[0][2]);
+ y = (INT64)(xo * zeus_matrix[1][0]) + (INT64)(yo * zeus_matrix[1][1]) + (INT64)(zo * zeus_matrix[1][2]);
+ z = (INT64)(xo * zeus_matrix[2][0]) + (INT64)(yo * zeus_matrix[2][1]) + (INT64)(zo * zeus_matrix[2][2]);
+
+ x += zeus_point[0];
+ y += zeus_point[1];
+ z += zeus_point[2];
+
+ vert[i].x = x;
+ vert[i].y = y;
+ vert[i].p[0] = z;
+ vert[i].p[1] = u * uscale;
+ vert[i].p[2] = v * vscale;
- 0x17:
+ if (logit)
+ {
+ if (i == 0) logerror("quad\n");
+ logerror("\t\t(%f,%f,%f) (%02X,%02X) (%03X,%03X,%03X)\n",
+ vert[i].x * (1.0f / 65536.0f), vert[i].y * (1.0f / 65536.0f), vert[i].p[0] * (1.0f / 65536.0f),
+ (int)vert[i].p[1], (int)vert[i].p[2],
+ (databuffer[10 + i] >> 20) & 0x3ff, (databuffer[10 + i] >> 10) & 0x3ff, (databuffer[10 + i] >> 0) & 0x3ff);
+ }
+ }
- 1707FFFF
- 1752159D
- 17680070 17681370
- 176940C4
- 1770xxxx - set x coordinate
- 1772yyyy - set y coordinate
- 1774zzzz - set z coordinate
+ numverts = poly_zclip_if_less(4, &vert[0], &clipvert[0], 3, 512.0f);
+ if (numverts < 3)
+ return;
- 0x00:
+ for (i = 0; i < numverts; i++)
+ {
+ float ooz = 512.0f / clipvert[i].p[0];
- 0004C09C 08001026
- 0002C0E7 0800101C
- 0003C0F0 00001025
- 0080C0A5 3F00102F
- 0005C0A5 21001125
- 0000C040 0318E132 - set palette base
+ clipvert[i].x *= ooz;
+ clipvert[i].y *= ooz;
+ clipvert[i].x += 200.0f;
+ clipvert[i].y += 128.0f;
+ }
- command 25:
+ extra = poly_get_extra_data(poly);
+ extra->solidcolor = zeusbase[0x00] & 0x7fff;
+ extra->zoffset = zeusbase[0x7e] >> 16;
+ extra->alpha = zeusbase[0x4e];
+ extra->transcolor = ((databuffer[1] >> 16) & 1) ? 0 : 0x100;
+ extra->texwidth = 512 >> texwshift;
+ extra->texbase = waveram_ptr_from_texture_addr(0, val1, extra->texwidth);
+ extra->palbase = zeus_palbase;
- 25000000 007F0018 01000400 B0F60008 -- during diagnostics screen
- 25000080 007F0018 01000400 B0F60008 -- alternate frames during text screen
+ if (single_step)
+ {
+ single_step_extra = *extra;
+ single_step_val1 = val1;
+ single_step_val2 = val2;
+ single_step_dx = single_step_dy = 0;
+ single_step_advance = FALSE;
+ }
- 25008000 0000F833 A8040E4C 0000F8C0 A8FC0BD9 0000F731 08FC0B7F 0000F6A4 08040DF2 21010000
- 25800000 FE58FD0C 00000000 FE58FD10 00000000 FE74FD10 00000000 FE74FD0C 00000000 200C0000
+ poly_render_quad_fan(poly, NULL, &zeus_cliprect, callback, 3, numverts, &clipvert[0]);
+ poly_wait(poly, "Normal");
+ if (single_step)
+ while (!single_step_advance) video_frame_update(TRUE);
+}
- write to ($60) = 1 after setting up:
-*/
+/*************************************
+ *
+ * Rasterizers
+ *
+ *************************************/
- if (logcmd)
+static void render_poly_4bit(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid)
+{
+ const poly_extra_data *extra = extradata;
+ INT32 curz = extent->param[0].start;
+ INT32 curu = extent->param[1].start;
+ INT32 curv = extent->param[2].start;
+ INT32 dzdx = extent->param[0].dpdx;
+ INT32 dudx = extent->param[1].dpdx;
+ INT32 dvdx = extent->param[2].dpdx;
+ const UINT64 *texbase = extra->texbase;
+ const UINT64 *palbase = extra->palbase;
+ UINT16 transcolor = extra->transcolor;
+ int texwidth = extra->texwidth;
+ int x;
+
+ for (x = extent->startx; x < extent->stopx; x++)
{
- logerror("Zeus cmd %02X :", zeuscmd_buffer[0] >> 24);
- for (wordnum = 0; wordnum < words; wordnum++)
- logerror(" %08X", zeuscmd_buffer[wordnum]);
+ UINT16 *depthptr;
+ UINT16 *ptr = waveram_pixel_ptr(zeus_renderbase, scanline, x, &depthptr);
+ INT32 depth = (curz >> 16) + extra->zoffset;
+ if (depth > 0x7fff) depth = 0x7fff;
+ if (depth >= 0 && depth <= *depthptr)
+ {
+ int u0 = (curu >> 8);// & (texwidth - 1);
+ int v0 = (curv >> 8);// & 255;
+ int u1 = (u0 + 1);
+ int v1 = (v0 + 1);
+ UINT8 texel0 = get_texel_4bit(texbase, v0, u0, texwidth);
+ UINT8 texel1 = get_texel_4bit(texbase, v0, u1, texwidth);
+ UINT8 texel2 = get_texel_4bit(texbase, v1, u0, texwidth);
+ UINT8 texel3 = get_texel_4bit(texbase, v1, u1, texwidth);
+ if (texel0 != transcolor)
+ {
+ rgb_t color0 = get_palette_entry(palbase, texel0);
+ rgb_t color1 = get_palette_entry(palbase, texel1);
+ rgb_t color2 = get_palette_entry(palbase, texel2);
+ rgb_t color3 = get_palette_entry(palbase, texel3);
+ rgb_t filtered;
+ color0 = ((color0 & 0x7fe0) << 6) | (color0 & 0x1f);
+ color1 = ((color1 & 0x7fe0) << 6) | (color1 & 0x1f);
+ color2 = ((color2 & 0x7fe0) << 6) | (color2 & 0x1f);
+ color3 = ((color3 & 0x7fe0) << 6) | (color3 & 0x1f);
+ filtered = rgb_bilinear_filter(color0, color1, color2, color3, curu, curv);
+ *ptr = ((filtered >> 6) & 0x7fe0) | (filtered & 0x1f);
+ *depthptr = depth;
+ }
+ }
+
+ curz += dzdx;
+ curu += dudx;
+ curv += dvdx;
}
+}
+
+
+static void render_poly_8bit(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid)
+{
+ const poly_extra_data *extra = extradata;
+ INT32 curz = extent->param[0].start;
+ INT32 curu = extent->param[1].start;
+ INT32 curv = extent->param[2].start;
+ INT32 dzdx = extent->param[0].dpdx;
+ INT32 dudx = extent->param[1].dpdx;
+ INT32 dvdx = extent->param[2].dpdx;
+ const UINT64 *texbase = extra->texbase;
+ const UINT64 *palbase = extra->palbase;
+ UINT16 transcolor = extra->transcolor;
+ int texwidth = extra->texwidth;
+ int x;
- switch (zeuscmd_buffer[0] >> 24)
+ for (x = extent->startx; x < extent->stopx; x++)
{
- /* 0x00/0x01: set pointer */
- /* in model data, this is 0x0C */
- case 0x00:
- case 0x01:
- switch (zeuscmd_buffer[0] & 0xffffff)
+ UINT16 *depthptr;
+ UINT16 *ptr = waveram_pixel_ptr(zeus_renderbase, scanline, x, &depthptr);
+ INT32 depth = (curz >> 16) + extra->zoffset;
+ if (depth > 0x7fff) depth = 0x7fff;
+ if (depth >= 0 && depth <= *depthptr)
+ {
+ int u0 = (curu >> 8);// & (texwidth - 1);
+ int v0 = (curv >> 8);// & 255;
+ int u1 = (u0 + 1);
+ int v1 = (v0 + 1);
+ UINT8 texel0 = get_texel_8bit(texbase, v0, u0, texwidth);
+ UINT8 texel1 = get_texel_8bit(texbase, v0, u1, texwidth);
+ UINT8 texel2 = get_texel_8bit(texbase, v1, u0, texwidth);
+ UINT8 texel3 = get_texel_8bit(texbase, v1, u1, texwidth);
+ if (texel0 != transcolor)
{
- case 0x008000:
- /* in model data, case 0x018000 is a goto */
- if (logcmd)
- logerror(" -- setptr(objdata)\n");
- zeus_objdata = zeuscmd_buffer[1];
- break;
-
- case 0x00c0b0:
- if (logcmd)
- logerror(" -- setptr(texdata)\n");
- zeus_texdata = zeuscmd_buffer[1];
- break;
-
- case 0x00c040:
- if (logcmd)
- logerror(" -- setptr(palbase)\n");
- zeus_palbase = waveram_ptr_from_block_addr(0, zeuscmd_buffer[1]);
- break;
-
- case 0x80c0a5:
- if (logcmd)
- logerror(" -- setptr(hack clear screen)\n");
- {
- /* not right -- just a hack */
- int x, y;
- for (y = 0; y <= 255; y++)
- for (x = 0; x <= 399; x++)
- waveram_plot_depth(y, x, 0, 0x7fff);
- colorcount = 0;
- }
- break;
-
- default:
- if (logcmd)
- logerror(" -- setptr(%06X)\n", zeuscmd_buffer[0] & 0xffffff);
- break;
+ rgb_t color0 = get_palette_entry(palbase, texel0);
+ rgb_t color1 = get_palette_entry(palbase, texel1);
+ rgb_t color2 = get_palette_entry(palbase, texel2);
+ rgb_t color3 = get_palette_entry(palbase, texel3);
+ rgb_t filtered;
+ color0 = ((color0 & 0x7fe0) << 6) | (color0 & 0x1f);
+ color1 = ((color1 & 0x7fe0) << 6) | (color1 & 0x1f);
+ color2 = ((color2 & 0x7fe0) << 6) | (color2 & 0x1f);
+ color3 = ((color3 & 0x7fe0) << 6) | (color3 & 0x1f);
+ filtered = rgb_bilinear_filter(color0, color1, color2, color3, curu, curv);
+ *ptr = ((filtered >> 6) & 0x7fe0) | (filtered & 0x1f);
+ *depthptr = depth;
}
+ }
- if (logcmd)
- log_waveram(zeuscmd_buffer[1]);
- break;
+ curz += dzdx;
+ curu += dudx;
+ curv += dvdx;
+ }
+}
- /* 0x13: render model based on previously set information */
- case 0x13: /* invasn */
- zeus_draw_model(zeus_objdata, zeus_texdata, logcmd);
- break;
- /* 0x17: write 16-bit value to low registers */
- case 0x17:
- if (logcmd)
- logerror(" -- reg16");
- zeus_write_16bit((zeuscmd_buffer[0] >> 16) & 0x7f, zeuscmd_buffer[0], logcmd);
- break;
+static void render_poly_shade(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid)
+{
+ const poly_extra_data *extra = extradata;
+ int x;
- /* 0x18: write 32-bit value to low registers */
- /* in model data, this is 0x19 */
- case 0x18:
- if (logcmd)
- logerror(" -- reg32");
- zeus_write_32bit((zeuscmd_buffer[0] >> 16) & 0x7f, zeuscmd_buffer[1], logcmd);
- break;
+ for (x = extent->startx; x < extent->stopx; x++)
+ {
+ if (x >= 0 && x < 400)
+ {
+ if (extra->alpha <= 0x80)
+ {
+ UINT16 *ptr = waveram_pixel_ptr(zeus_renderbase, scanline, x, NULL);
+ UINT16 pix = *ptr;
- /* 0x1A: sync pipeline(?) */
- case 0x1a:
- if (logcmd)
- logerror(" -- sync\n");
- break;
+ *ptr = ((((pix & 0x7c00) * extra->alpha) >> 7) & 0x7c00) |
+ ((((pix & 0x03e0) * extra->alpha) >> 7) & 0x03e0) |
+ ((((pix & 0x001f) * extra->alpha) >> 7) & 0x001f);
+ }
+ else
+ {
+ waveram_plot(scanline, x, 0);
+ }
+ }
+ }
+}
- /* 0x1C: write matrix and translation vector */
- case 0x1c:
- if (logcmd)
- logerror(" -- matrix ( %04X %04X %04X ) ( %04X %04X %04X ) ( %04X %04X %04X ) vector %8.2f %8.2f %8.5f\n",
- zeuscmd_buffer[2] & 0xffff,
- zeuscmd_buffer[2] >> 16,
- zeuscmd_buffer[0] & 0xffff,
- zeuscmd_buffer[3] & 0xffff,
- zeuscmd_buffer[3] >> 16,
- zeuscmd_buffer[1] >> 16,
- zeuscmd_buffer[4] & 0xffff,
- zeuscmd_buffer[4] >> 16,
- zeuscmd_buffer[1] & 0xffff,
- (float)(INT32)zeuscmd_buffer[5] * (1.0f / 65536.0f),
- (float)(INT32)zeuscmd_buffer[6] * (1.0f / 65536.0f),
- (float)(INT32)zeuscmd_buffer[7] * (1.0f / (65536.0f * 512.0f)));
-
- zeus_matrix[0][0] = zeuscmd_buffer[2];
- zeus_matrix[0][1] = zeuscmd_buffer[2] >> 16;
- zeus_matrix[0][2] = zeuscmd_buffer[0];
- zeus_matrix[1][0] = zeuscmd_buffer[3];
- zeus_matrix[1][1] = zeuscmd_buffer[3] >> 16;
- zeus_matrix[1][2] = zeuscmd_buffer[1] >> 16;
- zeus_matrix[2][0] = zeuscmd_buffer[4];
- zeus_matrix[2][1] = zeuscmd_buffer[4] >> 16;
- zeus_matrix[2][2] = zeuscmd_buffer[1];
- zeus_point[0] = zeuscmd_buffer[5];
- zeus_point[1] = zeuscmd_buffer[6];
- zeus_point[2] = zeuscmd_buffer[7];
- break;
- /* 0x23: some additional X,Y,Z coordinates */
- case 0x23:
- if (logcmd)
- logerror(" -- additional xyz = %d,%d,%d\n", (INT16)zeuscmd_buffer[0], (INT16)(zeuscmd_buffer[1] >> 16), (INT16)zeuscmd_buffer[1]);
- break;
+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->solidcolor;
+ INT32 curz = (INT32)(extent->param[0].start);
+ INT32 dzdx = (INT32)(extent->param[0].dpdx);
+ int x;
- /* 0x25: display control? */
- /* 0x30: same for invasn */
- case 0x25:
- case 0x30:
- if (logcmd)
- logerror(" -- unknown control\n");
- break;
+ for (x = extent->startx; x < extent->stopx; x++)
+ {
+ INT32 depth = (curz >> 16) + extra->zoffset;
+ if (depth > 0x7fff) depth = 0x7fff;
+ if (depth >= 0)
+ waveram_plot_check_depth(scanline, x, color, depth);
+ curz += dzdx;
+ }
+}
- /* 0x67: render model with inline texture info */
- case 0x67:
- zeus_draw_model(zeuscmd_buffer[1], zeuscmd_buffer[2], logcmd);
- break;
- default:
- if (logcmd)
- logerror("\n");
- break;
- }
+static void render_poly_solid_fixedz(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid)
+{
+ const poly_extra_data *extra = extradata;
+ UINT16 color = extra->solidcolor;
+ UINT16 depth = extra->zoffset;
+ int x;
+
+ for (x = extent->startx; x < extent->stopx; x++)
+ waveram_plot_depth(scanline, x, color, depth);
}
-static UINT8 zeuscmd_length(UINT32 word)
+
+/*************************************
+ *
+ * Debugging tools
+ *
+ *************************************/
+
+static void log_fifo_command(const UINT32 *data, int numwords, const char *suffix)
{
- switch (word >> 24)
- {
- case 0x00:
- case 0x01:
- return (word == 0) ? 1 : 2;
+ int wordnum;
- case 0x13:
- case 0x17:
- case 0x1a:
- case 0x2d: /* invasn */
- case 0x70:
- return 1;
+ logerror("Zeus cmd %02X :", data[0] >> 24);
+ for (wordnum = 0; wordnum < numwords; wordnum++)
+ logerror(" %08X", data[wordnum]);
+ logerror("%s", suffix);
+}
- case 0x18:
- case 0x23:
- case 0x2e: /* invasn */
- return 2;
- case 0x67:
- return 3;
+static void log_waveram(UINT32 length_and_base)
+{
+ static struct
+ {
+ UINT32 lab;
+ UINT64 checksum;
+ } recent_entries[100];
- case 0x25:
- case 0x30: /* invasn */
- if (word & 0x808000)
- return 10;
- return 4; /* ??? */
+ UINT32 numoctets = (length_and_base >> 24) + 1;
+ const UINT64 *ptr = waveram_ptr_from_block_addr(0, length_and_base);
+ UINT64 checksum = length_and_base;
+ int foundit = FALSE;
+ int i;
- case 0x1c:
- if ((word & 0xffffff) == 0x7fff) /* invasn */
- return 8+5;
- return 8;
+ for (i = 0; i < numoctets; i++)
+ checksum += ptr[i];
- default:
- printf("Unknown command %02X\n", zeusbase[0xe0] >> 24);
+ for (i = 0; i < ARRAY_LENGTH(recent_entries); i++)
+ if (recent_entries[i].lab == length_and_base && recent_entries[i].checksum == checksum)
+ {
+ foundit = TRUE;
break;
- }
- return 1;
-}
+ }
+ if (i == ARRAY_LENGTH(recent_entries))
+ i--;
+ if (i != 0)
+ {
+ memmove(&recent_entries[1], &recent_entries[0], i * sizeof(recent_entries[0]));
+ recent_entries[0].lab = length_and_base;
+ recent_entries[0].checksum = checksum;
+ }
+ if (foundit)
+ return;
+ for (i = 0; i < numoctets; i++)
+ logerror("\t%02X: %08X %08X\n", i, (UINT32)ptr[i], (UINT32)(ptr[i] >> 32));
+}
diff --git a/src/mame/video/model2.c b/src/mame/video/model2.c
index 6e337d65844..ff3f09d37ec 100644
--- a/src/mame/video/model2.c
+++ b/src/mame/video/model2.c
@@ -922,7 +922,7 @@ INLINE UINT16 get_texel( UINT32 base_x, UINT32 base_y, int x, int y, UINT32 *she
/***********************************************************************************************/
-static poly_draw_scanline render_funcs[8] =
+static const poly_draw_scanline render_funcs[8] =
{
model2_3d_render_0, /* checker = 0, textured = 0, translucent = 0 */
model2_3d_render_1, /* checker = 0, textured = 0, translucent = 1 */
diff --git a/src/mame/video/n64.c b/src/mame/video/n64.c
index 31e54dbc5e5..914834d1659 100644
--- a/src/mame/video/n64.c
+++ b/src/mame/video/n64.c
@@ -2448,8 +2448,8 @@ INLINE UINT32 READ_RDP_DATA(UINT32 address)
}
#if LOG_RDP_EXECUTION
-static const char *image_format[] = { "RGBA", "YUV", "CI", "IA", "I", "???", "???", "???" };
-static const char *image_size[] = { "4-bit", "8-bit", "16-bit", "32-bit" };
+static const char *const image_format[] = { "RGBA", "YUV", "CI", "IA", "I", "???", "???", "???" };
+static const char *const image_size[] = { "4-bit", "8-bit", "16-bit", "32-bit" };
#endif
static const int rdp_command_length[64] =
@@ -3392,7 +3392,7 @@ static void rdp_set_color_image(UINT32 w1, UINT32 w2)
/*****************************************************************************/
-static void (* rdp_command_table[64])(UINT32 w1, UINT32 w2) =
+static void (*const rdp_command_table[64])(UINT32 w1, UINT32 w2) =
{
/* 0x00 */
rdp_noop, rdp_invalid, rdp_invalid, rdp_invalid,
diff --git a/src/mame/video/namcona1.c b/src/mame/video/namcona1.c
index 80a1fe3e1b9..86e28b83132 100644
--- a/src/mame/video/namcona1.c
+++ b/src/mame/video/namcona1.c
@@ -219,7 +219,7 @@ VIDEO_START( namcona1 )
{
int i;
gfx_element *gfx0,*gfx1;
- static tile_get_info_callback get_info[4] =
+ static const tile_get_info_callback get_info[4] =
{ tilemap_get_info0, tilemap_get_info1, tilemap_get_info2, tilemap_get_info3 };
for( i=0; i<NAMCONA1_NUM_TILEMAPS; i++ )
diff --git a/src/mame/video/namcos1.c b/src/mame/video/namcos1.c
index 88eac81a69a..9d2eb40a1a9 100644
--- a/src/mame/video/namcos1.c
+++ b/src/mame/video/namcos1.c
@@ -368,7 +368,7 @@ VIDEO_UPDATE( namcos1 )
for (i = 0;i < 4;i++)
{
- static int disp_x[] = { 25, 27, 28, 29 };
+ static const int disp_x[] = { 25, 27, 28, 29 };
j = i << 2;
scrollx = ( namcos1_playfield_control[j+1] + (namcos1_playfield_control[j+0]<<8) ) - disp_x[i];
diff --git a/src/mame/video/pacland.c b/src/mame/video/pacland.c
index 99fc9297430..f3390df8a6a 100644
--- a/src/mame/video/pacland.c
+++ b/src/mame/video/pacland.c
@@ -291,7 +291,7 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
for (offs = 0;offs < 0x80;offs += 2)
{
- static int gfx_offs[2][2] =
+ static const int gfx_offs[2][2] =
{
{ 0, 1 },
{ 2, 3 }
diff --git a/src/mame/video/psx.c b/src/mame/video/psx.c
index d294e8bdccd..2ad84472302 100644
--- a/src/mame/video/psx.c
+++ b/src/mame/video/psx.c
@@ -232,10 +232,10 @@ static UINT16 m_p_n_blueaddtrans[ MAX_LEVEL * MAX_LEVEL ];
static UINT16 m_p_n_redsubtrans[ MAX_LEVEL * MAX_LEVEL ];
static UINT16 m_p_n_greensubtrans[ MAX_LEVEL * MAX_LEVEL ];
static UINT16 m_p_n_bluesubtrans[ MAX_LEVEL * MAX_LEVEL ];
-static UINT16 m_p_n_nextpointlist4[] = { 1, 3, 0, 2 };
-static UINT16 m_p_n_prevpointlist4[] = { 2, 0, 3, 1 };
-static UINT16 m_p_n_nextpointlist3[] = { 1, 2, 0 };
-static UINT16 m_p_n_prevpointlist3[] = { 2, 0, 1 };
+static const UINT16 m_p_n_nextpointlist4[] = { 1, 3, 0, 2 };
+static const UINT16 m_p_n_prevpointlist4[] = { 2, 0, 3, 1 };
+static const UINT16 m_p_n_nextpointlist3[] = { 1, 2, 0 };
+static const UINT16 m_p_n_prevpointlist3[] = { 2, 0, 1 };
static UINT16 m_p_n_g0r0[ 0x10000 ];
static UINT16 m_p_n_b0[ 0x10000 ];
@@ -1486,8 +1486,8 @@ static void FlatPolygon( int n_points )
UINT16 n_point;
UINT16 n_rightpoint;
UINT16 n_leftpoint;
- UINT16 *p_n_rightpointlist;
- UINT16 *p_n_leftpointlist;
+ const UINT16 *p_n_rightpointlist;
+ const UINT16 *p_n_leftpointlist;
UINT16 *p_vram;
@@ -1658,8 +1658,8 @@ static void FlatTexturedPolygon( int n_points )
UINT16 n_point;
UINT16 n_rightpoint;
UINT16 n_leftpoint;
- UINT16 *p_n_rightpointlist;
- UINT16 *p_n_leftpointlist;
+ const UINT16 *p_n_rightpointlist;
+ const UINT16 *p_n_leftpointlist;
UINT16 *p_clut;
UINT16 *p_vram;
UINT32 n_bgr;
@@ -1878,8 +1878,8 @@ static void GouraudPolygon( int n_points )
UINT16 n_point;
UINT16 n_rightpoint;
UINT16 n_leftpoint;
- UINT16 *p_n_rightpointlist;
- UINT16 *p_n_leftpointlist;
+ const UINT16 *p_n_rightpointlist;
+ const UINT16 *p_n_leftpointlist;
UINT16 *p_vram;
@@ -2108,8 +2108,8 @@ static void GouraudTexturedPolygon( int n_points )
UINT16 n_point;
UINT16 n_rightpoint;
UINT16 n_leftpoint;
- UINT16 *p_n_rightpointlist;
- UINT16 *p_n_leftpointlist;
+ const UINT16 *p_n_rightpointlist;
+ const UINT16 *p_n_leftpointlist;
UINT16 *p_clut;
UINT16 *p_vram;
UINT32 n_bgr;
diff --git a/src/mame/video/qix.c b/src/mame/video/qix.c
index 37954b8b552..db2ccbea614 100644
--- a/src/mame/video/qix.c
+++ b/src/mame/video/qix.c
@@ -242,7 +242,7 @@ WRITE8_HANDLER( qix_paletteram_w )
/* this conversion table should be about right. It gives a reasonable */
/* gray scale in the test screen, and the red, green and blue squares */
/* in the same screen are barely visible, as the manual requires. */
- static UINT8 table[16] =
+ static const UINT8 table[16] =
{
0x00, /* value = 0, intensity = 0 */
0x12, /* value = 0, intensity = 1 */
diff --git a/src/mame/video/redalert.c b/src/mame/video/redalert.c
index f02522a3f25..3b1cd86cdf8 100644
--- a/src/mame/video/redalert.c
+++ b/src/mame/video/redalert.c
@@ -24,7 +24,7 @@ static UINT8 redalert_backcolor[0x400];
/* There might be a color PROM that dictates this? */
/* These guesses are based on comparing the color bars on the test
screen with the picture in the manual */
-static UINT8 color_lookup[] = {
+static const UINT8 color_lookup[] = {
1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,
1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
diff --git a/src/mame/video/retofinv.c b/src/mame/video/retofinv.c
index 5bb7c21df11..236b81c1658 100644
--- a/src/mame/video/retofinv.c
+++ b/src/mame/video/retofinv.c
@@ -193,7 +193,7 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap)
for (offs = 0;offs < 0x80;offs += 2)
{
- static int gfx_offs[2][2] =
+ static const int gfx_offs[2][2] =
{
{ 0, 1 },
{ 2, 3 }
diff --git a/src/mame/video/sauro.c b/src/mame/video/sauro.c
index 14715804ab9..507bc2776c6 100644
--- a/src/mame/video/sauro.c
+++ b/src/mame/video/sauro.c
@@ -66,12 +66,12 @@ static TILE_GET_INFO( get_tile_info_fg )
/* Sauro */
-static int scroll2_map [8] = {2, 1, 4, 3, 6, 5, 0, 7};
-static int scroll2_map_flip[8] = {0, 7, 2, 1, 4, 3, 6, 5};
+static const int scroll2_map[8] = {2, 1, 4, 3, 6, 5, 0, 7};
+static const int scroll2_map_flip[8] = {0, 7, 2, 1, 4, 3, 6, 5};
WRITE8_HANDLER( sauro_scroll_fg_w )
{
- int *map = (flip_screen ? scroll2_map_flip : scroll2_map);
+ const int *map = (flip_screen ? scroll2_map_flip : scroll2_map);
int scroll = (data & 0xf8) | map[data & 7];
tilemap_set_scrollx(fg_tilemap, 0, scroll);
diff --git a/src/mame/video/segas32.c b/src/mame/video/segas32.c
index 430101d36bb..5989ae01ac9 100644
--- a/src/mame/video/segas32.c
+++ b/src/mame/video/segas32.c
@@ -2166,7 +2166,7 @@ static void mix_all_layers(int which, int xoffs, mame_bitmap *bitmap, const rect
}
/*
{
- static const char *layname[] = { "TEXT", "NBG0", "NBG1", "NBG2", "NBG3", "BITM", "SPRI", "LINE" };
+ static const char *const layname[] = { "TEXT", "NBG0", "NBG1", "NBG2", "NBG3", "BITM", "SPRI", "LINE" };
for (groupnum = 0; groupnum <= sprgroup_mask; groupnum++)
{
mame_printf_debug("%X: ", groupnum);
@@ -2539,7 +2539,7 @@ VIDEO_UPDATE( system32 )
#if SHOW_ALPHA
{
- static const char *layername[] = { "TEXT ", "NBG0 ", "NBG1 ", "NBG2 ", "NBG3 ", "BITMAP " };
+ static const char *const layername[] = { "TEXT ", "NBG0 ", "NBG1 ", "NBG2 ", "NBG3 ", "BITMAP " };
char temp[100];
int count = 0, i;
sprintf(temp, "ALPHA(%d):", (mixer_control[which][0x4e/2] >> 8) & 7);
diff --git a/src/mame/video/seibuspi.c b/src/mame/video/seibuspi.c
index c32ffa22530..52ad30594c4 100644
--- a/src/mame/video/seibuspi.c
+++ b/src/mame/video/seibuspi.c
@@ -343,12 +343,12 @@ static void draw_blend_gfx(mame_bitmap *bitmap, const rectangle *cliprect, const
}
}
-static int sprite_xtable[2][8] =
+static const int sprite_xtable[2][8] =
{
{ 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 },
{ 7*16, 6*16, 5*16, 4*16, 3*16, 2*16, 1*16, 0*16 }
};
-static int sprite_ytable[2][8] =
+static const int sprite_ytable[2][8] =
{
{ 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 },
{ 7*16, 6*16, 5*16, 4*16, 3*16, 2*16, 1*16, 0*16 }
diff --git a/src/mame/video/senjyo.c b/src/mame/video/senjyo.c
index ff24496b901..26362abc9df 100644
--- a/src/mame/video/senjyo.c
+++ b/src/mame/video/senjyo.c
@@ -79,7 +79,7 @@ static TILE_GET_INFO( starforc_bg1_tile_info )
{
/* Star Force has more tiles in bg1, so to get a uniform color code spread */
/* they wired bit 7 of the tile code in place of bit 4 to get the color code */
- static int colormap[8] = { 0,2,4,6,1,3,5,7 };
+ static const int colormap[8] = { 0,2,4,6,1,3,5,7 };
UINT8 code = senjyo_bg1videoram[tile_index];
SET_TILE_INFO(
1,
diff --git a/src/mame/video/seta.c b/src/mame/video/seta.c
index c45565fea6b..835870d841e 100644
--- a/src/mame/video/seta.c
+++ b/src/mame/video/seta.c
@@ -167,7 +167,7 @@ struct x_offset
};
/* note that drgnunit, stg and qzkklogy run on the same board, yet they need different alignment */
-static struct x_offset game_offsets[] =
+static const struct x_offset game_offsets[] =
{
/* only sprites */
{ "tndrcade", { -1, 0 } }, // correct (wall at beginning of game)
@@ -217,7 +217,7 @@ static struct x_offset game_offsets[] =
{ NULL }
};
-static struct x_offset *global_offsets;
+static const struct x_offset *global_offsets;
/* ---- 3--- Coin #1 Lock Out
@@ -229,7 +229,7 @@ void seta_coin_lockout_w(int data)
{
static int seta_coin_lockout = 1;
static const game_driver *seta_driver = NULL;
- static const char *seta_nolockout[8] = { "blandia", "gundhara", "kamenrid", "zingzip", "eightfrc", "extdwnhl", "sokonuke", "zombraid"};
+ static const char *const seta_nolockout[8] = { "blandia", "gundhara", "kamenrid", "zingzip", "eightfrc", "extdwnhl", "sokonuke", "zombraid"};
/* Only compute seta_coin_lockout when confronted with a new gamedrv */
if (seta_driver != Machine->gamedrv)
diff --git a/src/mame/video/sf.c b/src/mame/video/sf.c
index d358cdcf846..5952e4ae9c7 100644
--- a/src/mame/video/sf.c
+++ b/src/mame/video/sf.c
@@ -126,7 +126,7 @@ WRITE16_HANDLER( sf_gfxctrl_w )
INLINE int sf_invert(int nb)
{
- static int delta[4] = {0x00, 0x18, 0x18, 0x00};
+ static const int delta[4] = {0x00, 0x18, 0x18, 0x00};
return nb ^ delta[(nb >> 3) & 3];
}
diff --git a/src/mame/video/skykid.c b/src/mame/video/skykid.c
index bcfab2cd593..c6e0d35e93a 100644
--- a/src/mame/video/skykid.c
+++ b/src/mame/video/skykid.c
@@ -204,7 +204,7 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap,const rec
for (offs = 0;offs < 0x80;offs += 2)
{
- static int gfx_offs[2][2] =
+ static const int gfx_offs[2][2] =
{
{ 0, 1 },
{ 2, 3 }
diff --git a/src/mame/video/snes.c b/src/mame/video/snes.c
index 9a06ad5e59b..f3b8426720c 100644
--- a/src/mame/video/snes.c
+++ b/src/mame/video/snes.c
@@ -99,7 +99,7 @@ struct DEBUGOPTS
};
static struct DEBUGOPTS debug_options = {5, {0,0,0,0,0,0}, 0, 0, 0};
/* red green blue purple yellow cyan grey white */
-static UINT16 dbg_mode_colours[8] = { 0x1f, 0x3e0, 0x7c00, 0x7c1f, 0x3ff, 0x7fe0, 0x4210, 0x7fff };
+static const UINT16 dbg_mode_colours[8] = { 0x1f, 0x3e0, 0x7c00, 0x7c1f, 0x3ff, 0x7fe0, 0x4210, 0x7fff };
static UINT8 snes_dbg_video(running_machine *machine, mame_bitmap *bitmap, UINT16 curline);
#endif /* SNES_DBG_video */
@@ -142,7 +142,7 @@ struct SNES_MODE_CONFIG
static struct SCANLINE scanlines[2];
struct SNES_PPU_STRUCT snes_ppu;
-static struct SNES_MODE_CONFIG snes_modedefs[8] =
+static const struct SNES_MODE_CONFIG snes_modedefs[8] =
{
/*0*/ { {snes_update_line_2, snes_update_line_2, snes_update_line_2, snes_update_line_2}, 4 },
/*1*/ { {snes_update_line_4, snes_update_line_4, snes_update_line_2, NULL}, 3 },
@@ -2001,7 +2001,7 @@ static UINT8 snes_dbg_video(running_machine *machine, mame_bitmap *bitmap, UINT1
{
//UINT16 y = 1;
char t[100];
- static char WINLOGIC[4] = { '|', '&', '^', '!' };
+ static const char WINLOGIC[4] = { '|', '&', '^', '!' };
if( !debug_options.input_count-- )
{
diff --git a/src/mame/video/stactics.c b/src/mame/video/stactics.c
index fc3f3bc62cd..8b8d85e7592 100644
--- a/src/mame/video/stactics.c
+++ b/src/mame/video/stactics.c
@@ -112,7 +112,7 @@ static int states_per_frame;
/* The first 16 came from the 7448 BCD to 7-segment decoder data sheet */
/* The rest are made up */
-static UINT8 stactics_special_chars[32*8] = {
+static const UINT8 stactics_special_chars[32*8] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Space */
0x80, 0x80, 0x80, 0xf0, 0x80, 0x80, 0xf0, 0x00, /* extras... */
0xf0, 0x80, 0x80, 0xf0, 0x00, 0x00, 0xf0, 0x00, /* extras... */
diff --git a/src/mame/video/suprnova.c b/src/mame/video/suprnova.c
index c854ee32e6f..6f05978bc10 100644
--- a/src/mame/video/suprnova.c
+++ b/src/mame/video/suprnova.c
@@ -380,7 +380,7 @@ static void blit_fxy_z(mame_bitmap *bitmap, const rectangle *cliprect, const UIN
}
}
-static void (*blit_z[4])(mame_bitmap *bitmap, const rectangle *cliprect, const UINT8 *src, int x, int y, int sx, int sy, UINT16 zx, UINT16 zy, int colour) = {
+static void (*const blit_z[4])(mame_bitmap *bitmap, const rectangle *cliprect, const UINT8 *src, int x, int y, int sx, int sy, UINT16 zx, UINT16 zy, int colour) = {
blit_nf_z,
blit_fy_z,
blit_fx_z,
diff --git a/src/mame/video/system16.c b/src/mame/video/system16.c
index b377da745cc..046e74e50ee 100644
--- a/src/mame/video/system16.c
+++ b/src/mame/video/system16.c
@@ -119,7 +119,7 @@ int sys16_MaxShadowColors;
/* video driver constants (potentially different for each game) */
int sys16_gr_bitmap_width;
int (*sys16_spritesystem)( struct sys16_sprite_attributes *sprite, const UINT16 *source, int bJustGetColor );
-int *sys16_obj_bank;
+const int *sys16_obj_bank;
int sys16_sprxoffset;
int sys16_bgxoffset;
int sys16_fgxoffset;
@@ -760,7 +760,7 @@ WRITE16_HANDLER( sys16_textram_w ){
/***************************************************************************/
VIDEO_START( system16 ){
- static int bank_default[16] = {
+ static const int bank_default[16] = {
0x0,0x1,0x2,0x3,
0x4,0x5,0x6,0x7,
0x8,0x9,0xa,0xb,
diff --git a/src/mame/video/taito_h.c b/src/mame/video/taito_h.c
index deeff0a74a7..aa3f18d12f0 100644
--- a/src/mame/video/taito_h.c
+++ b/src/mame/video/taito_h.c
@@ -59,7 +59,7 @@ extern int TC0080VCO_flipscreen;
extern int TC0080VCO_has_tx;
/* These are hand-tuned values */
-static int zoomy_conv_table[] =
+static const int zoomy_conv_table[] =
{
/* +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +a +b +c +d +e +f */
0x00,0x01,0x01,0x02,0x02,0x03,0x04,0x05, 0x06,0x06,0x07,0x08,0x09,0x0a,0x0a,0x0b, /* 0x00 */
diff --git a/src/mame/video/taitoair.c b/src/mame/video/taitoair.c
index effed5f0d8c..628b8be1a3e 100644
--- a/src/mame/video/taitoair.c
+++ b/src/mame/video/taitoair.c
@@ -59,7 +59,7 @@ extern int TC0080VCO_flipscreen;
extern int TC0080VCO_has_tx;
/* These are hand-tuned values */
-static int zoomy_conv_table[] =
+static const int zoomy_conv_table[] =
{
/* +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +a +b +c +d +e +f */
0x00,0x01,0x01,0x02,0x02,0x03,0x04,0x05, 0x06,0x06,0x07,0x08,0x09,0x0a,0x0a,0x0b, /* 0x00 */
diff --git a/src/mame/video/taitoic.c b/src/mame/video/taitoic.c
index 031ba13a321..d44e223c925 100644
--- a/src/mame/video/taitoic.c
+++ b/src/mame/video/taitoic.c
@@ -754,7 +754,7 @@ static TILE_GET_INFO( PC080SN_get_fg_tile_info_1 )
common_get_PC080SN_fg_tile_info(machine,tileinfo,tile_index,PC080SN_bg_ram[1][1],PC080SN_bg_gfx[1]);
}
-static tile_get_info_callback PC080SN_get_tile_info[PC080SN_MAX_CHIPS][2] =
+static const tile_get_info_callback PC080SN_get_tile_info[PC080SN_MAX_CHIPS][2] =
{
{ PC080SN_get_bg_tile_info_0, PC080SN_get_fg_tile_info_0 },
{ PC080SN_get_bg_tile_info_1, PC080SN_get_fg_tile_info_1 }
@@ -1371,7 +1371,7 @@ INT32 TC0080VCO_flipscreen = 0,TC0080VCO_has_tx;
#if 0
-static int TC0080VCO_zoomy_conv_table[] =
+static const int TC0080VCO_zoomy_conv_table[] =
{
/* These are hand-tuned values... */
/* +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +a +b +c +d +e +f */
@@ -2163,7 +2163,7 @@ static TILE_GET_INFO( TC0100SCN_get_tx_tile_info_2 )
/* This array changes with TC0100SCN_MAX_CHIPS */
-static tile_get_info_callback TC0100SCN_get_tile_info[TC0100SCN_MAX_CHIPS][3] =
+static const tile_get_info_callback TC0100SCN_get_tile_info[TC0100SCN_MAX_CHIPS][3] =
{
{ TC0100SCN_get_bg_tile_info_0, TC0100SCN_get_fg_tile_info_0, TC0100SCN_get_tx_tile_info_0 },
{ TC0100SCN_get_bg_tile_info_1, TC0100SCN_get_fg_tile_info_1, TC0100SCN_get_tx_tile_info_1 },
@@ -3011,7 +3011,7 @@ static TILE_GET_INFO( TC0480SCP_get_tx_tile_info )
common_get_tc0480tx_tile_info(machine,tileinfo,tile_index,TC0480SCP_tx_ram,TC0480SCP_tx_gfx);
}
-static tile_get_info_callback tc480_get_tile_info[5] =
+static const tile_get_info_callback tc480_get_tile_info[5] =
{
TC0480SCP_get_bg0_tile_info, TC0480SCP_get_bg1_tile_info,
TC0480SCP_get_bg2_tile_info, TC0480SCP_get_bg3_tile_info,
@@ -3892,7 +3892,7 @@ void TC0480SCP_tilemap_draw(mame_bitmap *bitmap,const rectangle *cliprect,int la
/* For evidence table of TC0480SCP bg layer priorities, refer to mame55 source */
-static UINT16 TC0480SCP_bg_pri_lookup[8] =
+static const UINT16 TC0480SCP_bg_pri_lookup[8] =
{
0x0123,
0x1230,
diff --git a/src/mame/video/taitosj.c b/src/mame/video/taitosj.c
index 1677595bb60..1b75dc6cac6 100644
--- a/src/mame/video/taitosj.c
+++ b/src/mame/video/taitosj.c
@@ -34,7 +34,7 @@ static UINT8 flipscreen[2];
static rectangle spritearea[32]; /*areas on bitmap (sprite locations)*/
static UINT8 spriteon[32]; /* 1 if sprite is active */
-static int playfield_enable_mask[3] = { 0x10, 0x20, 0x40 };
+static const int playfield_enable_mask[3] = { 0x10, 0x20, 0x40 };
/***************************************************************************
@@ -707,8 +707,8 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap)
static void draw_playfield(running_machine *machine, int n, mame_bitmap *bitmap)
{
- static int fudge1[3] = { 3, 1, -1 };
- static int fudge2[3] = { 8, 10, 12 };
+ static const int fudge1[3] = { 3, 1, -1 };
+ static const int fudge2[3] = { 8, 10, 12 };
if (taitosj_video_enable & playfield_enable_mask[n])
{
diff --git a/src/mame/video/tehkanwc.c b/src/mame/video/tehkanwc.c
index 5eb98d4de14..c2aef1ea1c9 100644
--- a/src/mame/video/tehkanwc.c
+++ b/src/mame/video/tehkanwc.c
@@ -124,7 +124,7 @@ static void gridiron_draw_led(running_machine *machine, mame_bitmap *bitmap, con
int i;
- static UINT8 ledvalues[] =
+ static const UINT8 ledvalues[] =
{ 0x86, 0xdb, 0xcf, 0xe6, 0xed, 0xfd, 0x87, 0xff, 0xf3, 0xf1 };
diff --git a/src/mame/video/thoop2.c b/src/mame/video/thoop2.c
index 379a07d38f8..b8405d84ce5 100644
--- a/src/mame/video/thoop2.c
+++ b/src/mame/video/thoop2.c
@@ -155,8 +155,8 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
int j, x, y, ex, ey;
const gfx_element *gfx = machine->gfx[0];
- static int x_offset[2] = {0x0,0x2};
- static int y_offset[2] = {0x0,0x1};
+ static const int x_offset[2] = {0x0,0x2};
+ static const int y_offset[2] = {0x0,0x1};
for (j = 0; j < sprite_count[pri]; j++){
int i = sprite_table[pri][j];
diff --git a/src/mame/video/vicdual.c b/src/mame/video/vicdual.c
index 249627700b1..8c8b1761952 100644
--- a/src/mame/video/vicdual.c
+++ b/src/mame/video/vicdual.c
@@ -11,7 +11,7 @@
static UINT8 palette_bank;
-static pen_t pens_from_color_prom[] =
+static const pen_t pens_from_color_prom[] =
{
RGB_BLACK,
MAKE_RGB(0x00, 0xff, 0x00),
diff --git a/src/mame/video/vrender0.c b/src/mame/video/vrender0.c
index ddd73f4aec0..448d2639c64 100644
--- a/src/mame/video/vrender0.c
+++ b/src/mame/video/vrender0.c
@@ -326,7 +326,7 @@ static void DrawQuadFill(_Quad *Quad)
typedef void (*_DrawTemplate)(_Quad *);
-static _DrawTemplate DrawImage[]=
+static const _DrawTemplate DrawImage[]=
{
TILENAME(4,0,0),
TILENAME(8,0,0),
@@ -344,7 +344,7 @@ static _DrawTemplate DrawImage[]=
TILENAME(16,0,2),
};
-static _DrawTemplate DrawTile[]=
+static const _DrawTemplate DrawTile[]=
{
TILENAME(4,1,0),
TILENAME(8,1,0),
diff --git a/src/mame/video/warpwarp.c b/src/mame/video/warpwarp.c
index 1eb61d01807..52118106996 100644
--- a/src/mame/video/warpwarp.c
+++ b/src/mame/video/warpwarp.c
@@ -27,7 +27,7 @@ static const rgb_t geebee_palette[] =
MAKE_RGB(0x7f,0x7f,0x7f) /* grey */
};
-static UINT16 geebee_colortable[] =
+static const UINT16 geebee_colortable[] =
{
0, 1,
1, 0,
@@ -35,7 +35,7 @@ static UINT16 geebee_colortable[] =
2, 0
};
-static UINT16 navarone_colortable[] =
+static const UINT16 navarone_colortable[] =
{
0, 2,
2, 0,
diff --git a/src/mame/video/wc90.c b/src/mame/video/wc90.c
index c46c13a822e..dc1d09a9fe5 100644
--- a/src/mame/video/wc90.c
+++ b/src/mame/video/wc90.c
@@ -144,52 +144,32 @@ WRITE8_HANDLER( wc90_txvideoram_w )
drawgfx( bitmap, machine->gfx[3], code, flags >> 4, \
bank&1, bank&2, sx, sy, cliprect, TRANSPARENCY_PEN, 0 )
-static char pos32x32[] = { 0, 1, 2, 3 };
-static char pos32x32x[] = { 1, 0, 3, 2 };
-static char pos32x32y[] = { 2, 3, 0, 1 };
-static char pos32x32xy[] = { 3, 2, 1, 0 };
-
-static char pos32x64[] = { 0, 1, 2, 3, 4, 5, 6, 7 };
-static char pos32x64x[] = { 5, 4, 7, 6, 1, 0, 3, 2 };
-static char pos32x64y[] = { 2, 3, 0, 1, 6, 7, 4, 5 };
-static char pos32x64xy[] = { 7, 6, 5, 4, 3, 2, 1, 0 };
-
-static char pos64x32[] = { 0, 1, 2, 3, 4, 5, 6, 7 };
-static char pos64x32x[] = { 1, 0, 3, 2, 5, 4, 7, 6 };
-static char pos64x32y[] = { 6, 7, 4, 5, 2, 3, 0, 1 };
-static char pos64x32xy[] = { 7, 6, 5, 4, 3, 2, 1, 0 };
-
-static char pos64x64[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
-static char pos64x64x[] = { 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10 };
-static char pos64x64y[] = { 10, 11, 8, 9, 14, 15, 12, 13, 2, 3, 0, 1, 6, 7, 4, 5 };
-static char pos64x64xy[] = { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
-
-static char* p32x32[4] = {
- pos32x32,
- pos32x32x,
- pos32x32y,
- pos32x32xy
+static const char p32x32[4][4] = {
+ { 0, 1, 2, 3 },
+ { 1, 0, 3, 2 },
+ { 2, 3, 0, 1 },
+ { 3, 2, 1, 0 }
};
-static char* p32x64[4] = {
- pos32x64,
- pos32x64x,
- pos32x64y,
- pos32x64xy
+static const char p32x64[4][8] = {
+ { 0, 1, 2, 3, 4, 5, 6, 7 },
+ { 5, 4, 7, 6, 1, 0, 3, 2 },
+ { 2, 3, 0, 1, 6, 7, 4, 5 },
+ { 7, 6, 5, 4, 3, 2, 1, 0 }
};
-static char* p64x32[4] = {
- pos64x32,
- pos64x32x,
- pos64x32y,
- pos64x32xy
+static const char p64x32[4][8] = {
+ { 0, 1, 2, 3, 4, 5, 6, 7 },
+ { 1, 0, 3, 2, 5, 4, 7, 6 },
+ { 6, 7, 4, 5, 2, 3, 0, 1 },
+ { 7, 6, 5, 4, 3, 2, 1, 0 }
};
-static char* p64x64[4] = {
- pos64x64,
- pos64x64x,
- pos64x64y,
- pos64x64xy
+static const char p64x64[4][16] = {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
+ { 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10 },
+ { 10, 11, 8, 9, 14, 15, 12, 13, 2, 3, 0, 1, 6, 7, 4, 5 },
+ { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }
};
static void draw_sprite_16x16(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int code,
@@ -237,7 +217,7 @@ static void draw_sprite_32x16(running_machine *machine, mame_bitmap *bitmap, con
static void draw_sprite_32x32(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int code,
int sx, int sy, int bank, int flags ) {
- char *p = p32x32[ bank&3 ];
+ const char *p = p32x32[ bank&3 ];
WC90_DRAW_SPRITE( code+p[0], sx, sy );
WC90_DRAW_SPRITE( code+p[1], sx+16, sy );
@@ -248,7 +228,7 @@ static void draw_sprite_32x32(running_machine *machine, mame_bitmap *bitmap, con
static void draw_sprite_32x64(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int code,
int sx, int sy, int bank, int flags ) {
- char *p = p32x64[ bank&3 ];
+ const char *p = p32x64[ bank&3 ];
WC90_DRAW_SPRITE( code+p[0], sx, sy );
WC90_DRAW_SPRITE( code+p[1], sx+16, sy );
@@ -278,7 +258,7 @@ static void draw_sprite_64x16(running_machine *machine, mame_bitmap *bitmap, con
static void draw_sprite_64x32(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int code,
int sx, int sy, int bank, int flags ) {
- char *p = p64x32[ bank&3 ];
+ const char *p = p64x32[ bank&3 ];
WC90_DRAW_SPRITE( code+p[0], sx, sy );
WC90_DRAW_SPRITE( code+p[1], sx+16, sy );
@@ -293,7 +273,7 @@ static void draw_sprite_64x32(running_machine *machine, mame_bitmap *bitmap, con
static void draw_sprite_64x64(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int code,
int sx, int sy, int bank, int flags ) {
- char *p = p64x64[ bank&3 ];
+ const char *p = p64x64[ bank&3 ];
WC90_DRAW_SPRITE( code+p[0], sx, sy );
WC90_DRAW_SPRITE( code+p[1], sx+16, sy );
@@ -321,7 +301,7 @@ static void draw_sprite_invalid(running_machine *machine, mame_bitmap *bitmap, c
typedef void (*draw_sprites_procdef)(running_machine *, mame_bitmap *, const rectangle *, int, int, int, int, int );
-static draw_sprites_procdef draw_sprites_proc[16] = {
+static const draw_sprites_procdef draw_sprites_proc[16] = {
draw_sprite_invalid, /* 0000 = 08x08 */
draw_sprite_invalid, /* 0001 = 16x08 */
draw_sprite_invalid, /* 0010 = 32x08 */
diff --git a/src/mame/video/wecleman.c b/src/mame/video/wecleman.c
index 99a8bbdeeaa..e3e2eea7a36 100644
--- a/src/mame/video/wecleman.c
+++ b/src/mame/video/wecleman.c
@@ -42,7 +42,8 @@ extern int wecleman_selected_ip, wecleman_irqctrl;
UINT16 *wecleman_videostatus;
UINT16 *wecleman_pageram, *wecleman_txtram, *wecleman_roadram;
size_t wecleman_roadram_size;
-static int wecleman_bgpage[4], wecleman_fgpage[4], *wecleman_gfx_bank;
+static int wecleman_bgpage[4], wecleman_fgpage[4];
+static const int *wecleman_gfx_bank;
/* Variables only used here: */
static tilemap *bg_tilemap, *fg_tilemap, *txt_tilemap;
@@ -874,7 +875,7 @@ VIDEO_START( wecleman )
Sprite banking - each bank is 0x20000 bytes (we support 0x40 bank codes)
This game has ROMs for 16 banks
*/
- static int bank[0x40] =
+ static const int bank[0x40] =
{
0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,
8,8,9,9,10,10,11,11,12,12,13,13,14,14,15,15,
@@ -977,7 +978,7 @@ VIDEO_START( hotchase )
Sprite banking - each bank is 0x20000 bytes (we support 0x40 bank codes)
This game has ROMs for 0x30 banks
*/
- static int bank[0x40] =
+ static const int bank[0x40] =
{
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/mame/video/wgp.c b/src/mame/video/wgp.c
index b33a3506464..6e3ff899a3b 100644
--- a/src/mame/video/wgp.c
+++ b/src/mame/video/wgp.c
@@ -351,13 +351,13 @@ Memory Map
structure for each big sprite: the hardware is probably
constructing each 4x4 sprite from 4 2x2 sprites... */
-static UINT8 xlookup[16] =
+static const UINT8 xlookup[16] =
{ 0, 1, 0, 1,
2, 3, 2, 3,
0, 1, 0, 1,
2, 3, 2, 3 };
-static UINT8 ylookup[16] =
+static const UINT8 ylookup[16] =
{ 0, 0, 1, 1,
0, 0, 1, 1,
2, 2, 3, 3,
diff --git a/src/mame/video/wrally.c b/src/mame/video/wrally.c
index 9996176b709..def8a91830f 100644
--- a/src/mame/video/wrally.c
+++ b/src/mame/video/wrally.c
@@ -118,8 +118,8 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
int i, x, y, ex, ey;
const gfx_element *gfx = machine->gfx[0];
- static int x_offset[2] = {0x0,0x2};
- static int y_offset[2] = {0x0,0x1};
+ static const int x_offset[2] = {0x0,0x2};
+ static const int y_offset[2] = {0x0,0x1};
for (i = 3; i < (0x1000 - 6)/2; i += 4){
int sx = wrally_spriteram[i+2] & 0x03ff;
diff --git a/src/mame/video/ygv608.c b/src/mame/video/ygv608.c
index ec17121c800..10e3f176345 100644
--- a/src/mame/video/ygv608.c
+++ b/src/mame/video/ygv608.c
@@ -715,12 +715,12 @@ static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const re
}
#ifdef _SHOW_VIDEO_DEBUG
-static char *mode[] = { "2PLANE_8BIT",
+static const char *const mode[] = { "2PLANE_8BIT",
"2PLANE_16BIT",
"1PLANE_16COLORS",
"1PLANE_256COLORS" };
-static char *psize[] = { "8x8", "16x16", "32x32", "64x64" };
+static const char *const psize[] = { "8x8", "16x16", "32x32", "64x64" };
#endif
VIDEO_UPDATE( ygv608 )
diff --git a/src/osd/windows/d3d8intf.c b/src/osd/windows/d3d8intf.c
index 4b702b33339..99e7f2cd942 100644
--- a/src/osd/windows/d3d8intf.c
+++ b/src/osd/windows/d3d8intf.c
@@ -231,7 +231,7 @@ static ULONG d3d_release(d3d *d3dptr)
}
-static d3d_interface d3d8_interface =
+static const d3d_interface d3d8_interface =
{
d3d_check_device_format,
d3d_check_device_type,
@@ -406,7 +406,7 @@ static HRESULT device_test_cooperative_level(d3d_device *dev)
}
-static d3d_device_interface d3d8_device_interface =
+static const d3d_device_interface d3d8_device_interface =
{
device_begin_scene,
device_clear,
@@ -458,7 +458,7 @@ static HRESULT surface_unlock_rect(d3d_surface *surf)
}
-static d3d_surface_interface d3d8_surface_interface =
+static const d3d_surface_interface d3d8_surface_interface =
{
surface_lock_rect,
surface_release,
@@ -499,7 +499,7 @@ static HRESULT texture_unlock_rect(d3d_texture *tex, UINT level)
}
-static d3d_texture_interface d3d8_texture_interface =
+static const d3d_texture_interface d3d8_texture_interface =
{
texture_get_surface_level,
texture_lock_rect,
@@ -534,7 +534,7 @@ static HRESULT vertex_buffer_unlock(d3d_vertex_buffer *vbuf)
}
-static d3d_vertex_buffer_interface d3d8_vertex_buffer_interface =
+static const d3d_vertex_buffer_interface d3d8_vertex_buffer_interface =
{
vertex_buffer_lock,
vertex_buffer_release,
diff --git a/src/osd/windows/d3d9intf.c b/src/osd/windows/d3d9intf.c
index 8884fdeae86..e23d83ac135 100644
--- a/src/osd/windows/d3d9intf.c
+++ b/src/osd/windows/d3d9intf.c
@@ -229,7 +229,7 @@ static ULONG d3d_release(d3d *d3dptr)
}
-static d3d_interface d3d9_interface =
+static const d3d_interface d3d9_interface =
{
d3d_check_device_format,
d3d_check_device_type,
@@ -439,7 +439,7 @@ static HRESULT device_test_cooperative_level(d3d_device *dev)
}
-static d3d_device_interface d3d9_device_interface =
+static const d3d_device_interface d3d9_device_interface =
{
device_begin_scene,
device_clear,
@@ -491,7 +491,7 @@ static HRESULT surface_unlock_rect(d3d_surface *surf)
}
-static d3d_surface_interface d3d9_surface_interface =
+static const d3d_surface_interface d3d9_surface_interface =
{
surface_lock_rect,
surface_release,
@@ -532,7 +532,7 @@ static HRESULT texture_unlock_rect(d3d_texture *tex, UINT level)
}
-static d3d_texture_interface d3d9_texture_interface =
+static const d3d_texture_interface d3d9_texture_interface =
{
texture_get_surface_level,
texture_lock_rect,
@@ -567,7 +567,7 @@ static HRESULT vertex_buffer_unlock(d3d_vertex_buffer *vbuf)
}
-static d3d_vertex_buffer_interface d3d9_vertex_buffer_interface =
+static const d3d_vertex_buffer_interface d3d9_vertex_buffer_interface =
{
vertex_buffer_lock,
vertex_buffer_release,
diff --git a/src/osd/windows/drawd3d.c b/src/osd/windows/drawd3d.c
index b082c54a43c..40d8752dcb4 100644
--- a/src/osd/windows/drawd3d.c
+++ b/src/osd/windows/drawd3d.c
@@ -733,7 +733,7 @@ try_again:
d3d->presentation.MultiSampleType = D3DMULTISAMPLE_NONE;
d3d->presentation.SwapEffect = D3DSWAPEFFECT_DISCARD;
d3d->presentation.hDeviceWindow = window->hwnd;
- d3d->presentation.Windowed = (!video_config.switchres || !window->fullscreen) || HAS_WINDOW_MENU;
+ d3d->presentation.Windowed = !window->fullscreen || HAS_WINDOW_MENU;
d3d->presentation.EnableAutoDepthStencil = FALSE;
d3d->presentation.AutoDepthStencilFormat = D3DFMT_D16;
d3d->presentation.Flags = 0;
diff --git a/src/osd/windows/input.c b/src/osd/windows/input.c
index 42a23c713bf..abbdfe7336f 100644
--- a/src/osd/windows/input.c
+++ b/src/osd/windows/input.c
@@ -212,7 +212,7 @@ static device_info * lightgun_list;
static device_info * joystick_list;
// default axis names
-static const TCHAR *default_axis_name[] =
+static const TCHAR *const default_axis_name[] =
{
TEXT("X"), TEXT("Y"), TEXT("Z"), TEXT("RX"),
TEXT("RY"), TEXT("RZ"), TEXT("SL1"), TEXT("SL2")
@@ -914,7 +914,7 @@ static void win32_init(running_machine *machine)
// allocate two lightgun devices
for (gunnum = 0; gunnum < 2; gunnum++)
{
- static const TCHAR *gun_names[] = { TEXT("Shared Axis Gun 1"), TEXT("Shared Axis Gun 2") };
+ static const TCHAR *const gun_names[] = { TEXT("Shared Axis Gun 1"), TEXT("Shared Axis Gun 2") };
device_info *devinfo;
int axisnum, butnum;
@@ -1735,8 +1735,8 @@ static void rawinput_device_release(device_info *devinfo)
static TCHAR *rawinput_device_improve_name(TCHAR *name)
{
- static const TCHAR *usbbasepath = TEXT("SYSTEM\\CurrentControlSet\\Enum\\USB");
- static const TCHAR *basepath = TEXT("SYSTEM\\CurrentControlSet\\Enum\\");
+ static const TCHAR usbbasepath[] = TEXT("SYSTEM\\CurrentControlSet\\Enum\\USB");
+ static const TCHAR basepath[] = TEXT("SYSTEM\\CurrentControlSet\\Enum\\");
TCHAR *regstring = NULL;
TCHAR *parentid = NULL;
TCHAR *regpath = NULL;
diff --git a/src/version.c b/src/version.c
index 558c43c6967..cce759e05ba 100644
--- a/src/version.c
+++ b/src/version.c
@@ -9,4 +9,4 @@
***************************************************************************/
-char build_version[] = "0.121u3 ("__DATE__")";
+char build_version[] = "0.121u4 ("__DATE__")";