Previous 15994 Revisions Next

r1405 Thursday 13th December, 2007 at 13:47:34 UTC by Nathan Woods
Updated to MAME 0.121u4 core
[ROOT]makefile
[docs]messnew.txt
[src/emu]cheat.c cpuexec.h cpuint.c cpuint.h drawgfx.c driver.h emuopts.c emuopts.h hash.c inptport.c inptport.h input.c input.h mame.c mame.h memory.c memory.h profiler.c rendlay.c state.c ui.c uimenu.c uitext.c validity.c video.c
[src/emu/cpu/adsp2100]2100ops.c
[src/emu/cpu/asap]asap.c
[src/emu/cpu/h6280]tblh6280.c
[src/emu/cpu/hd6309]6309dasm.c 6309ops.c
[src/emu/cpu/i86]ea.h
[src/emu/cpu/konami]konamtbl.c
[src/emu/cpu/m37710]m37710.c
[src/emu/cpu/m6502]t65c02.c
[src/emu/cpu/m68000]m68kcpu.c m68kmame.c
[src/emu/cpu/m6805]m6805.c
[src/emu/cpu/m6809]6809dasm.c 6809tbl.c
[src/emu/cpu/mips]psx.c
[src/emu/cpu/nec]necea.h necinstr.h
[src/emu/cpu/pic16c5x]pic16c5x.c
[src/emu/cpu/saturn]saturnds.c
[src/emu/cpu/sharc]sharcdsm.c sharcops.h
[src/emu/cpu/tms32010]tms32010.c
[src/emu/cpu/tms32025]tms32025.c
[src/emu/cpu/tms34010]tms34010.c
[src/emu/cpu/tms7000]tms70tb.c
[src/emu/cpu/v30mz]necea.h necinstr.h
[src/emu/cpu/v60]v60mem.c
[src/emu/cpu/z8000]z8000.c
[src/emu/debug]debugcmd.c debugcpu.c debughlp.c express.c
[src/emu/machine]53c810.c 53c810.h 6840ptm.c am53cf96.c am53cf96.h cr589.c cr589.h ds2401.c ds2401.h idectrl.c idectrl.h laserdsc.c laserdsc.h mb87078.c roc10937.c rp5h01.c rp5h01.h scsi.c scsi.h scsicd.c scsicd.h scsidev.c scsidev.h scsihd.c scsihd.h smc91c9x.c smc91c9x.h wd33c93.c wd33c93.h z80pio.c z80pio.h
[src/emu/sound]c140.c c6280.c discrete.c es5503.c flt_rc.c flt_rc.h fm.c k007232.c k053260.c k054539.c msm5232.c multipcm.c okim6295.c s14001a.c scsp.c scspdsp.c scsplfo.c side6581.h sidenvel.c sn76477.c sp0256.c speaker.c tms3615.c tms36xx.c tms5110.c tms5220r.c vlm5030.c ym2151.c ym2413.c ymdeltat.c ymz280b.c
[src/emu/video]rgbutil.h s2636.c tms34061.c tms34061.h tms9928a.c v9938.c vooddefs.h
[src/lib/util]options.c options.h
[src/mame]mamedriv.c
[src/mame/audio]atarijsa.c berzerk.c cage.c cclimber.c cinemat.c dkong.c gotya.c gyruss.c irem.c mcr.c namcoc7x.h polepos.c rockola.c scramble.c segag80r.c segasnd.c seibu.h senjyo.c spiders.c t5182.c t5182.h taito_en.c taito_en.h tank8.c targ.c timeplt.c timeplt.h williams.c
[src/mame/drivers]20pacgal.c 2mindril.c 40love.c 88games.c actfancr.c aeroboto.c aerofgt.c afega.c airbustr.c ajax.c aleck64.c alg.c aliens.c alpha68k.c ambush.c amidar.c ampoker.c amspdwy.c angelkds.c appoooh.c aquarium.c arabian.c arcadia.c argus.c arkanoid.c artmagic.c ashnojoe.c asterix.c asteroid.c astrocde.c asuka.c atarisy1.c atarisy2.c ataxx.c atetris.c attckufo.c backfire.c bagman.c balsente.c baraduke.c battlane.c battlera.c bbusters.c bfcobra.c bfm_sc2.c bigevglf.c bishi.c bking2.c bladestl.c blktiger.c blockout.c blueprnt.c bmcbowl.c bnstars.c boogwing.c bottom9.c brkthru.c btoads.c bublbobl.c buggychl.c bwidow.c bwing.c bzone.c cabal.c capbowl.c cardline.c carrera.c cave.c cbuster.c ccastles.c cchasm.c centiped.c chaknpop.c cham24.c champbas.c champbwl.c changela.c cherrym.c cherrym2.c chinagat.c chinsan.c chqflag.c cidelsa.c cinemat.c citycon.c cloak.c cloud9.c clshroad.c cninja.c coinmstr.c cojag.c combatsc.c compgolf.c coolpool.c couple.c cowrace.c cps1.c cps2.c cps3.c crgolf.c crimfght.c crospang.c crshrace.c crystal.c cubocd32.c cvs.c cyberbal.c cybertnk.c darius.c darkhors.c darkseal.c dassault.c dblewing.c dbz.c ddayjlc.c ddealer.c ddenlovr.c ddragon.c ddragon3.c ddrible.c ddz.c dec0.c dec8.c deco156.c deco32.c deco_mlc.c deniam.c dietgo.c discoboy.c djmain.c dkong.c dlair.c docastle.c dominob.c dooyong.c drmicro.c drtomy.c dunhuang.c dwarfd.c dynax.c enigma2.c eolithsp.c ettrivia.c exerion.c exidy.c exidy440.c exprraid.c exterm.c exzisus.c f1gp.c fantland.c fastlane.c filetto.c findout.c firebeat.c firetrap.c flkatck.c flower.c flstory.c foodf.c frogger.c fromanc2.c fromance.c funkybee.c funkyjet.c funworld.c fuukifg2.c fuukifg3.c gaelco2.c gaelco3d.c gaiden.c galaga.c galaxian.c galpani3.c galspnbl.c gamecstl.c gameplan.c gaplus.c gbusters.c gcpinbal.c gijoe.c ginganin.c gladiatr.c goal92.c goldstar.c gomoku.c gotcha.c gottlieb.c gradius3.c grchamp.c gridlee.c groundfx.c gstriker.c gsword.c gticlub.c gunbustr.c gyruss.c halleys.c hanaawas.c hanaroku.c harddriv.c hcastle.c hexa.c hnayayoi.c hng64.c holeland.c homedata.c homerun.c hornet.c hotblock.c hyhoo.c hyperspt.c hyprduel.c igs_blit.c inufuku.c irobot.c ironhors.c itech32.c itech8.c jack.c jailbrek.c jalmah.c jchan.c jcross.c jongkyo.c jpmimpct.c jrpacman.c junofrst.c kaneko16.c karnov.c kchamp.c kingobox.c kinst.c kinstb.c koikoi.c konamigq.c konamigv.c konamigx.c konamim2.c ksayakyu.c ksys573.c kyugo.c labyrunr.c ladyfrog.c laserbat.c lastduel.c leland.c lemmings.c lethal.c lethalj.c liberatr.c limenko.c lkage.c lockon.c looping.c lordgun.c lsasquad.c lucky8.c lvcards.c lwings.c m107.c m72.c m90.c m92.c macrossp.c macs.c madalien.c madmotor.c magmax.c mainevt.c mainsnk.c mappy.c mario.c marvins.c mastboy.c matmania.c maxaflex.c mayumi.c mazerbla.c mcatadv.c mcr3.c meadows.c mediagx.c megadriv.c megasys1.c megatech.c megazone.c meijinsn.c merit.c metlclsh.c metro.c mexico86.c mhavoc.c micro3d.c midas.c midtunit.c midvunit.c midwunit.c midxunit.c midyunit.c midzeus.c mirax.c missb2.c missile.c mitchell.c mjkjidai.c mjsister.c mjsiyoub.c mlanding.c model1.c model2.c model3.c momoko.c moo.c mosaic.c mpu4drvr.c mquake.c ms32.c msisaac.c mugsmash.c multigam.c mw8080bw.c mystwarr.c namcona1.c namcond1.c namcos1.c namcos11.c namcos12.c namcos2.c namcos21.c namcos22.c namcos23.c namcos86.c naomi.c naughtyb.c nbmj8688.c nbmj8891.c nbmj8991.c nbmj9195.c nemesis.c ninjakd2.c ninjaw.c niyanpai.c nmg5.c nmk16.c nova2001.c nss.c nwk-tr.c nycaptor.c nyny.c ojankohs.c omegrace.c oneshot.c onetwo.c opwolf.c othunder.c overdriv.c pacland.c pacman.c pandoras.c parodius.c pastelg.c pcktgal.c pengo.c pgm.c phoenix.c pipedrm.c pipeline.c pitnrun.c pkscram.c pkunwar.c playch10.c plygonet.c pntnpuzl.c polepos.c policetr.c popeye.c powerins.c prehisle.c progolf.c psikyo.c psikyo4.c psikyosh.c psychic5.c pturn.c puckpkmn.c punchout.c pushman.c qdrmfgp.c quantum.c quizdna.c r2dtank.c raiders5.c rainbow.c rallyx.c rastan.c rcasino.c realbrk.c redalert.c renegade.c rmhaihai.c rockola.c rockrage.c rohga.c rollerg.c route16.c royalmah.c rpunch.c runaway.c rungun.c sandscrp.c sbasketb.c scobra.c scramble.c seattle.c segac2.c segae.c segahang.c segaorun.c segas16a.c segas16b.c segas24.c segas32.c segaxbd.c segaybd.c seibuspi.c seicross.c senjyo.c seta.c seta2.c sf.c shadfrce.c shangha3.c shanghai.c shisen.c shootout.c sidearms.c sidepckt.c simpsons.c skydiver.c skykid.c skylncr.c slapfght.c slapshot.c sliver.c snk.c snk68.c snowbros.c spbactn.c spcforce.c spdodgeb.c speglsht.c spiders.c splash.c spy.c srmp2.c srmp5.c ssf2md.c sshangha.c ssrj.c ssv.c st0016.c stadhero.c starcrus.c starwars.c stfight.c stv.c suna16.c suna8.c supbtime.c superdq.c superqix.c suprgolf.c suprnova.c suprridr.c suprslam.c surpratk.c system1.c system16.c system18.c tail2nos.c taito_b.c taito_f2.c taito_h.c taito_l.c taito_x.c taito_z.c taitoair.c taitosj.c taitowlf.c tankbust.c taotaido.c tatsumi.c tattack.c taxidrvr.c tbowl.c tceptor.c tecmo.c tecmo16.c tecmosys.c tehkanwc.c tempest.c tetrisp2.c thedeep.c thepit.c thunderx.c tiamc1.c tickee.c tigeroad.c timelimt.c tmnt.c tnzs.c toaplan1.c toaplan2.c toki.c topspeed.c toypop.c trackfld.c trvquest.c tubep.c tumbleb.c tumblep.c tunhunt.c twin16.c twincobr.c twins.c tx1.c ultrsprt.c upscope.c vaportra.c vastar.c vball.c vegas.c vendetta.c vertigo.c victory.c videopin.c vigilant.c viper.c volfied.c vroulet.c vsnes.c wardner.c warpwarp.c warriorb.c wc90.c wc90b.c wecleman.c welltris.c wgp.c wink.c wiping.c witch.c wolfpack.c wwfsstar.c wwfwfest.c xain.c xexex.c xmen.c xtheball.c xxmissio.c yamato.c yiear.c yunsun16.c yunsung8.c zaccaria.c zaxxon.c zn.c zr107.c
[src/mame/includes]amiga.h cclimber.h cps1.h galaga.h mcr.h n64.h starwars.h system16.h
[src/mame/machine]amiga.c bagman.c balsente.c beezer.c bfm_bd1.c bublbobl.c carpolo.c cchip.c copsnrob.c cubocd32.c daikaiju.c deco102.c equites.c fd1089.c konamigx.c mcr.c mexico86.c midwayic.c model1.c model3.c n64.c namcoio.c neoboot.c neoprot.c nmk004.c pckeybrd.c pcshare.c pgmcrypt.c pgmprot.c playch10.c psx.c scramble.c scudsp.c segacrpt.c segas32.c snes.c starwars.c stfight.c stvprot.c system16.c twincobr.c vertigo.c volfied.c vsnes.c
[src/mame/video]20pacgal.c atari.c avgdvg.c blktiger.c bwing.c capbowl.c cps1.c cvs.c ddrible.c digdug.c djmain.c gaelco.c gaelco2.c galaga.c gaplus.c gladiatr.c gradius3.c gtia.c homedata.c itech8.c jagobj.c konamiic.c liberatr.c lordgun.c midtunit.c midyunit.c midzeus.c model2.c n64.c namcona1.c namcos1.c pacland.c psx.c qix.c redalert.c retofinv.c sauro.c segas32.c seibuspi.c senjyo.c seta.c sf.c skykid.c snes.c stactics.c suprnova.c system16.c taito_h.c taitoair.c taitoic.c taitosj.c tehkanwc.c thoop2.c vicdual.c vrender0.c warpwarp.c wc90.c wecleman.c wgp.c wrally.c ygv608.c
[src/mess/includes]centroni.h pclpt.h
[src/mess/machine]centroni.c pclpt.c
[src/mess/osd/windows]dialog.c
[src/osd/windows]d3d8intf.c d3d9intf.c drawd3d.c input.c

src/mame/audio/spiders.c
r1404r1405
5757};
5858
5959
60static discrete_dac_r1_ladder spiders_fire_dac =
60static const discrete_dac_r1_ladder spiders_fire_dac =
6161{
6262   1,
6363   {RES_K(10)},   // R29
r1404r1405
6767   CAP_N(100)      // C100
6868};
6969
70static discrete_dac_r1_ladder spiders_web_exp_dac =
70static const discrete_dac_r1_ladder spiders_web_exp_dac =
7171{
7272   1,
7373   {RES_K(10)},   // R44
src/mame/audio/timeplt.c
r1404r1405
5555ADDRESS_MAP_END
5656
5757
58struct AY8910interface timeplt_ay8910_interface =
58const struct AY8910interface timeplt_ay8910_interface =
5959{
6060   soundlatch_r,
6161   timeplt_portB_r
r1404r1405
7979/* Bit 7 comes from the QA output of the LS90 producing a sequence of   */
8080/*       0, 0, 0, 0, 0, 1, 1, 1, 1, 1                                   */
8181
82static int timeplt_timer[10] =
82static const int timeplt_timer[10] =
8383{
8484   0x00, 0x10, 0x20, 0x30, 0x40, 0x90, 0xa0, 0xb0, 0xa0, 0xd0
8585};
src/mame/audio/cinemat.c
r1404r1405
14681468}
14691469
14701470
1471static struct AY8910interface demon_ay8910_interface_1 =
1471static const struct AY8910interface demon_ay8910_interface_1 =
14721472{
14731473   sound_porta_r,
14741474   sound_portb_r,
r1404r1405
14761476   sound_portb_w
14771477};
14781478
1479static struct AY8910interface demon_ay8910_interface_3 =
1479static const struct AY8910interface demon_ay8910_interface_3 =
14801480{
14811481   0,
14821482   0,
r1404r1405
15431543ADDRESS_MAP_END
15441544
15451545
1546static struct z80_irq_daisy_chain daisy_chain[] =
1546static const struct z80_irq_daisy_chain daisy_chain[] =
15471547{
15481548   { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 },
15491549   { 0,0,0,0,-1 }
src/mame/audio/timeplt.h
r1404r1405
22ADDRESS_MAP_EXTERN(timeplt_sound_writemem);
33ADDRESS_MAP_EXTERN(locomotn_sound_readmem);
44ADDRESS_MAP_EXTERN(locomotn_sound_writemem);
5extern struct AY8910interface timeplt_ay8910_interface;
5extern const struct AY8910interface timeplt_ay8910_interface;
66WRITE8_HANDLER( timeplt_sh_irqtrigger_w );
src/mame/audio/atarijsa.c
r1404r1405
791791 *
792792 *************************************/
793793
794static struct YM2151interface ym2151_interface =
794static const struct YM2151interface ym2151_interface =
795795{
796796   atarigen_ym2151_irq_gen
797797};
src/mame/audio/cage.c
r1404r1405
8787#define SPORT_DATA_TX         0x48
8888#define SPORT_DATA_RX         0x4c
8989
90static const char *register_names[] =
90static const char *const register_names[] =
9191{
9292   "TMS32031-DMA global control", NULL, NULL, NULL,
9393   "TMS32031-DMA source address", NULL, "TMS32031-DMA destination address", NULL,
r1404r1405
590590 *
591591 *************************************/
592592
593static struct tms32031_config cage_config =
593static const struct tms32031_config cage_config =
594594{
595595   0x400000
596596};
src/mame/audio/senjyo.c
r1404r1405
1111   cpunum_set_input_line(1, 0, state);
1212}
1313
14static z80pio_interface pio_intf =
14static const z80pio_interface pio_intf =
1515{
1616   pio_interrupt,
1717   0,
src/mame/audio/cclimber.c
r1404r1405
7575}
7676
7777
78struct AY8910interface cclimber_ay8910_interface =
78const struct AY8910interface cclimber_ay8910_interface =
7979{
8080   0,
8181   0,
src/mame/audio/mcr.c
r1404r1405
412412
413413READ8_HANDLER( ssio_input_port_r )
414414{
415   static const char *port[] = { "SSIO.IP0", "SSIO.IP1", "SSIO.IP2", "SSIO.IP3", "SSIO.IP4" };
415   static const char *const port[] = { "SSIO.IP0", "SSIO.IP1", "SSIO.IP2", "SSIO.IP3", "SSIO.IP4" };
416416   UINT8 result = readinputportbytag_safe(port[offset], 0xff);
417417   if (ssio_custom_input[offset])
418418      result = (result & ~ssio_custom_input_mask[offset]) |
r1404r1405
443443
444444
445445/********* sound interfaces ***********/
446static struct AY8910interface ssio_ay8910_interface_1 =
446static const struct AY8910interface ssio_ay8910_interface_1 =
447447{
448448   0,
449449   0,
r1404r1405
451451   ssio_portb0_w
452452};
453453
454static struct AY8910interface ssio_ay8910_interface_2 =
454static const struct AY8910interface ssio_ay8910_interface_2 =
455455{
456456   0,
457457   0,
src/mame/audio/gotya.c
r1404r1405
99};
1010
1111
12static struct gotya_sample gotya_samples[] =
12static const struct gotya_sample gotya_samples[] =
1313{
1414   { 0x01, 0, 0 },
1515   { 0x02, 1, 0 },
src/mame/audio/t5182.c
r1404r1405
233233}
234234
235235
236struct YM2151interface t5182_ym2151_interface =
236const struct YM2151interface t5182_ym2151_interface =
237237{
238238   t5182_ym2151_irq_handler
239239};
src/mame/audio/segasnd.c
r1404r1405
264264 *
265265 *************************************/
266266
267static struct sp0250_interface sp0250_interface =
267static const struct sp0250_interface sp0250_interface =
268268{
269269   speech_drq_w
270270};
r1404r1405
902902 *
903903 *************************************/
904904
905static struct CustomSound_interface usb_custom_interface =
905static const struct CustomSound_interface usb_custom_interface =
906906{
907907    usb_start
908908};
src/mame/audio/t5182.h
r1404r1405
1111
1212extern UINT8 *t5182_sharedram;
1313
14extern struct YM2151interface t5182_ym2151_interface;
14extern const struct YM2151interface t5182_ym2151_interface;
src/mame/audio/rockola.c
r1404r1405
751751static double   hd38880_speed;
752752
753753
754static void rockola_speech_w(UINT8 data, UINT16 *table, int start)
754static void rockola_speech_w(UINT8 data, const UINT16 *table, int start)
755755{
756756   /*
757757        bit description
r1404r1405
894894
895895WRITE8_HANDLER( vanguard_speech_w )
896896{
897   static UINT16 vanguard_table[16] =
897   static const UINT16 vanguard_table[16] =
898898   {
899899      0x04000,
900900      0x04325,
r1404r1405
919919
920920WRITE8_HANDLER( fantasy_speech_w )
921921{
922   static UINT16 fantasy_table[16] =
922   static const UINT16 fantasy_table[16] =
923923   {
924924      0x04000,
925925      0x04297,
src/mame/audio/irem.c
r1404r1405
9898}
9999
100100
101static struct AY8910interface irem_ay8910_interface_1 =
101static const struct AY8910interface irem_ay8910_interface_1 =
102102{
103103   soundlatch_r,
104104   0,
r1404r1405
106106   irem_msm5205_w
107107};
108108
109static struct AY8910interface irem_ay8910_interface_2 =
109static const struct AY8910interface irem_ay8910_interface_2 =
110110{
111111   0,
112112   0,
r1404r1405
114114   0
115115};
116116
117static struct MSM5205interface irem_msm5205_interface_1 =
117static const struct MSM5205interface irem_msm5205_interface_1 =
118118{
119119   irem_adpcm_int,      /* interrupt function */
120120   MSM5205_S96_4B      /* default to 4KHz, but can be changed at run time */
121121};
122122
123static struct MSM5205interface irem_msm5205_interface_2 =
123static const struct MSM5205interface irem_msm5205_interface_2 =
124124{
125125   0,            /* interrupt function */
126126   MSM5205_SEX_4B      /* default to 4KHz, but can be changed at run time, slave */
src/mame/audio/dkong.c
r1404r1405
12651265 *
12661266 *************************************/
12671267
1268static const char *dkongjr_sample_names[] =
1268static const char *const dkongjr_sample_names[] =
12691269{
12701270   "*dkongjr",
12711271   "jump.wav",
r1404r1405
12831283   0   /* end of array */
12841284};
12851285
1286static struct Samplesinterface dkongjr_samples_interface =
1286static const struct Samplesinterface dkongjr_samples_interface =
12871287{
12881288   8,   /* 8 channels */
12891289   dkongjr_sample_names
12901290};
12911291
1292static const char *radarsc1_sample_names[] =
1292static const char *const radarsc1_sample_names[] =
12931293{
12941294   "*radarsc1",
12951295   "10.wav",
r1404r1405
13041304   0   /* end of array */
13051305};
13061306
1307static struct Samplesinterface radarsc1_samples_interface =
1307static const struct Samplesinterface radarsc1_samples_interface =
13081308{
13091309   8,   /* 8 channels */
13101310   radarsc1_sample_names
13111311};
13121312
1313static struct NESinterface nes_interface_1 = { REGION_CPU2 };
1314static struct NESinterface nes_interface_2 = { REGION_CPU3 };
1313static const struct NESinterface nes_interface_1 = { REGION_CPU2 };
1314static const struct NESinterface nes_interface_2 = { REGION_CPU3 };
13151315
13161316/*************************************
13171317 *
src/mame/audio/taito_en.c
r1404r1405
260260   //cpunum_set_input_line(1, INPUT_LINE_RESET, ASSERT_LINE);
261261}
262262
263struct ES5505interface es5505_interface =
263const struct ES5505interface es5505_interface =
264264{
265265   REGION_SOUND1,   /* Bank 0: Unused by F3 games? */
266266   REGION_SOUND1,   /* Bank 1: All games seem to use this */
src/mame/audio/taito_en.h
r1404r1405
2525
2626ADDRESS_MAP_EXTERN(f3_sound_map);
2727
28extern struct ES5505interface es5505_interface;
28extern const struct ES5505interface es5505_interface;
src/mame/audio/seibu.h
r1404r1405
7676
7777#define SEIBU_SOUND_SYSTEM_YM3812_HARDWARE                     \
7878                                                   \
79static struct YM3812interface ym3812_interface =               \
79static const struct YM3812interface ym3812_interface =            \
8080{                                                   \
8181   seibu_ym3812_irqhandler                                 \
8282};
8383
8484#define SEIBU_SOUND_SYSTEM_ADPCM_HARDWARE                     \
8585                                                   \
86static struct CustomSound_interface adpcm_interface =            \
86static const struct CustomSound_interface adpcm_interface =         \
8787{                                                   \
8888   seibu_adpcm_start,                                    \
8989   seibu_adpcm_stop                                    \
r1404r1405
9191
9292#define SEIBU_SOUND_SYSTEM_YM2151_HARDWARE                     \
9393                                                   \
94static struct YM2151interface ym2151_interface =               \
94static const struct YM2151interface ym2151_interface =            \
9595{                                                   \
9696   seibu_ym2151_irqhandler                                 \
9797};
9898
9999#define SEIBU_SOUND_SYSTEM_YM2203_HARDWARE                     \
100100                                                   \
101static struct YM2203interface ym2203_interface =               \
101static const struct YM2203interface ym2203_interface =            \
102102{                                                   \
103103   0,0,0,0,seibu_ym2203_irqhandler                           \
104104};
src/mame/audio/segag80r.c
r1404r1405
418418};
419419
420420
421static struct CustomSound_interface sega005_custom_interface =
421static const struct CustomSound_interface sega005_custom_interface =
422422{
423423   sega005_custom_start
424424};
r1404r1405
782782};
783783
784784
785static struct TMS36XXinterface monsterb_tms3617_interface =
785static const struct TMS36XXinterface monsterb_tms3617_interface =
786786{
787787   TMS3617,
788788   {0.5,0.5,0.5,0.5,0.5,0.5}  /* decay times of voices */
src/mame/audio/williams.c
r1404r1405
158158****************************************************************************/
159159
160160/* YM2151 structure (CVSD variant) */
161static struct YM2151interface cvsd_ym2151_interface =
161static const struct YM2151interface cvsd_ym2151_interface =
162162{
163163   cvsd_ym2151_irq
164164};
165165
166166
167167/* YM2151 structure (ADPCM variant) */
168static struct YM2151interface adpcm_ym2151_interface =
168static const struct YM2151interface adpcm_ym2151_interface =
169169{
170170   adpcm_ym2151_irq
171171};
src/mame/audio/namcoc7x.h
r1404r1405
2424void namcoc7x_set_host_ram(UINT32 *hostram);
2525
2626#define NAMCO_C7X_HARDWARE   \
27static struct C352interface namcoc7x_c352_interface =   \
27static const struct C352interface namcoc7x_c352_interface =   \
2828{   \
2929   REGION_SOUND1   \
3030};
src/mame/audio/scramble.c
r1404r1405
3636/* Bit 7 comes from the QA output of the LS90 producing a sequence of   */
3737/*       0, 0, 0, 0, 0, 1, 1, 1, 1, 1                                   */
3838
39static int scramble_timer[10] =
39static const int scramble_timer[10] =
4040{
4141   0x00, 0x10, 0x20, 0x30, 0x40, 0x90, 0xa0, 0xb0, 0xa0, 0xd0
4242};
r1404r1405
7878/* Bit 7 comes from the QA output of the LS90 producing a sequence of   */
7979/*       0, 0, 0, 0, 0, 1, 1, 1, 1, 1                                   */
8080
81static int frogger_timer[10] =
81static const int frogger_timer[10] =
8282{
8383   0x00, 0x10, 0x08, 0x18, 0x40, 0x90, 0x88, 0x98, 0x88, 0xd0
8484};
src/mame/audio/berzerk.c
r1404r1405
1515#define BERZERK_AUDIO_DEBUG      (0)
1616
1717
18static struct S14001A_interface berzerk_s14001a_interface =
18static const struct S14001A_interface berzerk_s14001a_interface =
1919{
2020   REGION_SOUND1   /* voice data region */
2121};
2222
2323
24static struct CustomSound_interface custom_interface =
24static const struct CustomSound_interface custom_interface =
2525{
2626   berzerk_sh_start
2727};
src/mame/audio/polepos.c
r1404r1405
2626#define POLEPOS_R167_SHUNT   1.0/(1.0/POLEPOS_R166 + 1.0/250)
2727#define POLEPOS_R168_SHUNT   1.0/(1.0/POLEPOS_R166 + 1.0/250)
2828
29static double volume_table[8] =
29static const double volume_table[8] =
3030{
3131   (POLEPOS_R168_SHUNT + POLEPOS_R167_SHUNT + POLEPOS_R166_SHUNT + 2200) / 10000,
3232   (POLEPOS_R168_SHUNT + POLEPOS_R167_SHUNT + POLEPOS_R166       + 2200) / 10000,
r1404r1405
4040
4141static filter2_context filter_engine[3];
4242
43static double r_filt_out[3] = {RES_K(4.7), RES_K(7.5), RES_K(10)};
44static double r_filt_total = 1.0 / (1.0/RES_K(4.7) + 1.0/RES_K(7.5) + 1.0/RES_K(10));
43static const double r_filt_out[3] = {RES_K(4.7), RES_K(7.5), RES_K(10)};
44static const double r_filt_total = 1.0 / (1.0/RES_K(4.7) + 1.0/RES_K(7.5) + 1.0/RES_K(10));
4545
4646/************************************/
4747/* Stream updater                   */
src/mame/audio/tank8.c
r1404r1405
8686   0  /* VEE */
8787};
8888
89static discrete_dac_r1_ladder tank8_dac =
89static const discrete_dac_r1_ladder tank8_dac =
9090{
9191   1,
9292   {RES_K(4.7)},   // R89
src/mame/audio/gyruss.c
r1404r1405
2121/* Bit 3 comes from the QA output of the LS90 producing a sequence of   */
2222/*       0, 0, 0, 0, 0, 1, 1, 1, 1, 1                                   */
2323
24static int gyruss_timer[10] =
24static const int gyruss_timer[10] =
2525{
2626   0x00, 0x01, 0x02, 0x03, 0x04, 0x09, 0x0a, 0x0b, 0x0a, 0x0d
2727};
src/mame/audio/targ.c
r1404r1405
2828static UINT8 tone_pointer;
2929static UINT8 tone_offset;
3030
31static UINT8 tone_prom[32] =
31static const UINT8 tone_prom[32] =
3232{
3333    0xE5,0xE5,0xED,0xED,0xE5,0xE5,0xED,0xED,0xE7,0xE7,0xEF,0xEF,0xE7,0xE7,0xEF,0xEF,
3434    0xC1,0xE1,0xC9,0xE9,0xC5,0xE5,0xCD,0xED,0xC3,0xE3,0xCB,0xEB,0xC7,0xE7,0xCF,0xEF
src/mame/machine/scudsp.c
r1404r1405
877877    SCU DSP Disassembler
878878
879879************************************************************************/
880static const char* ALU_Commands[] =
880static const char *const ALU_Commands[] =
881881{
882882   "",      /* 0000 */
883883   "AND",   /* 0001 */
r1404r1405
897897   "RL8",   /* 1111 */
898898};
899899
900static const char* X_Commands[] =
900static const char *const X_Commands[] =
901901{
902902   "",            /* 000 */
903903   "",            /* 001 */   /* NOP? check instruction @ 0x0B */
r1404r1405
906906   "MOV %s,X",      /* 100 */
907907};
908908
909static const char* Y_Commands[] =
909static const char *const Y_Commands[] =
910910{
911911   "",            /* 000 */
912912   "CLR A",      /* 001 */
r1404r1405
915915   "MOV %s,Y",      /* 100 */
916916};
917917
918static const char* D1_Commands[] =
918static const char *const D1_Commands[] =
919919{
920920   "",               /* 00 */
921921   "MOV %I8,%d",      /* 01 */
r1404r1405
923923   "MOV %S,%d",      /* 11 */
924924};
925925
926static const char* SourceMemory[] =
926static const char *const SourceMemory[] =
927927{
928928   "M0",         /* 000 */
929929   "M1",         /* 001 */
r1404r1405
935935   "MC3",         /* 111 */
936936};
937937
938static const char* SourceMemory2[] =
938static const char *const SourceMemory2[] =
939939{
940940   "M0",         /* 0000 */
941941   "M1",         /* 0001 */
r1404r1405
955955   "???",         /* 1111 */
956956};
957957
958static const char* DestMemory[] =
958static const char *const DestMemory[] =
959959{
960960   "MC0",         /* 0000 */
961961   "MC1",         /* 0001 */
r1404r1405
975975   "CT3",         /* 1111 */
976976};
977977
978static const char* DestDMAMemory[] =
978static const char *const DestDMAMemory[] =
979979{
980980   "M0",         /* 000 */
981981   "M1",         /* 001 */
r1404r1405
987987   "???",         /* 111 */
988988};
989989
990static const char* MVI_Command[] =
990static const char *const MVI_Command[] =
991991{
992992   "MVI %I,%d",   /* 0 */
993993   "MVI %I,%d,%f",   /* 1 */
994994};
995995
996static const char* JMP_Command[] =
996static const char *const JMP_Command[] =
997997{
998998   "JMP %IA",
999999   "JMP %f,%IA",
10001000};
10011001
1002static const char* DMA_Command[] =
1002static const char *const DMA_Command[] =
10031003{
10041004   "DMA%H%A D0,%M,%I",
10051005   "DMA%H%A %s,D0,%I",
src/mame/machine/cubocd32.c
r1404r1405
229229}
230230
231231#if LOG_AKIKO
232static const char* akiko_reg_names[] =
232static const char *const akiko_reg_names[] =
233233{
234234   /*0*/   "ID",
235235   /*1*/   "CDROM STATUS 1",
src/mame/machine/nmk004.c
r1404r1405
587587
588588static void fm_voices_update(void)
589589{
590   static int ym2203_registers[0x18] =
590   static const int ym2203_registers[0x18] =
591591   {
592592      0x30,0x38,0x34,0x3C,0x40,0x48,0x44,0x4C,0x50,0x58,0x54,0x5C,0x60,0x68,0x64,0x6C,
593593      0x70,0x78,0x74,0x7C,0x80,0x88,0x84,0x8C
r1404r1405
896896
897897static void get_command(void)
898898{
899   static UINT8 from_main[] =
899   static const UINT8 from_main[] =
900900   {
901901      0x00,0x22,0x62,0x8c,0xc7,0x00,0x00,0x3f,0x7f,0x89,0xc7,0x00,0x00,0x2b,0x6b
902902   };
903   static UINT8 to_main[] =
903   static const UINT8 to_main[] =
904904   {
905905      0x82,0xc7,0x00,0x2c,0x6c,0x00,0x9f,0xc7,0x00,0x29,0x69,0x00,0x8b,0xc7,0x00
906906   };
r1404r1405
10191019
10201020static TIMER_CALLBACK( real_nmk004_init )
10211021{
1022   static UINT8 ym2203_init[] =
1022   static const UINT8 ym2203_init[] =
10231023   {
10241024      0x07,0x38,0x08,0x00,0x09,0x00,0x0A,0x00,0x24,0xB3,0x25,0x00,0x26,0xF9,0x27,0x15,
10251025      0x28,0x00,0x28,0x01,0x28,0x02,0x40,0x00,0x41,0x00,0x42,0x00,0x44,0x00,0x45,0x00,
src/mame/machine/fd1089.c
r1404r1405
63236323   int s7,s6,s5,s4,s3,s2,s1,s0;
63246324};
63256325
6326static UINT8 basetable_fd1089[0x100] =
6326static const UINT8 basetable_fd1089[0x100] =
63276327{
63286328   0x00,0x1c,0x75,0x69,0x5d,0x41,0x24,0x38,0x4b,0x67,0xae,0x82,0xea,0xc6,0x03,0x2f,
63296329   0x46,0x6a,0xaf,0x83,0xe7,0xcb,0x02,0x2e,0x01,0x1d,0x78,0x64,0x5c,0x40,0x29,0x35,
r1404r1405
63456345
63466346
63476347/* common to FD1089A and FD1089B */
6348static struct parameters addr_params[16] =
6348static const struct parameters addr_params[16] =
63496349{
63506350   { 0x26, 3,1,7,5,2,4,6,0 },
63516351   { 0x08, 6,7,4,2,0,5,1,3 },
r1404r1405
63686368
63696369static int decode_fd1089a(int val,int table,int opcode)
63706370{
6371   static struct parameters data_params[16] =
6371   static const struct parameters data_params[16] =
63726372   {
63736373      { 0x94, 7,6,4,2,1,5,0,3 },
63746374      { 0x3f, 7,3,1,2,4,6,0,5 },
r1404r1405
63876387      { 0x71, 4,3,7,1,5,6,0,2 },
63886388      { 0x57, 6,4,7,2,0,5,3,1 },
63896389   };
6390   struct parameters *p = &addr_params[table >> 4];
6391   struct parameters *q;
6390   const struct parameters *p = &addr_params[table >> 4];
6391   const struct parameters *q;
63926392   int family = table & 0x0e;
63936393
63946394
r1404r1405
64456445
64466446static int decode_fd1089b(int val,int table,int opcode)
64476447{
6448   struct parameters *p = &addr_params[table >> 4];
6448   const struct parameters *p = &addr_params[table >> 4];
64496449
64506450
64516451   /* special case - don't decrypt */
src/mame/machine/playch10.c
r1404r1405
254254}
255255
256256/* RP5H01 interface */
257static struct RP5H01_interface rp5h01_interface =
257static const struct RP5H01_interface rp5h01_interface =
258258{
259259   1,
260260   { REGION_USER1 },
src/mame/machine/stvprot.c
r1404r1405
1161160x060427FC (1st) (resets the sh2)
1171170x0603B1B2 (1st) (crashes the sh2)
118118*/
119static UINT32 vector_prot[] = { 0x0603B1B2,0x234 };
119static const UINT32 vector_prot[] = { 0x0603B1B2,0x234 };
120120
121121static READ32_HANDLER( a_bus_ctrl_r )
122122{
src/mame/machine/bublbobl.c
r1404r1405
6363}
6464
6565
66static UINT8 tokio_prot_data[] =
66static const UINT8 tokio_prot_data[] =
6767{
6868   0x6c,
6969   0x7f,0x5f,0x7f,0x6f,0x5f,0x77,0x5f,0x7f,0x5f,0x7f,0x5f,0x7f,0x5b,0x7f,0x5f,0x7f,
r1404r1405
337337
338338WRITE8_HANDLER( boblbobl_ic43_b_w )
339339{
340   static int xor[4] = { 4, 1, 8, 2 };
340   static const int xor[4] = { 4, 1, 8, 2 };
341341
342342//  logerror("%04x: ic43_b_w (offs %d) %02x\n",activecpu_get_pc(),offset,data);
343343   ic43_b = (data >> 4) ^ xor[offset];
src/mame/machine/pgmcrypt.c
r1404r1405
320320
321321
322322#ifdef UNUSED_FUNCTION
323static UINT8 dfront_tab[256] = {
323static const UINT8 dfront_tab[256] = {
324324  0x51, 0xc4, 0xe3, 0x10, 0x1c, 0xad, 0x8a, 0x39, 0x8c, 0xe0, 0xa5, 0x04, 0x0f, 0xe4, 0x35, 0xc3,
325325  0x2d, 0x6b, 0x32, 0xe2, 0x60, 0x54, 0x63, 0x06, 0xa3, 0xf1, 0x0b, 0x5f, 0x6c, 0x5c, 0xb3, 0xec,
326326  0x77, 0x61, 0x69, 0xe7, 0x3c, 0xb7, 0x42, 0x72, 0x1a, 0x70, 0xb0, 0x96, 0xa4, 0x28, 0xc0, 0xfb,
r1404r1405
380380}
381381
382382
383static UINT8 ddp2_tab[256] = {
383static const UINT8 ddp2_tab[256] = {
384384  0x2a, 0x4a, 0x39, 0x98, 0xac, 0x39, 0xb2, 0x55, 0x72, 0xf3, 0x7b, 0x3c, 0xee, 0x94, 0x6e, 0xd5,
385385  0xcd, 0xbc, 0x9a, 0xd0, 0x45, 0x7d, 0x49, 0x68, 0xb1, 0x61, 0x54, 0xef, 0xa2, 0x84, 0x29, 0x20,
386386  0x32, 0x52, 0x82, 0x04, 0x38, 0x69, 0x9f, 0x24, 0x46, 0xf4, 0x3f, 0xc2, 0xf1, 0x25, 0xac, 0x2d,
r1404r1405
435435#endif
436436
437437
438static UINT8 mm_tab[256] = {
438static const UINT8 mm_tab[256] = {
439439  0xd0, 0x45, 0xbc, 0x84, 0x93, 0x60, 0x7d, 0x49, 0x68, 0xb1, 0x54, 0xa2, 0x05, 0x29, 0x41, 0x20,
440440  0x04, 0x08, 0x52, 0x25, 0x89, 0xf4, 0x69, 0x9f, 0x24, 0x46, 0x3d, 0xf1, 0xf9, 0xab, 0xa6, 0x2d,
441441  0x18, 0x19, 0x6d, 0x33, 0x79, 0x23, 0x3b, 0x1d, 0xe0, 0xb8, 0x61, 0x1a, 0xe1, 0x4c, 0x5d, 0x3f,
src/mame/machine/segas32.c
r1404r1405
8383#if 0 // simulation
8484READ16_HANDLER(ga2_sprite_protection_r)
8585{
86   static UINT32 prot[16] =
86   static const UINT16 prot[16] =
8787   {
8888      0x0a, 0,
8989      0xc5, 0,
r1404r1405
100100
101101READ16_HANDLER(ga2_wakeup_protection_r)
102102{
103   static const char *prot =
103   static const char prot[] =
104104      "wake up! GOLDEN AXE The Revenge of Death-Adder! ";
105105   return prot[offset];
106106}
r1404r1405
310310
311311READ16_HANDLER(arf_wakeup_protection_r)
312312{
313   static const char *prot =
313   static const char prot[] =
314314      "wake up! ARF!                                   ";
315315   return prot[offset];
316316}
src/mame/machine/equites.c
r1404r1405
5454extern WRITE8_HANDLER(equites_dac1_w);
5555
5656extern UINT16 *equites_8404ram;
57extern struct MSM5232interface equites_5232intf;
58extern struct AY8910interface equites_8910intf;
57extern struct const MSM5232interface equites_5232intf;
58extern struct const AY8910interface equites_8910intf;
5959
6060static ADDRESS_MAP_START( equites_s_readmem, ADDRESS_SPACE_PROGRAM, 8 )
6161   { 0x0000, 0xbfff, MRA8_ROM }, // sound program
r1404r1405
9292/******************************************************************************/
9393// Locals
9494
95static UINT16 e_ent_addr[8][4] =
95static const UINT16 e_ent_addr[8][4] =
9696{
9797   {0xce25, 0xcd3c, 0xcd89, 0xcdd5},
9898   {     0, 0xce6e, 0xcebe, 0xcff2},
r1404r1405
104104   {     0,      0,      0,      0},
105105};
106106
107static UINT16 e_exit_pos[8][4] =
107static const UINT16 e_exit_pos[8][4] =
108108{
109109   {0x1878, 0x4878, 0x7878, 0x3878},
110110   {     0, 0x3878, 0x4878, 0x4878},
r1404r1405
116116   {     0,      0,      0,      0},
117117};
118118
119static UINT16 e_swap_addr[4][4] =
119static const UINT16 e_swap_addr[4][4] =
120120{
121121   {     0, 0x92ec,      0, 0x92ec},
122122   {     0, 0x92ec,      0, 0x92ec},
r1404r1405
124124   {     0, 0x92d2,      0, 0x92d2},
125125};
126126
127static UINT16 e_respawn_addr[4][4] =
127static const UINT16 e_respawn_addr[4][4] =
128128{
129129   {     0, 0x9382,      0, 0x9382},
130130   {     0, 0x9382,      0, 0x9382},
r1404r1405
132132   {     0, 0x0cc8,      0, 0x9382},
133133};
134134
135static UINT16 h_respawn_addr[2][4] =
135static const UINT16 h_respawn_addr[2][4] =
136136{
137137   {0x1026, 0x0fb6, 0x0fb6, 0x0fb6},
138138   {0x11ac, 0x20b0, 0x1c44, 0x1996},
139139};
140140
141static UINT16 s_respawn_addr[3][6] =
141static const UINT16 s_respawn_addr[3][6] =
142142{
143143   {0x0b6a, 0x0b52, 0x29da, 0x0846, 0x1610, 0x0c84}, // game over seq
144144   {0x347e, 0x0e10, 0x0c2c, 0x0c2c, 0x0c2c, 0x0c2c}, // depth seq
145145   {0x0c2e, 0x1fbe, 0x166a, 0x0c84, 0x0c2c, 0x0c2c}, // level change seq
146146};
147147
148static UINT16 s_lvdata_addr[6] = {0xccc2, 0xd04a, 0xd408, 0xd796, 0xdaa8, 0xdbd6};
148static const UINT16 s_lvdata_addr[6] = {0xccc2, 0xd04a, 0xd408, 0xd796, 0xdaa8, 0xdbd6};
149149
150static UINT16 s_objdata_addr[6] = {0xb7ce, 0xba64, 0xbdbc, 0xc0f2, 0xc446, 0xc810};
150static const UINT16 s_objdata_addr[6] = {0xb7ce, 0xba64, 0xbdbc, 0xc0f2, 0xc446, 0xc810};
151151
152static UINT8 s_spawn_list[8] = {0x07, 0x08, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26};
152static const UINT8 s_spawn_list[8] = {0x07, 0x08, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26};
153153
154static UINT8 s_pow_list[8] = {0, 0, 2, 2, 2, 2, 2, 1};
154static const UINT8 s_pow_list[8] = {0, 0, 2, 2, 2, 2, 2, 1};
155155
156156static struct MRULE
157157{
r1404r1405
428428/******************************************************************************/
429429// Alpha "Soundboard 7" Chip Definitions
430430
431struct MSM5232interface equites_5232intf =
431const struct MSM5232interface equites_5232intf =
432432{
433433   { 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
434434};
435435
436struct AY8910interface equites_8910intf =
436const struct AY8910interface equites_8910intf =
437437{
438438   0,
439439   0,
src/mame/machine/copsnrob.c
r1404r1405
77#include "driver.h"
88#include "copsnrob.h"
99
10static int gun_mask[] = {0x7e, 0x7d, 0x7b, 0x77, 0x6f, 0x5f, 0x3f};
10static const int gun_mask[] = {0x7e, 0x7d, 0x7b, 0x77, 0x6f, 0x5f, 0x3f};
1111
1212// The gun control is a 7 position switch. I'm doing the following to
1313// emulate it:
src/mame/machine/twincobr.c
r1404r1405
2424static UINT32 dsp_addr_w, main_ram_seg;
2525
2626#if LOG_DSP_CALLS
27const static int toaplan_port_type[2] = { 0x7800c, 0x5c };
27static const int toaplan_port_type[2] = { 0x7800c, 0x5c };
2828#endif
2929
3030UINT8 *twincobr_sharedram;
src/mame/machine/neoboot.c
r1404r1405
414414static WRITE16_HANDLER ( cthd2003_bankswitch_w )
415415{
416416   int bankaddress;
417   static int cthd2003_banks[8] =
417   static const int cthd2003_banks[8] =
418418   {
419419      1,0,1,0,1,0,3,2,
420420   };
src/mame/machine/midwayic.c
r1404r1405
7272   UINT8   dcs_cpu;
7373   UINT8   shuffle_type;
7474   UINT8   shuffle_active;
75   UINT8 *   shuffle_map;
75   const UINT8 *   shuffle_map;
7676   void    (*irq_callback)(int);
7777   UINT8   irq_state;
7878   UINT16   sound_irq_state;
r1404r1405
589589
590590void midway_ioasic_init(int shuffle, int upper, int yearoffs, void (*irq_callback)(int))
591591{
592   static UINT8 shuffle_maps[][16] =
592   static const UINT8 shuffle_maps[][16] =
593593   {
594594      { 0x0,0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8,0x9,0xa,0xb,0xc,0xd,0xe,0xf },   /* WarGods, WG3DH, SFRush, MK4 */
595595      { 0x4,0x5,0x6,0x7,0xb,0xa,0x9,0x8,0x3,0x2,0x1,0x0,0xf,0xe,0xd,0xc },   /* Blitz, Blitz99 */
src/mame/machine/konamigx.c
r1404r1405
920920static void konamigx_precache_registers(void)
921921{
922922   // (see sprite color coding scheme on p.46 & 47)
923   static int coregmasks[5] = {0xf,0xe,0xc,0x8,0x0};
924   static int coregshifts[5]= {4,5,6,7,8};
923   static const int coregmasks[5] = {0xf,0xe,0xc,0x8,0x0};
924   static const int coregshifts[5]= {4,5,6,7,8};
925925   int i;
926926
927927   K053246_objset1 = K053246_read_register(5);
r1404r1405
12321232               tilemap *sub2, int sub2flags,
12331233               int mixerflags)
12341234{
1235   static int xoffset[8] = { 0, 1, 4, 5, 16, 17, 20, 21 };
1236   static int yoffset[8] = { 0, 2, 8, 10, 32, 34, 40, 42 };
1235   static const int xoffset[8] = { 0, 1, 4, 5, 16, 17, 20, 21 };
1236   static const int yoffset[8] = { 0, 2, 8, 10, 32, 34, 40, 42 };
12371237   static int parity = 0;
12381238
12391239   int objbuf[GX_MAX_OBJECTS];
r1404r1405
20492049{
20502050
20512051// hand-filled but should be close
2052static UINT8 ztable[7][8] =
2052static const UINT8 ztable[7][8] =
20532053{
20542054   {5,4,3,2,1,7,6,0},
20552055   {4,3,2,1,0,7,6,5},
r1404r1405
20602060   {5,4,3,2,1,7,6,0}
20612061};
20622062
2063static UINT8 ptable[7][8] =
2063static const UINT8 ptable[7][8] =
20642064{
20652065   {0x00,0x00,0x00,0x10,0x20,0x00,0x00,0x30},
20662066   {0x20,0x20,0x20,0x20,0x20,0x00,0x20,0x20},
r1404r1405
20742074   INT32 data1, data2, i, j, vpos, hpos, voffs, hoffs, vcorr, hcorr, vmask, hmask, magicid;
20752075   UINT32 *src, *srcend, *obj, *objend;
20762076   UINT16 *dst;
2077   UINT8  *zcode, *pcode;
2077   const UINT8  *zcode, *pcode;
20782078
20792079   if (!count || !srcbase) return;
20802080
src/mame/machine/daikaiju.c
r1404r1405
129129
130130static int daikaiju_buffer[256];
131131
132static int xortable[]=
132static const int xortable[]=
133133{
134134 0xF5, 0xD5, 0x6A, 0x26, 0x00, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x16, 0x00, 0xCB, 0x23, 0x19,
135135 0x11, 0x00, 0xC0, 0x19, 0xD1, 0xF1, 0xC9, -1
src/mame/machine/namcoio.c
r1404r1405
277277  verified on Namco original hardware, but they are the same in all the bootlegs,
278278  so we can assume they are right.
279279*/
280static int joy_map[16] =
280static const int joy_map[16] =
281281/*  LDRU, LDR, LDU,  LD, LRU, LR,  LU,    L, DRU,  DR,  DU,   D,  RU,   R,   U, center */
282282{    0xf, 0xe, 0xd, 0x5, 0xc, 0x9, 0x7, 0x6, 0xb, 0x3, 0xa, 0x4, 0x1, 0x2, 0x0, 0x8 };
283283
src/mame/machine/scramble.c
r1404r1405
6666
6767static READ8_HANDLER( scrambls_input_port_2_r )
6868{
69  static UINT8 mask[] = { 0x20, 0x20, 0x80, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0 };
69  static const UINT8 mask[] = { 0x20, 0x20, 0x80, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0 };
7070
7171   UINT8 res;
7272
src/mame/machine/carpolo.c
r1404r1405
483483   /*irqs   : A/B             */ 0, 0
484484};
485485
486static struct TTL74148_interface TTL74148_3S_intf =
486static const struct TTL74148_interface TTL74148_3S_intf =
487487{
488488   TTL74148_3S_cb
489489};
490490
491static struct TTL7474_interface TTL7474_2S_1_intf =
491static const struct TTL7474_interface TTL7474_2S_1_intf =
492492{
493493   TTL7474_2S_1_cb
494494};
495495
496static struct TTL7474_interface TTL7474_2S_2_intf =
496static const struct TTL7474_interface TTL7474_2S_2_intf =
497497{
498498   TTL7474_2S_2_cb
499499};
500500
501static struct TTL7474_interface TTL7474_2U_1_intf =
501static const struct TTL7474_interface TTL7474_2U_1_intf =
502502{
503503   TTL7474_2U_1_cb
504504};
505505
506static struct TTL7474_interface TTL7474_2U_2_intf =
506static const struct TTL7474_interface TTL7474_2U_2_intf =
507507{
508508   TTL7474_2U_2_cb
509509};
src/mame/machine/pckeybrd.c
r1404r1405
5858
5959
6060/* key set 3 */
61static int at_keyboard_scancode_set_2_3[]=
61static const int at_keyboard_scancode_set_2_3[]=
6262{
6363   0,
6464   0x076,
r1404r1405
199199} extended_keyboard_code;
200200
201201
202static extended_keyboard_code keyboard_mf2_code[0x10][2/*numlock off, on*/]={
202static const extended_keyboard_code keyboard_mf2_code[0x10][2/*numlock off, on*/]={
203203   {   { "\xe0\x1c", "\xe0\x9c" } }, // keypad enter
204204   {   { "\xe0\x1d", "\xe0\x9d" } }, // right control
205205   {   { "\xe0\x35", "\xe0\xb5" } },
r1404r1405
220220
221221/* I don't think these keys change if num-lock is active! */
222222/* pc-at extended keyboard make/break codes for code set 3 */
223static extended_keyboard_code at_keyboard_extended_codes_set_2_3[]=
223static const extended_keyboard_code at_keyboard_extended_codes_set_2_3[]=
224224{
225225   /*keypad enter */
226226   {
r1404r1405
477477      case 2:
478478      case 3:
479479      {
480         extended_keyboard_code *key = &at_keyboard_extended_codes_set_2_3[code];
480         const extended_keyboard_code *key = &at_keyboard_extended_codes_set_2_3[code];
481481
482482         if (pressed)
483483         {
src/mame/machine/n64.c
r1404r1405
564564}
565565
566566
567rsp_config n64_rsp_config =
567const rsp_config n64_rsp_config =
568568{
569569   n64_dp_reg_r,
570570   n64_dp_reg_w,
src/mame/machine/stfight.c
r1404r1405
170170 *      Machine hardware for MSM5205 ADPCM sound control
171171 */
172172
173static int sampleLimits[] =
173static const int sampleLimits[] =
174174{
175175    0x0000,     // machine gun fire?
176176    0x1000,     // player getting shot
src/mame/machine/model3.c
r1404r1405
2222#define NEXT(new_state) fsm[state][new_state]
2323
2424static INT32  state;  // current state
25static INT32  fsm[][2] =  {
25static const INT32  fsm[][2] =  {
2626                            {  1,  0 },  // 0  Test-Logic/Reset
2727                            {  1,  2 },  // 1  Run-Test/Idle
2828                            {  3,  9 },  // 2  Select-DR-Scan
src/mame/machine/volfied.c
r1404r1405
260260   0xce39, 0x1c02, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
261261};
262262
263static const UINT16* palette_data_lookup[] =
263static const UINT16 *const palette_data_lookup[] =
264264{
265265   0,
266266   palette_data_01,
src/mame/machine/balsente.c
r1404r1405
10661066#if LOG_CEM_WRITES
10671067         if (temp != cem3394_get_parameter(i, reg))
10681068         {
1069            static const char *names[] =
1069            static const char *const names[] =
10701070            {
10711071               "VCO_FREQUENCY",
10721072               "FINAL_GAIN",
src/mame/machine/deco102.c
r1404r1405
1414
1515static UINT16 decrypt(UINT16 data, int address, int select_xor)
1616{
17   static UINT16 xors[16] =
17   static const UINT16 xors[16] =
1818   {
1919      0xb52c,0x2458,0x139a,0xc998,0xce8e,0x5144,0x0429,0xaad4,0xa331,0x3645,0x69a3,0xac64,0x1a53,0x5083,0x4dea,0xd237
2020   };
21   static UINT8 bitswaps[16][16] =
21   static const UINT8 bitswaps[16][16] =
2222   {
2323      { 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 },
2424      { 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 },
r1404r1405
3030      { 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 }
3131   };
3232   int j, xor;
33   UINT8 *bs;
33   const UINT8 *bs;
3434
3535   // calculate bitswap to use
3636   j = ((address ^ select_xor) & 0xf0) >> 4;
src/mame/machine/vsnes.c
r1404r1405
1616
1717/* Locals */
1818static int input_latch[4];
19static UINT8 *remapped_colortable;
19static const UINT8 *remapped_colortable;
2020
2121static int sound_fix=0;
2222/*************************************
r1404r1405
2727
2828/* RP2C04-001 */
2929/* check 0x08 */
30static UINT8 rp2c04001_colortable[] =
30static const UINT8 rp2c04001_colortable[] =
3131{
3232   0x35, 0xff, 0x16, 0x22, 0x1c, 0xff, 0xff, 0x15, /* 0x00 - 0x07 */
3333   0x20, 0x00, 0x27, 0x05, 0x04, 0x27, 0x08, 0x30, /* 0x08 - 0x0f */
r1404r1405
4141
4242/* RP2C04-002 */
4343/* 0x04, 0x24 */
44static UINT8 rp2c04002_colortable[] =
44static const UINT8 rp2c04002_colortable[] =
4545{
4646   0xff, 0x27, 0x18, 0xff, 0x3a, 0x25, 0x2b, 0x31, /* 0x00 - 0x07 */
4747   0x15, 0x13, 0x38, 0x34, 0x20, 0x23, 0xff, 0x0b, /* 0x08 - 0x0f */
r1404r1405
5555
5656/* RP2C04-003 */
5757/* check 0x0f, 0x2e, 0x34 */
58static UINT8 rp2c04003_colortable[] =
58static const UINT8 rp2c04003_colortable[] =
5959{
6060   0xff, 0xff, 0xff, 0x10, 0x1a, 0x30, 0x31, 0x09, /* 0x00 - 0x07 */
6161   0x01, 0x0f, 0x36, 0x08, 0x15, 0xff, 0xff, 0x30, /* 0x08 - 0x0f */
r1404r1405
6969
7070/* RP2C05-004 */
7171/* check 0x03 0x1d, 0x38, 0x3b*/
72static UINT8 rp2c05004_colortable[] =
72static const UINT8 rp2c05004_colortable[] =
7373{
7474   0x18, 0xff, 0x1c, 0x89, 0xff, 0xff, 0x01, 0x17, /* 0x00 - 0x07 */
7575   0x10, 0x0f, 0x2a, 0xff, 0x36, 0x37, 0x1a, 0xff, /* 0x08 - 0x0f */
r1404r1405
10751075static READ8_HANDLER( tko_security_r )
10761076{
10771077   static int security_counter;
1078   static UINT8 security_data[] = {
1078   static const UINT8 security_data[] = {
10791079      0xff, 0xbf, 0xb7, 0x97, 0x97, 0x17, 0x57, 0x4f,
10801080      0x6f, 0x6b, 0xeb, 0xa9, 0xb1, 0x90, 0x94, 0x14,
10811081      0x56, 0x4e, 0x6f, 0x6b, 0xeb, 0xa9, 0xb1, 0x90,
src/mame/machine/mexico86.c
r1404r1405
107107
108108      if (mexico86_protection_ram[0xe0] > 0 && mexico86_protection_ram[0xe0] < 4)
109109      {
110         static UINT8 answers[3][16] =
110         static const UINT8 answers[3][16] =
111111         {
112112            { 0x00,0x40,0x48,0x50,0x58,0x60,0x68,0x70,0x78,0x80,0x88,0x00,0x00,0x00,0x00,0x00 },
113113            { 0x00,0x04,0x08,0x0C,0x10,0x14,0x18,0x1C,0x20,0x31,0x2B,0x35,0x00,0x00,0x00,0x00 },
r1404r1405
130130      // The following is missing from Knight Boy
131131      // this should be equivalent to the obfuscated kiki_clogic() below
132132      {
133         static int db[16]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x10,0x18,0x00,0x00,0x00,0x00};
133         static const int db[16]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x10,0x18,0x00,0x00,0x00,0x00};
134134         int sy = mexico86_protection_ram[0xa0] + ((0x18)>>1);
135135         int sx = mexico86_protection_ram[0xa1] + ((0x18)>>1);
136136
r1404r1405
175175
176176static void kiki_clogic(int address, int latch)
177177{
178   static UINT8 db[16]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x10,0x18,0x00,0x00,0x00,0x00};
178   static const UINT8 db[16]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x10,0x18,0x00,0x00,0x00,0x00};
179179   static UINT8 queue[64];
180180   static int qfront = 0, state = 0;
181181   int sy, sx, hw, i, qptr, diff1, diff2;
src/mame/machine/snes.c
r1404r1405
4646
4747// full graphic variables
4848static UINT16 vram_fgr_high, vram_fgr_increment, vram_fgr_count, vram_fgr_mask, vram_fgr_shift, vram_read_buffer;
49static UINT16 vram_fgr_inctab[4] = { 1, 32, 128, 128 };
50static UINT16 vram_fgr_inccnts[4] = { 0, 32, 64, 128 };
51static UINT16 vram_fgr_shiftab[4] = { 0, 5, 6, 7 };
49static const UINT16 vram_fgr_inctab[4] = { 1, 32, 128, 128 };
50static const UINT16 vram_fgr_inccnts[4] = { 0, 32, 64, 128 };
51static const UINT16 vram_fgr_shiftab[4] = { 0, 5, 6, 7 };
5252
5353struct snes_cart_info snes_cart = { SNES_MODE_20, 0x40000, 0x40000 };
5454
src/mame/machine/amiga.c
r1404r1405
7979static emu_timer * amiga_irq_timer;
8080static emu_timer * amiga_blitter_timer;
8181
82const char *amiga_custom_names[0x100] =
82const char *const amiga_custom_names[0x100] =
8383{
8484   /* 0x000 */
8585   "BLTDDAT",       "DMACONR",       "VPOSR",       "VHPOSR",
r1404r1405
925925   /* logging */
926926   if (LOG_BLITS)
927927   {
928      static const char *type[] = { "ASCENDING", "LINE", "DESCENDING", "LINE" };
928      static const char *const type[] = { "ASCENDING", "LINE", "DESCENDING", "LINE" };
929929      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));
930930      if (CUSTOM_REG(REG_BLTCON0) & 0x0800)
931931         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));
src/mame/machine/vertigo.c
r1404r1405
3939static UINT8 adc_result;
4040
4141/* 8254 timer config */
42static struct pit8253_config pit8254_config =
42static const struct pit8253_config pit8254_config =
4343{
4444   TYPE8254,
4545   {
r1404r1405
5959   }
6060};
6161
62static struct TTL74148_interface irq_encoder =
62static const struct TTL74148_interface irq_encoder =
6363{
6464   update_irq
6565};
src/mame/machine/pcshare.c
r1404r1405
104104
105105/* PC interface to PC-com hardware. Done this way because PCW16 also
106106uses PC-com hardware and doesn't have the same setup! */
107static uart8250_interface com_interface[4]=
107static const uart8250_interface com_interface[4]=
108108{
109109   {
110110      TYPE8250,
r1404r1405
201201
202202
203203#ifdef MESS
204static PC_LPT_CONFIG lpt_config[3]={
204static const PC_LPT_CONFIG lpt_config[3]={
205205   {
206206      1,
207207      LPT_UNIDIRECTIONAL,
r1404r1405
219219   }
220220};
221221
222static CENTRONICS_CONFIG cent_config[3]={
222static const CENTRONICS_CONFIG cent_config[3]={
223223   {
224224      PRINTER_IBM,
225225      pc_lpt_handshake_in
r1404r1405
367367
368368
369369
370static struct dma8237_interface pc_dma =
370static const struct dma8237_interface pc_dma =
371371{
372372   0,
373373   1.0e-6,   // 1us
src/mame/machine/neoprot.c
r1404r1405
189189static WRITE16_HANDLER( kof99_bankswitch_w )
190190{
191191   int bankaddress;
192   static int bankoffset[64] =
192   static const int bankoffset[64] =
193193   {
194194      0x000000, 0x100000, 0x200000, 0x300000,
195195      0x3cc000, 0x4cc000, 0x3f2000, 0x4f2000,
r1404r1405
221221{
222222   /* thanks to Razoola and Mr K for the info */
223223   int bankaddress;
224   static int bankoffset[64] =
224   static const int bankoffset[64] =
225225   {
226226      0x000000, 0x100000, 0x200000, 0x300000, // 00
227227      0x280000, 0x380000, 0x2d0000, 0x3d0000, // 04
r1404r1405
258258{
259259   /* thanks to Razoola and Mr K for the info */
260260   int bankaddress;
261   static int bankoffset[64] =
261   static const int bankoffset[64] =
262262   {
263263      0x000000, 0x100000, 0x200000, 0x300000, // 00
264264      0x280000, 0x380000, 0x2d0000, 0x3d0000, // 04
r1404r1405
297297{
298298   /* thanks to Razoola and Mr K for the info */
299299   int bankaddress;
300   static int bankoffset[64] =
300   static const int bankoffset[64] =
301301   {
302302     0x000000, 0x020000, 0x040000, 0x060000, // 00
303303     0x070000, 0x090000, 0x0b0000, 0x0d0000, // 04
r1404r1405
333333{
334334   /* thanks to Razoola and Mr K for the info */
335335   int bankaddress;
336   static int bankoffset[64] =
336   static const int bankoffset[64] =
337337   {
338338      0x000000, 0x100000, 0x200000, 0x300000, // 00
339339      0x3f7800, 0x4f7800, 0x3ff800, 0x4ff800, // 04
src/mame/machine/mcr.c
r1404r1405
101101 *
102102 *************************************/
103103
104gfx_layout mcr_bg_layout =
104const gfx_layout mcr_bg_layout =
105105{
106106   8,8,
107107   RGN_FRAC(1,2),
r1404r1405
113113};
114114
115115
116gfx_layout mcr_sprite_layout =
116const gfx_layout mcr_sprite_layout =
117117{
118118   32,32,
119119   RGN_FRAC(1,4),
r1404r1405
199199}
200200
201201
202struct z80_irq_daisy_chain mcr_daisy_chain[] =
202const struct z80_irq_daisy_chain mcr_daisy_chain[] =
203203{
204204   { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 }, /* CTC number 0 */
205205   { 0, 0, 0, 0, -1 }      /* end mark */
206206};
207207
208208
209struct z80_irq_daisy_chain mcr_ipu_daisy_chain[] =
209const struct z80_irq_daisy_chain mcr_ipu_daisy_chain[] =
210210{
211211   { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 1 }, /* CTC number 1 */
212212   { z80pio_reset, z80pio_irq_state, z80pio_irq_ack, z80pio_irq_reti, 1 }, /* PIO number 1 */
r1404r1405
238238};
239239
240240
241static z80pio_interface nflfoot_pio_intf =
241static const z80pio_interface nflfoot_pio_intf =
242242{
243243   ipu_ctc_interrupt,
244244   0,
src/mame/machine/segacrpt.c
r1404r1405
184184
185185   for (A = 0x0000;A < 0x8000-14;A++)
186186   {
187      static char text[] = "INSERT COIN";
187      static const char text[] = "INSERT COIN";
188188      int i;
189189
190190
src/mame/machine/psx.c
r1404r1405
997997static UINT16 m_p_n_mdec_g5[ 256 * 3 ];
998998static UINT16 m_p_n_mdec_b5[ 256 * 3 ];
999999
1000static UINT32 m_p_n_mdec_zigzag[ DCTSIZE2 ] =
1000static const UINT32 m_p_n_mdec_zigzag[ DCTSIZE2 ] =
10011001{
10021002    0,  1,  8, 16,  9,  2,  3, 10,
10031003   17, 24, 32, 25, 18, 11,  4,  5,
src/mame/machine/beezer.c
r1404r1405
2020static WRITE8_HANDLER( b_via_1_pb_w );
2121static void b_via_1_irq (int level);
2222
23static struct via6522_interface b_via_0_interface =
23static const struct via6522_interface b_via_0_interface =
2424{
2525   /*inputs : A/B         */ 0, b_via_0_pb_r,
2626   /*inputs : CA/B1,CA/B2 */ 0, via_1_ca2_r, b_via_0_ca2_r, via_1_ca1_r,
r1404r1405
2929   /*irq                  */ b_via_0_irq
3030};
3131
32static struct via6522_interface b_via_1_interface =
32static const struct via6522_interface b_via_1_interface =
3333{
3434   /*inputs : A/B         */ b_via_1_pa_r, b_via_1_pb_r,
3535   /*inputs : CA/B1,CA/B2 */ via_0_cb2_r, 0, via_0_cb1_r, 0,
src/mame/machine/cchip.c
r1404r1405
4747/* This code for sound communication is a hack, it will not be
4848   identical to the code derived from the real c-chip */
4949
50static UINT8 superman_code[40] =
50static const UINT8 superman_code[40] =
5151{
5252   0x48, 0xe7, 0x80, 0x80,               /* MOVEM.L  D0/A0,-(A7)   ( Preserve Regs ) */
5353   0x20, 0x6d, 0x1c, 0x40,             /* MOVEA.L  ($1C40,A5),A0 ( Load sound pointer in A0 ) */
src/mame/machine/pgmprot.c
r1404r1405
1616static UINT16 pstar_e7,pstar_b1,pstar_ce;
1717static UINT16 pstar_ram[3];
1818
19static int Pstar_ba[0x1E]={
19static const int Pstar_ba[0x1E]={
2020   0x02,0x00,0x00,0x01,0x00,0x03,0x00,0x00, //0
2121   0x02,0x00,0x06,0x00,0x22,0x04,0x00,0x03, //8
2222   0x00,0x00,0x06,0x00,0x20,0x07,0x00,0x03, //10
2323   0x00,0x21,0x01,0x00,0x00,0x63
2424};
2525
26static int Pstar_b0[0x10]={
26static const int Pstar_b0[0x10]={
2727   0x09,0x0A,0x0B,0x00,0x01,0x02,0x03,0x04,
2828   0x05,0x06,0x07,0x08,0x00,0x00,0x00,0x00
2929};
3030
31static int Pstar_ae[0x10]={
31static const int Pstar_ae[0x10]={
3232   0x5D,0x86,0x8C ,0x8B,0xE0,0x8B,0x62,0xAF,
3333   0xB6,0xAF,0x10A,0xAF,0x00,0x00,0x00,0x00
3434};
3535
36static int Pstar_a0[0x10]={
36static const int Pstar_a0[0x10]={
3737   0x02,0x03,0x04,0x05,0x06,0x01,0x0A,0x0B,
3838   0x0C,0x0D,0x0E,0x09,0x00,0x00,0x00,0x00,
3939};
4040
41static int Pstar_9d[0x10]={
41static const int Pstar_9d[0x10]={
4242   0x05,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
4343   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
4444};
4545
46static int Pstar_90[0x10]={
46static const int Pstar_90[0x10]={
4747   0x0C,0x10,0x0E,0x0C,0x00,0x00,0x00,0x00,
4848   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
4949};
50static int Pstar_8c[0x23]={
50static const int Pstar_8c[0x23]={
5151   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
5252   0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,
5353   0x01,0x01,0x01,0x01,0x02,0x02,0x02,0x02,
r1404r1405
5555   0x03,0x03,0x03
5656};
5757
58static int Pstar_80[0x1a3]={
58static const int Pstar_80[0x1a3]={
5959   0x03,0x03,0x04,0x04,0x04,0x04,0x05,0x05,
6060   0x05,0x05,0x06,0x06,0x03,0x03,0x04,0x04,
6161   0x05,0x05,0x05,0x05,0x06,0x06,0x07,0x07,
r1404r1405
317317static void asic3_compute_hold(void)
318318{
319319   // The mode is dependant on the region
320   static int modes[4] = { 1, 1, 3, 2 };
320   static const int modes[4] = { 1, 1, 3, 2 };
321321   int mode = modes[readinputport(4) & 3];
322322
323323   switch(mode) {
src/mame/machine/system16.c
r1404r1405
5959}
6060
6161
62struct upd7759_interface sys16_upd7759_interface =
62const struct upd7759_interface sys16_upd7759_interface =
6363{
6464   0,         /* memory region 3 contains the sample data */
6565   sound_cause_nmi
src/mame/machine/starwars.c
r1404r1405
1717#define kYaw      1
1818#define kThrust      2
1919
20/* Constants for mathbox operations */
20/* Constants for matrix processor operations */
2121#define NOP         0x00
2222#define LAC         0x01
2323#define READ_ACC   0x02
r1404r1405
3131/* Debugging flag */
3232#define MATHDEBUG   0
3333
34#define MASTER_CLOCK (12096000)
3435
3536UINT8 *starwars_mathram;
3637UINT8 *starwars_ram_overlay;
r1404r1405
4950static UINT8 *PROM_MAS; /* Storage for direct address only */
5051static UINT8 *PROM_AM; /* Storage for address mode select only */
5152
53static int math_run;
54static emu_timer *math_timer;
5255
5356/* Local function prototypes */
54static void run_mbox(void);
57static void run_mproc(void);
5558
5659
60static TIMER_CALLBACK( math_run_clear )
61{
62   math_run = 0;
63}
5764
65
5866/*************************************
5967 *
6068 *  X2212 nvram store
r1404r1405
122130{
123131   int x = readinputport(1);
124132
125   /* Kludge to enable Starwars Mathbox Self-test                  */
126   /* The mathbox looks like it's running, from this address... :) */
127   if (activecpu_get_pc() == 0xf978 || activecpu_get_pc() == 0xf655)
133   /* set the matrix processor flag */
134   if (math_run)
128135      x |= 0x80;
136   else
137      x &= ~0x80;
129138
130139   /* set the AVG done flag */
131140   if (avgdvg_done())
r1404r1405
169178
170179/*************************************
171180 *
172 *  Mathbox initialization
181 *  Matrix Processor initialization
173182 *
174183 *************************************/
175184
176void swmathbox_init(void)
185void starwars_mproc_init(void)
177186{
178187   UINT8 *src = memory_region(REGION_USER2);
179188   int cnt, val;
r1404r1405
195204      PROM_MAS[cnt] =  val       & 0x007f;
196205      PROM_AM[cnt]  = (val >> 7) & 0x0001;
197206   }
207
208   math_timer = timer_alloc(math_run_clear, NULL);
198209}
199210
200211
201212
202213/*************************************
203214 *
204 *  Mathbox reset
215 *  Matrix Processor reset
205216 *
206217 *************************************/
207218
208void swmathbox_reset(void)
219void starwars_mproc_reset(void)
209220{
210221   MPA = BIC = 0;
222   math_run = 0;
211223}
212224
213225
214226
215227/*************************************
216228 *
217 *  Mathbox execution
229 *  Matrix Processor execution
218230 *
219231 *************************************/
220232
221void run_mbox(void)
233void run_mproc(void)
222234{
223235   static INT16 A, B, C;
224236   static INT32 ACC;
r1404r1405
229241   int M_STOP = 100000; /* Limit on number of instructions allowed before halt */
230242   int MA;
231243   int IP15_8, IP7, IP6_0; /* Instruction PROM values */
244   int mptime;
232245
246   logerror("Running Matrix Processor...\n");
233247
234   logerror("Running Mathbox...\n");
248   mptime = 0;
249   math_run = 1;
235250
236251   /* loop until finished */
237252   while (M_STOP > 0)
238253   {
254
255      /* each step of the matrix processor takes five clock cycles */
256      mptime += 5;
257
239258      /* fetch the current instruction data */
240259      IP15_8 = PROM_STR[MPA];
241260      IP7    = PROM_AM[MPA];
r1404r1405
341360             */
342361         A = (A & 0x8000)? 0xffff: 0;
343362         B = (B & 0x8000)? 0xffff: 0;
363
364         /* The multiply-add holds the main matrix processor counter
365             * for 33 cycles
366             */
367         mptime += 33;
344368      }
345369
346370      /* 0x40 - LDB */
r1404r1405
362386
363387      M_STOP--; /* Decrease count */
364388   }
389
390   timer_adjust(math_timer, attotime_mul(ATTOTIME_IN_HZ(MASTER_CLOCK), mptime), 1, attotime_zero);
365391}
366392
367393
r1404r1405
372398 *
373399 *************************************/
374400
375READ8_HANDLER( swmathbx_prng_r )
401READ8_HANDLER( starwars_prng_r )
376402{
377403   /*
378404     * The PRNG is a modified 23 bit LFSR. Taps are at 4 and 22 so the
r1404r1405
394420
395421/*************************************
396422 *
397 *  Mathbox divider
423 *  Starwars divider
398424 *
399425 *************************************/
400426
401READ8_HANDLER( swmathbx_reh_r )
427READ8_HANDLER( starwars_div_reh_r )
402428{
403429   return (quotient_shift & 0xff00) >> 8;
404430}
405431
406432
407READ8_HANDLER( swmathbx_rel_r )
433READ8_HANDLER( starwars_div_rel_r )
408434{
409435   return quotient_shift & 0x00ff;
410436}
411437
412438
413WRITE8_HANDLER( swmathbx_w )
439WRITE8_HANDLER( starwars_math_w )
414440{
415441   int i;
416442
r1404r1405
419445   {
420446      case 0:   /* mw0 */
421447         MPA = data << 2;   /* Set starting PROM address */
422         run_mbox();         /* and run the Mathbox */
448         run_mproc();         /* and run the Matrix Processor */
423449         break;
424450
425451      case 1:   /* mw1 */
src/mame/machine/model1.c
r1404r1405
21572157}
21582158
21592159/* TGP config */
2160struct mb86233_config model1_vr_tgp_config =
2160const struct mb86233_config model1_vr_tgp_config =
21612161{
21622162   copro_fifoin_pop,
21632163   copro_fifoout_push
src/mame/machine/bagman.c
r1404r1405
3535**  1 - fuse blown: disconnected from input (equal to 1)
3636**  0 - fuse not blown: connected to input (ie. x, not x, q, not q accordingly)
3737*/
38static UINT8 fusemap[64*32]=
38static const UINT8 fusemap[64*32]=
3939{
40401,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,
41411,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,
src/mame/machine/bfm_bd1.c
r1404r1405
7171
7272  */
7373
74static UINT16 BD1charset[]=
74static const UINT16 BD1charset[]=
7575{           // FEDC BA98 7654 3210
7676   0xA626, // 1010 0110 0010 0110 @.
7777   0xE027, // 1110 0000 0010 0111 A.
src/mame/mamedriv.c
r1404r1405
565565   DRIVER( popflamn )   /* (c) 1982 Jaleco */
566566   DRIVER( trvmstr )   /* (c) 1985 Enerdyne Technologies Inc. */
567567   DRIVER( trvmstra )   /* (c) 1985 Enerdyne Technologies Inc. */
568   DRIVER( trvmstrb )   /* (c) 1985 Enerdyne Technologies Inc. */
568569   DRIVER( trvgns )   /* (c) 198? Enerdyne Technologies Inc. */
569570
570571
r1404r1405
28202821   DRIVER( tekken3b )   /* Tekken 3 (TET3/VER.A) */
28212822   DRIVER( tekken3c )   /* Tekken 3 (TET2/VER.A) */
28222823   DRIVER( lbgrande )   /* Libero Grande (LG2/VER.A) */
2824   DRIVER( toukon3 )   /* Shin Nihon Pro Wrestling Toukon Retsuden 3 Arcade Edition (TR1/VER.A) */
28232825   DRIVER( soulclbr )   /* Soul Calibur (SOC14/VER.C) */
28242826   DRIVER( soulclba )   /* Soul Calibur (SOC11/VER.C) */
28252827   DRIVER( soulclbb )   /* Soul Calibur (SOC13/VER.B) */
r1404r1405
28272829   DRIVER( soulclbd )   /* Soul Calibur (SOC11/VER.A2) */
28282830   DRIVER( ehrgeiz )   /* Ehrgeiz (EG3/VER.A) */
28292831   DRIVER( ehrgeiza )   /* Ehrgeiz (EG2/VER.A) */
2832   DRIVER( kaiunqz )   /* Kaiun Quiz (KW1/VER.A) */
28302833   DRIVER( mdhorse )   /* Derby Quiz My Dream Horse (MDH1/VER.A2) */
2834   DRIVER( sws98 )      /* Super World Stadium '98 (SS81/VER.A) */
28312835   DRIVER( tenkomor )   /* Tenkomori Shooting (TKM2/VER.A1) */
28322836   DRIVER( tenkomoj )   /* Tenkomori Shooting (TKM1/VER.A1) */
28332837   DRIVER( fgtlayer )   /* Fighting Layer (FTL0/VER.A) */
r1404r1405
28452849   DRIVER( pacappsp )   /* Paca Paca Passion Special (PSP1/VER.A) */
28462850   DRIVER( golgo13 )   /* Golgo 13 (GLG1/VER.A) */
28472851   DRIVER( g13knd )   /* Golgo 13 Kiseki no Dandou (GLS1/VER.A) */
2852   DRIVER( sws2000 )   /* Super World Stadium 2000 (SS01/VER.A) */
2853   DRIVER( sws2001 )   /* Super World Stadium 2001 (SS11/VER.A) */
28482854
28492855   /* Namco System 10 */
28502856   DRIVER( mrdrilr2 )   /* Mr Driller 2 (DR21 Ver.A) */
src/mame/includes/cps1.h
r1404r1405
1414
1515INTERRUPT_GEN( cps1_qsound_interrupt );
1616
17extern struct QSound_interface qsound_interface;
17extern const struct QSound_interface qsound_interface;
1818
1919READ16_HANDLER( cps1_dsw_r );
2020READ16_HANDLER( cps1_in0_r );
src/mame/includes/n64.h
r1404r1405
4242
4343/*----------- defined in machine/n64.c -----------*/
4444
45extern rsp_config n64_rsp_config;
45extern const rsp_config n64_rsp_config;
4646
4747extern UINT32 *rdram;
4848extern UINT32 *rsp_imem;
src/mame/includes/galaga.h
r1404r1405
3333extern UINT8 *galaga_videoram;
3434extern UINT8 *galaga_ram1,*galaga_ram2,*galaga_ram3;
3535extern UINT8 galaga_starcontrol[];
36extern struct star star_seed_tab[];
36extern const struct star star_seed_tab[];
3737
3838PALETTE_INIT( galaga );
3939READ8_HANDLER( galaga_videoram_r );
src/mame/includes/amiga.h
r1404r1405
369369extern UINT16 *amiga_expansion_ram;
370370extern UINT16 *amiga_autoconfig_mem;
371371
372extern const char *amiga_custom_names[0x100];
372extern const char *const amiga_custom_names[0x100];
373373
374374extern UINT16 (*amiga_chip_ram_r)(offs_t offset);
375375extern void (*amiga_chip_ram_w)(offs_t offset, UINT16 data);
src/mame/includes/cclimber.h
r1404r1405
3838
3939/*----------- defined in audio/cclimber.c -----------*/
4040
41extern struct AY8910interface cclimber_ay8910_interface;
41extern const struct AY8910interface cclimber_ay8910_interface;
4242extern const struct Samplesinterface cclimber_samples_interface;
4343WRITE8_HANDLER( cclimber_sample_trigger_w );
4444WRITE8_HANDLER( cclimber_sample_rate_w );
src/mame/includes/mcr.h
r1404r1405
2020
2121extern attotime mcr68_timing_factor;
2222
23extern struct z80_irq_daisy_chain mcr_daisy_chain[];
24extern struct z80_irq_daisy_chain mcr_ipu_daisy_chain[];
23extern const struct z80_irq_daisy_chain mcr_daisy_chain[];
24extern const struct z80_irq_daisy_chain mcr_ipu_daisy_chain[];
2525extern UINT8 mcr_cocktail_flip;
2626
27extern gfx_layout mcr_bg_layout;
28extern gfx_layout mcr_sprite_layout;
27extern const gfx_layout mcr_bg_layout;
28extern const gfx_layout mcr_sprite_layout;
2929
3030extern UINT32 mcr_cpu_board;
3131extern UINT32 mcr_sprite_board;
src/mame/includes/system16.h
r1404r1405
9090extern UINT16 *sys16_extraram3;
9191
9292/* sound */
93extern struct upd7759_interface sys16_upd7759_interface;
93extern const struct upd7759_interface sys16_upd7759_interface;
9494
9595extern int sys18_sound_info[4*2];
9696
r1404r1405
233233extern int sys16_sprxoffset;
234234extern int sys16_bgxoffset;
235235extern int sys16_fgxoffset;
236extern int *sys16_obj_bank;
236extern const int *sys16_obj_bank;
237237extern int sys16_textlayer_lo_min;
238238extern int sys16_textlayer_lo_max;
239239extern int sys16_textlayer_hi_min;
src/mame/includes/starwars.h
r1404r1405
2222READ8_HANDLER( starwars_adc_r );
2323WRITE8_HANDLER( starwars_adc_select_w );
2424
25void swmathbox_init(void);
26void swmathbox_reset(void);
25void starwars_mproc_init(void);
26void starwars_mproc_reset(void);
2727
28READ8_HANDLER( swmathbx_prng_r );
29READ8_HANDLER( swmathbx_reh_r );
30READ8_HANDLER( swmathbx_rel_r );
28READ8_HANDLER( starwars_prng_r );
29READ8_HANDLER( starwars_div_reh_r );
30READ8_HANDLER( starwars_div_rel_r );
3131
32WRITE8_HANDLER( swmathbx_w );
32WRITE8_HANDLER( starwars_math_w );
3333
3434
3535/*----------- defined in audio/starwars.c -----------*/
src/mame/video/blktiger.c
r1404r1405
3535{
3636   /* the tile priority table is a guess compiled by looking at the game. It
3737       was not derived from a PROM so it could be wrong. */
38   static int split_table[16] =
38   static const int split_table[16] =
3939   {
4040      3,0,2,2,   /* the fourth could be 1 instead of 2 */
4141      0,1,0,0,
src/mame/video/midyunit.c
r1404r1405
394394DMA_DRAW_FUNC(prefix##_c0p1_xf, XFLIP_YES, PIXEL_COLOR, PIXEL_COPY)      \
395395DMA_DRAW_FUNC(prefix##_p0c1_xf, XFLIP_YES, PIXEL_COPY,  PIXEL_COLOR)   \
396396                                                                                    \
397static dma_draw_func prefix[32] =                                                            \
397static const dma_draw_func prefix[32] =                                                            \
398398{                                                                                    \
399399/*  B0:N / B1:N         B0:Y / B1:N         B0:N / B1:Y         B0:Y / B1:Y */                           \
400400   dma_draw_none,      prefix##_p0,      prefix##_p1,      prefix##_p0p1,      /* no color */             \
src/mame/video/ygv608.c
r1404r1405
715715}
716716
717717#ifdef _SHOW_VIDEO_DEBUG
718static char *mode[] = { "2PLANE_8BIT",
718static const char *const mode[] = { "2PLANE_8BIT",
719719         "2PLANE_16BIT",
720720         "1PLANE_16COLORS",
721721         "1PLANE_256COLORS" };
722722
723static char *psize[] = { "8x8", "16x16", "32x32", "64x64" };
723static const char *const psize[] = { "8x8", "16x16", "32x32", "64x64" };
724724#endif
725725
726726VIDEO_UPDATE( ygv608 )
src/mame/video/senjyo.c
r1404r1405
7979{
8080   /* Star Force has more tiles in bg1, so to get a uniform color code spread */
8181   /* they wired bit 7 of the tile code in place of bit 4 to get the color code */
82   static int colormap[8] = { 0,2,4,6,1,3,5,7 };
82   static const int colormap[8] = { 0,2,4,6,1,3,5,7 };
8383   UINT8 code = senjyo_bg1videoram[tile_index];
8484   SET_TILE_INFO(
8585         1,
src/mame/video/seibuspi.c
r1404r1405
343343   }
344344}
345345
346static int sprite_xtable[2][8] =
346static const int sprite_xtable[2][8] =
347347{
348348   { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 },
349349   { 7*16, 6*16, 5*16, 4*16, 3*16, 2*16, 1*16, 0*16 }
350350};
351static int sprite_ytable[2][8] =
351static const int sprite_ytable[2][8] =
352352{
353353   { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 },
354354   { 7*16, 6*16, 5*16, 4*16, 3*16, 2*16, 1*16, 0*16 }
src/mame/video/sauro.c
r1404r1405
6666
6767/* Sauro */
6868
69static int scroll2_map     [8] = {2, 1, 4, 3, 6, 5, 0, 7};
70static int scroll2_map_flip[8] = {0, 7, 2, 1, 4, 3, 6, 5};
69static const int scroll2_map[8] = {2, 1, 4, 3, 6, 5, 0, 7};
70static const int scroll2_map_flip[8] = {0, 7, 2, 1, 4, 3, 6, 5};
7171
7272WRITE8_HANDLER( sauro_scroll_fg_w )
7373{
74   int *map = (flip_screen ? scroll2_map_flip : scroll2_map);
74   const int *map = (flip_screen ? scroll2_map_flip : scroll2_map);
7575   int scroll = (data & 0xf8) | map[data & 7];
7676
7777   tilemap_set_scrollx(fg_tilemap, 0, scroll);
src/mame/video/gaplus.c
r1404r1405
275275      /* is it on? */
276276      if ((spriteram_3[offs+1] & 2) == 0)
277277      {
278         static int gfx_offs[2][2] =
278         static const int gfx_offs[2][2] =
279279         {
280280            { 0, 1 },
281281            { 2, 3 }
src/mame/video/midtunit.c
r1404r1405
556556DMA_DRAW_FUNC(prefix##_c0p1_xf, bpp, extract, XFLIP_YES, skip, scale, PIXEL_COLOR, PIXEL_COPY)      \
557557DMA_DRAW_FUNC(prefix##_p0c1_xf, bpp, extract, XFLIP_YES, skip, scale, PIXEL_COPY,  PIXEL_COLOR)      \
558558                                                                                 \
559static dma_draw_func prefix[32] =                                                         \
559static const dma_draw_func prefix[32] =                                                         \
560560{                                                                                 \
561561/*  B0:N / B1:N         B0:Y / B1:N         B0:N / B1:Y         B0:Y / B1:Y */                        \
562562   dma_draw_none,      prefix##_p0,      prefix##_p1,      prefix##_p0p1,      /* no color */          \
src/mame/video/suprnova.c
r1404r1405
380380   }
381381}
382382
383static 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) = {
383static 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) = {
384384   blit_nf_z,
385385   blit_fy_z,
386386   blit_fx_z,
src/mame/video/midzeus.c
r1404r1405
88#include "eminline.h"
99#include "includes/midzeus.h"
1010#include "video/poly.h"
11#include "video/rgbutil.h"
1112
1213
1314
r1404r1405
3334{
3435   const UINT64 *   palbase;
3536   const UINT64 *   texbase;
37   UINT16         solidcolor;
38   INT16         zoffset;
3639   UINT16         transcolor;
3740   UINT16         texwidth;
3841   UINT16         color;
r1404r1405
5053UINT32 *zeusbase;
5154
5255static poly_manager *poly;
56static UINT8 log_fifo;
5357
54static UINT32 zeuscmd_buffer[20];
55static UINT8 zeuscmd_buffer_words;
56static UINT8 zeuscmd_buffer_expected_words;
58static UINT32 zeus_fifo[20];
59static UINT8 zeus_fifo_words;
5760static INT16 zeus_matrix[3][3];
61static INT16 zeus_matrix2[3][3];
62static UINT8 zeus_usematrix2;
5863static INT32 zeus_point[3];
5964static UINT64 *zeus_renderbase;
6065static UINT64 *zeus_palbase;
6166static int zeus_enable_logging;
62static UINT32 zeus_blend;
63static UINT32 zeus_texdata;
6467static UINT32 zeus_objdata;
68static rectangle zeus_cliprect;
6569
6670static UINT64 *waveram[2];
6771
r1404r1405
8286
8387static void exit_handler(running_machine *machine);
8488
85static void zeus_write_16bit(offs_t offset, UINT16 data, int logit);
86static void zeus_write_32bit(offs_t offset, UINT32 data, int logit);
87static void zeus_process_write(offs_t offset);
88static void zeuscmd_execute(int words);
89static UINT8 zeuscmd_length(UINT32 word);
89static void zeus_pointer_w(UINT32 which, UINT32 data, int logit);
90static void zeus_register16_w(offs_t offset, UINT16 data, int logit);
91static void zeus_register32_w(offs_t offset, UINT32 data, int logit);
92static void zeus_register_update(offs_t offset);
93static int zeus_fifo_process(const UINT32 *data, int numwords);
94static void zeus_draw_model(UINT32 texdata, int logit);
95static void zeus_draw_quad(const UINT32 *databuffer, UINT32 texdata, int logit);
9096
97static void render_poly_4bit(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid);
98static void render_poly_8bit(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid);
99static void render_poly_shade(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid);
100static void render_poly_solid(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid);
101static void render_poly_solid_fixedz(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid);
91102
103static void log_fifo_command(const UINT32 *data, int numwords, const char *suffix);
104static void log_waveram(UINT32 length_and_base);
92105
106
107
93108/*************************************
94109 *
95110 *  Inlines
r1404r1405
110125
111126INLINE UINT64 *waveram_ptr_from_texture_addr(UINT8 bank, UINT32 addr, int width)
112127{
113   return &waveram[bank][(addr * width) / 8];
128   return &waveram[bank][((addr & ~1) * width) / 8];
114129}
115130
116131
r1404r1405
160175}
161176
162177
178INLINE void waveram_plot_check_depth_nowrite(int y, int x, UINT16 color, UINT16 depth)
179{
180   if (x >= 0 && x < 400 && y >= 0 && y < 256)
181   {
182      UINT16 *depthptr;
183      UINT16 *ptr = waveram_pixel_ptr(zeus_renderbase, y, x, &depthptr);
184      if (depth <= *depthptr)
185         *ptr = color;
186   }
187}
188
189
163190INLINE UINT8 get_texel_8bit(const UINT64 *base, int y, int x, int width)
164191{
165192   const UINT8 *base8 = (const UINT8 *)base;
166   x &= width - 1;
167193   base8 += BYTE8_XOR_LE((y / 2) * (width * 2) + (x / 4) * 8 + (y & 1) * 4 + (x & 3));
168194   return *base8;
169195}
r1404r1405
172198INLINE UINT8 get_texel_4bit(const UINT64 *base, int y, int x, int width)
173199{
174200   const UINT8 *base8 = (const UINT8 *)base;
175   x &= (width * 2) - 1;
176201   base8 += BYTE8_XOR_LE((y / 2) * (width * 2) + (x / 8) * 8 + (y & 1) * 4 + ((x / 2) & 3));
177202   return (*base8 >> (4 * (x & 1))) & 0x0f;
178203}
r1404r1405
197222   int i;
198223
199224   /* allocate memory for "wave" RAM */
200   waveram[0] = auto_malloc(WAVERAM_WIDTH * WAVERAM_HEIGHT * sizeof(*waveram));
201   waveram[1] = auto_malloc(WAVERAM_WIDTH * WAVERAM_HEIGHT * sizeof(*waveram));
225   waveram[0] = auto_malloc(WAVERAM_WIDTH * WAVERAM_HEIGHT * sizeof(*waveram[0]));
226   waveram[1] = auto_malloc(WAVERAM_WIDTH * WAVERAM_HEIGHT * sizeof(*waveram[1]));
202227   state_save_register_global_pointer(waveram[0], WAVERAM_WIDTH * WAVERAM_HEIGHT);
203228   state_save_register_global_pointer(waveram[1], WAVERAM_WIDTH * WAVERAM_HEIGHT);
204229
r1404r1405
250275   if (!input_code_pressed(KEYCODE_W))
251276   {
252277      UINT64 *base = waveram_ptr_from_expanded_addr(1, zeusbase[0xcc]);
278      int xoffs = machine->screen[screen].visarea.min_x;
253279      for (y = cliprect->min_y; y <= cliprect->max_y; y++)
254280      {
255281         UINT16 *dest = (UINT16 *)bitmap->base + y * bitmap->rowpixels;
256282         for (x = cliprect->min_x; x <= cliprect->max_x; x++)
257            dest[x] = *waveram_pixel_ptr(base, y, x, NULL);
283            dest[x] = *waveram_pixel_ptr(base, y, x - xoffs, NULL);
258284      }
259285
260286      if (single_step)
r1404r1405
319345
320346
321347
348/*************************************
349 *
350 *  Core read handler
351 *
352 *************************************/
322353
323
324
325/*
326    Control = $80F6 when doing initial screen clear.
327       Writes 256 consecutive values to $B0, must mean autoincrement
328       Uses latched value in $B2 (maybe also in $B0)
329
330    Control = $82F0 when doing video RAM test write phase.
331       Writes 512 values across, but updates address before each one.
332
333    Control = $84F1 when doing video RAM test read phase.
334       Reads 512 values across, but updates address before each one.
335
336    Control = $80F2 when doing screen clear.
337       Writes 256 consecutive values to $B0, must mean autoincrement.
338       Uses latched value in $B2 (maybe also in $B0)
339
340    Control = $80A0/$8050 when plotting pixels.
341
342    Control = $42F0 when doing wave RAM test write phase.
343       Writes 512 values across, but updates address before each one.
344
345    Control = $44F1 when doing wave RAM test read phase.
346       Reads 512 values across, but updates address before each one.
347*/
348
349
350/*
351
352    Known commands:
353
354        $00rrxxxx = another type of register set?
355         yyyyyyyy
356
357            $0000C040 = set palette to 'yyyyyyyy'
358
359        $01rrxxxx = another type of register set?
360         yyyyyyyy
361
362            $01008000 = set object pointer (equivalent to word 2 of command $67)
363            $0100C0B0 = set texture data (equivalent to word 1 of command $67)
364            $0100C09C
365            $0100C0A3
366            $0100C0F0
367            $0100C040 = set palette base
368
369        $17rrxxxx = 16-bit write 'xxxx' to register 'rr'
370
371            $1752xxxx = write 'xxxx' to something that reflects back through $B2
372            $1770xxxx = write 'xxxx' to upper 16 bits of X coordinate
373            $1772xxxx = write 'xxxx' to upper 16 bits of Y coordinate
374            $1774xxxx = write 'xxxx' to upper 16 bits of Z coordinate
375
376        $18rr0000 = 32-bit write 'xxxxxxxx' to register ('rr' & 0x7f)
377         xxxxxxxx
378
379        $1A000000 = pipeline synchronize (guess)
380
381        $1C00cccc = load matrix (abc)(def)(ghi) and point (xyz)
382         ffffiiii
383         bbbbaaaa
384         eeeedddd
385         hhhhgggg
386         xxxxxxxx
387         yyyyyyyy
388         zzzzzzzz
389
390        $6700xxxx = render object described at 'bbbbbb' in waveram
391         aabbbbbb
392         ccddcccc
393*/
394
395/*
396
397MK4:
398
399Zeus cmd 18 : 18D60000 500A00FF
400Zeus cmd 00 : 0005C0A5 21001125
401Zeus cmd 25 : 25000000 007F0018 01000400 B0F60008
402Zeus cmd 18 : 18D60000 500A00FF
403Zeus cmd 18 : 18CE0000 00FFFFFF
404Zeus cmd 1A : 1A000000
405Zeus cmd 18 : 187E0000 0000FFFF
406Zeus cmd 1A : 1A000000
407Zeus cmd 18 : 18CE0000 00FFFFFF
408Zeus cmd 1A : 1A000000
409Zeus cmd 18 : 187E0000 FF980000
410Zeus cmd 00 : 0080C0A5 3F00102F
411Zeus cmd 17 : 17681370
412Zeus cmd 17 : 176940C4
413Zeus cmd 1C : ( 4000 0000 0000 ) ( 0000 4000 0000 ) ( 0000 0000 4000 )  -152.00   -50.00  1.25000
414Zeus cmd 00 : 0000C040 0318E132 -> palette @ (18E,132)
415Zeus cmd 67 : 67008000 0919F1C4 151 01FA4C -> render @ (19F,1C4)
416Zeus cmd 1C : ( 4000 0000 0000 ) ( 0000 4000 0000 ) ( 0000 0000 4000 )  -135.00   -50.00  1.25000
417Zeus cmd 67 : 67008000 0919F1C4 151 01FA4C
418Zeus cmd 1C : ( 4000 0000 0000 ) ( 0000 4000 0000 ) ( 0000 0000 4000 )  -118.00   -50.00  1.25000
419Zeus cmd 67 : 67008000 0919F1C4 151 01F988
420Zeus cmd 1C : ( 4000 0000 0000 ) ( 0000 4000 0000 ) ( 0000 0000 4000 )  -101.00   -50.00  1.25000
421
42219F1BA:  19DC0000 00000000  19840000 00F01605  25810000 21010000  FFD00000 00000000  FFD00038 000E0000  00080038 0E0E0000  00080000 0E000000  30000000 30000000  30000000 30000000  08000000 00000000
42319F1C4:  19DC0000 00000000  19840000 00F01605  25800000 21010000  FFD0FFFC 00000000  FFD0003C 00100000  0008003C 0E100000  0008FFFC 0E000000  30000000 30000000  30000000 30000000  08000000 00000000
42419F1CE:  19DC0000 00000000  19840000 00F01605  25800000 21010000  FFD0FFFC 00000000  FFD00028 000B0000  00080028 0E0B0000  0008FFFC 0E000000  30000000 30000000  30000000 30000000  08000000 00000000
42519F1D8:  19DC0000 00000000  19840000 00F01605  25800000 21010000  FFD00000 00000000  FFD00034 000D0000  00080034 0E0D0000  00080000 0E000000  30000000 30000000  30000000 30000000  08000000 00000000
42619F1E2:  19DC0000 00000000  19840000 00F01605  25800000 21010000  FFD00000 00000000  FFD00028 000A0000  000C0028 0F0A0000  000C0000 0F000000  30000000 30000000  30000000 30000000  08000000 00000000
42719F1EC:  19DC0000 00000000  19840000 00F01605  25800000 21010000  FFD00000 00000000  FFD00014 00050000  00080014 0E050000  00080000 0E000000  30000000 30000000  30000000 30000000  08000000 00000000
42819F1F6:  19DC0000 00000000  19840000 00F01605  25810000 21010000  FFD0FFFC 00000000  FFD00034 000E0000  00080034 0E0E0000  0008FFFC 0E000000  30000000 30000000  30000000 30000000  08000000 00000000
4291A0000:  19DC0000 00000000  19840000 00F01605  25800000 21010000  FFCC0000 00000000  FFCC0038 000E0000  000C0038 100E0000  000C0000 10000000  30000000 30000000  30000000 30000000  08000000 00000000
4301A000A:  19DC0000 00000000  19840000 00F01605  25800000 21010000  FFCC0000 00000000  FFCC0034 000D0000  000C0034 100D0000  000C0000 10000000  30000000 30000000  30000000 30000000  08000000 00000000
4311A0014:  19DC0000 00000000  19840000 00F01605  25800000 21010000  FFCC0000 00000000  FFCC002C 000B0000  0008002C 0F0B0000  00080000 0F000000  30000000 30000000  30000000 30000000  08000000 00000000
4321A001E:  19DC0000 00000000  19840000 00F01605  25800000 21010000  FFCC0000 00000000  FFCC002C 000B0000  000C002C 100B0000  000C0000 10000000  30000000 30000000  30000000 30000000  08000000 00000000
4331A0028:  19DC0000 00000000  19840000 00F01605  25800000 21010000  FFD00000 00000000  FFD0002C 000B0000  000C002C 0F0B0000  000C0000 0F000000  30000000 30000000  30000000 30000000  08000000 00000000
4341A0032:  19DC0000 00000000  19840000 00F01605  25800000 21010000  FFD00000 00000000  FFD00018 00060000  00080018 0E060000  00080000 0E000000  30000000 30000000  30000000 30000000  08000000 00000000
4351A003C:  19DC0000 40B68800  19840000 00001604  25800000 21010000  FF9CFF64 00000000  FF9C0084 00480000  005C0084 30480000  005CFF64 30000000  30000000 30000000  30000000 30000000  08000000 00000000
4361A0046:  19DC0000 40B68800  19840000 00001604  25800000 21010000  FF80FF48 00000000  FF80009C 00550000  0070009C 3C550000  0070FF48 3C000000  30000000 30000000  30000000 30000000  08000000 00000000
4371A0050:  19DC0000 40B68800  19840000 00001604  25800000 21010000  FF68FF30 00000000  FF6800B0 00600000  008800B0 48600000  0088FF30 48000000  30000000 30000000  30000000 30000000  08000000 00000000
4381A005A:  19DC0000 40B68800  19840000 00001604  25800000 21010000  FF54FF20 00000000  FF5400C4 00690000  00A000C4 53690000  00A0FF20 53000000  30000000 30000000  30000000 30000000  08000000 00000000
4391A0064:  19DC0000 40B68800  19840000 00001604  25800000 21010000  FF44FF10 00000000  FF4400D4 00710000  00B000D4 5B710000  00B0FF10 5B000000  30000000 30000000  30000000 30000000  08000000 00000000
4401A006E:  19DC0000 40B68800  19840000 00001604  25800000 21010000  FF3CFF08 00000000  FF3C00E4 00770000  00B400E4 5E770000  00B4FF08 5E000000  30000000 30000000  30000000 30000000  08000000 00000000
4411A0078:  19DC0000 40B68800  19840000 00001604  25800000 21010000  FF38FEFC 00000000  FF3800E4 007A0000  00C000E4 627A0000  00C0FEFC 62000000  30000000 30000000  30000000 30000000  08000000 00000000
4421A0082:  19DC0000 40B68800  19840000 00001604  25800000 21010000  FF28FEFC 00000000  FF2800EC 007C0000  00C000EC 667C0000  00C0FEFC 66000000  30000000 30000000  30000000 30000000  08000000 00000000
4431A008C:  19DC0000 40B68800  19840000 00001604  25800000 21010000  FF60FF28 00000000  FF6000C0 00660000  009C00C0 4F660000  009CFF28 4F000000  30000000 30000000  30000000 30000000  08000000 00000000
4441A0096:  19DC0000 40B68800  19840000 00001604  25800000 21010000  FF80FF48 00000000  FF80009C 00550000  0078009C 3E550000  0078FF48 3E000000  30000000 30000000  30000000 30000000  08000000 00000000
4451A00A0:  19DC0000 40B68800  19840000 00001604  25800000 21010000  FF94FF5C 00000000  FF940088 004B0000  00640088 344B0000  0064FF5C 34000000  30000000 30000000  30000000 30000000  08000000 00000000
4461A00AA:  19DC0000 40B68800  19840000 00001604  25810000 21010000  FFA4FF6C 00000000  FFA4007C 00440000  0054007C 2C440000  0054FF6C 2C000000  30000000 30000000  30000000 30000000  08000000 00000000
4471A00B4:  19DC0000 40B68800  19840000 00001604  25800000 21010000  FFACFF78 00000000  FFAC0070 003E0000  00480070 273E0000  0048FF78 27000000  30000000 30000000  30000000 30000000  08000000 00000000
4481A00BE:  19DC0000 40B68800  19840000 00001604  25800000 21010000  FFB4FF7C 00000000  FFB4006C 003C0000  0044006C 243C0000  0044FF7C 24000000  30000000 30000000  30000000 30000000  08000000 00000000
4491A00C8:  19DC0000 00000000  19840000 00001605  25800000 21000000  FF42FF02 00000000  FF4200FE 007F0000  00BE00FE 5F7F0000  00BEFF02 5F000000  30000000 30000000  30000000 30000000  08000000 00000000
4501A00D2:  19DC0000 00000000  19840000 00001605  25800000 21010000  FFB0FF70 00000000  FFB0007C 00430000  0054007C 29430000  0054FF70 29000000  30000000 30000000  30000000 30000000  08000000 00000000
4511A00DC:  19DC0000 40B68800  19840000 00001604  25800000 21010000  FA10F810 00000000  FA1007F0 007F0000  05F007F0 5F7F0000  05F0F810 5F000000  30000000 30000000  30000000 30000000  08000000 00000000
4521A00E6:  0C02C0F0 0F18E1BE
453         19DC0000 4B23CB00  19840000 00001605  252978EF 200C0000  04480000 00000000  043D0000 0000001E  043DFFEB 00000015  043DFFEB 00000015  00040000 0A331400  0743178C 0743178C
4541A00F0:                                        251178D7 200C0000  04480000 00000000  043DFFEB 00000015  043DFFE2 00000000  043DFFE2 00000000  00040000 0743178C  0003175D 0003175D
455                                               25EF78D7 200C0000  04480000 00000000  043DFFE2 00000000  043DFFEB 0000FFEB  043DFFEB 0000FFEB  00040000 0003175D  38C3178C 38C3178C
456                                               25D778EF 200C0000  04480000 00000000  043DFFEB 0000FFEB  043D0000 0000FFE2  043D0000 0000FFE2  00040000 38C3178C  35D31400 35D31400
457                                               25D77811 200C0000  04480000 00000000  043D0000 0000FFE2  043D0015 0000FFEB  043D0015 0000FFEB  00040000 35D31400  38C31474 38C31474
4581A010C:                                        25EF7829 200C0000  04480000 00000000  043D0015 0000FFEB  043D001E 00000000  043D001E 00000000  00040000 38C31474  000314A3 000314A3
459                                               25117829 200C0000  04480000 00000000  043D001E 00000000  043D0015 00000015  043D0015 00000015  00040000 000314A3  07431474 07431474
460                                               25297811 200C0000  04480000 00000000  043D0015 00000015  043D0000 0000001E  043D0000 0000001E  00040000 07431474  0A331400 0A331400
461                                               0C018000 381A0122
462                                               252186F3 200C0000  F64A0000 00000000  F652FFEB 00000015  F6520000 0000001E  F6520000 0000001E  000C0000 06ECD393  09ACD3FF 09ACD3FF
463                                               250D86DF 200C0000  F64A0000 00000000  F652FFE2 00000000  F652FFEB 00000015  F652FFEB 00000015  000C0000 001CD366  06DCD392 06DCD392
4641A0130:                                        25F386DF 200C0000  F64A0000 00000000  F652FFEB 0000FFEB  F652FFE2 00000000  F652FFE2 00000000  000C0000 393CD392  3FFCD366 3FFCD366
465                                               25DF86F3 200C0000  F64A0000 00000000  F6520000 0000FFE2  F652FFEB 0000FFEB  F652FFEB 0000FFEB  000C0000 366CD3FF  392CD393 392CD393
466                                               25DF860D 200C0000  F64A0000 00000000  F6520015 0000FFEB  F6520000 0000FFE2  F6520000 0000FFE2  000C0000 392CD06D  366CD001 366CD001
467                                               25F38621 200C0000  F64A0000 00000000  F652001E 00000000  F6520015 0000FFEB  F6520015 0000FFEB  000C0000 3FFCD09A  393CD06E 393CD06E
4681A014C:                                        250D8621 200C0000  F64A0000 00000000  F6520015 00000015  F652001E 00000000  F652001E 00000000  000C0000 06DCD06E  001CD09A 001CD09A
469                                               2521860D 200C0000  F6520000 0000001E  F6520015 00000015  F64A0000 00000000  F64A0000 00000000  09ACD001 06ECD06D  000C0000 000C0000
470                                               0C018000 381A015B
471                                               25D53969 200C0000  0429001D 0000FFE3  04290029 00000000  043D001E 00000000  043D0015 0000FFEB  356110B3 3FA110F7  3EB2D8B3 3902D88D
472                                               252B3969 200C0000  04290029 00000000  0429001D 0000001D  043D0015 00000015  043D001E 00000000  006110F7 0AA110B3  0702D88D 0152D8B3
473                                               2569392B 200C0000  0429001D 0000001D  04290000 00000029  043D0000 0000001E  043D0015 00000015  0B3110AA 0F711006  0B32D815 08D2D870
4741A0170:                                        256939D5 200C0000  04290000 00000029  0429FFE3 0000001D  043DFFEB 00000015  043D0000 0000001E  0F7113FA 0B311356  08D2DB90 0B32DBEB
475                                               252B3997 200C0000  0429FFE3 0000001D  0429FFD7 00000000  043DFFE2 00000000  043DFFEB 00000015  0AA1134D 00611309  0152DB4D 0702DB73
476                                               25D53997 200C0000  0429FFD7 00000000  0429FFE3 0000FFE3  043DFFEB 0000FFEB  043DFFE2 00000000  3FA11309 3561134D  3902DB73 3EB2DB4D
477                                               259739D5 200C0000  0429FFE3 0000FFE3  04290000 0000FFD7  043D0000 0000FFE2  043DFFEB 0000FFEB  34D11356 309113FA  34D2DBEB 3732DB90
4781A018C:                                        2597392B 200C0000  04290000 0000FFD7  0429001D 0000FFE3  043D0015 0000FFEB  043D0000 0000FFE2  30911006 34D110AA  3732D870 34D2D815
479                                               0C018000 381A0194
4801A0194:                                        252BC769 200C0000  F666001D 0000001D  F6660029 00000000  F652001E 00000000  F6520015 00000015  0AAEF0B3 006EF0F7  018D20B0 06CD208D
481                                               25D5C769 200C0000  F6660029 00000000  F666001D 0000FFE3  F6520015 0000FFEB  F652001E 00000000  3FAEF0F7 356EF0B3  394D208D 3E8D20B0
482                                               2597C72B 200C0000  F666001D 0000FFE3  F6660000 0000FFD7  F6520000 0000FFE2  F6520015 0000FFEB  34DEF0AA 309EF006  350D2018 373D206C
483                                               2597C7D5 200C0000  F6660000 0000FFD7  F666FFE3 0000FFE3  F652FFEB 0000FFEB  F6520000 0000FFE2  309EF3FA 34DEF356  373D2394 350D23E8
4841A01B0:                                        25D5C797 200C0000  F666FFE3 0000FFE3  F666FFD7 00000000  F652FFE2 00000000  F652FFEB 0000FFEB  356EF34D 3FAEF309  3E8D2350 394D2373
485                                               252BC797 200C0000  F666FFD7 00000000  F666FFE3 0000001D  F652FFEB 00000015  F652FFE2 00000000  006EF309 0AAEF34D  06CD2373 018D2350
486                                               2569C7D5 200C0000  F666FFE3 0000001D  F6660000 00000029  F6520000 0000001E  F652FFEB 00000015  0B3EF356 0F7EF3FA  0B0D23E8 08DD2394
487                                               2569C72B 200C0000  F6660000 00000029  F666001D 0000001D  F6520015 00000015  F6520000 0000001E  0F7EF006 0B3EF0AA  08DD206C 0B0D2018
4881A01CC:                                        0C018000 311A01CD
489                                               25300076 200C0000  F6660029 00000000  F666001D 0000001D  0429001D 0000001D  04290029 00000000  00FF24FA 0A6F24BB  0A60DCBB 00F0DCFA
4901A01D4:                                        25760030 200C0000  F666001D 0000001D  F6660000 00000029  04290000 00000029  0429001D 0000001D  0BBF24A6 0FAF240F  0FA0DC0F 0BB0DCA6
491                                               257600D0 200C0000  F6660000 00000029  F666FFE3 0000001D  0429FFE3 0000001D  04290000 00000029  0FAF27F1 0BBF275A  0BB0DF5A 0FA0DFF1
492                                               2530008A 200C0000  F666FFE3 0000001D  F666FFD7 00000000  0429FFD7 00000000  0429FFE3 0000001D  0A6F2745 00FF2706  00F0DF06 0A60DF45
493                                               25D0008A 200C0000  F666FFD7 00000000  F666FFE3 0000FFE3  0429FFE3 0000FFE3  0429FFD7 00000000  3F1F2706 35AF2745  35A0DF45 3F10DF06
4941A01F0:                                        258A00D0 200C0000  F666FFE3 0000FFE3  F6660000 0000FFD7  04290000 0000FFD7  0429FFE3 0000FFE3  345F275A 306F27F1  3060DFF1 3450DF5A
495                                               258A0030 200C0000  F6660000 0000FFD7  F666001D 0000FFE3  0429001D 0000FFE3  04290000 0000FFD7  306F240F 345F24A6  3450DCA6 3060DC0F
496                                               0C018000 071A1000  00000000 00000000
4971A1000:                                        25D00076 200C0000  F666001D 0000FFE3  F6660029 00000000  04290029 00000000  0429001D 0000FFE3  35AF24BB 3F1F24FA  3F10DCFA 35A0DCBB
498                                               08000000 00000000
499*/
500
501/*
502
503Note this sequence:
504Zeus cmd 17 : 1757500A
505Zeus cmd 17 : 175600FF
506Zeus cmd 17 : 176F0032
507Zeus cmd 17 : 176E0031
508Zeus cmd 17 : 176D003B
509Zeus cmd 17 : 176C002F
510
511Appears to do the same thing as:
512Zeus cmd 18 : 18D60000 500A00FF
513Zeus cmd 18 : 18EE0000 00320031
514Zeus cmd 18 : 18EC0000 003B002F
515
516
517
518Also this sequence:
519Zeus cmd 17 : 176940C4
520Zeus cmd 17 : 17681370
521
522Seems to have the same purpose as this part of the command stream:
523    19E80000 40C41370
524
525
526
527Invasion startup:
528
52900CC86:zeus16_w(81) = 0000 [00000000]
53000CC86:zeus16_w(80) = 0000 [00000000]
53100CC86:zeus16_w(4B) = 018F [018F0000]
53200CC86:zeus16_w(4A) = 01FE [018F01FE]
53300CC86:zeus16_w(49) = 018F [018F0000]
53400CC86:zeus16_w(48) = 01FE [018F01FE]
53500CC86:zeus16_w(CE) = 7620 [00007620]
53600CC86:zeus16_w(CD) = 0000 [00000000]
53700CC86:zeus16_w(CC) = 0000 [00000000]
53800CC86:zeus16_w(CB) = 0116 [01160000]
53900CC86:zeus16_w(CA) = 0107 [01160107]
54000CC86:zeus16_w(C9) = 0103 [01030000]
54100CC86:zeus16_w(C8) = 00FF [010300FF]
54200CC86:zeus16_w(C7) = 0211 [02110000]
54300CC86:zeus16_w(C6) = 007F [0211007F]
54400CC86:zeus16_w(C5) = 000C [000C0000]
54500CC86:zeus16_w(C4) = 004C [000C004C]
54600CC86:zeus16_w(C3) = 001F [001F0000]
54700CC86:zeus16_w(C2) = E591 [001FE591]
54800CC86:zeus16_w(C1) = 801F [801F0000]
54900CC86:zeus16_w(C0) = 2500 [801F2500]
55000CC86:zeus16_w(86) = 8003 [00008003]
55100CC86:zeus16_w(80) = 0C05 [00000C05]
55200CC86:zeus16_w(8F) = 0206 [02060000]
55300CC86:zeus16_w(8E) = 0000 [02060000]
55400CC86:zeus16_w(8D) = 0226 [02260000]
55500CC86:zeus16_w(8C) = 0000 [02260000]
55600CC86:zeus16_w(8B) = 0000 [00000000]
55700CC86:zeus16_w(8A) = FAFA [0000FAFA]
55800CC86:zeus16_w(89) = 0000 [00000000]
55900CC86:zeus16_w(88) = FAFA [0000FAFA]
56000CC86:zeus16_w(80) = 0001 [00000001]
56100CC86:zeus16_w(8F) = 0207 [02070000]
56200CC86:zeus16_w(8E) = BFFF [0207BFFF]
56300CC86:zeus16_w(8F) = 0206 [0206BFFF]
56400CC86:zeus16_w(8E) = 0000 [02060000]
56500CC86:zeus16_w(8D) = 0227 [02270000]
56600CC86:zeus16_w(8C) = BFFF [0227BFFF]
56700CC86:zeus16_w(8D) = 0226 [0226BFFF]
56800CC86:zeus16_w(8C) = 0000 [02260000]
56900CC86:zeus16_w(8F) = 0207 [02070000]
57000CC86:zeus16_w(8E) = F020 [0207F020]
57100CC86:zeus16_w(8F) = 0206 [0206F020]
57200CC86:zeus16_w(8E) = 0000 [02060000]
57300CC86:zeus16_w(8D) = 0227 [02270000]
57400CC86:zeus16_w(8C) = F020 [0227F020]
57500CC86:zeus16_w(8D) = 0226 [0226F020]
57600CC86:zeus16_w(8C) = 0000 [02260000]
57700CC86:zeus16_w(8F) = 0207 [02070000]
57800CC86:zeus16_w(8E) = DFFF [0207DFFF]
57900CC86:zeus16_w(8F) = 0206 [0206DFFF]
58000CC86:zeus16_w(8E) = 0000 [02060000]
58100CC86:zeus16_w(8D) = 0227 [02270000]
58200CC86:zeus16_w(8C) = DFFF [0227DFFF]
58300CC86:zeus16_w(8D) = 0226 [0226DFFF]
58400CC86:zeus16_w(8C) = 0000 [02260000]
58500CC86:zeus16_w(8F) = 0207 [02070000]
58600CC86:zeus16_w(8E) = DFFF [0207DFFF]
58700CC86:zeus16_w(8F) = 0206 [0206DFFF]
58800CC86:zeus16_w(8E) = 0000 [02060000]
58900CC86:zeus16_w(8D) = 0227 [02270000]
59000CC86:zeus16_w(8C) = DFFF [0227DFFF]
59100CC86:zeus16_w(8D) = 0226 [0226DFFF]
59200CC86:zeus16_w(8C) = 0000 [02260000]
59300CC86:zeus16_w(8F) = 0206 [02060000]
59400CC86:zeus16_w(8E) = 0000 [02060000]
59500CC86:zeus16_w(8D) = 0226 [02260000]
59600CC86:zeus16_w(8C) = 0000 [02260000]
59700CC86:zeus16_w(8B) = 0000 [0000FAFA]
59800CC86:zeus16_w(8A) = D254 [0000D254]
59900CC86:zeus16_w(89) = 8FFF [8FFFFAFA]
60000CC86:zeus16_w(88) = D794 [8FFFD794]
60100CC86:zeus16_w(85) = 0000 [00000000]
60200CC86:zeus16_w(84) = 0000 [00000000]
60300CC86:zeus16_w(83) = 1F1F [1F1F0000]
60400CC86:zeus16_w(82) = 2011 [1F1F2011]
60500CC86:zeus16_w(69) = 0003 [00030000]
60600CC86:zeus16_w(69) = 0000 [00000000]
60700CC86:zeus16_w(68) = 0100 [00000100]
60800CC92:zeus16_w(200) = 0100 [00000100]
60900CC92:zeus16_w(201) = 0000 [00000100]
61000CC92:zeus16_w(202) = 0000 [00000000]
61100CC92:zeus16_w(203) = 0000 [00000000]
61200CC92:zeus16_w(204) = 00D4 [000000D4]
61300CC92:zeus16_w(205) = 0000 [000000D4]
61400CC92:zeus16_w(206) = 0000 [00000000]
61500CC92:zeus16_w(207) = A000 [A0000000]
61600CC92:zeus16_w(208) = 0050 [00000050]
61700CC92:zeus16_w(209) = 0000 [00000050]
61800CC92:zeus16_w(20A) = 0000 [00000000]
61900CC92:zeus16_w(20B) = A000 [A0000000]
62000CC92:zeus16_w(20C) = 0703 [00000703]
62100CC92:zeus16_w(20D) = 0000 [00000703]
62200CC92:zeus16_w(20E) = 0000 [00000000]
62300CC92:zeus16_w(20F) = 0000 [00000000]
62400CC92:zeus16_w(210) = 0050 [00000050]
62500CC92:zeus16_w(211) = 0000 [00000050]
62600CC92:zeus16_w(212) = 0000 [00000000]
62700CC92:zeus16_w(213) = A000 [A0000000]
62800CC92:zeus16_w(214) = 005A [0000005A]
62900CC92:zeus16_w(215) = 01C0 [01C0005A]
63000CC92:zeus16_w(216) = 0000 [00000000]
63100CC92:zeus16_w(217) = B000 [B0000000]
63200CC92:zeus16_w(218) = 00D8 [000000D8]
63300CC92:zeus16_w(219) = 0000 [000000D8]
63400CC92:zeus16_w(21A) = 0000 [00000000]
63500CC92:zeus16_w(21B) = 9000 [90000000]
63600CC92:zeus16_w(21C) = 0607 [00000607]
63700CC92:zeus16_w(21D) = 0000 [00000607]
63800CC92:zeus16_w(21E) = 0000 [00000000]
63900CC92:zeus16_w(21F) = 0000 [00000000]
64000CC92:zeus16_w(220) = C000 [0000C000]
64100CC92:zeus16_w(221) = 0008 [0008C000]
64200CC92:zeus16_w(222) = 0000 [00000000]
64300CC92:zeus16_w(223) = 003F [003F0000]
64400CC92:zeus16_w(224) = 006A [0000006A]
64500CC92:zeus16_w(225) = 01D0 [01D0006A]
64600CC92:zeus16_w(226) = 0025 [00000025]
64700CC92:zeus16_w(227) = B000 [B0000025]
64800CC92:zeus16_w(228) = 0F00 [00000F00]
64900CC92:zeus16_w(229) = 0000 [00000F00]
65000CC92:zeus16_w(22A) = 0001 [00000001]
65100CC92:zeus16_w(22B) = 0000 [00000001]
65200CC92:zeus16_w(22C) = 0E08 [00000E08]
65300CC92:zeus16_w(22D) = 0000 [00000E08]
65400CC92:zeus16_w(22E) = 0000 [00000000]
65500CC92:zeus16_w(22F) = 0000 [00000000]
65600CC92:zeus16_w(230) = 00D4 [000000D4]
65700CC92:zeus16_w(231) = 0000 [000000D4]
65800CC92:zeus16_w(232) = 0000 [00000000]
65900CC92:zeus16_w(233) = A000 [A0000000]
66000CC92:zeus16_w(234) = 0050 [00000050]
66100CC92:zeus16_w(235) = 0000 [00000050]
66200CC92:zeus16_w(236) = 0000 [00000000]
66300CC92:zeus16_w(237) = A000 [A0000000]
66400CC92:zeus16_w(238) = 070E [0000070E]
66500CC92:zeus16_w(239) = 0000 [0000070E]
66600CC92:zeus16_w(23A) = 0000 [00000000]
66700CC92:zeus16_w(23B) = 0000 [00000000]
66800CC92:zeus16_w(23C) = 0050 [00000050]
66900CC92:zeus16_w(23D) = 0000 [00000050]
67000CC92:zeus16_w(23E) = 0000 [00000000]
67100CC92:zeus16_w(23F) = A000 [A0000000]
67200CC92:zeus16_w(240) = 005A [0000005A]
67300CC92:zeus16_w(241) = 01C0 [01C0005A]
67400CC92:zeus16_w(242) = 0000 [00000000]
67500CC92:zeus16_w(243) = B000 [B0000000]
67600CC92:zeus16_w(244) = 00D8 [000000D8]
67700CC92:zeus16_w(245) = 0000 [000000D8]
67800CC92:zeus16_w(246) = 0000 [00000000]
67900CC92:zeus16_w(247) = 8CC0 [8CC00000]
68000CC92:zeus16_w(248) = 0612 [00000612]
68100CC92:zeus16_w(249) = 0000 [00000612]
68200CC92:zeus16_w(24A) = 0000 [00000000]
68300CC92:zeus16_w(24B) = 0000 [00000000]
68400CC92:zeus16_w(24C) = D000 [0000D000]
68500CC92:zeus16_w(24D) = 0008 [0008D000]
68600CC92:zeus16_w(24E) = 8000 [00008000]
68700CC92:zeus16_w(24F) = 003E [003E8000]
68800CC92:zeus16_w(250) = 006A [0000006A]
68900CC92:zeus16_w(251) = 01D0 [01D0006A]
69000CC92:zeus16_w(252) = 0025 [00000025]
69100CC92:zeus16_w(253) = B000 [B0000025]
69200CC92:zeus16_w(254) = 0F00 [00000F00]
69300CC92:zeus16_w(255) = 0000 [00000F00]
69400CC92:zeus16_w(256) = 0001 [00000001]
69500CC92:zeus16_w(257) = 0000 [00000001]
69600CC92:zeus16_w(258) = 0E13 [00000E13]
69700CC92:zeus16_w(259) = 0000 [00000E13]
69800CC92:zeus16_w(25A) = 0000 [00000000]
69900CC92:zeus16_w(25B) = 0000 [00000000]
70000CC92:zeus16_w(25C) = 0F00 [00000F00]
70100CC92:zeus16_w(25D) = 05C0 [05C00F00]
70200CC92:zeus16_w(25E) = 0000 [00000000]
70300CC92:zeus16_w(25F) = B000 [B0000000]
70400CC92:zeus16_w(260) = 0F80 [00000F80]
70500CC92:zeus16_w(261) = 0400 [04000F80]
70600CC92:zeus16_w(262) = 0000 [00000000]
70700CC92:zeus16_w(263) = 9000 [90000000]
70800CC92:zeus16_w(264) = 0F80 [00000F80]
70900CC92:zeus16_w(265) = 0400 [04000F80]
71000CC92:zeus16_w(266) = 0000 [00000000]
71100CC92:zeus16_w(267) = 8CC0 [8CC00000]
71200CC92:zeus16_w(268) = 011A [0000011A]
71300CC92:zeus16_w(269) = 0000 [0000011A]
71400CC92:zeus16_w(26A) = 0000 [00000000]
71500CC92:zeus16_w(26B) = 0000 [00000000]
71600CC92:zeus16_w(26C) = 0F00 [00000F00]
71700CC92:zeus16_w(26D) = 0000 [00000F00]
71800CC92:zeus16_w(26E) = 0000 [00000000]
71900CC92:zeus16_w(26F) = 0000 [00000000]
72000CC92:zeus16_w(270) = A001 [0000A001]
72100CC92:zeus16_w(271) = 0003 [0003A001]
72200CC92:zeus16_w(272) = 0025 [00000025]
72300CC92:zeus16_w(273) = 0000 [00000025]
72400CC92:zeus16_w(274) = 0000 [00000000]
72500CC92:zeus16_w(275) = 40F3 [40F30000]
72600CC92:zeus16_w(276) = 0000 [00000000]
72700CC92:zeus16_w(277) = 0000 [00000000]
72800CC92:zeus16_w(278) = 4000 [00004000]
72900CC92:zeus16_w(279) = 0803 [08034000]
73000CC92:zeus16_w(27A) = 2000 [00002000]
73100CC92:zeus16_w(27B) = 0013 [00132000]
73200CC92:zeus16_w(27C) = 8000 [00008000]
73300CC92:zeus16_w(27D) = 0003 [00038000]
73400CC92:zeus16_w(27E) = 1000 [00001000]
73500CC92:zeus16_w(27F) = 003E [003E1000]
73600CC92:zeus16_w(280) = 20F0 [000020F0]
73700CC92:zeus16_w(281) = 0001 [000120F0]
73800CC92:zeus16_w(282) = 0000 [00000000]
73900CC92:zeus16_w(283) = 93C0 [93C00000]
74000CC92:zeus16_w(284) = 60F2 [000060F2]
74100CC92:zeus16_w(285) = 0001 [000160F2]
74200CC92:zeus16_w(286) = 0000 [00000000]
74300CC92:zeus16_w(287) = 9380 [93800000]
74400CC92:zeus16_w(288) = FFF4 [0000FFF4]
74500CC92:zeus16_w(289) = 0001 [0001FFF4]
74600CC92:zeus16_w(28A) = 0000 [00000000]
74700CC92:zeus16_w(28B) = 90C0 [90C00000]
74800CC92:zeus16_w(28C) = 0000 [00000000]
74900CC92:zeus16_w(28D) = 0000 [00000000]
75000CC92:zeus16_w(28E) = 0000 [00000000]
75100CC92:zeus16_w(28F) = 0000 [00000000]
75200CC92:zeus16_w(290) = 0000 [00000000]
75300CC92:zeus16_w(291) = 0000 [00000000]
75400CC92:zeus16_w(292) = 0000 [00000000]
75500CC92:zeus16_w(293) = 0000 [00000000]
75600CC92:zeus16_w(294) = 0000 [00000000]
75700CC92:zeus16_w(295) = 0000 [00000000]
75800CC92:zeus16_w(296) = 0000 [00000000]
75900CC92:zeus16_w(297) = 0000 [00000000]
76000CC92:zeus16_w(298) = 0000 [00000000]
76100CC92:zeus16_w(299) = 0000 [00000000]
76200CC92:zeus16_w(29A) = 0000 [00000000]
76300CC92:zeus16_w(29B) = 0000 [00000000]
76400CC92:zeus16_w(29C) = 0000 [00000000]
76500CC92:zeus16_w(29D) = 0000 [00000000]
76600CC92:zeus16_w(29E) = 0000 [00000000]
76700CC92:zeus16_w(29F) = 0000 [00000000]
76800CC92:zeus16_w(2A0) = 0000 [00000000]
76900CC92:zeus16_w(2A1) = 0000 [00000000]
77000CC92:zeus16_w(2A2) = 0000 [00000000]
77100CC92:zeus16_w(2A3) = 0000 [00000000]
77200CC92:zeus16_w(2A4) = 0000 [00000000]
77300CC92:zeus16_w(2A5) = 0000 [00000000]
77400CC92:zeus16_w(2A6) = 0000 [00000000]
77500CC92:zeus16_w(2A7) = 0000 [00000000]
77600CC92:zeus16_w(2A8) = 0000 [00000000]
77700CC92:zeus16_w(2A9) = 0000 [00000000]
77800CC92:zeus16_w(2AA) = 0000 [00000000]
77900CC92:zeus16_w(2AB) = 0000 [00000000]
78000CC92:zeus16_w(2AC) = 0000 [00000000]
78100CC92:zeus16_w(2AD) = 0000 [00000000]
78200CC92:zeus16_w(2AE) = 0000 [00000000]
78300CC92:zeus16_w(2AF) = 0000 [00000000]
78400CC92:zeus16_w(2B0) = 0000 [00000000]
78500CC92:zeus16_w(2B1) = 0000 [00000000]
78600CC92:zeus16_w(2B2) = 0000 [00000000]
78700CC92:zeus16_w(2B3) = 0000 [00000000]
78800CC92:zeus16_w(2B4) = 7F00 [00007F00]
78900CC92:zeus16_w(2B5) = 0001 [00017F00]
79000CC92:zeus16_w(2B6) = 0000 [00000000]
79100CC92:zeus16_w(2B7) = 03C0 [03C00000]
79200CC92:zeus16_w(2B8) = C000 [0000C000]
79300CC92:zeus16_w(2B9) = 0003 [0003C000]
79400CC92:zeus16_w(2BA) = 0000 [00000000]
79500CC92:zeus16_w(2BB) = 0000 [00000000]
79600CC92:zeus16_w(2BC) = EF00 [0000EF00]
79700CC92:zeus16_w(2BD) = 0001 [0001EF00]
79800CC92:zeus16_w(2BE) = 0000 [00000000]
79900CC92:zeus16_w(2BF) = 03C0 [03C00000]
80000CC92:zeus16_w(2C0) = 0007 [00000007]
80100CC86:zeus16_w(68) = 0008 [00000008]
80200CC86:zeus16_w(80) = 0C01 [00000C01]
80300CC86:zeus16_w(80) = 0C1D [00000C1D]
80400CC86:zeus16_w(69) = 0003 [00030008]
80500CC86:zeus16_w(69) = 0000 [00000008]
80600CC86:zeus16_w(80) = 0C01 [00000C01]
80700CC86:zeus16_w(80) = FC1D [0000FC1D]
80800CC86:zeus16_w(81) = 0022 [0022FC1D]
809Zeus cmd 1A : 1A000000
81000CFDC:zeus32_w(86) = 00008020
81100CFE0:zeus32_w(8E) = 0207F440
81200CFE1:zeus32_w(100) = 00000000
81300CFE5:zeus32_w(86) = 00008000
81400CFE7:zeus32_w(8E) = 02060000
81500D0FC:zeus32_w(CE) = 00C97020
81600D09A:zeus32_w(80) = 0022FC3F
81700D104:zeus32_w(CE) = 00C87020
81800D034:zeus32_w(84) = 00000100
81900D0C9:zeus32_w(68) = 00000100
82000D0CA:zeus32_w(00) = 0000C3F0
82100D0CC:zeus32_w(5C) = 00000000
82200D0CE:zeus32_w(06) = FFFF0030
82300D0D0:zeus32_w(02) = 000C0000
82400D0D2:zeus32_w(04) = 00000E01
82500D0D4:zeus32_w(4C) = 00808080
82600D0D5:zeus32_w(4E) = 00808080
82700D0D6:zeus32_w(08) = 00000000
82800D0D7:zeus32_w(0C) = 00FF018F
82900D0DD:zeus32_w(0A) = 0000018F
83000D0E3:zeus32_w(0E) = 00FF0000
83100D0E5:zeus32_w(1E) = FFFFFFFF
83200D0E6:zeus32_w(1C) = FFFFFFFF
83300D0E7:zeus32_w(1A) = FFFFFFFF
83400D0E8:zeus32_w(18) = FFFFFFFF
83500D0EA:zeus32_w(46) = 00000000
83600D0EB:zeus32_w(44) = 00000000
83700D0EC:zeus32_w(42) = 00000000
83800D0ED:zeus32_w(40) = 00000000
83900D0EE:zeus32_w(26) = 00000000
84000D0EF:zeus32_w(24) = 00000000
84100D0F0:zeus32_w(22) = 00000000
84200D0F1:zeus32_w(20) = 00000000
84300D09A:zeus32_w(80) = 0022FCFF
84400D0F6:zeus32_w(60) = 00000001
84500D09A:zeus32_w(80) = 0022FC3F
84600D01E:zeus32_w(76) = F8800000
84700D020:zeus32_w(CC) = 00000000
84800D034:zeus32_w(84) = 00000080
84900D0FC:zeus32_w(CE) = 00C97020
85000D09A:zeus32_w(80) = 0022FC3F
85100D104:zeus32_w(CE) = 00C87020
852Zeus cmd 1A : 1A000000
853Zeus cmd 18 : 187E0000 0000FFFF
854Zeus cmd 18 : 187C0000 FFFFFFE0
855Zeus cmd 18 : 187A0000 00800000
856Zeus cmd 18 : 18780000 000000C7
857Zeus cmd 18 : 18760000 F8800000
858Zeus cmd 17 : 176F0032
859Zeus cmd 17 : 176E0031
860Zeus cmd 17 : 176D003B
861Zeus cmd 17 : 176C002B
862Zeus cmd 18 : 184E0000 00808080
863Zeus cmd 18 : 184C0000 00808080
864Zeus cmd 18 : 184A0000 00FF018E
865Zeus cmd 18 : 18480000 00FF018E
866Zeus cmd 17 : 176940C4
867Zeus cmd 17 : 17681370
868Zeus cmd 17 : 1707FFFF
869Zeus cmd 17 : 17060030
870Zeus cmd 17 : 17010000
871Zeus cmd 2D : 2D007FFF
872Zeus cmd 2E : 2E000800 00000000
873Zeus cmd 17 : 1757500A
874Zeus cmd 17 : 175600FF
875Zeus cmd 17 : 17524321
876Zeus cmd 17 : 1752BCDE
877Zeus cmd 01 : 0100C0B0 3F001059
87800D09A:zeus32_w(80) = 0222FC3F
879....
880Zeus cmd 1A : 1A000000
881Zeus cmd 1A : 1A000000
882....
883Zeus cmd 1A : 1A000000
884Zeus cmd 1A : 1A000000
885....
886Zeus cmd 01 : 0100C0B0 3F001059
88700D09A:zeus32_w(80) = 0222FC3F
888....
889Zeus cmd 1A : 1A000000
890Zeus cmd 1A : 1A000000
891....
89200D09A:zeus32_w(80) = FB22FC3F
89300D01E:zeus32_w(76) = F8800000
89400D020:zeus32_w(CC) = 00800000
89500D034:zeus32_w(84) = 00000000
89600D0C9:zeus32_w(68) = 00000100
89700D0CA:zeus32_w(00) = 00000000
89800D0CC:zeus32_w(5C) = 00000000
89900D0CE:zeus32_w(06) = FFFF0030
90000D0D0:zeus32_w(02) = 000C0000
90100D0D2:zeus32_w(04) = 00000E01
90200D0D4:zeus32_w(4C) = 00808080
90300D0D5:zeus32_w(4E) = 00808080
90400D0D6:zeus32_w(08) = 00000000
90500D0D7:zeus32_w(0C) = 00FF018F
90600D0DD:zeus32_w(0A) = 0000018F
90700D0E3:zeus32_w(0E) = 00FF0000
90800D0E5:zeus32_w(1E) = FFFFFFFF
90900D0E6:zeus32_w(1C) = FFFFFFFF
91000D0E7:zeus32_w(1A) = FFFFFFFF
91100D0E8:zeus32_w(18) = FFFFFFFF
91200D0EA:zeus32_w(46) = 00000000
91300D0EB:zeus32_w(44) = 00000000
91400D0EC:zeus32_w(42) = 00000000
91500D0ED:zeus32_w(40) = 00000000
91600D0EE:zeus32_w(26) = 00000000
91700D0EF:zeus32_w(24) = 00000000
91800D0F0:zeus32_w(22) = 00000000
91900D0F1:zeus32_w(20) = 00000000
92000D09A:zeus32_w(80) = FB22FCFF
92100D0F6:zeus32_w(60) = 00000001
92200D09A:zeus32_w(80) = FB22FC3F
923Zeus cmd 17 : 1757500A
924Zeus cmd 17 : 175600FF
92500D09A:zeus32_w(80) = 0222FC3F
926
927
928*/
929static void render_poly_4bit(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid)
930{
931   const poly_extra_data *extra = extradata;
932   float ooz = extent->param[0].start;
933   float uoz = extent->param[1].start;
934   float voz = extent->param[2].start;
935   float doozdx = extent->param[0].dpdx;
936   float duozdx = extent->param[1].dpdx;
937   float dvozdx = extent->param[2].dpdx;
938   const UINT64 *texbase = extra->texbase;
939   const UINT64 *palbase = extra->palbase;
940   UINT16 transcolor = extra->transcolor;
941   int texwidth = extra->texwidth;
942   int x;
943
944if (extra->alpha < 0x80)
945   return;
946
947   for (x = extent->startx; x < extent->stopx; x++)
948   {
949      float z = recip_approx(ooz);
950      int u = (int)(uoz * z) & ((texwidth * 2) - 1);
951      int v = (int)(voz * z) & 255;
952      UINT8 texel = get_texel_4bit(texbase, v, u, texwidth);
953      if (texel != transcolor)
954      {
955         UINT16 color = get_palette_entry(palbase, texel);
956         INT32 depth = z;
957         if (depth > 0x7fff) depth = 0x7fff;
958         if (depth >= 0)
959            waveram_plot_check_depth(scanline, x, color, depth);
960      }
961
962      ooz += doozdx;
963      uoz += duozdx;
964      voz += dvozdx;
965   }
966}
967
968
969static void render_poly_8bit(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid)
970{
971   const poly_extra_data *extra = extradata;
972   float ooz = extent->param[0].start;
973   float uoz = extent->param[1].start;
974   float voz = extent->param[2].start;
975   float doozdx = extent->param[0].dpdx;
976   float duozdx = extent->param[1].dpdx;
977   float dvozdx = extent->param[2].dpdx;
978   const UINT64 *texbase = extra->texbase;
979   const UINT64 *palbase = extra->palbase;
980   UINT16 transcolor = extra->transcolor;
981   int texwidth = extra->texwidth;
982   int x;
983
984if (extra->alpha < 0x80)
985   return;
986
987   for (x = extent->startx; x < extent->stopx; x++)
988   {
989      float z = recip_approx(ooz);
990      int u = (int)(uoz * z) & (texwidth - 1);
991      int v = (int)(voz * z) & 255;
992      UINT8 texel = get_texel_8bit(texbase, v, u, texwidth);
993      if (texel != transcolor)
994      {
995         UINT16 color = get_palette_entry(palbase, texel);
996         INT32 depth = z;
997         if (depth > 0x7fff) depth = 0x7fff;
998         if (depth >= 0)
999            waveram_plot_check_depth(scanline, x, color, depth);
1000      }
1001
1002      ooz += doozdx;
1003      uoz += duozdx;
1004      voz += dvozdx;
1005   }
1006}
1007
1008
1009static void render_poly_solid(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid)
1010{
1011   const poly_extra_data *extra = extradata;
1012   UINT16 color = extra->transcolor;
1013   int x;
1014
1015   for (x = extent->startx; x < extent->stopx; x++)
1016      waveram_plot_depth(scanline, x, color, 0x7fff);
1017}
1018
1019
1020static void zeus_draw_model(UINT32 addr_and_count, UINT32 texdata, int logcmd)
1021{
1022   UINT32 val1, val2;
1023   int texwshift;
1024   int testbit = 0;
1025
1026   val1 = ((texdata >> 10) & 0x3f0000) | (texdata & 0xffff);
1027   val2 = (texdata >> 16) & 0x3ff;
1028   texwshift = (val2 >> 6) & 7;
1029
1030   if (logcmd)
1031   {
1032      int texwshift = (val2 >> 6) & 7;
1033      logerror(" -- model @ %08X val2=%03X val1=%06X (w=%d bpp=%d adj=%03X%03X)\n",
1034         addr_and_count, val2, val1,
1035         512 >> texwshift,
1036         (val2 & 0x20) ? 8 : 4,
1037         ((val1 << (7 - texwshift)) >> 10) & 0xfff,
1038         ((val1 << (7 - texwshift)) >> 1) & 0x1ff
1039         );
1040   }
1041
1042   if (input_code_pressed(KEYCODE_Z)) testbit = 1;
1043   if (input_code_pressed(KEYCODE_X)) testbit = 2;
1044   if (input_code_pressed(KEYCODE_C)) testbit = 3;
1045   if (input_code_pressed(KEYCODE_V)) testbit = 4;
1046   if (input_code_pressed(KEYCODE_B)) testbit = 5;
1047   if (input_code_pressed(KEYCODE_N)) testbit = 6;
1048   if (input_code_pressed(KEYCODE_M)) testbit = 7;
1049
1050   if (testbit != 0)
1051      texwshift = testbit;
1052
1053   while (1)
1054   {
1055      const UINT64 *data = waveram_ptr_from_block_addr(0, addr_and_count);
1056      int count = (addr_and_count >> 24) + 1;
1057      UINT32 next_addr_and_count = 0;
1058      int datanum;
1059      int length;
1060
1061      for (datanum = 0; datanum < count; datanum += length)
1062      {
1063         UINT8 cmd = data[datanum] >> 24;
1064         int offs;
1065
1066         length = (cmd == 0x25 || cmd == 0x30) ? 7 : 1;
1067
1068         if (logcmd)
1069         {
1070            logerror("\t");
1071            for (offs = 0; offs < length; offs++)
1072               logerror("%08X %08X ", (UINT32)data[datanum + offs], (UINT32)(data[datanum + offs] >> 32));
1073            logerror("\n");
1074         }
1075
1076         if (cmd == 0x25 || cmd == 0x30 /* invasn */)
1077         {
1078            poly_draw_scanline callback;
1079            poly_extra_data *extra;
1080            poly_vertex clipvert[8];
1081            poly_vertex vert[4];
1082            int numverts;
1083            int i;
1084
1085            callback = (val2 & 0x20) ? render_poly_8bit : render_poly_4bit;
1086
1087            for (i = 0; i < 4; i++)
1088            {
1089               UINT32 ixy = data[datanum + 1 + i];
1090               UINT32 iuvz = data[datanum + 1 + i] >> 32;
1091               INT32 xo = (INT16)ixy;
1092               INT32 yo = (INT16)(ixy >> 16);
1093               INT32 zo = (INT16)iuvz;
1094               UINT8 u = iuvz >> 16;
1095               UINT8 v = iuvz >> 24;
1096
1097               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);
1098               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);
1099               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));
1100               vert[i].p[1] = u;
1101               vert[i].p[2] = v;
1102
1103               if (logcmd)
1104                  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]);
1105            }
1106
1107            numverts = poly_zclip_if_less(4, &vert[0], &clipvert[0], 3, 0.0f);
1108            if (numverts < 3)
1109               continue;
1110
1111            for (i = 0; i < numverts; i++)
1112            {
1113               float ooz = 1.0f / (0.005f + clipvert[i].p[0]);
1114
1115               clipvert[i].x *= ooz;
1116               clipvert[i].y *= ooz;
1117               clipvert[i].x += 200.0f;
1118               clipvert[i].y += 128.0f;
1119
1120               ooz *= 1.0f / 512.0f;
1121               clipvert[i].p[0] = ooz;
1122               clipvert[i].p[1] *= ooz;
1123               clipvert[i].p[2] *= ooz;
1124            }
1125
1126            extra = poly_get_extra_data(poly);
1127            extra->transcolor = 0x100;
1128            extra->texwidth = 512 >> texwshift;
1129            extra->texbase = waveram_ptr_from_texture_addr(0, val1, extra->texwidth);
1130            extra->palbase = zeus_palbase;
1131            extra->alpha = zeus_blend;
1132
1133            if (single_step)
1134            {
1135               single_step_extra = *extra;
1136               single_step_val1 = val1;
1137               single_step_val2 = val2;
1138               single_step_dx = single_step_dy = 0;
1139               single_step_advance = FALSE;
1140            }
1141
1142            poly_render_triangle_fan(poly, NULL, &Machine->screen[0].visarea, callback, 3, numverts, &clipvert[0]);
1143            poly_wait(poly, "Normal");
1144
1145            if (single_step)
1146               while (!single_step_advance) video_frame_update(TRUE);
1147         }
1148         else if ((UINT32)data[datanum] == 0x0c018000/* mk4 */ || (UINT32)data[datanum] == 0x0c008000/* invasn */)
1149            next_addr_and_count = data[datanum] >> 32;
1150      }
1151      if (datanum != count)
1152         logerror("Overran data\n");
1153
1154      if (next_addr_and_count == 0)
1155         break;
1156      else
1157         addr_and_count = next_addr_and_count;
1158   }
1159}
1160
1161
1162354READ32_HANDLER( zeus_r )
1163355{
1164356   int logit = (offset < 0xb0 || offset > 0xb7);
r1404r1405
1176368         result = zeusbase[0x08];
1177369         break;
1178370
371      case 0xf0:
372         result = video_screen_get_hpos(0);
373         logit = 0;
374         break;
375
1179376      case 0xf2:
1180         // polled frequently during gametime; expected to change often
1181         // as it is polled multiple times and a consistent value is looked for
1182377         result = video_screen_get_vpos(0);
1183378         logit = 0;
1184379         break;
r1404r1405
1229424}
1230425
1231426
427
428/*************************************
429 *
430 *  Core write handler
431 *
432 *************************************/
433
1232434WRITE32_HANDLER( zeus_w )
1233435{
1234436   int logit = zeus_enable_logging || ((offset < 0xb0 || offset > 0xb7) && (offset < 0xe0 || offset > 0xe1));
r1404r1405
1238440
1239441   /* 32-bit mode */
1240442   if (zeusbase[0x80] & 0x00020000)
1241      zeus_write_32bit(offset, data, logit);
443      zeus_register32_w(offset, data, logit);
1242444
1243445   /* 16-bit mode */
1244446   else
1245      zeus_write_16bit(offset, data, logit);
447      zeus_register16_w(offset, data, logit);
1246448}
1247449
1248450
1249451READ32_HANDLER( zeus2_r )
1250452{
453   logerror("%06X:zeus_r(%02X)\n", activecpu_get_pc(), offset * 2);
1251454   return zeus_r(offset * 2, 0);
1252455}
1253456
1254457
1255458WRITE32_HANDLER( zeus2_w )
1256459{
1257   zeus_w(offset * 2, data, mem_mask);
460   logerror("%06X:zeus_w(%02X) = %08X\n", activecpu_get_pc(), offset * 2, data);
1258461}
1259462
1260463
1261static void zeus_write_16bit(offs_t offset, UINT16 data, int logit)
464
465/*************************************
466 *
467 *  Handle writes to an internal
468 *  pointer register
469 *
470 *************************************/
471
472static void zeus_pointer_w(UINT32 which, UINT32 data, int logit)
1262473{
474   switch (which & 0xffffff)
475   {
476      case 0x008000:
477      case 0x018000:
478         if (logit)
479            logerror(" -- setptr(objdata)\n");
480         zeus_objdata = data;
481         break;
482
483      // case 0x00c040: -- set in model data in invasn
484      case 0x00c040:
485         if (logit)
486            logerror(" -- setptr(palbase)\n");
487         zeus_palbase = waveram_ptr_from_block_addr(0, data);
488         break;
489
490
491      // case 0x004040: -- set via FIFO command in mk4 (len=02)
492
493      // case 0x02c0f0: -- set in model data in mk4 (len=0f)
494      // case 0x03c0f0: -- set via FIFO command in mk4 (len=00)
495
496      // case 0x02c0e7: -- set via FIFO command in mk4 (len=08)
497
498      // case 0x04c09c: -- set via FIFO command in mk4 (len=08)
499
500      // case 0x05c0a5: -- set via FIFO command in mk4 (len=21)
501      // case 0x80c0a5: -- set via FIFO command in mk4 (len=3f)
502      // case 0x81c0a5: -- set via FIFO command in mk4 (len=35)
503      // case 0x82c0a5: -- set via FIFO command in mk4 (len=41)
504
505
506      // case 0x00c0f0: -- set via FIFO command in invasn (len=0f)
507
508      // case 0x00c0b0: -- set via FIFO command in invasn (len=3f) -- seems to be the same as c0a5
509      // case 0x05c0b0: -- set via FIFO command in invasn (len=21)
510
511      // case 0x00c09c: -- set via FIFO command in invasn (len=06)
512
513      // case 0x00c0a3: -- set via FIFO command in invasn (len=0a)
514
515
516      default:
517         if (logit)
518            logerror(" -- setptr(%06X)\n", which & 0xffffff);
519         break;
520   }
521
522   if (logit)
523      log_waveram(data);
524}
525
526
527
528/*************************************
529 *
530 *  Handle register writes
531 *
532 *************************************/
533
534static void zeus_register16_w(offs_t offset, UINT16 data, int logit)
535{
1263536   /* writes to register $CC need to force a partial update */
1264537   if ((offset & ~1) == 0xcc)
1265538      video_screen_update_partial(0, video_screen_get_vpos(0));
r1404r1405
1278551
1279552   /* handle the update */
1280553   if ((offset & 1) == 0)
1281      zeus_process_write(offset);
554      zeus_register_update(offset);
1282555}
1283556
1284557
1285static void zeus_write_32bit(offs_t offset, UINT32 data, int logit)
558static void zeus_register32_w(offs_t offset, UINT32 data, int logit)
1286559{
1287560   /* writes to register $CC need to force a partial update */
1288561   if ((offset & ~1) == 0xcc)
r1404r1405
1304577
1305578   /* handle the update */
1306579   if ((offset & 1) == 0)
1307      zeus_process_write(offset);
580      zeus_register_update(offset);
1308581}
1309582
1310583
1311/*
1312584
1313    New analysis:
585/*************************************
586 *
587 *  Update state after a register write
588 *
589 *************************************/
1314590
1315    Offset
1316    ------
1317
1318    $06  W  Low 16 bits = texture mode
1319
1320    $58  W  Usually written after $5A; after writing, waits for $F6 bit 4 to be cleared
1321
1322    $5A  W  Usually written first, followed by $58
1323
1324    $68  W  Written at startup:
1325            $00030000 = toggled on then off at startup
1326
1327    $76  W
1328
1329    $7C  W
1330
1331    $80  W  Master control
1332
1333            $40000000 = set along with $02000000 when enabling FIFO empty interrupt
1334            $02000000 = enable internal data FIFO empty interrupt
1335            $01000000 = cleared along with $02000000 when disabling FIFO empty interrupt
1336            $00020000 = 16-bit (0) or 32-bit (1) mode
1337            $00000080 = set just before writing direct command to $60
1338            $00000040 = set just before writing direct command to $60
1339            $00000008 = cleared just before writing to offsets $200-$3FF
1340
1341    $82  W
1342    $84  W
1343
1344            $00000080 = render page? (generally set when $CC is set to $000000 and clear when $CC is set to $800000)
1345
1346    $86  W
1347    $88  W
1348    $8A  W
1349    $8C  W
1350    $8E  W
1351
1352    $B0 R/W Data port for direct RAM access
1353    $B2 R/W Data port for direct RAM access
1354
1355    $B4  W  Address for direct RAM access
1356
1357            $07FF0100 = mask for Y coordinate
1358            $000000FF = mask for X coordinate
1359
1360    $B6  W  Direct RAM access control
1361
1362            $80000000 = enable writes to wave RAM 0
1363            $40000000 = enable writes to wave RAM 1
1364            $02000000 = perform access on write to B0(0) or B2(1) ?????
1365            $00800000 = enable writes from [$B2] to depth buffer
1366            $00400000 = enable writes from [$B0] to depth buffer
1367            $00200000 = enable writes from [$B2] to RAM buffer
1368            $00100000 = enable writes from [$B0] to RAM buffer
1369            $00020000 = auto increment the address
1370            $00010000 = perform a read when the address is written
1371            $00000001 = enable direct RAM access
1372
1373            Examples:
1374                $80A00000 when writing a single pixel (address written each time)
1375                $80A20001 when writing the right pixel of a pair (autoinc assumed)
1376                $80F60001 when writing the middle pairs of pixels (autoinc assumed)
1377                $80520001 when writing the left pixel of a pair (autoinc assumed)
1378                $82F00001 when testing wave RAM page 1 (address written each pair)
1379                $42F00001 when testing wave RAM page 0 (address written each pair)
1380                $82F60001 when uploading to wave RAM page 1 (autoinc assumed)
1381                $42F60001 when uploading to wave RAM page 0 (autoinc assumed)
1382
1383    $C0  W  Written at startup = $801F2500
1384    $C2  W  Written at startup = $0015E591
1385    $C4  W  Written at startup = $000C0042 (HSYNC start/HSYNC end?)
1386    $C6  W  Written at startup = $0211007F (HTOTAL/HBLANK end?)
1387    $C8  W  Written at startup = $010300FF (VSYNC start/VBLANK start?)
1388    $CA  W  Written at startup = $01160107 (VTOTAL/VSYNC end?)
1389    $CC  W  Written at startup = $00000000 (display start address? switches to $00800000)
1390    $CE  W  Written at startup = $00C87620
1391
1392    $E0  W  Internal data FIFO
1393
1394    $F2  R  Looped on until it returns a stable value; must change frequently; PRNG?
1395
1396    $F4  R  Status register
1397
1398            $00000800 = VBLANK? code waits for it to clear to 0 and then reset to 1
1399            $00000140 = tested together in tight loop until both are 0
1400            $00000008 = internal data FIFO full
1401            $00000004 = tested in tight loop along with $00000002 until at least one is set
1402            $00000002 = tested in tight loop after handling FIFO interrupt until set
1403
1404    $F6  R  Status register 2
1405
1406            $00000010 = tested in tight loop after writing 5A/59/58 until set to 0
1407
1408   $200- W  Unknown, but written in a loop with master control bit $00000008 cleared
1409   $3FF     Possible fast buffer clear? One set of writes stores $7F7F to all entries.
1410            A second set writes $E00,$25,$E01,$25,...,$E7F,$25. A third set writes
1411            $52,$A0000000,...
1412
1413Notes:
1414
1415    In 16-bit mode, writes to $E0 are done via $E1 first then $E0
1416
1417-------------------------------------------------------
1418
1419Old info:
1420
1421    offset B7 = control....
1422
1423        8000 = page 1 enable
1424        4000 = page 0 enable
1425
1426        0080 = 2nd pixel enable (maybe Z buff?)
1427        0040 = 1st pixel enable (maybe Z buff?)
1428        0020 = 2nd pixel enable
1429        0010 = 1st pixel enable
1430
1431
1432    writes 80a2 to write an odd pixel at startup
1433    writes 80f6 to write the middle pixels
1434    writes 8052 to write an odd pixel at the end
1435
1436    writes 8050 before writing an odd pixel
1437    writes 80a0 before writing an even pixel
1438
1439    writes 44f1 before reading from page 0 of wave ram
1440    writes 84f1 before reading from page 1 of wave ram
1441
1442    writes 42f0 before writing to page 0 of wave ram
1443    writes 82f0 before writing to page 1 of wave ram
1444
1445*/
1446
1447static void zeus_process_write(offs_t offset)
591static void zeus_register_update(offs_t offset)
1448592{
1449593   /* handle the writes; only trigger on low accesses */
1450594   switch (offset)
1451595   {
596      case 0x52:
597         zeusbase[0xb2] = zeusbase[0x52];
598         break;
599
1452600      case 0x60:
1453601         /* invasn writes here to execute a command (?) */
1454602         if (zeusbase[0x60] & 1)
r1404r1405
1489637               vert[3].x = (INT16)zeusbase[0x0e];
1490638               vert[3].y = (INT16)(zeusbase[0x0e] >> 16);
1491639
1492               extra->transcolor = zeusbase[0x00];
640               extra->solidcolor = zeusbase[0x00];
641               extra->zoffset = 0x7fff;
1493642
1494               poly_render_quad(poly, NULL, &Machine->screen[0].visarea, render_poly_solid, 0, &vert[0], &vert[1], &vert[2], &vert[3]);
643               poly_render_quad(poly, NULL, &zeus_cliprect, render_poly_solid_fixedz, 0, &vert[0], &vert[1], &vert[2], &vert[3]);
1495644               poly_wait(poly, "Normal");
1496
1497   single_step = input_code_pressed(KEYCODE_S);
1498   if (single_step)
1499      popmessage("Single Step");
1500645            }
1501646            else
1502647               logerror("Execute unknown command\n");
1503648         }
1504649         break;
1505650
651      case 0x70:
652         zeus_point[0] = zeusbase[0x70] << 16;
653         break;
654
655      case 0x72:
656         zeus_point[1] = zeusbase[0x72] << 16;
657         break;
658
659      case 0x74:
660         zeus_point[2] = zeusbase[0x74] << 16;
661         break;
662
663      case 0x80:
664         /* this bit enables the "FIFO empty" IRQ; since our virtual FIFO is always empty,
665                we simply assert immediately if this is enabled. invasn needs this for proper
666                operations */
667         if (zeusbase[0x80] & 0x02000000)
668            cpunum_set_input_line(0, 2, ASSERT_LINE);
669         else
670            cpunum_set_input_line(0, 2, CLEAR_LINE);
671         break;
672
673      case 0x84:
674         /* MK4: Written in tandem with 0xcc */
675         /* MK4: Writes either 0x80 (and 0x000000 to 0xcc) or 0x00 (and 0x800000 to 0xcc) */
676         zeus_renderbase = waveram_ptr_from_expanded_addr(1, zeusbase[0x84] << 16);
677         break;
678
1506679      case 0xb0:
1507680      case 0xb2:
1508681         if ((zeusbase[0xb6] >> 16) != 0)
r1404r1405
1534707         }
1535708         break;
1536709
1537      case 0x70:
1538         zeus_point[0] = zeusbase[0x70] << 16;
710      case 0xc0:
711      case 0xc2:
712      case 0xc4:
713      case 0xc6:
714      case 0xc8:
715      case 0xca:
716         video_screen_update_partial(0, video_screen_get_vpos(0));
717         {
718            int vtotal = zeusbase[0xca] >> 16;
719            int htotal = zeusbase[0xc6] >> 16;
720            rectangle visarea;
721
722            visarea.min_x = zeusbase[0xc6] & 0xffff;
723            visarea.max_x = htotal - 1;
724            visarea.min_y = 0;
725            visarea.max_y = zeusbase[0xc8] & 0xffff;
726            if (htotal > 0 && vtotal > 0 && visarea.min_x < visarea.max_x && visarea.max_y < vtotal)
727            {
728               video_screen_configure(0, htotal, vtotal, &visarea, HZ_TO_ATTOSECONDS((double)MIDZEUS_VIDEO_CLOCK / 8.0 / (htotal * vtotal)));
729               zeus_cliprect = visarea;
730               zeus_cliprect.max_x -= zeus_cliprect.min_x;
731               zeus_cliprect.min_x = 0;
732            }
733         }
1539734         break;
1540735
1541      case 0x72:
1542         zeus_point[1] = zeusbase[0x72] << 16;
736      case 0xcc:
737         video_screen_update_partial(0, video_screen_get_vpos(0));
738
739         log_fifo = input_code_pressed(KEYCODE_L);
740//          single_step = input_code_pressed(KEYCODE_S);
741         if (single_step)
742            popmessage("Single Step");
1543743         break;
1544744
1545      case 0x74:
1546         zeus_point[2] = zeusbase[0x74] << 16;
745      case 0xe0:
746         zeus_fifo[zeus_fifo_words++] = zeusbase[0xe0];
747         if (zeus_fifo_process(zeus_fifo, zeus_fifo_words))
748            zeus_fifo_words = 0;
1547749         break;
750   }
751}
1548752
1549      case 0x4e:
1550         zeus_blend = zeusbase[0x4e];
753
754
755/*************************************
756 *
757 *  Process the FIFO
758 *
759 *************************************/
760
761static int zeus_fifo_process(const UINT32 *data, int numwords)
762{
763   /* handle logging */
764   switch (data[0] >> 24)
765   {
766      /* 0x00/0x01: set pointer */
767      /* in model data, this is 0x0C */
768      case 0x00:
769      case 0x01:
770         if (numwords < 2 && data[0] != 0)
771            return FALSE;
772         if (log_fifo)
773            log_fifo_command(data, numwords, "");
774         zeus_pointer_w(data[0] & 0xffffff, data[1], log_fifo);
1551775         break;
1552776
1553      case 0x52:
1554         zeusbase[0xb2] = zeusbase[0x52];
777      /* 0x13: render model based on previously set information */
778      case 0x13:   /* invasn */
779         if (log_fifo)
780            log_fifo_command(data, numwords, "");
781         zeus_draw_model((zeusbase[0x06] << 16), log_fifo);
1555782         break;
1556783
1557      case 0xcc:
1558         video_screen_update_partial(0, video_screen_get_vpos(0));
784      /* 0x17: write 16-bit value to low registers */
785      case 0x17:
786         if (log_fifo)
787            log_fifo_command(data, numwords, " -- reg16");
788         zeus_register16_w((data[0] >> 16) & 0x7f, data[0], log_fifo);
1559789         break;
1560790
1561      case 0x84:
1562         /* MK4: Written in tandem with 0xcc */
1563         /* MK4: Writes either 0x80 (and 0x000000 to 0xcc) or 0x00 (and 0x800000 to 0xcc) */
1564         zeus_renderbase = waveram_ptr_from_expanded_addr(1, zeusbase[0x84] << 16);
791      /* 0x18: write 32-bit value to low registers */
792      /* in model data, this is 0x19 */
793      case 0x18:
794         if (numwords < 2)
795            return FALSE;
796         if (log_fifo)
797            log_fifo_command(data, numwords, " -- reg32");
798         zeus_register32_w((data[0] >> 16) & 0x7f, data[1], log_fifo);
1565799         break;
1566800
1567      case 0xe0:
1568         zeuscmd_buffer[zeuscmd_buffer_words++] = zeusbase[0xe0];
1569         if (zeuscmd_buffer_words == 1)
1570            zeuscmd_buffer_expected_words = zeuscmd_length(zeusbase[0xe0]);
1571         if (zeuscmd_buffer_words == zeuscmd_buffer_expected_words)
801      /* 0x1A: sync pipeline(?) */
802      case 0x1a:
803         if (log_fifo)
804            log_fifo_command(data, numwords, " -- sync\n");
805         break;
806
807      /* 0x1C: write matrix and translation vector */
808      case 0x1c:
809         if ((data[0] & 0xffff) != 0x7fff)
1572810         {
1573            zeuscmd_execute(zeuscmd_buffer_expected_words);
1574            zeuscmd_buffer_words = 0;
811            if (numwords < 8)
812               return FALSE;
813            if (log_fifo)
814            {
815               log_fifo_command(data, numwords, "");
816               logerror("\n\t\tmatrix ( %04X %04X %04X ) ( %04X %04X %04X ) ( %04X %04X %04X )\n\t\tvector %8.2f %8.2f %8.5f\n",
817                  data[2] & 0xffff,
818                  data[2] >> 16,
819                  data[0] & 0xffff,
820                  data[3] & 0xffff,
821                  data[3] >> 16,
822                  data[1] >> 16,
823                  data[4] & 0xffff,
824                  data[4] >> 16,
825                  data[1] & 0xffff,
826                  (float)(INT32)data[5] * (1.0f / 65536.0f),
827                  (float)(INT32)data[6] * (1.0f / 65536.0f),
828                  (float)(INT32)data[7] * (1.0f / (65536.0f * 512.0f)));
829            }
830
831            zeus_matrix[0][0] = data[2];
832            zeus_matrix[0][1] = data[2] >> 16;
833            zeus_matrix[0][2] = data[0];
834            zeus_matrix[1][0] = data[3];
835            zeus_matrix[1][1] = data[3] >> 16;
836            zeus_matrix[1][2] = data[1] >> 16;
837            zeus_matrix[2][0] = data[4];
838            zeus_matrix[2][1] = data[4] >> 16;
839            zeus_matrix[2][2] = data[1];
840
841            zeus_usematrix2 = FALSE;
842
843            zeus_point[0] = data[5];
844            zeus_point[1] = data[6];
845            zeus_point[2] = data[7];
1575846         }
847         else
848         {
849            if (numwords < 13)
850               return FALSE;
851            if (log_fifo)
852            {
853               log_fifo_command(data, numwords, "");
854               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",
855                  data[3] & 0xffff,
856                  data[3] >> 16,
857                  data[7] & 0xffff,
858                  data[5] & 0xffff,
859                  data[6] & 0xffff,
860                  data[2] >> 16,
861                  data[1] & 0xffff,
862                  data[1] >> 16,
863                  data[2] & 0xffff,
864                  data[4] & 0xffff,
865                  data[4] >> 16,
866                  data[5] >> 16,
867                  data[8] & 0xffff,
868                  data[8] >> 16,
869                  data[6] >> 16,
870                  data[9] & 0xffff,
871                  data[9] >> 16,
872                  data[7] >> 16,
873                  (float)(INT32)data[10] * (1.0f / 65536.0f),
874                  (float)(INT32)data[11] * (1.0f / 65536.0f),
875                  (float)(INT32)data[12] * (1.0f / (65536.0f * 512.0f)));
876            }
877
878            zeus_matrix[0][0] = data[3];
879            zeus_matrix[0][1] = data[3] >> 16;
880            zeus_matrix[0][2] = data[7];
881            zeus_matrix[1][0] = data[5];
882            zeus_matrix[1][1] = data[6];
883            zeus_matrix[1][2] = data[2] >> 16;
884            zeus_matrix[2][0] = data[1];
885            zeus_matrix[2][1] = data[1] >> 16;
886            zeus_matrix[2][2] = data[2];
887
888            zeus_matrix2[0][0] = data[4];
889            zeus_matrix2[0][1] = data[4] >> 16;
890            zeus_matrix2[0][2] = data[5] >> 16;
891            zeus_matrix2[1][0] = data[8];
892            zeus_matrix2[1][1] = data[8] >> 16;
893            zeus_matrix2[1][2] = data[6] >> 16;
894            zeus_matrix2[2][0] = data[9];
895            zeus_matrix2[2][1] = data[9] >> 16;
896            zeus_matrix2[2][2] = data[7] >> 16;
897            zeus_usematrix2 = TRUE;
898
899            zeus_point[0] = data[10];
900            zeus_point[1] = data[11];
901            zeus_point[2] = data[12];
902         }
1576903         break;
904
905      /* 0x23: some additional X,Y,Z coordinates */
906      /* 0x2e: save for invasn */
907      case 0x23:
908      case 0x2e:
909         if (numwords < 2)
910            return FALSE;
911         if (log_fifo)
912         {
913            log_fifo_command(data, numwords, "");
914            logerror(" -- additional xyz = %d,%d,%d\n", (INT16)data[0], (INT16)(data[1] >> 16), (INT16)data[1]);
915         }
916         break;
917
918      /* 0x25: display control? */
919      /* 0x30: same for invasn */
920      case 0x25:
921      case 0x30:
922         if (numwords < 4 || ((data[0] & 0x808000) && numwords < 10))
923            return FALSE;
924         if (log_fifo)
925            log_fifo_command(data, numwords, " -- unknown control + hack clear screen\n");
926         if ((data[0] & 0xffff7f) == 0)
927         {
928            /* not right -- just a hack */
929            int x, y;
930            for (y = zeus_cliprect.min_y; y <= zeus_cliprect.max_y; y++)
931               for (x = zeus_cliprect.min_x; x <= zeus_cliprect.max_x; x++)
932                  waveram_plot_depth(y, x, 0, 0x7fff);
933         }
934         break;
935
936      /* 0x2d: unknown - invasn */
937      /* 0x70: same for mk4 */
938      case 0x2d:
939      case 0x70:
940         if (log_fifo)
941            log_fifo_command(data, numwords, "\n");
942         break;
943
944      /* 0x67: render model with inline texture info */
945      case 0x67:
946         if (numwords < 3)
947            return FALSE;
948         if (log_fifo)
949            log_fifo_command(data, numwords, "");
950         zeus_objdata = data[1];
951         zeus_draw_model(data[2], log_fifo);
952         break;
953
954      default:
955         printf("Unknown command %08X\n", data[0]);
956         if (log_fifo)
957            log_fifo_command(data, numwords, "\n");
958         break;
1577959   }
960   return TRUE;
1578961}
1579962
1580963
1581static void log_waveram(UINT32 length_and_base)
964
965/*************************************
966 *
967 *  Draw a model in waveram
968 *
969 *************************************/
970
971static void zeus_draw_model(UINT32 texdata, int logit)
1582972{
1583   static struct
1584   {
1585      UINT32 lab;
1586      UINT64 checksum;
1587   } recent_entries[100];
973   UINT32 databuffer[32];
974   int databufcount = 0;
975   int model_done = FALSE;
1588976
1589   UINT32 numoctets = (length_and_base >> 24) + 1;
1590   const UINT64 *ptr = waveram_ptr_from_block_addr(0, length_and_base);
1591   UINT64 checksum = length_and_base;
1592   int foundit = FALSE;
1593   int i;
977   if (logit)
978      logerror(" -- model @ %08X\n", zeus_objdata);
1594979
1595   for (i = 0; i < numoctets; i++)
1596      checksum += ptr[i];
980   while (zeus_objdata != 0 && !model_done)
981   {
982      const UINT64 *data = waveram_ptr_from_block_addr(0, zeus_objdata);
983      int count = (zeus_objdata >> 24) + 1;
1597984
1598   for (i = 0; i < ARRAY_LENGTH(recent_entries); i++)
1599      if (recent_entries[i].lab == length_and_base && recent_entries[i].checksum == checksum)
985      /* reset the objdata address */
986      zeus_objdata = 0;
987
988      /* loop until we run out of data */
989      while (count--)
1600990      {
1601         foundit = TRUE;
1602         break;
1603      }
991         int countneeded;
992         UINT8 cmd;
1604993
1605   if (i == ARRAY_LENGTH(recent_entries))
1606      i--;
1607   if (i != 0)
1608   {
1609      memmove(&recent_entries[1], &recent_entries[0], i * sizeof(recent_entries[0]));
1610      recent_entries[0].lab = length_and_base;
1611      recent_entries[0].checksum = checksum;
1612   }
1613   if (foundit)
1614      return;
994         /* accumulate 2 words of data */
995         databuffer[databufcount++] = *data;
996         databuffer[databufcount++] = *data++ >> 32;
1615997
1616   for (i = 0; i < numoctets; i++)
1617      logerror("\t%02X: %08X %08X\n", i, (UINT32)ptr[i], (UINT32)(ptr[i] >> 32));
1618}
998         /* if this is enough, process the command */
999         cmd = databuffer[0] >> 24;
1000         countneeded = (cmd == 0x25 || cmd == 0x30) ? 14 : 2;
1001         if (databufcount == countneeded)
1002         {
1003            /* handle logging of the command */
1004            if (logit)
1005            {
1006               int offs;
1007               logerror("\t");
1008               for (offs = 0; offs < databufcount; offs++)
1009                  logerror("%08X ", databuffer[offs]);
1010               logerror("-- ");
1011            }
16191012
1013            /* handle the command */
1014            switch (cmd)
1015            {
1016               case 0x08:
1017                  if (logit)
1018                     logerror("end of model\n");
1019                  model_done = TRUE;
1020                  break;
16201021
1621static void zeuscmd_execute(int words)
1622{
1623   static int colorcount;
1624   int logcmd = input_code_pressed(KEYCODE_L);
1625   int wordnum;
1022               case 0x0c:   /* mk4/invasn */
1023                  zeus_pointer_w(databuffer[0] & 0xffffff, databuffer[1], logit);
1024                  break;
16261025
1627/* command observations:
1026               case 0x17:   /* mk4 */
1027                  if (logit)
1028                     logerror("reg16");
1029                  zeus_register16_w((databuffer[0] >> 16) & 0x7f, databuffer[0], logit);
1030                  if (((databuffer[0] >> 16) & 0x7f) == 0x06)
1031                     texdata = (texdata & 0xffff) | (zeusbase[0x06] << 16);
1032                  break;
16281033
1629    0x18800000 | (reg << 16), <data>:
1034               case 0x19:   /* invasn */
1035                  if (logit)
1036                     logerror("reg32");
1037                  zeus_register32_w((databuffer[0] >> 16) & 0x7f, databuffer[1], logit);
1038                  if (((databuffer[0] >> 16) & 0x7f) == 0x06)
1039                     texdata = (texdata & 0xffff) | (zeusbase[0x06] << 16);
1040                  break;
16301041
1631        18F80000 00000C88 -- similar to write to $78 = 00000C78
1632        18FA0000 00808000 -- similar to write to $7A = 00800000
1633        18C80000 00FF018E -- similar to write to $48 = 00FF0190
1634        18CA0000 00FF18E0 -- similar to write to $4A = 00FF1900
1042               case 0x25:   /* mk4 */
1043               case 0x30:   /* invasn */
1044                  zeus_draw_quad(databuffer, texdata, logit);
1045                  break;
16351046
1636        -- during setup/text screen
1637        187E0000 0000FFFF FF980000
1638        18C80000 01FF01FF 00FF018E
1639        18CA0000 01FF1FF0 00FF18E0
1640        18CC0000 00808080
1641        18CE0000 00000080 00FFFFFF
1642        18D60000 500A00FF
1643        18EC0000 003B002F
1644        18EE0000 00320031
1645        18F80000 00000C88
1646        18FA0000 00808000
1047               default:
1048                  if (logit)
1049                     logerror("unknown\n");
1050                  break;
1051            }
16471052
1648        -- after text screen
1649        187E0000 0000FFFF FF980000
1650        18CE0000 0000007B(ramp down to 0) 00FFFFFF
1651        18D60000 500A00FF
1053            /* reset the count */
1054            databufcount = 0;
1055         }
1056      }
1057   }
1058}
16521059
1653    0x17:
16541060
1655        1707FFFF
1656        1752159D
1657        17680070 17681370
1658        176940C4
1659        1770xxxx - set x coordinate
1660        1772yyyy - set y coordinate
1661        1774zzzz - set z coordinate
16621061
1663    0x00:
1062/*************************************
1063 *
1064 *  Draw a quad
1065 *
1066 *************************************/
16641067
1665        0004C09C 08001026
1666        0002C0E7 0800101C
1667        0003C0F0 00001025
1668        0080C0A5 3F00102F
1669        0005C0A5 21001125
1670        0000C040 0318E132 - set palette base
1068static void zeus_draw_quad(const UINT32 *databuffer, UINT32 texdata, int logit)
1069{
1070   poly_draw_scanline callback;
1071   poly_extra_data *extra;
1072   poly_vertex clipvert[8];
1073   poly_vertex vert[4];
1074   float uscale, vscale;
1075   int val1, val2, texwshift;
1076   int numverts;
1077   int i;
16711078
1672    command 25:
1079/*
1080int testbit = 0;
16731081
1674        25000000 007F0018 01000400 B0F60008 -- during diagnostics screen
1675        25000080 007F0018 01000400 B0F60008 -- alternate frames during text screen
1082if (input_code_pressed(KEYCODE_Z)) testbit = 0x01;
1083if (input_code_pressed(KEYCODE_X)) testbit = 0x02;
1084if (input_code_pressed(KEYCODE_C)) testbit = 0x04;
1085if (input_code_pressed(KEYCODE_V)) testbit = 0x08;
1086if (input_code_pressed(KEYCODE_B)) testbit = 0x10;
1087if (input_code_pressed(KEYCODE_N)) testbit = 0x20;
1088if (input_code_pressed(KEYCODE_M)) testbit = 0x40;
1089if (input_code_pressed(KEYCODE_COMMA)) testbit = 0x80;
1090if (input_code_pressed(KEYCODE_STOP)) testbit = 0x100;
1091*/
1092   /* doesn't seem to matter if it is 0x21 or 0x23 */
1093//  if ((databuffer[1] >> 24) == 0x21 || (databuffer[1] >> 24) == 0x23)
1094      texdata = (texdata & 0xffff0000) | ((texdata + databuffer[1]) & 0xffff);
16761095
1677        25008000 0000F833 A8040E4C 0000F8C0 A8FC0BD9 0000F731 08FC0B7F 0000F6A4 08040DF2 21010000
1678        25800000 FE58FD0C 00000000 FE58FD10 00000000 FE74FD10 00000000 FE74FD0C 00000000 200C0000
1096   val1 = ((texdata >> 10) & 0x3f0000) | (texdata & 0xffff);
1097   val2 = (texdata >> 16) & 0x3ff;
1098   texwshift = (val2 >> 6) & 7;
16791099
1100   uscale = (8 >> ((zeusbase[0x04] >> 4) & 3)) * 0.125f * 256.0f;
1101   vscale = (8 >> ((zeusbase[0x04] >> 6) & 3)) * 0.125f * 256.0f;
16801102
1681    write to ($60) = 1 after setting up:
1103   if ((databuffer[1] & 0x000c0000) == 0x000c0000)
1104      callback = render_poly_solid;
1105   else if (val2 == 0x182)
1106      callback = render_poly_shade;
1107   else if (val2 & 0x20)
1108      callback = render_poly_8bit;
1109   else
1110      callback = render_poly_4bit;
16821111
1112   for (i = 0; i < 4; i++)
1113   {
1114      UINT32 ixy = databuffer[2 + i*2];
1115      UINT32 iuvz = databuffer[3 + i*2];
1116      INT64 x = (INT16)ixy << 14;
1117      INT64 y = (INT16)(ixy >> 16) << 14;
1118      INT64 z = (INT16)iuvz << 14;
1119      UINT8 u = iuvz >> 16;
1120      UINT8 v = iuvz >> 24;
1121      INT32 xo, yo, zo;
1122/*
1123        if (zeus_usematrix2)
1124        {
1125            xo = x >> 14;
1126            yo = y >> 14;
1127            zo = z >> 14;
1128            x = (INT64)(xo * zeus_matrix2[0][0]) + (INT64)(yo * zeus_matrix2[0][1]) + (INT64)(zo * zeus_matrix2[0][2]);
1129            y = (INT64)(xo * zeus_matrix2[1][0]) + (INT64)(yo * zeus_matrix2[1][1]) + (INT64)(zo * zeus_matrix2[1][2]);
1130            z = (INT64)(xo * zeus_matrix2[2][0]) + (INT64)(yo * zeus_matrix2[2][1]) + (INT64)(zo * zeus_matrix2[2][2]);
1131        }
1132        */
1133      xo = x >> 14;
1134      yo = y >> 14;
1135      zo = z >> 14;
1136      x = (INT64)(xo * zeus_matrix[0][0]) + (INT64)(yo * zeus_matrix[0][1]) + (INT64)(zo * zeus_matrix[0][2]);
1137      y = (INT64)(xo * zeus_matrix[1][0]) + (INT64)(yo * zeus_matrix[1][1]) + (INT64)(zo * zeus_matrix[1][2]);
1138      z = (INT64)(xo * zeus_matrix[2][0]) + (INT64)(yo * zeus_matrix[2][1]) + (INT64)(zo * zeus_matrix[2][2]);
16831139
1684*/
1140      x += zeus_point[0];
1141      y += zeus_point[1];
1142      z += zeus_point[2];
16851143
1686   if (logcmd)
1144      vert[i].x = x;
1145      vert[i].y = y;
1146      vert[i].p[0] = z;
1147      vert[i].p[1] = u * uscale;
1148      vert[i].p[2] = v * vscale;
1149
1150      if (logit)
1151      {
1152         if (i == 0) logerror("quad\n");
1153         logerror("\t\t(%f,%f,%f) (%02X,%02X) (%03X,%03X,%03X)\n",
1154               vert[i].x * (1.0f / 65536.0f), vert[i].y * (1.0f / 65536.0f), vert[i].p[0] * (1.0f / 65536.0f),
1155               (int)vert[i].p[1], (int)vert[i].p[2],
1156               (databuffer[10 + i] >> 20) & 0x3ff, (databuffer[10 + i] >> 10) & 0x3ff, (databuffer[10 + i] >> 0) & 0x3ff);
1157      }
1158   }
1159
1160   numverts = poly_zclip_if_less(4, &vert[0], &clipvert[0], 3, 512.0f);
1161   if (numverts < 3)
1162      return;
1163
1164   for (i = 0; i < numverts; i++)
16871165   {
1688      logerror("Zeus cmd %02X :", zeuscmd_buffer[0] >> 24);
1689      for (wordnum = 0; wordnum < words; wordnum++)
1690         logerror(" %08X", zeuscmd_buffer[wordnum]);
1166      float ooz = 512.0f / clipvert[i].p[0];
1167
1168      clipvert[i].x *= ooz;
1169      clipvert[i].y *= ooz;
1170      clipvert[i].x += 200.0f;
1171      clipvert[i].y += 128.0f;
16911172   }
16921173
1693   switch (zeuscmd_buffer[0] >> 24)
1174   extra = poly_get_extra_data(poly);
1175   extra->solidcolor = zeusbase[0x00] & 0x7fff;
1176   extra->zoffset = zeusbase[0x7e] >> 16;
1177   extra->alpha = zeusbase[0x4e];
1178   extra->transcolor = ((databuffer[1] >> 16) & 1) ? 0 : 0x100;
1179   extra->texwidth = 512 >> texwshift;
1180   extra->texbase = waveram_ptr_from_texture_addr(0, val1, extra->texwidth);
1181   extra->palbase = zeus_palbase;
1182
1183   if (single_step)
16941184   {
1695      /* 0x00/0x01: set pointer */
1696      /* in model data, this is 0x0C */
1697      case 0x00:
1698      case 0x01:
1699         switch (zeuscmd_buffer[0] & 0xffffff)
1700         {
1701            case 0x008000:
1702            /* in model data, case 0x018000 is a goto */
1703               if (logcmd)
1704                  logerror(" -- setptr(objdata)\n");
1705               zeus_objdata = zeuscmd_buffer[1];
1706               break;
1185      single_step_extra = *extra;
1186      single_step_val1 = val1;
1187      single_step_val2 = val2;
1188      single_step_dx = single_step_dy = 0;
1189      single_step_advance = FALSE;
1190   }
17071191
1708            case 0x00c0b0:
1709               if (logcmd)
1710                  logerror(" -- setptr(texdata)\n");
1711               zeus_texdata = zeuscmd_buffer[1];
1712               break;
1192   poly_render_quad_fan(poly, NULL, &zeus_cliprect, callback, 3, numverts, &clipvert[0]);
1193   poly_wait(poly, "Normal");
17131194
1714            case 0x00c040:
1715               if (logcmd)
1716                  logerror(" -- setptr(palbase)\n");
1717               zeus_palbase = waveram_ptr_from_block_addr(0, zeuscmd_buffer[1]);
1718               break;
1195   if (single_step)
1196      while (!single_step_advance) video_frame_update(TRUE);
1197}
17191198
1720            case 0x80c0a5:
1721               if (logcmd)
1722                  logerror(" -- setptr(hack clear screen)\n");
1723               {
1724                  /* not right -- just a hack */
1725                  int x, y;
1726                  for (y = 0; y <= 255; y++)
1727                     for (x = 0; x <= 399; x++)
1728                        waveram_plot_depth(y, x, 0, 0x7fff);
1729                  colorcount = 0;
1730               }
1731               break;
17321199
1733            default:
1734               if (logcmd)
1735                  logerror(" -- setptr(%06X)\n", zeuscmd_buffer[0] & 0xffffff);
1736               break;
1737         }
17381200
1739         if (logcmd)
1740            log_waveram(zeuscmd_buffer[1]);
1741         break;
1201/*************************************
1202 *
1203 *  Rasterizers
1204 *
1205 *************************************/
17421206
1743      /* 0x13: render model based on previously set information */
1744      case 0x13:   /* invasn */
1745         zeus_draw_model(zeus_objdata, zeus_texdata, logcmd);
1746         break;
1207static void render_poly_4bit(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid)
1208{
1209   const poly_extra_data *extra = extradata;
1210   INT32 curz = extent->param[0].start;
1211   INT32 curu = extent->param[1].start;
1212   INT32 curv = extent->param[2].start;
1213   INT32 dzdx = extent->param[0].dpdx;
1214   INT32 dudx = extent->param[1].dpdx;
1215   INT32 dvdx = extent->param[2].dpdx;
1216   const UINT64 *texbase = extra->texbase;
1217   const UINT64 *palbase = extra->palbase;
1218   UINT16 transcolor = extra->transcolor;
1219   int texwidth = extra->texwidth;
1220   int x;
17471221
1748      /* 0x17: write 16-bit value to low registers */
1749      case 0x17:
1750         if (logcmd)
1751            logerror(" -- reg16");
1752         zeus_write_16bit((zeuscmd_buffer[0] >> 16) & 0x7f, zeuscmd_buffer[0], logcmd);
1753         break;
1222   for (x = extent->startx; x < extent->stopx; x++)
1223   {
1224      UINT16 *depthptr;
1225      UINT16 *ptr = waveram_pixel_ptr(zeus_renderbase, scanline, x, &depthptr);
1226      INT32 depth = (curz >> 16) + extra->zoffset;
1227      if (depth > 0x7fff) depth = 0x7fff;
1228      if (depth >= 0 && depth <= *depthptr)
1229      {
1230         int u0 = (curu >> 8);// & (texwidth - 1);
1231         int v0 = (curv >> 8);// & 255;
1232         int u1 = (u0 + 1);
1233         int v1 = (v0 + 1);
1234         UINT8 texel0 = get_texel_4bit(texbase, v0, u0, texwidth);
1235         UINT8 texel1 = get_texel_4bit(texbase, v0, u1, texwidth);
1236         UINT8 texel2 = get_texel_4bit(texbase, v1, u0, texwidth);
1237         UINT8 texel3 = get_texel_4bit(texbase, v1, u1, texwidth);
1238         if (texel0 != transcolor)
1239         {
1240            rgb_t color0 = get_palette_entry(palbase, texel0);
1241            rgb_t color1 = get_palette_entry(palbase, texel1);
1242            rgb_t color2 = get_palette_entry(palbase, texel2);
1243            rgb_t color3 = get_palette_entry(palbase, texel3);
1244            rgb_t filtered;
1245            color0 = ((color0 & 0x7fe0) << 6) | (color0 & 0x1f);
1246            color1 = ((color1 & 0x7fe0) << 6) | (color1 & 0x1f);
1247            color2 = ((color2 & 0x7fe0) << 6) | (color2 & 0x1f);
1248            color3 = ((color3 & 0x7fe0) << 6) | (color3 & 0x1f);
1249            filtered = rgb_bilinear_filter(color0, color1, color2, color3, curu, curv);
1250            *ptr = ((filtered >> 6) & 0x7fe0) | (filtered & 0x1f);
1251            *depthptr = depth;
1252         }
1253      }
17541254
1755      /* 0x18: write 32-bit value to low registers */
1756      /* in model data, this is 0x19 */
1757      case 0x18:
1758         if (logcmd)
1759            logerror(" -- reg32");
1760         zeus_write_32bit((zeuscmd_buffer[0] >> 16) & 0x7f, zeuscmd_buffer[1], logcmd);
1761         break;
1255      curz += dzdx;
1256      curu += dudx;
1257      curv += dvdx;
1258   }
1259}
17621260
1763      /* 0x1A: sync pipeline(?) */
1764      case 0x1a:
1765         if (logcmd)
1766            logerror(" -- sync\n");
1767         break;
17681261
1769      /* 0x1C: write matrix and translation vector */
1770      case 0x1c:
1771         if (logcmd)
1772            logerror(" -- matrix ( %04X %04X %04X ) ( %04X %04X %04X ) ( %04X %04X %04X ) vector %8.2f %8.2f %8.5f\n",
1773               zeuscmd_buffer[2] & 0xffff,
1774               zeuscmd_buffer[2] >> 16,
1775               zeuscmd_buffer[0] & 0xffff,
1776               zeuscmd_buffer[3] & 0xffff,
1777               zeuscmd_buffer[3] >> 16,
1778               zeuscmd_buffer[1] >> 16,
1779               zeuscmd_buffer[4] & 0xffff,
1780               zeuscmd_buffer[4] >> 16,
1781               zeuscmd_buffer[1] & 0xffff,
1782               (float)(INT32)zeuscmd_buffer[5] * (1.0f / 65536.0f),
1783               (float)(INT32)zeuscmd_buffer[6] * (1.0f / 65536.0f),
1784               (float)(INT32)zeuscmd_buffer[7] * (1.0f / (65536.0f * 512.0f)));
1262static void render_poly_8bit(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid)
1263{
1264   const poly_extra_data *extra = extradata;
1265   INT32 curz = extent->param[0].start;
1266   INT32 curu = extent->param[1].start;
1267   INT32 curv = extent->param[2].start;
1268   INT32 dzdx = extent->param[0].dpdx;
1269   INT32 dudx = extent->param[1].dpdx;
1270   INT32 dvdx = extent->param[2].dpdx;
1271   const UINT64 *texbase = extra->texbase;
1272   const UINT64 *palbase = extra->palbase;
1273   UINT16 transcolor = extra->transcolor;
1274   int texwidth = extra->texwidth;
1275   int x;
17851276
1786         zeus_matrix[0][0] = zeuscmd_buffer[2];
1787         zeus_matrix[0][1] = zeuscmd_buffer[2] >> 16;
1788         zeus_matrix[0][2] = zeuscmd_buffer[0];
1789         zeus_matrix[1][0] = zeuscmd_buffer[3];
1790         zeus_matrix[1][1] = zeuscmd_buffer[3] >> 16;
1791         zeus_matrix[1][2] = zeuscmd_buffer[1] >> 16;
1792         zeus_matrix[2][0] = zeuscmd_buffer[4];
1793         zeus_matrix[2][1] = zeuscmd_buffer[4] >> 16;
1794         zeus_matrix[2][2] = zeuscmd_buffer[1];
1795         zeus_point[0] = zeuscmd_buffer[5];
1796         zeus_point[1] = zeuscmd_buffer[6];
1797         zeus_point[2] = zeuscmd_buffer[7];
1798         break;
1277   for (x = extent->startx; x < extent->stopx; x++)
1278   {
1279      UINT16 *depthptr;
1280      UINT16 *ptr = waveram_pixel_ptr(zeus_renderbase, scanline, x, &depthptr);
1281      INT32 depth = (curz >> 16) + extra->zoffset;
1282      if (depth > 0x7fff) depth = 0x7fff;
1283      if (depth >= 0 && depth <= *depthptr)
1284      {
1285         int u0 = (curu >> 8);// & (texwidth - 1);
1286         int v0 = (curv >> 8);// & 255;
1287         int u1 = (u0 + 1);
1288         int v1 = (v0 + 1);
1289         UINT8 texel0 = get_texel_8bit(texbase, v0, u0, texwidth);
1290         UINT8 texel1 = get_texel_8bit(texbase, v0, u1, texwidth);
1291         UINT8 texel2 = get_texel_8bit(texbase, v1, u0, texwidth);
1292         UINT8 texel3 = get_texel_8bit(texbase, v1, u1, texwidth);
1293         if (texel0 != transcolor)
1294         {
1295            rgb_t color0 = get_palette_entry(palbase, texel0);
1296            rgb_t color1 = get_palette_entry(palbase, texel1);
1297            rgb_t color2 = get_palette_entry(palbase, texel2);
1298            rgb_t color3 = get_palette_entry(palbase, texel3);
1299            rgb_t filtered;
1300            color0 = ((color0 & 0x7fe0) << 6) | (color0 & 0x1f);
1301            color1 = ((color1 & 0x7fe0) << 6) | (color1 & 0x1f);
1302            color2 = ((color2 & 0x7fe0) << 6) | (color2 & 0x1f);
1303            color3 = ((color3 & 0x7fe0) << 6) | (color3 & 0x1f);
1304            filtered = rgb_bilinear_filter(color0, color1, color2, color3, curu, curv);
1305            *ptr = ((filtered >> 6) & 0x7fe0) | (filtered & 0x1f);
1306            *depthptr = depth;
1307         }
1308      }
17991309
1800      /* 0x23: some additional X,Y,Z coordinates */
1801      case 0x23:
1802         if (logcmd)
1803            logerror(" -- additional xyz = %d,%d,%d\n", (INT16)zeuscmd_buffer[0], (INT16)(zeuscmd_buffer[1] >> 16), (INT16)zeuscmd_buffer[1]);
1804         break;
1310      curz += dzdx;
1311      curu += dudx;
1312      curv += dvdx;
1313   }
1314}
18051315
1806      /* 0x25: display control? */
1807      /* 0x30: same for invasn */
1808      case 0x25:
1809      case 0x30:
1810         if (logcmd)
1811            logerror(" -- unknown control\n");
1812         break;
18131316
1814      /* 0x67: render model with inline texture info */
1815      case 0x67:
1816         zeus_draw_model(zeuscmd_buffer[1], zeuscmd_buffer[2], logcmd);
1817         break;
1317static void render_poly_shade(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid)
1318{
1319   const poly_extra_data *extra = extradata;
1320   int x;
18181321
1819      default:
1820         if (logcmd)
1821            logerror("\n");
1822         break;
1322   for (x = extent->startx; x < extent->stopx; x++)
1323   {
1324      if (x >= 0 && x < 400)
1325      {
1326         if (extra->alpha <= 0x80)
1327         {
1328            UINT16 *ptr = waveram_pixel_ptr(zeus_renderbase, scanline, x, NULL);
1329            UINT16 pix = *ptr;
1330
1331            *ptr = ((((pix & 0x7c00) * extra->alpha) >> 7) & 0x7c00) |
1332                 ((((pix & 0x03e0) * extra->alpha) >> 7) & 0x03e0) |
1333                 ((((pix & 0x001f) * extra->alpha) >> 7) & 0x001f);
1334         }
1335         else
1336         {
1337            waveram_plot(scanline, x, 0);
1338         }
1339      }
18231340   }
18241341}
18251342
18261343
1827static UINT8 zeuscmd_length(UINT32 word)
1344static void render_poly_solid(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid)
18281345{
1829   switch (word >> 24)
1346   const poly_extra_data *extra = extradata;
1347   UINT16 color = extra->solidcolor;
1348   INT32 curz = (INT32)(extent->param[0].start);
1349   INT32 dzdx = (INT32)(extent->param[0].dpdx);
1350   int x;
1351
1352   for (x = extent->startx; x < extent->stopx; x++)
18301353   {
1831      case 0x00:
1832      case 0x01:
1833         return (word == 0) ? 1 : 2;
1354      INT32 depth = (curz >> 16) + extra->zoffset;
1355      if (depth > 0x7fff) depth = 0x7fff;
1356      if (depth >= 0)
1357         waveram_plot_check_depth(scanline, x, color, depth);
1358      curz += dzdx;
1359   }
1360}
18341361
1835      case 0x13:
1836      case 0x17:
1837      case 0x1a:
1838      case 0x2d:      /* invasn */
1839      case 0x70:
1840         return 1;
18411362
1842      case 0x18:
1843      case 0x23:
1844      case 0x2e:      /* invasn */
1845         return 2;
1363static void render_poly_solid_fixedz(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid)
1364{
1365   const poly_extra_data *extra = extradata;
1366   UINT16 color = extra->solidcolor;
1367   UINT16 depth = extra->zoffset;
1368   int x;
18461369
1847      case 0x67:
1848         return 3;
1370   for (x = extent->startx; x < extent->stopx; x++)
1371      waveram_plot_depth(scanline, x, color, depth);
1372}
18491373
1850      case 0x25:
1851      case 0x30:      /* invasn */
1852         if (word & 0x808000)
1853            return 10;
1854         return 4;   /* ??? */
18551374
1856      case 0x1c:
1857         if ((word & 0xffffff) == 0x7fff)   /* invasn */
1858            return 8+5;
1859         return 8;
18601375
1861      default:
1862         printf("Unknown command %02X\n", zeusbase[0xe0] >> 24);
1863         break;
1864   }
1865   return 1;
1376/*************************************
1377 *
1378 *  Debugging tools
1379 *
1380 *************************************/
1381
1382static void log_fifo_command(const UINT32 *data, int numwords, const char *suffix)
1383{
1384   int wordnum;
1385
1386   logerror("Zeus cmd %02X :", data[0] >> 24);
1387   for (wordnum = 0; wordnum < numwords; wordnum++)
1388      logerror(" %08X", data[wordnum]);
1389   logerror("%s", suffix);
18661390}
18671391
18681392
1393static void log_waveram(UINT32 length_and_base)
1394{
1395   static struct
1396   {
1397      UINT32 lab;
1398      UINT64 checksum;
1399   } recent_entries[100];
1400
1401   UINT32 numoctets = (length_and_base >> 24) + 1;
1402   const UINT64 *ptr = waveram_ptr_from_block_addr(0, length_and_base);
1403   UINT64 checksum = length_and_base;
1404   int foundit = FALSE;
1405   int i;
1406
1407   for (i = 0; i < numoctets; i++)
1408      checksum += ptr[i];
1409
1410   for (i = 0; i < ARRAY_LENGTH(recent_entries); i++)
1411      if (recent_entries[i].lab == length_and_base && recent_entries[i].checksum == checksum)
1412      {
1413         foundit = TRUE;
1414         break;
1415      }
1416
1417   if (i == ARRAY_LENGTH(recent_entries))
1418      i--;
1419   if (i != 0)
1420   {
1421      memmove(&recent_entries[1], &recent_entries[0], i * sizeof(recent_entries[0]));
1422      recent_entries[0].lab = length_and_base;
1423      recent_entries[0].checksum = checksum;
1424   }
1425   if (foundit)
1426      return;
1427
1428   for (i = 0; i < numoctets; i++)
1429      logerror("\t%02X: %08X %08X\n", i, (UINT32)ptr[i], (UINT32)(ptr[i] >> 32));
1430}
src/mame/video/namcona1.c
r1404r1405
219219{
220220   int i;
221221   gfx_element *gfx0,*gfx1;
222   static tile_get_info_callback get_info[4] =
222   static const tile_get_info_callback get_info[4] =
223223   { tilemap_get_info0, tilemap_get_info1, tilemap_get_info2, tilemap_get_info3 };
224224
225225   for( i=0; i<NAMCONA1_NUM_TILEMAPS; i++ )
src/mame/video/psx.c
r1404r1405
232232static UINT16 m_p_n_redsubtrans[ MAX_LEVEL * MAX_LEVEL ];
233233static UINT16 m_p_n_greensubtrans[ MAX_LEVEL * MAX_LEVEL ];
234234static UINT16 m_p_n_bluesubtrans[ MAX_LEVEL * MAX_LEVEL ];
235static UINT16 m_p_n_nextpointlist4[] = { 1, 3, 0, 2 };
236static UINT16 m_p_n_prevpointlist4[] = { 2, 0, 3, 1 };
237static UINT16 m_p_n_nextpointlist3[] = { 1, 2, 0 };
238static UINT16 m_p_n_prevpointlist3[] = { 2, 0, 1 };
235static const UINT16 m_p_n_nextpointlist4[] = { 1, 3, 0, 2 };
236static const UINT16 m_p_n_prevpointlist4[] = { 2, 0, 3, 1 };
237static const UINT16 m_p_n_nextpointlist3[] = { 1, 2, 0 };
238static const UINT16 m_p_n_prevpointlist3[] = { 2, 0, 1 };
239239
240240static UINT16 m_p_n_g0r0[ 0x10000 ];
241241static UINT16 m_p_n_b0[ 0x10000 ];
r1404r1405
14861486   UINT16 n_point;
14871487   UINT16 n_rightpoint;
14881488   UINT16 n_leftpoint;
1489   UINT16 *p_n_rightpointlist;
1490   UINT16 *p_n_leftpointlist;
1489   const UINT16 *p_n_rightpointlist;
1490   const UINT16 *p_n_leftpointlist;
14911491
14921492   UINT16 *p_vram;
14931493
r1404r1405
16581658   UINT16 n_point;
16591659   UINT16 n_rightpoint;
16601660   UINT16 n_leftpoint;
1661   UINT16 *p_n_rightpointlist;
1662   UINT16 *p_n_leftpointlist;
1661   const UINT16 *p_n_rightpointlist;
1662   const UINT16 *p_n_leftpointlist;
16631663   UINT16 *p_clut;
16641664   UINT16 *p_vram;
16651665   UINT32 n_bgr;
r1404r1405
18781878   UINT16 n_point;
18791879   UINT16 n_rightpoint;
18801880   UINT16 n_leftpoint;
1881   UINT16 *p_n_rightpointlist;
1882   UINT16 *p_n_leftpointlist;
1881   const UINT16 *p_n_rightpointlist;
1882   const UINT16 *p_n_leftpointlist;
18831883
18841884   UINT16 *p_vram;
18851885
r1404r1405
21082108   UINT16 n_point;
21092109   UINT16 n_rightpoint;
21102110   UINT16 n_leftpoint;
2111   UINT16 *p_n_rightpointlist;
2112   UINT16 *p_n_leftpointlist;
2111   const UINT16 *p_n_rightpointlist;
2112   const UINT16 *p_n_leftpointlist;
21132113   UINT16 *p_clut;
21142114   UINT16 *p_vram;
21152115   UINT32 n_bgr;
src/mame/video/wc90.c
r1404r1405
144144               drawgfx( bitmap, machine->gfx[3], code, flags >> 4, \
145145               bank&1, bank&2, sx, sy, cliprect, TRANSPARENCY_PEN, 0 )
146146
147static char pos32x32[] = { 0, 1, 2, 3 };
148static char pos32x32x[] = { 1, 0, 3, 2 };
149static char pos32x32y[] = { 2, 3, 0, 1 };
150static char pos32x32xy[] = { 3, 2, 1, 0 };
151
152static char pos32x64[] = { 0, 1, 2, 3, 4, 5, 6, 7 };
153static char pos32x64x[] = { 5, 4, 7, 6, 1, 0, 3, 2 };
154static char pos32x64y[] = { 2, 3, 0, 1,   6, 7, 4, 5 };
155static char pos32x64xy[] = { 7, 6, 5, 4, 3, 2, 1, 0 };
156
157static char pos64x32[] = { 0, 1, 2, 3, 4, 5, 6, 7 };
158static char pos64x32x[] = { 1, 0, 3, 2, 5, 4, 7, 6 };
159static char pos64x32y[] = { 6, 7, 4, 5, 2, 3, 0, 1 };
160static char pos64x32xy[] = { 7, 6, 5, 4, 3, 2, 1, 0 };
161
162static char pos64x64[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
163static char pos64x64x[] = { 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10 };
164static char pos64x64y[] = { 10, 11, 8, 9, 14, 15, 12, 13, 2, 3, 0, 1, 6, 7,   4, 5 };
165static char pos64x64xy[] = { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
166
167static char* p32x32[4] = {
168   pos32x32,
169   pos32x32x,
170   pos32x32y,
171   pos32x32xy
147static const char p32x32[4][4] = {
148   { 0, 1, 2, 3 },
149   { 1, 0, 3, 2 },
150   { 2, 3, 0, 1 },
151   { 3, 2, 1, 0 }
172152};
173153
174static char* p32x64[4] = {
175   pos32x64,
176   pos32x64x,
177   pos32x64y,
178   pos32x64xy
154static const char p32x64[4][8] = {
155   { 0, 1, 2, 3, 4, 5, 6, 7 },
156   { 5, 4, 7, 6, 1, 0, 3, 2 },
157   { 2, 3, 0, 1, 6, 7, 4, 5 },
158   { 7, 6, 5, 4, 3, 2, 1, 0 }
179159};
180160
181static char* p64x32[4] = {
182   pos64x32,
183   pos64x32x,
184   pos64x32y,
185   pos64x32xy
161static const char p64x32[4][8] = {
162   { 0, 1, 2, 3, 4, 5, 6, 7 },
163   { 1, 0, 3, 2, 5, 4, 7, 6 },
164   { 6, 7, 4, 5, 2, 3, 0, 1 },
165   { 7, 6, 5, 4, 3, 2, 1, 0 }
186166};
187167
188static char* p64x64[4] = {
189   pos64x64,
190   pos64x64x,
191   pos64x64y,
192   pos64x64xy
168static const char p64x64[4][16] = {
169   { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
170   { 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10 },
171   { 10, 11, 8, 9, 14, 15, 12, 13, 2, 3, 0, 1, 6, 7, 4, 5 },
172   { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }
193173};
194174
195175static void draw_sprite_16x16(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int code,
r1404r1405
237217static void draw_sprite_32x32(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int code,
238218                       int sx, int sy, int bank, int flags ) {
239219
240   char *p = p32x32[ bank&3 ];
220   const char *p = p32x32[ bank&3 ];
241221
242222   WC90_DRAW_SPRITE( code+p[0], sx, sy );
243223   WC90_DRAW_SPRITE( code+p[1], sx+16, sy );
r1404r1405
248228static void draw_sprite_32x64(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int code,
249229                       int sx, int sy, int bank, int flags ) {
250230
251   char *p = p32x64[ bank&3 ];
231   const char *p = p32x64[ bank&3 ];
252232
253233   WC90_DRAW_SPRITE( code+p[0], sx, sy );
254234   WC90_DRAW_SPRITE( code+p[1], sx+16, sy );
r1404r1405
278258static void draw_sprite_64x32(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int code,
279259                       int sx, int sy, int bank, int flags ) {
280260
281   char *p = p64x32[ bank&3 ];
261   const char *p = p64x32[ bank&3 ];
282262
283263   WC90_DRAW_SPRITE( code+p[0], sx, sy );
284264   WC90_DRAW_SPRITE( code+p[1], sx+16, sy );
r1404r1405
293273static void draw_sprite_64x64(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int code,
294274                       int sx, int sy, int bank, int flags ) {
295275
296   char *p = p64x64[ bank&3 ];
276   const char *p = p64x64[ bank&3 ];
297277
298278   WC90_DRAW_SPRITE( code+p[0], sx, sy );
299279   WC90_DRAW_SPRITE( code+p[1], sx+16, sy );
r1404r1405
321301
322302typedef void (*draw_sprites_procdef)(running_machine *, mame_bitmap *, const rectangle *, int, int, int, int, int );
323303
324static draw_sprites_procdef draw_sprites_proc[16] = {
304static const draw_sprites_procdef draw_sprites_proc[16] = {
325305   draw_sprite_invalid,   /* 0000 = 08x08 */
326306   draw_sprite_invalid,   /* 0001 = 16x08 */
327307   draw_sprite_invalid,   /* 0010 = 32x08 */
src/mame/video/20pacgal.c
r1404r1405
108108
109109   for (offs = 0x80-2;offs >= 0;offs-=2)
110110   {
111      static int gfx_offs[2][2] =
111      static const int gfx_offs[2][2] =
112112      {
113113         { 0, 1 },
114114         { 2, 3 }
src/mame/video/system16.c
r1404r1405
119119/* video driver constants (potentially different for each game) */
120120int sys16_gr_bitmap_width;
121121int (*sys16_spritesystem)( struct sys16_sprite_attributes *sprite, const UINT16 *source, int bJustGetColor );
122int *sys16_obj_bank;
122const int *sys16_obj_bank;
123123int sys16_sprxoffset;
124124int sys16_bgxoffset;
125125int sys16_fgxoffset;
r1404r1405
760760/***************************************************************************/
761761
762762VIDEO_START( system16 ){
763   static int bank_default[16] = {
763   static const int bank_default[16] = {
764764      0x0,0x1,0x2,0x3,
765765      0x4,0x5,0x6,0x7,
766766      0x8,0x9,0xa,0xb,
src/mame/video/redalert.c
r1404r1405
2424/* There might be a color PROM that dictates this? */
2525/* These guesses are based on comparing the color bars on the test
2626   screen with the picture in the manual */
27static UINT8 color_lookup[] = {
27static const UINT8 color_lookup[] = {
2828   1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,
2929   1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,
3030   3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
src/mame/video/taitoic.c
r1404r1405
754754   common_get_PC080SN_fg_tile_info(machine,tileinfo,tile_index,PC080SN_bg_ram[1][1],PC080SN_bg_gfx[1]);
755755}
756756
757static tile_get_info_callback PC080SN_get_tile_info[PC080SN_MAX_CHIPS][2] =
757static const tile_get_info_callback PC080SN_get_tile_info[PC080SN_MAX_CHIPS][2] =
758758{
759759   { PC080SN_get_bg_tile_info_0, PC080SN_get_fg_tile_info_0 },
760760   { PC080SN_get_bg_tile_info_1, PC080SN_get_fg_tile_info_1 }
r1404r1405
13711371
13721372
13731373#if 0
1374static int TC0080VCO_zoomy_conv_table[] =
1374static const int TC0080VCO_zoomy_conv_table[] =
13751375{
13761376/*      These are hand-tuned values...      */
13771377/*    +0   +1   +2   +3   +4   +5   +6   +7    +8   +9   +a   +b   +c   +d   +e   +f */
r1404r1405
21632163
21642164/* This array changes with TC0100SCN_MAX_CHIPS */
21652165
2166static tile_get_info_callback TC0100SCN_get_tile_info[TC0100SCN_MAX_CHIPS][3] =
2166static const tile_get_info_callback TC0100SCN_get_tile_info[TC0100SCN_MAX_CHIPS][3] =
21672167{
21682168   { TC0100SCN_get_bg_tile_info_0, TC0100SCN_get_fg_tile_info_0, TC0100SCN_get_tx_tile_info_0 },
21692169   { TC0100SCN_get_bg_tile_info_1, TC0100SCN_get_fg_tile_info_1, TC0100SCN_get_tx_tile_info_1 },
r1404r1405
30113011   common_get_tc0480tx_tile_info(machine,tileinfo,tile_index,TC0480SCP_tx_ram,TC0480SCP_tx_gfx);
30123012}
30133013
3014static tile_get_info_callback tc480_get_tile_info[5] =
3014static const tile_get_info_callback tc480_get_tile_info[5] =
30153015{
30163016   TC0480SCP_get_bg0_tile_info, TC0480SCP_get_bg1_tile_info,
30173017   TC0480SCP_get_bg2_tile_info, TC0480SCP_get_bg3_tile_info,
r1404r1405
38923892
38933893/* For evidence table of TC0480SCP bg layer priorities, refer to mame55 source */
38943894
3895static UINT16 TC0480SCP_bg_pri_lookup[8] =
3895static const UINT16 TC0480SCP_bg_pri_lookup[8] =
38963896{
38973897   0x0123,
38983898   0x1230,
src/mame/video/cps1.c
r1404r1405
407407   {"xmcotah", NOBATTRY, 4,4,4, 0x0000,0xffff,0x0000,0xffff, 8 },
408408   {"xmcotaj", NOBATTRY, 4,4,4, 0x0000,0xffff,0x0000,0xffff, 8 },
409409   {"xmcotaj1",NOBATTRY, 4,4,4, 0x0000,0xffff,0x0000,0xffff, 8 },
410   {"xmcotaj2",NOBATTRY, 4,4,4, 0x0000,0xffff,0x0000,0xffff, 8 },
410411   {"xmcotajr",NOBATTRY, 4,4,4, 0x0000,0xffff,0x0000,0xffff, 8 },
411412   {"xmcotaa", NOBATTRY, 4,4,4, 0x0000,0xffff,0x0000,0xffff, 8 },
412413   {"hsf2",    NOBATTRY, 4,4,0, 0x0000,0xffff,0x0000,0xffff, 9 },
src/mame/video/stactics.c
r1404r1405
112112/* The first 16 came from the 7448 BCD to 7-segment decoder data sheet */
113113/* The rest are made up */
114114
115static UINT8 stactics_special_chars[32*8] = {
115static const UINT8 stactics_special_chars[32*8] = {
116116    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   /* Space */
117117    0x80, 0x80, 0x80, 0xf0, 0x80, 0x80, 0xf0, 0x00,   /* extras... */
118118    0xf0, 0x80, 0x80, 0xf0, 0x00, 0x00, 0xf0, 0x00,   /* extras... */
src/mame/video/itech8.c
r1404r1405
170170}
171171
172172
173static struct tms34061_interface tms34061intf =
173static const struct tms34061_interface tms34061intf =
174174{
175175   0,                  /* the screen we are acting on */
176176   8,                  /* VRAM address is (row << rowshift) | col */
src/mame/video/model2.c
r1404r1405
922922
923923/***********************************************************************************************/
924924
925static poly_draw_scanline render_funcs[8] =
925static const poly_draw_scanline render_funcs[8] =
926926{
927927   model2_3d_render_0,   /* checker = 0, textured = 0, translucent = 0 */
928928   model2_3d_render_1,   /* checker = 0, textured = 0, translucent = 1 */
src/mame/video/lordgun.c
r1404r1405
156156
157157***************************************************************************/
158158
159static int lordgun_gun_x_table[] =
159static const int lordgun_gun_x_table[] =
160160{
161161   -100, 0x001,0x001,0x002,0x002,0x003,0x003,0x004,0x005,0x006,0x007,0x008,0x009,0x00A,0x00B,0x00C,
162162   0x00D,0x00E,0x00F,0x010,0x011,0x012,0x013,0x014,0x015,0x016,0x017,0x018,0x019,0x01A,0x01B,0x01C,
src/mame/video/jagobj.c
r1404r1405
222222   bitmap_4_draw(firstpix, iwidth, src, xpos, 7, -1);
223223}
224224
225static void (*bitmap4[8])(INT32, INT32, UINT32 *, INT32) =
225static void (*const bitmap4[8])(INT32, INT32, UINT32 *, INT32) =
226226{
227227   bitmap_4_0,
228228   bitmap_4_1,
r1404r1405
352352   bitmap_8_draw(firstpix, iwidth, src, xpos, 7, -1);
353353}
354354
355static void (*bitmap8[8])(INT32, INT32, UINT32 *, INT32) =
355static void (*const bitmap8[8])(INT32, INT32, UINT32 *, INT32) =
356356{
357357   bitmap_8_0,
358358   bitmap_8_1,
r1404r1405
459459   bitmap_16_draw(firstpix, iwidth, src, xpos, 7, -1);
460460}
461461
462static void (*bitmap16[8])(INT32, INT32, UINT32 *, INT32) =
462static void (*const bitmap16[8])(INT32, INT32, UINT32 *, INT32) =
463463{
464464   bitmap_16_0,
465465   bitmap_16_1,
src/mame/video/liberatr.c
r1404r1405
289289
290290      /* handle the hardware flip of the bit order from 765 to 576 that
291291           hardware does between vram and color ram */
292      static offs_t penmap[] = { 0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08,
292      static const offs_t penmap[] = { 0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08,
293293                           0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00,
294294                           0x10, 0x12, 0x14, 0x16, 0x11, 0x13, 0x15, 0x17 };
295295
src/mame/video/tehkanwc.c
r1404r1405
124124   int i;
125125
126126
127   static UINT8 ledvalues[] =
127   static const UINT8 ledvalues[] =
128128         { 0x86, 0xdb, 0xcf, 0xe6, 0xed, 0xfd, 0x87, 0xff, 0xf3, 0xf1 };
129129
130130
src/mame/video/capbowl.c
r1404r1405
2626   cpunum_set_input_line(0, M6809_FIRQ_LINE, state);
2727}
2828
29static struct tms34061_interface tms34061intf =
29static const struct tms34061_interface tms34061intf =
3030{
3131   0,                  /* the screen we are acting on */
3232   8,                  /* VRAM address is (row << rowshift) | col */
src/mame/video/qix.c
r1404r1405
242242   /* this conversion table should be about right. It gives a reasonable */
243243   /* gray scale in the test screen, and the red, green and blue squares */
244244   /* in the same screen are barely visible, as the manual requires. */
245   static UINT8 table[16] =
245   static const UINT8 table[16] =
246246   {
247247      0x00,   /* value = 0, intensity = 0 */
248248      0x12,   /* value = 0, intensity = 1 */
src/mame/video/snes.c
r1404r1405
9999};
100100static struct DEBUGOPTS debug_options  = {5, {0,0,0,0,0,0}, 0, 0, 0};
101101/*                                    red   green  blue    purple  yellow cyan    grey    white */
102static UINT16 dbg_mode_colours[8] = { 0x1f, 0x3e0, 0x7c00, 0x7c1f, 0x3ff, 0x7fe0, 0x4210, 0x7fff };
102static const UINT16 dbg_mode_colours[8] = { 0x1f, 0x3e0, 0x7c00, 0x7c1f, 0x3ff, 0x7fe0, 0x4210, 0x7fff };
103103static UINT8 snes_dbg_video(running_machine *machine, mame_bitmap *bitmap, UINT16 curline);
104104#endif /* SNES_DBG_video */
105105
r1404r1405
142142
143143static struct SCANLINE scanlines[2];
144144struct SNES_PPU_STRUCT snes_ppu;
145static struct SNES_MODE_CONFIG snes_modedefs[8] =
145static const struct SNES_MODE_CONFIG snes_modedefs[8] =
146146{
147147/*0*/   { {snes_update_line_2, snes_update_line_2, snes_update_line_2, snes_update_line_2}, 4 },
148148/*1*/   { {snes_update_line_4, snes_update_line_4, snes_update_line_2, NULL}, 3 },
r1404r1405
20012001   {
20022002      //UINT16 y = 1;
20032003      char t[100];
2004      static char WINLOGIC[4] = { '|', '&', '^', '!' };
2004      static const char WINLOGIC[4] = { '|', '&', '^', '!' };
20052005
20062006      if( !debug_options.input_count-- )
20072007      {
src/mame/video/gaelco.c
r1404r1405
128128   int i, x, y, ex, ey;
129129   const gfx_element *gfx = machine->gfx[0];
130130
131   static int x_offset[2] = {0x0,0x2};
132   static int y_offset[2] = {0x0,0x1};
131   static const int x_offset[2] = {0x0,0x2};
132   static const int y_offset[2] = {0x0,0x1};
133133
134134   for (i = 0x800 - 4 - 1; i >= 3; i -= 4){
135135      int sx = gaelco_spriteram[i+2] & 0x01ff;
src/mame/video/wecleman.c
r1404r1405
4242UINT16 *wecleman_videostatus;
4343UINT16 *wecleman_pageram, *wecleman_txtram, *wecleman_roadram;
4444size_t wecleman_roadram_size;
45static int wecleman_bgpage[4], wecleman_fgpage[4], *wecleman_gfx_bank;
45static int wecleman_bgpage[4], wecleman_fgpage[4];
46static const int *wecleman_gfx_bank;
4647
4748/* Variables only used here: */
4849static tilemap *bg_tilemap, *fg_tilemap, *txt_tilemap;
r1404r1405
874875        Sprite banking - each bank is 0x20000 bytes (we support 0x40 bank codes)
875876        This game has ROMs for 16 banks
876877    */
877   static int bank[0x40] =
878   static const int bank[0x40] =
878879   {
879880      0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,
880881      8,8,9,9,10,10,11,11,12,12,13,13,14,14,15,15,
r1404r1405
977978        Sprite banking - each bank is 0x20000 bytes (we support 0x40 bank codes)
978979        This game has ROMs for 0x30 banks
979980    */
980   static int bank[0x40] =
981   static const int bank[0x40] =
981982   {
982983      0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
983984      16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,
src/mame/video/vicdual.c
r1404r1405
1111static UINT8 palette_bank;
1212
1313
14static pen_t pens_from_color_prom[] =
14static const pen_t pens_from_color_prom[] =
1515{
1616   RGB_BLACK,
1717   MAKE_RGB(0x00, 0xff, 0x00),
src/mame/video/wgp.c
r1404r1405
351351   structure for each big sprite: the hardware is probably
352352   constructing each 4x4 sprite from 4 2x2 sprites... */
353353
354static UINT8 xlookup[16] =
354static const UINT8 xlookup[16] =
355355   { 0, 1, 0, 1,
356356     2, 3, 2, 3,
357357     0, 1, 0, 1,
358358     2, 3, 2, 3 };
359359
360static UINT8 ylookup[16] =
360static const UINT8 ylookup[16] =
361361   { 0, 0, 1, 1,
362362     0, 0, 1, 1,
363363     2, 2, 3, 3,
src/mame/video/taitoair.c
r1404r1405
5959extern int TC0080VCO_has_tx;
6060
6161/* These are hand-tuned values */
62static int zoomy_conv_table[] =
62static const int zoomy_conv_table[] =
6363{
6464/*    +0   +1   +2   +3   +4   +5   +6   +7    +8   +9   +a   +b   +c   +d   +e   +f */
6565   0x00,0x01,0x01,0x02,0x02,0x03,0x04,0x05, 0x06,0x06,0x07,0x08,0x09,0x0a,0x0a,0x0b,   /* 0x00 */
src/mame/video/gtia.c
r1404r1405
932932      dst[31] |= color;                  \
933933   }                                 \
934934}                                    \
935static void (*render_##player[4])(UINT8 *dst)={ \
935static void (*const render_##player[4])(UINT8 *dst)={ \
936936   render_##player##_w1,                  \
937937   render_##player##_w2,                  \
938938   render_##player##_w2,                  \
r1404r1405
977977      dst[ 7] |= color;                  \
978978   }                                 \
979979}                                    \
980static void (*render_##missile[4])(UINT8 *dst) = { \
980static void (*const render_##missile[4])(UINT8 *dst) = { \
981981   render_##missile##_w1,                  \
982982   render_##missile##_w2,                  \
983983   render_##missile##_w2,                  \
src/mame/video/warpwarp.c
r1404r1405
2727   MAKE_RGB(0x7f,0x7f,0x7f)  /* grey  */
2828};
2929
30static UINT16 geebee_colortable[] =
30static const UINT16 geebee_colortable[] =
3131{
3232    0, 1,
3333    1, 0,
r1404r1405
3535    2, 0
3636};
3737
38static UINT16 navarone_colortable[] =
38static const UINT16 navarone_colortable[] =
3939{
4040    0, 2,
4141    2, 0,
src/mame/video/cvs.c
r1404r1405
5555
5656int cvs_collision_register=0;
5757
58static int ModeOffset[4] = {223,191,255,127};
58static const int ModeOffset[4] = {223,191,255,127};
5959
6060/******************************************************
6161 * Convert Colour prom to format for Mame Colour Map  *
src/mame/video/seta.c
r1404r1405
167167};
168168
169169/* note that drgnunit, stg and qzkklogy run on the same board, yet they need different alignment */
170static struct x_offset game_offsets[] =
170static const struct x_offset game_offsets[] =
171171{
172172   /* only sprites */
173173   { "tndrcade", { -1,  0 } },            // correct (wall at beginning of game)
r1404r1405
217217   { NULL }
218218};
219219
220static struct x_offset *global_offsets;
220static const struct x_offset *global_offsets;
221221
222222
223223/*  ---- 3---       Coin #1 Lock Out
r1404r1405
229229{
230230   static int seta_coin_lockout = 1;
231231   static const game_driver *seta_driver = NULL;
232   static const char *seta_nolockout[8] = { "blandia", "gundhara", "kamenrid", "zingzip", "eightfrc", "extdwnhl", "sokonuke", "zombraid"};
232   static const char *const seta_nolockout[8] = { "blandia", "gundhara", "kamenrid", "zingzip", "eightfrc", "extdwnhl", "sokonuke", "zombraid"};
233233
234234   /* Only compute seta_coin_lockout when confronted with a new gamedrv */
235235   if (seta_driver != Machine->gamedrv)
src/mame/video/namcos1.c
r1404r1405
368368
369369   for (i = 0;i < 4;i++)
370370   {
371      static int disp_x[] = { 25, 27, 28, 29 };
371      static const int disp_x[] = { 25, 27, 28, 29 };
372372
373373      j = i << 2;
374374      scrollx = ( namcos1_playfield_control[j+1] + (namcos1_playfield_control[j+0]<<8) ) - disp_x[i];
src/mame/video/galaga.c
r1404r1405
4040
4141*/
4242
43struct star star_seed_tab[252]=
43const struct star star_seed_tab[252]=
4444{
4545
4646/* also shared by Bosconian */
r1404r1405
501501
502502   for (offs = 0;offs < 0x80;offs += 2)
503503   {
504      static int gfx_offs[2][2] =
504      static const int gfx_offs[2][2] =
505505      {
506506         { 0, 1 },
507507         { 2, 3 }
src/mame/video/taito_h.c
r1404r1405
5959extern int TC0080VCO_has_tx;
6060
6161/* These are hand-tuned values */
62static int zoomy_conv_table[] =
62static const int zoomy_conv_table[] =
6363{
6464/*    +0   +1   +2   +3   +4   +5   +6   +7    +8   +9   +a   +b   +c   +d   +e   +f */
6565   0x00,0x01,0x01,0x02,0x02,0x03,0x04,0x05, 0x06,0x06,0x07,0x08,0x09,0x0a,0x0a,0x0b,   /* 0x00 */
src/mame/video/pacland.c
r1404r1405
291291
292292   for (offs = 0;offs < 0x80;offs += 2)
293293   {
294      static int gfx_offs[2][2] =
294      static const int gfx_offs[2][2] =
295295      {
296296         { 0, 1 },
297297         { 2, 3 }
src/mame/video/ddrible.c
r1404r1405
199199      }
200200
201201      {
202         static int x_offset[2] = { 0x00, 0x01 };
203         static int y_offset[2] = { 0x00, 0x02 };
202         static const int x_offset[2] = { 0x00, 0x01 };
203         static const int y_offset[2] = { 0x00, 0x02 };
204204         int x,y, ex, ey;
205205
206206         for( y=0; y < height; y++ ){
src/mame/video/taitosj.c
r1404r1405
3434static rectangle spritearea[32]; /*areas on bitmap (sprite locations)*/
3535static UINT8 spriteon[32]; /* 1 if sprite is active */
3636
37static int playfield_enable_mask[3] = { 0x10, 0x20, 0x40 };
37static const int playfield_enable_mask[3] = { 0x10, 0x20, 0x40 };
3838
3939
4040/***************************************************************************
r1404r1405
707707
708708static void draw_playfield(running_machine *machine, int n, mame_bitmap *bitmap)
709709{
710   static int fudge1[3] = { 3,  1, -1 };
711   static int fudge2[3] = { 8, 10, 12 };
710   static const int fudge1[3] = { 3,  1, -1 };
711   static const int fudge2[3] = { 8, 10, 12 };
712712
713713   if (taitosj_video_enable & playfield_enable_mask[n])
714714   {
src/mame/video/avgdvg.c
r1404r1405
130130static int flip_x, flip_y;
131131
132132static vgdata vgd, *vg;
133static vgconf *vgc;
133static const vgconf *vgc;
134134static int nvect;
135135static vgvector vectbuf[MAXVECT];
136136
r1404r1405
12741274 *
12751275 *************************************/
12761276
1277static vgconf dvg_default =
1277static const vgconf dvg_default =
12781278{
12791279   {
12801280      dvg_dmapush,
r1404r1405
12921292   dvg_vgrst
12931293};
12941294
1295static vgconf avg_default =
1295static const vgconf avg_default =
12961296{
12971297   {
12981298      avg_latch0,
r1404r1405
13101310   avg_vgrst
13111311};
13121312
1313static vgconf avg_mhavoc =
1313static const vgconf avg_mhavoc =
13141314{
13151315   {
13161316      avg_latch0,
r1404r1405
13281328   mhavoc_vgrst
13291329};
13301330
1331static vgconf avg_starwars =
1331static const vgconf avg_starwars =
13321332{
13331333   {
13341334      avg_latch0,
r1404r1405
13461346   avg_vgrst
13471347};
13481348
1349static vgconf avg_tempest =
1349static const vgconf avg_tempest =
13501350{
13511351   {
13521352      avg_latch0,
r1404r1405
13641364   avg_vgrst
13651365};
13661366
1367static vgconf avg_bzone =
1367static const vgconf avg_bzone =
13681368{
13691369   {
13701370      avg_latch0,
r1404r1405
13821382   avg_vgrst
13831383};
13841384
1385static vgconf avg_quantum =
1385static const vgconf avg_quantum =
13861386{
13871387   {
13881388      quantum_st2st3,
src/mame/video/konamiic.c
r1404r1405
13531353      int yflip = source[offs[4]] & 0x20;      /* flip y */
13541354      int color = base_color + ((source[offs[1]] & 0xf0) >> 4);
13551355      int width,height;
1356      static int x_offset[4] = {0x0,0x1,0x4,0x5};
1357      static int y_offset[4] = {0x0,0x2,0x8,0xa};
1356      static const int x_offset[4] = {0x0,0x1,0x4,0x5};
1357      static const int y_offset[4] = {0x0,0x2,0x8,0xa};
13581358      int x,y, ex, ey;
13591359
13601360      if (attr & 0x01) sx -= 256;
r1404r1405
17301730   for (offs = K007420_SPRITERAM_SIZE - 8; offs >= 0; offs -= 8)
17311731   {
17321732      int ox,oy,code,color,flipx,flipy,zoom,w,h,x,y,bank;
1733      static int xoffset[4] = { 0, 1, 4, 5 };
1734      static int yoffset[4] = { 0, 2, 8, 10 };
1733      static const int xoffset[4] = { 0, 1, 4, 5 };
1734      static const int yoffset[4] = { 0, 2, 8, 10 };
17351735
17361736      code = K007420_ram[offs+1];
17371737      color = K007420_ram[offs+2];
r1404r1405
26822682            40 41 44 45 56 57 60 61
26832683            42 43 46 47 58 59 62 63
26842684        */
2685      static int xoffset[8] = { 0, 1, 4, 5, 16, 17, 20, 21 };
2686      static int yoffset[8] = { 0, 2, 8, 10, 32, 34, 40, 42 };
2687      static int width[8] =  { 1, 2, 1, 2, 4, 2, 4, 8 };
2688      static int height[8] = { 1, 1, 2, 2, 2, 4, 4, 8 };
2685      static const int xoffset[8] = { 0, 1, 4, 5, 16, 17, 20, 21 };
2686      static const int yoffset[8] = { 0, 2, 8, 10, 32, 34, 40, 42 };
2687      static const int width[8] =  { 1, 2, 1, 2, 4, 2, 4, 8 };
2688      static const int height[8] = { 1, 1, 2, 2, 2, 4, 4, 8 };
26892689
26902690
26912691      offs = sortedlist[pri_code];
r1404r1405
41534153        40 41 44 45 56 57 60 61
41544154        42 43 46 47 58 59 62 63
41554155    */
4156   static int xoffset[8] = { 0, 1, 4, 5, 16, 17, 20, 21 };
4157   static int yoffset[8] = { 0, 2, 8, 10, 32, 34, 40, 42 };
4156   static const int xoffset[8] = { 0, 1, 4, 5, 16, 17, 20, 21 };
4157   static const int yoffset[8] = { 0, 2, 8, 10, 32, 34, 40, 42 };
41584158
41594159   int sortedlist[NUM_SPRITES];
41604160   int offs,zcode;
r1404r1405
45514551      void (*callback)(int *code,int *color,int *flags))
45524552{
45534553   int gfx_index;
4554   static tile_get_info_callback get_tile_info[3] = { K051316_get_tile_info0,K051316_get_tile_info1,K051316_get_tile_info2 };
4554   static const tile_get_info_callback get_tile_info[3] = { K051316_get_tile_info0,K051316_get_tile_info1,K051316_get_tile_info2 };
45554555
45564556   /* find first empty slot to decode gfx */
45574557   for (gfx_index = 0; gfx_index < MAX_GFX_ELEMENTS; gfx_index++)
r1404r1405
54215421
54225422INLINE void K056832_get_tile_info( running_machine *machine, tile_data *tileinfo, int tile_index, int pageIndex )
54235423{
5424   static struct K056832_SHIFTMASKS
5424   static const struct K056832_SHIFTMASKS
54255425   {
54265426      int flips, palm1, pals2, palm2;
54275427   }
54285428   K056832_shiftmasks[4] = {{6,0x3f,0,0x00},{4,0x0f,2,0x30},{2,0x03,2,0x3c},{0,0x00,2,0x3f}};
54295429
5430   struct K056832_SHIFTMASKS *smptr;
5430   const struct K056832_SHIFTMASKS *smptr;
54315431   int layer, flip, fbits, attr, code, color, flags;
54325432   UINT16 *pMem;
54335433
r1404r1405
71017101void K055555_write_reg(UINT8 regnum, UINT8 regdat)
71027102{
71037103   #if VERBOSE
7104   static const char *rnames[46] =
7104   static const char *const rnames[46] =
71057105   {
71067106      "BGC CBLK", "BGC SET", "COLSET0", "COLSET1", "COLSET2", "COLSET3", "COLCHG ON",
71077107      "A PRI 0", "A PRI 1", "A COLPRI", "B PRI 0", "B PRI 1", "B COLPRI", "C PRI", "D PRI",
src/mame/video/retofinv.c
r1404r1405
193193
194194   for (offs = 0;offs < 0x80;offs += 2)
195195   {
196      static int gfx_offs[2][2] =
196      static const int gfx_offs[2][2] =
197197      {
198198         { 0, 1 },
199199         { 2, 3 }
src/mame/video/vrender0.c
r1404r1405
326326
327327typedef void (*_DrawTemplate)(_Quad *);
328328
329static _DrawTemplate DrawImage[]=
329static const _DrawTemplate DrawImage[]=
330330{
331331   TILENAME(4,0,0),
332332   TILENAME(8,0,0),
r1404r1405
344344   TILENAME(16,0,2),
345345};
346346
347static _DrawTemplate DrawTile[]=
347static const _DrawTemplate DrawTile[]=
348348{
349349   TILENAME(4,1,0),
350350   TILENAME(8,1,0),
src/mame/video/digdug.c
r1404r1405
260260
261261   for (offs = 0;offs < 0x80;offs += 2)
262262   {
263      static int gfx_offs[2][2] =
263      static const int gfx_offs[2][2] =
264264      {
265265         { 0, 1 },
266266         { 2, 3 }
src/mame/video/atari.c
r1404r1405
460460 ************************************************************************/
461461static void cclk_init(void)
462462{
463   static UINT8 _pf_21[4] =   {T00,T01,T10,T11};
464   static UINT8 _pf_1b[4] =   {G00,G01,G10,G11};
465   static UINT8 _pf_210b[4] = {PBK,PF0,PF1,PF2};
466   static UINT8 _pf_310b[4] = {PBK,PF0,PF1,PF3};
463   static const UINT8 _pf_21[4] =   {T00,T01,T10,T11};
464   static const UINT8 _pf_1b[4] =   {G00,G01,G10,G11};
465   static const UINT8 _pf_210b[4] = {PBK,PF0,PF1,PF2};
466   static const UINT8 _pf_310b[4] = {PBK,PF0,PF1,PF3};
467467   int i;
468468   UINT8 * dst;
469469
r1404r1405
10881088}
10891089
10901090
1091static renderer_function renderer[2][19][5] = {
1091static const renderer_function renderer[2][19][5] = {
10921092   /*   no playfield    narrow          normal          wide         */
10931093   {
10941094      {antic_mode_0_xx,antic_mode_0_xx,antic_mode_0_xx,antic_mode_0_xx},
src/mame/video/segas32.c
r1404r1405
21662166   }
21672167/*
21682168{
2169    static const char *layname[] = { "TEXT", "NBG0", "NBG1", "NBG2", "NBG3", "BITM", "SPRI", "LINE" };
2169    static const char *const layname[] = { "TEXT", "NBG0", "NBG1", "NBG2", "NBG3", "BITM", "SPRI", "LINE" };
21702170    for (groupnum = 0; groupnum <= sprgroup_mask; groupnum++)
21712171    {
21722172        mame_printf_debug("%X: ", groupnum);
r1404r1405
25392539
25402540#if SHOW_ALPHA
25412541{
2542   static const char *layername[] = { "TEXT ", "NBG0 ", "NBG1 ", "NBG2 ", "NBG3 ", "BITMAP " };
2542   static const char *const layername[] = { "TEXT ", "NBG0 ", "NBG1 ", "NBG2 ", "NBG3 ", "BITMAP " };
25432543   char temp[100];
25442544   int count = 0, i;
25452545   sprintf(temp, "ALPHA(%d):", (mixer_control[which][0x4e/2] >> 8) & 7);
src/mame/video/gradius3.c
r1404r1405
3939   #define L0 0xaa
4040   #define L1 0xcc
4141   #define L2 0xf0
42   static int primask[2][4] =
42   static const int primask[2][4] =
4343   {
4444      { L0|L2, L0, L0|L2, L0|L1|L2 },
4545      { L1|L2, L2, 0,     L0|L1|L2 }
src/mame/video/skykid.c
r1404r1405
204204
205205   for (offs = 0;offs < 0x80;offs += 2)
206206   {
207      static int gfx_offs[2][2] =
207      static const int gfx_offs[2][2] =
208208      {
209209         { 0, 1 },
210210         { 2, 3 }
src/mame/video/djmain.c
r1404r1405
3737
3838   for (pri_code = NUM_SPRITES - 1; pri_code >= 0; pri_code--)
3939   {
40      static int xoffset[8] = { 0, 1, 4, 5, 16, 17, 20, 21 };
41      static int yoffset[8] = { 0, 2, 8, 10, 32, 34, 40, 42 };
42      static int sizetab[4] =  { 1, 2, 4, 8 };
40      static const int xoffset[8] = { 0, 1, 4, 5, 16, 17, 20, 21 };
41      static const int yoffset[8] = { 0, 2, 8, 10, 32, 34, 40, 42 };
42      static const int sizetab[4] =  { 1, 2, 4, 8 };
4343      int x, y;
4444      int ox, oy;
4545      int flipx, flipy;
src/mame/video/n64.c
r1404r1405
24482448}
24492449
24502450#if LOG_RDP_EXECUTION
2451static const char *image_format[] = { "RGBA", "YUV", "CI", "IA", "I", "???", "???", "???" };
2452static const char *image_size[] = { "4-bit", "8-bit", "16-bit", "32-bit" };
2451static const char *const image_format[] = { "RGBA", "YUV", "CI", "IA", "I", "???", "???", "???" };
2452static const char *const image_size[] = { "4-bit", "8-bit", "16-bit", "32-bit" };
24532453#endif
24542454
24552455static const int rdp_command_length[64] =
r1404r1405
33923392
33933393/*****************************************************************************/
33943394
3395static void (* rdp_command_table[64])(UINT32 w1, UINT32 w2) =
3395static void (*const rdp_command_table[64])(UINT32 w1, UINT32 w2) =
33963396{
33973397   /* 0x00 */
33983398   rdp_noop,         rdp_invalid,         rdp_invalid,         rdp_invalid,
src/mame/video/homedata.c
r1404r1405
716716   tilemap_draw(bitmap, cliprect, bg_tilemap[homedata_visible_page][1], 0, 0);
717717   return 0;
718718}
719/*
719
720#ifdef UNUSED_FUNCTION
720721VIDEO_UPDATE( reikaids )
721722{
722723    int flags;
723    static int pritable[8][4] =
724    static const int pritable[8][4] =
724725    {
725726        { 3,1,0,2 },
726727        { 1,3,0,2 },
r1404r1405
749750        tilemap_draw(bitmap, cliprect, bg_tilemap[homedata_visible_page][pritable[pri][3-i]], 0, 0);
750751    return 0;
751752}
753#endif
752754
753*/
754755VIDEO_UPDATE( reikaids )
755756{
756757   int flags;
757   static int pritable[2][8][4] =   /* table of priorities derived from the PROM */
758   static const int pritable[2][8][4] =   /* table of priorities derived from the PROM */
758759   {
759760   {
760761      { 3,1,0,2 },
src/mame/video/gladiatr.c
r1404r1405
204204
205205   for (offs = 0;offs < 0x80;offs += 2)
206206   {
207      static int tile_offset[2][2] =
207      static const int tile_offset[2][2] =
208208      {
209209         {0x0,0x1},
210210         {0x2,0x3},
src/mame/video/thoop2.c
r1404r1405
155155   int j, x, y, ex, ey;
156156   const gfx_element *gfx = machine->gfx[0];
157157
158   static int x_offset[2] = {0x0,0x2};
159   static int y_offset[2] = {0x0,0x1};
158   static const int x_offset[2] = {0x0,0x2};
159   static const int y_offset[2] = {0x0,0x1};
160160
161161   for (j = 0; j < sprite_count[pri]; j++){
162162      int i = sprite_table[pri][j];
src/mame/video/gaelco2.c
r1404r1405
217217#define ADJUST_COLOR(c) ((c < 0) ? 0 : ((c > 255) ? 255 : c))
218218
219219/* table used for color adjustment */
220static int pen_color_adjust[16] = {
220static const int pen_color_adjust[16] = {
221221   +RGB_CHG*0, -RGB_CHG*1, -RGB_CHG*2, -RGB_CHG*3, -RGB_CHG*4, -RGB_CHG*5, -RGB_CHG*6, -RGB_CHG*7,
222222   +RGB_CHG*8, +RGB_CHG*7, +RGB_CHG*6, +RGB_CHG*5, +RGB_CHG*4, +RGB_CHG*3, +RGB_CHG*2, +RGB_CHG*1
223223};
src/mame/video/bwing.c
r1404r1405
4848//****************************************************************************
4949// Exports
5050
51gfx_layout bwing_tilelayout =
51const gfx_layout bwing_tilelayout =
5252{
5353   16, 16,
5454   BW_NTILES,
src/mame/video/sf.c
r1404r1405
126126
127127INLINE int sf_invert(int nb)
128128{
129   static int delta[4] = {0x00, 0x18, 0x18, 0x00};
129   static const int delta[4] = {0x00, 0x18, 0x18, 0x00};
130130   return nb ^ delta[(nb >> 3) & 3];
131131}
132132
src/mame/video/wrally.c
r1404r1405
118118   int i, x, y, ex, ey;
119119   const gfx_element *gfx = machine->gfx[0];
120120
121   static int x_offset[2] = {0x0,0x2};
122   static int y_offset[2] = {0x0,0x1};
121   static const int x_offset[2] = {0x0,0x2};
122   static const int y_offset[2] = {0x0,0x1};
123123
124124   for (i = 3; i < (0x1000 - 6)/2; i += 4){
125125      int sx = wrally_spriteram[i+2] & 0x03ff;
src/mame/drivers/bfcobra.c
r1404r1405
750750   if (data < 0x08)
751751   {
752752      /* TODO: Don't need this table! */
753      static UINT32 offs_table[2][8] =
753      static const UINT32 offs_table[2][8] =
754754      {
755755         { 0x10000, 0x14000, 0x18000, 0x1c000, 0x00000, 0x04000, 0x08000, 0x0c000 },
756756         { 0x00000, 0x04000, 0x08000, 0x0c000, 0x10000, 0x14000, 0x18000, 0x1c000 }
r1404r1405
13671367/*
13681368    What are the correct ACIA clocks ?
13691369*/
1370static struct acia6850_interface z80_acia_if =
1370static const struct acia6850_interface z80_acia_if =
13711371{
13721372   500000,
13731373   500000,
r1404r1405
13791379   z80_acia_irq
13801380};
13811381
1382static struct acia6850_interface m6809_acia_if =
1382static const struct acia6850_interface m6809_acia_if =
13831383{
13841384   500000,
13851385   500000,
r1404r1405
13911391   NULL
13921392};
13931393
1394static struct acia6850_interface data_acia_if =
1394static const struct acia6850_interface data_acia_if =
13951395{
13961396   500000,
13971397   500000,
r1404r1405
14741474   state_save_register_global_pointer(video_ram, 0x20000);
14751475}
14761476
1477static struct upd7759_interface upd7759_interface =
1477static const struct upd7759_interface upd7759_interface =
14781478{
14791479   REGION_SOUND1
14801480};
src/mame/drivers/rcasino.c
r1404r1405
283283   GFXDECODE_ENTRY( REGION_GFX2, 0x0000, charlayout2, 0, 16 )
284284GFXDECODE_END
285285
286static struct AY8910interface ay8910_interface =
286static const struct AY8910interface ay8910_interface =
287287{
288288   input_port_2_r,   // DSW1
289289   input_port_3_r,   // DSW2
src/mame/drivers/nycaptor.c
r1404r1405
294294
295295}
296296
297static struct AY8910interface ay8910_interface =
297static const struct AY8910interface ay8910_interface =
298298{
299299   0,
300300   0,
r1404r1405
302302   unk_w
303303};
304304
305static struct MSM5232interface msm5232_interface =
305static const struct MSM5232interface msm5232_interface =
306306{
307307   { 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) */
308308};
src/mame/drivers/mitchell.c
r1404r1405
14221422}
14231423
14241424
1425static struct MSM5205interface msm5205_interface =
1425static const struct MSM5205interface msm5205_interface =
14261426{
14271427   spangbl_adpcm_int,   /* interrupt function */
14281428   MSM5205_S48_4B      /* 4KHz 4-bit */
src/mame/drivers/rainbow.c
r1404r1405
601601   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
602602}
603603
604static struct YM2151interface ym2151_interface =
604static const struct YM2151interface ym2151_interface =
605605{
606606   irqhandler,
607607   bankswitch_w
src/mame/drivers/galspnbl.c
r1404r1405
289289   cpunum_set_input_line(1,0,linestate);
290290}
291291
292static struct YM3812interface ym3812_interface =
292static const struct YM3812interface ym3812_interface =
293293{
294294   irqhandler
295295};
src/mame/drivers/blktiger.c
r1404r1405
250250   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
251251}
252252
253static struct YM2203interface ym2203_interface =
253static const struct YM2203interface ym2203_interface =
254254{
255255   0,
256256   0,
src/mame/drivers/deco_mlc.c
r1404r1405
425425   raster_irq_timer = timer_alloc(interrupt_gen, NULL);
426426}
427427
428static struct YMZ280Binterface ymz280b_intf =
428static const struct YMZ280Binterface ymz280b_intf =
429429{
430430   REGION_SOUND1,
431431   0
src/mame/drivers/tunhunt.c
r1404r1405
296296 *
297297 *************************************/
298298
299static struct POKEYinterface pokey_interface_1 =
299static const struct POKEYinterface pokey_interface_1 =
300300{
301301   { 0 },
302302   dsw1_r
303303};
304304
305static struct POKEYinterface pokey_interface_2 =
305static const struct POKEYinterface pokey_interface_2 =
306306{
307307   { input_port_1_r,input_port_2_r,dsw2_0r,dsw2_1r,dsw2_2r,dsw2_3r,dsw2_4r }
308308};
src/mame/drivers/rungun.c
r1404r1405
301301   AM_RANGE(0xfff0, 0xfff3) AM_WRITE(MWA8_NOP)
302302ADDRESS_MAP_END
303303
304static struct K054539interface k054539_interface =
304static const struct K054539interface k054539_interface =
305305{
306306   REGION_SOUND1
307307};
src/mame/drivers/crystal.c
r1404r1405
814814
815815INPUT_PORTS_END
816816
817static struct VR0Interface vr0_interface =
817static const struct VR0Interface vr0_interface =
818818{
819819   0x04800000
820820};
src/mame/drivers/tempest.c
r1404r1405
558558 *
559559 *************************************/
560560
561static struct POKEYinterface pokey_interface_1 =
561static const struct POKEYinterface pokey_interface_1 =
562562{
563563   { input_port_1_bit_r,input_port_1_bit_r,input_port_1_bit_r,input_port_1_bit_r,
564564     input_port_1_bit_r,input_port_1_bit_r,input_port_1_bit_r,input_port_1_bit_r }
565565};
566566
567static struct POKEYinterface pokey_interface_2 =
567static const struct POKEYinterface pokey_interface_2 =
568568{
569569   { input_port_2_bit_r,input_port_2_bit_r,input_port_2_bit_r,input_port_2_bit_r,
570570     input_port_2_bit_r,input_port_2_bit_r,input_port_2_bit_r,input_port_2_bit_r }
src/mame/drivers/madmotor.c
r1404r1405
276276   cpunum_set_input_line(1,1,state); /* IRQ 2 */
277277}
278278
279static struct YM2151interface ym2151_interface =
279static const struct YM2151interface ym2151_interface =
280280{
281281   sound_irq
282282};
src/mame/drivers/bublbobl.c
r1404r1405
720720   cpunum_set_input_line(2, 0, irq ? ASSERT_LINE : CLEAR_LINE);
721721}
722722
723static struct YM2203interface ym2203_interface =
723static const struct YM2203interface ym2203_interface =
724724{
725725   0,
726726   0,
src/mame/drivers/chinsan.c
r1404r1405
9494}
9595
9696
97static struct YM2203interface ym2203_interface =
97static const struct YM2203interface ym2203_interface =
9898{
9999   input_port_0_r,
100100   input_port_1_r,
src/mame/drivers/aerofgt.c
r1404r1405
13801380   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
13811381}
13821382
1383static struct YM2610interface ym2610_interface =
1383static const struct YM2610interface ym2610_interface =
13841384{
13851385   irqhandler,
13861386   REGION_SOUND1,
13871387   REGION_SOUND2
13881388};
13891389
1390static struct YM3812interface ym3812_interface =
1390static const struct YM3812interface ym3812_interface =
13911391{
13921392   irqhandler   /* IRQ Line */
13931393};
src/mame/drivers/coinmstr.c
r1404r1405
617617   pia_reset();
618618}
619619
620static struct AY8910interface ay8912_interface =
620static const struct AY8910interface ay8912_interface =
621621{
622622   input_port_4_r
623623};
src/mame/drivers/docastle.c
r1404r1405
616616
617617/* Sound Interfaces */
618618
619static struct MSM5205interface msm5205_interface =
619static const struct MSM5205interface msm5205_interface =
620620{
621621   idsoccer_adpcm_int,   // interrupt function
622622   MSM5205_S64_4B      // 6 kHz    ???
src/mame/drivers/ultrsprt.c
r1404r1405
247247   eeprom_handler(file, read_or_write);
248248}
249249
250static ppc_config ultrsprt_ppc_cfg =
250static const ppc_config ultrsprt_ppc_cfg =
251251{
252252   PPC_MODEL_403GA
253253};
254254
255static struct K054539interface k054539_interface =
255static const struct K054539interface k054539_interface =
256256{
257257   REGION_SOUND1
258258};
src/mame/drivers/mainsnk.c
r1404r1405
358358   256
359359};
360360
361static struct namco_interface snkwave_interface =
361static const struct namco_interface snkwave_interface =
362362{
363363   1,
364364   -1
src/mame/drivers/midyunit.c
r1404r1405
852852 *
853853 *************************************/
854854
855static tms34010_config zunit_tms_config =
855static const tms34010_config zunit_tms_config =
856856{
857857   FALSE,                     /* halt on reset */
858858   0,                        /* the screen operated on */
r1404r1405
864864   midyunit_from_shiftreg         /* read from shiftreg function */
865865};
866866
867static tms34010_config yunit_tms_config =
867static const tms34010_config yunit_tms_config =
868868{
869869   FALSE,                     /* halt on reset */
870870   0,                        /* the screen operated on */
src/mame/drivers/senjyo.c
r1404r1405
640640
641641
642642
643static struct z80_irq_daisy_chain daisy_chain[] =
643static const struct z80_irq_daisy_chain daisy_chain[] =
644644{
645645   { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti , 0 }, /* device 0 = CTC_0 , high priority */
646646   { z80pio_reset, z80pio_irq_state, z80pio_irq_ack, z80pio_irq_reti , 0 }, /* device 1 = PIO_0 , low  priority */
src/mame/drivers/yiear.c
r1404r1405
248248
249249
250250
251static struct VLM5030interface vlm5030_interface =
251static const struct VLM5030interface vlm5030_interface =
252252{
253253   REGION_SOUND1,   /* memory region  */
254254   0           /* memory size of speech rom */
src/mame/drivers/snowbros.c
r1404r1405
15211521
15221522/* SnowBros Sound */
15231523
1524static struct YM3812interface ym3812_interface =
1524static const struct YM3812interface ym3812_interface =
15251525{
15261526   irqhandler
15271527};
15281528
15291529/* SemiCom Sound */
15301530
1531static struct YM2151interface ym2151_interface =
1531static const struct YM2151interface ym2151_interface =
15321532{
15331533   irqhandler
15341534};
src/mame/drivers/mhavoc.c
r1404r1405
502502 *
503503 *************************************/
504504
505static struct POKEYinterface pokey_interface =
505static const struct POKEYinterface pokey_interface =
506506{
507507   { 0 },
508508   input_port_3_r
src/mame/drivers/bzone.c
r1404r1405
539539 *
540540 *************************************/
541541
542static struct POKEYinterface bzone_pokey_interface =
542static const struct POKEYinterface bzone_pokey_interface =
543543{
544544   { 0 },
545545   input_port_3_r
546546};
547547
548548
549static struct CustomSound_interface bzone_custom_interface =
549static const struct CustomSound_interface bzone_custom_interface =
550550{
551551   bzone_sh_start
552552};
553553
554554
555static struct POKEYinterface redbaron_pokey_interface =
555static const struct POKEYinterface redbaron_pokey_interface =
556556{
557557   { 0 },
558558   redbaron_joy_r
559559};
560560
561561
562static struct CustomSound_interface redbaron_custom_interface =
562static const struct CustomSound_interface redbaron_custom_interface =
563563{
564564   redbaron_sh_start
565565};
src/mame/drivers/segaxbd.c
r1404r1405
235235
236236static READ16_HANDLER( adc_r )
237237{
238   static const char *ports[] = { "ADC0", "ADC1", "ADC2", "ADC3", "ADC4", "ADC5", "ADC6", "ADC7" };
238   static const char *const ports[] = { "ADC0", "ADC1", "ADC2", "ADC3", "ADC4", "ADC5", "ADC6", "ADC7" };
239239   int which = (iochip_regs[0][2] >> 2) & 7;
240240
241241   /* on the write, latch the selected input port and stash the value */
r1404r1405
10821082 *
10831083 *************************************/
10841084
1085static struct YM2151interface ym2151_interface =
1085static const struct YM2151interface ym2151_interface =
10861086{
10871087   sound_cpu_irq
10881088};
10891089
10901090
1091static struct SEGAPCMinterface segapcm_interface =
1091static const struct SEGAPCMinterface segapcm_interface =
10921092{
10931093   BANK_512,
10941094   REGION_SOUND1
src/mame/drivers/nbmj9195.c
r1404r1405
41184118INPUT_PORTS_END
41194119
41204120
4121static struct z80_irq_daisy_chain daisy_chain_main[] =
4121static const struct z80_irq_daisy_chain daisy_chain_main[] =
41224122{
41234123   { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 },   /* device 0 = CTC_0 */
41244124   { 0, 0, 0, 0, -1 }                              /* end mark */
41254125};
41264126
4127static struct z80_irq_daisy_chain daisy_chain_sound[] =
4127static const struct z80_irq_daisy_chain daisy_chain_sound[] =
41284128{
41294129   { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 1 },   /* device 0 = CTC_1 */
41304130   { 0, 0, 0, 0, -1 }                              /* end mark */
src/mame/drivers/hcastle.c
r1404r1405
252252   K007232_set_volume(0,1,0,(v & 0x0f) * 0x11);
253253}
254254
255static struct K007232_interface k007232_interface =
255static const struct K007232_interface k007232_interface =
256256{
257257   REGION_SOUND1,   /* memory regions */
258258   volume_callback   /* external port callback */
259259};
260260
261static struct YM3812interface ym3812_interface =
261static const struct YM3812interface ym3812_interface =
262262{
263263   irqhandler
264264};
src/mame/drivers/artmagic.c
r1404r1405
449449 *
450450 *************************************/
451451
452static tms34010_config tms_config =
452static const tms34010_config tms_config =
453453{
454454   TRUE,                     /* halt on reset */
455455   0,                        /* the screen operated on */
src/mame/drivers/twincobr.c
r1404r1405
638638   cpunum_set_input_line(1,0,linestate);
639639}
640640
641static struct YM3812interface ym3812_interface =
641static const struct YM3812interface ym3812_interface =
642642{
643643   irqhandler
644644};
src/mame/drivers/dblewing.c
r1404r1405
532532//  mame_printf_debug("sound irq\n");
533533}
534534
535static struct YM2151interface ym2151_interface =
535static const struct YM2151interface ym2151_interface =
536536{
537537   sound_irq
538538};
src/mame/drivers/arabian.c
r1404r1405
331331 *
332332 *************************************/
333333
334static struct AY8910interface ay8910_interface =
334static const struct AY8910interface ay8910_interface =
335335{
336336   0,
337337   0,
src/mame/drivers/labyrunr.c
r1404r1405
221221
222222***************************************************************************/
223223
224static struct YM2203interface ym2203_interface_1 =
224static const struct YM2203interface ym2203_interface_1 =
225225{
226226   input_port_0_r,
227227   input_port_1_r
228228};
229229
230static struct YM2203interface ym2203_interface_2 =
230static const struct YM2203interface ym2203_interface_2 =
231231{
232232   0,
233233   input_port_2_r
src/mame/drivers/hornet.c
r1404r1405
845845
846846INPUT_PORTS_END
847847
848static struct RF5C400interface rf5c400_interface =
848static const struct RF5C400interface rf5c400_interface =
849849{
850850   REGION_SOUND1
851851};
852852
853static ppc_config hornet_ppc_cfg =
853static const ppc_config hornet_ppc_cfg =
854854{
855855   PPC_MODEL_403GA
856856};
src/mame/drivers/pipedrm.c
r1404r1405
531531}
532532
533533
534static struct YM2608interface ym2608_interface =
534static const struct YM2608interface ym2608_interface =
535535{
536536   0,0,0,0,irqhandler,
537537   REGION_SOUND1
538538};
539539
540540
541static struct YM2610interface ym2610_interface =
541static const struct YM2610interface ym2610_interface =
542542{
543543   irqhandler,
544544   REGION_SOUND1,
src/mame/drivers/ccastles.c
r1404r1405
448448 *
449449 *************************************/
450450
451static struct POKEYinterface pokey_interface =
451static const struct POKEYinterface pokey_interface =
452452{
453453   { 0 },
454454   input_port_1_r
src/mame/drivers/ddragon3.c
r1404r1405
480480   cpunum_set_input_line( 1, 0 , irq ? ASSERT_LINE : CLEAR_LINE );
481481}
482482
483static struct YM2151interface ym2151_interface =
483static const struct YM2151interface ym2151_interface =
484484{
485485   dd3_ymirq_handler
486486};
src/mame/drivers/exterm.c
r1404r1405
441441 *
442442 *************************************/
443443
444static tms34010_config master_config =
444static const tms34010_config master_config =
445445{
446446   FALSE,                  /* halt on reset */
447447   0,                     /* the screen operated on */
r1404r1405
453453   exterm_from_shiftreg_master   /* read from shiftreg function */
454454};
455455
456static tms34010_config slave_config =
456static const tms34010_config slave_config =
457457{
458458   TRUE,                  /* halt on reset */
459459   0,                     /* the screen operated on */
src/mame/drivers/discoboy.c
r1404r1405
464464
465465
466466
467static struct MSM5205interface discoboy_msm5205_interface =
467static const struct MSM5205interface discoboy_msm5205_interface =
468468{
469469   splash_msm5205_int,   /* IRQ handler */
470470   MSM5205_S48_4B      /* ??? unknown hz */
src/mame/drivers/mediagx.c
r1404r1405
916916   pic8259_set_irq_line(1, 6, state);
917917}
918918
919static struct kbdc8042_interface at8042 =
919static const struct kbdc8042_interface at8042 =
920920{
921921   KBDC8042_AT386, set_gate_a20, keyboard_interrupt
922922};
923923
924static struct ide_interface ide_intf =
924static const struct ide_interface ide_intf =
925925{
926926   ide_interrupt
927927};
928928
929static struct pci_device_info cx5510 =
929static const struct pci_device_info cx5510 =
930930{
931931   cx5510_pci_r,
932932   cx5510_pci_w
src/mame/drivers/ambush.c
r1404r1405
169169GFXDECODE_END
170170
171171
172static struct AY8910interface ay8910_interface_1 =
172static const struct AY8910interface ay8910_interface_1 =
173173{
174174   input_port_0_r
175175};
176176
177static struct AY8910interface ay8910_interface_2 =
177static const struct AY8910interface ay8910_interface_2 =
178178{
179179   input_port_1_r
180180};
src/mame/drivers/policetr.c
r1404r1405
464464 *
465465 *************************************/
466466
467static struct r3000_config config =
467static const struct r3000_config config =
468468{
469469   0,      /* 1 if we have an FPU, 0 otherwise */
470470   4096,   /* code cache size */
src/mame/drivers/seibuspi.c
r1404r1405
11111111   }
11121112}
11131113
1114static struct YMF271interface ymf271_interface =
1114static const struct YMF271interface ymf271_interface =
11151115{
11161116   REGION_SOUND1,
11171117   flashrom_read,
src/mame/drivers/coolpool.c
r1404r1405
646646 *
647647 *************************************/
648648
649static tms34010_config tms_config_amerdart =
649static const tms34010_config tms_config_amerdart =
650650{
651651   FALSE,                     /* halt on reset */
652652   0,                        /* the screen operated on */
r1404r1405
659659};
660660
661661
662static tms34010_config tms_config_coolpool =
662static const tms34010_config tms_config_coolpool =
663663{
664664   FALSE,                     /* halt on reset */
665665   0,                        /* the screen operated on */
src/mame/drivers/gaplus.c
r1404r1405
200200}
201201
202202/* chip #0: player inputs, buttons, coins */
203static struct namcoio_interface intf0 =
203static const struct namcoio_interface intf0 =
204204{
205205   { in1_h, in0_l, in0_h, in1_l },   /* port read handlers */
206206   { NULL, NULL }      /* port write handlers */
207207};
208static struct namcoio_interface intf0_lamps =
208static const struct namcoio_interface intf0_lamps =
209209{
210210   { in1_h, in0_l, in0_h, in1_l },   /* port read handlers */
211211   { out_lamps0, out_lamps1 }      /* port write handlers */
212212};
213213/* chip #1: dip switches */
214static struct namcoio_interface intf1 =
214static const struct namcoio_interface intf1 =
215215{
216216   { dipA_h, dipB_l, dipB_h, dipA_l },   /* port read handlers */
217217   { NULL, NULL }                  /* port write handlers */
r1404r1405
731731   GFXDECODE_ENTRY( REGION_GFX2, 0x0000, spritelayout, 64*4, 64 )
732732GFXDECODE_END
733733
734static struct namco_interface namco_interface =
734static const struct namco_interface namco_interface =
735735{
736736   8,             /* number of voices */
737737   REGION_SOUND1   /* memory region */
src/mame/drivers/midtunit.c
r1404r1405
580580 *
581581 *************************************/
582582
583static tms34010_config tms_config =
583static const tms34010_config tms_config =
584584{
585585   FALSE,                     /* halt on reset */
586586   0,                        /* the screen operated on */
src/mame/drivers/drmicro.c
r1404r1405
219219   GFXDECODE_ENTRY( REGION_GFX2, 0x0000, spritelayout8, 256, 32 ) /* sprites */
220220GFXDECODE_END
221221
222static struct MSM5205interface msm5205_interface =
222static const struct MSM5205interface msm5205_interface =
223223{
224224   pcm_w,         /* IRQ handler */
225225   MSM5205_S64_4B   /* 6 KHz */
src/mame/drivers/vroulet.c
r1404r1405
218218
219219/* Sound Interface */
220220
221static struct AY8910interface ay8910_interface =
221static const struct AY8910interface ay8910_interface =
222222{
223223 input_port_3_r,// DSWA
224224 input_port_4_r,// DSWB
src/mame/drivers/twins.c
r1404r1405
157157INPUT_PORTS_END
158158
159159
160static struct AY8910interface ay8910_interface =
160static const struct AY8910interface ay8910_interface =
161161{
162162   input_port_0_r,
163163   input_port_1_r
src/mame/drivers/system1.c
r1404r1405
334334/* protection values from real hardware, these were verified to be the same on the title
335335   screen and in the first level... they're all jumps that the MCU appears to put in RAM
336336   at some point */
337static int shtngtab[]=
337static const int shtngtab[]=
338338{
339339   0xC3,0xC1,0x39,
340340   0xC3,0x6F,0x0A,
src/mame/drivers/powerins.c
r1404r1405
336336   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
337337}
338338
339static struct YM2203interface ym2203_interface =
339static const struct YM2203interface ym2203_interface =
340340{
341341   0, 0, 0, 0,
342342   irqhandler
src/mame/drivers/niyanpai.c
r1404r1405
839839   cpunum_set_input_line(0, 1, HOLD_LINE);
840840}
841841
842static struct z80_irq_daisy_chain daisy_chain_sound[] =
842static const struct z80_irq_daisy_chain daisy_chain_sound[] =
843843{
844844   { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 },   /* device 0 = CTC_1 */
845845   { 0, 0, 0, 0, -1 }      /* end mark */
src/mame/drivers/bfm_sc2.c
r1404r1405
30313031
30323032INPUT_PORTS_END
30333033
3034 static struct upd7759_interface upd7759_interface =
3034 static const struct upd7759_interface upd7759_interface =
30353035 {
30363036   REGION_SOUND1,      /* memory region */
30373037   0
src/mame/drivers/suprnova.c
r1404r1405
929929
930930/***** MACHINE DRIVER *****/
931931
932static struct YMZ280Binterface ymz280b_intf =
932static const struct YMZ280Binterface ymz280b_intf =
933933{
934934   REGION_SOUND1,
935935   0   // irq ?
src/mame/drivers/seta2.c
r1404r1405
17411741   }
17421742}
17431743
1744static struct x1_010_interface x1_010_sound_intf =
1744static const struct x1_010_interface x1_010_sound_intf =
17451745{
17461746   0x0000,      /* address */
17471747};
src/mame/drivers/witch.c
r1404r1405
413413static READ8_HANDLER(portA_r) {   return readinputportbytag("YM_PortA"); }
414414static READ8_HANDLER(portB_r) {   return readinputportbytag("YM_PortB");}
415415
416static struct YM2203interface ym2203_interface_0 =
416static const struct YM2203interface ym2203_interface_0 =
417417{
418418   portA_r,
419419   portB_r,
r1404r1405
421421   NULL
422422};
423423
424static struct YM2203interface ym2203_interface_1 =
424static const struct YM2203interface ym2203_interface_1 =
425425{
426426   NULL,
427427   NULL,
r1404r1405
655655
656656INPUT_PORTS_END
657657
658static struct ES8712interface es8712_interface =
658static const struct ES8712interface es8712_interface =
659659{
660660   REGION_SOUND1
661661};
src/mame/drivers/flkatck.c
r1404r1405
260260   K007232_set_volume(0,1,0,(v & 0x0f) * 0x11);
261261}
262262
263static struct K007232_interface k007232_interface =
263static const struct K007232_interface k007232_interface =
264264{
265265   REGION_SOUND1,      /* memory region */
266266   volume_callback0   /* external port callback */
src/mame/drivers/dynax.c
r1404r1405
35763576                                Hana no Mai
35773577***************************************************************************/
35783578
3579static struct YM2203interface hanamai_ym2203_interface =
3579static const struct YM2203interface hanamai_ym2203_interface =
35803580{
35813581   input_port_1_r,            /* Port A Read: DSW */
35823582   input_port_0_r,            /* Port B Read: DSW */
r1404r1405
35853585   sprtmtch_sound_callback      /* IRQ handler */
35863586};
35873587
3588static struct MSM5205interface hanamai_msm5205_interface =
3588static const struct MSM5205interface hanamai_msm5205_interface =
35893589{
35903590   adpcm_int,         /* IRQ handler */
35913591   MSM5205_S48_4B      /* 8 KHz, 4 Bits  */
r1404r1405
36423642                                Hana Oriduru
36433643***************************************************************************/
36443644
3645static struct AY8910interface hnoridur_ay8910_interface =
3645static const struct AY8910interface hnoridur_ay8910_interface =
36463646{
36473647   input_port_0_r      /* Port A Read: DSW */
36483648};
r1404r1405
36913691                                Sports Match
36923692***************************************************************************/
36933693
3694static struct YM2203interface sprtmtch_ym2203_interface =
3694static const struct YM2203interface sprtmtch_ym2203_interface =
36953695{
36963696   input_port_3_r,            /* Port A Read: DSW */
36973697   input_port_4_r,            /* Port B Read: DSW */
r1404r1405
38613861
38623862// dual monitor, 2 CPU's, 2 blitters
38633863
3864static struct YM2203interface jantouki_ym2203_interface =
3864static const struct YM2203interface jantouki_ym2203_interface =
38653865{
38663866   0,                     /* Port A Read: DSW */
38673867   0,                     /* Port B Read: DSW */
r1404r1405
38703870   jantouki_sound_callback      /* IRQ handler */
38713871};
38723872
3873static struct MSM5205interface jantouki_msm5205_interface =
3873static const struct MSM5205interface jantouki_msm5205_interface =
38743874{
38753875   adpcm_int_cpu1,         /* IRQ handler */
38763876   MSM5205_S48_4B      /* 8 KHz, 4 Bits  */
r1404r1405
40334033                           Hanafuda Hana Tengoku
40344034***************************************************************************/
40354035
4036static struct AY8910interface htengoku_ay8910_interface =
4036static const struct AY8910interface htengoku_ay8910_interface =
40374037{
40384038   // A            B
40394039   htengoku_dsw_r,   0,               // R
r1404r1405
40914091   }
40924092}
40934093
4094static struct AY8910interface tenkai_ay8910_interface =
4094static const struct AY8910interface tenkai_ay8910_interface =
40954095{
40964096   // A                // B
40974097   tenkai_dsw_r,      0,            // Read
src/mame/drivers/shootout.c
r1404r1405
272272   cpunum_set_input_line(0,0,linestate);
273273}
274274
275static struct YM2203interface ym2203_interface =
275static const struct YM2203interface ym2203_interface =
276276{
277277   0,0,0,0,shootout_snd_irq
278278};
279279
280static struct YM2203interface ym2203_interface2 =
280static const struct YM2203interface ym2203_interface2 =
281281{
282282   0,
283283   0,
src/mame/drivers/zn.c
r1404r1405
103103static const UINT8 kn01[ 8 ] = { 0xf8, 0xe1, 0xe2, 0xfe, 0x3c, 0x30, 0x70, 0x80 }; /* brute forced */
104104static const UINT8 kn02[ 8 ] = { 0x01, 0x18, 0xe2, 0xfe, 0x3c, 0x30, 0x70, 0x80 }; /* brute forced */
105105
106static struct
106static const struct
107107{
108108   const char *s_name;
109109   const UINT8 *p_n_mainsec;
r1404r1405
407407   at28c16_init( 0, memory_region( REGION_USER4 ), NULL );
408408}
409409
410static struct PSXSPUinterface psxspu_interface =
410static const struct PSXSPUinterface psxspu_interface =
411411{
412412   &g_p_n_psxram,
413413   psx_irq_set,
r1404r1405
614614   AM_RANGE(0x00, 0x00) AM_READ(soundlatch_r)
615615ADDRESS_MAP_END
616616
617static struct QSound_interface qsound_interface =
617static const struct QSound_interface qsound_interface =
618618{
619619   REGION_SOUND1
620620};
r1404r1405
13051305   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
13061306}
13071307
1308static struct YM2610interface ym2610_interface =
1308static const struct YM2610interface ym2610_interface =
13091309{
13101310   irq_handler,
13111311   REGION_SOUND1,   /* Delta-T */
r1404r1405
17651765   }
17661766}
17671767
1768static struct ide_interface atpsx_intf =
1768static const struct ide_interface atpsx_intf =
17691769{
17701770   atpsx_interrupt
17711771};
r1404r1405
20602060   AM_RANGE(0x100020, 0xffffff) AM_WRITENOP
20612061ADDRESS_MAP_END
20622062
2063static struct YMF271interface ymf271_interface =
2063static const struct YMF271interface ymf271_interface =
20642064{
20652065   REGION_SOUND1
20662066};
r1404r1405
22842284   }
22852285}
22862286
2287static struct ide_interface jdredd_ide_intf =
2287static const struct ide_interface jdredd_ide_intf =
22882288{
22892289   jdredd_ide_interrupt
22902290};
r1404r1405
29292929   AM_RANGE( 0x91, 0x91 ) AM_READ( cbaj_z80_ready_r )
29302930ADDRESS_MAP_END
29312931
2932static struct YMZ280Binterface ymz280b_intf =
2932static const struct YMZ280Binterface ymz280b_intf =
29332933{
29342934   REGION_SOUND1,
29352935   0
src/mame/drivers/volfied.c
r1404r1405
240240   cpunum_set_input_line(1, 0, irq ? ASSERT_LINE : CLEAR_LINE);
241241}
242242
243static struct YM2203interface ym2203_interface =
243static const struct YM2203interface ym2203_interface =
244244{
245245   input_port_0_r,    /* DSW A */
246246   input_port_1_r,    /* DSW B */
src/mame/drivers/frogger.c
r1404r1405
223223   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
224224INPUT_PORTS_END
225225
226static struct AY8910interface frogger_ay8910_interface =
226static const struct AY8910interface frogger_ay8910_interface =
227227{
228228   soundlatch_r,
229229   frogger_portB_r
src/mame/drivers/balsente.c
r1404r1405
16501650 *
16511651 *************************************/
16521652
1653static struct cem3394_interface cem_interface =
1653static const struct cem3394_interface cem_interface =
16541654{
16551655   431.894,
16561656   1300.0,
src/mame/drivers/megadriv.c
r1404r1405
11481148          (megadrive_region_pal<<0); // PAL MODE FLAG checked by striker for region prot..
11491149}
11501150
1151static UINT8 vc_ntsc_224[] =
1151static const UINT8 vc_ntsc_224[] =
11521152{
11531153    0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a,    0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
11541154    0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a,    0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
r1404r1405
11691169    0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
11701170};
11711171
1172static UINT8 vc_ntsc_240[] =
1172static const UINT8 vc_ntsc_240[] =
11731173{
11741174    0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
11751175    0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
r1404r1405
11901190    0x00, 0x01, 0x02, 0x03, 0x04, 0x05
11911191};
11921192
1193static UINT8 vc_pal_224[] =
1193static const UINT8 vc_pal_224[] =
11941194{
11951195    0x00, 0x01, 0x02,    0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
11961196    0x10, 0x11, 0x12,    0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
r1404r1405
12141214    0xf7, 0xf8, 0xf9,    0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
12151215};
12161216
1217static UINT8 vc_pal_240[] =
1217static const UINT8 vc_pal_240[] =
12181218{
12191219    0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a,    0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
12201220    0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a,    0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
src/mame/drivers/galpani3.c
r1404r1405
363363ADDRESS_MAP_END
364364
365365
366static struct YMZ280Binterface ymz280b_intf =
366static const struct YMZ280Binterface ymz280b_intf =
367367{
368368   REGION_SOUND1,
369369   0   // irq ?
src/mame/drivers/itech32.c
r1404r1405
640640}
641641
642642
643static struct via6522_interface via_interface =
643static const struct via6522_interface via_interface =
644644{
645645   /*inputs : A/B         */ 0, 0,
646646   /*inputs : CA/B1,CA/B2 */ 0, 0, 0, 0,
r1404r1405
650650};
651651
652652
653static struct via6522_interface drivedge_via_interface =
653static const struct via6522_interface drivedge_via_interface =
654654{
655655   /*inputs : A/B         */ 0, 0,
656656   /*inputs : CA/B1,CA/B2 */ 0, 0, 0, 0,
r1404r1405
14841484 *
14851485 *************************************/
14861486
1487static struct ES5506interface es5506_interface =
1487static const struct ES5506interface es5506_interface =
14881488{
14891489   REGION_SOUND1,
14901490   REGION_SOUND2,
src/mame/drivers/mexico86.c
r1404r1405
369369
370370
371371
372static struct YM2203interface ym2203_interface =
372static const struct YM2203interface ym2203_interface =
373373{
374374   input_port_3_r,
375375   input_port_4_r
src/mame/drivers/chaknpop.c
r1404r1405
106106   AM_RANGE(0xc000, 0xffff) AM_WRITE(MWA8_BANK1)         // bitmap plane 1-4
107107ADDRESS_MAP_END
108108
109static struct AY8910interface ay8910_interface_1 =
109static const struct AY8910interface ay8910_interface_1 =
110110{
111111   input_port_5_r,      // DSW A
112112   input_port_4_r      // DSW B
113113};
114114
115static struct AY8910interface ay8910_interface_2 =
115static const struct AY8910interface ay8910_interface_2 =
116116{
117117   0,
118118   0,
src/mame/drivers/filetto.c
r1404r1405
390390   //  pic8259_0_issue_irq(0);
391391}
392392
393static struct pit8253_config pc_pit8253_config =
393static const struct pit8253_config pc_pit8253_config =
394394{
395395   TYPE8253,
396396   {
src/mame/drivers/ashnojoe.c
r1404r1405
330330   cpunum_set_input_line(1, INPUT_LINE_NMI, PULSE_LINE);
331331}
332332
333static struct MSM5205interface msm5205_interface =
333static const struct MSM5205interface msm5205_interface =
334334{
335335   ashnojoe_adpcm_int,   /* interrupt function */
336336   MSM5205_S48_4B      /* 4KHz 4-bit */
337337};
338338
339static struct YM2203interface ym2203_interface =
339static const struct YM2203interface ym2203_interface =
340340{
341341   0,
342342   0,
src/mame/drivers/findout.c
r1404r1405
178178   if (data == 0) signature_pos = 0;
179179   else
180180   {
181      static UINT8 signature[8] = { 0xff, 0x01, 0xfd, 0x05, 0xf5, 0x15, 0xd5, 0x55 };
181      static const UINT8 signature[8] = { 0xff, 0x01, 0xfd, 0x05, 0xf5, 0x15, 0xd5, 0x55 };
182182
183183      signature_answer = signature[signature_pos++];
184184
src/mame/drivers/deco32.c
r1404r1405
17981798   OKIM6295_set_bank_base(1, ((data >> 1)& 1) * 0x40000);
17991799}
18001800
1801static struct YM2151interface ym2151_interface =
1801static const struct YM2151interface ym2151_interface =
18021802{
18031803   sound_irq,
18041804   sound_bankswitch_w
18051805};
18061806
1807static struct YM2151interface ym2151_interface_nslasher =
1807static const struct YM2151interface ym2151_interface_nslasher =
18081808{
18091809   sound_irq_nslasher,
18101810   sound_bankswitch_w
src/mame/drivers/vertigo.c
r1404r1405
107107 *
108108 *************************************/
109109
110static struct CustomSound_interface custom_interface =
110static const struct CustomSound_interface custom_interface =
111111{
112112   exidy440_sh_start,
113113   exidy440_sh_stop
src/mame/drivers/midzeus.c
r1404r1405
2525
2626#define CPU_CLOCK      60000000
2727
28#define BEAM_DY         3
29#define BEAM_DX         3
30#define BEAM_XOFFS      20      /* table in the code indicates an offset of 20 with a beam height of 7 */
2831
32static UINT32          gun_control;
33static UINT8          gun_irq_state;
34static emu_timer *      gun_timer[2];
35static INT32          gun_x[2], gun_y[2];
36
2937static UINT32 *ram_base;
3038static UINT8 cmos_protected;
3139
r1404r1405
3442static UINT32 *tms32031_control;
3543
3644
45static TIMER_CALLBACK( invasn_gun_callback );
3746
47
48
3849/*************************************
3950 *
4051 *  Machine init
r1404r1405
4960
5061   timer[0] = timer_alloc(NULL, NULL);
5162   timer[1] = timer_alloc(NULL, NULL);
63
64   gun_timer[0] = timer_alloc(invasn_gun_callback, NULL);
65   gun_timer[1] = timer_alloc(invasn_gun_callback, NULL);
5266}
5367
5468
r1404r1405
124138}
125139
126140
141/*************************************
142 *
143 *  Lightgun handling
144 *
145 *************************************/
127146
147static void update_gun_irq(void)
148{
149   if (gun_irq_state & gun_control & 0x03)
150      cpunum_set_input_line(0, 3, ASSERT_LINE);
151   else
152      cpunum_set_input_line(0, 3, CLEAR_LINE);
153}
154
155
156static TIMER_CALLBACK( invasn_gun_callback )
157{
158   int player = param;
159   int beamy = video_screen_get_vpos(0);
160
161   gun_irq_state |= 0x01 << player;
162   update_gun_irq();
163
164   beamy++;
165   if (beamy <= machine->screen[0].visarea.max_y && beamy <= gun_y[player] + BEAM_DY)
166      timer_adjust(gun_timer[player], video_screen_get_time_until_pos(0, beamy, MAX(0, gun_x[player] - BEAM_DX)), player, attotime_never);
167}
168
169
170static WRITE32_HANDLER( invasn_gun_w )
171{
172   UINT32 old_control = gun_control;
173   int player;
174
175   COMBINE_DATA(&gun_control);
176
177   /* bits 0-1 enable IRQs (?) */
178   /* bits 2-3 reset IRQ states */
179   gun_irq_state &= ~((gun_control >> 2) & 3);
180   update_gun_irq();
181
182   for (player = 0; player < 2; player++)
183   {
184      UINT8 pmask = 0x04 << player;
185      if (((old_control ^ gun_control) & pmask) != 0 && (gun_control & pmask) == 0)
186      {
187         const rectangle *visarea = &Machine->screen[0].visarea;
188         static const char *names[2][2] =
189         {
190            { "GUNX1", "GUNY1" },
191            { "GUNX2", "GUNY2" }
192         };
193         gun_x[player] = readinputportbytag(names[player][0]) * (visarea->max_x + 1 - visarea->min_x) / 255 + visarea->min_x + BEAM_XOFFS;
194         gun_y[player] = readinputportbytag(names[player][1]) * (visarea->max_y + 1 - visarea->min_y) / 255 + visarea->min_y;
195         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);
196      }
197   }
198}
199
200static READ32_HANDLER( invasn_gun_r )
201{
202   int beamx = video_screen_get_hpos(0);
203   int beamy = video_screen_get_vpos(0);
204   UINT32 result = 0xffff;
205   int player;
206
207   for (player = 0; player < 2; player++)
208   {
209      int diffx = beamx - gun_x[player];
210      int diffy = beamy - gun_y[player];
211      if (diffx >= -BEAM_DX && diffx <= BEAM_DX && diffy >= -BEAM_DY && diffy <= BEAM_DY)
212         result ^= 0x1000 << player;
213   }
214   return result;
215}
216
217
128218/*************************************
129219 *
130220 *  Memory maps
r1404r1405
155245   AM_RANGE(0x880000, 0x8803ff) AM_READWRITE(zeus_r, zeus_w) AM_BASE(&zeusbase)
156246   AM_RANGE(0x8d0000, 0x8d0003) AM_READWRITE(unknown_8d0000_r, unknown_8d0000_w) AM_BASE(&unknown_8d0000)
157247   AM_RANGE(0x990000, 0x99000f) AM_READWRITE(midway_ioasic_r, midway_ioasic_w)
158//9d0000 -- page select?
159248   AM_RANGE(0x9e0000, 0x9e0000) AM_WRITENOP      // watchdog?
160249   AM_RANGE(0x9f0000, 0x9f7fff) AM_READWRITE(cmos_r, cmos_w) AM_BASE(&generic_nvram32) AM_SIZE(&generic_nvram_size)
161250   AM_RANGE(0x9f8000, 0x9f8000) AM_WRITE(cmos_protect_w)
r1404r1405
171260   AM_RANGE(0x880000, 0x8801ff) AM_READWRITE(zeus2_r, zeus2_w) AM_BASE(&zeusbase)
172261   AM_RANGE(0x8d0000, 0x8d0003) AM_READWRITE(unknown_8d0000_r, unknown_8d0000_w) AM_BASE(&unknown_8d0000)
173262   AM_RANGE(0x990000, 0x99000f) AM_READWRITE(midway_ioasic_r, midway_ioasic_w)
174//9d0000 -- page select?
175263   AM_RANGE(0x9e0000, 0x9e0000) AM_WRITENOP      // watchdog?
176264   AM_RANGE(0x9f0000, 0x9f7fff) AM_READWRITE(cmos_r, cmos_w) AM_BASE(&generic_nvram32) AM_SIZE(&generic_nvram_size)
177265   AM_RANGE(0x9f8000, 0x9f8000) AM_WRITE(cmos_protect_w)
r1404r1405
364452   PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BILL1 )   /* Bill */
365453
366454   PORT_START
367   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    ) PORT_PLAYER(1) PORT_8WAY
368   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  ) PORT_PLAYER(1) PORT_8WAY
369   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  ) PORT_PLAYER(1) PORT_8WAY
370   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_8WAY
371   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
372   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
373   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
374   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED )
375   PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    ) PORT_PLAYER(2) PORT_8WAY
376   PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  ) PORT_PLAYER(2) PORT_8WAY
377   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  ) PORT_PLAYER(2) PORT_8WAY
378   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_8WAY
379   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
380   PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
381   PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
382   PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
455   PORT_BIT( 0x000f, IP_ACTIVE_LOW, IPT_UNUSED )
456   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
457   PORT_BIT( 0x00e0, IP_ACTIVE_LOW, IPT_UNUSED )
458   PORT_BIT( 0x0f00, IP_ACTIVE_LOW, IPT_UNUSED )
459   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
460   PORT_BIT( 0xe000, IP_ACTIVE_LOW, IPT_UNUSED )
383461
384462   PORT_START
385   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1)
386   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
387   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1)
388   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED )
389   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2)
390   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
391   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2)
392   PORT_BIT( 0xff80, IP_ACTIVE_LOW, IPT_UNUSED )
463   PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )
464
465   PORT_START_TAG("GUNX1")      /* fake analog X */
466   PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(10)
467
468   PORT_START_TAG("GUNY1")      /* fake analog Y */
469   PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(70) PORT_KEYDELTA(10)
470
471   PORT_START_TAG("GUNX2")      /* fake analog X */
472   PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_PLAYER(2)
473
474   PORT_START_TAG("GUNY2")      /* fake analog Y */
475   PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(70) PORT_KEYDELTA(10) PORT_PLAYER(2)
393476INPUT_PORTS_END
394477
395478
r1404r1405
782865}
783866
784867
785static READ32_HANDLER( gun_r )
786{
787   return ~0;
788}
789868static DRIVER_INIT( invasn )
790869{
791870   dcs2_init(0, 0);
792   midway_ioasic_init(MIDWAY_IOASIC_STANDARD, 461/* unknown */, 94, NULL);
793   memory_install_read32_handler(0, ADDRESS_SPACE_PROGRAM, 0x9c0000, 0x9c0000, 0, 0, gun_r);
871   midway_ioasic_init(MIDWAY_IOASIC_STANDARD, 468/* or 488 */, 94, NULL);
872   memory_install_readwrite32_handler(0, ADDRESS_SPACE_PROGRAM, 0x9c0000, 0x9c0000, 0, 0, invasn_gun_r, invasn_gun_w);
794873}
795874
796875
r1404r1405
816895 *
817896 *************************************/
818897
819GAME( 1997, mk4,      0,     midzeus,  mk4,      mk4,      ROT0, "Midway", "Mortal Kombat 4 (3.0)", GAME_NOT_WORKING | GAME_NO_SOUND )
820GAME( 1997, mk4a,     mk4,   midzeus,  mk4,      mk4,      ROT0, "Midway", "Mortal Kombat 4 (2.1)", GAME_NOT_WORKING | GAME_NO_SOUND )
821GAME( 1999, invasn,   0,     midzeus,  invasn,   invasn,   ROT0, "Midway", "Invasion (Midway)", GAME_NOT_WORKING | GAME_NO_SOUND )
822GAME( 1999, crusnexo, 0,     midzeus2, crusnexo, crusnexo, ROT0, "Midway", "Cruis'n Exotica", GAME_NOT_WORKING | GAME_NO_SOUND )
823GAME( 2001, thegrid,  0,     midzeus2, thegrid,  thegrid,  ROT0, "Midway", "The Grid (version 1.1)", GAME_NOT_WORKING | GAME_NO_SOUND )
898GAME( 1997, mk4,      0,     midzeus,  mk4,      mk4,      ROT0, "Midway", "Mortal Kombat 4 (3.0)", GAME_IMPERFECT_GRAPHICS )
899GAME( 1997, mk4a,     mk4,   midzeus,  mk4,      mk4,      ROT0, "Midway", "Mortal Kombat 4 (2.1)", GAME_IMPERFECT_GRAPHICS )
900GAME( 1999, invasn,   0,     midzeus,  invasn,   invasn,   ROT0, "Midway", "Invasion (Midway)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS )
901GAME( 1999, crusnexo, 0,     midzeus2, crusnexo, crusnexo, ROT0, "Midway", "Cruis'n Exotica", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_NO_SOUND )
902GAME( 2001, thegrid,  0,     midzeus2, thegrid,  thegrid,  ROT0, "Midway", "The Grid (version 1.1)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_NO_SOUND )
src/mame/drivers/grchamp.c
r1404r1405
451451 *
452452 *************************************/
453453
454static struct AY8910interface ay8910_interface_1 =
454static const struct AY8910interface ay8910_interface_1 =
455455{
456456   0,
457457   0,
r1404r1405
459459   grchamp_portB_0_w
460460};
461461
462static struct AY8910interface ay8910_interface_3 =
462static const struct AY8910interface ay8910_interface_3 =
463463{
464464   0,
465465   0,
src/mame/drivers/argus.c
r1404r1405
171171   cpunum_set_input_line(1, 0, irq ? ASSERT_LINE : CLEAR_LINE);
172172}
173173
174static struct YM2203interface ym2203_interface =
174static const struct YM2203interface ym2203_interface =
175175{
176176   0,
177177   0,
src/mame/drivers/lkage.c
r1404r1405
313313   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
314314}
315315
316static struct YM2203interface ym2203_interface =
316static const struct YM2203interface ym2203_interface =
317317{
318318   0,
319319   0,
src/mame/drivers/superdq.c
r1404r1405
175175static WRITE8_HANDLER( superdq_io_w )
176176{
177177   int          i;
178   static UINT8   black_color_entries[] = {7,15,16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};
178   static const UINT8 black_color_entries[] = {7,15,16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};
179179
180180   if ( data & 0x40 ) /* bit 6 = irqack */
181181      cpunum_set_input_line(0, 0, CLEAR_LINE);
src/mame/drivers/gaiden.c
r1404r1405
189189   if (ACCESSING_MSB)
190190   {
191191      static int jumpcode;
192      static int jumppoints[] =
192      static const int jumppoints[] =
193193      {
194194         0x0c0c,0x0cac,0x0d42,0x0da2,0x0eea,0x112e,0x1300,0x13fa,
195195         0x159a,0x1630,0x109a,0x1700,0x1750,0x1806,0x18d6,0x1a44,
r1404r1405
286286*/
287287
288288/* these are used during startup */
289static int jumppoints_00[0x100] =
289static const int jumppoints_00[0x100] =
290290{
291291   0x6669,      -1,    -1,    -1,    -1,    -1,    -1,    -1,
292292       -1,    -1,    -1,    -1,    -1,    -1,0x4a46,    -1,
r1404r1405
299299};
300300
301301/* these are used the rest of the time */
302static int jumppoints_other[0x100] =
302static const int jumppoints_other[0x100] =
303303{
304304   0x5457,0x494e,0x5f4b,0x4149,0x5345,0x525f,0x4d49,0x5941,
305305   0x5241,0x5349,0x4d4f,0x4a49,    -1,    -1,    -1,    -1,
r1404r1405
311311       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1
312312};
313313
314static int *raiga_jumppoints = jumppoints_00;
314static const int *raiga_jumppoints = jumppoints_00;
315315
316316static MACHINE_RESET ( raiga )
317317{
r1404r1405
954954   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
955955}
956956
957static struct YM2203interface ym2203_interface =
957static const struct YM2203interface ym2203_interface =
958958{
959959   0,0,0,0,irqhandler
960960};
src/mame/drivers/zaxxon.c
r1404r1405
416416
417417static UINT32 razmataz_dial_r(void *param)
418418{
419   static const char *dialname[2] = { "DIAL0", "DIAL1" };
419   static const char *const dialname[2] = { "DIAL0", "DIAL1" };
420420   int num = (FPTR)param;
421421   int delta, res;
422422
src/mame/drivers/aleck64.c
r1404r1405
408408INPUT_PORTS_END
409409
410410/* ?? */
411static struct mips3_config config =
411static const struct mips3_config config =
412412{
413413   16384,            /* code cache size */
414414   8192,            /* data cache size */
src/mame/drivers/trackfld.c
r1404r1405
844844GFXDECODE_END
845845
846846
847static struct VLM5030interface trackfld_vlm5030_interface =
847static const struct VLM5030interface trackfld_vlm5030_interface =
848848{
849849   REGION_SOUND1,   /* memory region  */
850850   0           /* memory size    */
851851};
852852
853static struct MSM5205interface msm5205_interface =
853static const struct MSM5205interface msm5205_interface =
854854{
855855   NULL,            /* VCK function */
856856   MSM5205_S48_4B      /* 8 kHz */
src/mame/drivers/karnov.c
r1404r1405
671671   cpunum_set_input_line(1,0,linestate); /* IRQ */
672672}
673673
674static struct YM3526interface ym3526_interface =
674static const struct YM3526interface ym3526_interface =
675675{
676676   sound_irq
677677};
src/mame/drivers/lwings.c
r1404r1405
844844   GFXDECODE_ENTRY( REGION_GFX4, 0, bg2_tilelayout,   0,  8 ) /* colors   0-127 */
845845GFXDECODE_END
846846
847static struct MSM5205interface msm5205_interface =
847static const struct MSM5205interface msm5205_interface =
848848{
849849   0,            /* interrupt function */
850850   MSM5205_SEX_4B   /* slave mode */
src/mame/drivers/xtheball.c
r1404r1405
333333 *
334334 *************************************/
335335
336static tms34010_config tms_config =
336static const tms34010_config tms_config =
337337{
338338   FALSE,                     /* halt on reset */
339339   0,                        /* the screen operated on */
src/mame/drivers/maxaflex.c
r1404r1405
422422}
423423
424424
425static struct POKEYinterface pokey_interface = {
425static const struct POKEYinterface pokey_interface = {
426426   { 0 },
427427   0,
428428   0,0,
src/mame/drivers/punchout.c
r1404r1405
764764
765765
766766
767static struct NESinterface nes_interface =
767static const struct NESinterface nes_interface =
768768{
769769   REGION_CPU2
770770};
771771
772772
773static struct VLM5030interface vlm5030_interface =
773static const struct VLM5030interface vlm5030_interface =
774774{
775775   REGION_SOUND1,   /* memory region of speech rom */
776776   0           /* memory size of speech rom */
src/mame/drivers/vegas.c
r1404r1405
12721272   update_nile_irqs();
12731273}
12741274
1275static struct ide_interface ide_intf =
1275static const struct ide_interface ide_intf =
12761276{
12771277   ide_interrupt
12781278};
r1404r1405
22032203 *
22042204 *************************************/
22052205
2206static struct mips3_config config =
2206static const struct mips3_config config =
22072207{
22082208   16384,         /* code cache size */
22092209   16384,         /* data cache size */
r1404r1405
24402440
24412441static void init_common(int ioasic, int serialnum)
24422442{
2443   static struct smc91c9x_interface ethernet_intf =
2443   static const struct smc91c9x_interface ethernet_intf =
24442444   {
24452445      ethernet_interrupt
24462446   };
src/mame/drivers/tecmo.c
r1404r1405
549549   cpunum_set_input_line(1,0,linestate);
550550}
551551
552static struct YM3526interface ym3812_interface =
552static const struct YM3526interface ym3812_interface =
553553{
554554   irqhandler
555555};
556556
557static struct MSM5205interface msm5205_interface =
557static const struct MSM5205interface msm5205_interface =
558558{
559559   tecmo_adpcm_int,   /* interrupt function */
560560   MSM5205_S48_4B      /* 8KHz               */
src/mame/drivers/segaybd.c
r1404r1405
354354
355355static WRITE16_HANDLER( analog_w )
356356{
357   static const char *ports[] = { "ADC0", "ADC1", "ADC2", "ADC3", "ADC4", "ADC5", "ADC6" };
357   static const char *const ports[] = { "ADC0", "ADC1", "ADC2", "ADC3", "ADC4", "ADC5", "ADC6" };
358358   int selected = ((offset & 3) == 3) ? (3 + (misc_io_data[0x08/2] & 3)) : (offset & 3);
359359   int value = readinputportbytag_safe(ports[selected], 0xff);
360360   analog_data[offset & 3] = value;
r1404r1405
933933 *
934934 *************************************/
935935
936static struct YM2151interface ym2151_interface =
936static const struct YM2151interface ym2151_interface =
937937{
938938   sound_cpu_irq
939939};
940940
941941
942static struct SEGAPCMinterface segapcm_interface =
942static const struct SEGAPCMinterface segapcm_interface =
943943{
944944   BANK_12M | BANK_MASKF8,
945945   REGION_SOUND1
src/mame/drivers/enigma2.c
r1404r1405
392392
393393
394394
395static struct AY8910interface ay8910_interface =
395static const struct AY8910interface ay8910_interface =
396396{
397397   sound_latch_r,
398398   0,
src/mame/drivers/cowrace.c
r1404r1405
149149   PORT_START   // IN0
150150INPUT_PORTS_END
151151
152static struct YM2203interface ym2203_interface_1 =
152static const struct YM2203interface ym2203_interface_1 =
153153{
154154   soundlatch_r,   OKIM6295_status_0_r,   // read  A,B
155155   0,            OKIM6295_data_0_w,      // write A,B
src/mame/drivers/segaorun.c
r1404r1405
391391
392392      case 0x30/2:
393393      {
394         static const char *ports[] = { "ADC0", "ADC1", "ADC2", "ADC3", "ADC4", "ADC5", "ADC6", "ADC7" };
394         static const char *const ports[] = { "ADC0", "ADC1", "ADC2", "ADC3", "ADC4", "ADC5", "ADC6", "ADC7" };
395395         return readinputportbytag_safe(ports[adc_select], 0x0010);
396396      }
397397
r1404r1405
454454
455455      case 0x3020/2:
456456      {
457         static const char *ports[] = { "ADC0", "ADC1", "ADC2", "ADC3" };
457         static const char *const ports[] = { "ADC0", "ADC1", "ADC2", "ADC3" };
458458         return readinputportbytag_safe(ports[adc_select], 0x0010);
459459      }
460460   }
r1404r1405
772772 *
773773 *************************************/
774774
775static struct SEGAPCMinterface segapcm_interface =
775static const struct SEGAPCMinterface segapcm_interface =
776776{
777777   BANK_512,
778778   REGION_SOUND1
src/mame/drivers/koikoi.c
r1404r1405
238238GFXDECODE_END
239239
240240
241static struct AY8910interface ay8910_interface =
241static const struct AY8910interface ay8910_interface =
242242{
243243   0,             input_r,
244244   unknown_w, 0
src/mame/drivers/hexa.c
r1404r1405
121121
122122
123123
124static struct AY8910interface ay8910_interface =
124static const struct AY8910interface ay8910_interface =
125125{
126126   input_port_0_r,
127127   input_port_1_r,
src/mame/drivers/gticlub.c
r1404r1405
728728}
729729
730730
731static ppc_config gticlub_ppc_cfg =
731static const ppc_config gticlub_ppc_cfg =
732732{
733733   PPC_MODEL_403GA
734734};
735735
736static sharc_config sharc_cfg =
736static const sharc_config sharc_cfg =
737737{
738738   BOOT_MODE_EPROM
739739};
740740
741static struct RF5C400interface rf5c400_interface =
741static const struct RF5C400interface rf5c400_interface =
742742{
743743   REGION_SOUND1
744744};
src/mame/drivers/cloak.c
r1404r1405
311311 *
312312 *************************************/
313313
314static struct POKEYinterface pokey_interface_1 =
314static const struct POKEYinterface pokey_interface_1 =
315315{
316316   { 0 },
317317   input_port_3_r
318318};
319319
320static struct POKEYinterface pokey_interface_2 =
320static const struct POKEYinterface pokey_interface_2 =
321321{
322322   { 0 },
323323   input_port_4_r
src/mame/drivers/mazerbla.c
r1404r1405
14681468
14691469
14701470/* only Great Guns */
1471static struct AY8910interface ay8912_interface_1 =
1471static const struct AY8910interface ay8912_interface_1 =
14721472{
14731473   0,
14741474   soundcommand_r
14751475};
14761476
1477static struct AY8910interface ay8912_interface_2 =
1477static const struct AY8910interface ay8912_interface_2 =
14781478{
14791479   0,
14801480   0,
src/mame/drivers/foodf.c
r1404r1405
356356   return (readinputport(5) >> offset) << 7;
357357}
358358
359static struct POKEYinterface pokey_interface =
359static const struct POKEYinterface pokey_interface =
360360{
361361   { pot_r,pot_r,pot_r,pot_r,pot_r,pot_r,pot_r,pot_r }
362362};
src/mame/drivers/namcona1.c
r1404r1405
12891289// bit 7 => port 7
12901290static READ8_HANDLER( portana_r )
12911291{
1292   static UINT8 bitnum[8] = { 0x40, 0x20, 0x10, 0x01, 0x02, 0x04, 0x08, 0x80 };
1292   static const UINT8 bitnum[8] = { 0x40, 0x20, 0x10, 0x01, 0x02, 0x04, 0x08, 0x80 };
12931293   UINT8 port = readinputport(2);
12941294
12951295   return (port & bitnum[offset>>1]) ? 0xff : 0x00;
r1404r1405
13341334   }
13351335}
13361336
1337static struct C140interface C140_interface_typeA =
1337static const struct C140interface C140_interface_typeA =
13381338{
13391339   C140_TYPE_ASIC219,
13401340   0
src/mame/drivers/dkong.c
r1404r1405
230230 *
231231 *************************************/
232232
233static struct dma8257_interface dk_dma =
233static const struct dma8257_interface dk_dma =
234234{
235235   0,
236236   CLOCK_1H,
r1404r1405
243243   { 0, 0, 0, 0 }
244244};
245245
246static struct dma8257_interface hb_dma =
246static const struct dma8257_interface hb_dma =
247247{
248248   0,
249249   CLOCK_1H,
src/mame/drivers/appoooh.c
r1404r1405
216216
217217
218218
219static struct MSM5205interface msm5205_interface =
219static const struct MSM5205interface msm5205_interface =
220220{
221221   appoooh_adpcm_int,/* interrupt function */
222222   MSM5205_S64_4B   /* 6KHz               */
src/mame/drivers/hanaroku.c
r1404r1405
228228GFXDECODE_END
229229
230230
231static struct AY8910interface ay8910_interface =
231static const struct AY8910interface ay8910_interface =
232232{
233233   input_port_3_r,
234234   input_port_4_r
src/mame/drivers/metlclsh.c
r1404r1405
291291   cpunum_set_input_line(0,M6809_IRQ_LINE,linestate);
292292}
293293
294static struct YM3526interface ym3526_interface =
294static const struct YM3526interface ym3526_interface =
295295{
296296   metlclsh_irqhandler
297297};
src/mame/drivers/aliens.c
r1404r1405
245245   K007232_set_volume(0,1,0,(v >> 4) * 0x11);
246246}
247247
248static struct K007232_interface k007232_interface =
248static const struct K007232_interface k007232_interface =
249249{
250250   REGION_SOUND1,   /* memory regions */
251251   volume_callback   /* external port callback */
252252};
253253
254static struct YM2151interface ym2151_interface =
254static const struct YM2151interface ym2151_interface =
255255{
256256   0,
257257   aliens_snd_bankswitch_w
src/mame/drivers/88games.c
r1404r1405
7575{
7676   int res;
7777   static int cheat = 0;
78   static int bits[] = { 0xee, 0xff, 0xbb, 0xaa };
78   static const int bits[] = { 0xee, 0xff, 0xbb, 0xaa };
7979
8080   res = readinputportbytag("IN1");
8181
r1404r1405
9393{
9494   int res;
9595   static int cheat = 0;
96   static int bits[] = { 0xee, 0xff, 0xbb, 0xaa };
96   static const int bits[] = { 0xee, 0xff, 0xbb, 0xaa };
9797
9898   res = readinputportbytag("IN2");
9999
r1404r1405
275275
276276
277277
278static struct upd7759_interface upd7759_interface_1 =
278static const struct upd7759_interface upd7759_interface_1 =
279279{
280280   REGION_SOUND1   /* memory region */
281281};
282282
283static struct upd7759_interface upd7759_interface_2 =
283static const struct upd7759_interface upd7759_interface_2 =
284284{
285285   REGION_SOUND2   /* memory region */
286286};
src/mame/drivers/ddenlovr.c
r1404r1405
65696569MACHINE_DRIVER_END
65706570
65716571
6572static struct AY8910interface quiz365_ay8910_interface =
6572static const struct AY8910interface quiz365_ay8910_interface =
65736573{
65746574   quiz365_input_r,
65756575   0,
r1404r1405
69096909   cpunum_set_input_line(0, INPUT_LINE_NMI, PULSE_LINE);
69106910}
69116911
6912static struct AY8910interface mjmyster_ay8910_interface =
6912static const struct AY8910interface mjmyster_ay8910_interface =
69136913{
69146914   0,
69156915   0,
r1404r1405
69576957      cpunum_set_input_line_and_vector(0, 0, HOLD_LINE, 0xf8);
69586958}
69596959
6960static struct AY8910interface hginga_ay8910_interface =
6960static const struct AY8910interface hginga_ay8910_interface =
69616961{
69626962   // A            B
69636963   hginga_dsw_r,   0,               // R
src/mame/drivers/chinagat.c
r1404r1405
460460   cpunum_set_input_line( 2, 0, irq ? ASSERT_LINE : CLEAR_LINE );
461461}
462462
463static struct YM2151interface ym2151_interface =
463static const struct YM2151interface ym2151_interface =
464464{
465465   chinagat_irq_handler
466466};
467467
468468
469469/* This on the bootleg board, instead of the m6295 */
470static struct MSM5205interface msm5205_interface =
470static const struct MSM5205interface msm5205_interface =
471471{
472472   saiyugb1_m5205_irq_w,   /* Interrupt function */
473473   MSM5205_S64_4B         /* vclk input mode (6030Hz, 4-bit) */
r1404r1405
480480}
481481
482482/* This is only on the second bootleg board */
483static struct YM2203interface ym2203_interface =
483static const struct YM2203interface ym2203_interface =
484484{
485485   0,
486486   0,
src/mame/drivers/kaneko16.c
r1404r1405
17561756   }
17571757}
17581758
1759static struct AY8910interface ay8910_intf_dsw =
1759static const struct AY8910interface ay8910_intf_dsw =
17601760{
17611761   input_port_4_r,   /* input A: DSW 1 */
17621762   input_port_5_r   /* input B: DSW 2 */
17631763};
17641764
1765static struct AY8910interface ay8910_intf_eeprom =
1765static const struct AY8910interface ay8910_intf_eeprom =
17661766{
17671767   kaneko16_eeprom_r,      /* inputs  A:  0,EEPROM bit read */
17681768   0,                  /* inputs  B */
src/mame/drivers/goldstar.c
r1404r1405
5050
5151static READ8_HANDLER( protection_r )
5252{
53   static int data[4] = { 0x47, 0x4f, 0x4c, 0x44 };
53   static const int data[4] = { 0x47, 0x4f, 0x4c, 0x44 };
5454
5555   dataoffset %= 4;
5656   return data[dataoffset++];
r1404r1405
277277
278278
279279
280static struct AY8910interface ay8910_interface =
280static const struct AY8910interface ay8910_interface =
281281{
282282 input_port_7_r,   /* DSW 4 */
283283 input_port_6_r,   /* DSW 3 */
src/mame/drivers/dbz.c
r1404r1405
406406
407407/**********************************************************************************/
408408
409static struct YM2151interface ym2151_interface =
409static const struct YM2151interface ym2151_interface =
410410{
411411   dbz_sound_irq
412412};
src/mame/drivers/cybertnk.c
r1404r1405
556556   }
557557}
558558
559static struct Y8950interface y8950_interface = {
559static const struct Y8950interface y8950_interface = {
560560   0, /* TODO */
561561   REGION_SOUND1   /* memory region */
562562};
src/mame/drivers/wc90.c
r1404r1405
336336   cpunum_set_input_line(2,0,irq ? ASSERT_LINE : CLEAR_LINE);
337337}
338338
339static struct YM2608interface ym2608_interface =
339static const struct YM2608interface ym2608_interface =
340340{
341341   0,0,0,0,irqhandler,
342342   REGION_SOUND1
src/mame/drivers/ms32.c
r1404r1405
13701370   AM_RANGE(0x8000, 0xffff) AM_WRITE(MWA8_ROM)
13711371ADDRESS_MAP_END
13721372
1373static struct YMF271interface ymf271_interface =
1373static const struct YMF271interface ymf271_interface =
13741374{
13751375   REGION_SOUND1
13761376};
src/mame/drivers/skylncr.c
r1404r1405
409409
410410INPUT_PORTS_END
411411
412static struct AY8910interface ay8910_interface =
412static const struct AY8910interface ay8910_interface =
413413{
414414   input_port_6_r,   input_port_7_r,
415415   0,            0
src/mame/drivers/darkseal.c
r1404r1405
278278   cpunum_set_input_line(1,1,state); /* IRQ 2 */
279279}
280280
281static struct YM2151interface ym2151_interface =
281static const struct YM2151interface ym2151_interface =
282282{
283283   sound_irq
284284};
src/mame/drivers/20pacgal.c
r1404r1405
226226   GFXDECODE_ENTRY( 0, 0, spritelayout, 0, 64 )
227227GFXDECODE_END
228228
229static struct namco_interface namco_interface =
229static const struct namco_interface namco_interface =
230230{
231231   3,   /* number of voices */
232232   -1,   /* memory region */
src/mame/drivers/seicross.c
r1404r1405
388388
389389
390390
391static struct AY8910interface ay8910_interface =
391static const struct AY8910interface ay8910_interface =
392392{
393393   0,
394394   friskyt_portB_r,
src/mame/drivers/spbactn.c
r1404r1405
346346   cpunum_set_input_line(1,0,linestate);
347347}
348348
349static struct YM3812interface ym3812_interface =
349static const struct YM3812interface ym3812_interface =
350350{
351351   irqhandler
352352};
src/mame/drivers/system16.c
r1404r1405
159159void fd1094_machine_init(void);
160160void fd1094_driver_init(void (*set_decrypted)(UINT8 *));
161161
162static void sys16_video_config(void (*update)(void), int sprxoffs, int *bank)
162static void sys16_video_config(void (*update)(void), int sprxoffs, const int *bank)
163163{
164   static int bank_default[16] =
164   static const int bank_default[16] =
165165   {
166166      0x0,0x1,0x2,0x3,
167167      0x4,0x5,0x6,0x7,
r1404r1405
264264      cpunum_set_input_line(1, INPUT_LINE_NMI, PULSE_LINE);
265265}
266266
267static struct MSM5205interface tturfbl_msm5205_interface =
267static const struct MSM5205interface tturfbl_msm5205_interface =
268268{
269269   tturfbl_msm5205_callback,
270270   MSM5205_S48_4B
r1404r1405
640640
641641static MACHINE_RESET( bayroute )
642642{
643   static int bank[16] = {
643   static const int bank[16] = {
644644      0,0,0,0,
645645      0,0,0,3,
646646      0,0,0,2,
r1404r1405
805805
806806static DRIVER_INIT( dduxbl )
807807{
808   static int bank[16] = { //*
808   static const int bank[16] = { //*
809809      0,0,0,0,
810810      0,0,0,4,
811811      0,0,0,3,
r1404r1405
922922
923923static MACHINE_RESET( eswatbl )
924924{
925   static int bank[] = {
925   static const int bank[16] = {
926926      0,1,   4,5,
927927      8,9,   12,13,
928928      2,3,   6,7,
r1404r1405
12771277
12781278static MACHINE_RESET( goldnaxe )
12791279{
1280   static int bank[16] = {
1280   static const int bank[16] = {
12811281      0,1,4,5,
12821282      8,9,0,0,
12831283      2,3,6,7,
r1404r1405
17581758
17591759static MACHINE_RESET( shinobl )
17601760{
1761   static int bank[] = {
1761   static const int bank[16] = {
17621762      0,2,4,6,
17631763      1,3,5,7
17641764   };
r1404r1405
20472047
20482048static MACHINE_RESET( tturfbl )
20492049{
2050   static int bank[16] = {
2050   static const int bank[16] = {
20512051      0,0,0,0,
20522052      0,0,0,3,
20532053      0,0,0,2,
r1404r1405
21862186
21872187static MACHINE_RESET( wb3bbl )
21882188{
2189   static int bank[16] = {
2189   static const int bank[16] = {
21902190      2,0,
21912191      1,0,
21922192      3,0,
src/mame/drivers/deniam.c
r1404r1405
311311      cpunum_set_input_line(1,0,linestate);
312312}
313313
314static struct YM3812interface ym3812_interface =
314static const struct YM3812interface ym3812_interface =
315315{
316316   irqhandler
317317};
src/mame/drivers/nyny.c
r1404r1405
208208}
209209
210210
211static TTL74123_interface ic48_1_intf =
211static const TTL74123_interface ic48_1_intf =
212212{
213213   TTL74123_GROUNDED,   /* the hook up type */
214214   RES_K(22),         /* resistor connected to RCext */
r1404r1405
454454}
455455
456456
457static struct AY8910interface ay8910_37_interface =
457static const struct AY8910interface ay8910_37_interface =
458458{
459459   0,
460460   0,
r1404r1405
463463};
464464
465465
466static struct AY8910interface ay8910_64_interface =
466static const struct AY8910interface ay8910_64_interface =
467467{
468468   input_port_3_r,
469469   input_port_2_r
src/mame/drivers/limenko.c
r1404r1405
453453*****************************************************************************************************/
454454
455455
456static gfx_layout tile_layout =
456static const gfx_layout tile_layout =
457457{
458458   8,8,
459459   RGN_FRAC(1,1),
src/mame/drivers/redalert.c
r1404r1405
299299GFXDECODE_END
300300
301301/* Arbitrary colortable */
302static UINT16 colortable_source[] =
302static const UINT16 colortable_source[] =
303303{
304304   0,7,
305305   0,6,
r1404r1405
344344   }
345345}
346346
347static struct AY8910interface redalert_ay8910_interface =
347static const struct AY8910interface redalert_ay8910_interface =
348348{
349349   redalert_AY8910_A_r,      /* Port A Read */
350350   0,      /* Port B Read */
src/mame/drivers/mcr3.c
r1404r1405
206206
207207static WRITE8_HANDLER( maxrpm_op6_w )
208208{
209   static const char *inputs[] = { "MONO.IP1", "MONO.IP1.ALT1", "MONO.IP1.ALT2", "MONO.IP1.ALT3" };
209   static const char *const inputs[] = { "MONO.IP1", "MONO.IP1.ALT1", "MONO.IP1.ALT2", "MONO.IP1.ALT3" };
210210
211211   /*
212212        Reflective Sensor Control:
r1404r1405
388388   /* bit 5 = STR1 (J1-13) */
389389   if (((last_op4 ^ data) & 0x20) && !(data & 0x20))
390390   {
391      static const char *lampname[8] =
391      static const char *const lampname[8] =
392392      {
393393         "lamp0", "lamp1", "lamp2", "lamp3",
394394         "lamp4", "lamp5", "lamp6", "lamp7"
src/mame/drivers/pipeline.c
r1404r1405
300300   0,               // ZC/TO2 callback
301301};
302302
303static struct z80_irq_daisy_chain daisy_chain_sound[] =
303static const struct z80_irq_daisy_chain daisy_chain_sound[] =
304304{
305305   { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 },   /* device 0 = CTC_1 */
306306   { 0, 0, 0, 0, -1 }      /* end mark */
r1404r1405
317317   { vidctrl_w,      protection_w,   NULL },   /* Port C write */
318318};
319319
320static struct YM2203interface ym2203_interface =
320static const struct YM2203interface ym2203_interface =
321321{
322322   0,
323323   0,
src/mame/drivers/pengo.c
r1404r1405
329329 *
330330 *************************************/
331331
332static struct namco_interface namco_interface =
332static const struct namco_interface namco_interface =
333333{
334334   3,         /* number of voices */
335335   REGION_SOUND1   /* memory region */
src/mame/drivers/stadhero.c
r1404r1405
269269   cpunum_set_input_line(1,0,linestate);
270270}
271271
272static struct YM3812interface ym3812_interface =
272static const struct YM3812interface ym3812_interface =
273273{
274274   irqhandler
275275};
src/mame/drivers/prehisle.c
r1404r1405
219219   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
220220}
221221
222static struct YM3812interface ym3812_interface =
222static const struct YM3812interface ym3812_interface =
223223{
224224   irqhandler
225225};
226226
227static struct upd7759_interface upd7759_interface =
227static const struct upd7759_interface upd7759_interface =
228228{
229229   REGION_SOUND1         /* memory region */
230230};
src/mame/drivers/simpsons.c
r1404r1405
225225
226226***************************************************************************/
227227
228static struct K053260_interface k053260_interface =
228static const struct K053260_interface k053260_interface =
229229{
230230   REGION_SOUND1 /* memory region */
231231};
src/mame/drivers/marvins.c
r1404r1405
9494
9595static int sound_cpu_busy;
9696
97static struct namco_interface snkwave_interface =
97static const struct namco_interface snkwave_interface =
9898{
9999   1,            /* number of voices */
100100   -1            /* memory region */
src/mame/drivers/wwfsstar.c
r1404r1405
347347   cpunum_set_input_line( 1, 0 , irq ? ASSERT_LINE : CLEAR_LINE );
348348}
349349
350static struct YM2151interface ym2151_interface =
350static const struct YM2151interface ym2151_interface =
351351{
352352   wwfsstar_ymirq_handler
353353};
src/mame/drivers/model1.c
r1404r1405
10771077   AM_RANGE(0xf00000, 0xf0ffff) AM_RAM
10781078ADDRESS_MAP_END
10791079
1080static struct MultiPCM_interface m1_multipcm_interface_1 =
1080static const struct MultiPCM_interface m1_multipcm_interface_1 =
10811081{
10821082   REGION_SOUND1
10831083};
10841084
1085static struct MultiPCM_interface m1_multipcm_interface_2 =
1085static const struct MultiPCM_interface m1_multipcm_interface_2 =
10861086{
10871087   REGION_SOUND2
10881088};
src/mame/drivers/actfancr.c
r1404r1405
380380   cpunum_set_input_line(1,0,linestate); /* IRQ */
381381}
382382
383static struct YM3812interface ym3812_interface =
383static const struct YM3812interface ym3812_interface =
384384{
385385   sound_irq
386386};
src/mame/drivers/polepos.c
r1404r1405
397397   coin_lockout_global_w(data & 1);
398398}
399399
400static struct namcoio_interface intf0 =
400static const struct namcoio_interface intf0 =
401401{
402402   { in0_l, in0_h, dipB_l, dipB_h },   /* port read handlers */
403403   { out_0, out_1 }               /* port write handlers */
404404};
405static struct namcoio_interface intf1 =
405static const struct namcoio_interface intf1 =
406406{
407407   { in1_l, in1_h, dipA_l, dipA_h },   /* port read handlers */
408408   { NULL, NULL }                  /* port write handlers */
r1404r1405
825825 * Sound interfaces
826826 *********************************************************************/
827827
828static struct namco_interface namco_interface =
828static const struct namco_interface namco_interface =
829829{
830830   8,            /* number of voices */
831831   REGION_SOUND1,   /* memory region */
r1404r1405
852852 * to allow headroom when more the one effect is played.
853853 */
854854
855static struct namco_52xx_interface namco_52xx_interface =
855static const struct namco_52xx_interface namco_52xx_interface =
856856{
857857   REGION_SOUND3,   /* memory region */
858858   0,            /* Use internal Playback frequency */
r1404r1405
863863   .5            /* Combined gain of both filters */
864864};
865865
866static struct CustomSound_interface custom_interface =
866static const struct CustomSound_interface custom_interface =
867867{
868868   polepos_sh_start,
869869   NULL,
src/mame/drivers/taito_b.c
r1404r1405
25812581   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
25822582}
25832583
2584static struct YM2610interface ym2610_interface_rsaga2 =
2584static const struct YM2610interface ym2610_interface_rsaga2 =
25852585{
25862586   irqhandler,
25872587   REGION_SOUND1,
25882588   REGION_SOUND2
25892589};
25902590
2591static struct YM2610interface ym2610_interface_crimec =
2591static const struct YM2610interface ym2610_interface_crimec =
25922592{
25932593   irqhandler,
25942594   REGION_SOUND1,
25952595   REGION_SOUND1
25962596};
25972597
2598static struct YM2203interface ym2203_interface =
2598static const struct YM2203interface ym2203_interface =
25992599{
26002600   0,
26012601   0,
r1404r1405
26272627   }
26282628}
26292629
2630static struct MB87078interface mb87078_interface =
2630static const struct MB87078interface mb87078_interface =
26312631{
26322632   mb87078_gain_changed   /*callback function for gain change*/
26332633};
src/mame/drivers/viper.c
r1404r1405
157157
158158static int cf_card_ide = 0;
159159
160static UINT8 cf_card_tuples[] =
160static const UINT8 cf_card_tuples[] =
161161{
162162   0x01,      // Device Tuple
163163   0x01,      // Tuple size
r1404r1405
608608
609609INPUT_PORTS_END
610610
611static ppc_config viper_ppc_cfg =
611static const ppc_config viper_ppc_cfg =
612612{
613613   PPC_MODEL_MPC8240,
614614   0x30,
r1404r1405
659659{
660660}
661661
662static struct pci_device_info mpc8240 =
662static const struct pci_device_info mpc8240 =
663663{
664664   mpc8240_pci_r,
665665   mpc8240_pci_w
666666};
667667
668static struct pci_device_info voodoo3 =
668static const struct pci_device_info voodoo3 =
669669{
670670   voodoo3_pci_r,
671671   voodoo3_pci_w
672672};
673673
674static struct ide_interface ide_intf =
674static const struct ide_interface ide_intf =
675675{
676676   ide_interrupt
677677};
src/mame/drivers/mw8080bw.c
r1404r1405
274274*/
275275   int i;
276276
277   static const char *lamp_names[] =
277   static const char *const lamp_names[] =
278278   {
279279      "EXP_LAMP_0", "EXP_LAMP_1", "EXP_LAMP_2", "EXP_LAMP_3",
280280      "EXP_LAMP_4", "EXP_LAMP_5", "EXP_LAMP_6", "EXP_LAMP_7",
src/mame/drivers/namcos86.c
r1404r1405
10461046
10471047/*******************************************************************/
10481048
1049static struct namco_interface namco_interface =
1049static const struct namco_interface namco_interface =
10501050{
10511051   8,      /* number of voices */
10521052   -1,      /* memory region */
10531053   0      /* stereo */
10541054};
10551055
1056static struct namco_63701x_interface namco_63701x_interface =
1056static const struct namco_63701x_interface namco_63701x_interface =
10571057{
10581058   REGION_SOUND1   /* memory region */
10591059};
src/mame/drivers/suna8.c
r1404r1405
15311531
15321532/* 1 x 24 MHz crystal */
15331533
1534static struct AY8910interface hardhead_ay8910_interface =
1534static const struct AY8910interface hardhead_ay8910_interface =
15351535{
15361536   0,
15371537   0,
r1404r1405
16481648
16491649/* 1 x 24 MHz crystal */
16501650
1651static struct YM3812interface brickzn_ym3812_interface =
1651static const struct YM3812interface brickzn_ym3812_interface =
16521652{
16531653   soundirq   /* IRQ Line */
16541654};
r1404r1405
17541754                                Star Fighter
17551755***************************************************************************/
17561756
1757static struct AY8910interface starfigh_ay8910_interface =
1757static const struct AY8910interface starfigh_ay8910_interface =
17581758{
17591759   0,
17601760   0,
src/mame/drivers/vaportra.c
r1404r1405
262262   cpunum_set_input_line(1,1,state); /* IRQ 2 */
263263}
264264
265static struct YM2151interface ym2151_interface =
265static const struct YM2151interface ym2151_interface =
266266{
267267   sound_irq
268268};
src/mame/drivers/qdrmfgp.c
r1404r1405
593593 *
594594 *************************************/
595595
596static struct ide_interface ide_intf =
596static const struct ide_interface ide_intf =
597597{
598598   ide_interrupt,
599599};
600600
601static struct ide_interface gp2_ide_intf =
601static const struct ide_interface gp2_ide_intf =
602602{
603603   gp2_ide_interrupt,
604604};
r1404r1405
616616      cpunum_set_input_line(0, 1, HOLD_LINE);
617617}
618618
619static struct K054539interface k054539_interface =
619static const struct K054539interface k054539_interface =
620620{
621621   REGION_SOUND1,
622622   NULL,
623623   sound_irq
624624};
625625
626static struct K054539interface gp2_k054539_interface =
626static const struct K054539interface gp2_k054539_interface =
627627{
628628   REGION_SOUND1
629629};
src/mame/drivers/cps1.c
r1404r1405
162162
163163READ16_HANDLER( cps1_dsw_r )
164164{
165   static const char *dswname[3] = { "DSWA", "DSWB", "DSWC" };
165   static const char *const dswname[3] = { "DSWA", "DSWB", "DSWC" };
166166   int control = readinputportbytag(dswname[offset]);
167167   return control << 8 | control;
168168}
r1404r1405
306306*
307307********************************************************************/
308308
309struct QSound_interface qsound_interface =
309const struct QSound_interface qsound_interface =
310310{
311311   REGION_SOUND1
312312};
r1404r1405
34633463   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
34643464}
34653465
3466static struct YM2151interface ym2151_interface =
3466static const struct YM2151interface ym2151_interface =
34673467{
34683468   cps1_irq_handler_mus
34693469};
src/mame/drivers/nova2001.c
r1404r1405
173173
174174
175175
176static struct AY8910interface ay8910_interface_1 =
176static const struct AY8910interface ay8910_interface_1 =
177177{
178178   0,
179179   0,
r1404r1405
181181   nova2001_scroll_y_w
182182};
183183
184static struct AY8910interface ay8910_interface_2 =
184static const struct AY8910interface ay8910_interface_2 =
185185{
186186   input_port_3_r,
187187   input_port_4_r
src/mame/drivers/starcrus.c
r1404r1405
150150GFXDECODE_END
151151
152152
153static UINT16 colortable_source[] =
153static const UINT16 colortable_source[] =
154154{
155155   0x00, 0x01, /* White on Black */
156156};
src/mame/drivers/yunsun16.c
r1404r1405
519519   cpunum_set_input_line(1, 0, state);
520520}
521521
522static struct YM3812interface magicbub_ym3812_intf =
522static const struct YM3812interface magicbub_ym3812_intf =
523523{
524524   soundirq   /* IRQ Line */
525525};
src/mame/drivers/scobra.c
r1404r1405
8282
8383
8484
85static struct AY8910interface hustler_ay8910_interface =
85static const struct AY8910interface hustler_ay8910_interface =
8686{
8787   soundlatch_r,
8888   frogger_portB_r
r1404r1405
13731373INPUT_PORTS_END
13741374
13751375
1376static struct AY8910interface scobra_ay8910_interface_2 =
1376static const struct AY8910interface scobra_ay8910_interface_2 =
13771377{
13781378   soundlatch_r,
13791379   scramble_portB_r
src/mame/drivers/drtomy.c
r1404r1405
5252   int i, x, y, ex, ey;
5353   const gfx_element *gfx = machine->gfx[0];
5454
55   static int x_offset[2] = {0x0,0x2};
56   static int y_offset[2] = {0x0,0x1};
55   static const int x_offset[2] = {0x0,0x2};
56   static const int y_offset[2] = {0x0,0x1};
5757
5858   for (i = 3; i < 0x1000/2; i+=4){
5959      int sx = drtomy_spriteram[i+2] & 0x01ff;
src/mame/drivers/gaelco3d.c
r1404r1405
928928 *
929929 *************************************/
930930
931static struct tms32031_config tms_config =
931static const struct tms32031_config tms_config =
932932{
933933   0x1000,
934934   0,
src/mame/drivers/namcos11.c
r1404r1405
789789   AM_RANGE(0xfffe0130, 0xfffe0133) AM_WRITENOP
790790ADDRESS_MAP_END
791791
792static struct
792static const struct
793793{
794794   const char *s_name;
795795   read32_handler keycus_r;
src/mame/drivers/lethalj.c
r1404r1405
469469 *
470470 *************************************/
471471
472static tms34010_config tms_config =
472static const tms34010_config tms_config =
473473{
474474   FALSE,                     /* halt on reset */
475475   0,                        /* the screen operated on */
r1404r1405
481481   NULL                     /* read from shiftreg function */
482482};
483483
484static tms34010_config tms_config_lethalj =
484static const tms34010_config tms_config_lethalj =
485485{
486486   FALSE,                     /* halt on reset */
487487   0,                        /* the screen operated on */
src/mame/drivers/itech8.c
r1404r1405
521521
522522static void via_irq(int state);
523523
524static struct via6522_interface via_interface =
524static const struct via6522_interface via_interface =
525525{
526526   /*inputs : A/B         */ 0, 0,
527527   /*inputs : CA/B1,CA/B2 */ 0, 0, 0, 0,
r1404r1405
17341734 *
17351735 *************************************/
17361736
1737static struct YM2203interface ym2203_interface =
1737static const struct YM2203interface ym2203_interface =
17381738{
17391739   0,
17401740   0,
r1404r1405
17441744};
17451745
17461746
1747static struct YM3812interface ym3812_interface =
1747static const struct YM3812interface ym3812_interface =
17481748{
17491749   generate_sound_irq
17501750};
src/mame/drivers/galaxian.c
r1404r1405
42364236   GFXDECODE_ENTRY( REGION_GFX1, 0x4000, _4in1_spritelayout,    0, 8 )
42374237GFXDECODE_END
42384238
4239static struct AY8910interface checkmaj_ay8910_interface =
4239static const struct AY8910interface checkmaj_ay8910_interface =
42404240{
42414241   soundlatch_r
42424242};
42434243
4244static struct AY8910interface bongo_ay8910_interface =
4244static const struct AY8910interface bongo_ay8910_interface =
42454245{
42464246   input_port_3_r
42474247};
src/mame/drivers/bbusters.c
r1404r1405
642642   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
643643}
644644
645static struct YM2608interface ym2608_interface =
645static const struct YM2608interface ym2608_interface =
646646{
647647   0,0,0,0,sound_irq,
648648   REGION_SOUND1
649649};
650650
651static struct YM2610interface ym2610_interface =
651static const struct YM2610interface ym2610_interface =
652652{
653653   sound_irq,
654654   REGION_SOUND2,
src/mame/drivers/gstriker.c
r1404r1405
276276      cpunum_set_input_line(1, 0, CLEAR_LINE);
277277}
278278
279static struct YM2610interface ym2610_interface =
279static const struct YM2610interface ym2610_interface =
280280{
281281   gs_ym2610_irq,
282282   REGION_SOUND1,
src/mame/drivers/snk.c
r1404r1405
364364   if( state ) snk_sound_register |= 0x02;
365365}
366366
367static struct YM3526interface ym3526_interface_0 = {
367static const struct YM3526interface ym3526_interface_0 = {
368368   snk_sound_callback0_w /* ? */
369369};
370370
371static struct YM3526interface ym3526_interface_1 = {
371static const struct YM3526interface ym3526_interface_1 = {
372372   snk_sound_callback1_w /* ? */
373373};
374374
375static struct Y8950interface y8950_interface = {
375static const struct Y8950interface y8950_interface = {
376376   snk_sound_callback1_w, /* ? */
377377   REGION_SOUND1   /* memory region */
378378};
379379
380static struct YM3812interface ym3812_interface = {
380static const struct YM3812interface ym3812_interface = {
381381   snk_sound_callback0_w /* ? */
382382};
383383
src/mame/drivers/hyprduel.c
r1404r1405
713713   cpunum_set_input_line(1, 1, HOLD_LINE);
714714}
715715
716static struct YM2151interface ym2151_interface =
716static const struct YM2151interface ym2151_interface =
717717{
718718   sound_irq
719719};
src/mame/drivers/flstory.c
r1404r1405
716716GFXDECODE_END
717717
718718
719static struct AY8910interface ay8910_interface =
719static const struct AY8910interface ay8910_interface =
720720{
721721   0,
722722   0,
r1404r1405
724724   sound_control_3_w
725725};
726726
727static struct MSM5232interface msm5232_interface =
727static const struct MSM5232interface msm5232_interface =
728728{
729729   { 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) */
730730};
src/mame/drivers/suprslam.c
r1404r1405
316316   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
317317}
318318
319static struct YM2610interface ym2610_interface =
319static const struct YM2610interface ym2610_interface =
320320{
321321   irqhandler,
322322   REGION_SOUND1,
src/mame/drivers/atetris.c
r1404r1405
306306 *
307307 *************************************/
308308
309static struct POKEYinterface pokey_interface_1 =
309static const struct POKEYinterface pokey_interface_1 =
310310{
311311   { 0 },
312312   input_port_0_r
313313};
314314
315315
316static struct POKEYinterface pokey_interface_2 =
316static const struct POKEYinterface pokey_interface_2 =
317317{
318318   { 0 },
319319   input_port_1_r
src/mame/drivers/model2.c
r1404r1405
951951
952952/* Protection handling */
953953
954static UINT8 ZGUNProt[] =
954static const UINT8 ZGUNProt[] =
955955{
956956   0x7F,0x4E,0x1B,0x1E,0xA8,0x48,0xF5,0x49,0x31,0x32,0x4A,0x09,0x89,0x29,0xC0,0x41,
957957   0x3A,0x49,0x85,0x24,0xA0,0x4D,0x21,0x31,0xEA,0xC3,0x3F,0xAF,0x0E,0x4B,0x25,0x02,
r1404r1405
962962   0x94,0xD5,0x73,0x09,0xE4,0x3D,0x2D,0x92,0xC9,0xA7,0xA3,0x53,0x42,0x82,0x55,0x67,
963963   0xE4,0x66,0xD0,0x4A,0x7D,0x4A,0x13,0xDE,0xD7,0x9F,0x38,0xAA,0x00,0x56,0x85,0x0A
964964};
965static UINT8 DCOPKey1326[]=
965static const UINT8 DCOPKey1326[]=
966966{
967967   0x43,0x66,0x54,0x11,0x99,0xfe,0xcc,0x8e,0xdd,0x87,0x11,0x89,0x22,0xdf,0x44,0x09
968968};
r1404r1405
16941694   }
16951695}
16961696
1697static struct SCSPinterface scsp_interface =
1697static const struct SCSPinterface scsp_interface =
16981698{
16991699   REGION_CPU2,
17001700   0,
17011701   scsp_irq
17021702};
17031703
1704static struct MultiPCM_interface m1_multipcm_interface_1 =
1704static const struct MultiPCM_interface m1_multipcm_interface_1 =
17051705{
17061706   REGION_SOUND1
17071707};
17081708
1709static struct MultiPCM_interface m1_multipcm_interface_2 =
1709static const struct MultiPCM_interface m1_multipcm_interface_2 =
17101710{
17111711   REGION_SOUND2
17121712};
r1404r1405
17751775
17761776/*****************************************************************************/
17771777
1778static struct mb86233_config tgp_config =
1778static const struct mb86233_config tgp_config =
17791779{
17801780   copro_fifoin_pop,
17811781   copro_fifoout_push,
r1404r1405
18651865MACHINE_DRIVER_END
18661866
18671867
1868static sharc_config sharc_cfg =
1868static const sharc_config sharc_cfg =
18691869{
18701870   BOOT_MODE_HOST
18711871};
src/mame/drivers/bmcbowl.c
r1404r1405
460460}
461461
462462
463static struct AY8910interface ay8910_interface =
463static const struct AY8910interface ay8910_interface =
464464{
465465   dips1_r,
466466   0,
r1404r1405
469469};
470470
471471
472static struct via6522_interface via_interface =
472static const struct via6522_interface via_interface =
473473{
474474   /*inputs : A/B         */ 0, via_b_in,
475475   /*inputs : CA/B1,CA/B2 */ 0, 0, 0, 0,
src/mame/drivers/ataxx.c
r1404r1405
310310 *
311311 *************************************/
312312
313static struct CustomSound_interface i80186_custom_interface =
313static const struct CustomSound_interface i80186_custom_interface =
314314{
315315    leland_80186_sh_start
316316};
src/mame/drivers/sshangha.c
r1404r1405
331331   cpunum_set_input_line(1,0,state);
332332}
333333
334static struct YM2203interface ym2203_interface =
334static const struct YM2203interface ym2203_interface =
335335{
336336   0,0,0,0,irqhandler
337337};
src/mame/drivers/wiping.c
r1404r1405
297297
298298
299299
300static struct CustomSound_interface custom_interface =
300static const struct CustomSound_interface custom_interface =
301301{
302302   wiping_sh_start
303303};
src/mame/drivers/kyugo.c
r1404r1405
476476 *
477477 *************************************/
478478
479static struct AY8910interface ay8910_interface =
479static const struct AY8910interface ay8910_interface =
480480{
481481   input_port_0_r,
482482   input_port_1_r
src/mame/drivers/leland.c
r1404r1405
696696   register.
697697*/
698698
699static struct AY8910interface ay8910_interface =
699static const struct AY8910interface ay8910_interface =
700700{
701701    leland_sound_port_r,
702702   0,
r1404r1405
705705};
706706
707707
708static struct CustomSound_interface dac_custom_interface =
708static const struct CustomSound_interface dac_custom_interface =
709709{
710710    leland_sh_start
711711};
712712
713713
714static struct CustomSound_interface i80186_custom_interface =
714static const struct CustomSound_interface i80186_custom_interface =
715715{
716716    leland_80186_sh_start
717717};
718718
719719
720static struct CustomSound_interface redline_custom_interface =
720static const struct CustomSound_interface redline_custom_interface =
721721{
722722     redline_80186_sh_start
723723};
src/mame/drivers/mjsiyoub.c
r1404r1405
6565INPUT_PORTS_END
6666
6767
68static struct AY8910interface ay8910_interface =
68static const struct AY8910interface ay8910_interface =
6969{
7070   0,            /* Input A: DSW 2 */
7171   0,            /* Input B: DSW 1 */
7272};
7373
74static struct MSM5205interface msm5205_interface =
74static const struct MSM5205interface msm5205_interface =
7575{
7676   0,                     /* IRQ handler */
7777   MSM5205_S48_4B            /* 8 KHz, 4 Bits  ?? */
src/mame/drivers/popeye.c
r1404r1405
469469   return res;
470470}
471471
472static struct AY8910interface ay8910_interface =
472static const struct AY8910interface ay8910_interface =
473473{
474474   popeye_portA_r,
475475   0,
src/mame/drivers/taxidrvr.c
r1404r1405
342342
343343
344344
345static struct AY8910interface ay8910_interface_1 =
345static const struct AY8910interface ay8910_interface_1 =
346346{
347347   p8910_0a_r,
348348   0,
r1404r1405
350350   p8910_0b_w
351351};
352352
353static struct AY8910interface ay8910_interface_2 =
353static const struct AY8910interface ay8910_interface_2 =
354354{
355355   p8910_1a_r
356356};
src/mame/drivers/compgolf.c
r1404r1405
198198   cpunum_set_input_line(0,0,linestate);
199199}
200200
201static struct YM2203interface ym2203_interface =
201static const struct YM2203interface ym2203_interface =
202202{
203203   0,
204204   0,
src/mame/drivers/cps2.c
r1404r1405
13421342
13431343
13441344
1345static struct m68k_encryption_interface cps2_encryption =
1345static const struct m68k_encryption_interface cps2_encryption =
13461346{
13471347   CPS2_Read8, CPS2_Read16, CPS2_Read32,
13481348   CPS2_Read16, CPS2_Read32
src/mame/drivers/lordgun.c
r1404r1405
429429   cpunum_set_input_line(1, 0, state);
430430}
431431
432static struct YM3812interface lordgun_ym3812_interface =
432static const struct YM3812interface lordgun_ym3812_interface =
433433{
434434   soundirq
435435};
src/mame/drivers/lemmings.c
r1404r1405
264264   cpunum_set_input_line(1,0,state);
265265}
266266
267static struct YM2151interface ym2151_interface =
267static const struct YM2151interface ym2151_interface =
268268{
269269   sound_irq
270270};
src/mame/drivers/pushman.c
r1404r1405
423423    cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
424424}
425425
426static struct YM2203interface ym2203_interface =
426static const struct YM2203interface ym2203_interface =
427427{
428428   0,0,0,0,irqhandler
429429};
src/mame/drivers/hyperspt.c
r1404r1405
4343{
4444   int res;
4545   static int cheat = 0;
46   static int bits[] = { 0xee, 0xff, 0xbb, 0xaa };
46   static const int bits[] = { 0xee, 0xff, 0xbb, 0xaa };
4747
4848   res = readinputportbytag("IN1");
4949
r1404r1405
450450
451451
452452
453static struct VLM5030interface hyperspt_vlm5030_interface =
453static const struct VLM5030interface hyperspt_vlm5030_interface =
454454{
455455   REGION_SOUND1,   /* memory region  */
456456   0         /* memory size    */
src/mame/drivers/tiamc1.c
r1404r1405
267267   GFXDECODE_ENTRY( REGION_GFX1, 0x0000, sprites16x16_layout, 0, 16 )
268268GFXDECODE_END
269269
270static struct CustomSound_interface tiamc1_custom_interface =
270static const struct CustomSound_interface tiamc1_custom_interface =
271271{
272272        tiamc1_sh_start
273273};
src/mame/drivers/toaplan1.c
r1404r1405
15721572   cpunum_set_input_line(1,0,linestate);
15731573}
15741574
1575static struct YM3812interface ym3812_interface =
1575static const struct YM3812interface ym3812_interface =
15761576{
15771577   irqhandler
15781578};
src/mame/drivers/hnayayoi.c
r1404r1405
602602}
603603
604604
605static struct YM2203interface ym2203_interface =
605static const struct YM2203interface ym2203_interface =
606606{
607607   input_port_0_r,
608608   input_port_1_r,
r1404r1405
611611   irqhandler
612612};
613613
614static struct MSM5205interface msm5205_interface =
614static const struct MSM5205interface msm5205_interface =
615615{
616616   0,               /* IRQ handler */
617617   MSM5205_SEX_4B
src/mame/drivers/shanghai.c
r1404r1405
3737static INT16 cpx,cpy;
3838
3939
40static int instruction_length[64] =
40static const int instruction_length[64] =
4141{
4242    0, 3, 2, 1,   /* 0x */
4343    0, 0,-1, 2,   /* 1x */
r1404r1405
5757    5, 5, 5, 5    /* Fx */
5858};
5959
60static const char *instruction_name[64] =
60static const char *const instruction_name[64] =
6161{
6262   "undef","ORG  ","WPR  ","RPR  ",   /* 0x */
6363   "undef","undef","WPTN ","RPTN ",   /* 1x */
r1404r1405
971971
972972
973973
974static struct YM2203interface sh_ym2203_interface =
974static const struct YM2203interface sh_ym2203_interface =
975975{
976976   input_port_3_r,
977977   input_port_4_r
src/mame/drivers/tmnt.c
r1404r1405
24632463   cbj_snd_irqlatch = state;
24642464}
24652465
2466static struct YM2151interface ym2151_interface_cbj =
2466static const struct YM2151interface ym2151_interface_cbj =
24672467{
24682468   cbj_irq_handler
24692469};
r1404r1405
24742474   K007232_set_volume(0,1,0,(v & 0x0f) * 0x11);
24752475}
24762476
2477static struct K007232_interface k007232_interface =
2477static const struct K007232_interface k007232_interface =
24782478{
24792479   REGION_SOUND1,   /* memory regions */
24802480   volume_callback   /* external port callback */
24812481};
24822482
2483static struct upd7759_interface upd7759_interface =
2483static const struct upd7759_interface upd7759_interface =
24842484{
24852485   REGION_SOUND2      /* memory region */
24862486};
r1404r1405
24922492   tmnt_decode_sample
24932493};
24942494
2495static struct K053260_interface k053260_interface =
2495static const struct K053260_interface k053260_interface =
24962496{
24972497   REGION_SOUND1 /* memory region */
24982498};
r1404r1405
27852785   cpunum_set_input_line(1, INPUT_LINE_NMI, PULSE_LINE);
27862786}
27872787
2788static struct K054539interface k054539_interface =
2788static const struct K054539interface k054539_interface =
27892789{
27902790   REGION_SOUND1,
27912791   NULL,
r1404r1405
42474247      /* 9 low bits of the sprite line address, which bit to pick it from. */
42484248      /* For example, when the PROM contains 4, which applies to 4x2 sprites, */
42494249      /* bit OA1 comes from CA5, OA2 from CA0, and so on. */
4250      static UINT8 bit_pick_table[10][8] =
4250      static const UINT8 bit_pick_table[10][8] =
42514251      {
42524252         /*0(1x1) 1(2x1) 2(1x2) 3(2x2) 4(4x2) 5(2x4) 6(4x4) 7(8x8) */
42534253         { CA3,   CA3,   CA3,   CA3,   CA3,   CA3,   CA3,   CA3 },   /* CA3 */
src/mame/drivers/jpmimpct.c
r1404r1405
794794 *
795795 *************************************/
796796
797static struct upd7759_interface upd7759_interface =
797static const struct upd7759_interface upd7759_interface =
798798{
799799   REGION_SOUND1
800800};
r1404r1405
812812   update_irqs();
813813}
814814
815static tms34010_config tms_config =
815static const tms34010_config tms_config =
816816{
817817   TRUE,                       /* halt on reset */
818818   0,                          /* the screen operated on */
src/mame/drivers/namcos12.c
r1404r1405
1414    - golgo13 assumes the test switch is a switch, not a button - must hold down F2 to stay in test mode
1515
1616
17Namco System 12 - Arcade PSX Hardware
18=====================================
19
1720Game & software revision                 Company/Year            CPU board   Mother board        Daughter board   Keycus
1821------------------------------------------------------------------------------------------------------------------------
19*Aerosmith - Quest for Fame              (C) Namco,        2001
2022Aqua Rush (AQ1/VER.A1)                   (C) Namco,        1999  COH-700     SYSTEM12 MOTHER(C)  SYSTEM12 M5F2    KC053
21*Attack Pla-Rail                         (C) Tomy/Namco,   199?
2223Derby Quiz My Dream Horse (MDH1/VER.A2)  (C) Namco,        1998  COH-700     SYSTEM12 MOTHER(B)  SYSTEM12 M10X64  KC035
2324Ehrgeiz (EG2/VER.A)                      (C) Square/Namco, 1998  COH-700     SYSTEM12 MOTHER(B)  SYSTEM12 M4F6    KC021
2425Ehrgeiz (EG3/VER.A)                      (C) Square/Namco, 1998  COH-700     SYSTEM12 MOTHER(B)  SYSTEM12 M4F6    KC021
2526Fighting Layer (FTL0/VER.A)              (C) Arika/Namco,  1998  COH-700     SYSTEM12 MOTHER(B)  SYSTEM12 M5F4    KC037
26*Fighting Spirit Biography 3             (C) Namco,        1997
2727Ghoul Panic (OB2/VER.A)                  (C) Namco/Raizing,1999  COH-700     SYSTEM12 MOTHER(B)  SYSTEM12 M4F6    KC045
2828Golgo 13 (GLG1/VER.A)                    (C) Raizing/Namco,1999  COH-700     SYSTEM12 MOTHER(C)  SYSTEM12 M8F6    KC054
2929Golgo 13 Kiseki no Dandou (GLS1/VER.A)   (C) Raizing/Namco,2000  COH-700     SYSTEM12 MOTHER(C)  SYSTEM12 M8F6    KC059
30*Kaiun Quiz                              (C) Namco,        199?
31*Kart Duel                               (C) Namco,        2000
30Kaiun Quiz (KW1/VER.A1)                  (C) Namco/Moss,   1999  COH-700     SYSTEM12 MOTHER(C)  SYSTEM12 M10X64  KC050
3231Libero Grande (LG2/VER.A)                (C) Namco,        1997  COH-700     SYSTEM12 MOTHER(B)  SYSTEM12 M8F2F   KC014
3332Mr Driller (DRI1/VER.A2)                 (C) Namco,        1999  COH-700     SYSTEM12 MOTHER(C)  SYSTEM12 M8F2F   KC048
34*Oh Bakyuuun                             (C) Namco/Raizing,1999
35*Over Kuhn                               (C) Namco,        1999
3633Paca Paca Passion (PPP1/VER.A2)          (C) Produce/Namco,1999  COH-700     SYSTEM12 MOTHER(B)  SYSTEM12 M8F2F   KC038
3734Paca Paca Passion Special (PSP1/VER.A)   (C) Produce/Namco,1999  COH-700     SYSTEM12 MOTHER(C)  SYSTEM12 M5F2    KC052
3835Paca Paca Passion 2 (PKS1/VER.A)         (C) Produce/Namco,1999  COH-700     SYSTEM12 MOTHER(B)  SYSTEM12 M5F2    KC046
3936Point Blank 2 (GNB5/VER.A)               (C) Namco,        1999  COH-700     SYSTEM12 MOTHER(B)  SYSTEM12 M4F0    KC042
4037Soul Calibur (SOC11/VER.A2)              (C) Namco,        1998  COH-700     SYSTEM12 MOTHER(B)  SYSTEM12 M5F2    KC020
4138Soul Calibur (SOC11/VER.B)               (C) Namco,        1998  COH-700     SYSTEM12 MOTHER(B)  SYSTEM12 M5F2    KC020
39Soul Calibur (SOC11/VER.C)               (C) Namco,        1998  COH-700     SYSTEM12 MOTHER(B)  SYSTEM12 M5F4    KC020
4240Soul Calibur (SOC13/VER.B)               (C) Namco,        1998  COH-700     SYSTEM12 MOTHER(B)  SYSTEM12 M5F4    KC020
43Soul Calibur (SOC11/VER.C)               (C) Namco,        1998  COH-700     SYSTEM12 MOTHER(B)  SYSTEM12 M5F4    KC020
4441Soul Calibur (SOC14/VER.C)               (C) Namco,        1998  COH-700     SYSTEM12 MOTHER     JO 11-04-98      none
45*Soul Calibur Ver.B                      (C) Namco,        199?
46*Submarines                              (C) Namco,        199?
47*Super World Stadium '98                 (C) Namco,        1998
42Super World Stadium '98 (SS81/VER.A)     (C) Namco,        1998  COH-700     SYSTEM12 MOTHER(B)  SYSTEM12 M4F6    KC025
4843Super World Stadium '99 (SS91/VER.A3)    (C) Namco,        1999  COH-700     SYSTEM12 MOTHER(B)  SYSTEM12 M5F4    KC043
49*Super World Stadium 2000                (C) Namco,        2000
50*Super World Stadium 2001                (C) Namco,        2001
51*Techno Drive                            (C) Namco,        1998
52*TeknoWerk                               (C) Namco,        1999
44Super World Stadium 2000 (SS01/VER.A3)   (C) Namco,        2000  COH-700     SYSTEM12 MOTHER(C)  SYSTEM12 M5F4    KC055
45Super World Stadium 2001 (SS11/VER.A2)   (C) Namco,        2001  COH-716     SYSTEM12 MOTHER(C)  SYSTEM12 F2M5    KC061
5346Tenkomori Shooting (TKM1/VER.A1)         (C) Namco,        1998  COH-700     SYSTEM12 MOTHER(B)  SYSTEM12 M4F6    KC036
5447Tenkomori Shooting (TKM2/VER.A1)         (C) Namco,        1998  COH-700     SYSTEM12 MOTHER(B)  SYSTEM12 M4F6    KC036
5548Tekken 3 (TET1/VER.E1)                   (C) Namco,        1996  COH-700     SYSTEM12 MOTHER(B)  SYSTEM12 M8F2F   KC006
r1404r1405
5851Tekken 3 (TET3/VER.B)                    (C) Namco,        1996  COH-700     SYSTEM12 MOTHER     SYSTEM12 M8F2F   KC006
5952Tekken Tag Tournament (TEG3/VER.B)       (C) Namco,        1999  COH-700     SYSTEM12 MOTHER(B)  SYSTEM12 M8F4    KC044
6053Tekken Tag Tournament (TEG3/VER.C1)      (C) Namco,        1999  COH-700     SYSTEM12 MOTHER(B)  SYSTEM12 M8F4    KC044
61*Toukon Retsuden 3                       (C) Namco,        1997
62*Truck Kyosokyoku                        (C) Namco,        2000
63*Um Jammer Lammy                         (C) Namco,        1999
54Toukon Retsuden 3 (TR1/VER.A)            (C) Namco,        1997  COH-700     SYSTEM12 MOTHER(B)  SYSTEM12 M8F2F   KC019
6455
65* - Denotes not dumped yet. If you can help with the remaining undumped S12 games,
66    please contact me at http://www.mameworld.net/gurudumps/
67    Note that this list above may not be 100% complete. Alternative versions are also welcome :-)
6856
57Wanted Games
58------------
59Aerosmith - Quest for Fame              (C) Namco,        2001
60http://www.bandainamcogames.co.jp/aa/am/vg/questforfame/
61
62Attack Pla-Rail                         (C) Tomy/Namco,   199?
63Possibly some kind of redemption game for kids
64
65Kart Duel                               (C) Namco,        2000
66http://www.bandainamcogames.co.jp/aa/am/vg/kartduel/
67
68Oh Bakyuuun                             (C) Namco/Raizing,1999
69http://www.8ing.net/prd/ohbakyun/index.html
70
71Soul Calibur Ver.B                      (C) Namco,        199?
72Probably doesn't exist
73
74Submarines                              (C) Namco,        199?
75http://www.arcadeflyers.com/?page=thumbs&db=videodb&id=5531
76This was cancelled, only the flyer exists.
77It was shown only at an amusement show. Possibly a prototype still exists. Possibly not.
78
79Techno Drive                            (C) Namco,        1998
80http://www.bandainamcogames.co.jp/aa/am/em/techno-drive/main/index.php
81
82Tekno Werk                              (C) Namco,        1999
83Some kind of music game similar to Konami's Keyboard Mania series
84
85Truck Kyosokyoku                        (C) Namco,        2000
86http://www.bandainamcogames.co.jp/aa/am/vg/truckkyosokyoku/
87
88Um Jammer Lammy                         (C) Namco,        1999
89http://www.bandainamcogames.co.jp/aa/am/vg/umjammerlammy/#nbgiWrapper
90
91If you can help with the remaining undumped S12 games, please contact me at http://www.mameworld.net/gurudumps/
92Note that this list above may not be 100% complete. Alternative versions are also welcome :-)
93
6994The Namco System 12 system comprises 3 mandatory PCB's....
7095MOTHER PCB  - This is the main PCB. It holds all sound circuitry, sound ROMs, program ROMs, shared RAM, bank-switching
7196              logic, controller/input logic (including sound CPU) and some video output circuitry.
r1404r1405
7398              some of the PALs are different and it has the capability to use 1x TSOP56 ROM in the program location,
7499              instead of the regular TSOP40/48 ROMs. The first 2 revisions appear to be identical.
75100CPU PCB     - All games use the exact same PCB. Contains main CPU/RAM and GPU/Video RAM
76ROM PCB     - There are eight known revisions of this PCB (so far). They're mostly identical except for the type and
101ROM PCB     - There are nine known revisions of this PCB (so far). They're mostly identical except for the type and
77102              number of ROMs used. Most have a PAL and a CPLD known as a 'KEYCUS'. Some also have an additional CPLD for
78103              protection.
79104
r1404r1405
110135PCB is wired for 1x 32M TSOP56 FlashROM (replaces 2E & 2J) and 2x 16M TSOP48 FlashROMs (replaces 2R/2P/2N/2L).
111136One other difference is that the motherboard has a serial number sticker on it and the program ROMs also contain
112137that same serial number, so all the games running on the Rev. C mother board have serialised ROMs. I'm not sure why,
113they're not exactly _easily_ tracable and no one cares either way ;-)
138they're not exactly _easily_ traceable and no one cares either way ;-)
114139  |--------------------------------------------------------------|
115140|-|     SOUND.11S       |--------------|               AT28C16   |
116141|                       |--------------|                         |
r1404r1405
192217      D6345        : NEC uPD6345 Serial 8-bit Shift Register IC (SOIC16)
193218
194219      PRG.2L/PRG.2P: Main program ROMs, Intel 28F016S5 2M x8 FLASHROM (both TSOP40)
220                     or Fujitsu 29F016A 2M x8 FLASHROM (both TSOP48)
195221                     These ROMs are populated on the following games....
196222
197223                                                            Test Mode S/W
r1404r1405
202228                     Ehrgeiz                   EG3 Ver.A    EG3/VER.A        MOTHER(B)
203229                     Golgo 13                  GLG1 Ver.A   GLG1/VER.A       MOTHER(C) (ROMs serialised)
204230                     Golgo 13 Kiseki no Dandou GLS1 Ver.A   GLS1/VER.A       MOTHER(C) (ROMs serialised)
231                     Kaiun Quiz                KW1 Ver.A    KW1/VER.A1       MOTHER(C) (ROMs serialised)
205232                     Libero Grande             LG2 Ver.A    LG2/VER.A        MOTHER(B)
206233                     Mr Driller                DRI1 Ver.A   DRI1/VER.A2      MOTHER(C) (ROMs serialised)
207234                     Paca Paca Passion         PPP1 Ver.A   PPP1/VER.A2      MOTHER(B)
r1404r1405
211238                     Soul Calibur              SOC1 Ver.A   SOC11/VER.A2     MOTHER(B)
212239                     Soul Calibur              SOC3 Ver.B   SOC13/VER.B      MOTHER(B)
213240                     Soul Calibur              SOC1 Ver.C   SOC11/VER.C      MOTHER(B)
241                     Super World Stadium 2000  SS01 Ver.A   SS01/VER.A3      MOTHER(C) (ROMs serialised)
242                     Super World Stadium 2001  SS11 Ver.A   SS11/VER.A2      MOTHER(C) (ROMs serialised)
214243                     Tekken Tag Tournament     TEG3 Ver.B   TEG3/VER.B       MOTHER(B)
215244                     Tekken Tag Tournament     TEG3 Ver.B   TEG3/VER.C1      MOTHER(B)
216245
r1404r1405
233262                     Ghoul Panic               OB2 Ver.A    OB2/VER.A        MOTHER(B)
234263                     Soul Calibur              SOC1 Ver.B   SOC11/VER.B      MOTHER(B)
235264                     Soul Calibur              TET1 Ver.C   SOC14/VER.C      MOTHER  (factory upgraded from Tekken 3 to Soul Calibur)
265                     Super World Stadium '98   SS81 Ver.A   SS81/VER.A       MOTHER(B)
236266                     Super World Stadium '99   SS91 Ver.A   SS91/VER.A3      MOTHER(B)
237267                     Tekken 3                  TET1 Ver.A   TET1/VER.E1      MOTHER(B)
238268                     Tekken 3                  TET2 Ver.A   TET2/VER.A       MOTHER
r1404r1405
254284PAL and a KEYCUS (which is a PLCC CPLD) and in some cases an extra TQFP CPLD.
255285The PCBs are named with a special coding. First a letter M, denoting MASKROM (always SOP44), then a number denoting how
256286many ROMs of that type, then another letter F, denoting FLASHROM (always TSOP40/48/56), then a number denoting how many
257ROMs of that type.
287ROMs of that type. That number is always the maximum amount of that ROM type that can be used on the PCB. The actual number
288of ROMs populated on the PCB can be less.
258289
259290********
260291*Type 1*
r1404r1405
281312      |----------|----|----|   |----------|----|
282313
283314      WAVEx: 64M SOP44 MASKROM (R6 populated)
284      FLx  : Intel E28F016 TSOP40 16M FlashROM (R8 not populated)
315      FLx  : Intel E28F016 TSOP40 16M FlashROM or Fujitsu 29F016A TSOP48 16M FlashROM (R8 not populated)
285316      ROM0x: 64M SOP44 MASKROM (size fixed at 64M, no configure options)
286317      IC3  : MACH211 CPLD (PLCC44, labelled 'KEYCUS' and stamped with 'KC' & a 3-digit number which is different per game.)
287318      IC4  : PALCE 16V8H (PLCC20, PCB labelled 'A_DECO', chip stamped 'A DECO')
r1404r1405
320351                           (i.e no FlashROMs)                                      (note these ROMs contains the same data as)
321352                                                                                   (the ones used on System 11 Point Blank 2)
322353
354Super World   SS81/VER.A   SYSTEM 12 M4F6 PCB 8661960901 (8661970901)     KC025    SS81 WAVE0, SS81 WAVE1
355Stadium '98                                                                        SS81 FL1U, SS81 FL1L, SS81 FL2U
356                                                                                   SS81 FL2L, SS81 FL3U, SS81 FL3L
357
323358********
324359*Type 2*
325360********
r1404r1405
428463                                                                                    SS91 FL4L, SS91 FL4H
429464                                                                                    SS91 FL3L, SS91 FL3H
430465
466Super World    SS01/VER.A3  SYSTEM 12 M5F4 PCB 8661961200 (8661971200)     KC055    SS01 WAVE0, SS01 WAVE1
467Stadium 2000                                                                        SS01 ROM0, SS01 ROM1, SS01 ROM2
468                                                                                    SS01 FL3L, SS01 FL3H
469
431470Soul Calibur   SOC13/VER.B  SYSTEM 12 M5F4 PCB 8661961200 (8661971200)     KC020    SOC1 WAVE0
432471                                                                                    SOC1 ROM0, SOC1 ROM1, SOC1 ROM2
433472                                                                                    SOC1 FL4L, SOC1 FL4H
r1404r1405
512551                                                                                     LG1 ROM0U, LG1 ROM0L
513552                                                                                     LG1 FL3L, LG1 FL3U
514553
554Toukon         TR1/VER.A     SYSTEM 12 M8F2F PCB 8661960301 (8661970301)    KC019    TR1 WAVE0, TR1 WAVE1    R4, R7
555Retsuden 3                                                                           TR1 ROM0U, TR1 ROM0L
515556
516557********
517558*Type 5*
r1404r1405
621662********
622663*Type 7*
623664********
624SYSTEM 12 M10X64 PCB ?????????? (??????????)
665SYSTEM 12 M10X64 PCB 8661961500 (8661971500)
625666|----------------------------------------------------------|
626667|WAVE0                                                     |
627|                ROM0L    ROM0U     ROM2L   ROM3L    ROM4L |
668|              ROM3L ROM3U ROM2L ROM2U   ROM1L    ROM0L    |
669|         IC4                                              |
670|                                        ROM1U    ROM0U    |
628671|                                                          |
629|                ROM1L    ROM1U     ROM2U   ROM3U    ROM4U |
630|                                                          |
631672|WAVE1                                                     |
632673|           KEYCUS |-------------------|                   |
633674|                  |-------------------|                   |
634675|----------------------------------------------------------|
635676Notes:
636      Due to the lack of documentation, the follow is unknown.....
637      - The presence or absence of zero Ohm resistor jumpers to set the ROM sizes.
638      - The locations of the ROMs and KEYCUS.
639      - The PCB number.
640      - The presence or absence of a PAL.
677      This PCB has zero Ohm resistor jumpers to set the ROM sizes.
678      Note X means 'not populated', O means 'populated'
679      |----------|----|----|
680      |   MASK   | R4 | R5 |
681      |----------|----|----|
682      | WAVE 32M | O  | X  |
683      |      64M | X  | O  |
684      |----------|----|----|
641685
642      WAVEx : 64M SOP44 MASKROM
643      ROMx  : 64M SOP44 MASKROM
644      KEYCUS: MACH211 CPLD (PLCC44, labelled 'KEYCUS' and stamped with 'KC' & a 3-digit number which is different per game.)
686      WAVEx : 32M/64M SOP44 MASKROM
687      ROMx  : 64M SOP44 MASKROM (size fixed at 64M, no configure options)
688      KEYCUS: CY37064 CPLD (PLCC44, labelled 'KEYCUS' and stamped with 'KC' & a 3-digit number which is different per game.)
689      IC4   : PALCE 16V8H (PLCC20, PCB labelled 'A_DECO', chip stamped 'S12M10X')
645690
646691This PCB is used on:
647692
648693               Software
649694Game           Revision      PCB                                            KEYCUS   ROMs Populated
650695-----------------------------------------------------------------------------------------------------------
651Derby Quiz My  MDH1/VER.A2   SYSTEM 12 M10X64 PCB ?????????? (??????????)   KC035    MDH1 WAVE0
696Derby Quiz My  MDH1/VER.A2   SYSTEM 12 M10X64 PCB 8661961500 (8661971500)   KC035    MDH1 WAVE0
652697Dream Horse                                                                          MDH1 ROM0L, MDH1 ROM1L
653698                                                                                     MDH1 ROM2L, MDH1 ROM0U
654699                                                                                     MDH1 ROM1U, MDH1 ROM2U
655700
701Kaiun Quiz     KW1/VER.A1    SYSTEM 12 M10X64 PCB 8661961500 (8661971500)   KC050    KW1 WAVE0
702                                                                                     KW1 ROM0L, KW1 ROM1L
703                                                                                     KW1 ROM2L, KW1 ROM0U
704                                                                                     KW1 ROM1U, KW1 ROM2U
705
656706********
657707*Type 8*
658708********
r1404r1405
694744                                                                                     ROM1-1, ROM2, ROM2-1
695745                                                                                     FL3, FL4
696746
747********
748*Type 9*
749********
750SYSTEM 12 F2M5 PCB 8661962600 (8661972600)
751|----------------------------------------------------------|
752|WAVE0.IC2      IC4                                        |
753|                                     ROM0.IC7             |
754|                   FL1L.IC5   FL1U.IC6                    |
755|                                           ROM1.IC8       |
756|                                                          |
757|WAVE1.IC1                                         ROM2.IC9|
758|             IC3  |-------------------|                   |
759|                  |-------------------|                   |
760|----------------------------------------------------------|
761Notes:
762      WAVEx: 64M SOP44 MASKROM
763      FLx  : Intel Flash DA28F640J5 64M FlashROM (SSOP56)
764      ROMx : 64M SOP44 MASKROM
765      IC3  : CY37064 CPLD (PLCC44, labelled 'KEYCUS' and stamped with 'KC' & a 3-digit number which is different per game.)
766      IC4  : GAL22V10 (PLCC28, PCB labelled 'S12F2M', chip stamped 'S12F2M')
697767
768This PCB is used on:
769
770               Software
771Game           Revision     PCB                                            KEYCUS   ROMs Populated
772-------------------------------------------------------------------------------------------------------------------
773Super World    SS11/VER.A2  SYSTEM 12 F2M5 PCB 8661962600 (8661972600)     KC061    SS01 WAVE0, SS01 WAVE1
774Stadium 2001                                                                        SS01 ROM0, SS01 ROM1, SS01 ROM2
775                                                                                    SS11FL1L, SS11FL1U
776
777
698778CPU PCB
699779-------
700COH-700 GP-15
780
781There are 2 known types (so far). Type 1 is the most common.
782
783Type 1
784------
785COH-700 GP-15 (manufactured by Sony)
701786|-------------------------------------------|
702787|    74F74   74ALS08                        |
703788|                                           |
r1404r1405
727812      CXD8661R   : Sony CXD8661R R3000A-based CPU (QFP208)
728813      MC44200FT  : Motorola MC44200FT Triple 8-bit Video DAC (QFP44)
729814
815Type 2
816------
817      SYSTEM12 COH716 PCB 8661962301 (8661972301)
818      (manufactured by Namco, probably in 2001, under licence from Sony)
819      Component layout is identical to COH-700 PCB with some updated components. Generally
820      it has 2X the amount of video RAM and 4X the amount of program RAM that the COH-700 PCB has.
821      KM4132G271Q replaced with OKI 54V25632A 256k x 32-bit x 2 Banks SGRAM (x2, QFP100)
822      KM416V1204 replaced with Samsung Electronics K4E6416120D 4M x16 EDO DRAM (x2, TSOP44)
823      Updated Sony CXD8561CQ GPU (QFP208)
824      Updated Sony CXD8606BQ R3000A-based CPU (QFP208)
825      Updated Motorola MC141685FT Video DAC (QFP44)
730826
827      The Type 2 PCB is used only by Super World Stadium 2001 (so far)
828      Note, this CPU PCB was tested with some of the older S12 games and
829      they worked fine, so it seems to be 100% compatible with all S12 games.
830      The older COH-700 CPU board will also work with SWS2001.
831
832
731833NETWORK PCB
732834-----------
733835SYSTEM12 HSC PCB 8661960601 (8661970601)
r1404r1405
838940      va_start( v, s_fmt );
839941      vsprintf( buf, s_fmt, v );
840942      va_end( v );
841      logerror( "%08x: %s", activecpu_get_pc(), buf );
943      if( cpu_getactivecpu() != -1 )
944      {
945         logerror( "%08x: %s", activecpu_get_pc(), buf );
946      }
947      else
948      {
949         logerror( "(timer) : %s", buf );
950      }
842951   }
843952}
844953
r1404r1405
9311040
9321041static void namcos12_rom_read( UINT32 n_address, INT32 n_size )
9331042{
934   INT32 n_left;
1043   int n_region;
1044   int n_offset;
1045
1046   INT32 n_ramleft;
1047   INT32 n_romleft;
1048
9351049   UINT32 *p_n_src;
9361050   UINT32 *p_n_dst;
9371051
938   verboselog( 1, "namcos12_rom_read( %08x, %08x )\n", n_address, n_size );
939
9401052   if( ( m_n_dmaoffset >= 0x80000000 ) || ( m_n_dmabias == 0x1f300000 ) )
9411053   {
942      p_n_src = (UINT32 *)( memory_region( REGION_USER1 ) + ( m_n_dmaoffset & 0x003fffff ) );
1054      n_region = REGION_USER1;
1055      n_offset = m_n_dmaoffset & 0x003fffff;
1056      verboselog( 1, "namcos12_rom_read( %08x, %08x ) boot %08x\n", n_address, n_size, n_offset );
9431057   }
9441058   else if( m_n_tektagdmaoffset >= 0x00000000 && m_n_tektagdmaoffset <= 0x03800000 )
9451059   {
946      p_n_src = (UINT32 *)( memory_region( REGION_USER2 ) + ( m_n_tektagdmaoffset & 0x7fffffff ) );
1060      n_region = REGION_USER2;
1061      n_offset = m_n_tektagdmaoffset & 0x7fffffff;
1062      verboselog( 1, "namcos12_rom_read( %08x, %08x ) tektag1 %08x\n", n_address, n_size, n_offset );
9471063   }
9481064   else if( m_n_tektagdmaoffset >= 0x04000000 && m_n_tektagdmaoffset <= 0x04400000 )
9491065   {
950      p_n_src = (UINT32 *)( memory_region( REGION_USER1 ) + ( m_n_tektagdmaoffset & 0x003fffff ) );
1066      n_region = REGION_USER1;
1067      n_offset = m_n_tektagdmaoffset & 0x003fffff;
1068      verboselog( 1, "namcos12_rom_read( %08x, %08x ) tektag2 %08x\n", n_address, n_size, n_offset );
9511069   }
9521070   else
9531071   {
954      p_n_src = (UINT32 *)( memory_region( REGION_USER2 ) + ( m_n_dmaoffset & 0x7fffffff ) );
1072      n_region = REGION_USER2;
1073      n_offset = m_n_dmaoffset & 0x7fffffff;
1074      verboselog( 1, "namcos12_rom_read( %08x, %08x ) game %08x\n", n_address, n_size, n_offset );
9551075   }
9561076
1077   p_n_src = (UINT32 *)( memory_region( n_region ) + n_offset );
1078   n_romleft = ( memory_region_length( n_region ) - n_offset ) / 4;
1079   if( n_size > n_romleft )
1080   {
1081      verboselog( 1, "namcos12_rom_read dma truncated %d to %d passed end of rom\n", n_size, n_romleft );
1082      n_size = n_romleft;
1083   }
9571084
9581085   p_n_dst = &g_p_n_psxram[ n_address / 4 ];
959
960   n_left = ( g_n_psxramsize - n_address ) / 4;
961   if( n_size > n_left )
1086   n_ramleft = ( g_n_psxramsize - n_address ) / 4;
1087   if( n_size > n_ramleft )
9621088   {
963      n_size = n_left;
1089      verboselog( 1, "namcos12_rom_read dma truncated %d to %d passed end of ram\n", n_size, n_ramleft );
1090      n_size = n_ramleft;
9641091   }
1092
9651093   while( n_size > 0 )
9661094   {
9671095      *( p_n_dst++ ) = *( p_n_src++ );
r1404r1405
11311259      strcmp( machine->gamedrv->name, "tenkomoj" ) == 0 ||
11321260      strcmp( machine->gamedrv->name, "tenkomor" ) == 0 ||
11331261      strcmp( machine->gamedrv->name, "ptblank2" ) == 0 ||
1262      strcmp( machine->gamedrv->name, "sws2000" ) == 0 ||
1263      strcmp( machine->gamedrv->name, "sws2001" ) == 0 ||
11341264      strcmp( machine->gamedrv->name, "ghlpanic" ) == 0 )
11351265   {
11361266      /* this is based on guesswork, it might not even be keycus. */
r1404r1405
11921322{
11931323   UINT8 ret = 0;
11941324   mame_system_time systime;
1195   static int weekday[7] = { 7, 1, 2, 3, 4, 5, 6 };
1325   static const int weekday[7] = { 7, 1, 2, 3, 4, 5, 6 };
11961326
11971327   mame_get_current_datetime(Machine, &systime);
11981328
r1404r1405
13281458   AM_RANGE(H8_ADC_3_H, H8_ADC_3_L) AM_NOP
13291459ADDRESS_MAP_END
13301460
1331static struct C352interface c352_interface =
1461static const struct C352interface c352_interface =
13321462{
13331463   REGION_SOUND1
13341464};
r1404r1405
16661796   ROM_LOAD( "ob1wave.ic2",           0x000000, 0x800000, CRC(e7bc7202) SHA1(f0f598304866ebe62642eaac6b7d8709baa14fe1) )
16671797ROM_END
16681798
1799ROM_START( kaiunqz )
1800   ROM_REGION32_LE( 0x00400000, REGION_USER1, 0 ) /* main prg */
1801        ROM_LOAD16_BYTE( "kw1vera.2l",   0x000000, 0x200000, CRC(fd1d2324) SHA1(eedb4627dfa17e9aac2c99592628f1fa7060edb5) )
1802        ROM_LOAD16_BYTE( "kw1vera.2p",   0x000001, 0x200000, CRC(d8bdea6b) SHA1(d32118846a1f43eecff7f56dcda03adf04975784) )
1803
1804   ROM_REGION32_LE( 0x3000000, REGION_USER2, 0 ) /* main data */
1805        ROM_LOAD16_BYTE( "kw1rom0l.12",  0x0000000, 0x800000, CRC(e0768f0b) SHA1(3ffec7c789a95fcff7f06432723f155b99a20c42) )
1806        ROM_LOAD16_BYTE( "kw1rom0u.11",  0x0000001, 0x800000, CRC(04101a16) SHA1(c2d79333ee382e2fea229bba23918fb5f88a25d4) )
1807        ROM_LOAD16_BYTE( "kw1rom1l.10",  0x1000000, 0x800000, CRC(6a4edfa6) SHA1(a59fa28446b28db28b38368c794af71e673f69a2) )
1808        ROM_LOAD16_BYTE( "kw1rom1u.9",   0x1000001, 0x800000, CRC(e6150b0d) SHA1(7dd1ba524246aea007e7bd6d3e7d457033b23a09) )
1809        ROM_LOAD16_BYTE( "kw1rom2l.7",   0x2000000, 0x800000, CRC(21c376e4) SHA1(4b82494c1e13ebcea3c4e97803c0667be73bf6ae) )
1810        ROM_LOAD16_BYTE( "kw1rom2u.8",   0x2000001, 0x800000, CRC(d850c222) SHA1(802c1782b323802eae871e2b9ccc5eae34277861) )
1811
1812   ROM_REGION( 0x0080000, REGION_CPU2, 0 ) /* sound prg */
1813        ROM_LOAD16_WORD_SWAP( "kw1vera.11s",  0x000000, 0x080000, CRC(d863fafa) SHA1(3c2bb38c24165e3a1a4d1d257fcfc019b63d5199) )
1814
1815   ROM_REGION( 0x0800000, REGION_SOUND1, 0 ) /* samples */
1816        ROM_LOAD( "kw1wave0.2",   0x000000, 0x800000, CRC(060e52ae) SHA1(7ea95cae9d3c648163b225d0c7d365644be90241) )
1817ROM_END
1818
16691819ROM_START( lbgrande )
16701820   ROM_REGION32_LE( 0x00400000, REGION_USER1, 0 ) /* main prg */
16711821   ROM_LOAD16_BYTE( "lg2vera.2l",   0x0000000, 0x200000, CRC(5ed6b152) SHA1(fdab457862bd6e0a3178c9329bd0978b6aa3ae2f) )
r1404r1405
18892039   ROM_LOAD( "soc1wave0.2",         0x0000000, 0x800000, CRC(c100618d) SHA1(b87f88ee42ad9c5affa674e5f816d902143fed99) )
18902040ROM_END
18912041
2042ROM_START( sws98 )
2043   ROM_REGION32_LE( 0x00400000, REGION_USER1, 0 ) /* main prg */
2044   ROM_LOAD16_BYTE( "ss81vera.2l",  0x0000000, 0x200000, CRC(94b1f34c) SHA1(0c8491fda366b5b2874e5f49959dccd11d372e46) )
2045   ROM_LOAD16_BYTE( "ss81vera.2p",  0x0000001, 0x200000, CRC(7d0ed33d) SHA1(34342ce57b29ee15c6279c099bb145ac7ad262f3) )
2046
2047   ROM_REGION32_LE( 0x2000000, REGION_USER2, 0 ) /* main data */
2048   ROM_LOAD16_BYTE( "ss81fl1l.9",   0x1000000, 0x200000, CRC(b0b5dc77) SHA1(abce4e6ae60858b7c7408d10975b7a1e0d183115) )
2049   ROM_LOAD16_BYTE( "ss81fl1u.10",  0x1000001, 0x200000, CRC(e526dba5) SHA1(889fdfba17282eb05a3e254af81ee15c3e16acc4) )
2050   ROM_LOAD16_BYTE( "ss81fl2l.7",   0x1400000, 0x200000, CRC(2dc6f6b5) SHA1(e6c7bb804d7d027acca5adb15b0bb95321905ff3) )
2051   ROM_LOAD16_BYTE( "ss81fl2u.8",   0x1400001, 0x200000, CRC(c8341c9f) SHA1(b7c5a960a238e963c7ec5bdb0751a8730d3b09f7) )
2052   ROM_LOAD16_BYTE( "ss81fl3l.5",   0x1800000, 0x200000, CRC(ce5d2a96) SHA1(08f3955e1ce949ce436f6f2f19fd42204682ae8c) )
2053   ROM_LOAD16_BYTE( "ss81fl3u.6",   0x1800001, 0x200000, CRC(02df4df8) SHA1(01fd66c905cde9ca073dc4b6dbd826c5fe96b79b) )
2054
2055   ROM_REGION( 0x0080000, REGION_CPU2, 0 ) /* sound prg */
2056   ROM_LOAD16_WORD_SWAP( "ss81vera.11s", 0x0000000, 0x080000, CRC(c6bc5c31) SHA1(c6ef46c3fa8a7749618126d360e614ea6c8d9c54) )
2057
2058   ROM_REGION( 0x1000000, REGION_SOUND1, 0 ) /* samples */
2059   ROM_LOAD( "ss81wave0.2",         0x0000000, 0x800000, CRC(1c5e2ff1) SHA1(4f29dfd49f6b5c3ca3b758823d368051354bd673) )
2060   ROM_LOAD( "ss81wave1.1",         0x0800000, 0x800000, CRC(5f4c8861) SHA1(baee7182c32bc064d805de5a16948faf78941ac4) )
2061ROM_END
2062
18922063ROM_START( sws99 )
18932064   ROM_REGION32_LE( 0x00400000, REGION_USER1, 0 ) /* main prg */
18942065   ROM_LOAD16_BYTE( "ss91vera.2e",  0x0000000, 0x200000, CRC(4dd928d7) SHA1(d76c0f52d1a2cd101a6879e6ff57ed1c52b5e228) )
r1404r1405
19112082   ROM_LOAD( "ss91wave1.1",         0x0800000, 0x800000, CRC(5f4c8861) SHA1(baee7182c32bc064d805de5a16948faf78941ac4) )
19122083ROM_END
19132084
2085ROM_START( sws2000 )
2086   ROM_REGION32_LE( 0x00400000, REGION_USER1, 0 ) /* main prg */
2087        ROM_LOAD16_BYTE( "ss01vera.2l",  0x000000, 0x200000, CRC(6ddbdcaa) SHA1(cff31d75e7780851b2c2c025ee34fd8990e2f502) )
2088        ROM_LOAD16_BYTE( "ss01vera.2p",  0x000001, 0x200000, CRC(6ade7d28) SHA1(3e8d7bc9a284324c4de0ac265872b613d108cb57) )
2089
2090   ROM_REGION32_LE( 0x2000000, REGION_USER2, 0 ) /* main data */
2091        ROM_LOAD( "ss01rom0.9",   0x0000000, 0x800000, CRC(c08cc59c) SHA1(f2d8064491c98acbb40260d7f13d0f9b394c1383) )
2092        ROM_LOAD( "ss01rom1.10",  0x0800000, 0x800000, CRC(d4aa1dc6) SHA1(68fcb60aadf35668d7d746da1e29d5d985e40aec) )
2093        ROM_LOAD( "ss01rom2.11",  0x1000000, 0x800000, CRC(3371904a) SHA1(58bbf98a44560bc021bac4bc513fe89deea85b50) )
2094        ROM_LOAD16_BYTE( "ss01fl3l.7",   0x1800000, 0x200000, CRC(35bad813) SHA1(19ceffb78695c8c22b30659aad56ac237ffb56ac) )
2095        ROM_LOAD16_BYTE( "ss01fl3h.8",   0x1800001, 0x200000, CRC(a14828fc) SHA1(fd8a052451f74f420f4a4a2b902e0c2e83e3239b) )
2096
2097   ROM_REGION( 0x0080000, REGION_CPU2, 0 ) /* sound prg */
2098        ROM_LOAD16_WORD_SWAP( "ss01vera.11s", 0x000000, 0x080000, CRC(641e6584) SHA1(dfc0ac21bea5b19dbce5d50fb681854889d756dc) )
2099
2100   ROM_REGION( 0x1000000, REGION_SOUND1, 0 ) /* samples */
2101        ROM_LOAD( "ss01wave0.2",  0x000000, 0x800000, CRC(1c5e2ff1) SHA1(4f29dfd49f6b5c3ca3b758823d368051354bd673) )
2102        ROM_LOAD( "ss01wave1.1",  0x800000, 0x800000, CRC(5f4c8861) SHA1(baee7182c32bc064d805de5a16948faf78941ac4) )
2103ROM_END
2104
2105ROM_START( sws2001 )
2106   ROM_REGION32_LE( 0x00400000, REGION_USER1, 0 ) /* main prg */
2107        ROM_LOAD16_BYTE( "ss11vera.2l",  0x000000, 0x200000, CRC(a7b4dbe5) SHA1(1bcb8d127388e2ead9ca04b527779896c69daf7f) )
2108        ROM_LOAD16_BYTE( "ss11vera.2p",  0x000001, 0x200000, CRC(3ef76b4e) SHA1(34c21b6002d3f88aa3f4b4606c8aace24be92920) )
2109
2110   ROM_REGION32_LE( 0x2800000, REGION_USER2, 0 ) /* main data */
2111        ROM_LOAD( "ss01rom0.9",   0x0000000, 0x800000, CRC(c08cc59c) SHA1(f2d8064491c98acbb40260d7f13d0f9b394c1383) )
2112        ROM_LOAD( "ss01rom1.10",  0x0800000, 0x800000, CRC(d4aa1dc6) SHA1(68fcb60aadf35668d7d746da1e29d5d985e40aec) )
2113        ROM_LOAD( "ss01rom2.11",  0x1000000, 0x800000, CRC(3371904a) SHA1(58bbf98a44560bc021bac4bc513fe89deea85b50) )
2114        ROM_LOAD16_BYTE( "ss11fl1l.5",   0x1800000, 0x800000, CRC(0546a2b4) SHA1(b61457c9c5136f94ace48e83de8043ce20ca4d99) )
2115        ROM_LOAD16_BYTE( "ss11fl1u.6",   0x1800001, 0x800000, CRC(b3de0b2c) SHA1(a89d3a2eb0952a98cc4765af2897b94136ca58ad) )
2116
2117   ROM_REGION( 0x0080000, REGION_CPU2, 0 ) /* sound prg */
2118        ROM_LOAD16_WORD_SWAP( "ss01vera.11s", 0x000000, 0x080000, CRC(641e6584) SHA1(dfc0ac21bea5b19dbce5d50fb681854889d756dc) )
2119
2120   ROM_REGION( 0x1000000, REGION_SOUND1, 0 ) /* samples */
2121        ROM_LOAD( "ss01wave0.2",  0x000000, 0x800000, CRC(1c5e2ff1) SHA1(4f29dfd49f6b5c3ca3b758823d368051354bd673) )
2122        ROM_LOAD( "ss01wave1.1",  0x800000, 0x800000, CRC(5f4c8861) SHA1(baee7182c32bc064d805de5a16948faf78941ac4) )
2123ROM_END
2124
19142125ROM_START( tekken3 )
19152126   ROM_REGION32_LE( 0x00400000, REGION_USER1, 0 ) /* main prg */
19162127   ROM_LOAD16_BYTE( "tet1vere.2e",  0x0000000, 0x200000, CRC(8b01113b) SHA1(45fdfd58293641ed16bc59c633a85a9cf64ccbaf) )
r1404r1405
21492360   ROM_LOAD( "tkm1wave1.1",  0x0800000, 0x800000, CRC(7567796b) SHA1(99e4b867477da2ccddfa9bebc4be84adc5cba53c) )
21502361ROM_END
21512362
2363ROM_START( toukon3 )
2364   ROM_REGION32_LE( 0x00400000, REGION_USER1, 0 ) /* main prg */
2365   ROM_LOAD16_BYTE( "tr1vera.2e",  0x000000, 0x200000, CRC(126ebb73) SHA1(de429e335e03f2b5116fc50f556a5507475a0535) )
2366   ROM_LOAD16_BYTE( "tr1vera.2j",  0x000001, 0x200000, CRC(2edb3ad2) SHA1(d1d2d78b781c7f6fb5a201785295daa825ad057e) )
2367
2368   ROM_REGION32_LE( 0x1c00000, REGION_USER2, 0 ) /* main data */
2369   ROM_LOAD16_BYTE( "tr1rom0l.6", 0x0000000, 0x400000, CRC(42946d26) SHA1(dc7944cb6daceda41ecee7a4e3f549cba916ab87) )
2370   ROM_LOAD16_BYTE( "tr1rom0u.9", 0x0000001, 0x400000, CRC(e3cd0be0) SHA1(f27d14cd086b5961be33e635662aca89a5e8c857) )
2371
2372   ROM_REGION( 0x0080000, REGION_CPU2, 0 ) /* sound prg */
2373   ROM_LOAD16_WORD_SWAP( "tr1vera.11s", 0x0000000, 0x080000, CRC(f9ecbd19) SHA1(ad64f95ef85ee5c45dcf15217ea5adff61fddba6) )
2374
2375   ROM_REGION( 0x1000000, REGION_SOUND1, 0 ) /* samples */
2376   ROM_LOAD( "tr1wave0.5",  0x0000000, 0x400000, CRC(07d10e55) SHA1(3af8f7019a221981984741181b6be98e2315d441) )
2377   ROM_LOAD( "tr1wave1.4",  0x0400000, 0x400000, CRC(34539cdd) SHA1(afb7079c0f447fbda285a5b97a37c04baf26db75) )
2378ROM_END
2379
21522380GAME( 1996, tekken3,   0,        coh700,   namcos12, namcos12, ROT0, "Namco",         "Tekken 3 (TET1/VER.E1)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC006 */
21532381GAME( 1996, tekken3a,  tekken3,  coh700,   namcos12, namcos12, ROT0, "Namco",         "Tekken 3 (TET2/VER.B)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC006 */
21542382GAME( 1996, tekken3b,  tekken3,  coh700,   namcos12, namcos12, ROT0, "Namco",         "Tekken 3 (TET3/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC006 */
21552383GAME( 1996, tekken3c,  tekken3,  coh700,   namcos12, namcos12, ROT0, "Namco",         "Tekken 3 (TET2/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC006 */
21562384GAME( 1997, lbgrande,  0,        coh700,   namcos12, namcos12, ROT0, "Namco",         "Libero Grande (LG2/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC006 */
2385GAME( 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 */
21572386GAME( 1998, soulclbr,  0,        coh700,   namcos12, namcos12, ROT0, "Namco",         "Soul Calibur (SOC14/VER.C)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
21582387GAME( 1998, soulclba,  soulclbr, coh700,   namcos12, namcos12, ROT0, "Namco",         "Soul Calibur (SOC11/VER.C)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) /* KC020 */
21592388GAME( 1998, soulclbb,  soulclbr, coh700,   namcos12, namcos12, ROT0, "Namco",         "Soul Calibur (SOC13/VER.B)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) /* KC020 */
r1404r1405
21612390GAME( 1998, soulclbd,  soulclbr, coh700,   namcos12, namcos12, ROT0, "Namco",         "Soul Calibur (SOC11/VER.A2)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) /* KC020 */
21622391GAME( 1998, ehrgeiz,   0,        coh700,   namcos12, namcos12, ROT0, "Square/Namco",  "Ehrgeiz (EG3/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC021 */
21632392GAME( 1998, ehrgeiza,  ehrgeiz,  coh700,   namcos12, namcos12, ROT0, "Square/Namco",  "Ehrgeiz (EG2/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC021 */
2393GAME( 1999, kaiunqz,   0,        coh700,   namcos12, namcos12, ROT0, "Namco",         "Kaiun Quiz (KW1/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* KC050 */
21642394GAME( 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 */
2395GAME( 1998, sws98,     0,        coh700,   namcos12, namcos12, ROT0, "Namco",         "Super World Stadium '98 (SS81/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC0?? */
21652396GAME( 1998, tenkomor,  0,        coh700,   namcos12, namcos12, ROT90, "Namco",        "Tenkomori Shooting (TKM2/VER.A1)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC036 */
21662397GAME( 1998, tenkomoj,  tenkomor, coh700,   namcos12, namcos12, ROT90, "Namco",        "Tenkomori Shooting (TKM1/VER.A1)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC036 */
21672398GAME( 1998, fgtlayer,  0,        coh700,   namcos12, namcos12, ROT0, "Arika/Namco",   "Fighting Layer (FTL0/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC037 */
r1404r1405
21792410GAME( 1999, aquarush,  0,        coh700,   namcos12, namcos12, ROT0, "Namco",         "Aqua Rush (AQ1/VER.A1)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC053 */
21802411GAME( 1999, golgo13,   0,        coh700,   golgo13,  golgo13,  ROT0, "Raizing/Namco", "Golgo 13 (GLG1/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC054 */
21812412GAME( 1999, g13knd,    0,        coh700,   golgo13,  golgo13,  ROT0, "Raizing/Namco", "Golgo 13 Kiseki no Dandou (GLS1/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC059 */
2413GAME( 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 */
2414GAME( 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 */
2415
src/mame/drivers/scramble.c
r1404r1405
19301930   GFXDECODE_ENTRY( REGION_GFX1, 0x0000, ad2083_spritelayout,  0, 8 )
19311931GFXDECODE_END
19321932
1933static struct AY8910interface scramble_ay8910_interface_2 =
1933static const struct AY8910interface scramble_ay8910_interface_2 =
19341934{
19351935   soundlatch_r,
19361936   scramble_portB_r
19371937};
19381938
1939static struct AY8910interface sfx_ay8910_interface_1 =
1939static const struct AY8910interface sfx_ay8910_interface_1 =
19401940{
19411941   0,
19421942   0,
r1404r1405
19441944   sfx_sh_irqtrigger_w
19451945};
19461946
1947static struct AY8910interface explorer_ay8910_interface_1 =
1947static const struct AY8910interface explorer_ay8910_interface_1 =
19481948{
19491949   scramble_portB_r
19501950};
19511951
1952static struct AY8910interface explorer_ay8910_interface_2 =
1952static const struct AY8910interface explorer_ay8910_interface_2 =
19531953{
19541954   hotshock_soundlatch_r
19551955};
19561956
1957static struct AY8910interface hotshock_ay8910_interface_2 =
1957static const struct AY8910interface hotshock_ay8910_interface_2 =
19581958{
19591959   hotshock_soundlatch_r,
19601960   scramble_portB_r
19611961};
19621962
1963static struct AY8910interface scorpion_ay8910_interface_1 =
1963static const struct AY8910interface scorpion_ay8910_interface_1 =
19641964{
19651965   0,
19661966   0,
r1404r1405
19681968   scorpion_sound_cmd_w,
19691969};
19701970
1971static struct AY8910interface triplep_ay8910_interface =
1971static const struct AY8910interface triplep_ay8910_interface =
19721972{
19731973   0
19741974};
19751975
1976static struct TMS5110interface tms5110_interface =
1976static const struct TMS5110interface tms5110_interface =
19771977{
19781978   0,                     /* irq callback function */
19791979   ad2083_speech_rom_read_bit   /* M0 callback function. Called whenever chip requests a single bit of data */
r1404r1405
21692169   AM_RANGE(0x80, 0x80) AM_WRITE(AY8910_control_port_0_w)
21702170ADDRESS_MAP_END
21712171
2172static struct AY8910interface frogger_ay8910_interface =
2172static const struct AY8910interface frogger_ay8910_interface =
21732173{
21742174   soundlatch_r,
21752175   frogger_portB_r
src/mame/drivers/system18.c
r1404r1405
184184      cpunum_set_input_line(1, INPUT_LINE_NMI, PULSE_LINE);
185185}
186186
187static struct MSM5205interface shdancbl_msm5205_interface =
187static const struct MSM5205interface shdancbl_msm5205_interface =
188188{
189189   shdancbl_msm5205_callback,
190190   MSM5205_S48_4B
src/mame/drivers/missb2.c
r1404r1405
349349//  cpunum_set_input_line(2,0,irq ? ASSERT_LINE : CLEAR_LINE);
350350}
351351
352static struct YM3526interface ym3526_interface =
352static const struct YM3526interface ym3526_interface =
353353{
354354   irqhandler
355355};
src/mame/drivers/pitnrun.c
r1404r1405
271271   8*8*2
272272};
273273
274static struct AY8910interface ay8910_interface =
274static const struct AY8910interface ay8910_interface =
275275{
276276   soundlatch_r,
277277   soundlatch_r
src/mame/drivers/ddealer.c
r1404r1405
213213
214214static READ16_HANDLER( ddealer_mcu_r )
215215{
216   static int resp[] =
216   static const int resp[] =
217217   {
218218      0x93, 0xc7, 0x00, 0x8000,
219219      0x2d, 0x6d, 0x00, 0x8000,
src/mame/drivers/liberatr.c
r1404r1405
357357 *
358358 *************************************/
359359
360static struct POKEYinterface pokey_interface_1 =
360static const struct POKEYinterface pokey_interface_1 =
361361{
362362   { 0 },
363363   input_port_3_r
364364};
365365
366366
367static struct POKEYinterface pokey_interface_2 =
367static const struct POKEYinterface pokey_interface_2 =
368368{
369369   { 0 },
370370   input_port_2_r
src/mame/drivers/tehkanwc.c
r1404r1405
772772
773773
774774
775static struct AY8910interface ay8910_interface_1 =
775static const struct AY8910interface ay8910_interface_1 =
776776{
777777   0,
778778   0,
r1404r1405
780780   tehkanwc_portB_w
781781};
782782
783static struct AY8910interface ay8910_interface_2 =
783static const struct AY8910interface ay8910_interface_2 =
784784{
785785   tehkanwc_portA_r,
786786   tehkanwc_portB_r
787787};
788788
789static struct MSM5205interface msm5205_interface =
789static const struct MSM5205interface msm5205_interface =
790790{
791791   tehkanwc_adpcm_int,   /* interrupt function */
792792   MSM5205_S48_4B      /* 8KHz               */
src/mame/drivers/citycon.c
r1404r1405
196196
197197
198198
199static struct YM2203interface ym2203_interface =
199static const struct YM2203interface ym2203_interface =
200200{
201201   soundlatch_r,
202202   soundlatch2_r,
src/mame/drivers/suprridr.c
r1404r1405
307307 *
308308 *************************************/
309309
310static struct AY8910interface ay8910_interface =
310static const struct AY8910interface ay8910_interface =
311311{
312312   sound_data_r
313313};
src/mame/drivers/spy.c
r1404r1405
507507   K007232_set_volume(1,1,0,(v & 0x0f) * 0x11);
508508}
509509
510static struct K007232_interface k007232_interface_1 =
510static const struct K007232_interface k007232_interface_1 =
511511{
512512   REGION_SOUND1,
513513   volume_callback0
514514};
515515
516static struct K007232_interface k007232_interface_2 =
516static const struct K007232_interface k007232_interface_2 =
517517{
518518   REGION_SOUND2,
519519   volume_callback1
r1404r1405
525525   cpunum_set_input_line(1, INPUT_LINE_NMI, linestate);
526526}
527527
528static struct YM3812interface ym3812_interface =
528static const struct YM3812interface ym3812_interface =
529529{
530530   irqhandler
531531};
src/mame/drivers/psikyo.c
r1404r1405
15521552***************************************************************************/
15531553
15541554
1555static struct YM2610interface sngkace_ym2610_interface =
1555static const struct YM2610interface sngkace_ym2610_interface =
15561556{
15571557   sound_irq,   /* irq */
15581558   REGION_SOUND1,   /* delta_t */
r1404r1405
16061606***************************************************************************/
16071607
16081608
1609static struct YM2610interface gunbird_ym2610_interface =
1609static const struct YM2610interface gunbird_ym2610_interface =
16101610{
16111611   sound_irq,   /* irq */
16121612   REGION_SOUND1,   /* delta_t */
r1404r1405
16691669      cpunum_set_input_line(1, 0, CLEAR_LINE);
16701670}
16711671
1672static struct YMF278B_interface ymf278b_interface =
1672static const struct YMF278B_interface ymf278b_interface =
16731673{
16741674   REGION_SOUND1,
16751675   irqhandler
src/mame/drivers/model3.c
r1404r1405
967967   }
968968}
969969
970static SCSIConfigTable scsi_dev_table =
970static const SCSIConfigTable scsi_dev_table =
971971{
972972   1, /* 1 SCSI device */
973973   {
r1404r1405
975975   }
976976};
977977
978static struct LSI53C810interface scsi_intf =
978static const struct LSI53C810interface scsi_intf =
979979{
980980   &scsi_dev_table,  /* SCSI device table */
981981   &scsi_irq_callback,
r1404r1405
13331333
13341334static int prot_data_ptr = 0;
13351335
1336static UINT16 vs299_prot_data[] =
1336static const UINT16 vs299_prot_data[] =
13371337{
13381338   0xc800, 0x4a20, 0x5041, 0x4e41, 0x4920, 0x4154, 0x594c, 0x4220,
13391339   0x4152, 0x4953, 0x204c, 0x5241, 0x4547, 0x544e, 0x4e49, 0x2041,
r1404r1405
13501350   0x4149, 0x4620, 0x5f43, 0x4553, 0x4147
13511351};
13521352
1353static UINT16 swt_prot_data[] =
1353static const UINT16 swt_prot_data[] =
13541354{
13551355   0xffff,
13561356   0x3d3d, 0x3d3d, 0x203d, 0x5453, 0x5241, 0x5720, 0x5241, 0x2053,
r1404r1405
13621362   0x614b, 0x6f79, 0x6f6b, 0x5920, 0x6d61, 0x6d61, 0x746f, 0x0a6f,
13631363};
13641364
1365static UINT16 fvipers2_prot_data[] =
1365static const UINT16 fvipers2_prot_data[] =
13661366{
13671367   0x2a2a,
13681368   0x2a2a, 0x2a2a, 0x2a2a, 0x2a2a, 0x2a2a, 0x2a2a, 0x202a, 0x5b5b,
r1404r1405
13751375   0x2e64, 0x2a20, 0x2a2a, 0x2a2a, 0x2a2a, 0x2a2a, 0x2a2a, 0x2a2a,
13761376};
13771377
1378static UINT16 spikeout_prot_data[] =
1378static const UINT16 spikeout_prot_data[] =
13791379{
13801380   0x0000,
13811381   0x4f4d, 0x4544, 0x2d4c, 0x2033, 0x7953, 0x7473, 0x6d65, 0x5020,
r1404r1405
13861386   0x6465, 0x202e, 0x2020, 0x0020
13871387};
13881388
1389static UINT16 eca_prot_data[] =
1389static const UINT16 eca_prot_data[] =
13901390{
13911391   0x0000,
13921392    0x2d2f, 0x202d, 0x4d45, 0x5245, 0x4547, 0x434e, 0x2059, 0x4143,
r1404r1405
40034003   }
40044004}
40054005
4006static struct SCSPinterface scsp_interface =
4006static const struct SCSPinterface scsp_interface =
40074007{
40084008   REGION_CPU2,
40094009   0,
40104010   scsp_irq
40114011};
40124012
4013static struct SCSPinterface scsp2_interface =
4013static const struct SCSPinterface scsp2_interface =
40144014{
40154015   REGION_SOUND3,
40164016   0,
r1404r1405
40424042   model3_vblank &= 1;
40434043}
40444044
4045static ppc_config model3_10 =
4045static const ppc_config model3_10 =
40464046{
40474047   PPC_MODEL_603E,      /* 603e, Stretch, 1.3 */
40484048   0x10,            /* Multiplier 1, Bus = 66MHz, Core = 66MHz */
40494049   BUS_FREQUENCY_66MHZ
40504050};
40514051
4052static ppc_config model3_15 =
4052static const ppc_config model3_15 =
40534053{
40544054   PPC_MODEL_603E,      /* 603e, Stretch, 1.3 */
40554055   0x15,            /* Multiplier 1.5, Bus = 66MHz, Core = 100MHz */
40564056   BUS_FREQUENCY_66MHZ
40574057};
40584058
4059static ppc_config model3_2x =
4059static const ppc_config model3_2x =
40604060{
40614061   PPC_MODEL_603R,      /* 603e-PID7t, Goldeneye, 2.1 */
40624062   0x25,            /* Multiplier 2.5, Bus = 66MHz, Core = 166MHz */
src/mame/drivers/namcos21.c
r1404r1405
15021502   GFXDECODE_ENTRY( REGION_GFX1, 0x000000, tile_layout,  0x1000, 0x10 )
15031503GFXDECODE_END
15041504
1505static struct C140interface C140_interface_typeA =
1505static const struct C140interface C140_interface_typeA =
15061506{
15071507   C140_TYPE_SYSTEM21_A,
15081508   REGION_SOUND1
15091509};
15101510
1511static struct C140interface C140_interface_typeB =
1511static const struct C140interface C140_interface_typeB =
15121512{
15131513   C140_TYPE_SYSTEM21_B,
15141514   REGION_SOUND1
src/mame/drivers/pgm.c
r1404r1405
460460   cpunum_set_input_line(1, 0, level);
461461}
462462
463static struct ics2115_interface pgm_ics2115_interface = {
463static const struct ics2115_interface pgm_ics2115_interface = {
464464   REGION_SOUND1,
465465   sound_irq
466466};
src/mame/drivers/gameplan.c
r1404r1405
285285}
286286
287287
288static struct via6522_interface gameplan_via_0_interface =
288static const struct via6522_interface gameplan_via_0_interface =
289289{
290290   0, 0,                           /*inputs : A/B         */
291291   /*vblank*/0, 0, 0, 0,               /*inputs : CA/B1,CA/B2 */
r1404r1405
295295};
296296
297297
298static struct via6522_interface leprechn_via_0_interface =
298static const struct via6522_interface leprechn_via_0_interface =
299299{
300300   0, 0,                           /*inputs : A/B         */
301301   /*vblank*/0, 0, 0, 0,               /*inputs : CA/B1,CA/B2 */
r1404r1405
365365}
366366
367367
368static struct via6522_interface via_1_interface =
368static const struct via6522_interface via_1_interface =
369369{
370370   io_port_r, 0,    /*inputs : A/B         */
371371   0, 0, 0, 0,       /*inputs : CA/B1,CA/B2 */
r1404r1405
406406}
407407
408408
409static struct via6522_interface via_2_interface =
409static const struct via6522_interface via_2_interface =
410410{
411411   0, soundlatch2_r,                 /*inputs : A/B         */
412412   0, 0, 0, 0,                       /*inputs : CA/B1,CA/B2 */
r1404r1405
13951395
13961396
13971397
1398static struct AY8910interface ay8910_interface =
1398static const struct AY8910interface ay8910_interface =
13991399{
14001400   input_port_6_r,
14011401   input_port_7_r,
src/mame/drivers/capbowl.c
r1404r1405
329329 *
330330 *************************************/
331331
332static struct YM2203interface ym2203_interface =
332static const struct YM2203interface ym2203_interface =
333333{
334334   ticket_dispenser_r,
335335   0,
src/mame/drivers/darius.c
r1404r1405
547547   }
548548}
549549
550static struct MSM5205interface msm5205_interface =
550static const struct MSM5205interface msm5205_interface =
551551{
552552   darius_adpcm_int,   /* interrupt function */
553553   MSM5205_S48_4B      /* 8KHz   */
r1404r1405
832832   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
833833}
834834
835static struct YM2203interface ym2203_interface_1 =
835static const struct YM2203interface ym2203_interface_1 =
836836{
837837   0,      /* portA read */
838838   0,
r1404r1405
841841   irqhandler
842842};
843843
844static struct YM2203interface ym2203_interface_2 =
844static const struct YM2203interface ym2203_interface_2 =
845845{
846846   0,      /* portA read */
847847   0,
src/mame/drivers/kinst.c
r1404r1405
259259}
260260
261261
262static struct ide_interface ide_intf =
262static const struct ide_interface ide_intf =
263263{
264264   ide_interrupt
265265};
r1404r1405
643643 *
644644 *************************************/
645645
646static struct mips3_config config =
646static const struct mips3_config config =
647647{
648648   16384,            /* code cache size */
649649   16384            /* data cache size */
src/mame/drivers/st0016.c
r1404r1405
402402}
403403
404404extern UINT8 *st0016_charram;
405static struct ST0016interface st0016_interface =
405static const struct ST0016interface st0016_interface =
406406{
407407   &st0016_charram
408408};
src/mame/drivers/cchasm.c
r1404r1405
159159 *
160160 *************************************/
161161
162static struct z80_irq_daisy_chain daisy_chain[] =
162static const struct z80_irq_daisy_chain daisy_chain[] =
163163{
164164   { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 }, /* CTC number 0 */
165165   { 0,0,0,0,-1 }       /* end mark */
src/mame/drivers/sbasketb.c
r1404r1405
227227GFXDECODE_END
228228
229229
230static struct VLM5030interface sbasketb_vlm5030_interface =
230static const struct VLM5030interface sbasketb_vlm5030_interface =
231231{
232232   REGION_SOUND1,   /* memory region  */
233233   0           /* memory size    */
src/mame/drivers/funkyjet.c
r1404r1405
357357   cpunum_set_input_line(1,1,state); /* IRQ 2 */
358358}
359359
360static struct YM2151interface ym2151_interface =
360static const struct YM2151interface ym2151_interface =
361361{
362362   sound_irq
363363};
src/mame/drivers/ksayakyu.c
r1404r1405
179179   //DAC ? communication with main cpu ?
180180}
181181
182static struct AY8910interface ay8910_interface_1 =
182static const struct AY8910interface ay8910_interface_1 =
183183{
184184   soundlatch_r,
185185   0,
r1404r1405
187187   dummy_w
188188};
189189
190static struct AY8910interface ay8910_interface_2 =
190static const struct AY8910interface ay8910_interface_2 =
191191{
192192   0,
193193   0,
src/mame/drivers/suprgolf.c
r1404r1405
261261//  cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
262262}
263263
264static struct YM2203interface ym2203_interface =
264static const struct YM2203interface ym2203_interface =
265265{
266266   input_port_5_r,
267267   input_port_6_r,
src/mame/drivers/xexex.c
r1404r1405
464464
465465
466466
467static struct K054539interface k054539_interface =
467static const struct K054539interface k054539_interface =
468468{
469469   REGION_SOUND1,
470470   ym_set_mixing
src/mame/drivers/ironhors.c
r1404r1405
382382GFXDECODE_END
383383
384384
385static struct YM2203interface ym2203_interface =
385static const struct YM2203interface ym2203_interface =
386386{
387387   0,
388388   0,
src/mame/drivers/sliver.c
r1404r1405
9393
9494static UINT16 tempbuf[8];
9595
96static int gfxlookup[][4]=
96static const int gfxlookup[][4]=
9797{
9898   { 0x0000000, 0x0000000, 512, 256 },
9999   { 0x0060000, 0x0007fa5, 512, 256 },
src/mame/drivers/konamigq.c
r1404r1405
274274   AM_RANGE(0x580000, 0x580001) AM_WRITE(MWA16_NOP) /* ?? */
275275ADDRESS_MAP_END
276276
277static struct K054539interface k054539_interface =
277static const struct K054539interface k054539_interface =
278278{
279279   REGION_SOUND1
280280};
r1404r1405
325325   psx_irq_set(0x400);
326326}
327327
328static SCSIConfigTable dev_table =
328static const SCSIConfigTable dev_table =
329329{
330330   1, /* 1 SCSI device */
331331   {
r1404r1405
333333   }
334334};
335335
336static struct AM53CF96interface scsi_intf =
336static const struct AM53CF96interface scsi_intf =
337337{
338338   &dev_table,      /* SCSI device table */
339339   &scsi_irq,      /* command completion IRQ */
src/mame/drivers/cps3.c
r1404r1405
24782478//static struct sh2_config sh2cp_conf_slave  = { 1 };
24792479
24802480
2481static struct CustomSound_interface custom_interface =
2481static const struct CustomSound_interface custom_interface =
24822482{
24832483   cps3_sh_start
24842484};
r1404r1405
24972497   cpunum_set_reg(0,SH2_VBR, 0x6000000);
24982498}
24992499
2500static SCSIConfigTable dev_table =
2500static const SCSIConfigTable dev_table =
25012501{
25022502   1,                                      /* 1 SCSI device */
25032503   { { SCSI_ID_1, 0, SCSI_DEVICE_CDROM } } /* SCSI ID 2, using CD 0, and it's a CD-ROM */
25042504};
25052505
2506static struct WD33C93interface scsi_intf =
2506static const struct WD33C93interface scsi_intf =
25072507{
25082508   &dev_table,      /* SCSI device table */
25092509   NULL         /* command completion IRQ */
src/mame/drivers/spiders.c
r1404r1405
343343}
344344
345345
346static TTL74123_interface ic60_intf =
346static const TTL74123_interface ic60_intf =
347347{
348348   TTL74123_GROUNDED,   /* the hook up type */
349349   RES_K(22),         /* resistor connected to RCext */
src/mame/drivers/mcatadv.c
r1404r1405
481481{
482482   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
483483}
484static struct YM2610interface mcatadv_ym2610_interface =
484static const struct YM2610interface mcatadv_ym2610_interface =
485485{
486486   sound_irq,   /* irq */
487487   REGION_SOUND1,   /* delta_t */
src/mame/drivers/cinemat.c
r1404r1405
957957 *
958958 *************************************/
959959
960static struct CCPUConfig config_nojmi =
960static const struct CCPUConfig config_nojmi =
961961{
962962   joystick_read,
963963   cinemat_vector_callback,
964964   0
965965};
966966
967static struct CCPUConfig config_jmi =
967static const struct CCPUConfig config_jmi =
968968{
969969   NULL,
970970   cinemat_vector_callback,
src/mame/drivers/toaplan2.c
r1404r1405
32653265   cpunum_set_input_line(1,0,linestate);
32663266}
32673267
3268static struct YM3812interface ym3812_interface =
3268static const struct YM3812interface ym3812_interface =
32693269{
32703270   irqhandler
32713271};
32723272
3273static struct YMZ280Binterface ymz280b_interface =
3273static const struct YMZ280Binterface ymz280b_interface =
32743274{
32753275   REGION_SOUND1,
32763276   bbakraid_irqhandler
src/mame/drivers/ddz.c
r1404r1405
4545INPUT_PORTS_END
4646
4747
48static struct VR0Interface vr0_interface =
48static const struct VR0Interface vr0_interface =
4949{
5050   0x04800000
5151};
src/mame/drivers/mjkjidai.c
r1404r1405
343343GFXDECODE_END
344344
345345
346static struct CustomSound_interface adpcm_interface =
346static const struct CustomSound_interface adpcm_interface =
347347{
348348   mjkjidai_adpcm_start
349349};
src/mame/drivers/jchan.c
r1404r1405
735735
736736/* sound stuff */
737737
738static struct YMZ280Binterface ymz280b_intf =
738static const struct YMZ280Binterface ymz280b_intf =
739739{
740740   REGION_SOUND1,
741741   0   // irq ?
src/mame/drivers/jailbrek.c
r1404r1405
221221
222222
223223
224static struct VLM5030interface vlm5030_interface =
224static const struct VLM5030interface vlm5030_interface =
225225{
226226   REGION_SOUND1,   /* memory region of speech rom */
227227   0           /* memory size of speech rom */
src/mame/drivers/couple.c
r1404r1405
119119}
120120
121121#if 0
122static struct AY8910interface ay8910_interface =
122static const struct AY8910interface ay8910_interface =
123123{
124124   input_port_4_r,
125125};
src/mame/drivers/mlanding.c
r1404r1405
346346   GFXDECODE_ENTRY( REGION_GFX1, 0, tiles8x8_layout, 0, 16 )
347347GFXDECODE_END
348348
349static struct MSM5205interface msm5205_interface =
349static const struct MSM5205interface msm5205_interface =
350350{
351351   ml_msm5205_vck,   /* VCK function */
352352   MSM5205_S48_4B      /* 8 kHz */
353353};
354354
355static struct YM2151interface ym2151_interface =
355static const struct YM2151interface ym2151_interface =
356356{
357357   irq_handler,
358358   sound_bankswitch_w
src/mame/drivers/tankbust.c
r1404r1405
358358   GFXDECODE_ENTRY( REGION_GFX3, 0, charlayout2,      0x60, 16  )   /* txt tilemap characters*/
359359GFXDECODE_END
360360
361static struct AY8910interface ay8910_interface =
361static const struct AY8910interface ay8910_interface =
362362{
363363   tankbust_soundlatch_r,
364364   tankbust_soundtimer_r
src/mame/drivers/wecleman.c
r1404r1405
723723   }
724724}
725725
726static struct K007232_interface hotchase_k007232_interface_1 =
726static const struct K007232_interface hotchase_k007232_interface_1 =
727727{
728728   REGION_SOUND1
729729};
730730
731static struct K007232_interface hotchase_k007232_interface_2 =
731static const struct K007232_interface hotchase_k007232_interface_2 =
732732{
733733   REGION_SOUND2
734734};
735735
736static struct K007232_interface hotchase_k007232_interface_3 =
736static const struct K007232_interface hotchase_k007232_interface_3 =
737737{
738738   REGION_SOUND3
739739};
r1404r1405
10991099      cpunum_set_input_line(0, 5, HOLD_LINE);   /* to read input ports */
11001100}
11011101
1102static struct K007232_interface wecleman_k007232_interface =
1102static const struct K007232_interface wecleman_k007232_interface =
11031103{
11041104   REGION_SOUND1   /* but the 2 channels use different ROMs !*/
11051105};
src/mame/drivers/pastelg.c
r1404r1405
191191INPUT_PORTS_END
192192
193193
194static struct AY8910interface ay8910_interface =
194static const struct AY8910interface ay8910_interface =
195195{
196196   input_port_1_r,
197197   input_port_0_r
src/mame/drivers/seattle.c
r1404r1405
587587}
588588
589589
590static struct ide_interface ide_intf =
590static const struct ide_interface ide_intf =
591591{
592592   ide_interrupt
593593};
r1404r1405
614614}
615615
616616
617static struct smc91c9x_interface ethernet_intf =
617static const struct smc91c9x_interface ethernet_intf =
618618{
619619   ethernet_interrupt
620620};
r1404r1405
24472447 *
24482448 *************************************/
24492449
2450static struct mips3_config config =
2450static const struct mips3_config config =
24512451{
24522452   16384,      /* code cache size */
24532453   16384,      /* data cache size */
src/mame/drivers/funkybee.c
r1404r1405
294294GFXDECODE_END
295295
296296
297static struct AY8910interface ay8910_interface =
297static const struct AY8910interface ay8910_interface =
298298{
299299   input_port_3_r
300300};
src/mame/drivers/btoads.c
r1404r1405
302302 *
303303 *************************************/
304304
305static tms34010_config tms_config =
305static const tms34010_config tms_config =
306306{
307307   FALSE,                     /* halt on reset */
308308   0,                        /* the screen operated on */
src/mame/drivers/tetrisp2.c
r1404r1405
995995
996996***************************************************************************/
997997
998static struct YMZ280Binterface ymz280b_intf =
998static const struct YMZ280Binterface ymz280b_intf =
999999{
10001000   REGION_SOUND1,
10011001   0   // irq
src/mame/drivers/lastduel.c
r1404r1405
234234   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
235235}
236236
237static struct YM2203interface ym2203_interface =
237static const struct YM2203interface ym2203_interface =
238238{
239239   0,0,0,0,irqhandler
240240};
src/mame/drivers/alpha68k.c
r1404r1405
359359         - Super Stingray : 0x21,0x22,0x23,0x24,0x34,0x37,0x3a,0x3d,0x40,0x43,0x46,0x49
360360    */
361361   static unsigned coinvalue=0, microcontroller_data=0;
362   static UINT8 coinage1[8][2]={{1,1},{1,5},{1,3},{2,3},{1,2},{1,6},{1,4},{3,2}};
363   static UINT8 coinage2[8][2]={{1,1},{5,1},{3,1},{7,1},{2,1},{6,1},{4,1},{8,1}};
362   static const UINT8 coinage1[8][2]={{1,1},{1,5},{1,3},{2,3},{1,2},{1,6},{1,4},{3,2}};
363   static const UINT8 coinage2[8][2]={{1,1},{5,1},{3,1},{7,1},{2,1},{6,1},{4,1},{8,1}};
364364
365365   static int latch;
366366   int source=shared_ram[offset];
r1404r1405
441441         - Gold Medalist : 0x21,0x23,0x24,0x5b
442442    */
443443   static unsigned coinvalue=0, microcontroller_data=0;
444   static UINT8 coinage1[8][2]={{1,1},{1,2},{1,3},{1,4},{1,5},{1,6},{2,3},{3,2}};
445   static UINT8 coinage2[8][2]={{1,1},{2,1},{3,1},{4,1},{5,1},{6,1},{7,1},{8,1}};
444   static const UINT8 coinage1[8][2]={{1,1},{1,2},{1,3},{1,4},{1,5},{1,6},{2,3},{3,2}};
445   static const UINT8 coinage2[8][2]={{1,1},{2,1},{3,1},{4,1},{5,1},{6,1},{7,1},{8,1}};
446446
447447   static int latch;
448448   int source=shared_ram[offset];
r1404r1405
537537         - Super Champion Baseball : 0x21,0x23,0x24
538538    */
539539   static unsigned coinvalue=0, microcontroller_data=0;
540   static UINT8 coinage1[8][2]={{1,1},{1,5},{1,3},{2,3},{1,2},{1,6},{1,4},{3,2}};
541   static UINT8 coinage2[8][2]={{1,1},{5,1},{3,1},{7,1},{2,1},{6,1},{4,1},{8,1}};
540   static const UINT8 coinage1[8][2]={{1,1},{1,5},{1,3},{2,3},{1,2},{1,6},{1,4},{3,2}};
541   static const UINT8 coinage2[8][2]={{1,1},{5,1},{3,1},{7,1},{2,1},{6,1},{4,1},{8,1}};
542542
543543   static int latch;
544544   int source=shared_ram[offset];
r1404r1405
20182018
20192019/******************************************************************************/
20202020
2021static struct AY8910interface ay8910_interface =
2021static const struct AY8910interface ay8910_interface =
20222022{
20232023   soundlatch_r
20242024};
20252025
2026static struct YM2203interface ym2203_interface =
2026static const struct YM2203interface ym2203_interface =
20272027{
20282028   soundlatch_r
20292029};
r1404r1405
20332033   cpunum_set_input_line(1, 0, (param) ? HOLD_LINE : CLEAR_LINE);
20342034}
20352035
2036static struct YM3812interface ym3812_interface =
2036static const struct YM3812interface ym3812_interface =
20372037{
20382038   YM3812_irq
20392039};
src/mame/drivers/lucky8.c
r1404r1405
357357   GFXDECODE_ENTRY( REGION_GFX2, 0x1000, spritelayout2, 0, 64 )
358358GFXDECODE_END
359359
360static struct AY8910interface ay8910_interface =
360static const struct AY8910interface ay8910_interface =
361361{
362362input_port_7_r,   // DSW3
363363input_port_8_r,   // DSW4
src/mame/drivers/namcos22.c
r1404r1405
17981798   }
17991799}
18001800
1801static struct C352interface c352_interface =
1801static const struct C352interface c352_interface =
18021802{
18031803   REGION_SOUND1
18041804};
src/mame/drivers/speglsht.c
r1404r1405
243243static GFXDECODE_START( speglsht )
244244GFXDECODE_END
245245
246static struct ST0016interface st0016_interface =
246static const struct ST0016interface st0016_interface =
247247{
248248   &st0016_charram
249249};
r1404r1405
253253   cpunum_set_input_line(1, R3000_IRQ4, ASSERT_LINE);
254254}
255255
256static struct r3000_config config =
256static const struct r3000_config config =
257257{
258258   0,
259259   4096,   /* code cache size */
src/mame/drivers/rockola.c
r1404r1405
708708
709709/* Sound Interfaces */
710710
711static struct CustomSound_interface custom_interface =
711static const struct CustomSound_interface custom_interface =
712712{
713713   rockola_sh_start
714714};
src/mame/drivers/centiped.c
r1404r1405
15951595 *
15961596 *************************************/
15971597
1598static struct AY8910interface centipdb_ay8910_interface =
1598static const struct AY8910interface centipdb_ay8910_interface =
15991599{
16001600   caterplr_rand_r
16011601};
16021602
16031603
1604static struct POKEYinterface milliped_pokey_interface_1 =
1604static const struct POKEYinterface milliped_pokey_interface_1 =
16051605{
16061606   { 0 },
16071607   input_port_4_r
16081608};
16091609
16101610
1611static struct POKEYinterface milliped_pokey_interface_2 =
1611static const struct POKEYinterface milliped_pokey_interface_2 =
16121612{
16131613   { 0 },
16141614   input_port_5_r
16151615};
16161616
16171617
1618static struct POKEYinterface warlords_pokey_interface =
1618static const struct POKEYinterface warlords_pokey_interface =
16191619{
16201620   { input_port_4_r,input_port_5_r,input_port_6_r,input_port_7_r }
16211621};
src/mame/drivers/atarisy1.c
r1404r1405
384384}
385385
386386
387static struct via6522_interface via_interface =
387static const struct via6522_interface via_interface =
388388{
389389   /*inputs : A/B         */ via_pa_r, via_pb_r,
390390   /*inputs : CA/B1,CA/B2 */ 0, 0, 0, 0,
r1404r1405
722722 *
723723 *************************************/
724724
725static struct YM2151interface ym2151_interface =
725static const struct YM2151interface ym2151_interface =
726726{
727727   atarigen_ym2151_irq_gen
728728};
src/mame/drivers/wgp.c
r1404r1405
951951   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
952952}
953953
954static struct YM2610interface ym2610_interface =
954static const struct YM2610interface ym2610_interface =
955955{
956956   irqhandler,
957957   REGION_SOUND2,   /* Delta-T */
src/mame/drivers/welltris.c
r1404r1405
720720   cpunum_set_input_line(1, 0, irq ? ASSERT_LINE : CLEAR_LINE);
721721}
722722
723static struct YM2610interface ym2610_interface =
723static const struct YM2610interface ym2610_interface =
724724{
725725   irqhandler,
726726   REGION_SOUND1,
src/mame/drivers/pturn.c
r1404r1405
8585static int bgcolor=0;
8686
8787
88static UINT8 tile_lookup[0x10]=
88static const UINT8 tile_lookup[0x10]=
8989{
9090   0x00, 0x10, 0x40, 0x50,
9191   0x20, 0x30, 0x60, 0x70,
src/mame/drivers/dec0.c
r1404r1405
912912   cpunum_set_input_line(1,1,linestate); /* IRQ2 */
913913}
914914
915static struct YM3812interface ym3812_interface =
915static const struct YM3812interface ym3812_interface =
916916{
917917   sound_irq
918918};
919919
920static struct YM3812interface ym3812b_interface =
920static const struct YM3812interface ym3812b_interface =
921921{
922922   sound_irq2
923923};
r1404r1405
19651965
19661966ROM_START( secretag )
19671967   ROM_REGION( 0x60000, REGION_CPU1, 0 ) /* 68000 code */
1968   ROM_LOAD16_BYTE( "fb14.bin",   0x00000, 0x10000, CRC(9be6ac90) SHA1(1c78af9da63add7c77c8d2ce24924505481381b1) )
1969   ROM_LOAD16_BYTE( "fb12.bin",   0x00001, 0x10000, CRC(28904b6b) SHA1(c3fd42c3ba5b19c3483df3ac9e44016570762de7) )
1970   ROM_LOAD16_BYTE( "fb15.bin",   0x20000, 0x10000, CRC(106bb26c) SHA1(e5d05124b6dfc54e41dcf40916633caaa9a19823) )
1971   ROM_LOAD16_BYTE( "fb13.bin",   0x20001, 0x10000, CRC(90523413) SHA1(7ea65525f2d7c577255aa01260acc5f43d136b3c) )
1968   ROM_LOAD16_BYTE( "fb14-3.17l",   0x00000, 0x10000, CRC(9be6ac90) SHA1(1c78af9da63add7c77c8d2ce24924505481381b1) )
1969   ROM_LOAD16_BYTE( "fb12-3.9l",   0x00001, 0x10000, CRC(28904b6b) SHA1(c3fd42c3ba5b19c3483df3ac9e44016570762de7) )
1970   ROM_LOAD16_BYTE( "fb15.19l",   0x20000, 0x10000, CRC(106bb26c) SHA1(e5d05124b6dfc54e41dcf40916633caaa9a19823) )
1971   ROM_LOAD16_BYTE( "fb13.11l",   0x20001, 0x10000, CRC(90523413) SHA1(7ea65525f2d7c577255aa01260acc5f43d136b3c) )
19721972
19731973   ROM_REGION( 0x10000, REGION_CPU2, 0 )   /* Sound CPU */
19741974   ROM_LOAD( "fa10.5h",      0x00000, 0x10000, CRC(dfd2ff25) SHA1(3dcd6d50b92b49daae4b51581abe9c95f764e848) )
src/mame/drivers/ssv.c
r1404r1405
3030STA-0001    SAM-5127    93  Dyna Gears                              Sammy
3131STA-0001B   VISCO-001B  94  Drift Out '94                           Visco
3232STA-0001B   GOLF ROM    94  Eagle Shot Golf                         Sammy
33STA-0001B   ?           94  Twin Eagle II - The Rescue Mission      Seta
34STA-0001B   VISCO       95  Mobil Suit Gundam Final Shooting (1)    Banpresto
33STA-0001B   STS0003     94  Twin Eagle II - The Rescue Mission (1)  Seta
34STA-0001B   VISCO       95  Mobil Suit Gundam Final Shooting (2)    Banpresto
3535STA-0001B   P1-102A     95  Mahjong Hyper Reaction                  Sammy
3636?           ?           95  Ultra X Weapons / Ultra Keibitai        Banpresto + Tsuburaya Prod.
3737STA-0001B   VISCO-JJ1   96  Lovely Pop Mahjong JangJang Shimasho    Visco
3838STA-0001B   VISCO-001B  96  Storm Blade                             Visco
3939STA-0001B   P1-105A     96? Meosis Magic                            Sammy
40STA-0001B   ?           97  Joryuu Syougi Kyoushitsu (2)            Visco
40STA-0001B   ?           97  Joryuu Syougi Kyoushitsu (3)            Visco
4141STA-0001B   VISCO-JJ1   97  Koi Koi Shimasho 2                      Visco
4242STA-0001B   P1-112A     97  Mahjong Hyper Reaction 2                Sammy
4343STA-0001B   ?           97  Monster Slider                          Visco / Datt
r1404r1405
5151STA-0001B   SSV_SUB     01  Vasara 2                                Visco
5252-----------------------------------------------------------------------------------
5353
54(1) Uses ST-0009 & ST-0020 & Light Gun
55(2) Uses NEC V810 CPU as sub cpu for the AI (basically the same as the majinsen games on st0016)
54(1) Uses ST010 MCU / Math chip
55(2) Uses ST-0009 & ST-0020 & Light Gun
56(3) Uses NEC V810 CPU as sub cpu for the AI (basically the same as the majinsen games on st0016)
5657
5758SSV Hardware Overview
5859Sammy/Seta/Visco, 1993-2001
r1404r1405
26752676
26762677***************************************************************************/
26772678
2678static struct ES5506interface es5506_interface =
2679static const struct ES5506interface es5506_interface =
26792680{
26802681   REGION_SOUND1,
26812682   REGION_SOUND2,
r1404r1405
43364337/***************************************************************************
43374338
43384339                                Twin Eagle II
4340SETA, 1994
43394341
4342STS0003 TWIN EAGLE
4343|-------------------------------------|
4344|                                     |
4345|                                     |
4346|                 SX002-09.u2         |
4347|                                     |
4348|                 SX002-08.u3         |
4349|                                     |
4350| SX002-11.u7     SX002-07.u6         |
4351|                                     |
4352|                                     |
4353| SX002-10.u14    SX002-06.u13        |
4354|                                     |
4355|                 SX002-05.u16        |
4356|                                     |
4357| SX002-12.u22    SX002-04.u19        |
4358|                                     |
4359| SX002-13                            |
4360|                 SX002-03.u22        |
4361|                                     |
4362|                 SX002-02.u28        |
4363|                                     |
4364|                 SX002-01.u32        |
4365| SETA ST010                          |
4366|-------------------------------------|
4367
4368SX002-13 is GAL16V8B (undumped)
4369SETA ST010 is some type of MCU/Math chip?
4370All roms are 16M Mask roms
4371
43404372***************************************************************************/
43414373
43424374ROM_START( twineag2 )
43434375   ROM_REGION16_LE( 0x200000, REGION_USER1, 0 )      /* V60 Code */
4344   ROM_LOAD16_WORD( "sx002_12", 0x000000, 0x200000, CRC(846044dc) SHA1(c1c85de1c466fb7c3580824baa1571cd0fed6ec6) )
4376   ROM_LOAD16_WORD( "sx002-12.u22", 0x000000, 0x200000, CRC(846044dc) SHA1(c1c85de1c466fb7c3580824baa1571cd0fed6ec6) )
43454377
43464378   ROM_REGION( 0x1800000, REGION_GFX1, ROMREGION_DISPOSE )   /* Sprites */
4347   ROM_LOAD( "sx002_01", 0x0000000, 0x200000, CRC(6d6896b5) SHA1(e8efd29b9f951bff6664e47cb5fd67f1d8f40608) )
4348   ROM_LOAD( "sx002_02", 0x0200000, 0x200000, CRC(3f47e97a) SHA1(5b0fdc762cf704c8bd92c4a4a42dba4a127b3d49) )
4349   ROM_LOAD( "sx002_03", 0x0400000, 0x200000, CRC(544f18bf) SHA1(539e6df1ded4e9ac8974c697215cc1e5c5a40cda) )
4379   ROM_LOAD( "sx002-01.u32", 0x0000000, 0x200000, CRC(6d6896b5) SHA1(e8efd29b9f951bff6664e47cb5fd67f1d8f40608) ) /* A0 */
4380   ROM_LOAD( "sx002-02.u28", 0x0200000, 0x200000, CRC(3f47e97a) SHA1(5b0fdc762cf704c8bd92c4a4a42dba4a127b3d49) ) /* A1 */
4381   ROM_LOAD( "sx002-03.u25", 0x0400000, 0x200000, CRC(544f18bf) SHA1(539e6df1ded4e9ac8974c697215cc1e5c5a40cda) ) /* A2, A3 is unpopulated */
43504382
4351   ROM_LOAD( "sx002_04", 0x0600000, 0x200000, CRC(58c270e2) SHA1(7629ba978b18252f375bdc16ed62388d64a35ca1) )
4352   ROM_LOAD( "sx002_05", 0x0800000, 0x200000, CRC(3c310229) SHA1(9a8b81d5f17ce3078627a697aaf07f1b3ba6e08c) )
4353   ROM_LOAD( "sx002_06", 0x0a00000, 0x200000, CRC(46d5b1f3) SHA1(3ec03eddb159eb391ccdce5a0a867a54b3350150) )
4383   ROM_LOAD( "sx002-04.u19", 0x0600000, 0x200000, CRC(58c270e2) SHA1(7629ba978b18252f375bdc16ed62388d64a35ca1) ) /* B0 */
4384   ROM_LOAD( "sx002-05.u16", 0x0800000, 0x200000, CRC(3c310229) SHA1(9a8b81d5f17ce3078627a697aaf07f1b3ba6e08c) ) /* B1 */
4385   ROM_LOAD( "sx002-06.u13", 0x0a00000, 0x200000, CRC(46d5b1f3) SHA1(3ec03eddb159eb391ccdce5a0a867a54b3350150) ) /* B2, B3 is unpopulated */
43544386
4355   ROM_LOAD( "sx002_07", 0x0c00000, 0x200000, CRC(c30fa397) SHA1(d4575868c1b63f9e94bf24539a3fd8a85df93d0b) )
4356   ROM_LOAD( "sx002_08", 0x0e00000, 0x200000, CRC(64edcefa) SHA1(55a71afe87da93e35c5ba291e970bdcd91b52a7a) )
4357   ROM_LOAD( "sx002_09", 0x1000000, 0x200000, CRC(51527c56) SHA1(378155a585e5b847bd8ae1f17cb651138d844e33) )
4387   ROM_LOAD( "sx002-07.u6",  0x0c00000, 0x200000, CRC(c30fa397) SHA1(d4575868c1b63f9e94bf24539a3fd8a85df93d0b) ) /* C0 */
4388   ROM_LOAD( "sx002-08.u3",  0x0e00000, 0x200000, CRC(64edcefa) SHA1(55a71afe87da93e35c5ba291e970bdcd91b52a7a) ) /* C1 */
4389   ROM_LOAD( "sx002-09.u2",  0x1000000, 0x200000, CRC(51527c56) SHA1(378155a585e5b847bd8ae1f17cb651138d844e33) ) /* C2, C3 is unpopulated */
43584390
43594391   ROM_FILL(             0x1200000, 0x600000, 0          )
43604392
43614393   ROM_REGION16_BE( 0x400000, REGION_SOUND1, ROMREGION_ERASE | 0 ) /* Samples */
4362   ROM_LOAD16_BYTE( "sx002_10", 0x000000, 0x200000, CRC(b0669dfa) SHA1(ff805f59864ac4ccee3e249c06804d844d3df59c) )
4394   ROM_LOAD16_BYTE( "sx002-10.u14", 0x000000, 0x200000, CRC(b0669dfa) SHA1(ff805f59864ac4ccee3e249c06804d844d3df59c) )
43634395
43644396   ROM_REGION16_BE( 0x400000, REGION_SOUND2, ROMREGION_ERASE | 0 ) /* Samples */
4365   ROM_LOAD16_BYTE( "sx002_11", 0x000000, 0x200000, CRC(b8dd621a) SHA1(f9b43e018f2bb121e4f4e9554419cd32b870556b) )
4397   ROM_LOAD16_BYTE( "sx002-11.u7", 0x000000, 0x200000, CRC(b8dd621a) SHA1(f9b43e018f2bb121e4f4e9554419cd32b870556b) )
43664398
43674399   ROM_REGION16_BE( 0x400000, REGION_SOUND3, 0 ) /* Samples */
43684400   ROM_COPY( REGION_SOUND1, 0x000000, 0x000000, 0x400000 )
src/mame/drivers/taitoair.c
r1404r1405
575575   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
576576}
577577
578static struct YM2610interface airsys_ym2610_interface =
578static const struct YM2610interface airsys_ym2610_interface =
579579{
580580   irqhandler,
581581   REGION_SOUND2,
src/mame/drivers/tceptor.c
r1404r1405
489489
490490/*******************************************************************/
491491
492static struct namco_interface namco_interface =
492static const struct namco_interface namco_interface =
493493{
494494   8,         /* number of voices */
495495   -1,         /* memory region */
src/mame/drivers/hanaawas.c
r1404r1405
193193GFXDECODE_END
194194
195195
196static struct AY8910interface ay8910_interface =
196static const struct AY8910interface ay8910_interface =
197197{
198198   input_port_1_r,
199199   0,
src/mame/drivers/mpu4drvr.c
r1404r1405
300300   update_mpu68_interrupts();
301301}
302302
303static struct acia6850_interface m6809_acia_if =
303static const struct acia6850_interface m6809_acia_if =
304304{
305305   MPU4_MASTER_CLOCK/44,//This isn't a real division, this is just to work around
306306   MPU4_MASTER_CLOCK/44,//the ACIA code's hard coding
r1404r1405
312312   m6809_acia_irq
313313};
314314
315static struct acia6850_interface m68k_acia_if =
315static const struct acia6850_interface m68k_acia_if =
316316{
317317   MPU4_MASTER_CLOCK/44,
318318   MPU4_MASTER_CLOCK/44,
src/mame/drivers/aquarium.c
r1404r1405
358358   cpunum_set_input_line( 1, 0 , irq ? ASSERT_LINE : CLEAR_LINE );
359359}
360360
361static struct YM2151interface ym2151_interface =
361static const struct YM2151interface ym2151_interface =
362362{
363363   irq_handler
364364};
src/mame/drivers/metro.c
r1404r1405
517517   cpunum_set_input_line(1, UPD7810_INTF2, state ? ASSERT_LINE : CLEAR_LINE);
518518}
519519
520static struct YM2151interface ym2151_interface =
520static const struct YM2151interface ym2151_interface =
521521{
522522   metro_sound_irq_handler   /* irq handler */
523523};
r1404r1405
555555}
556556
557557
558static struct YMF278B_interface ymf278b_interface =
558static const struct YMF278B_interface ymf278b_interface =
559559{
560560   REGION_SOUND1,
561561   ymf278b_interrupt
r1404r1405
19421942   cpunum_set_input_line(1, 0, irq ? ASSERT_LINE : CLEAR_LINE);
19431943}
19441944
1945static struct YM2610interface blzntrnd_ym2610_interface =
1945static const struct YM2610interface blzntrnd_ym2610_interface =
19461946{
19471947   blzntrnd_irqhandler,
19481948   REGION_SOUND1,
r1404r1405
36793679
36803680***************************************************************************/
36813681
3682static UPD7810_CONFIG metro_cpu_config =
3682static const UPD7810_CONFIG metro_cpu_config =
36833683{
36843684    TYPE_7810,
36853685    metro_io_callback
src/mame/drivers/angelkds.c
r1404r1405
565565   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
566566}
567567
568static struct YM2203interface ym2203_interface =
568static const struct YM2203interface ym2203_interface =
569569{
570570   0,
571571   0,
src/mame/drivers/jrpacman.c
r1404r1405
248248 *
249249 *************************************/
250250
251static struct namco_interface namco_interface =
251static const struct namco_interface namco_interface =
252252{
253253   3,         /* number of voices */
254254   REGION_SOUND1   /* memory region */
src/mame/drivers/midvunit.c
r1404r1405
337337
338338/* values from offset 3, 6, and 10 must add up to 0x904752a2 */
339339static UINT16 bit_index;
340static UINT32 bit_data[0x10] =
340static const UINT32 bit_data[0x10] =
341341{
342342   0x3017c636,0x3017c636,0x3017c636,0x3017c636,
343343   0x3017c636,0x3017c636,0x3017c636,0x3017c636,
r1404r1405
503503ADDRESS_MAP_END
504504
505505
506static struct tms32031_config midvplus_config = { 0, NULL, midvplus_xf1_w };
506static const struct tms32031_config midvplus_config = { 0, NULL, midvplus_xf1_w };
507507
508508static ADDRESS_MAP_START( midvplus_map, ADDRESS_SPACE_PROGRAM, 32 )
509509   AM_RANGE(0x000000, 0x01ffff) AM_RAM AM_BASE(&ram_base)
r1404r1405
13881388}
13891389
13901390
1391static struct ide_interface ide_intf =
1391static const struct ide_interface ide_intf =
13921392{
13931393   0
13941394};
src/mame/drivers/namcond1.c
r1404r1405
264264   AM_RANGE(H8_ADC_0_L, H8_ADC_3_H) AM_NOP // MCU reads these, but the games have no analog controls
265265ADDRESS_MAP_END
266266
267static struct C352interface c352_interface =
267static const struct C352interface c352_interface =
268268{
269269   REGION_SOUND1
270270};
src/mame/drivers/opwolf.c
r1404r1405
138138
139139static READ16_HANDLER( opwolf_in_r )
140140{
141   static const char *inname[2] = { "IN0", "IN1" };
141   static const char *const inname[2] = { "IN0", "IN1" };
142142   return readinputportbytag(inname[offset]);
143143}
144144
145145static READ16_HANDLER( opwolf_dsw_r )
146146{
147   static const char *dswname[2] = { "DSWA", "DSWB" };
147   static const char *const dswname[2] = { "DSWA", "DSWB" };
148148   return readinputportbytag(dswname[offset]);
149149}
150150
r1404r1405
542542}
543543
544544
545static struct YM2151interface ym2151_interface =
545static const struct YM2151interface ym2151_interface =
546546{
547547   irq_handler,
548548   sound_bankswitch_w
549549};
550550
551551
552static struct MSM5205interface msm5205_interface =
552static const struct MSM5205interface msm5205_interface =
553553{
554554   opwolf_msm5205_vck,   /* VCK function */
555555   MSM5205_S48_4B      /* 8 kHz */
src/mame/drivers/surpratk.c
r1404r1405
226226   cpunum_set_input_line(0,KONAMI_FIRQ_LINE,linestate);
227227}
228228
229static struct YM2151interface ym2151_interface =
229static const struct YM2151interface ym2151_interface =
230230{
231231   irqhandler
232232};
src/mame/drivers/suna16.c
r1404r1405
10111011   cpunum_set_input_line(1, INPUT_LINE_IRQ0, state);
10121012}
10131013
1014static struct YM3526interface bestbest_ym3526_interface =
1014static const struct YM3526interface bestbest_ym3526_interface =
10151015{
10161016   bestbest_ym3526_irqhandler
10171017};
r1404r1405
10211021   // ?
10221022}
10231023
1024static struct AY8910interface bestbest_ay8910_interface =
1024static const struct AY8910interface bestbest_ay8910_interface =
10251025{
10261026   0,                     0,
10271027   bestbest_ay8910_port_a_w,   0
src/mame/drivers/zaccaria.c
r1404r1405
9191   if (data & 1)   /* DAC enable */
9292   {
9393      /* TODO: is this right? it sound awful */
94      static int table[4] = { 0x05, 0x1b, 0x0b, 0x55 };
94      static const int table[4] = { 0x05, 0x1b, 0x0b, 0x55 };
9595      DAC_signed_data_w(0,table[(data & 0x06) >> 1]);
9696   }
9797   else
r1404r1405
641641GFXDECODE_END
642642
643643
644static struct AY8910interface ay8910_interface =
644static const struct AY8910interface ay8910_interface =
645645{
646646   0,
647647   soundlatch2_r,
r1404r1405
649649   0
650650};
651651
652static struct TMS5220interface tms5220_interface =
652static const struct TMS5220interface tms5220_interface =
653653{
654654   tms5220_irq_handler   /* IRQ handler */
655655};
src/mame/drivers/shadfrce.c
r1404r1405
536536   cpunum_set_input_line( 1, 0, irq ? ASSERT_LINE : CLEAR_LINE );
537537}
538538
539static struct YM2151interface ym2151_interface =
539static const struct YM2151interface ym2151_interface =
540540{
541541   irq_handler
542542};
src/mame/drivers/jongkyo.c
r1404r1405
580580   }
581581}
582582
583static struct AY8910interface ay8910_interface =
583static const struct AY8910interface ay8910_interface =
584584{
585585   keyboard1_r,
586586   keyboard2_r,
src/mame/drivers/attckufo.c
r1404r1405
4646#include "includes/attckufo.h"
4747
4848
49static struct CustomSound_interface attckufo_sound_interface =
49static const struct CustomSound_interface attckufo_sound_interface =
5050{
5151   attckufo_custom_start
5252};
src/mame/drivers/firebeat.c
r1404r1405
13391339   }
13401340}
13411341
1342static int cab_data[2] = { 0x0, 0x8 };
1343static int kbm_cab_data[2] = { 0x2, 0x8 };
1344static int ppd_cab_data[2] = { 0x1, 0x9 };
1342static const int cab_data[2] = { 0x0, 0x8 };
1343static const int kbm_cab_data[2] = { 0x2, 0x8 };
1344static const int ppd_cab_data[2] = { 0x1, 0x9 };
13451345static int cab_data_ptr = 0;
1346static int * cur_cab_data = cab_data;
1346static const int * cur_cab_data = cab_data;
13471347
13481348static READ32_HANDLER( cabinet_r )
13491349{
r1404r1405
17831783{
17841784}
17851785
1786static struct YMZ280Binterface ymz280b_intf =
1786static const struct YMZ280Binterface ymz280b_intf =
17871787{
17881788   REGION_SOUND1,
17891789   sound_irq_callback,         // irq
r1404r1405
19741974   cdda_set_cdrom(0, cd);
19751975}
19761976
1977static ppc_config firebeat_ppc_cfg =
1977static const ppc_config firebeat_ppc_cfg =
19781978{
19791979   PPC_MODEL_403GCX
19801980};
src/mame/drivers/bigevglf.c
r1404r1405
468468}
469469
470470
471static struct MSM5232interface msm5232_interface =
471static const struct MSM5232interface msm5232_interface =
472472{
473473   { 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 */
474474};
src/mame/drivers/bagman.c
r1404r1405
547547
548548
549549
550static struct AY8910interface ay8910_interface =
550static const struct AY8910interface ay8910_interface =
551551{
552552   input_port_0_r,
553553   input_port_1_r,
554554};
555555
556static struct TMS5110interface tms5110_interface =
556static const struct TMS5110interface tms5110_interface =
557557{
558558   0,      /*irq callback function*/
559559   bagman_speech_rom_read_bit   /*M0 callback function. Called whenever chip requests a single bit of data*/
src/mame/drivers/namcos23.c
r1404r1405
700700{
701701   UINT8 ret = 0;
702702   mame_system_time systime;
703   static int weekday[7] = { 7, 1, 2, 3, 4, 5, 6 };
703   static const int weekday[7] = { 7, 1, 2, 3, 4, 5, 6 };
704704
705705   mame_get_current_datetime(Machine, &systime);
706706
r1404r1405
837837   GFXDECODE_ENTRY( 0, 0, namcos23_cg_layout,  0, 0x80 )
838838GFXDECODE_END
839839
840static struct mips3_config config =
840static const struct mips3_config config =
841841{
842842   8192,            /* code cache size - VERIFIED */
843843   8192            /* data cache size - VERIFIED */
r1404r1405
847847{
848848}
849849
850static struct C352interface c352_interface =
850static const struct C352interface c352_interface =
851851{
852852   REGION_SOUND1
853853};
src/mame/drivers/inufuku.c
r1404r1405
381381   cpunum_set_input_line(1, 0, irq ? ASSERT_LINE : CLEAR_LINE);
382382}
383383
384static struct YM2610interface ym2610_interface =
384static const struct YM2610interface ym2610_interface =
385385{
386386   irqhandler,
387387   0,
src/mame/drivers/tattack.c
r1404r1405
144144INPUT_PORTS_END
145145
146146
147static gfx_layout charlayout =
147static const gfx_layout charlayout =
148148{
149149   8,8,
150150   RGN_FRAC(1,1),
src/mame/drivers/atarisy2.c
r1404r1405
298298
299299static WRITE16_HANDLER( bankselect_w )
300300{
301   static int bankoffset[64] =
301   static const int bankoffset[64] =
302302   {
303303      0x28000, 0x20000, 0x18000, 0x10000,
304304      0x2a000, 0x22000, 0x1a000, 0x12000,
r1404r1405
12681268 *
12691269 *************************************/
12701270
1271static struct POKEYinterface pokey_interface_1 =
1271static const struct POKEYinterface pokey_interface_1 =
12721272{
12731273   { 0 },
12741274   input_port_11_r
12751275};
12761276
1277static struct POKEYinterface pokey_interface_2 =
1277static const struct POKEYinterface pokey_interface_2 =
12781278{
12791279   { 0 },
12801280   input_port_12_r
r1404r1405
12881288 *
12891289 *************************************/
12901290
1291static struct t11_setup t11_data =
1291static const struct t11_setup t11_data =
12921292{
12931293   0x36ff         /* initial mode word has DAL15,14,11,8 pulled low */
12941294};
src/mame/drivers/mjsister.c
r1404r1405
296296
297297/****************************************************************************/
298298
299static struct AY8910interface ay8910_interface =
299static const struct AY8910interface ay8910_interface =
300300{
301301   input_port_0_r,
302302   input_port_1_r
src/mame/drivers/ninjakd2.c
r1404r1405
462462   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
463463}
464464
465static struct YM2203interface ym2203_interface =
465static const struct YM2203interface ym2203_interface =
466466{
467467   0,0,0,0,irqhandler
468468};
src/mame/drivers/skydiver.c
r1404r1405
100100 *
101101 *************************************/
102102
103static UINT16 colortable_source[] =
103static const UINT16 colortable_source[] =
104104{
105105   0x02, 0x00,
106106   0x02, 0x01,
src/mame/drivers/yunsung8.c
r1404r1405
516516      cpunum_set_input_line(1, INPUT_LINE_NMI, PULSE_LINE);
517517}
518518
519static struct MSM5205interface yunsung8_msm5205_interface =
519static const struct MSM5205interface yunsung8_msm5205_interface =
520520{
521521   yunsung8_adpcm_int,   /* interrupt function */
522522   MSM5205_S96_4B      /* 4KHz, 4 Bits */
src/mame/drivers/warpwarp.c
r1404r1405
818818GFXDECODE_END
819819
820820
821static struct CustomSound_interface geebee_custom_interface =
821static const struct CustomSound_interface geebee_custom_interface =
822822{
823823   geebee_sh_start
824824};
825825
826static struct CustomSound_interface warpwarp_custom_interface =
826static const struct CustomSound_interface warpwarp_custom_interface =
827827{
828828   warpwarp_sh_start
829829};
src/mame/drivers/cubocd32.c
r1404r1405
257257 *
258258 *************************************/
259259
260static struct CustomSound_interface amiga_custom_interface =
260static const struct CustomSound_interface amiga_custom_interface =
261261{
262262   amiga_sh_start
263263};
src/mame/drivers/cbuster.c
r1404r1405
335335   cpunum_set_input_line(1,1,state); /* IRQ 2 */
336336}
337337
338static struct YM2151interface ym2151_interface =
338static const struct YM2151interface ym2151_interface =
339339{
340340   sound_irq
341341};
src/mame/drivers/dunhuang.c
r1404r1405
661661                                Machine Drivers
662662***************************************************************************/
663663
664static struct AY8910interface dunhuang_ay8910_interface =
664static const struct AY8910interface dunhuang_ay8910_interface =
665665{
666666//  A                   B
667667   0,               dunhuang_dsw_r,   // R
src/mame/drivers/onetwo.c
r1404r1405
255255   cpunum_set_input_line(1,0,linestate);
256256}
257257
258static struct YM3812interface ym3812_interface =
258static const struct YM3812interface ym3812_interface =
259259{
260260   irqhandler   /* IRQ Line */
261261};
src/mame/drivers/ojankohs.c
r1404r1405
924924GFXDECODE_END
925925
926926
927static struct AY8910interface ojankohs_ay8910_interface =
927static const struct AY8910interface ojankohs_ay8910_interface =
928928{
929929   ojankohs_ay8910_0_r,   /* read port #0 */
930930   ojankohs_ay8910_1_r   /* read port #1 */
931931};
932932
933static struct AY8910interface ojankoy_ay8910_interface =
933static const struct AY8910interface ojankoy_ay8910_interface =
934934{
935935   ojankoy_ay8910_0_r,      /* read port #0 */
936936   ojankoy_ay8910_1_r,      /* read port #1 */
937937};
938938
939static struct AY8910interface ojankoc_ay8910_interface =
939static const struct AY8910interface ojankoc_ay8910_interface =
940940{
941941   input_port_0_r,         /* read port #0 */
942942   input_port_1_r         /* read port #1 */
943943};
944944
945static struct MSM5205interface msm5205_interface =
945static const struct MSM5205interface msm5205_interface =
946946{
947947   ojankohs_adpcm_int,      /* IRQ handler */
948948   MSM5205_S48_4B         /* 8 KHz */
src/mame/drivers/raiders5.c
r1404r1405
206206
207207
208208
209static struct AY8910interface ay8910_interface_1 =
209static const struct AY8910interface ay8910_interface_1 =
210210{
211211   input_port_0_r,
212212   input_port_1_r
213213};
214214
215static struct AY8910interface ay8910_interface_2 =
215static const struct AY8910interface ay8910_interface_2 =
216216{
217217   input_port_2_r,
218218   input_port_3_r
src/mame/drivers/nbmj8891.c
r1404r1405
30133013
30143014
30153015
3016static struct AY8910interface ay8910_interface =
3016static const struct AY8910interface ay8910_interface =
30173017{
30183018   input_port_0_r,      // DIPSW-A read
30193019   input_port_1_r      // DIPSW-B read
src/mame/drivers/wc90b.c
r1404r1405
363363   cpunum_set_input_line(2, INPUT_LINE_NMI, irq ? ASSERT_LINE : CLEAR_LINE);
364364}
365365
366static struct YM2203interface ym2203_interface =
366static const struct YM2203interface ym2203_interface =
367367{
368368   0,0,0,0,irqhandler
369369};
r1404r1405
381381
382382}
383383
384static struct MSM5205interface msm5205_interface =
384static const struct MSM5205interface msm5205_interface =
385385{
386386   adpcm_int,               /* interrupt function */
387387   MSM5205_S96_4B      /* 4KHz 4-bit */
src/mame/drivers/holeland.c
r1404r1405
280280
281281
282282
283static struct AY8910interface ay8910_interface_1 =
283static const struct AY8910interface ay8910_interface_1 =
284284{
285285   input_port_0_r,
286286   input_port_1_r
287287};
288288
289static struct AY8910interface ay8910_interface_2 =
289static const struct AY8910interface ay8910_interface_2 =
290290{
291291   input_port_2_r,
292292   input_port_3_r
src/mame/drivers/spdodgeb.c
r1404r1405
416416   cpunum_set_input_line(1,M6809_FIRQ_LINE,irq ? ASSERT_LINE : CLEAR_LINE);
417417}
418418
419static struct YM3812interface ym3812_interface =
419static const struct YM3812interface ym3812_interface =
420420{
421421   irq_handler
422422};
423423
424static struct MSM5205interface msm5205_interface =
424static const struct MSM5205interface msm5205_interface =
425425{
426426   spd_adpcm_int,   /* interrupt function */
427427   MSM5205_S48_4B   /* 8kHz? */
src/mame/drivers/cvs.c
r1404r1405
219219    else return 0;
220220}
221221
222static struct TMS5110interface tms5110_interface =
222static const struct TMS5110interface tms5110_interface =
223223{
224224   0,      /*irq callback function*/
225225   cvs_speech_rom_read_bit   /*M0 callback function. Called whenever chip requests a single bit of data*/
src/mame/drivers/seta.c
r1404r1405
13401340
13411341***************************************************************************/
13421342
1343static struct x1_010_interface seta_sound_intf =
1343static const struct x1_010_interface seta_sound_intf =
13441344{
13451345   0x0000,      /* address */
13461346};
1347static struct x1_010_interface seta_sound_intf2 =
1347static const struct x1_010_interface seta_sound_intf2 =
13481348{
13491349   0x1000,      /* address */
13501350};
r1404r1405
13541354   cpunum_set_input_line(1, INPUT_LINE_NMI, linestate);
13551355}
13561356
1357static struct YM3438interface utoukond_ym3438_intf =
1357static const struct YM3438interface utoukond_ym3438_intf =
13581358{
13591359   utoukond_ym3438_interrupt   // IRQ handler
13601360};
r1404r1405
63786378                                Thundercade
63796379***************************************************************************/
63806380
6381static struct YM2203interface tndrcade_ym2203_interface =
6381static const struct YM2203interface tndrcade_ym2203_interface =
63826382{
63836383   dsw1_r,      /* input A: DSW 1 */
63846384   dsw2_r      /* input B: DSW 2 */
r1404r1405
90009000      memcpy(temp,&src[i],16);
90019001      for (j = 0;j < 16;j++)
90029002      {
9003         static int convtable[16] =
9003         static const int convtable[16] =
90049004         {
90059005            0x0, 0x1, 0x8, 0x9,
90069006            0x2, 0x3, 0xa, 0xb,
src/mame/drivers/laserbat.c
r1404r1405
651651   /*irqs   : A/B             */ zaccaria_irq0a, zaccaria_irq0b
652652};
653653
654static struct AY8910interface ay8910_interface =
654static const struct AY8910interface ay8910_interface =
655655{
656656   0,
657657   soundlatch_r,
src/mame/drivers/trvquest.c
r1404r1405
224224}
225225
226226
227static struct via6522_interface via_0_interface =
227static const struct via6522_interface via_0_interface =
228228{
229229   /*inputs : A/B         */ input_port_0_r, input_port_1_r,
230230   /*inputs : CA/B1,CA/B2 */ NULL, NULL, NULL, NULL,
r1404r1405
233233   /*irq                  */ NULL
234234};
235235
236static struct via6522_interface via_1_interface =
236static const struct via6522_interface via_1_interface =
237237{
238238   /*inputs : A/B         */ input_port_2_r, input_port_3_r,
239239   /*inputs : CA/B1,CA/B2 */ NULL, NULL, NULL, NULL,
r1404r1405
242242   /*irq                  */ via_irq
243243};
244244
245static struct via6522_interface via_2_interface =
245static const struct via6522_interface via_2_interface =
246246{
247247   /*inputs : A/B         */ NULL, trvquest_vblank_r,
248248   /*inputs : CA/B1,CA/B2 */ NULL, NULL, NULL, NULL,
src/mame/drivers/ssf2md.c
r1404r1405
1212
1313static READ16_HANDLER( ssf2ghw_dsw_r )
1414{
15   static const char *dswname[3] = { "DSWA", "DSWB", "DSWC" };
15   static const char *const dswname[3] = { "DSWA", "DSWB", "DSWC" };
1616   return readinputportbytag(dswname[offset]);
1717}
1818
src/mame/drivers/tnzs.c
r1404r1405
12461246GFXDECODE_END
12471247
12481248
1249static struct YM2203interface ym2203_interface =
1249static const struct YM2203interface ym2203_interface =
12501250{
12511251   input_port_0_r,      /* DSW1 connected to port A */
12521252   input_port_1_r      /* DSW2 connected to port B */
r1404r1405
12591259   cpunum_set_input_line(2, INPUT_LINE_NMI, irq ? ASSERT_LINE : CLEAR_LINE);
12601260}
12611261
1262static struct YM2203interface kageki_ym2203_interface =
1262static const struct YM2203interface kageki_ym2203_interface =
12631263{
12641264   kageki_csport_r,
12651265   0,
r1404r1405
12671267   kageki_csport_w
12681268};
12691269
1270static struct YM2203interface ym2203b_interface =
1270static const struct YM2203interface ym2203b_interface =
12711271{
12721272   0,0,0,0,
12731273   irqhandler
12741274};
12751275
1276static struct YM2203interface kabukiz_ym2203_interface =
1276static const struct YM2203interface kabukiz_ym2203_interface =
12771277{
12781278   0,0,kabukiz_sound_bank_w,kabukiz_sample_w,
12791279   irqhandler
src/mame/drivers/rohga.c
r1404r1405
803803   OKIM6295_set_bank_base(1, ((data & 2)>>1) * 0x40000);
804804}
805805
806static struct YM2151interface ym2151_interface =
806static const struct YM2151interface ym2151_interface =
807807{
808808   sound_irq,
809809   sound_bankswitch_w
src/mame/drivers/vball.c
r1404r1405
391391   cpunum_set_input_line( 1, 0 , irq ? ASSERT_LINE : CLEAR_LINE );
392392}
393393
394static struct YM2151interface ym2151_interface =
394static const struct YM2151interface ym2151_interface =
395395{
396396   vball_irq_handler
397397};
src/mame/drivers/plygonet.c
r1404r1405
657657   AM_RANGE(0xfff1, 0xfff3) AM_WRITE(MWA8_NOP)
658658ADDRESS_MAP_END
659659
660static struct K054539interface k054539_interface =
660static const struct K054539interface k054539_interface =
661661{
662662   REGION_SOUND1
663663};
src/mame/drivers/afega.c
r1404r1405
10711071   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
10721072}
10731073
1074static struct YM2151interface afega_ym2151_intf =
1074static const struct YM2151interface afega_ym2151_intf =
10751075{
10761076   irq_handler
10771077};
src/mame/drivers/naomi.c
r1404r1405
443443
444444#define CPU_CLOCK 200000000
445445                                 /* MD2 MD1 MD0 MD6 MD4 MD3 MD5 MD7 MD8 */
446static struct sh4_config sh4cpu_config = {  1,  0,  1,  0,  0,  0,  1,  1,  0, CPU_CLOCK };
446static const struct sh4_config sh4cpu_config = {  1,  0,  1,  0,  0,  0,  1,  1,  0, CPU_CLOCK };
447447
448448static UINT64 *dc_sound_ram;
449449
src/mame/drivers/nemesis.c
r1404r1405
20882088
20892089/******************************************************************************/
20902090
2091static struct AY8910interface ay8910_interface_1 =
2091static const struct AY8910interface ay8910_interface_1 =
20922092{
20932093   nemesis_portA_r
20942094};
20952095
2096static struct AY8910interface ay8910_interface_2 =
2096static const struct AY8910interface ay8910_interface_2 =
20972097{
20982098   0,
20992099   0,
r1404r1405
21012101   k005289_control_B_w
21022102};
21032103
2104static struct k005289_interface k005289_interface =
2104static const struct k005289_interface k005289_interface =
21052105{
21062106   REGION_SOUND1   /* prom memory region */
21072107};
r1404r1405
21122112/*cpunum_set_input_line(1,0,HOLD_LINE);*/
21132113}
21142114
2115static struct YM2151interface ym2151_interface =
2115static const struct YM2151interface ym2151_interface =
21162116{
21172117   sound_irq
21182118};
21192119
2120static struct YM3812interface ym3812_interface =
2120static const struct YM3812interface ym3812_interface =
21212121{
21222122   sound_irq
21232123};
21242124
2125static struct VLM5030interface vlm5030_interface =
2125static const struct VLM5030interface vlm5030_interface =
21262126{
21272127    REGION_SOUND1, /* memory region  */
21282128    0              /* memory length */
r1404r1405
21342134   K007232_set_volume(0,1,0,(v & 0x0f) * 0x11);
21352135}
21362136
2137static struct K007232_interface k007232_interface =
2137static const struct K007232_interface k007232_interface =
21382138{
21392139   REGION_SOUND2,   /* memory regions */
21402140   volume_callback   /* external port callback */
src/mame/drivers/progolf.c
r1404r1405
120120   PORT_BIT( 0x80, IP_ACTIVE_HIGH,IPT_COIN2 ) PORT_IMPULSE(2)
121121INPUT_PORTS_END
122122
123static gfx_layout charlayout =
123static const gfx_layout charlayout =
124124{
125125   8,8,    /* 8*8 characters */
126126   1024,   /* 1024 characters */
r1404r1405
131131   8*8     /* every char takes 8 consecutive bytes */
132132};
133133
134static gfx_layout spritelayout =
134static const gfx_layout spritelayout =
135135{
136136   16,16,  /* 16*16 sprites */
137137   256,    /* 256 sprites */
r1404r1405
144144   32*8    /* every sprite takes 32 consecutive bytes */
145145};
146146
147static gfx_layout progolf_charlayout =
147static const gfx_layout progolf_charlayout =
148148{
149149   8,8,         /* 8*8 characters */
150150   RGN_FRAC(1,3),  /* 512 characters */
r1404r1405
155155   8*8     /* every char takes 8 consecutive bytes */
156156};
157157
158static gfx_layout progolf_charlayout2 =
158static const gfx_layout progolf_charlayout2 =
159159{
160160   8,8,         /* 8*8 characters */
161161   RGN_FRAC(1,1),  /* 512 characters */
r1404r1405
167167};
168168
169169#if 1
170static gfx_layout progolf_spritelayout2 =
170static const gfx_layout progolf_spritelayout2 =
171171{
172172   16,16,  /* 16*16 sprites */
173173   RGN_FRAC(1,1),    /* 256 sprites */
src/mame/drivers/magmax.c
r1404r1405
350350GFXDECODE_END
351351
352352
353static struct AY8910interface ay8910_interface =
353static const struct AY8910interface ay8910_interface =
354354{
355355   0,
356356   0,
src/mame/drivers/asteroid.c
r1404r1405
192192
193193static WRITE8_HANDLER( llander_led_w )
194194{
195   static const char *lampname[] =
195   static const char *const lampname[] =
196196   {
197197      "lamp0", "lamp1", "lamp2", "lamp3", "lamp4"
198198   };
r1404r1405
609609 *
610610 *************************************/
611611
612static struct POKEYinterface pokey_interface =
612static const struct POKEYinterface pokey_interface =
613613{
614614   { 0 },
615615   input_port_3_r
src/mame/drivers/stv.c
r1404r1405
933933    7h
934934    7l PORT-AD
935935*/
936static UINT8 port_ad[] =
936static const UINT8 port_ad[] =
937937{
938938   0xcc,0xb2,0x99,0x7f,0x66,0x4c,0x33,0x19
939939};
r1404r1405
26422642
26432643GFXDECODE_END
26442644
2645static struct sh2_config sh2_conf_master = { 0 };
2646static struct sh2_config sh2_conf_slave  = { 1 };
2645static const struct sh2_config sh2_conf_master = { 0 };
2646static const struct sh2_config sh2_conf_slave  = { 1 };
26472647
26482648static int scsp_last_line = 0;
26492649
r1404r1405
26702670   }
26712671}
26722672
2673static struct SCSPinterface scsp_interface =
2673static const struct SCSPinterface scsp_interface =
26742674{
26752675   0,
26762676   0,
src/mame/drivers/megatech.c
r1404r1405
13081308/* 44 */ GAME( 1990, mt_arrow, megatech, megatech, megatech, mtnew, ROT0, "Sega",                  "Arrow Flash (Mega-Tech)", GAME_NOT_WORKING )
13091309/* 45 */ // unknown
13101310/* 46 */ // unknown
1311/* 47 */ GAME( 1990, mt_astrm, megatech, megatech, megatech, mtnew, ROT0, "Sega",                  "Alien Storm (Mega-Tech", GAME_NOT_WORKING )
1311/* 47 */ GAME( 1990, mt_astrm, megatech, megatech, megatech, mtnew, ROT0, "Sega",                  "Alien Storm (Mega-Tech)", GAME_NOT_WORKING )
13121312/* 48 */ GAME( 1991, mt_wwar,  megatech, megatech, megatech, mtnew, ROT0, "Sega",                  "Wrestle War (Mega-Tech)", GAME_NOT_WORKING ) /* Copyright 1989, 1991 Sega */
13131313/* 49 */ GAME( 1991, mt_bbros, megatech, megatech, megatech, mtnew, ROT0, "Sega",                  "Bonanza Bros. (Mega-Tech)", GAME_NOT_WORKING )
13141314/* 50 */ // unknown
src/mame/drivers/timelimt.c
r1404r1405
3131
3232static int nmi_enabled = 0;
3333
34static MACHINE_START( timelimt )
35{
36   soundlatch_setclearedvalue( 0 );
37}
38
3439static MACHINE_RESET( timelimt )
3540{
36   soundlatch_setclearedvalue( 0 );
3741   nmi_enabled = 0;
3842}
3943
r1404r1405
239243
240244/***************************************************************************/
241245
242static struct AY8910interface ay8910_interface =
246static const struct AY8910interface ay8910_interface =
243247{
244248   soundlatch_r
245249};
r1404r1405
269273   MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION)
270274   MDRV_INTERLEAVE(50)
271275
276   MDRV_MACHINE_START(timelimt)
272277   MDRV_MACHINE_RESET(timelimt)
273278
274279   /* video hardware */
src/mame/drivers/warriorb.c
r1404r1405
445445   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
446446}
447447
448static struct YM2610interface ym2610_interface =
448static const struct YM2610interface ym2610_interface =
449449{
450450   irqhandler,
451451   REGION_SOUND2,   /* Delta-T */
r1404r1405
469469   return 0;
470470}
471471
472static struct CustomSound_interface subwoofer_interface =
472static const struct CustomSound_interface subwoofer_interface =
473473{
474474   subwoofer_sh_start,
475475   0, /* none */
src/mame/drivers/igs_blit.c
r1404r1405
24592459//  cpunum_set_input_line(0, 3, state);
24602460}
24612461
2462static struct ics2115_interface pgm_ics2115_interface = {
2462static const struct ics2115_interface pgm_ics2115_interface = {
24632463   REGION_SOUND1,
24642464   sound_irq
24652465};
src/mame/drivers/goal92.c
r1404r1405
237237   cpunum_set_input_line(1, INPUT_LINE_NMI, irq ? ASSERT_LINE : CLEAR_LINE);
238238}
239239
240static struct YM2203interface ym2203_interface =
240static const struct YM2203interface ym2203_interface =
241241{
242242   0,
243243   0,
r1404r1405
258258      cpunum_set_input_line(1, INPUT_LINE_NMI, PULSE_LINE);
259259}
260260
261static struct MSM5205interface msm5205_interface =
261static const struct MSM5205interface msm5205_interface =
262262{
263263   goal92_adpcm_int,   /* interrupt function */
264264   MSM5205_S96_4B      /* 4KHz 4-bit */
src/mame/drivers/champbwl.c
r1404r1405
323323   GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 32 )
324324GFXDECODE_END
325325
326static struct x1_010_interface champbwl_sound_intf =
326static const struct x1_010_interface champbwl_sound_intf =
327327{
328328   0x0000      /* address */
329329};
src/mame/drivers/bishi.c
r1404r1405
256256      cpunum_set_input_line(0, MC68000_IRQ_1, CLEAR_LINE);
257257}
258258
259static struct YMZ280Binterface ymz280b_intf =
259static const struct YMZ280Binterface ymz280b_intf =
260260{
261261   REGION_SOUND1,
262262   sound_irq_gen
src/mame/drivers/mayumi.c
r1404r1405
261261   GFXDECODE_ENTRY( REGION_GFX1, 0x00000, charlayout, 0, 32 )
262262GFXDECODE_END
263263
264static struct YM2203interface ym2203_interface =
264static const struct YM2203interface ym2203_interface =
265265{
266266   input_port_0_r,
267267   input_port_1_r
src/mame/drivers/alg.c
r1404r1405
436436 *
437437 *************************************/
438438
439static struct CustomSound_interface amiga_custom_interface =
439static const struct CustomSound_interface amiga_custom_interface =
440440{
441441   amiga_sh_start
442442};
src/mame/drivers/fromanc2.c
r1404r1405
687687   cpunum_set_input_line(1, 0, irq ? ASSERT_LINE : CLEAR_LINE);
688688}
689689
690static struct YM2610interface ym2610_interface =
690static const struct YM2610interface ym2610_interface =
691691{
692692   irqhandler,
693693   0,
src/mame/drivers/gridlee.c
r1404r1405
402402 *
403403 *************************************/
404404
405static struct CustomSound_interface custom_interface =
405static const struct CustomSound_interface custom_interface =
406406{
407407   gridlee_sh_start
408408};
src/mame/drivers/rallyx.c
r1404r1405
811811GFXDECODE_END
812812
813813
814static struct namco_interface namco_interface =
814static const struct namco_interface namco_interface =
815815{
816816   3,            /* number of voices */
817817   REGION_SOUND1   /* memory region */
src/mame/drivers/bnstars.c
r1404r1405
13061306ADDRESS_MAP_END
13071307#endif
13081308
1309static struct YMF271interface ymf271_interface1 =
1309static const struct YMF271interface ymf271_interface1 =
13101310{
13111311   REGION_SOUND1
13121312};
13131313
1314static struct YMF271interface ymf271_interface2 =
1314static const struct YMF271interface ymf271_interface2 =
13151315{
13161316   REGION_SOUND2
13171317};
src/mame/drivers/bking2.c
r1404r1405
465465   8*8     /* every char takes 8 consecutive bytes */
466466};
467467
468static gfx_layout crowlayout =
468static const gfx_layout crowlayout =
469469{
470470   16,32,   /* 16*32 characters */
471471   16,      /* 16 characters */
r1404r1405
482482   128*8    /* every sprite takes 128 consecutive bytes */
483483};
484484
485static gfx_layout balllayout =
485static const gfx_layout balllayout =
486486{
487487   8,16,  /* 8*16 sprites */
488488   8,     /* 8 sprites */
r1404r1405
508508   if (data != 0x00) logerror("portB = %02x\n",data);
509509}
510510
511static struct AY8910interface ay8910_interface =
511static const struct AY8910interface ay8910_interface =
512512{
513513   0,
514514   0,
src/mame/drivers/gcpinbal.c
r1404r1405
366366                            (SOUND)
367367**************************************************************/
368368
369static struct MSM5205interface msm5205_interface =
369static const struct MSM5205interface msm5205_interface =
370370{
371371   NULL,            /* VCK function */
372372   MSM5205_S48_4B      /* 8 kHz */
src/mame/drivers/realbrk.c
r1404r1405
654654                        Billiard Academy Real Break
655655***************************************************************************/
656656
657static struct YMZ280Binterface realbrk_ymz280b_intf =
657static const struct YMZ280Binterface realbrk_ymz280b_intf =
658658{
659659   REGION_SOUND1,
660660   0
src/mame/drivers/arcadia.c
r1404r1405
273273 *
274274 *************************************/
275275
276static struct CustomSound_interface amiga_custom_interface =
276static const struct CustomSound_interface amiga_custom_interface =
277277{
278278   amiga_sh_start
279279};
src/mame/drivers/bottom9.c
r1404r1405
383383   K007232_set_volume(1,1,0,(v & 0x0f) * 0x11);
384384}
385385
386static struct K007232_interface k007232_interface_1 =
386static const struct K007232_interface k007232_interface_1 =
387387{
388388   REGION_SOUND1,
389389   volume_callback0
390390};
391391
392static struct K007232_interface k007232_interface_2 =
392static const struct K007232_interface k007232_interface_2 =
393393{
394394   REGION_SOUND2,
395395   volume_callback1
src/mame/drivers/flower.c
r1404r1405
224224   GFXDECODE_ENTRY( REGION_GFX3, 0, flower_tilelayout, 0,  16 )
225225GFXDECODE_END
226226
227static struct CustomSound_interface custom_interface =
227static const struct CustomSound_interface custom_interface =
228228{
229229   flower_sh_start
230230};
src/mame/drivers/battlera.c
r1404r1405
259259
260260/******************************************************************************/
261261
262static struct MSM5205interface msm5205_interface =
262static const struct MSM5205interface msm5205_interface =
263263{
264264   battlera_adpcm_int,/* interrupt function */
265265   MSM5205_S48_4B      /* 8KHz            */
src/mame/drivers/xain.c
r1404r1405
458458   cpunum_set_input_line(2,M6809_FIRQ_LINE,irq ? ASSERT_LINE : CLEAR_LINE);
459459}
460460
461static struct YM2203interface ym2203_interface =
461static const struct YM2203interface ym2203_interface =
462462{
463463   0,0,0,0,irqhandler
464464};
src/mame/drivers/namcos1.c
r1404r1405
965965   cpunum_set_input_line( 2, M6809_FIRQ_LINE, irq ? ASSERT_LINE : CLEAR_LINE);
966966}
967967
968static struct YM2151interface ym2151_interface =
968static const struct YM2151interface ym2151_interface =
969969{
970970   namcos1_sound_interrupt
971971};
972972
973static struct namco_interface namco_interface =
973static const struct namco_interface namco_interface =
974974{
975975   8,          /* number of voices */
976976   -1,         /* memory region */
src/mame/drivers/mainevt.c
r1404r1405
691691   K007232_set_volume(0,1,0,(v & 0x0f) * 0x11);
692692}
693693
694static struct K007232_interface k007232_interface =
694static const struct K007232_interface k007232_interface =
695695{
696696   REGION_SOUND1,   /* memory regions */
697697   volume_callback   /* external port callback */
698698};
699699
700static struct upd7759_interface upd7759_interface =
700static const struct upd7759_interface upd7759_interface =
701701{
702702   REGION_SOUND2,      /* memory region */
703703   0
src/mame/drivers/astrocde.c
r1404r1405
246246
247247static UINT32 ebases_trackball_r(void *param)
248248{
249   static const char *names[] = { "TRACKX2", "TRACKY2", "TRACKX1", "TRACKY1" };
249   static const char *const names[] = { "TRACKX2", "TRACKY2", "TRACKX1", "TRACKY1" };
250250   return readinputportbytag(names[input_select]);
251251}
252252
r1404r1405
462462
463463static UINT32 demndragn_joystick_r(void *param)
464464{
465   static const char *names[] = { "MOVEX", "MOVEY" };
465   static const char *const names[] = { "MOVEX", "MOVEY" };
466466   return readinputportbytag(names[input_select]);
467467}
468468
r1404r1405
12261226 *
12271227 *************************************/
12281228
1229static struct z80_irq_daisy_chain tenpin_daisy_chain[] =
1229static const struct z80_irq_daisy_chain tenpin_daisy_chain[] =
12301230{
12311231   { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 }, /* CTC number 0 */
12321232   { 0, 0, 0, 0, -1 }      /* end mark */
src/mame/drivers/megazone.c
r1404r1405
315315
316316
317317
318static struct AY8910interface ay8910_interface =
318static const struct AY8910interface ay8910_interface =
319319{
320320   megazone_portA_r,
321321   0,
src/mame/drivers/deco156.c
r1404r1405
409409   logerror("sound irq\n");
410410}
411411
412static struct YMZ280Binterface ymz280b_intf =
412static const struct YMZ280Binterface ymz280b_intf =
413413{
414414   REGION_SOUND1,
415415   sound_irq_gen
src/mame/drivers/toki.c
r1404r1405
413413SEIBU_SOUND_SYSTEM_YM3812_HARDWARE
414414
415415
416static struct MSM5205interface msm5205_interface =
416static const struct MSM5205interface msm5205_interface =
417417{
418418   toki_adpcm_int,   /* interrupt function */
419419   MSM5205_S96_4B   /* 4KHz               */
src/mame/drivers/dwarfd.c
r1404r1405
674674   palette_set_color(machine, 6, MAKE_RGB(255, 0, 0));
675675}
676676
677static struct AY8910interface ay8910_interface =
677static const struct AY8910interface ay8910_interface =
678678{
679679   input_port_3_r,
680680   input_port_2_r,
src/mame/drivers/40love.c
r1404r1405
10781078   GFXDECODE_ENTRY( REGION_GFX1, 0, sprite_layout, 0, 64 )
10791079GFXDECODE_END
10801080
1081static struct AY8910interface ay8910_interface =
1081static const struct AY8910interface ay8910_interface =
10821082{
10831083   0,
10841084   0,
r1404r1405
10861086   sound_control_3_w
10871087};
10881088
1089static struct MSM5232interface msm5232_interface =
1089static const struct MSM5232interface msm5232_interface =
10901090{
10911091   { 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) */
10921092};
src/mame/drivers/junofrst.c
r1404r1405
331331
332332
333333
334static struct AY8910interface ay8910_interface =
334static const struct AY8910interface ay8910_interface =
335335{
336336   junofrst_portA_r,
337337   0,
src/mame/drivers/renegade.c
r1404r1405
764764   cpunum_set_input_line(1, M6809_FIRQ_LINE, linestate);
765765}
766766
767static struct YM3526interface ym3526_interface =
767static const struct YM3526interface ym3526_interface =
768768{
769769   irqhandler
770770};
771771
772static struct CustomSound_interface adpcm_interface =
772static const struct CustomSound_interface adpcm_interface =
773773{
774774   renegade_adpcm_start
775775};
src/mame/drivers/galaga.c
r1404r1405
795795   coin_lockout_global_w(data & 1);
796796}
797797
798static struct namcoio_interface intf0 =
798static const struct namcoio_interface intf0 =
799799{
800800   { in0_l, in0_h, in1_l, in1_h },   /* port read handlers */
801801   { out_0, out_1 }            /* port write handlers */
802802};
803static struct namcoio_interface intf1 =
803static const struct namcoio_interface intf1 =
804804{
805805   { dipA_l, dipA_h, dipB_l, dipB_h },   /* port read handlers */
806806   { NULL, NULL }                  /* port write handlers */
r1404r1405
15781578/* The resistance path of the namco sound is 16k compared to
15791579 * the 10k of the highest gain 54xx filter. Giving a 10/16 gain.
15801580 */
1581static struct namco_interface namco_interface =
1581static const struct namco_interface namco_interface =
15821582{
15831583   3,            /* number of voices */
15841584   REGION_SOUND1   /* memory region */
r1404r1405
15881588 * the signal is 1V, or 25%.  The relative volume between
15891589 * 52xx & 54xx is the same.
15901590 */
1591static struct namco_52xx_interface namco_52xx_interface =
1591static const struct namco_52xx_interface namco_52xx_interface =
15921592{
15931593   REGION_SOUND2,   /* memory region */
15941594   4000,         /* Playback frequency - from 555 timer 6M */
src/mame/drivers/macs.c
r1404r1405
340340   PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
341341INPUT_PORTS_END
342342
343static struct ST0016interface st0016_interface =
343static const struct ST0016interface st0016_interface =
344344{
345345   &st0016_charram
346346};
src/mame/drivers/nbmj8688.c
r1404r1405
31263126INPUT_PORTS_END
31273127
31283128
3129static struct AY8910interface ay8910_interface =
3129static const struct AY8910interface ay8910_interface =
31303130{
31313131   nb1413m3_dipsw1_r,      // DIPSW-A read
31323132   nb1413m3_dipsw2_r      // DIPSW-B read
src/mame/drivers/psychic5.c
r1404r1405
539539   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
540540}
541541
542static struct YM2203interface ym2203_interface =
542static const struct YM2203interface ym2203_interface =
543543{
544544   0,0,0,0,irqhandler
545545};
src/mame/drivers/taito_h.c
r1404r1405
163163   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
164164}
165165
166static struct YM2610interface syvalion_ym2610_interface =
166static const struct YM2610interface syvalion_ym2610_interface =
167167{
168168   irqhandler,
169169   REGION_SOUND1,
170170   REGION_SOUND2
171171};
172172
173static struct YM2610interface dleague_ym2610_interface =
173static const struct YM2610interface dleague_ym2610_interface =
174174{
175175   irqhandler,
176176   REGION_SOUND1,
src/mame/drivers/othunder.c
r1404r1405
419419
420420static READ16_HANDLER( othunder_lightgun_r )
421421{
422   static const char *dswname[4] = { P1X_PORT_TAG, P1Y_PORT_TAG, P2X_PORT_TAG, P2Y_PORT_TAG };
422   static const char *const dswname[4] = { P1X_PORT_TAG, P1Y_PORT_TAG, P2X_PORT_TAG, P2Y_PORT_TAG };
423423   return readinputportbytag(dswname[offset]);
424424}
425425
r1404r1405
689689   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
690690}
691691
692static struct YM2610interface ym2610_interface =
692static const struct YM2610interface ym2610_interface =
693693{
694694   irqhandler,
695695   REGION_SOUND2,   /* Delta-T */
src/mame/drivers/ginganin.c
r1404r1405
339339
340340
341341/* The Y8950 is basically a YM3526 with ADPCM built in */
342static struct Y8950interface y8950_interface =
342static const struct Y8950interface y8950_interface =
343343{
344344   0,
345345   REGION_SOUND1   /* ROM region */
src/mame/drivers/tail2nos.c
r1404r1405
249249   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
250250}
251251
252static struct YM2608interface ym2608_interface =
252static const struct YM2608interface ym2608_interface =
253253{
254254   0,
255255   0,
src/mame/drivers/slapshot.c
r1404r1405
532532   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
533533}
534534
535static struct YM2610interface ym2610_interface =
535static const struct YM2610interface ym2610_interface =
536536{
537537   irqhandler,
538538   REGION_SOUND2,   /* Delta-T */
src/mame/drivers/vsnes.c
r1404r1405
20692069   PORT_DIPSETTING(    0xc0, "Wrong 3" )
20702070INPUT_PORTS_END
20712071
2072static struct NESinterface nes_interface_1 =
2072static const struct NESinterface nes_interface_1 =
20732073{
20742074   REGION_CPU1
20752075};
20762076
2077static struct NESinterface nes_interface_2 =
2077static const struct NESinterface nes_interface_2 =
20782078{
20792079   REGION_CPU2
20802080};
src/mame/drivers/victory.c
r1404r1405
306306 *
307307 *************************************/
308308
309static struct CustomSound_interface custom_interface =
309static const struct CustomSound_interface custom_interface =
310310{
311311    victory_sh_start,
312312    0,
src/mame/drivers/cninja.c
r1404r1405
846846   OKIM6295_set_bank_base(1, (data & 1) * 0x40000);
847847}
848848
849static struct YM2151interface ym2151_interface =
849static const struct YM2151interface ym2151_interface =
850850{
851851   sound_irq,
852852   sound_bankswitch_w
853853};
854854
855static struct YM2151interface ym2151_interface2 =
855static const struct YM2151interface ym2151_interface2 =
856856{
857857   sound_irq2
858858};
src/mame/drivers/pacland.c
r1404r1405
400400
401401
402402
403static struct namco_interface namco_interface =
403static const struct namco_interface namco_interface =
404404{
405405   8,      /* number of voices */
406406   -1,      /* memory region */
src/mame/drivers/psikyo4.c
r1404r1405
481481      cpunum_set_input_line(0, 12, CLEAR_LINE);
482482}
483483
484static struct YMF278B_interface ymf278b_interface =
484static const struct YMF278B_interface ymf278b_interface =
485485{
486486   REGION_SOUND1,
487487   irqhandler
src/mame/drivers/wardner.c
r1404r1405
444444   cpunum_set_input_line(1,0,linestate);
445445}
446446
447static struct YM3812interface ym3812_interface =
447static const struct YM3812interface ym3812_interface =
448448{
449449   irqhandler
450450};
src/mame/drivers/jcross.c
r1404r1405
4545static WRITE8_HANDLER(sharedram_w){   jcr_sharedram[offset]=data;}
4646#endif
4747
48static struct namco_interface snkwave_interface =
48static const struct namco_interface snkwave_interface =
4949{
5050   1,
5151   -1
src/mame/drivers/nss.c
r1404r1405
443443   PORT_DIPSETTING(    0x80, DEF_STR( On ) )
444444INPUT_PORTS_END
445445
446static struct CustomSound_interface snes_sound_interface =
446static const struct CustomSound_interface snes_sound_interface =
447447{ snes_sh_start };
448448
449449static GFXDECODE_START( nss )
src/mame/drivers/missile.c
r1404r1405
871871 *
872872 *************************************/
873873
874static struct POKEYinterface pokey_interface =
874static const struct POKEYinterface pokey_interface =
875875{
876876   { 0 },
877877   input_port_3_r
src/mame/drivers/ddrible.c
r1404r1405
322322   GFXDECODE_ENTRY( REGION_GFX2, 0x40000, spritelayout,  64, 16 )   /* colors  0-15 but using lookup table */
323323GFXDECODE_END
324324
325static struct YM2203interface ym2203_interface =
325static const struct YM2203interface ym2203_interface =
326326{
327327   0,
328328   ddrible_vlm5030_busy_r,
r1404r1405
330330   0
331331};
332332
333static struct VLM5030interface vlm5030_interface =
333static const struct VLM5030interface vlm5030_interface =
334334{
335335   REGION_SOUND1,/* memory region of speech rom */
336336   0x10000     /* memory size 64Kbyte * 2 bank */
src/mame/drivers/ladyfrog.c
r1404r1405
120120
121121}
122122
123static struct AY8910interface ay8910_interface =
123static const struct AY8910interface ay8910_interface =
124124{
125125   0,
126126   0,
r1404r1405
128128   unk_w
129129};
130130
131static struct MSM5232interface msm5232_interface =
131static const struct MSM5232interface msm5232_interface =
132132{
133133   { 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6 }
134134};
src/mame/drivers/sidearms.c
r1404r1405
702702   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
703703}
704704
705static struct YM2203interface ym2203_interface =
705static const struct YM2203interface ym2203_interface =
706706{
707707   0,0,0,0,irqhandler
708708};
709709
710static struct YM2151interface whizz_ym2151_interface =
710static const struct YM2151interface whizz_ym2151_interface =
711711{
712712   irqhandler
713713};
src/mame/drivers/taito_x.c
r1404r1405
975975   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
976976}
977977
978static struct YM2610interface ym2610_interface =
978static const struct YM2610interface ym2610_interface =
979979{
980980   irqhandler,
981981   REGION_SOUND1,
982982   REGION_SOUND1
983983};
984984
985static struct YM2610interface ballbros_ym2610_interface =
985static const struct YM2610interface ballbros_ym2610_interface =
986986{
987987   irqhandler,
988988   REGION_SOUND1,
989989   REGION_SOUND2
990990};
991991
992static struct YM2151interface ym2151_interface =
992static const struct YM2151interface ym2151_interface =
993993{
994994   irqhandler
995995};
src/mame/drivers/jack.c
r1404r1405
862862   GFXDECODE_ENTRY( REGION_GFX1, 0, joinem_charlayout, 0, 32 )
863863GFXDECODE_END
864864
865static struct AY8910interface ay8910_interface =
865static const struct AY8910interface ay8910_interface =
866866{
867867   soundlatch_r,
868868   timer_r
src/mame/drivers/tumblep.c
r1404r1405
310310   cpunum_set_input_line(1,1,state); /* IRQ 2 */
311311}
312312
313static struct YM2151interface ym2151_interface =
313static const struct YM2151interface ym2151_interface =
314314{
315315   sound_irq
316316};
src/mame/drivers/dietgo.c
r1404r1405
195195   cpunum_set_input_line(1,1,state); /* IRQ 2 */
196196}
197197
198static struct YM2151interface ym2151_interface =
198static const struct YM2151interface ym2151_interface =
199199{
200200   sound_irq
201201};
src/mame/drivers/taitosj.c
r1404r1405
18271827GFXDECODE_END
18281828
18291829
1830static UINT8 voltable[256] =
1830static const UINT8 voltable[256] =
18311831{
18321832   0xff,0xfe,0xfc,0xfb,0xf9,0xf7,0xf6,0xf4,0xf3,0xf2,0xf1,0xef,0xee,0xec,0xeb,0xea,
18331833   0xe8,0xe7,0xe5,0xe4,0xe2,0xe1,0xe0,0xdf,0xde,0xdd,0xdc,0xdb,0xd9,0xd8,0xd7,0xd6,
r1404r1405
18631863}
18641864
18651865
1866static struct AY8910interface ay8910_interface_1 =
1866static const struct AY8910interface ay8910_interface_1 =
18671867{
18681868   input_port_6_r,
18691869   input_port_7_r
18701870};
18711871
1872static struct AY8910interface ay8910_interface_2 =
1872static const struct AY8910interface ay8910_interface_2 =
18731873{
18741874   0,
18751875   0,
r1404r1405
18771877   dac_vol_w   /* port Bwrite */
18781878};
18791879
1880static struct AY8910interface ay8910_interface_3 =
1880static const struct AY8910interface ay8910_interface_3 =
18811881{
18821882   0,
18831883   0,
r1404r1405
18851885   0
18861886};
18871887
1888static struct AY8910interface ay8910_interface_4 =
1888static const struct AY8910interface ay8910_interface_4 =
18891889{
18901890   0,
18911891   0,
src/mame/drivers/vigilant.c
r1404r1405
567567
568568
569569
570static struct YM2151interface ym2151_interface =
570static const struct YM2151interface ym2151_interface =
571571{
572572   m72_ym2151_irq_handler
573573};
574574
575static struct YM2203interface ym2203_interface =
575static const struct YM2203interface ym2203_interface =
576576{
577577   0,0,0,0,m72_ym2151_irq_handler
578578};
src/mame/drivers/kingobox.c
r1404r1405
536536   GFXDECODE_ENTRY( REGION_GFX4, 0x00000, rk_bglayout,       0, 32 )   /* bg tiles */
537537GFXDECODE_END
538538
539static struct AY8910interface ay8910_interface =
539static const struct AY8910interface ay8910_interface =
540540{
541541   soundlatch_r
542542};
src/mame/drivers/nbmj8991.c
r1404r1405
17461746INPUT_PORTS_END
17471747
17481748
1749static struct AY8910interface ay8910_interface =
1749static const struct AY8910interface ay8910_interface =
17501750{
17511751   input_port_0_r,      // DIPSW-A read
17521752   input_port_1_r      // DIPSW-B read
src/mame/drivers/blockout.c
r1404r1405
306306   cpunum_set_input_line_and_vector(1,0,irq ? ASSERT_LINE : CLEAR_LINE,0xff);
307307}
308308
309static struct YM2151interface ym2151_interface =
309static const struct YM2151interface ym2151_interface =
310310{
311311   blockout_irq_handler
312312};
src/mame/drivers/ettrivia.c
r1404r1405
200200   return 0;
201201}
202202
203static struct AY8910interface ay8912_interface_2 =
203static const struct AY8910interface ay8912_interface_2 =
204204{
205205   input_port_1_r
206206};
207207
208static struct AY8910interface ay8912_interface_3 =
208static const struct AY8910interface ay8912_interface_3 =
209209{
210210   input_port_0_r
211211};
src/mame/drivers/splash.c
r1404r1405
422422   GFXDECODE_ENTRY( REGION_GFX1, 0x000000, tilelayout16,0,128 )
423423GFXDECODE_END
424424
425static struct MSM5205interface splash_msm5205_interface =
425static const struct MSM5205interface splash_msm5205_interface =
426426{
427427   splash_msm5205_int,   /* IRQ handler */
428428   MSM5205_S48_4B      /* 8KHz */
r1404r1405
471471   logerror("2203 IRQ: %d\n", state);
472472}
473473
474static struct YM2203interface ym2203_interface =
474static const struct YM2203interface ym2203_interface =
475475{
476476   0,0,0,0,ym_irq
477477};
src/mame/drivers/jalmah.c
r1404r1405
12931293
12941294static READ16_HANDLER( urashima_mcu_r )
12951295{
1296   static int resp[] = {   0x99, 0xd8, 0x00,
1296   static const int resp[] = {   0x99, 0xd8, 0x00,
12971297                     0x2a, 0x6a, 0x00,
12981298                     0x9c, 0xd8, 0x00,
12991299                     0x2f, 0x6f, 0x00,
r1404r1405
14441444
14451445static READ16_HANDLER( daireika_mcu_r )
14461446{
1447   static int resp[] = {   0x99, 0xd8, 0x00,
1447   static const int resp[] = {   0x99, 0xd8, 0x00,
14481448                     0x2a, 0x6a, 0x00,
14491449                     0x9c, 0xd8, 0x00,
14501450                     0x2f, 0x6f, 0x00,
r1404r1405
17291729
17301730static READ16_HANDLER( mjzoomin_mcu_r )
17311731{
1732   static int resp[] = {   0x9c, 0xd8, 0x00,
1732   static const int resp[] = {   0x9c, 0xd8, 0x00,
17331733                     0x2a, 0x6a, 0x00,
17341734                     0x99, 0xd8, 0x00,
17351735                     0x2f, 0x6f, 0x00,
r1404r1405
18421842
18431843static READ16_HANDLER( kakumei_mcu_r )
18441844{
1845   static int resp[] = {   0x8a, 0xd8, 0x00,
1845   static const int resp[] = {   0x8a, 0xd8, 0x00,
18461846                     0x3c, 0x7c, 0x00,
18471847                     0x99, 0xd8, 0x00,
18481848                     0x25, 0x65, 0x00,
r1404r1405
18631863
18641864static READ16_HANDLER( suchipi_mcu_r )
18651865{
1866   static int resp[] = {   0x8a, 0xd8, 0x00,
1866   static const int resp[] = {   0x8a, 0xd8, 0x00,
18671867                     0x3c, 0x7c, 0x00,
18681868                     0x99, 0xd8, 0x00,
18691869                     0x25, 0x65, 0x00,
src/mame/drivers/f1gp.c
r1404r1405
535535   cpunum_set_input_line(2,0,irq ? ASSERT_LINE : CLEAR_LINE);
536536}
537537
538static struct YM2610interface ym2610_interface =
538static const struct YM2610interface ym2610_interface =
539539{
540540   irqhandler,
541541   REGION_SOUND1,
src/mame/drivers/lvcards.c
r1404r1405
461461
462462/* Sound Interfaces */
463463
464static struct AY8910interface lcay8910_interface =
464static const struct AY8910interface lcay8910_interface =
465465{
466466   input_port_3_r, //DSW0
467467   input_port_4_r  //DSW1
src/mame/drivers/midwunit.c
r1404r1405
611611 *
612612 *************************************/
613613
614static tms34010_config tms_config =
614static const tms34010_config tms_config =
615615{
616616   FALSE,                     /* halt on reset */
617617   0,                        /* the screen operated on */
src/mame/drivers/namcos2.c
r1404r1405
15301530   GFXDECODE_ENTRY( REGION_GFX2, 0x000000, chr_layout,            16*256, 16 )
15311531GFXDECODE_END
15321532
1533static struct C140interface C140_interface =
1533static const struct C140interface C140_interface =
15341534{
15351535   C140_TYPE_SYSTEM2,
15361536   REGION_SOUND1
src/mame/drivers/route16.c
r1404r1405
566566
567567
568568
569static struct AY8910interface stratvox_ay8910_interface =
569static const struct AY8910interface stratvox_ay8910_interface =
570570{
571571   0,
572572   0,
src/mame/drivers/tecmosys.c
r1404r1405
521521   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
522522}
523523
524static struct YMF262interface ymf262_interface =
524static const struct YMF262interface ymf262_interface =
525525{
526526   sound_irq      /* irq */
527527};
528528
529529
530static struct YMZ280Binterface ymz280b_interface =
530static const struct YMZ280Binterface ymz280b_interface =
531531{
532532   REGION_SOUND1,
533533   0   /* irq */
src/mame/drivers/exzisus.c
r1404r1405
315315   cpunum_set_input_line(1, 0, irq ? ASSERT_LINE : CLEAR_LINE);
316316}
317317
318static struct YM2151interface ym2151_interface =
318static const struct YM2151interface ym2151_interface =
319319{
320320   irqhandler
321321};
src/mame/drivers/exidy440.c
r1404r1405
10401040 *
10411041 *************************************/
10421042
1043static struct CustomSound_interface custom_interface =
1043static const struct CustomSound_interface custom_interface =
10441044{
10451045   exidy440_sh_start,
10461046   exidy440_sh_stop
src/mame/drivers/tx1.c
r1404r1405
725725/*    TX-1 Sound Hardware   */
726726/****************************/
727727
728static struct AY8910interface tx1_ay8910_interface =
728static const struct AY8910interface tx1_ay8910_interface =
729729{
730730   0,                        /* Probably hooked up to discrete sound filters */
731731   0,
r1404r1405
785785
786786
787787/* YM2149 IC19 - front left */
788static struct AY8910interface buggyboy_ay8910_interface_1 =
788static const struct AY8910interface buggyboy_ay8910_interface_1 =
789789{
790790   input_port_2_r,
791791   input_port_3_r,
r1404r1405
795795
796796
797797/* YM2149 IC24 - front right */
798static struct AY8910interface buggyboy_ay8910_interface_2 =
798static const struct AY8910interface buggyboy_ay8910_interface_2 =
799799{
800800   0,
801801   0,
src/mame/drivers/merit.c
r1404r1405
780780   { NULL,      misc_w },      /* Port C write */
781781};
782782
783static struct AY8910interface merit_ay8912_interface =
783static const struct AY8910interface merit_ay8912_interface =
784784{
785785   0,0,
786786   led2_w,0
src/mame/drivers/dassault.c
r1404r1405
542542   OKIM6295_set_bank_base(1, (data & 1) * 0x40000);
543543}
544544
545static struct YM2151interface ym2151_interface =
545static const struct YM2151interface ym2151_interface =
546546{
547547   sound_irq,
548548   sound_bankswitch_w
src/mame/drivers/ssrj.c
r1404r1405
161161   GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout,     0, 8*4 )
162162GFXDECODE_END
163163
164static struct AY8910interface ay8910_interface =
164static const struct AY8910interface ay8910_interface =
165165{
166166   0, /* not used ? */
167167   input_port_3_r,
src/mame/drivers/tatsumi.c
r1404r1405
497497   cpunum_set_input_line(2, INPUT_LINE_IRQ0, state);
498498}
499499
500static struct YM2151interface ym2151_interface =
500static const struct YM2151interface ym2151_interface =
501501{
502502   sound_irq
503503};
src/mame/drivers/supbtime.c
r1404r1405
365365   cpunum_set_input_line(1,1,state); /* IRQ 2 */
366366}
367367
368static struct YM2151interface ym2151_interface =
368static const struct YM2151interface ym2151_interface =
369369{
370370   sound_irq
371371};
src/mame/drivers/gbusters.c
r1404r1405
287287   K007232_set_volume(0,1,0,(v & 0x0f) * 0x11);
288288}
289289
290static struct K007232_interface k007232_interface =
290static const struct K007232_interface k007232_interface =
291291{
292292   REGION_SOUND1,   /* memory regions */
293293   volume_callback   /* external port callback */
src/mame/drivers/meadows.c
r1404r1405
805805/* A fake for the missing ball sprites #3 and #4 */
806806static DRIVER_INIT( gypsyjug )
807807{
808   static UINT8 ball[16*2] =
808   static const UINT8 ball[16*2] =
809809   {
810810      0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00,
811811      0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00,
src/mame/drivers/harddriv.c
r1404r1405
190190 *************************************/
191191
192192/* used on the medium-resolution driver boards */
193static tms34010_config gsp_config_driver =
193static const tms34010_config gsp_config_driver =
194194{
195195   TRUE,                     /* halt on reset */
196196   0,                        /* the screen operated on */
r1404r1405
204204
205205
206206/* used on the low-resolution multisync boards for harddrvc, racedrvc, steeltal */
207static tms34010_config gsp_config_multisync =
207static const tms34010_config gsp_config_multisync =
208208{
209209   TRUE,                     /* halt on reset */
210210   0,                        /* the screen operated on */
r1404r1405
218218
219219
220220/* used on the low-resolution multisync board for stunrun */
221static tms34010_config gsp_config_multisync_stunrun =
221static const tms34010_config gsp_config_multisync_stunrun =
222222{
223223   TRUE,                     /* halt on reset */
224224   0,                        /* the screen operated on */
r1404r1405
231231};
232232
233233
234static tms34010_config msp_config =
234static const tms34010_config msp_config =
235235{
236236   TRUE,                     /* halt on reset */
237237   0,                        /* the screen operated on */
r1404r1405
242242};
243243
244244
245static struct dsp32_config dsp32c_config =
245static const struct dsp32_config dsp32c_config =
246246{
247247   hddsk_update_pif            /* a change has occurred on an output pin */
248248};
src/mame/drivers/srmp2.c
r1404r1405
10351035
10361036***************************************************************************/
10371037
1038static struct AY8910interface srmp2_ay8910_interface =
1038static const struct AY8910interface srmp2_ay8910_interface =
10391039{
10401040   input_port_2_r,            /* Input A: DSW 2 */
10411041   input_port_1_r,            /* Input B: DSW 1 */
10421042};
10431043
10441044
1045static struct MSM5205interface msm5205_interface =
1045static const struct MSM5205interface msm5205_interface =
10461046{
10471047   srmp2_adpcm_int,         /* IRQ handler */
10481048   MSM5205_S48_4B            /* 8 KHz, 4 Bits  */
src/mame/drivers/m72.c
r1404r1405
18531853
18541854
18551855
1856static struct YM2151interface ym2151_interface =
1856static const struct YM2151interface ym2151_interface =
18571857{
18581858   m72_ym2151_irq_handler
18591859};
src/mame/drivers/r2dtank.c
r1404r1405
186186}
187187
188188
189static struct AY8910interface ay8910_1_interface =
189static const struct AY8910interface ay8910_1_interface =
190190{
191191   input_port_3_r,
192192   0
193193};
194194
195195
196static struct AY8910interface ay8910_2_interface =
196static const struct AY8910interface ay8910_2_interface =
197197{
198198   input_port_1_r,
199199   input_port_2_r
r1404r1405
226226}
227227
228228
229static TTL74123_interface ttl74123_intf =
229static const TTL74123_interface ttl74123_intf =
230230{
231231   TTL74123_GROUNDED,   /* the hook up type */
232232   RES_K(22),         /* resistor connected to RCext */
src/mame/drivers/snk68.c
r1404r1405
682682   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
683683}
684684
685static struct YM3812interface ym3812_interface =
685static const struct YM3812interface ym3812_interface =
686686{
687687   irqhandler
688688};
689689
690static struct upd7759_interface upd7759_interface =
690static const struct upd7759_interface upd7759_interface =
691691{
692692   REGION_SOUND1      /* memory region */
693693};
src/mame/drivers/madalien.c
r1404r1405
160160{
161161   rectangle rect = { 0, 127, 0, 127 };
162162
163   static crtc6845_interface crtc6845_intf =
163   static const crtc6845_interface crtc6845_intf =
164164   {
165165      0,                /* screen we are acting on */
166166      PIXEL_CLOCK / 8,  /* the clock of the chip  */
r1404r1405
647647GFXDECODE_END
648648
649649
650static struct AY8910interface ay8910_interface =
650static const struct AY8910interface ay8910_interface =
651651{
652652   NULL,
653653   NULL,
src/mame/drivers/aeroboto.c
r1404r1405
244244
245245
246246
247static struct AY8910interface ay8910_interface =
247static const struct AY8910interface ay8910_interface =
248248{
249249   soundlatch_r,
250250   soundlatch2_r
src/mame/drivers/konamigv.c
r1404r1405
292292   psx_irq_set(0x400);
293293}
294294
295static SCSIConfigTable dev_table =
295static const SCSIConfigTable dev_table =
296296{
297297   1, /* 1 SCSI device */
298298   {
r1404r1405
300300   }
301301};
302302
303static struct AM53CF96interface scsi_intf =
303static const struct AM53CF96interface scsi_intf =
304304{
305305   &dev_table,      /* SCSI device table */
306306   &scsi_irq,      /* command completion IRQ */
r1404r1405
331331   state_save_register_global_array(btc_trackball_data);
332332}
333333
334static struct PSXSPUinterface konamigv_psxspu_interface =
334static const struct PSXSPUinterface konamigv_psxspu_interface =
335335{
336336   &g_p_n_psxram,
337337   psx_irq_set,
src/mame/drivers/firetrap.c
r1404r1405
531531
532532
533533
534static struct MSM5205interface msm5205_interface =
534static const struct MSM5205interface msm5205_interface =
535535{
536536   firetrap_adpcm_int,   /* interrupt function */
537537   MSM5205_S48_4B      /* 8KHz ?             */
src/mame/drivers/crgolf.c
r1404r1405
346346 *
347347 *************************************/
348348
349static struct MSM5205interface msm5205_intf =
349static const struct MSM5205interface msm5205_intf =
350350{
351351   vck_callback,
352352   MSM5205_S64_4B
src/mame/drivers/mastboy.c
r1404r1405
644644}
645645
646646
647static struct MSM5205interface msm5205_interface =
647static const struct MSM5205interface msm5205_interface =
648648{
649649   mastboy_adpcm_int,   /* interrupt function */
650650   MSM5205_SEX_4B      /* 4KHz 4-bit */
src/mame/drivers/thedeep.c
r1404r1405
325325   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
326326}
327327
328static struct YM2203interface thedeep_ym2203_intf =
328static const struct YM2203interface thedeep_ym2203_intf =
329329{
330330   0,0,0,0,
331331   irqhandler
src/mame/drivers/oneshot.c
r1404r1405
361361   cpunum_set_input_line(1, 0, irq ? ASSERT_LINE : CLEAR_LINE);
362362}
363363
364static struct YM3812interface ym3812_interface =
364static const struct YM3812interface ym3812_interface =
365365{
366366   irq_handler
367367};
src/mame/drivers/rmhaihai.c
r1404r1405
494494
495495
496496
497static struct AY8910interface ay8910_interface =
497static const struct AY8910interface ay8910_interface =
498498{
499499   input_port_0_r,
500500   input_port_1_r
501501};
502502
503static struct MSM5205interface msm5205_interface =
503static const struct MSM5205interface msm5205_interface =
504504{
505505   0,            /* interrupt function */
506506   MSM5205_SEX_4B   /* vclk input mode    */
src/mame/drivers/topspeed.c
r1404r1405
661661   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
662662}
663663
664static struct YM2151interface ym2151_interface =
664static const struct YM2151interface ym2151_interface =
665665{
666666   irq_handler,
667667   sound_bankswitch_w
668668};
669669
670static struct MSM5205interface msm5205_interface =
670static const struct MSM5205interface msm5205_interface =
671671{
672672   topspeed_msm5205_vck,   /* VCK function */
673673   MSM5205_S48_4B         /* 8 kHz */
src/mame/drivers/zr107.c
r1404r1405
388388   AM_RANGE(0x580000, 0x580001) AM_WRITENOP
389389ADDRESS_MAP_END
390390
391static struct K054539interface k054539_interface =
391static const struct K054539interface k054539_interface =
392392{
393393   REGION_SOUND1
394394};
r1404r1405
547547
548548INPUT_PORTS_END
549549
550static ppc_config zr107_ppc_cfg =
550static const ppc_config zr107_ppc_cfg =
551551{
552552   PPC_MODEL_403GA
553553};
src/mame/drivers/amspdwy.c
r1404r1405
263263   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
264264}
265265
266static struct YM2151interface amspdwy_ym2151_interface =
266static const struct YM2151interface amspdwy_ym2151_interface =
267267{
268268   irq_handler
269269};
src/mame/drivers/segae.c
r1404r1405
352352
353353/* Precalculated tables for H/V counters.  Note the position the counter 'jumps' is marked with with
354354   an empty comment */
355static UINT8 hc_256[] =
355static const UINT8 hc_256[] =
356356{
357357    0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,    0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
358358    0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19,    0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
r1404r1405
379379};
380380
381381
382static UINT8 vc_ntsc_192[] =
382static const UINT8 vc_ntsc_192[] =
383383{
384384    0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a,    0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
385385    0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a,    0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
r1404r1405
400400    0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
401401};
402402
403static UINT8 vc_ntsc_224[] =
403static const UINT8 vc_ntsc_224[] =
404404{
405405    0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a,    0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
406406    0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a,    0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
r1404r1405
421421    0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
422422};
423423
424static UINT8 vc_ntsc_240[] =
424static const UINT8 vc_ntsc_240[] =
425425{
426426    0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
427427    0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
r1404r1405
444444
445445
446446
447static UINT8 vc_pal_192[] =
447static const UINT8 vc_pal_192[] =
448448{
449449    0x00, 0x01, 0x02,    0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
450450    0x10, 0x11, 0x12,    0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
r1404r1405
469469};
470470
471471
472static UINT8 vc_pal_224[] =
472static const UINT8 vc_pal_224[] =
473473{
474474    0x00, 0x01, 0x02,    0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
475475    0x10, 0x11, 0x12,    0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
r1404r1405
493493    0xf7, 0xf8, 0xf9,    0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
494494};
495495
496static UINT8 vc_pal_240[] =
496static const UINT8 vc_pal_240[] =
497497{
498498    0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a,    0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
499499    0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a,    0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
r1404r1405
517517    0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
518518};
519519
520static struct
520static const struct
521521{
522522   UINT8 sms2_name[40];
523523   int sms2_valid;
524524   int sms2_height;
525525   int sms2_tilemap_height;
526   UINT8* sms_vcounter_table;
527   UINT8* sms_hcounter_table;
526   const UINT8* sms_vcounter_table;
527   const UINT8* sms_hcounter_table;
528528
529529} sms_mode_table[] =
530530{
src/mame/drivers/fantland.c
r1404r1405
755755   cpunum_set_input_line_and_vector(1, 0, line ? ASSERT_LINE : CLEAR_LINE, 0x80/4);
756756}
757757
758static struct YM2151interface galaxygn_ym2151_interface =
758static const struct YM2151interface galaxygn_ym2151_interface =
759759{
760760   galaxygn_sound_irq
761761};
r1404r1405
798798
799799
800800// OKI M5205 running at 384kHz [18.432/48]. Sample rate = 384000 / 48
801static struct MSM5205interface msm5205_interface =
801static const struct MSM5205interface msm5205_interface =
802802{
803803   borntofi_adpcm_int,   /* IRQ handler */
804804   MSM5205_S48_4B      /* 8 kHz, 4 Bits  */
src/mame/drivers/dominob.c
r1404r1405
241241GFXDECODE_END
242242
243243
244static struct AY8910interface ay8910_interface =
244static const struct AY8910interface ay8910_interface =
245245{
246246   input_port_5_r,
247247   input_port_4_r
src/mame/drivers/ksys573.c
r1404r1405
13161316   int chip;
13171317   int size;
13181318   UINT8 *data;
1319   static struct
1319   static const struct
13201320   {
13211321      int *start;
13221322      int region;
r1404r1405
15151515   flash_bank = -1;
15161516}
15171517
1518static struct PSXSPUinterface konami573_psxspu_interface =
1518static const struct PSXSPUinterface konami573_psxspu_interface =
15191519{
15201520   &g_p_n_psxram,
15211521   psx_irq_set,
r1404r1405
17131713   if( gx700pwfbf_output_callback != NULL )
17141714   {
17151715      int i;
1716      static int shift[] = { 7, 6, 1, 0, 5, 4, 3, 2 };
1716      static const int shift[] = { 7, 6, 1, 0, 5, 4, 3, 2 };
17171717      for( i = 0; i < 8; i++ )
17181718      {
17191719         int oldbit = ( gx700pwbf_output_data[ offset ] >> shift[ i ] ) & 1;
r1404r1405
18021802   int bit;
18031803} stage[ 2 ];
18041804
1805static int mask[] =
1805static const int mask[] =
18061806{
18071807   0, 6, 2, 4,
18081808   0, 4, 0, 4,
r1404r1405
20242024
20252025/* GX894 digital i/o */
20262026
2027static UINT8 ds2401_xid[] =
2027static const UINT8 ds2401_xid[] =
20282028{
20292029   0x3d, 0xbc, 0x9a, 0x78, 0x56, 0x34, 0x12, 0x01
20302030};
r1404r1405
21572157   if( gx894pwbba_output_callback != NULL )
21582158   {
21592159      int i;
2160      static int shift[] = { 0, 2, 3, 1 };
2160      static const int shift[] = { 0, 2, 3, 1 };
21612161      for( i = 0; i < 4; i++ )
21622162      {
21632163         int oldbit = ( gx894pwbba_output_data[ offset ] >> shift[ i ] ) & 1;
src/mame/drivers/bladestl.c
r1404r1405
415415
416416***************************************************************************/
417417
418static struct YM2203interface ym2203_interface =
418static const struct YM2203interface ym2203_interface =
419419{
420420   0,
421421   0,
r1404r1405
423423   bladestl_port_B_w
424424};
425425
426static struct upd7759_interface upd7759_interface =
426static const struct upd7759_interface upd7759_interface =
427427{
428428   REGION_SOUND1               /* memory regions */
429429};
src/mame/drivers/bwidow.c
r1404r1405
659659 *
660660 *************************************/
661661
662static struct POKEYinterface pokey_interface_1 =
662static const struct POKEYinterface pokey_interface_1 =
663663{
664664   { 0 },
665665   input_port_1_r
666666};
667667
668668
669static struct POKEYinterface pokey_interface_2 =
669static const struct POKEYinterface pokey_interface_2 =
670670{
671671   { 0 },
672672   input_port_2_r
src/mame/drivers/midas.c
r1404r1405
429429   logerror("YMZ280 is generating an interrupt. State=%08x\n",state);
430430}
431431
432static struct YMZ280Binterface ymz280b_interface =
432static const struct YMZ280Binterface ymz280b_interface =
433433{
434434   REGION_SOUND1,
435435   livequiz_irqhandler
src/mame/drivers/ampoker.c
r1404r1405
843843* AY8910 Interfase *
844844*******************/
845845
846static struct AY8910interface ay8910_interface =
846static const struct AY8910interface ay8910_interface =
847847{
8488480, 0, 0, 0   /* no ports used */
849849};
src/mame/drivers/funworld.c
r1404r1405
13891389*    Sound Interface    *
13901390************************/
13911391
1392static struct AY8910interface ay8910_intf =
1392static const struct AY8910interface ay8910_intf =
13931393{
13941394   0,   // portA in
13951395   0,   // portB in
src/mame/drivers/overdriv.c
r1404r1405
385385
386386
387387
388static struct K053260_interface k053260_interface =
388static const struct K053260_interface k053260_interface =
389389{
390390   REGION_SOUND1
391391};
src/mame/drivers/thunderx.c
r1404r1405
685685   K007232_set_volume(0,1,0,(v & 0x0f) * 0x11);
686686}
687687
688static struct K007232_interface k007232_interface =
688static const struct K007232_interface k007232_interface =
689689{
690690   REGION_SOUND1,   /* memory regions */
691691   volume_callback   /* external port callback */
src/mame/drivers/spcforce.c
r1404r1405
228228
229229
230230/* 1-bit RGB palette */
231static UINT16 colortable_source[] =
231static const UINT16 colortable_source[] =
232232{
233233   0, 1, 2, 3, 4, 5, 6, 7,
234234   0, 0, 1, 2, 3, 4, 5, 6,    /* not sure about these, but they are only used */
src/mame/drivers/gsword.c
r1404r1405
242242   return 0;
243243}
244244
245static struct TAITO8741interface gsword_8741interface=
245static const struct TAITO8741interface gsword_8741interface=
246246{
247247   4,         /* 4 chips */
248248   { TAITO8741_MASTER,TAITO8741_SLAVE,TAITO8741_PORT,TAITO8741_PORT },  /* program mode */
r1404r1405
670670
671671
672672
673static struct AY8910interface ay8910_interface =
673static const struct AY8910interface ay8910_interface =
674674{
675675   0,
676676   0,
r1404r1405
678678   0
679679};
680680
681static struct MSM5205interface msm5205_interface =
681static const struct MSM5205interface msm5205_interface =
682682{
683683   0,            /* interrupt function */
684684   MSM5205_SEX_4B   /* vclk input mode    */
src/mame/drivers/nmg5.c
r1404r1405
961961   cpunum_set_input_line(1, 0, state);
962962}
963963
964static struct YM3812interface ym3812_intf =
964static const struct YM3812interface ym3812_intf =
965965{
966966   soundirq   /* IRQ Line */
967967};
src/mame/drivers/mario.c
r1404r1405
377377   mario_sample_names
378378};
379379
380static struct AY8910interface ay8910_interface =
380static const struct AY8910interface ay8910_interface =
381381{
382382   soundlatch_r
383383};
src/mame/drivers/xmen.c
r1404r1405
499499
500500
501501
502static struct K054539interface k054539_interface =
502static const struct K054539interface k054539_interface =
503503{
504504   REGION_SOUND1
505505};
src/mame/drivers/wink.c
r1404r1405
298298   return sound_flag;
299299}
300300
301static struct AY8910interface ay8912_interface =
301static const struct AY8910interface ay8912_interface =
302302{
303303   sound_r
304304};
src/mame/drivers/lethal.c
r1404r1405
610610   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
611611INPUT_PORTS_END
612612
613static struct K054539interface k054539_interface =
613static const struct K054539interface k054539_interface =
614614{
615615   REGION_SOUND1,
616616   NULL,
src/mame/drivers/videopin.c
r1404r1405
117117static WRITE8_HANDLER( videopin_led_w )
118118{
119119   int i = (video_screen_get_vpos(0) >> 5) & 7;
120   static const char* matrix[8][4] =
120   static const char *const matrix[8][4] =
121121   {
122122      { "LED26", "LED18", "LED11", "LED13" },
123123      { "LED25", "LED17", "LED10", "LED08" },
src/mame/drivers/exprraid.c
r1404r1405
283283   cpunum_set_input_line_and_vector(1,0,linestate,0xff);
284284}
285285
286static struct YM3526interface ym3526_interface =
286static const struct YM3526interface ym3526_interface =
287287{
288288   irqhandler
289289};
src/mame/drivers/tecmo16.c
r1404r1405
430430   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
431431}
432432
433static struct YM2151interface ym2151_interface =
433static const struct YM2151interface ym2151_interface =
434434{
435435   irqhandler
436436};
src/mame/drivers/2mindril.c
r1404r1405
184184   cpunum_set_input_line(0,5,irq ? ASSERT_LINE : CLEAR_LINE);
185185}
186186
187static struct YM2610interface ym2610_interface =
187static const struct YM2610interface ym2610_interface =
188188{
189189   irqhandler,
190190   0,
src/mame/drivers/naughtyb.c
r1404r1405
143143
144144static READ8_HANDLER( popflame_protection_r ) /* Not used by bootleg/hack */
145145{
146   static int values[4] = { 0x78, 0x68, 0x48, 0x38|0x80 };
146   static const int values[4] = { 0x78, 0x68, 0x48, 0x38|0x80 };
147147   static int count;
148148
149149   count = (count + 1) % 4;
r1404r1405
351351
352352
353353
354static struct CustomSound_interface naughtyb_custom_interface =
354static const struct CustomSound_interface naughtyb_custom_interface =
355355{
356356   naughtyb_sh_start
357357};
358358
359static struct CustomSound_interface popflame_custom_interface =
359static const struct CustomSound_interface popflame_custom_interface =
360360{
361361   popflame_sh_start
362362};
363363
364static struct TMS36XXinterface tms3615_interface =
364static const struct TMS36XXinterface tms3615_interface =
365365{
366366   TMS3615,   /* TMS36xx subtype */
367367   /*
r1404r1405
706706   ROM_LOAD( "comic_hi.u7",  0x1c000, 0x4000, CRC(8e8b5f71) SHA1(71514af2af2468a13cf5cc4237fa2590d7a16b27) )
707707ROM_END
708708
709ROM_START( trvmstrb )
710   ROM_REGION( 0x10000, REGION_CPU1, 0 )
711   ROM_LOAD( "ic30-3.bin",   0x0000, 0x1000, CRC(d3eb4197) SHA1(5843ffc8ec82ffe9a6519180e54c82b0375cc3dc) )
712   ROM_LOAD( "ic28.bin",     0x1000, 0x1000, CRC(70322d65) SHA1(498102236390f2e15444943e0fff8a53f37db083) )
713   ROM_LOAD( "ic26.bin",     0x2000, 0x1000, CRC(31dfa9cf) SHA1(007c6ef2381ce9e707932c66a451805cec342eeb) )
714
715   ROM_REGION( 0x2000, REGION_GFX1, ROMREGION_DISPOSE )
716   ROM_LOAD( "ic44.bin",     0x0000, 0x1000, CRC(dac8cff7) SHA1(21da2b2ceb4a726d03b2e49a2df75ca66b89a197) )
717   ROM_LOAD( "ic46.bin",     0x1000, 0x1000, CRC(a97ab879) SHA1(67b86d056896f10e0c055fb58c97341cf75c3d17) )
718
719   ROM_REGION( 0x2000, REGION_GFX2, ROMREGION_DISPOSE )
720   ROM_LOAD( "ic48.bin",     0x0000, 0x1000, CRC(79952015) SHA1(8407c2bab476a60d945d82201f01bf59ae9e0dad) )
721   ROM_LOAD( "ic50.bin",     0x1000, 0x1000, CRC(f09da428) SHA1(092d0eea41c8bbd48d7a3aff54c15f85262b21ff) )
722
723   ROM_REGION( 0x0200, REGION_PROMS, 0 )
724   ROM_LOAD( "ic64.bin",     0x0000, 0x0100, CRC(e9915da8) SHA1(7c64ea76e39eaff724179d52ff5482df363fcf56) )  /* palette low & high bits */
725   ROM_RELOAD(              0x0100, 0x0100 )
726
727   ROM_REGION( 0x20000, REGION_USER1, 0 )   /* Questions roms */
728   ROM_LOAD( "earlytv_lo.u2", 0x00000, 0x4000, CRC(dbfce45f) SHA1(5d96186c96dee810b0ef63964cb3614fd486aefa) )
729   ROM_LOAD( "earlytv_hi.u1", 0x04000, 0x4000, CRC(c8f5a02d) SHA1(8a566f83f9bd39ab508085af942957a7ed941813) )
730   ROM_LOAD( "sex_lo.u4",     0x08000, 0x4000, CRC(27a4ff7a) SHA1(7479c69b85ea1f4bb3d368a11cb036f707b65b6b) )
731   ROM_LOAD( "sex_hi.u3",     0x0c000, 0x4000, CRC(de84fc2f) SHA1(ac5736ca6654fc649f2e8e4a996c2b0f1e86947b) )
732   ROM_LOAD( "rock_lo.u6",    0x10000, 0x4000, CRC(ec1df27b) SHA1(95f32b366123742a4576aef272209c8d59cc6b0a) )
733   ROM_LOAD( "rock_hi.u5",    0x14000, 0x4000, CRC(8a4eccc9) SHA1(e3a03f511a84b3321a59f9e9672da27b96931713) )
734   ROM_LOAD( "lifesci_lo.u8", 0x18000, 0x4000, CRC(b58ba9eb) SHA1(4fdd62a464dec84c880e1be598a7896a957d9339) )
735   ROM_LOAD( "lifesci_hi.u7", 0x1c000, 0x4000, CRC(e03dfa12) SHA1(e668ea5bccc95d8a53a1de1d96583beef6636edb) )
736ROM_END
737
709738/* 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).
710739This 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.
711740*/
r1404r1405
786815GAME( 1982, popflamn, popflame, naughtyb, naughtyb, 0,        ROT90, "Jaleco", "Pop Flamer (bootleg on Naughty Boy PCB)", 0 )
787816GAME( 1985, trvmstr,  0,      naughtyb, trvmstr,  trvmstr,  ROT90, "Enerdyne Technologies Inc.", "Trivia Master (set 1)", 0 )
788817GAME( 1985, trvmstra, trvmstr,  naughtyb, trvmstr,  trvmstr,  ROT90, "Enerdyne Technologies Inc.", "Trivia Master (set 2)", 0 )
818GAME( 1985, trvmstrb, trvmstr,  naughtyb, trvmstr,  trvmstr,  ROT90, "Enerdyne Technologies Inc.", "Trivia Master (set 3)", 0 )
789819GAME( 1985, trvgns,   0,      naughtyb, trvmstr,  trvmstr,  ROT90, "bootleg?", "Trivia Genius", 0 )
src/mame/drivers/runaway.c
r1404r1405
339339GFXDECODE_END
340340
341341
342static struct POKEYinterface pokey_interface_1 =
342static const struct POKEYinterface pokey_interface_1 =
343343{
344344   { 0 },
345345   input_port_3_r
346346};
347347
348static struct POKEYinterface pokey_interface_2 =
348static const struct POKEYinterface pokey_interface_2 =
349349{
350350   { runaway_pot_r,runaway_pot_r,runaway_pot_r,runaway_pot_r,runaway_pot_r,runaway_pot_r,runaway_pot_r,runaway_pot_r }
351351};
src/mame/drivers/taitowlf.c
r1404r1405
439439
440440MACHINE_DRIVER_END
441441
442static struct pci_device_info intel82439tx =
442static const struct pci_device_info intel82439tx =
443443{
444444   intel82439tx_pci_r,
445445   intel82439tx_pci_w
446446};
447447
448static struct pci_device_info intel82371ab =
448static const struct pci_device_info intel82371ab =
449449{
450450   intel82371ab_pci_r,
451451   intel82371ab_pci_w
r1404r1405
466466   pic8259_set_irq_line(1, 6, state);
467467}
468468
469static struct kbdc8042_interface at8042 =
469static const struct kbdc8042_interface at8042 =
470470{
471471   KBDC8042_AT386, set_gate_a20, keyboard_interrupt
472472};
473473
474static struct ide_interface ide_intf =
474static const struct ide_interface ide_intf =
475475{
476476   ide_interrupt
477477};
src/mame/drivers/toypop.c
r1404r1405
8181}
8282
8383/* chip #0: player inputs, buttons, coins */
84static struct namcoio_interface intf0_coin =
84static const struct namcoio_interface intf0_coin =
8585{
8686   { in1_h, in0_l, in0_h, in1_l },   /* port read handlers */
8787   { out_coin0, out_coin1 }      /* port write handlers */
8888};
89static struct namcoio_interface intf0 =
89static const struct namcoio_interface intf0 =
9090{
9191   { in1_h, in0_l, in0_h, in1_l },   /* port read handlers */
9292   { NULL, NULL }               /* port write handlers */
9393};
9494
9595/* chip #1: dip switches */
96static struct namcoio_interface intf1 =
96static const struct namcoio_interface intf1 =
9797{
9898   { dipA_h, dipB_l, dipB_h, dipA_l },   /* port read handlers */
9999   { flip, NULL }                  /* port write handlers */
100100};
101101
102102/* chip #2: test/cocktail, optional buttons */
103static struct namcoio_interface intf2 =
103static const struct namcoio_interface intf2 =
104104{
105105   { NULL, in2_l, in2_h, in3 },   /* port read handlers */
106106   { NULL, NULL }               /* port write handlers */
r1404r1405
557557
558558
559559
560static struct namco_interface namco_interface =
560static const struct namco_interface namco_interface =
561561{
562562   8,      /* number of voices */
563563   REGION_SOUND1   /* memory region */
src/mame/drivers/tumbleb.c
r1404r1405
464464   tumbleb2_playmusic();
465465}
466466
467static int tumbleb_sound_lookup[256] = {
467static const int tumbleb_sound_lookup[256] = {
468468   /*0     1     2     3     4     5     6     7     8     9     a     b     c     d     e    f*/
469469   0x00,  -2,  0x00, 0x00,   -2,   -2,   -2,   -2,   -2,   -2,   -2,   -2,   -2,   -2, 0x00,   -2, /* 0 */
470470     -2, 0x00,   -2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 1 */
r1404r1405
21592159}
21602160
21612161
2162static struct YM2151interface semicom_ym2151_interface =
2162static const struct YM2151interface semicom_ym2151_interface =
21632163{
21642164   semicom_irqhandler
21652165};
src/mame/drivers/micro3d.c
r1404r1405
840840
841841
842842
843static struct upd7759_interface upd7759_interface =
843static const struct upd7759_interface upd7759_interface =
844844{
845845   REGION_SOUND1
846846};
847847
848static tms34010_config vgb_config =
848static const tms34010_config vgb_config =
849849{
850850   FALSE,                     /* halt on reset ????? - check this */
851851   0,                        /* the screen operated on */
src/mame/drivers/momoko.c
r1404r1405
243243
244244/****************************************************************************/
245245
246static struct YM2203interface ym2203_interface =
246static const struct YM2203interface ym2203_interface =
247247{
248248   soundlatch_r
249249};
src/mame/drivers/kchamp.c
r1404r1405
420420   }
421421}
422422
423static struct MSM5205interface msm_interface =
423static const struct MSM5205interface msm_interface =
424424{
425425   msmint,         /* interrupt function */
426426   MSM5205_S96_4B   /* 1 / 96 = 3906.25Hz playback */
src/mame/drivers/m90.c
r1404r1405
639639
640640/*****************************************************************************/
641641
642static struct YM2151interface ym2151_interface =
642static const struct YM2151interface ym2151_interface =
643643{
644644   m72_ym2151_irq_handler
645645};
src/mame/drivers/gunbustr.c
r1404r1405
347347   0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
348348};
349349
350static struct EEPROM_interface gunbustr_eeprom_interface =
350static const struct EEPROM_interface gunbustr_eeprom_interface =
351351{
352352   6,            /* address bits */
353353   16,            /* data bits */
src/mame/drivers/taito_z.c
r1404r1405
11341134   return 0xff;
11351135}
11361136
1137static UINT8 nightstr_stick[128]=
1137static const UINT8 nightstr_stick[128]=
11381138{
11391139   0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0xbe,0xbf,0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,
11401140   0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,
r1404r1405
27522752//  cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
27532753}
27542754
2755static struct YM2610interface ym2610_interface =
2755static const struct YM2610interface ym2610_interface =
27562756{
27572757   irqhandler,
27582758   REGION_SOUND2,   /* Delta-T */
27592759   REGION_SOUND1   /* ADPCM */
27602760};
27612761
2762static struct YM2610interface ym2610_interfaceb =
2762static const struct YM2610interface ym2610_interfaceb =
27632763{
27642764   irqhandlerb,
27652765   REGION_SOUND2,   /* Delta-T */
r1404r1405
27862786   return 0;
27872787}
27882788
2789static struct CustomSound_interface subwoofer_interface =
2789static const struct CustomSound_interface subwoofer_interface =
27902790{
27912791   subwoofer_sh_start,
27922792   0, /* none */
src/mame/drivers/phoenix.c
r1404r1405
674674GFXDECODE_END
675675
676676
677static struct TMS36XXinterface phoenix_tms36xx_interface =
677static const struct TMS36XXinterface phoenix_tms36xx_interface =
678678{
679679   MM6221AA,   /* TMS36xx subtype(s) */
680680   {0.50,0,0,1.05,0,0}, /* decay times of voices */
681681    0.21       /* tune speed (time between beats) */
682682};
683683
684static struct CustomSound_interface phoenix_custom_interface =
684static const struct CustomSound_interface phoenix_custom_interface =
685685{
686686   phoenix_sh_start
687687};
688688
689static struct TMS36XXinterface pleiads_tms36xx_interface =
689static const struct TMS36XXinterface pleiads_tms36xx_interface =
690690{
691691   TMS3615,   /* TMS36xx subtype(s) */
692692   /*
r1404r1405
698698   {0.33,0.33,0,0.33,0,0.33}
699699};
700700
701static struct CustomSound_interface pleiads_custom_interface =
701static const struct CustomSound_interface pleiads_custom_interface =
702702{
703703   pleiads_sh_start
704704};
705705
706static struct AY8910interface survival_ay8910_interface =
706static const struct AY8910interface survival_ay8910_interface =
707707{
708708   0,
709709   survival_protection_r
src/mame/drivers/msisaac.c
r1404r1405
517517   GFXDECODE_ENTRY( REGION_GFX2, 0, tile_layout, 0, 64 )
518518GFXDECODE_END
519519
520static struct MSM5232interface msm5232_interface =
520static const struct MSM5232interface msm5232_interface =
521521{
522522   { 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) */
523523};
src/mame/drivers/superqix.c
r1404r1405
869869   pbillian_sh_start
870870};
871871
872static struct AY8910interface pbillian_ay8910_interface =
872static const struct AY8910interface pbillian_ay8910_interface =
873873{
874874   pbillian_ay_port_a_r,         /* port Aread */
875875   input_port_2_r               /* port Bread */
876876};
877877
878static struct AY8910interface hotsmash_ay8910_interface =
878static const struct AY8910interface hotsmash_ay8910_interface =
879879{
880880   hotsmash_ay_port_a_r,         /* port Aread */
881881   input_port_2_r               /* port Bread */
882882};
883883
884static struct AY8910interface sqix_ay8910_interface_1 =
884static const struct AY8910interface sqix_ay8910_interface_1 =
885885{
886886   input_port_3_r,   /* port Aread */
887887   in4_mcu_r,      /* port Bread */
888888};
889889
890static struct AY8910interface sqix_ay8910_interface_2 =
890static const struct AY8910interface sqix_ay8910_interface_2 =
891891{
892892   input_port_1_r,   /* port Aread */
893893   sqix_from_mcu_r,      /* port Bread */
r1404r1405
895895   sqix_z80_mcu_w            /* port Bwrite */
896896};
897897
898static struct AY8910interface bootleg_ay8910_interface_1 =
898static const struct AY8910interface bootleg_ay8910_interface_1 =
899899{
900900   input_port_3_r,   /* port Aread */
901901   input_port_4_r   /* port Bread */
902902};
903903
904static struct AY8910interface bootleg_ay8910_interface_2 =
904static const struct AY8910interface bootleg_ay8910_interface_2 =
905905{
906906   input_port_1_r,   /* port Aread */
907907   bootleg_in0_r   /* port Bread */
r1404r1405
12461246      memcpy(temp,&src[i],16);
12471247      for (j = 0;j < 16;j++)
12481248      {
1249         static int convtable[16] =
1249         static const int convtable[16] =
12501250         {
12511251            0xc, 0x9, 0xb, 0xa,
12521252            0x8, 0xd, 0xf, 0xe,
src/mame/drivers/playch10.c
r1404r1405
724724      cpunum_set_input_line(0, INPUT_LINE_NMI, PULSE_LINE);
725725}
726726
727static struct NESinterface nes_interface =
727static const struct NESinterface nes_interface =
728728{
729729   REGION_CPU2
730730};
src/mame/drivers/cojag.c
r1404r1405
204204
205205static UINT32 *rom_base;
206206
207static struct ide_interface ide_intf =
207static const struct ide_interface ide_intf =
208208{
209209   jaguar_external_int
210210};
r1404r1405
964964 *
965965 *************************************/
966966
967static struct r3000_config config =
967static const struct r3000_config config =
968968{
969969   0,      /* 1 if we have an FPU, 0 otherwise */
970970   4096,   /* code cache size */
r1404r1405
972972};
973973
974974
975static struct jaguar_config gpu_config =
975static const struct jaguar_config gpu_config =
976976{
977977   jaguar_gpu_cpu_int
978978};
979979
980980
981static struct jaguar_config dsp_config =
981static const struct jaguar_config dsp_config =
982982{
983983   jaguar_dsp_cpu_int
984984};
src/mame/drivers/cyberbal.c
r1404r1405
428428 *
429429 *************************************/
430430
431static struct YM2151interface ym2151_interface =
431static const struct YM2151interface ym2151_interface =
432432{
433433   atarigen_ym2151_irq_gen
434434};
src/mame/drivers/lockon.c
r1404r1405
575575        set_led_status(1,!(data & 0x10));            // 'LOCK-ON' lamp
576576}
577577
578static struct YM2203interface ym2203_interface =
578static const struct YM2203interface ym2203_interface =
579579{
580580   input_port_2_r,
581581   0,
src/mame/drivers/mappy.c
r1404r1405
626626}
627627
628628/* chip #0: player inputs, buttons, coins */
629static struct namcoio_interface intf0 =
629static const struct namcoio_interface intf0 =
630630{
631631   { in1_h, in0_l, in0_h, in1_l },   /* port read handlers */
632632   { NULL, NULL }               /* port write handlers */
633633};
634static struct namcoio_interface intf0_lamps =
634static const struct namcoio_interface intf0_lamps =
635635{
636636   { in1_h, in0_l, in0_h, in1_l },   /* port read handlers */
637637   { out_lamps, NULL }            /* port write handlers */
638638};
639639/* chip #1: dip switches, test/cocktail, optional buttons */
640static struct namcoio_interface intf1 =
640static const struct namcoio_interface intf1 =
641641{
642642   { dipB_mux, dipA_l, dipA_h, in2 },   /* port read handlers */
643643   { out_mux, NULL }               /* port write handlers */
644644};
645static struct namcoio_interface intf1_interleave =
645static const struct namcoio_interface intf1_interleave =
646646{
647647   { dipB_muxi, dipA_l, dipA_h, in2 },   /* port read handlers */
648648   { out_mux, NULL }               /* port write handlers */
r1404r1405
15591559
15601560
15611561
1562static struct namco_interface namco_interface =
1562static const struct namco_interface namco_interface =
15631563{
15641564   8,            /* number of voices */
15651565   REGION_SOUND1   /* memory region */
src/mame/drivers/rastan.c
r1404r1405
363363   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
364364}
365365
366static struct YM2151interface ym2151_interface =
366static const struct YM2151interface ym2151_interface =
367367{
368368   irqhandler,
369369   rastan_bankswitch_w
370370};
371371
372static struct MSM5205interface msm5205_interface =
372static const struct MSM5205interface msm5205_interface =
373373{
374374   rastan_msm5205_vck,   /* VCK function */
375375   MSM5205_S48_4B      /* 8 kHz */
src/mame/drivers/pntnpuzl.c
r1404r1405
344344
345345static READ16_HANDLER( pntnpuzl_280014_r )
346346{
347   static int startup[3] = { 0x80, 0x0c, 0x00 };
347   static const int startup[3] = { 0x80, 0x0c, 0x00 };
348348   int res;
349349
350350   if (serial_out == 0x11)
src/mame/drivers/gijoe.c
r1404r1405
331331   PORT_DIPUNUSED( 0x8000, IP_ACTIVE_LOW )
332332INPUT_PORTS_END
333333
334static struct K054539interface k054539_interface =
334static const struct K054539interface k054539_interface =
335335{
336336   REGION_SOUND1,
337337   NULL,
src/mame/drivers/tigeroad.c
r1404r1405
5151    other locations are less frequently used.
5252*/
5353
54static int f1dream_613ea_lookup[16] = {
54static const int f1dream_613ea_lookup[16] = {
55550x0052, 0x0031, 0x00a7, 0x0043, 0x0007, 0x008a, 0x00b1, 0x0066, 0x009f, 0x00cc, 0x0009, 0x004d, 0x0033, 0x0028, 0x00d0, 0x0025};
5656
57static int f1dream_613eb_lookup[256] = {
57static const int f1dream_613eb_lookup[256] = {
58580x0001, 0x00b5, 0x00b6, 0x00b6, 0x00b6, 0x00b6, 0x00b6, 0x00b6, 0x00b7, 0x0001, 0x00b8, 0x002f, 0x002f, 0x002f, 0x002f, 0x00b9,
59590x00aa, 0x0031, 0x00ab, 0x00ab, 0x00ab, 0x00ac, 0x00ad, 0x00ad, 0x00ae, 0x00af, 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x0091,
60600x009c, 0x009d, 0x009e, 0x009f, 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x009b, 0x0091,
r1404r1405
72720x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001e, 0x001e, 0x001e, 0x001f, 0x0020,
73730x000c, 0x000d, 0x000e, 0x0001, 0x000f, 0x0010, 0x0011, 0x0012, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x0013 };
7474
75static int f1dream_17b74_lookup[128] = {
75static const int f1dream_17b74_lookup[128] = {
76760x0003, 0x0040, 0x0005, 0x0080, 0x0003, 0x0080, 0x0005, 0x00a0, 0x0003, 0x0040, 0x0005, 0x00c0, 0x0003, 0x0080, 0x0005, 0x00e0,
77770x0003, 0x0040, 0x0006, 0x0000, 0x0003, 0x0080, 0x0006, 0x0020, 0x0003, 0x0040, 0x0006, 0x0040, 0x0003, 0x0080, 0x0006, 0x0060,
78780x0000, 0x00a0, 0x0009, 0x00e0, 0x0000, 0x00e0, 0x000a, 0x0000, 0x0000, 0x00a0, 0x000a, 0x0020, 0x0000, 0x00e0, 0x000a, 0x0040,
r1404r1405
82820x0000, 0x00a0, 0x0009, 0x00e0, 0x0000, 0x00e0, 0x000a, 0x0000, 0x0000, 0x00a0, 0x000a, 0x0020, 0x0000, 0x00e0, 0x000a, 0x0040,
83830x0000, 0x00a0, 0x000a, 0x0060, 0x0000, 0x00e0, 0x000a, 0x0080, 0x0000, 0x00a0, 0x000a, 0x00a0, 0x0000, 0x00e0, 0x000a, 0x00c0 };
8484
85static int f1dream_2450_lookup[32] = {
85static const int f1dream_2450_lookup[32] = {
86860x0003, 0x0080, 0x0006, 0x0060, 0x0000, 0x00e0, 0x000a, 0x00c0, 0x0003, 0x0080, 0x0006, 0x0060, 0x0000, 0x00e0, 0x000a, 0x00c0,
87870x0003, 0x0080, 0x0006, 0x0060, 0x0000, 0x00e0, 0x000a, 0x00c0, 0x0003, 0x0080, 0x0006, 0x0060, 0x0000, 0x00e0, 0x000a, 0x00c0 };
8888
r1404r1405
531531   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
532532}
533533
534static struct YM2203interface ym2203_interface =
534static const struct YM2203interface ym2203_interface =
535535{
536536   0,0,0,0,irqhandler
537537};
538538
539static struct MSM5205interface msm5205_interface =
539static const struct MSM5205interface msm5205_interface =
540540{
541541   0,            /* interrupt function */
542542   MSM5205_SEX_4B   /* 4KHz playback ?  */
src/mame/drivers/looping.c
r1404r1405
555555 *
556556 *************************************/
557557
558static struct TMS5220interface tms5220_interface =
558static const struct TMS5220interface tms5220_interface =
559559{
560560   looping_spcint
561561};
562562
563static struct AY8910interface ay8910_interface =
563static const struct AY8910interface ay8910_interface =
564564{
565565   soundlatch_r
566566};
src/mame/drivers/segas32.c
r1404r1405
860860
861861static WRITE16_HANDLER( analog_custom_io_w )
862862{
863   static const char *names[] = { "ANALOG1", "ANALOG2", "ANALOG3", "ANALOG4" };
863   static const char *const names[] = { "ANALOG1", "ANALOG2", "ANALOG3", "ANALOG4" };
864864   switch (offset)
865865   {
866866      case 0x10/2:
r1404r1405
876876
877877static READ16_HANDLER( extra_custom_io_r )
878878{
879   static const char *names[] = { "EXTRA1", "EXTRA2", "EXTRA3", "EXTRA4" };
879   static const char *const names[] = { "EXTRA1", "EXTRA2", "EXTRA3", "EXTRA4" };
880880   switch (offset)
881881   {
882882      case 0x20/2:
r1404r1405
893893
894894static WRITE16_HANDLER( orunners_custom_io_w )
895895{
896   static const char *names[] = { "ANALOG1", "ANALOG2", "ANALOG3", "ANALOG4", "ANALOG5", "ANALOG6", "ANALOG7", "ANALOG8" };
896   static const char *const names[] = { "ANALOG1", "ANALOG2", "ANALOG3", "ANALOG4", "ANALOG5", "ANALOG6", "ANALOG7", "ANALOG8" };
897897   switch (offset)
898898   {
899899      case 0x10/2:
r1404r1405
913913
914914static READ16_HANDLER( sonic_custom_io_r )
915915{
916   static const char *names[] = { "TRACKX1", "TRACKY1", "TRACKX2", "TRACKY2", "TRACKX3", "TRACKY3" };
916   static const char *const names[] = { "TRACKX1", "TRACKY1", "TRACKX2", "TRACKY2", "TRACKX3", "TRACKY3" };
917917
918918   switch (offset)
919919   {
r1404r1405
933933
934934static WRITE16_HANDLER( sonic_custom_io_w )
935935{
936   static const char *names[] = { "TRACKX1", "TRACKY1", "TRACKX2", "TRACKY2", "TRACKX3", "TRACKY3" };
936   static const char *const names[] = { "TRACKX1", "TRACKY1", "TRACKX2", "TRACKY2", "TRACKX3", "TRACKY3" };
937937
938938   switch (offset)
939939   {
src/mame/drivers/slapfght.c
r1404r1405
829829
830830
831831
832static struct AY8910interface ay8910_interface_1 =
832static const struct AY8910interface ay8910_interface_1 =
833833{
834834   input_port_0_r,
835835   input_port_1_r
836836};
837837
838static struct AY8910interface ay8910_interface_2 =
838static const struct AY8910interface ay8910_interface_2 =
839839{
840840   input_port_2_r,
841841   input_port_3_r
src/mame/drivers/psikyosh.c
r1404r1405
318318   GFXDECODE_ENTRY( REGION_GFX1, 0, layout_16x16x8, 0x000, 0x100 ) // 8bpp tiles
319319GFXDECODE_END
320320
321static struct EEPROM_interface eeprom_interface_93C56 =
321static const struct EEPROM_interface eeprom_interface_93C56 =
322322{
323323   8,      // address bits 8
324324   8,      // data bits    8
r1404r1405
587587      cpunum_set_input_line(0, 12, CLEAR_LINE);
588588}
589589
590static struct YMF278B_interface ymf278b_interface =
590static const struct YMF278B_interface ymf278b_interface =
591591{
592592   REGION_SOUND1,
593593   irqhandler
src/mame/drivers/boogwing.c
r1404r1405
276276   OKIM6295_set_bank_base(0, (data & 1) * 0x40000);
277277}
278278
279static struct YM2151interface ym2151_interface =
279static const struct YM2151interface ym2151_interface =
280280{
281281   sound_irq,
282282   sound_bankswitch_w
src/mame/drivers/quizdna.c
r1404r1405
443443GFXDECODE_END
444444
445445
446static struct YM2203interface ym2203_interface =
446static const struct YM2203interface ym2203_interface =
447447{
448448   input_port_1_r,
449449   input_port_0_r
src/mame/drivers/darkhors.c
r1404r1405
558558
559559***************************************************************************/
560560
561static gfx_layout layout_16x16x8 =
561static const gfx_layout layout_16x16x8 =
562562{
563563   16,16,
564564   RGN_FRAC(1,4),
src/mame/drivers/upscope.c
r1404r1405
272272 *
273273 *************************************/
274274
275static struct CustomSound_interface amiga_custom_interface =
275static const struct CustomSound_interface amiga_custom_interface =
276276{
277277   amiga_sh_start
278278};
src/mame/drivers/mirax.c
r1404r1405
141141
142142ADDRESS_MAP_END
143143
144static gfx_layout layout16 =
144static const gfx_layout layout16 =
145145{
146146   16,16,
147147   RGN_FRAC(1,3),
r1404r1405
154154   16*16
155155};
156156
157static gfx_layout layout8 =
157static const gfx_layout layout8 =
158158{
159159   8,8,
160160   RGN_FRAC(1,3),
src/mame/drivers/gradius3.c
r1404r1405
325325   K007232_set_volume(0,1,0,(v & 0x0f) * 0x11);
326326}
327327
328static struct K007232_interface k007232_interface =
328static const struct K007232_interface k007232_interface =
329329{
330330   REGION_SOUND1,   /* memory regions */
331331   volume_callback   /* external port callback */
src/mame/drivers/cardline.c
r1404r1405
150150   PORT_BIT( 0xf5, IP_ACTIVE_HIGH, IPT_SPECIAL ) // h/w status bits
151151INPUT_PORTS_END
152152
153static gfx_layout charlayout =
153static const gfx_layout charlayout =
154154{
155155   8,8,
156156   RGN_FRAC(1,1),
src/mame/drivers/omegrace.c
r1404r1405
277277 * 5 4 3 2 1 0 for encoder 2 (not shifted..)
278278 */
279279
280static UINT8 spinnerTable[64] =
280static const UINT8 spinnerTable[64] =
281281{
282282   0x00, 0x04, 0x14, 0x10, 0x18, 0x1c, 0x5c, 0x58,
283283   0x50, 0x54, 0x44, 0x40, 0x48, 0x4c, 0x6c, 0x68,
src/mame/drivers/eolithsp.c
r1404r1405
2929
3030}
3131
32static struct
32static const struct
3333{
3434   const char *s_name;
3535   UINT32 speedup_address;
src/mame/drivers/mystwarr.c
r1404r1405
812812   AM_RANGE(0xfff0, 0xfff3) AM_WRITE(MWA8_NOP)   // unknown write
813813ADDRESS_MAP_END
814814
815static struct K054539interface k054539_interface =
815static const struct K054539interface k054539_interface =
816816{
817817   REGION_SOUND1
818818};
src/mame/drivers/fromance.c
r1404r1405
10411041 *
10421042 *************************************/
10431043
1044static struct MSM5205interface msm5205_interface =
1044static const struct MSM5205interface msm5205_interface =
10451045{
10461046   fromance_adpcm_int,   /* IRQ handler */
10471047   MSM5205_S48_4B      /* 8 KHz */
src/mame/drivers/dlair.c
r1404r1405
133133};
134134
135135
136static struct z80_irq_daisy_chain dleuro_daisy_chain[] =
136static const struct z80_irq_daisy_chain dleuro_daisy_chain[] =
137137{
138138   { z80sio_reset, z80sio_irq_state, z80sio_irq_ack, z80sio_irq_reti, 0 },
139139   { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 },
r1404r1405
783783 *
784784 *************************************/
785785
786static struct AY8910interface ay8910_interface =
786static const struct AY8910interface ay8910_interface =
787787{
788788   input_port_0_r,
789789   input_port_1_r
src/mame/drivers/irobot.c
r1404r1405
280280 *
281281 *************************************/
282282
283static struct POKEYinterface pokey_interface =
283static const struct POKEYinterface pokey_interface =
284284{
285285   { 0 },
286286   input_port_4_r
src/mame/drivers/skykid.c
r1404r1405
439439
440440
441441
442static struct namco_interface namco_interface =
442static const struct namco_interface namco_interface =
443443{
444444   8,               /* number of voices */
445445   -1,               /* memory region */
src/mame/drivers/halleys.c
r1404r1405
287287#define XMASK (SCREEN_WIDTH-1)
288288#define YMASK (SCREEN_HEIGHT-1)
289289
290   static UINT8 penxlat[16]={0x03,0x07,0x0b,0x0f,0x02,0x06,0x0a,0x0e,0x01,0x05,0x09,0x0d,0x00,0x04,0x08,0x0c};
291   static UINT8 rgbmask[16]={0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0xff,0xff,0xff,0xff,0xff};
292   static UINT8 tyremap[ 8]={ 0, 5, 9,13,16,20,24,28};
290   static const UINT8 penxlat[16]={0x03,0x07,0x0b,0x0f,0x02,0x06,0x0a,0x0e,0x01,0x05,0x09,0x0d,0x00,0x04,0x08,0x0c};
291   static const UINT8 rgbmask[16]={0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0xff,0xff,0xff,0xff,0xff};
292   static const UINT8 tyremap[ 8]={ 0, 5, 9,13,16,20,24,28};
293293
294294   UINT8 *param, *src_base;
295295   UINT16 *dst_base;
r1404r1405
19371937}
19381938
19391939
1940static struct AY8910interface ay8910_interface =
1940static const struct AY8910interface ay8910_interface =
19411941{
19421942   0,
19431943   0,
src/mame/drivers/gomoku.c
r1404r1405
160160GFXDECODE_END
161161
162162
163static struct CustomSound_interface custom_interface =
163static const struct CustomSound_interface custom_interface =
164164{
165165   gomoku_sh_start
166166};
src/mame/drivers/djmain.c
r1404r1405
11521152 *
11531153 *************************************/
11541154
1155static struct ide_interface ide_intf =
1155static const struct ide_interface ide_intf =
11561156{
11571157   ide_interrupt,
11581158};
r1404r1405
11651165 *
11661166 *************************************/
11671167
1168static struct K054539interface k054539_interface =
1168static const struct K054539interface k054539_interface =
11691169{
11701170   REGION_SOUND1
11711171};
r1404r1405
17311731   ide_controller_init(0, &ide_intf);
17321732}
17331733
1734static UINT8 beatmania_master_password[2 + 32] =
1734static const UINT8 beatmania_master_password[2 + 32] =
17351735{
17361736   0x01, 0x00,
17371737   0x4d, 0x47, 0x43, 0x28, 0x4b, 0x29, 0x4e, 0x4f,
r1404r1405
17421742
17431743static DRIVER_INIT( hmcompmx )
17441744{
1745   static UINT8 hmcompmx_user_password[2 + 32] =
1745   static const UINT8 hmcompmx_user_password[2 + 32] =
17461746   {
17471747      0x00, 0x00,
17481748      0x44, 0x42, 0x56, 0x4b, 0x3a, 0x34, 0x38, 0x2a,
r1404r1405
17591759
17601760static DRIVER_INIT( bm4thmix )
17611761{
1762   static UINT8 bm4thmix_user_password[2 + 32] =
1762   static const UINT8 bm4thmix_user_password[2 + 32] =
17631763   {
17641764      0x00, 0x00,
17651765      0x44, 0x42, 0x29, 0x4b, 0x2f, 0x2c, 0x4c, 0x32,
r1404r1405
17751775
17761776static DRIVER_INIT( bm5thmix )
17771777{
1778   static UINT8 bm5thmix_user_password[2 + 32] =
1778   static const UINT8 bm5thmix_user_password[2 + 32] =
17791779   {
17801780      0x00, 0x00,
17811781      0x44, 0x42, 0x56, 0x4b, 0x37, 0x35, 0x4a, 0x23,
r1404r1405
17921792
17931793static DRIVER_INIT( bmclubmx )
17941794{
1795   static UINT8 bmclubmx_user_password[2 + 32] =
1795   static const UINT8 bmclubmx_user_password[2 + 32] =
17961796   {
17971797      0x00, 0x00,
17981798      0x44, 0x20, 0x30, 0x57, 0x3c, 0x3f, 0x38, 0x32,
r1404r1405
18101810
18111811static DRIVER_INIT( bmcompm2 )
18121812{
1813   static UINT8 bmcompm2_user_password[2 + 32] =
1813   static const UINT8 bmcompm2_user_password[2 + 32] =
18141814   {
18151815      0x00, 0x00,
18161816      0x3a, 0x20, 0x31, 0x3e, 0x46, 0x2c, 0x35, 0x46,
r1404r1405
18271827
18281828static DRIVER_INIT( hmcompm2 )
18291829{
1830   static UINT8 hmcompm2_user_password[2 + 32] =
1830   static const UINT8 hmcompm2_user_password[2 + 32] =
18311831   {
18321832      0x00, 0x00,
18331833      0x3b, 0x39, 0x24, 0x3e, 0x4e, 0x59, 0x5c, 0x32,
r1404r1405
18441844
18451845static DRIVER_INIT( bmdct )
18461846{
1847   static UINT8 bmdct_user_password[2 + 32] =
1847   static const UINT8 bmdct_user_password[2 + 32] =
18481848   {
18491849      0x00, 0x00,
18501850      0x52, 0x47, 0x30, 0x3f, 0x2f, 0x39, 0x54, 0x5e,
r1404r1405
18611861
18621862static DRIVER_INIT( bmcorerm )
18631863{
1864   static UINT8 bmcorerm_user_password[2 + 32] =
1864   static const UINT8 bmcorerm_user_password[2 + 32] =
18651865   {
18661866      0x00, 0x00,
18671867      0x44, 0x42, 0x56, 0x4b, 0x3f, 0x4d, 0x4a, 0x27,
r1404r1405
18781878
18791879static DRIVER_INIT( bm6thmix )
18801880{
1881   static UINT8 bm6thmix_user_password[2 + 32] =
1881   static const UINT8 bm6thmix_user_password[2 + 32] =
18821882   {
18831883      0x00, 0x00,
18841884      0x44, 0x42, 0x56, 0x4b, 0x3d, 0x4d, 0x4a, 0x23,
r1404r1405
18951895
18961896static DRIVER_INIT( bm7thmix )
18971897{
1898   static UINT8 bm7thmix_user_password[2 + 32] =
1898   static const UINT8 bm7thmix_user_password[2 + 32] =
18991899   {
19001900      0x00, 0x00,
19011901      0x44, 0x42, 0x56, 0x4b, 0x3f, 0x4e, 0x4a, 0x25,
r1404r1405
19131913#if 0
19141914static DRIVER_INIT( bmfinal )
19151915{
1916   static UINT8 bmfinal_user_password[2 + 32] =
1916   static const UINT8 bmfinal_user_password[2 + 32] =
19171917   {
19181918      0x00, 0x00,
19191919      0x44, 0x42, 0x56, 0x4b, 0x3f, 0x4f, 0x4a, 0x23,
src/mame/drivers/segas24.c
r1404r1405
532532{
533533   switch(port) {
534534   case 0: {
535      static UINT8 pos[16] = { 0, 1, 3, 2, 6, 4, 12, 8, 9 };
535      static const UINT8 pos[16] = { 0, 1, 3, 2, 6, 4, 12, 8, 9 };
536536      return (readinputport(0) & 0xf) | ((~pos[readinputport(5)>>4]<<4) & 0xf0);
537537   }
538538   case 1:
r1404r1405
763763
764764// Protection magic latch
765765
766static UINT8  mahmajn_mlt[8] = { 5, 1, 6, 2, 3, 7, 4, 0 };
767static UINT8 mahmajn2_mlt[8] = { 6, 0, 5, 3, 1, 4, 2, 7 };
768static UINT8      gqh_mlt[8] = { 3, 7, 4, 0, 2, 6, 5, 1 };
769static UINT8 bnzabros_mlt[8] = { 2, 4, 0, 5, 7, 3, 1, 6 };
770static UINT8   qrouka_mlt[8] = { 1, 6, 4, 7, 0, 5, 3, 2 };
771static UINT8 quizmeku_mlt[8] = { 0, 3, 2, 4, 6, 1, 7, 5 };
772static UINT8   dcclub_mlt[8] = { 4, 3, 7, 0, 2, 6, 1, 5 };
766static const UINT8  mahmajn_mlt[8] = { 5, 1, 6, 2, 3, 7, 4, 0 };
767static const UINT8 mahmajn2_mlt[8] = { 6, 0, 5, 3, 1, 4, 2, 7 };
768static const UINT8      gqh_mlt[8] = { 3, 7, 4, 0, 2, 6, 5, 1 };
769static const UINT8 bnzabros_mlt[8] = { 2, 4, 0, 5, 7, 3, 1, 6 };
770static const UINT8   qrouka_mlt[8] = { 1, 6, 4, 7, 0, 5, 3, 2 };
771static const UINT8 quizmeku_mlt[8] = { 0, 3, 2, 4, 6, 1, 7, 5 };
772static const UINT8   dcclub_mlt[8] = { 4, 3, 7, 0, 2, 6, 1, 5 };
773773
774774static UINT8 mlatch;
775775static const UINT8 *mlatch_table;
r1404r1405
11041104
11051105static DRIVER_INIT(qrouka)
11061106{
1107   system24temp_sys16_io_set_callbacks(hotrod_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
1107   system24temp_sys16_io_set_callbacks(gground_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
11081108   mlatch_table = qrouka_mlt;
11091109   track_size = 0;
11101110}
r1404r1405
12981298   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
12991299   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
13001300   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE )
1301   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("All Service")
1301   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 )
13021302   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
13031303   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
13041304   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN3 )
r1404r1405
17461746   PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
17471747INPUT_PORTS_END
17481748
1749static INPUT_PORTS_START( qrouka ) /* Missing stick input for the 3rd & 4th player */
1750   PORT_INCLUDE( system24_generic )
1749static INPUT_PORTS_START( qrouka )
1750   PORT_INCLUDE( quizmeku )
17511751
1752   PORT_MODIFY("P1")
1753   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START3 )
1754   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
1755   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
1756
1757   PORT_MODIFY("P2")
1758   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START4 )
1759   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
1760   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4)
1761
17621752   PORT_MODIFY("SERVICE")
17631753   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN4 )
17641754   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN3 )
r1404r1405
17661756   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
17671757
17681758   PORT_MODIFY("DSW")
1769   PORT_DIPNAME( 0x01, 0x00, "Play Mode" ) PORT_DIPLOCATION("SWB:1")
1770   PORT_DIPSETTING(    0x01, "2 Player" )
1771   PORT_DIPSETTING(    0x00, "4 Player" )
1772   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:2")
1773   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
1759   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWB:3")
1760   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
17741761   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
17751762   PORT_DIPNAME( 0x08, 0x08, "Coin Chute" ) PORT_DIPLOCATION("SWB:4")
17761763   PORT_DIPSETTING(    0x08, "Common" )
r1404r1405
17801767   PORT_DIPSETTING(    0x00, "3" )
17811768   PORT_DIPSETTING(    0x30, "4" )
17821769   PORT_DIPSETTING(    0x20, "5" )
1783   PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:7,8")
1784   PORT_DIPSETTING(    0x80, DEF_STR( Easy ) )
1785   PORT_DIPSETTING(    0xc0, DEF_STR( Normal ) )
1786   PORT_DIPSETTING(    0x40, DEF_STR( Hard ) )
1787   PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
17881770INPUT_PORTS_END
17891771
17901772static INPUT_PORTS_START( mahmajn )
r1404r1405
18611843   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 )
18621844   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
18631845   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3)
1864   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE4 ) PORT_NAME("P3 Service")
1846   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE4 ) //enabled with "Separate"
18651847    PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3)
18661848   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3)
18671849   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3)
r1404r1405
19021884 *
19031885 *************************************/
19041886
1905static struct YM2151interface ym2151_interface =
1887static const struct YM2151interface ym2151_interface =
19061888{
19071889   irq_ym
19081890};
r1404r1405
22992281/* 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 */
23002282/* 03 */GAME( 1988, gground,  0,        system24, gground,  gground,  ROT270, "Sega", "Gain Ground (World, 3 Players, Floppy Based, FD1094 317-0058-03c?)", 0 )
23012283/* 03 */GAME( 1988, ggroundj, gground,  system24, gground,  gground,  ROT270, "Sega", "Gain Ground (Japan, 2 Players, Floppy Based, FD1094 317-0058-03b)", 0 )
2302/* 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)
2303/* 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)
2304/* 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)
2284/* 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)
2285/* 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)
2286/* 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)
23052287/* 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
23062288/* 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?
23072289/* 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?
src/mame/drivers/ddayjlc.c
r1404r1405
378378   return 0;
379379}
380380
381static struct AY8910interface ay8910_interface =
381static const struct AY8910interface ay8910_interface =
382382{
383383   soundlatch_r
384384};
src/mame/drivers/segas16a.c
r1404r1405
746746
747747static READ16_HANDLER( sjryuko_custom_io_r )
748748{
749   static const char *portname[] = { "MJ0", "MJ1", "MJ2", "MJ3", "MJ4", "MJ5" };
749   static const char *const portname[] = { "MJ0", "MJ1", "MJ2", "MJ3", "MJ4", "MJ5" };
750750
751751   switch (offset & (0x3000/2))
752752   {
r1404r1405
17481748 *
17491749 *************************************/
17501750
1751static struct YM2151interface ym2151_interface =
1751static const struct YM2151interface ym2151_interface =
17521752{
17531753   NULL,
17541754   n7751_control_w
src/mame/drivers/konamigx.c
r1404r1405
12451245   AM_RANGE(0x580000, 0x580001) AM_WRITENOP
12461246ADDRESS_MAP_END
12471247
1248static struct K054539interface k054539_interface =
1248static const struct K054539interface k054539_interface =
12491249{
12501250   REGION_SOUND1
12511251};
r1404r1405
12681268   16*128
12691269};
12701270
1271static gfx_layout t1_charlayout6 =
1271static const gfx_layout t1_charlayout6 =
12721272{
12731273   16, 16,
12741274   RGN_FRAC(1,1),
r1404r1405
12801280   16*16*6
12811281};
12821282
1283static gfx_layout t1_charlayout8 =
1283static const gfx_layout t1_charlayout8 =
12841284{
12851285   16, 16,
12861286   RGN_FRAC(1,1),
r1404r1405
34763476#define BPP6  2
34773477#define BPP66 3
34783478
3479static GXGameInfoT gameDefs[] =
3479static const GXGameInfoT gameDefs[] =
34803480{
34813481   { "racinfrc", 11, 0, 0, BPP4 },
34823482   { "racinfru", 11, 0, 0, BPP4 },
src/mame/drivers/segahang.c
r1404r1405
789789 *
790790 *************************************/
791791
792static struct YM2203interface ym2203_interface =
792static const struct YM2203interface ym2203_interface =
793793{
794794   0,0,0,0,sound_irq
795795};
796796
797797
798static struct YM2151interface ym2151_interface =
798static const struct YM2151interface ym2151_interface =
799799{
800800   sound_irq
801801};
802802
803803
804static struct SEGAPCMinterface segapcm_interface =
804static const struct SEGAPCMinterface segapcm_interface =
805805{
806806   BANK_512,
807807   REGION_SOUND1
src/mame/drivers/carrera.c
r1404r1405
271271}
272272
273273/* these are set as input, but I have no idea which input port it uses is for the AY */
274static struct AY8910interface ay8910_interface =
274static const struct AY8910interface ay8910_interface =
275275{
276276   unknown_r,
277277   unknown_r,
src/mame/drivers/parodius.c
r1404r1405
286286
287287***************************************************************************/
288288
289static struct K053260_interface k053260_interface =
289static const struct K053260_interface k053260_interface =
290290{
291291   REGION_SOUND1 /* memory region */
292292};
src/mame/drivers/quantum.c
r1404r1405
216216 *
217217 *************************************/
218218
219static struct POKEYinterface pokey_interface_1 =
219static const struct POKEYinterface pokey_interface_1 =
220220{
221221   { input_1_r,input_1_r,input_1_r,input_1_r,input_1_r,input_1_r,input_1_r,input_1_r }
222222};
223223
224static struct POKEYinterface pokey_interface_2 =
224static const struct POKEYinterface pokey_interface_2 =
225225{
226226   { input_2_r,input_2_r,input_2_r,input_2_r,input_2_r,input_2_r,input_2_r,input_2_r }
227227};
src/mame/drivers/yamato.c
r1404r1405
454454
455455INPUT_PORTS_END
456456
457static gfx_layout charlayout =
457static const gfx_layout charlayout =
458458{
459459   8,8,    /* 8*8 characters */
460460   512,    /* 512 characters (256 in Crazy Climber) */
r1404r1405
464464   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
465465   8*8     /* every char takes 8 consecutive bytes */
466466};
467static gfx_layout bscharlayout =
467static const gfx_layout bscharlayout =
468468{
469469   8,8,    /* 8*8 characters */
470470   512,//256,    /* 256 characters */
r1404r1405
476476   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
477477   8*8     /* every char takes 8 consecutive bytes */
478478};
479static gfx_layout spritelayout =
479static const gfx_layout spritelayout =
480480{
481481   16,16,  /* 16*16 sprites */
482482   128,    /* 128 sprites (64 in Crazy Climber) */
r1404r1405
490490};
491491
492492
493static gfx_layout trcharlayout =
493static const gfx_layout trcharlayout =
494494{
495495   8,8,
496496   RGN_FRAC(1,2),
r1404r1405
501501   8*8
502502};
503503
504static gfx_layout trspritelayout =
504static const gfx_layout trspritelayout =
505505{
506506   16,16,  /* 16*16 sprites */
507507   RGN_FRAC(1,2),    /* 128 sprites (64 in Crazy Climber) */
src/mame/drivers/blueprnt.c
r1404r1405
276276
277277/* Sound Interfaces */
278278
279static struct AY8910interface ay8910_interface_1 =
279static const struct AY8910interface ay8910_interface_1 =
280280{
281281   0,
282282   soundlatch_r,
r1404r1405
284284   0
285285};
286286
287static struct AY8910interface ay8910_interface_2 =
287static const struct AY8910interface ay8910_interface_2 =
288288{
289289   input_port_2_r,
290290   input_port_3_r
src/mame/drivers/combatsc.c
r1404r1405
639639   GFXDECODE_ENTRY( REGION_GFX2, 0x40000, sprite_layout, 0, 8*16 )
640640GFXDECODE_END
641641
642static struct YM2203interface ym2203_interface =
642static const struct YM2203interface ym2203_interface =
643643{
644644   0,
645645   0,
r1404r1405
647647   0
648648};
649649
650static struct upd7759_interface upd7759_interface =
650static const struct upd7759_interface upd7759_interface =
651651{
652652   REGION_SOUND1,         /* memory region */
653653   0
src/mame/drivers/rockrage.c
r1404r1405
283283
284284***************************************************************************/
285285
286static struct VLM5030interface vlm5030_interface =
286static const struct VLM5030interface vlm5030_interface =
287287{
288288   REGION_SOUND1,   /* memory region of speech rom */
289289   0
src/mame/drivers/midxunit.c
r1404r1405
169169 *
170170 *************************************/
171171
172static tms34010_config tms_config =
172static const tms34010_config tms_config =
173173{
174174   FALSE,                     /* halt on reset */
175175   0,                        /* the screen operated on */
src/mame/drivers/buggychl.c
r1404r1405
403403}
404404
405405
406static struct AY8910interface ay8910_interface_1 =
406static const struct AY8910interface ay8910_interface_1 =
407407{
408408   0,
409409   0,
r1404r1405
411411   portB_0_w
412412};
413413
414static struct AY8910interface ay8910_interface_2 =
414static const struct AY8910interface ay8910_interface_2 =
415415{
416416   0,
417417   0,
r1404r1405
419419   portB_1_w
420420};
421421
422static struct MSM5232interface msm5232_interface =
422static const struct MSM5232interface msm5232_interface =
423423{
424424   { 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) */
425425};
src/mame/drivers/segac2.c
r1404r1405
12641264    Sound interfaces
12651265******************************************************************************/
12661266
1267static struct upd7759_interface upd7759_intf =
1267static const struct upd7759_interface upd7759_intf =
12681268{
12691269   REGION_SOUND1            /* Memory pointer (gen.h) */
12701270};
12711271
1272static struct YM3438interface ym3438_intf =
1272static const struct YM3438interface ym3438_intf =
12731273{
12741274   genesis_irq2_interrupt      /* IRQ handler */
12751275};
src/mame/drivers/gotcha.c
r1404r1405
264264   cpunum_set_input_line(1,0,linestate);
265265}
266266
267static struct YM2151interface ym2151_interface =
267static const struct YM2151interface ym2151_interface =
268268{
269269   irqhandler
270270};
src/mame/drivers/pandoras.c
r1404r1405
388388   return (activecpu_gettotalcycles() / 512) & 0x0f;
389389}
390390
391static struct AY8910interface ay8910_interface =
391static const struct AY8910interface ay8910_interface =
392392{
393393   pandoras_portA_r,   // not used
394394   pandoras_portB_r
src/mame/drivers/taito_f2.c
r1404r1405
38233823   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
38243824}
38253825
3826static struct YM2610interface ym2610_interface =
3826static const struct YM2610interface ym2610_interface =
38273827{
38283828   irq_handler,
38293829   REGION_SOUND2,   /* Delta-T */
r1404r1405
38363836   // Implement //
38373837}
38383838
3839static struct YM2203interface ym2203_interface =
3839static const struct YM2203interface ym2203_interface =
38403840{
38413841   0,   /* portA read */
38423842   0,
src/mame/drivers/stfight.c
r1404r1405
476476   GFXDECODE_ENTRY( REGION_GFX4, 0x0000, spritelayout, 16*4+16*16+16*16, 16 )
477477GFXDECODE_END
478478
479static struct MSM5205interface msm5205_interface =
479static const struct MSM5205interface msm5205_interface =
480480{
481481   stfight_adpcm_int,  /* interrupt function */
482482   MSM5205_S48_4B      /* 8KHz               */
src/mame/drivers/gottlieb.c
r1404r1405
15231523#define gottlieb_samples_interface qbert_samples_interface   /* not used */
15241524#define krull_samples_interface qbert_samples_interface      /* not used */
15251525
1526static struct sp0250_interface sp0250_interface =
1526static const struct sp0250_interface sp0250_interface =
15271527{
15281528   stooges_sp0250_drq
15291529};
src/mame/drivers/sandscrp.c
r1404r1405
353353   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
354354}
355355
356static struct YM2203interface ym2203_intf_sandscrp =
356static const struct YM2203interface ym2203_intf_sandscrp =
357357{
358358   input_port_4_r,   /* Port A Read - DSW 1 */
359359   input_port_5_r,   /* Port B Read - DSW 2 */
src/mame/drivers/ddragon.c
r1404r1405
953953   cpunum_set_input_line( snd_cpu, ym_irq , irq ? ASSERT_LINE : CLEAR_LINE );
954954}
955955
956static struct YM2151interface ym2151_interface =
956static const struct YM2151interface ym2151_interface =
957957{
958958   irq_handler
959959};
960960
961static struct MSM5205interface msm5205_interface =
961static const struct MSM5205interface msm5205_interface =
962962{
963963   dd_adpcm_int,   /* interrupt function */
964964   MSM5205_S48_4B   /* 8kHz */
src/mame/drivers/asterix.c
r1404r1405
266266   PORT_BIT( 0xf800, IP_ACTIVE_HIGH, IPT_UNKNOWN )
267267INPUT_PORTS_END
268268
269static struct K053260_interface k053260_interface =
269static const struct K053260_interface k053260_interface =
270270{
271271   REGION_SOUND1 /* memory region */
272272};
src/mame/drivers/tubep.c
r1404r1405
882882 *
883883 *************************************/
884884
885static struct AY8910interface ay8910_interface_1 =
885static const struct AY8910interface ay8910_interface_1 =
886886{
887887   0,
888888   0,
r1404r1405
890890   ay8910_portB_0_w  /* write port B */
891891};
892892
893static struct AY8910interface ay8910_interface_2 =
893static const struct AY8910interface ay8910_interface_2 =
894894{
895895   0,
896896   0,
r1404r1405
898898   ay8910_portB_1_w  /* write port B */
899899};
900900
901static struct AY8910interface ay8910_interface_3 =
901static const struct AY8910interface ay8910_interface_3 =
902902{
903903   0,
904904   0,
r1404r1405
906906   ay8910_portB_2_w  /* write port B */
907907};
908908
909static struct MSM5205interface msm5205_interface =
909static const struct MSM5205interface msm5205_interface =
910910{
911911   rjammer_adpcm_vck,         /* VCK function */
912912   MSM5205_S48_4B            /* 8 KHz (changes at run time) */
src/mame/drivers/homedata.c
r1404r1405
12991299/**************************************************************************/
13001300
13011301
1302static struct YM2203interface ym2203_interface =
1302static const struct YM2203interface ym2203_interface =
13031303{
13041304   input_port_3_r,
13051305   input_port_4_r
src/mame/drivers/exidy.c
r1404r1405
811811};
812812
813813
814static struct CustomSound_interface exidy_custom_interface =
814static const struct CustomSound_interface exidy_custom_interface =
815815{
816816   exidy_sh_start
817817};
src/mame/drivers/xxmissio.c
r1404r1405
269269
270270/****************************************************************************/
271271
272static struct YM2203interface ym2203_interface_1 =
272static const struct YM2203interface ym2203_interface_1 =
273273{
274274   input_port_2_r,
275275   input_port_3_r
276276};
277277
278static struct YM2203interface ym2203_interface_2 =
278static const struct YM2203interface ym2203_interface_2 =
279279{
280280   0,
281281   0,
src/mame/drivers/mugsmash.c
r1404r1405
421421   cpunum_set_input_line( 1, 0 , irq ? ASSERT_LINE : CLEAR_LINE );
422422}
423423
424static struct YM2151interface ym2151_interface =
424static const struct YM2151interface ym2151_interface =
425425{
426426   irq_handler
427427};
src/mame/drivers/pcktgal.c
r1404r1405
225225
226226/***************************************************************************/
227227
228static struct MSM5205interface msm5205_interface =
228static const struct MSM5205interface msm5205_interface =
229229{
230230   pcktgal_adpcm_int,   /* interrupt function */
231231   MSM5205_S48_4B      /* 8KHz            */
src/mame/drivers/hyhoo.c
r1404r1405
255255INPUT_PORTS_END
256256
257257
258static struct AY8910interface ay8910_interface =
258static const struct AY8910interface ay8910_interface =
259259{
260260   input_port_0_r,            // DIPSW-A read
261261   input_port_1_r            // DIPSW-B read
src/mame/drivers/hng64.c
r1404r1405
14211421
14221422
14231423/* ?? */
1424static struct mips3_config config =
1424static const struct mips3_config config =
14251425{
14261426   16384,            /* code cache size */
14271427   16384            /* data cache size */
src/mame/drivers/macrossp.c
r1404r1405
519519//  cpunum_set_input_line(1,1,irq ? ASSERT_LINE : CLEAR_LINE);
520520}
521521
522static struct ES5506interface es5506_interface =
522static const struct ES5506interface es5506_interface =
523523{
524524   REGION_SOUND1,
525525   REGION_SOUND2,
src/mame/drivers/gladiatr.c
r1404r1405
256256   return 0;
257257}
258258
259static struct TAITO8741interface gsword_8741interface=
259static const struct TAITO8741interface gsword_8741interface=
260260{
261261   4,         /* 4 chips */
262262   {TAITO8741_MASTER,TAITO8741_SLAVE,TAITO8741_PORT,TAITO8741_PORT},/* program mode */
r1404r1405
653653   return mame_rand(Machine);
654654}
655655
656static struct YM2203interface ppking_ym2203_interface =
656static const struct YM2203interface ppking_ym2203_interface =
657657{
658658   f1_r,
659659   f1_r
660660};
661661
662static struct YM2203interface gladiatr_ym2203_interface =
662static const struct YM2203interface gladiatr_ym2203_interface =
663663{
664664   0,
665665   gladiator_dsw3_r,         /* port B read */
r1404r1405
668668   gladiator_ym_irq          /* NMI request for 2nd cpu */
669669};
670670
671static struct MSM5205interface msm5205_interface =
671static const struct MSM5205interface msm5205_interface =
672672{
673673   0,            /* interrupt function */
674674   MSM5205_SEX_4B   /* vclk input mode    */
src/mame/drivers/puckpkmn.c
r1404r1405
148148ADDRESS_MAP_END
149149
150150
151static struct YM3438interface ym3438_intf =
151static const struct YM3438interface ym3438_intf =
152152{
153153   genesis_irq2_interrupt      /* IRQ handler */
154154};
src/mame/drivers/kinstb.c
r1404r1405
203203
204204INPUT_PORTS_END
205205
206static struct CustomSound_interface snes_sound_interface =
206static const struct CustomSound_interface snes_sound_interface =
207207{ snes_sh_start };
208208
209209static GFXDECODE_START( kinstb )
src/mame/drivers/moo.c
r1404r1405
606606INPUT_PORTS_END
607607
608608
609static struct K054539interface k054539_interface =
609static const struct K054539interface k054539_interface =
610610{
611611   REGION_SOUND1
612612};
src/mame/drivers/taito_l.c
r1404r1405
7777
7878
7979
80static void (*rambank_modify_notifiers[12])(int) =
80static void (*const rambank_modify_notifiers[12])(int) =
8181{
8282   taitol_chardef14_m,   // 14
8383   taitol_chardef15_m,   // 15
r1404r1405
22442244   }
22452245}
22462246
2247static struct YM2203interface ym2203_interface_triple =
2247static const struct YM2203interface ym2203_interface_triple =
22482248{
22492249   0,
22502250   0,
r1404r1405
22532253   irqhandler
22542254};
22552255
2256static struct YM2203interface ym2203_interface_champwr =
2256static const struct YM2203interface ym2203_interface_champwr =
22572257{
22582258   0,
22592259   0,
r1404r1405
22632263};
22642264
22652265
2266static struct MSM5205interface msm5205_interface =
2266static const struct MSM5205interface msm5205_interface =
22672267{
22682268   champwr_msm5205_vck,/* VCK function */
22692269   MSM5205_S48_4B      /* 8 kHz */
22702270};
22712271
2272static struct YM2610interface ym2610_interface =
2272static const struct YM2610interface ym2610_interface =
22732273{
22742274   irqhandler,
22752275   REGION_SOUND1,
22762276   REGION_SOUND1
22772277};
22782278
2279static struct YM2203interface ym2203_interface_single =
2279static const struct YM2203interface ym2203_interface_single =
22802280{
22812281   portA_r,
22822282   portB_r
src/mame/drivers/gyruss.c
r1404r1405
338338
339339
340340
341static struct AY8910interface ay8910_interface_1 =
341static const struct AY8910interface ay8910_interface_1 =
342342{
343343   0,
344344   0,
r1404r1405
346346   gyruss_filter0_w
347347};
348348
349static struct AY8910interface ay8910_interface_2 =
349static const struct AY8910interface ay8910_interface_2 =
350350{
351351   0,
352352   0,
r1404r1405
354354   gyruss_filter1_w
355355};
356356
357static struct AY8910interface ay8910_interface_3 =
357static const struct AY8910interface ay8910_interface_3 =
358358{
359359   gyruss_portA_r
360360};
src/mame/drivers/groundfx.c
r1404r1405
127127   0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
128128};
129129
130static struct EEPROM_interface groundfx_eeprom_interface =
130static const struct EEPROM_interface groundfx_eeprom_interface =
131131{
132132   6,            /* address bits */
133133   16,            /* data bits */
src/mame/drivers/fastlane.c
r1404r1405
261261   K007232_set_volume(1,1,0,(v & 0x0f) * 0x11);
262262}
263263
264static struct K007232_interface k007232_interface_1 =
264static const struct K007232_interface k007232_interface_1 =
265265{
266266   REGION_SOUND1,
267267   volume_callback0
268268};
269269
270static struct K007232_interface k007232_interface_2 =
270static const struct K007232_interface k007232_interface_2 =
271271{
272272   REGION_SOUND2,
273273   volume_callback1
src/mame/drivers/gamecstl.c
r1404r1405
474474
475475MACHINE_DRIVER_END
476476
477static struct pci_device_info intel82439tx =
477static const struct pci_device_info intel82439tx =
478478{
479479   intel82439tx_pci_r,
480480   intel82439tx_pci_w
481481};
482482
483static struct pci_device_info intel82371ab =
483static const struct pci_device_info intel82371ab =
484484{
485485   intel82371ab_pci_r,
486486   intel82371ab_pci_w
r1404r1405
501501   pic8259_set_irq_line(1, 6, state);
502502}
503503
504static struct kbdc8042_interface at8042 =
504static const struct kbdc8042_interface at8042 =
505505{
506506   KBDC8042_AT386, set_gate_a20, keyboard_interrupt
507507};
508508
509static struct ide_interface ide_intf =
509static const struct ide_interface ide_intf =
510510{
511511   ide_interrupt
512512};
src/mame/drivers/cabal.c
r1404r1405
513513GFXDECODE_END
514514
515515
516static struct YM2151interface ym2151_interface =
516static const struct YM2151interface ym2151_interface =
517517{
518518   seibu_ym3812_irqhandler
519519};
r1404r1405
523523   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
524524}
525525
526static struct YM2151interface cabalbl_ym2151_interface =
526static const struct YM2151interface cabalbl_ym2151_interface =
527527{
528528   irqhandler
529529};
530530
531531SEIBU_SOUND_SYSTEM_ADPCM_HARDWARE
532532
533static struct MSM5205interface msm5205_interface_1 =
533static const struct MSM5205interface msm5205_interface_1 =
534534{
535535   0,
536536   MSM5205_SEX_4B
537537};
538538
539static struct MSM5205interface msm5205_interface_2 =
539static const struct MSM5205interface msm5205_interface_2 =
540540{
541541   0,
542542   MSM5205_SEX_4B
src/mame/drivers/cidelsa.c
r1404r1405
4747   return (cdp1869_prd & 0x01) + (readinputportbytag("EF") & 0xfe);
4848}
4949
50static CDP1802_CONFIG cidelsa_cdp1802_config =
50static const CDP1802_CONFIG cidelsa_cdp1802_config =
5151{
5252   cidelsa_mode_r,
5353   cidelsa_ef_r,
r1404r1405
148148    */
149149}
150150
151static struct AY8910interface ay8910_interface =
151static const struct AY8910interface ay8910_interface =
152152{
153153   0,
154154   0,
src/mame/drivers/tickee.c
r1404r1405
261261 *
262262 *************************************/
263263
264static struct AY8910interface ay8910_interface_1 =
264static const struct AY8910interface ay8910_interface_1 =
265265{
266266   input_port_0_r,
267267    input_port_2_r
268268};
269269
270static struct AY8910interface ay8910_interface_2 =
270static const struct AY8910interface ay8910_interface_2 =
271271{
272272   port1_r,
273273   port2_r
r1404r1405
281281 *
282282 *************************************/
283283
284static tms34010_config tms_config =
284static const tms34010_config tms_config =
285285{
286286   FALSE,                     /* halt on reset */
287287   0,                        /* the screen operated on */
src/mame/drivers/hotblock.c
r1404r1405
176176   cpunum_set_input_line(0, INPUT_LINE_NMI, PULSE_LINE);
177177}
178178
179static struct AY8910interface ay8910_interface =
179static const struct AY8910interface ay8910_interface =
180180{
181181   input_port_0_r,
182182   input_port_1_r,
src/mame/drivers/srmp5.c
r1404r1405
213213ADDRESS_MAP_END
214214
215215
216static struct r3000_config config =
216static const struct r3000_config config =
217217{
218218   1,   /* 1 if we have an FPU, 0 otherwise */
219219   4096,   /* code cache size */
r1404r1405
615615   PORT_DIPSETTING(      0x00000000, DEF_STR( On ) )
616616INPUT_PORTS_END
617617
618static struct ST0016interface st0016_interface =
618static const struct ST0016interface st0016_interface =
619619{
620620   &st0016_charram
621621};
src/mame/drivers/m92.c
r1404r1405
933933      timer_call_after_resynch(NULL, YM2151_CLEAR, setvector_callback);
934934}
935935
936static struct YM2151interface ym2151_interface =
936static const struct YM2151interface ym2151_interface =
937937{
938938   sound_irq
939939};
940940
941static struct IremGA20_interface iremGA20_interface =
941static const struct IremGA20_interface iremGA20_interface =
942942{
943943   REGION_SOUND1
944944};
src/mame/drivers/vendetta.c
r1404r1405
566566
567567***************************************************************************/
568568
569static struct K053260_interface k053260_interface =
569static const struct K053260_interface k053260_interface =
570570{
571571   REGION_SOUND1 /* memory region */
572572};
src/mame/drivers/segas16b.c
r1404r1405
978978   { 0 }
979979};
980980
981static const struct segaic16_memory_map_entry *region_info_list[] =
981static const struct segaic16_memory_map_entry *const region_info_list[] =
982982{
983983   &rom_171_5358_info_small[0],
984984   &rom_171_5358_info[0],
r1404r1405
15751575
15761576static WRITE16_HANDLER( hwchamp_custom_io_w )
15771577{
1578   static const char *portname[4] = { "MONITOR", "LEFT", "RIGHT", "DUMMY" };
1578   static const char *const portname[4] = { "MONITOR", "LEFT", "RIGHT", "DUMMY" };
15791579
15801580   switch (offset & (0x3000/2))
15811581   {
r1404r1405
16601660
16611661static READ16_HANDLER( sjryuko_custom_io_r )
16621662{
1663   static const char *portname[] = { "MJ0", "MJ1", "MJ2", "MJ3", "MJ4", "MJ5" };
1663   static const char *const portname[] = { "MJ0", "MJ1", "MJ2", "MJ3", "MJ4", "MJ5" };
16641664
16651665   switch (offset & (0x3000/2))
16661666   {
r1404r1405
30953095 *
30963096 *************************************/
30973097
3098static struct upd7759_interface upd7759_interface =
3098static const struct upd7759_interface upd7759_interface =
30993099{
31003100   0,
31013101   upd7759_generate_nmi
src/mame/drivers/wwfwfest.c
r1404r1405
385385   cpunum_set_input_line( 1, 0 , irq ? ASSERT_LINE : CLEAR_LINE );
386386}
387387
388static struct YM2151interface ym2151_interface =
388static const struct YM2151interface ym2151_interface =
389389{
390390   dd3_ymirq_handler
391391};
src/mame/drivers/multigam.c
r1404r1405
206206   PORT_DIPSETTING( 0x06, "10 min" )
207207INPUT_PORTS_END
208208
209static struct NESinterface multigam_interface_1 =
209static const struct NESinterface multigam_interface_1 =
210210{
211211   REGION_CPU1
212212};
src/mame/drivers/fuukifg2.c
r1404r1405
504504   cpunum_set_input_line(1, 0, state);
505505}
506506
507static struct YM3812interface fuuki16_ym3812_intf =
507static const struct YM3812interface fuuki16_ym3812_intf =
508508{
509509   soundirq   /* IRQ Line */
510510};
src/mame/drivers/nwk-tr.c
r1404r1405
7474#define K001604_NUM_TILES_LAYER0      16384
7575#define K001604_NUM_TILES_LAYER1      4096
7676
77static gfx_layout K001604_char_layout_layer_8x8 =
77static const gfx_layout K001604_char_layout_layer_8x8 =
7878{
7979   8, 8,
8080   K001604_NUM_TILES_LAYER0,
r1404r1405
8585   8*128
8686};
8787
88static gfx_layout K001604_char_layout_layer_16x16 =
88static const gfx_layout K001604_char_layout_layer_16x16 =
8989{
9090   16, 16,
9191   K001604_NUM_TILES_LAYER1,
r1404r1405
885885
886886INPUT_PORTS_END
887887
888static struct RF5C400interface rf5c400_interface =
888static const struct RF5C400interface rf5c400_interface =
889889{
890890   REGION_SOUND1
891891};
892892
893static ppc_config nwktr_ppc_cfg =
893static const ppc_config nwktr_ppc_cfg =
894894{
895895   PPC_MODEL_403GA
896896};
897897
898static sharc_config sharc_cfg =
898static const sharc_config sharc_cfg =
899899{
900900   BOOT_MODE_EPROM
901901};
src/mame/drivers/shangha3.c
r1404r1405
5353static READ16_HANDLER( shangha3_prot_r )
5454{
5555   static int count;
56   static int result[] = { 0x0,0x1,0x3,0x7,0xf,0xe,0xc,0x8,0x0};
56   static const int result[] = { 0x0,0x1,0x3,0x7,0xf,0xe,0xc,0x8,0x0};
5757
5858logerror("PC %04x: read 20004e\n",activecpu_get_pc());
5959
r1404r1405
476476
477477
478478
479static struct AY8910interface ay8910_interface =
479static const struct AY8910interface ay8910_interface =
480480{
481481   input_port_3_r,
482482   input_port_2_r
r1404r1405
487487   cpunum_set_input_line(1, INPUT_LINE_NMI, linestate);
488488}
489489
490static struct YM3438interface ym3438_interface =
490static const struct YM3438interface ym3438_interface =
491491{
492492   irqhandler
493493};
src/mame/drivers/pkscram.c
r1404r1405
264264      cpunum_set_input_line(0,2,irq ? ASSERT_LINE : CLEAR_LINE);
265265}
266266
267static struct YM2203interface ym2203_interface =
267static const struct YM2203interface ym2203_interface =
268268{
269269   0,0,0,0,
270270   irqhandler
src/mame/drivers/vastar.c
r1404r1405
312312
313313
314314
315static struct AY8910interface ay8910_interface =
315static const struct AY8910interface ay8910_interface =
316316{
317317   input_port_3_r,
318318   input_port_4_r
src/mame/drivers/taotaido.c
r1404r1405
349349   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
350350}
351351
352static struct YM2610interface ym2610_interface =
352static const struct YM2610interface ym2610_interface =
353353{
354354   irqhandler,
355355   REGION_SOUND1,
src/mame/drivers/gaelco2.c
r1404r1405
183183   PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
184184INPUT_PORTS_END
185185
186static struct gaelcosnd_interface maniacsq_snd_interface =
186static const struct gaelcosnd_interface maniacsq_snd_interface =
187187{
188188   REGION_GFX1,                      /* memory region */
189189   { 0*0x0080000, 1*0x0080000, 0, 0 },      /* start of each ROM bank */
r1404r1405
334334   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)
335335INPUT_PORTS_END
336336
337static struct gaelcosnd_interface bang_snd_interface =
337static const struct gaelcosnd_interface bang_snd_interface =
338338{
339339   REGION_GFX1,                                  /* memory region */
340340   { 0*0x0200000, 1*0x0200000, 2*0x0200000, 3*0x0200000 }   /* start of each ROM bank */
r1404r1405
537537   PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
538538INPUT_PORTS_END
539539
540static struct gaelcosnd_interface alighunt_snd_interface =
540static const struct gaelcosnd_interface alighunt_snd_interface =
541541{
542542   REGION_GFX1,                                  /* memory region */
543543   { 0*0x0400000, 1*0x0400000, 2*0x0400000, 3*0x0400000 }   /* start of each ROM bank */
r1404r1405
798798   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_SERVICE4 ) PORT_TOGGLE
799799INPUT_PORTS_END
800800
801static struct gaelcosnd_interface touchgo_snd_interface =
801static const struct gaelcosnd_interface touchgo_snd_interface =
802802{
803803   REGION_GFX1,                      /* memory region */
804804   { 0*0x0400000, 1*0x0400000, 0, 0 }      /* start of each ROM bank */
r1404r1405
10011001   /* bits 6 & 7 are used for accessing the NVRAM */
10021002INPUT_PORTS_END
10031003
1004static struct gaelcosnd_interface snowboar_snd_interface =
1004static const struct gaelcosnd_interface snowboar_snd_interface =
10051005{
10061006   REGION_GFX1,                      /* memory region */
10071007   { 0*0x0400000, 1*0x0400000, 0, 0 }      /* start of each ROM bank */
r1404r1405
12441244   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_SERVICE4 ) PORT_TOGGLE
12451245INPUT_PORTS_END
12461246
1247static struct gaelcosnd_interface wrally2_snd_interface =
1247static const struct gaelcosnd_interface wrally2_snd_interface =
12481248{
12491249   REGION_GFX1,                   /* memory region */
12501250   { 0*0x0200000, 1*0x0200000, 0, 0 }   /* start of each ROM bank */
src/mame/drivers/homerun.c
r1404r1405
109109   AM_RANGE(0x71, 0x71) AM_READWRITE(YM2203_read_port_0_r, YM2203_write_port_0_w)
110110ADDRESS_MAP_END
111111
112static struct YM2203interface ym2203_interface =
112static const struct YM2203interface ym2203_interface =
113113{
114114   input_port_3_r,
115115   0,
src/mame/drivers/champbas.c
r1404r1405
252252
253253
254254
255static struct AY8910interface ay8910_interface =
255static const struct AY8910interface ay8910_interface =
256256{
257257   input_port_0_r,
258258   input_port_1_r
src/mame/drivers/baraduke.c
r1404r1405
423423
424424
425425
426static struct namco_interface namco_interface =
426static const struct namco_interface namco_interface =
427427{
428428   8,               /* number of voices */
429429   -1,               /* memory region */
src/mame/drivers/m107.c
r1404r1405
462462      timer_call_after_resynch(NULL, YM2151_CLEAR,setvector_callback);
463463}
464464
465static struct YM2151interface ym2151_interface =
465static const struct YM2151interface ym2151_interface =
466466{
467467   sound_irq
468468};
469469
470static struct IremGA20_interface iremGA20_interface =
470static const struct IremGA20_interface iremGA20_interface =
471471{
472472   REGION_SOUND1
473473};
src/mame/drivers/ninjaw.c
r1404r1405
595595   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
596596}
597597
598static struct YM2610interface ym2610_interface =
598static const struct YM2610interface ym2610_interface =
599599{
600600   irqhandler,
601601   REGION_SOUND2,   /* Delta-T */
r1404r1405
622622   return 0;
623623}
624624
625static struct CustomSound_interface subwoofer_interface =
625static const struct CustomSound_interface subwoofer_interface =
626626{
627627   subwoofer_sh_start,
628628   0, /* none */
src/mame/drivers/matmania.c
r1404r1405
383383   cpunum_set_input_line(1,1,linestate);
384384}
385385
386static struct YM3526interface ym3526_interface =
386static const struct YM3526interface ym3526_interface =
387387{
388388   irqhandler
389389};
src/mame/drivers/arkanoid.c
r1404r1405
753753
754754/* Sound Interfaces */
755755
756static struct AY8910interface ay8910_interface =
756static const struct AY8910interface ay8910_interface =
757757{
758758   input_port_5_r,
759759   input_port_4_r
src/mame/drivers/twin16.c
r1404r1405
933933   K007232_set_volume(0,1,0,(v & 0x0f) * 0x11);
934934}
935935
936static struct K007232_interface k007232_interface =
936static const struct K007232_interface k007232_interface =
937937{
938938   REGION_SOUND1, /* memory regions */
939939   volume_callback   /* external port callback */
940940};
941941
942static struct upd7759_interface upd7759_interface =
942static const struct upd7759_interface upd7759_interface =
943943{
944944   REGION_SOUND2 /* memory region */
945945};
src/mame/drivers/megasys1.c
r1404r1405
641641
642642/* Provided by Jim Hernandez: 3.5MHz for FM, 30KHz (!) for ADPCM */
643643
644static struct YM2151interface ym2151_interface =
644static const struct YM2151interface ym2151_interface =
645645{
646646   megasys1_sound_irq
647647};
r1404r1405
814814}
815815
816816
817static struct YM2203interface ym2203_interface =
817static const struct YM2203interface ym2203_interface =
818818{
819819   0,
820820   0,
src/mame/drivers/crshrace.c
r1404r1405
610610   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
611611}
612612
613static struct YM2610interface ym2610_interface =
613static const struct YM2610interface ym2610_interface =
614614{
615615   irqhandler,
616616   REGION_SOUND1,
src/mame/drivers/airbustr.c
r1404r1405
557557
558558/* Sound Interfaces */
559559
560static struct YM2203interface ym2203_interface =
560static const struct YM2203interface ym2203_interface =
561561{
562562   input_port_3_r,      // DSW-1 connected to port A
563563   input_port_4_r      // DSW-2 connected to port B
src/mame/drivers/clshroad.c
r1404r1405
294294
295295
296296
297static struct CustomSound_interface custom_interface =
297static const struct CustomSound_interface custom_interface =
298298{
299299   wiping_sh_start
300300};
src/mame/drivers/pacman.c
r1404r1405
30483048 *
30493049 *************************************/
30503050
3051static struct namco_interface namco_interface =
3051static const struct namco_interface namco_interface =
30523052{
30533053   3,         /* number of voices */
30543054   REGION_SOUND1   /* memory region */
r1404r1405
33143314   MDRV_GFXDECODE(crush4)
33153315MACHINE_DRIVER_END
33163316
3317static struct AY8910interface crushs_ay8910_interface =
3317static const struct AY8910interface crushs_ay8910_interface =
33183318{
33193319   NULL
33203320};
src/mame/drivers/chqflag.c
r1404r1405
330330}
331331
332332
333static struct YM2151interface ym2151_interface =
333static const struct YM2151interface ym2151_interface =
334334{
335335   chqflag_ym2151_irq_w
336336};
r1404r1405
351351   K007232_set_volume(1,0,(v & 0x0f)*0x11/2,(v >> 4)*0x11/2);
352352}
353353
354static struct K007232_interface k007232_interface_1 =
354static const struct K007232_interface k007232_interface_1 =
355355{
356356   REGION_SOUND1,
357357   volume_callback0
358358};
359359
360static struct K007232_interface k007232_interface_2 =
360static const struct K007232_interface k007232_interface_2 =
361361{
362362   REGION_SOUND2,
363363   volume_callback1
src/mame/drivers/bwing.c
r1404r1405
3535//****************************************************************************
3636// Imports
3737
38extern gfx_layout bwing_tilelayout;
38extern const gfx_layout bwing_tilelayout;
3939
4040extern WRITE8_HANDLER( bwing_paletteram_w );
4141extern WRITE8_HANDLER( bwing_videoram_w );
src/mame/drivers/sf.c
r1404r1405
6969
7070static WRITE16_HANDLER( protection_w )
7171{
72   static int maplist[4][10] = {
72   static const int maplist[4][10] = {
7373      { 1, 0, 3, 2, 4, 5, 6, 7, 8, 9 },
7474      { 4, 5, 6, 7, 1, 0, 3, 2, 8, 9 },
7575      { 3, 2, 1, 0, 6, 7, 4, 5, 8, 9 },
r1404r1405
107107      }
108108   case 2:
109109      {
110         static int delta1[10] = {
110         static const int delta1[10] = {
111111            0x1f80, 0x1c80, 0x2700, 0x2400, 0x2b80, 0x2e80, 0x3300, 0x3600, 0x3a80, 0x3d80
112112         };
113         static int delta2[10] = {
113         static const int delta2[10] = {
114114            0x2180, 0x1800, 0x3480, 0x2b00, 0x3e00, 0x4780, 0x5100, 0x5a80, 0x6400, 0x6d80
115115         };
116116
r1404r1405
161161/* We simulate them with 3 buttons the same way the other versions
162162   internally do */
163163
164static int scale[8] = { 0x00, 0x40, 0xe0, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe };
164static const int scale[8] = { 0x00, 0x40, 0xe0, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe };
165165
166166static READ16_HANDLER( button1_r )
167167{
r1404r1405
803803   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
804804}
805805
806static struct YM2151interface ym2151_interface =
806static const struct YM2151interface ym2151_interface =
807807{
808808   irq_handler
809809};
810810
811static struct MSM5205interface msm5205_interface =
811static const struct MSM5205interface msm5205_interface =
812812{
813813   0,            /* interrupt function */
814814   MSM5205_SEX_4B   /* 8KHz playback ?    */
src/mame/drivers/lsasquad.c
r1404r1405
575575}
576576
577577
578static struct YM2203interface ym2203_interface =
578static const struct YM2203interface ym2203_interface =
579579{
580580   0,
581581   0,
src/mame/drivers/konamim2.c
r1404r1405
10191019INPUT_PORTS_END
10201020
10211021
1022static ppc_config ppc602_config =
1022static const ppc_config ppc602_config =
10231023{
10241024   PPC_MODEL_602,
10251025   0x20,            /* Multiplier 2, Bus = 33MHz, Core = 66MHz */
src/mame/drivers/cham24.c
r1404r1405
189189
190190INPUT_PORTS_END
191191
192static struct NESinterface cham24_interface_1 =
192static const struct NESinterface cham24_interface_1 =
193193{
194194   REGION_CPU1
195195};
src/mame/drivers/cave.c
r1404r1405
443443   }
444444}
445445
446static struct EEPROM_interface eeprom_interface_93C46_8bit =
446static const struct EEPROM_interface eeprom_interface_93C46_8bit =
447447{
448448   7,            // address bits 7
449449   8,            // data bits    8
r1404r1405
20982098      EEPROM_get_data_pointer(0)[cave_region_byte] =  readinputport(2);
20992099}
21002100
2101static struct YMZ280Binterface ymz280b_intf =
2101static const struct YMZ280Binterface ymz280b_intf =
21022102{
21032103   REGION_SOUND1,
21042104   sound_irq_gen
r1404r1405
21092109   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
21102110}
21112111
2112static struct YM2151interface ym2151_interface =
2112static const struct YM2151interface ym2151_interface =
21132113{
21142114   irqhandler
21152115};
21162116
2117static struct YM2203interface ym2203_interface =
2117static const struct YM2203interface ym2203_interface =
21182118{
21192119   0,0,0,0,irqhandler
21202120};
src/mame/drivers/dooyong.c
r1404r1405
907907   return 0;
908908}
909909
910static struct YM2203interface ym2203_interface_1 =
910static const struct YM2203interface ym2203_interface_1 =
911911{
912912   unk_r,
913913   0,
r1404r1405
916916   irqhandler
917917};
918918
919static struct YM2203interface ym2203_interface_2 =
919static const struct YM2203interface ym2203_interface_2 =
920920{
921921   unk_r
922922};
923923
924static struct YM2151interface ym2151_interface =
924static const struct YM2151interface ym2151_interface =
925925{
926926   irqhandler
927927};
src/mame/drivers/brkthru.c
r1404r1405
405405   cpunum_set_input_line(1,M6809_IRQ_LINE,linestate);
406406}
407407
408static struct YM3526interface ym3526_interface =
408static const struct YM3526interface ym3526_interface =
409409{
410410   irqhandler
411411};
src/mame/drivers/fuukifg3.c
r1404r1405
577577   cpunum_set_input_line(1, 0, irq ? ASSERT_LINE : CLEAR_LINE);
578578}
579579
580static struct YMF278B_interface ymf278b_interface =
580static const struct YMF278B_interface ymf278b_interface =
581581{
582582   REGION_SOUND1
583583};
584584
585static struct YMF262interface ymf262_interface =
585static const struct YMF262interface ymf262_interface =
586586{
587587   irqhandler      /* irq */
588588};
src/mame/drivers/dec8.c
r1404r1405
20192019   cpunum_set_input_line(2,0,linestate); /* M6502_IRQ_LINE */
20202020}
20212021
2022static struct YM3526interface ym3526_interface =
2022static const struct YM3526interface ym3526_interface =
20232023{
20242024   irqhandler
20252025};
20262026
2027static struct YM3526interface oscar_ym3526_interface =
2027static const struct YM3526interface oscar_ym3526_interface =
20282028{
20292029   oscar_irqhandler
20302030};
20312031
2032static struct YM3812interface ym3812_interface =
2032static const struct YM3812interface ym3812_interface =
20332033{
20342034   irqhandler
20352035};
20362036
2037static struct MSM5205interface msm5205_interface =
2037static const struct MSM5205interface msm5205_interface =
20382038{
20392039   csilver_adpcm_int,   /* interrupt function */
20402040   MSM5205_S48_4B      /* 8KHz               */
src/mame/drivers/pkunwar.c
r1404r1405
151151
152152
153153
154static struct AY8910interface ay8910_interface_1 = {
154static const struct AY8910interface ay8910_interface_1 = {
155155   input_port_0_r,
156156   input_port_1_r
157157};
158158
159static struct AY8910interface ay8910_interface_2 = {
159static const struct AY8910interface ay8910_interface_2 = {
160160   input_port_2_r,
161161   input_port_3_r
162162};
src/mame/drivers/tbowl.c
r1404r1405
560560   cpunum_set_input_line(2,0,linestate);
561561}
562562
563static struct YM3526interface ym3812_interface =
563static const struct YM3526interface ym3812_interface =
564564{
565565   irqhandler
566566};
567567
568static struct MSM5205interface msm5205_interface =
568static const struct MSM5205interface msm5205_interface =
569569{
570570   tbowl_adpcm_int,   /* interrupt function */
571571   MSM5205_S48_4B      /* 8KHz               */
src/mame/drivers/battlane.c
r1404r1405
246246   cpunum_set_input_line(0, M6809_FIRQ_LINE, irq ? ASSERT_LINE : CLEAR_LINE);
247247}
248248
249static struct YM3526interface ym3526_interface =
249static const struct YM3526interface ym3526_interface =
250250{
251251   irqhandler
252252};
src/mame/drivers/cherrym2.c
r1404r1405
340340GFXDECODE_END
341341
342342
343static struct AY8910interface ay8910_interface =
343static const struct AY8910interface ay8910_interface =
344344{
345345   input_port_6_r,   //
346346   input_port_7_r,   //
src/mame/drivers/amidar.c
r1404r1405
5353   amidar_soundram[offset & 0x03ff] = data;
5454}
5555
56static struct AY8910interface amidar_ay8910_interface_2 =
56static const struct AY8910interface amidar_ay8910_interface_2 =
5757{
5858   soundlatch_r,
5959   scramble_portB_r
src/mame/drivers/thepit.c
r1404r1405
633633GFXDECODE_END
634634
635635
636static struct AY8910interface ay8910_interface =
636static const struct AY8910interface ay8910_interface =
637637{
638638   soundlatch_r
639639};
src/mame/drivers/cloud9.c
r1404r1405
440440 *
441441 *************************************/
442442
443static struct POKEYinterface pokey_interface =
443static const struct POKEYinterface pokey_interface =
444444{
445445   { 0 },
446446   input_port_2_r
src/mame/drivers/rpunch.c
r1404r1405
594594 *
595595 *************************************/
596596
597static struct YM2151interface ym2151_interface =
597static const struct YM2151interface ym2151_interface =
598598{
599599   ym2151_irq_gen
600600};
601601
602602
603static struct upd7759_interface upd7759_interface =
603static const struct upd7759_interface upd7759_interface =
604604{
605605   REGION_SOUND1
606606};
src/mame/drivers/changela.c
r1404r1405
448448INPUT_PORTS_END
449449
450450
451static struct AY8910interface ay8910_interface_1 = {
451static const struct AY8910interface ay8910_interface_1 = {
452452   input_port_0_r,
453453   input_port_1_r
454454};
455455
456static struct AY8910interface ay8910_interface_2 = {
456static const struct AY8910interface ay8910_interface_2 = {
457457   input_port_2_r,
458458   input_port_3_r
459459};
src/mame/drivers/crimfght.c
r1404r1405
341341
342342***************************************************************************/
343343
344static struct YM2151interface ym2151_interface =
344static const struct YM2151interface ym2151_interface =
345345{
346346   0,
347347   crimfght_snd_bankswitch_w
r1404r1405
353353   K007232_set_volume(0,1,0,(v >> 4) * 0x11);
354354}
355355
356static struct K007232_interface k007232_interface =
356static const struct K007232_interface k007232_interface =
357357{
358358   REGION_SOUND1,   /* memory regions */
359359   volume_callback   /* external port callback */
src/mame/drivers/asuka.c
r1404r1405
815815   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
816816}
817817
818static struct YM2610interface ym2610_interface =
818static const struct YM2610interface ym2610_interface =
819819{
820820   irq_handler,
821821   REGION_SOUND1,   /* Delta-T */
r1404r1405
823823};
824824
825825
826static struct YM2151interface ym2151_interface =
826static const struct YM2151interface ym2151_interface =
827827{
828828   irq_handler,
829829   sound_bankswitch_w
830830};
831831
832static struct MSM5205interface msm5205_interface =
832static const struct MSM5205interface msm5205_interface =
833833{
834834   asuka_msm5205_vck,   /* VCK function */
835835   MSM5205_S48_4B      /* 8 kHz */
src/mame/drivers/backfire.c
r1404r1405
470470   logerror("sound irq\n");
471471}
472472
473static struct YMZ280Binterface ymz280b_intf =
473static const struct YMZ280Binterface ymz280b_intf =
474474{
475475   REGION_SOUND1,
476476   sound_irq_gen
src/mame/drivers/rollerg.c
r1404r1405
236236
237237***************************************************************************/
238238
239static struct K053260_interface k053260_interface =
239static const struct K053260_interface k053260_interface =
240240{
241241   REGION_SOUND1 /* memory region */
242242};
src/mame/drivers/sidepckt.c
r1404r1405
282282   cpunum_set_input_line(1,0,linestate);
283283}
284284
285static struct YM3526interface ym3526_interface =
285static const struct YM3526interface ym3526_interface =
286286{
287287   irqhandler
288288};
src/mame/drivers/starwars.c
r1404r1405
6363      starwars_out_w(4, 0);
6464   }
6565
66   /* reset the mathbox */
67   swmathbox_reset();
66   /* reset the matrix processor */
67   starwars_mproc_reset();
6868}
6969
7070
r1404r1405
178178   AM_RANGE(0x46a0, 0x46bf) AM_WRITE(starwars_nstore_w)
179179   AM_RANGE(0x46c0, 0x46c2) AM_WRITE(starwars_adc_select_w)
180180   AM_RANGE(0x46e0, 0x46e0) AM_WRITE(starwars_soundrst_w)
181   AM_RANGE(0x4700, 0x4707) AM_WRITE(swmathbx_w)
182   AM_RANGE(0x4700, 0x4700) AM_READ(swmathbx_reh_r)
183   AM_RANGE(0x4701, 0x4701) AM_READ(swmathbx_rel_r)
184   AM_RANGE(0x4703, 0x4703) AM_READ(swmathbx_prng_r)         /* pseudo random number generator */
181   AM_RANGE(0x4700, 0x4707) AM_WRITE(starwars_math_w)
182   AM_RANGE(0x4700, 0x4700) AM_READ(starwars_div_reh_r)
183   AM_RANGE(0x4701, 0x4701) AM_READ(starwars_div_rel_r)
184   AM_RANGE(0x4703, 0x4703) AM_READ(starwars_prng_r)         /* pseudo random number generator */
185185   AM_RANGE(0x4800, 0x4fff) AM_RAM                        /* CPU and Math RAM */
186186   AM_RANGE(0x5000, 0x5fff) AM_RAM AM_BASE(&starwars_mathram)   /* CPU and Math RAM */
187187   AM_RANGE(0x6000, 0x7fff) AM_ROMBANK(1)                  /* banked ROM */
r1404r1405
563563
564564   /* prepare the mathbox */
565565   starwars_is_esb = 0;
566   swmathbox_init();
566   starwars_mproc_init();
567567
568568   /* initialize banking */
569569   memory_configure_bank(1, 0, 2, memory_region(REGION_CPU1) + 0x6000, 0x10000 - 0x6000);
r1404r1405
591591   /* install additional banking */
592592   memory_install_read8_handler(0, ADDRESS_SPACE_PROGRAM, 0xa000, 0xffff, 0, 0, MRA8_BANK2);
593593
594   /* prepare the mathbox */
594   /* prepare the matrix processor */
595595   starwars_is_esb = 1;
596   swmathbox_init();
596   starwars_mproc_init();
597597
598598   /* initialize banking */
599599   memory_configure_bank(1, 0, 2, memory_region(REGION_CPU1) + 0x6000, 0x10000 - 0x6000);
src/mame/drivers/wolfpack.c
r1404r1405
77#include "driver.h"
88#include "sound/s14001a.h"
99
10static struct S14001A_interface wolfpack_s14001a_interface =
10static const struct S14001A_interface wolfpack_s14001a_interface =
1111{
1212   REGION_SOUND1   /* voice data region */
1313};
src/mame/drivers/cherrym.c
r1404r1405
363363   GFXDECODE_ENTRY( REGION_GFX2, 0x0020, spritelayout, 0, 16 )
364364GFXDECODE_END
365365
366static struct AY8910interface ay8910_interface =
366static const struct AY8910interface ay8910_interface =
367367{
368368   input_port_6_r,   //
369369   input_port_7_r,   //
src/mame/drivers/exerion.c
r1404r1405
261261 *
262262 *************************************/
263263
264static struct AY8910interface ay8910_interface =
264static const struct AY8910interface ay8910_interface =
265265{
266266   exerion_porta_r,
267267   0,
src/mame/drivers/mosaic.c
r1404r1405
3232   }
3333   else
3434   {
35      static int jumptable[] =
35      static const int jumptable[] =
3636      {
3737         0x02be, 0x0314, 0x0475, 0x0662, 0x0694, 0x08f3, 0x0959, 0x096f,
3838         0x0992, 0x09a4, 0x0a50, 0x0d69, 0x0eee, 0x0f98, 0x1040, 0x1075,
r1404r1405
274274
275275
276276
277static struct YM2203interface ym2203_interface =
277static const struct YM2203interface ym2203_interface =
278278{
279279   input_port_2_r
280280};
src/mame/drivers/meijinsn.c
r1404r1405
7474static READ16_HANDLER( alpha_mcu_r )
7575{
7676   static unsigned coinvalue=0;
77   static UINT8 coinage1[2][2]={{1,1},{1,2}};
78   static UINT8 coinage2[2][2]={{1,5},{2,1}};
77   static const UINT8 coinage1[2][2]={{1,1},{1,2}};
78   static const UINT8 coinage2[2][2]={{1,5},{2,1}};
7979
8080   static int latch;
8181   int source=shared_ram[offset];
r1404r1405
288288      cpunum_set_input_line(0, 2, HOLD_LINE);
289289}
290290
291static struct AY8910interface ay8910_interface =
291static const struct AY8910interface ay8910_interface =
292292{
293293   soundlatch_r
294294};
src/mame/drivers/crospang.c
r1404r1405
395395   cpunum_set_input_line(1,0,linestate);
396396}
397397
398static struct YM3812interface ym3812_interface =
398static const struct YM3812interface ym3812_interface =
399399{
400400   irqhandler   /* IRQ Line */
401401};
src/mame/drivers/royalmah.c
r1404r1405
33023302INPUT_PORTS_END
33033303
33043304
3305static struct AY8910interface ay8910_interface =
3305static const struct AY8910interface ay8910_interface =
33063306{
33073307   royalmah_player_1_port_r,
33083308   royalmah_player_2_port_r
src/mame/drivers/ajax.c
r1404r1405
252252   K007232_set_volume(1,1,(v & 0x0f) * 0x11/2,(v >> 4) * 0x11/2);
253253}
254254
255static struct K007232_interface k007232_interface_1 =
255static const struct K007232_interface k007232_interface_1 =
256256{
257257   REGION_SOUND1,
258258   volume_callback0
259259};
260260
261static struct K007232_interface k007232_interface_2 =
261static const struct K007232_interface k007232_interface_2 =
262262{
263263   REGION_SOUND2,
264264   volume_callback1
src/mame/drivers/mquake.c
r1404r1405
319319 *
320320 *************************************/
321321
322static struct CustomSound_interface amiga_custom_interface =
322static const struct CustomSound_interface amiga_custom_interface =
323323{
324324   amiga_sh_start
325325};
326326
327327
328static struct ES5503interface es5503_intf =
328static const struct ES5503interface es5503_intf =
329329{
330330   NULL,
331331   NULL,
src/mame/drivers/shisen.c
r1404r1405
103103ADDRESS_MAP_END
104104
105105
106
107106static INPUT_PORTS_START( shisen )
108107   PORT_START_TAG("IN0")
109108   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
r1404r1405
136135   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
137136
138137   PORT_START_TAG("DSW1")
139   PORT_DIPNAME( 0x03, 0x03, "Timer" )
140   PORT_DIPSETTING(    0x03, "Slow" )
138   PORT_DIPNAME( 0x03, 0x03, "Timer" ) PORT_DIPLOCATION("SW1:1,2")
139   PORT_DIPSETTING(    0x03, DEF_STR( Easy ) )
141140   PORT_DIPSETTING(    0x02, DEF_STR( Normal ) )
142   PORT_DIPSETTING(    0x01, "Fast" )
143   PORT_DIPSETTING(    0x00, "Fastest" )
144   PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) )
141   PORT_DIPSETTING(    0x01, DEF_STR( Hard ) )
142   PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
143   PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:3,4")
145144   PORT_DIPSETTING(    0x0c, DEF_STR( Easy ) )
146145   PORT_DIPSETTING(    0x08, DEF_STR( Normal ) )
147146   PORT_DIPSETTING(    0x04, DEF_STR( Hard ) )
148147   PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
149   PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED )  /* Gets filled in based on the coin mode */
148   PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coinage ) ) PORT_CONDITION("DSW2",0x04,PORTCOND_EQUALS,0x04) PORT_DIPLOCATION("SW1:5,6,7,8")
149   PORT_DIPSETTING(    0xa0, DEF_STR( 6C_1C ) )
150   PORT_DIPSETTING(    0xb0, DEF_STR( 5C_1C ) )
151   PORT_DIPSETTING(    0xc0, DEF_STR( 4C_1C ) )
152   PORT_DIPSETTING(    0xd0, DEF_STR( 3C_1C ) )
153   PORT_DIPSETTING(    0x10, DEF_STR( 8C_3C ) )
154   PORT_DIPSETTING(    0xe0, DEF_STR( 2C_1C ) )
155   PORT_DIPSETTING(    0x20, DEF_STR( 5C_3C ) )
156   PORT_DIPSETTING(    0x30, DEF_STR( 3C_2C ) )
157   PORT_DIPSETTING(    0xf0, DEF_STR( 1C_1C ) )
158   PORT_DIPSETTING(    0x40, DEF_STR( 2C_3C ) )
159   PORT_DIPSETTING(    0x90, DEF_STR( 1C_2C ) )
160   PORT_DIPSETTING(    0x80, DEF_STR( 1C_3C ) )
161   PORT_DIPSETTING(    0x70, DEF_STR( 1C_4C ) )
162   PORT_DIPSETTING(    0x60, DEF_STR( 1C_5C ) )
163   PORT_DIPSETTING(    0x50, DEF_STR( 1C_6C ) )
164   PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
165    PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_CONDITION("DSW2",0x04,PORTCOND_NOTEQUALS,0x04) PORT_DIPLOCATION("SW1:5,6")
166   PORT_DIPSETTING(    0x00, DEF_STR( 5C_1C ) )
167   PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) )
168   PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
169   PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
170   PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) ) PORT_CONDITION("DSW2",0x04,PORTCOND_NOTEQUALS,0x04) PORT_DIPLOCATION("SW1:7,8")
171   PORT_DIPSETTING(    0xc0, DEF_STR( 1C_2C ) )
172   PORT_DIPSETTING(    0x80, DEF_STR( 1C_3C ) )
173   PORT_DIPSETTING(    0x40, DEF_STR( 1C_5C ) )
174   PORT_DIPSETTING(    0x00, DEF_STR( 1C_6C ) )
150175
151176   PORT_START_TAG("DSW2")
152   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) )
177   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW2:1")
153178   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
154179   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
155   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
180   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:2")
156181   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
157182   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
158   PORT_DIPNAME( 0x04, 0x04, "Coin Mode" )
159   PORT_DIPSETTING(    0x04, "Mode 1" )
160   PORT_DIPSETTING(    0x00, "Mode 2" )
161   PORT_DIPNAME( 0x08, 0x08, "Nude Pictures" )
183   PORT_DIPNAME( 0x04, 0x04, "Coin Chute" ) PORT_DIPLOCATION("SW2:3")
184   PORT_DIPSETTING(    0x04, "Common" )
185   PORT_DIPSETTING(    0x00, "Separate" )
186   PORT_DIPNAME( 0x08, 0x08, "Nude Pictures" ) PORT_DIPLOCATION("SW2:4")
162187   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
163188   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
164   PORT_DIPNAME( 0x10, 0x10, "Women Select" )
189   PORT_DIPNAME( 0x10, 0x10, "Women Select" ) PORT_DIPLOCATION("SW2:5")
165190   PORT_DIPSETTING(    0x00, DEF_STR( No ) )
166191   PORT_DIPSETTING(    0x10, DEF_STR( Yes ) )
167192   /* In stop mode, press 2 to stop and 1 to restart */
168   PORT_DIPNAME( 0x20, 0x20, "Stop Mode (Cheat)")
193   PORT_DIPNAME( 0x20, 0x20, "Stop Mode (Cheat)") PORT_DIPLOCATION("SW2:6")
169194   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
170195   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
171   PORT_DIPNAME( 0x40, 0x40, "Play Mode" )
196   PORT_DIPNAME( 0x40, 0x40, "Play Mode" ) PORT_DIPLOCATION("SW2:7")
172197   PORT_DIPSETTING(    0x00, "1 Player" )
173198   PORT_DIPSETTING(    0x40, "2 Player" )
174   PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
199   PORT_SERVICE_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW2:8" )
200INPUT_PORTS_END
175201
176   /* Fake port to support the two different coin modes */
177   PORT_START_TAG("FAKE")
178   PORT_DIPNAME( 0x0f, 0x0f, "Coinage Mode 1" )   /* mapped on coin mode 1 */
179   PORT_DIPSETTING(    0x0a, DEF_STR( 6C_1C ) )
180   PORT_DIPSETTING(    0x0b, DEF_STR( 5C_1C ) )
181   PORT_DIPSETTING(    0x0c, DEF_STR( 4C_1C ) )
182   PORT_DIPSETTING(    0x0d, DEF_STR( 3C_1C ) )
183   PORT_DIPSETTING(    0x01, DEF_STR( 8C_3C ) )
184   PORT_DIPSETTING(    0x0e, DEF_STR( 2C_1C ) )
185   PORT_DIPSETTING(    0x02, DEF_STR( 5C_3C ) )
186   PORT_DIPSETTING(    0x03, DEF_STR( 3C_2C ) )
187   PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )
188   PORT_DIPSETTING(    0x04, DEF_STR( 2C_3C ) )
189   PORT_DIPSETTING(    0x09, DEF_STR( 1C_2C ) )
190   PORT_DIPSETTING(    0x08, DEF_STR( 1C_3C ) )
191   PORT_DIPSETTING(    0x07, DEF_STR( 1C_4C ) )
192   PORT_DIPSETTING(    0x06, DEF_STR( 1C_5C ) )
193   PORT_DIPSETTING(    0x05, DEF_STR( 1C_6C ) )
194   PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
195    PORT_DIPNAME( 0x30, 0x30, "Coin A  Mode 2" )   /* mapped on coin mode 2 */
196   PORT_DIPSETTING(    0x00, DEF_STR( 5C_1C ) )
197   PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) )
198   PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
199   PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
200   PORT_DIPNAME( 0xc0, 0xc0, "Coin B  Mode 2" )
201   PORT_DIPSETTING(    0xc0, DEF_STR( 1C_2C ) )
202   PORT_DIPSETTING(    0x80, DEF_STR( 1C_3C ) )
203   PORT_DIPSETTING(    0x40, DEF_STR( 1C_5C ) )
204   PORT_DIPSETTING(    0x00, DEF_STR( 1C_6C ) )
202static INPUT_PORTS_START( matchit )
203   PORT_INCLUDE( shisen )
204
205   PORT_MODIFY("DSW2")
206   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW2:4")
207   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
208   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
209   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW2:5")
210   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
211   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
205212INPUT_PORTS_END
206213
207214
208
209215static const gfx_layout charlayout =
210216{
211217   8,8,
r1404r1405
224230
225231
226232
227static struct YM2151interface ym2151_interface =
233static const struct YM2151interface ym2151_interface =
228234{
229235   m72_ym2151_irq_handler
230236};
r1404r1405
414420   /* no samples on this board */
415421ROM_END
416422
417GAME( 1989, sichuan2, 0,        shisen, shisen, 0, ROT0, "Tamtex", "Sichuan II (hack?) (set 1)", 0 )
418GAME( 1989, sichuana, sichuan2, shisen, shisen, 0, ROT0, "Tamtex", "Sichuan II (hack?) (set 2)", 0 )
419GAME( 1989, shisen,   sichuan2, shisen, shisen, 0, ROT0, "Tamtex", "Shisensho - Joshiryo-Hen (Japan)", 0 )
420GAME( 1989, matchit,  sichuan2, shisen, shisen, 0, ROT0, "Tamtex", "Match It", 0 )
423GAME( 1989, matchit,  0,        shisen, matchit, 0, ROT0, "Tamtex",  "Match It", 0 )
424GAME( 1989, shisen,   matchit,  shisen, shisen,  0, ROT0, "Tamtex",  "Shisensho - Joshiryo-Hen (Japan)", 0 )
425GAME( 1989, sichuan2, matchit,  shisen, shisen,  0, ROT0, "hack", "Sichuan II (hack set 1)", 0 )
426GAME( 1989, sichuana, matchit,  shisen, shisen,  0, ROT0, "hack", "Sichuan II (hack set 2)", 0 )
src/mame/drivers/nmk16.c
r1404r1405
244244        all word accesses are to the input port */
245245   if (ACCESSING_MSB && !ACCESSING_LSB)
246246   {
247      static UINT8 to_main[] =
247      static const UINT8 to_main[] =
248248      {
249249         0x82,0xc7,0x00,0x2c,0x6c,0x00,0x9f,0xc7,0x00,0x29,0x69,0x00,0x8b,0xc7,0x00
250250      };
r1404r1405
28782878
28792879
28802880
2881static struct YM2203interface ym2203_nmk004_interface =
2881static const struct YM2203interface ym2203_nmk004_interface =
28822882{
28832883   0,0,0,0,NMK004_irq
28842884};
r1404r1405
28882888   cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
28892889}
28902890
2891static struct YM2203interface ym2203_interface =
2891static const struct YM2203interface ym2203_interface =
28922892{
28932893   0,0,0,0,ym2203_irqhandler
28942894};
r1404r1405
48504850
48514851
48524852
4853static UINT8 decode_byte(UINT8 src, UINT8 *bitp)
4853static UINT8 decode_byte(UINT8 src, const UINT8 *bitp)
48544854{
48554855   UINT8 ret, i;
48564856
r1404r1405
48674867}
48684868
48694869
4870static UINT16 decode_word(UINT16 src, UINT8 *bitp)
4870static UINT16 decode_word(UINT16 src, const UINT8 *bitp)
48714871{
48724872   UINT16 ret, i;
48734873
r1404r1405
48914891   UINT8 *rom;
48924892   int A;
48934893
4894   static UINT8 decode_data_bg[8][8] =
4894   static const UINT8 decode_data_bg[8][8] =
48954895   {
48964896      {0x3,0x0,0x7,0x2,0x5,0x1,0x4,0x6},
48974897      {0x1,0x2,0x6,0x5,0x4,0x0,0x3,0x7},
r1404r1405
49034903      {0x3,0x4,0x7,0x6,0x2,0x0,0x5,0x1},
49044904   };
49054905
4906   static UINT8 decode_data_sprite[8][16] =
4906   static const UINT8 decode_data_sprite[8][16] =
49074907   {
49084908      {0x9,0x3,0x4,0x5,0x7,0x1,0xb,0x8,0x0,0xd,0x2,0xc,0xe,0x6,0xf,0xa},
49094909      {0x1,0x3,0xc,0x4,0x0,0xf,0xb,0xa,0x8,0x5,0xe,0x6,0xd,0x2,0x7,0x9},
r1404r1405
49434943   int A;
49444944
49454945   /* The Main 68k Program of the Bootleg is Bitswapped */
4946   static UINT8 decode_data_tdragonb[1][16] =
4946   static const UINT8 decode_data_tdragonb[1][16] =
49474947   {
49484948      {0xe,0xc,0xa,0x8,0x7,0x5,0x3,0x1,0xf,0xd,0xb,0x9,0x6,0x4,0x2,0x0},
49494949   };
49504950
49514951   /* Graphic Roms Could Also Do With Rearranging to make things simpler */
4952   static UINT8 decode_data_tdragonbgfx[1][8] =
4952   static const UINT8 decode_data_tdragonbgfx[1][8] =
49534953   {
49544954      {0x7,0x6,0x5,0x3,0x4,0x2,0x1,0x0},
49554955   };
r1404r1405
49884988   int A;
49894989
49904990   /* Graphic Roms Could Also Do With Rearranging to make things simpler */
4991   static UINT8 decode_data_tdragonbgfx[1][8] =
4991   static const UINT8 decode_data_tdragonbgfx[1][8] =
49924992   {
49934993      {0x7,0x6,0x5,0x3,0x4,0x2,0x1,0x0},
49944994   };
src/osd/windows/d3d8intf.c
r1404r1405
231231}
232232
233233
234static d3d_interface d3d8_interface =
234static const d3d_interface d3d8_interface =
235235{
236236   d3d_check_device_format,
237237   d3d_check_device_type,
r1404r1405
406406}
407407
408408
409static d3d_device_interface d3d8_device_interface =
409static const d3d_device_interface d3d8_device_interface =
410410{
411411   device_begin_scene,
412412   device_clear,
r1404r1405
458458}
459459
460460
461static d3d_surface_interface d3d8_surface_interface =
461static const d3d_surface_interface d3d8_surface_interface =
462462{
463463   surface_lock_rect,
464464   surface_release,
r1404r1405
499499}
500500
501501
502static d3d_texture_interface d3d8_texture_interface =
502static const d3d_texture_interface d3d8_texture_interface =
503503{
504504   texture_get_surface_level,
505505   texture_lock_rect,
r1404r1405
534534}
535535
536536
537static d3d_vertex_buffer_interface d3d8_vertex_buffer_interface =
537static const d3d_vertex_buffer_interface d3d8_vertex_buffer_interface =
538538{
539539   vertex_buffer_lock,
540540   vertex_buffer_release,
src/osd/windows/d3d9intf.c
r1404r1405
229229}
230230
231231
232static d3d_interface d3d9_interface =
232static const d3d_interface d3d9_interface =
233233{
234234   d3d_check_device_format,
235235   d3d_check_device_type,
r1404r1405
439439}
440440
441441
442static d3d_device_interface d3d9_device_interface =
442static const d3d_device_interface d3d9_device_interface =
443443{
444444   device_begin_scene,
445445   device_clear,
r1404r1405
491491}
492492
493493
494static d3d_surface_interface d3d9_surface_interface =
494static const d3d_surface_interface d3d9_surface_interface =
495495{
496496   surface_lock_rect,
497497   surface_release,
r1404r1405
532532}
533533
534534
535static d3d_texture_interface d3d9_texture_interface =
535static const d3d_texture_interface d3d9_texture_interface =
536536{
537537   texture_get_surface_level,
538538   texture_lock_rect,
r1404r1405
567567}
568568
569569
570static d3d_vertex_buffer_interface d3d9_vertex_buffer_interface =
570static const d3d_vertex_buffer_interface d3d9_vertex_buffer_interface =
571571{
572572   vertex_buffer_lock,
573573   vertex_buffer_release,
src/osd/windows/input.c
r1404r1405
212212static device_info *      joystick_list;
213213
214214// default axis names
215static const TCHAR *default_axis_name[] =
215static const TCHAR *const default_axis_name[] =
216216{
217217   TEXT("X"), TEXT("Y"), TEXT("Z"), TEXT("RX"),
218218   TEXT("RY"), TEXT("RZ"), TEXT("SL1"), TEXT("SL2")
r1404r1405
914914   // allocate two lightgun devices
915915   for (gunnum = 0; gunnum < 2; gunnum++)
916916   {
917      static const TCHAR *gun_names[] = { TEXT("Shared Axis Gun 1"), TEXT("Shared Axis Gun 2") };
917      static const TCHAR *const gun_names[] = { TEXT("Shared Axis Gun 1"), TEXT("Shared Axis Gun 2") };
918918      device_info *devinfo;
919919      int axisnum, butnum;
920920
r1404r1405
17351735
17361736static TCHAR *rawinput_device_improve_name(TCHAR *name)
17371737{
1738   static const TCHAR *usbbasepath = TEXT("SYSTEM\\CurrentControlSet\\Enum\\USB");
1739   static const TCHAR *basepath = TEXT("SYSTEM\\CurrentControlSet\\Enum\\");
1738   static const TCHAR usbbasepath[] = TEXT("SYSTEM\\CurrentControlSet\\Enum\\USB");
1739   static const TCHAR basepath[] = TEXT("SYSTEM\\CurrentControlSet\\Enum\\");
17401740   TCHAR *regstring = NULL;
17411741   TCHAR *parentid = NULL;
17421742   TCHAR *regpath = NULL;
src/osd/windows/drawd3d.c
r1404r1405
733733   d3d->presentation.MultiSampleType            = D3DMULTISAMPLE_NONE;
734734   d3d->presentation.SwapEffect               = D3DSWAPEFFECT_DISCARD;
735735   d3d->presentation.hDeviceWindow               = window->hwnd;
736   d3d->presentation.Windowed                  = (!video_config.switchres || !window->fullscreen) || HAS_WINDOW_MENU;
736   d3d->presentation.Windowed                  = !window->fullscreen || HAS_WINDOW_MENU;
737737   d3d->presentation.EnableAutoDepthStencil      = FALSE;
738738   d3d->presentation.AutoDepthStencilFormat      = D3DFMT_D16;
739739   d3d->presentation.Flags                     = 0;
src/emu/debug/debugcpu.c
r1404r1405
4242FILE *debug_source_file;
4343symbol_table *global_symtable;
4444
45static const char *address_space_name[] = { "program", "data", "I/O" };
45static const char *const address_space_name[] = { "program", "data", "I/O" };
4646
4747static UINT64 wpdata;
4848static UINT64 wpaddr;
r1404r1405
13171317         /* if we do, evaluate the condition */
13181318         if (wp->condition == NULL || (expression_execute(wp->condition, &result) == EXPRERR_NONE && result))
13191319         {
1320            static const char *sizes[] =
1320            static const char *const sizes[] =
13211321            {
13221322               "0bytes", "byte", "word", "3bytes", "dword", "5bytes", "6bytes", "7bytes", "qword"
13231323            };
src/emu/debug/debugcmd.c
r1404r1405
12751275
12761276static void execute_wplist(int ref, int params, const char *param[])
12771277{
1278   static const char *spacenames[ADDRESS_SPACES] = { "program", "data", "I/O" };
1278   static const char *const spacenames[ADDRESS_SPACES] = { "program", "data", "I/O" };
12791279   int cpunum, printed = 0;
12801280   char buffer[256];
12811281
r1404r1405
12921292         {
12931293            if (cpuinfo->space[spacenum].first_wp)
12941294            {
1295               static const char *types[] = { "unkn ", "read ", "write", "r/w  " };
1295               static const char *const types[] = { "unkn ", "read ", "write", "r/w  " };
12961296               debug_cpu_watchpoint *wp;
12971297
12981298               debug_console_printf("CPU %d %s space watchpoints:\n", cpunum, spacenames[spacenum]);
src/emu/debug/express.c
r1404r1405
11581158   /* reset the token stack */
11591159   init_token_stack(expr);
11601160
1161   /* Initialize t1, t2 to keep gcc's warnings-as-errors happy */
1162   t1.type = TOK_INVALID;
1163   t1.offset = 0;
1164   t2.type = TOK_INVALID;
1165   t2.offset = 0;
1166
11611167   /* create a temporary token for holding intermediate number and memory values */
11621168   tempnum.type = TOK_NUMBER;
11631169   tempnum.offset = 0;
src/emu/debug/debughlp.c
r1404r1405
5353    TABLE OF HELP
5454***************************************************************************/
5555
56static help_item static_help_list[] =
56static const help_item static_help_list[] =
5757{
5858   {
5959      "",
r1404r1405
10351035const char *debug_get_help(const char *tag)
10361036{
10371037   static char ambig_message[1024];
1038   help_item *found = NULL;
1038   const help_item *found = NULL;
10391039   int i, msglen, foundcount = 0;
10401040   int taglen = (int)strlen(tag);
10411041   char tagcopy[256];
src/emu/cpu/m6805/m6805.c
r1404r1405
199199#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; } } }
200200
201201/* what they say it is ... */
202static unsigned char cycles1[] =
202static const unsigned char cycles1[] =
203203{
204204      /* 0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F */
205205  /*0*/ 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
src/emu/cpu/v30mz/necea.h
r1404r1405
3030static unsigned EA_206(void) { E16=FETCH; E16+=FETCH<<8; EO=I.regs.w[BP]+(INT16)E16; EA=DefaultBase(SS)+EO; return EA; }
3131static unsigned EA_207(void) { E16=FETCH; E16+=FETCH<<8; EO=I.regs.w[BW]+(INT16)E16; EA=DefaultBase(DS)+EO; return EA; }
3232
33static unsigned (*GetEA[192])(void)={
33static unsigned (*const GetEA[192])(void)={
3434   EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
3535   EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
3636   EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
src/emu/cpu/v30mz/necinstr.h
r1404r1405
246246
247247static void i_wait(void);
248248
249static void (*nec_instruction[256])(void) =
249static void (*const nec_instruction[256])(void) =
250250{
251251    i_add_br8,          /* 0x00 */
252252    i_add_wr16,         /* 0x01 */
src/emu/cpu/m6809/6809tbl.c
r1404r1405
279279INLINE void pref11(void);
280280
281281#if (BIG_SWITCH==0)
282static void (*m6809_main[0x100])(void) = {
282static void (*const m6809_main[0x100])(void) = {
283283   neg_di, neg_di, illegal,com_di, lsr_di, illegal,ror_di, asr_di,    /* 00 */
284284   asl_di, rol_di, dec_di, illegal,inc_di, tst_di, jmp_di, clr_di,
285285   pref10, pref11, nop,   sync,   illegal,illegal,lbra,   lbsr,      /* 10 */
src/emu/cpu/m6809/6809dasm.c
r1404r1405
342342   { 0xBC, 4, "CMPS",  EXT    }
343343};
344344
345static const opcodeinfo *m6809_pgpointers[3] =
345static const opcodeinfo *const m6809_pgpointers[3] =
346346{
347347   m6809_pg0opcodes, m6809_pg1opcodes, m6809_pg2opcodes
348348};
src/emu/cpu/m68000/m68kmame.c
r1404r1405
178178};
179179
180180
181/* global access */
182struct m68k_memory_interface m68k_memory_intf;
183
184
185181static void set_irq_line(int irqline, int state)
186182{
187183   if (irqline == INPUT_LINE_NMI)
r1404r1405
298294}
299295#endif /* MAME_DEBUG */
300296
301#endif
297#endif /* HAS_M68008 */
302298
303299/****************************************************************************
304300 * M68010 section
r1404r1405
814810   }
815811}
816812
817#endif
813#endif /* HAS_M68008 */
818814
819815/**************************************************************************
820816 * CPU-specific set_info
r1404r1405
859855   }
860856}
861857
862#endif
858#endif /* HAS_M68010 */
863859
864860/**************************************************************************
865861 * CPU-specific set_info
r1404r1405
10991095   }
11001096}
11011097
1102#endif
1098#endif /* HAS_M68EC020 */
11031099
11041100/**************************************************************************
11051101 * CPU-specific set_info
r1404r1405
13011297   }
13021298}
13031299
1304#endif
1300#endif /* HAS_M68040 */
13051301
src/emu/cpu/m68000/m68kcpu.c
r1404r1405
995995
996996void m68k_state_register(const char *type, int index)
997997{
998   /* Note, D covers A because the dar array is common, REG_A=REG_D+8 */
998999   state_save_register_item_array(type, index, REG_D);
999   state_save_register_item_array(type, index, REG_A);
10001000   state_save_register_item(type, index, REG_PPC);
10011001   state_save_register_item(type, index, REG_PC);
10021002   state_save_register_item(type, index, REG_USP);
src/emu/cpu/tms34010/tms34010.c
r1404r1405
9898static UINT8         executing_cpu = 0xff;
9999
100100/* default configuration */
101static tms34010_config default_config =
101static const tms34010_config default_config =
102102{
103103   0
104104};
src/emu/cpu/m37710/m37710.c
r1404r1405
426426         switch (m37710i_cpu.m37710_regs[0x56+timer] & 0x3)
427427         {
428428            case 0:            // timer mode
429               time = attotime_mul(ATTOTIME_IN_HZ(16000000), tscales[m37710i_cpu.m37710_regs[tcr[timer]]>>6]);
429               time = attotime_mul(ATTOTIME_IN_HZ(cpunum_get_clock(cpu_getactivecpu())), tscales[m37710i_cpu.m37710_regs[tcr[timer]]>>6]);
430430               time = attotime_mul(time, tval + 1);
431431
432432               #if M37710_DEBUG
r1404r1405
461461         switch (m37710i_cpu.m37710_regs[0x56+timer] & 0x3)
462462         {
463463            case 0:            // timer mode
464               time = attotime_mul(ATTOTIME_IN_HZ(16000000), tscales[m37710i_cpu.m37710_regs[tcr[timer]]>>6]);
464               time = attotime_mul(ATTOTIME_IN_HZ(cpunum_get_clock(cpu_getactivecpu())), tscales[m37710i_cpu.m37710_regs[tcr[timer]]>>6]);
465465               time = attotime_mul(time, tval + 1);
466466
467467               #if M37710_DEBUG
src/emu/cpu/sharc/sharcdsm.c
r1404r1405
10521052   return 0;
10531053}
10541054
1055static SHARC_DASM_OP sharc_dasm_ops[] =
1055static const SHARC_DASM_OP sharc_dasm_ops[] =
10561056{
10571057   //  |0 0 1|
10581058   {   0xe000,      0x2000,      dasm_compute_dreg_dmpm                        },
src/emu/cpu/sharc/sharcops.h
r1404r1405
55   void (* handler)(void);
66} SHARC_OP;
77
8static SHARC_OP sharc_opcode_table[] =
8static const SHARC_OP sharc_opcode_table[] =
99{
1010   //  |0 0 1|
1111   {   0xe000,      0x2000,      sharcop_compute_dreg_dm_dreg_pm                  },
src/emu/cpu/i86/ea.h
r1404r1405
2828static unsigned EA_206(void) { i8086_ICount-=9; EO=FETCHOP; EO+=FETCHOP<<8; EO+=I.regs.w[BP]; EA=DefaultBase(SS)+(WORD)EO; return EA; }
2929static unsigned EA_207(void) { i8086_ICount-=9; EO=FETCHOP; EO+=FETCHOP<<8; EO+=I.regs.w[BX]; EA=DefaultBase(DS)+(WORD)EO; return EA; }
3030
31static unsigned (*GetEA[192])(void)={
31static unsigned (*const GetEA[192])(void)={
3232   EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
3333   EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
3434   EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
src/emu/cpu/v60/v60mem.c
r1404r1405
337337/* Structures pointing to various I/O functions */
338338/************************************************/
339339
340static struct cpu_info v60_i =
340static const struct cpu_info v60_i =
341341{
342342   MemRead8_16,  MemWrite8_16,  MemRead16_16,  MemWrite16_16,  MemRead32_16,  MemWrite32_16,
343343   PortRead8_16, PortWrite8_16, PortRead16_16, PortWrite16_16, PortRead32_16, PortWrite32_16,
r1404r1405
346346   0xfffff0
347347};
348348
349static struct cpu_info v70_i =
349static const struct cpu_info v70_i =
350350{
351351   MemRead8_32,  MemWrite8_32,  MemRead16_32,  MemWrite16_32,  MemRead32_32,  MemWrite32_32,
352352   PortRead8_32, PortWrite8_32, PortRead16_32, PortWrite16_32, PortRead32_32, PortWrite32_32,
src/emu/cpu/hd6309/6309ops.c
r1404r1405
13441344#define decodePB_dst(n)    (((n) >> 0) & 0x07)
13451345
13461346static UINT8 dummy_byte;
1347static unsigned char *regTable[4] = { &(CC), &(A), &(B), &dummy_byte };
1347static unsigned char *const regTable[4] = { &(CC), &(A), &(B), &dummy_byte };
13481348
13491349static const UINT8 bitTable[] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 };
13501350
src/emu/cpu/hd6309/6309dasm.c
r1404r1405
574574   { 0xFB, 4, "ADDF",  EXT     }
575575};
576576
577static const opcodeinfo *hd6309_pgpointers[3] =
577static const opcodeinfo *const hd6309_pgpointers[3] =
578578{
579579   hd6309_pg0opcodes, hd6309_pg1opcodes, hd6309_pg2opcodes
580580};
src/emu/cpu/adsp2100/2100ops.c
r1404r1405
420420
421421#define WRITE_REG(grp,reg,val) ((*wr_reg[grp][reg])(val))
422422
423static void (*wr_reg[4][16])(INT32) =
423static void (*const wr_reg[4][16])(INT32) =
424424{
425425   {
426426      wr_ax0, wr_ax1, wr_mx0, wr_mx1, wr_ay0, wr_ay1, wr_my0, wr_my1,
r1404r1405
681681#define ALU_GETYREG_UNSIGNED(y) (*(UINT16 *)alu_yregs[y])
682682#define ALU_GETYREG_SIGNED(y)   (*( INT16 *)alu_yregs[y])
683683
684static const void *alu_xregs[8] =
684static const void *const alu_xregs[8] =
685685{
686686   &adsp2100.core.ax0,
687687   &adsp2100.core.ax1,
r1404r1405
693693   &adsp2100.core.sr.srx.sr1
694694};
695695
696static const void *alu_yregs[4] =
696static const void *const alu_yregs[4] =
697697{
698698   &adsp2100.core.ay0,
699699   &adsp2100.core.ay1,
r1404r1405
712712#define MAC_GETYREG_UNSIGNED(y) (*(UINT16 *)mac_yregs[y])
713713#define MAC_GETYREG_SIGNED(y)   (*( INT16 *)mac_yregs[y])
714714
715static const void *mac_xregs[8] =
715static const void *const mac_xregs[8] =
716716{
717717   &adsp2100.core.mx0,
718718   &adsp2100.core.mx1,
r1404r1405
724724   &adsp2100.core.sr.srx.sr1
725725};
726726
727static const void *mac_yregs[4] =
727static const void *const mac_yregs[4] =
728728{
729729   &adsp2100.core.my0,
730730   &adsp2100.core.my1,
r1404r1405
741741#define SHIFT_GETXREG_UNSIGNED(x) (*(UINT16 *)shift_xregs[x])
742742#define SHIFT_GETXREG_SIGNED(x)   (*( INT16 *)shift_xregs[x])
743743
744static const void *shift_xregs[8] =
744static const void *const shift_xregs[8] =
745745{
746746   &adsp2100.core.si,
747747   &adsp2100.core.si,
src/emu/cpu/m6502/t65c02.c
r1404r1405
371371OP(de_wdc) { int tmp; RD_ABX_P; RD_EA; DEC; WB_EA;      } /* 6 DEC ABX page penalty */
372372OP(fe_wdc) { int tmp; RD_ABX_P; RD_EA; INC; WB_EA;      } /* 6 INC ABX page penalty */
373373
374static void (*insnwdc65c02[0x100])(void) = {
374static void (*const insnwdc65c02[0x100])(void) = {
375375   m65c02_00,m65c02_01,m65c02_02,m65c02_03,m65c02_04,m65c02_05,m65c02_06,m65c02_07,
376376   m65c02_08,m65c02_09,m65c02_0a,m65c02_0b,m65c02_0c,m65c02_0d,m65c02_0e,m65c02_0f,
377377   m65c02_10,m65c02_11,m65c02_12,m65c02_13,m65c02_14,m65c02_15,m65c02_16,m65c02_17,
src/emu/cpu/z8000/z8000.c
r1404r1405
125125 **************************************************************************/
126126#ifdef   LSB_FIRST
127127   /* pointers to byte (8bit) registers */
128   static UINT8   *pRB[16] =
128   static UINT8   *const pRB[16] =
129129   {
130130      &Z.regs.B[ 7],&Z.regs.B[ 5],&Z.regs.B[ 3],&Z.regs.B[ 1],
131131      &Z.regs.B[15],&Z.regs.B[13],&Z.regs.B[11],&Z.regs.B[ 9],
r1404r1405
133133      &Z.regs.B[14],&Z.regs.B[12],&Z.regs.B[10],&Z.regs.B[ 8]
134134   };
135135
136   static UINT16   *pRW[16] =
136   static UINT16   *const pRW[16] =
137137   {
138138        &Z.regs.W[ 3],&Z.regs.W[ 2],&Z.regs.W[ 1],&Z.regs.W[ 0],
139139        &Z.regs.W[ 7],&Z.regs.W[ 6],&Z.regs.W[ 5],&Z.regs.W[ 4],
r1404r1405
142142    };
143143
144144    /* pointers to long (32bit) registers */
145   static UINT32   *pRL[16] =
145   static UINT32   *const pRL[16] =
146146   {
147147      &Z.regs.L[ 1],&Z.regs.L[ 1],&Z.regs.L[ 0],&Z.regs.L[ 0],
148148      &Z.regs.L[ 3],&Z.regs.L[ 3],&Z.regs.L[ 2],&Z.regs.L[ 2],
r1404r1405
153153#else   /* MSB_FIRST */
154154
155155    /* pointers to byte (8bit) registers */
156   static UINT8   *pRB[16] =
156   static UINT8   *const pRB[16] =
157157   {
158158      &Z.regs.B[ 0],&Z.regs.B[ 2],&Z.regs.B[ 4],&Z.regs.B[ 6],
159159      &Z.regs.B[ 8],&Z.regs.B[10],&Z.regs.B[12],&Z.regs.B[14],
r1404r1405
162162   };
163163
164164   /* pointers to word (16bit) registers */
165   static UINT16   *pRW[16] =
165   static UINT16   *const pRW[16] =
166166   {
167167      &Z.regs.W[ 0],&Z.regs.W[ 1],&Z.regs.W[ 2],&Z.regs.W[ 3],
168168      &Z.regs.W[ 4],&Z.regs.W[ 5],&Z.regs.W[ 6],&Z.regs.W[ 7],
r1404r1405
171171   };
172172
173173   /* pointers to long (32bit) registers */
174   static UINT32   *pRL[16] =
174   static UINT32   *const pRL[16] =
175175   {
176176      &Z.regs.L[ 0],&Z.regs.L[ 0],&Z.regs.L[ 1],&Z.regs.L[ 1],
177177      &Z.regs.L[ 2],&Z.regs.L[ 2],&Z.regs.L[ 3],&Z.regs.L[ 3],
r1404r1405
182182#endif
183183
184184/* pointers to quad word (64bit) registers */
185static UINT64   *pRQ[16] = {
185static UINT64   *const pRQ[16] = {
186186    &Z.regs.Q[ 0],&Z.regs.Q[ 0],&Z.regs.Q[ 0],&Z.regs.Q[ 0],
187187    &Z.regs.Q[ 1],&Z.regs.Q[ 1],&Z.regs.Q[ 1],&Z.regs.Q[ 1],
188188    &Z.regs.Q[ 2],&Z.regs.Q[ 2],&Z.regs.Q[ 2],&Z.regs.Q[ 2],
src/emu/cpu/tms32010/tms32010.c
r1404r1405
634634 *  Cycle Timings
635635 ***********************************************************************/
636636
637static unsigned cycles_main[256]=
637static const unsigned cycles_main[256]=
638638{
639639/*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,
640640/*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,
r1404r1405
654654/*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
655655};
656656
657static unsigned cycles_7F_other[32]=
657static const unsigned cycles_7F_other[32]=
658658{
659659/*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,
660660/*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
src/emu/cpu/nec/necea.h
r1404r1405
3030static unsigned EA_206(void) { E16=FETCH; E16+=FETCH<<8; EO=I.regs.w[BP]+(INT16)E16; EA=DefaultBase(SS)+EO; return EA; }
3131static unsigned EA_207(void) { E16=FETCH; E16+=FETCH<<8; EO=I.regs.w[BW]+(INT16)E16; EA=DefaultBase(DS0)+EO; return EA; }
3232
33static unsigned (*GetEA[192])(void)={
33static unsigned (*const GetEA[192])(void)={
3434   EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
3535   EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
3636   EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007,
src/emu/cpu/nec/necinstr.h
r1404r1405
246246
247247static void i_wait(void);
248248
249static void (*nec_instruction[256])(void) =
249static void (*const nec_instruction[256])(void) =
250250{
251251    i_add_br8,          /* 0x00 */
252252    i_add_wr16,         /* 0x01 */
src/emu/cpu/mips/psx.c
r1404r1405
25242524   static const UINT16 *const p_n_lm[] = { &L11, &L12, &L13, &L21, &L22, &L23, &L31, &L32, &L33 };
25252525   static const UINT16 *const p_n_cm[] = { &LR1, &LR2, &LR3, &LG1, &LG2, &LG3, &LB1, &LB2, &LB3 };
25262526   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 };
2527   static const UINT16 *const *p_p_n_mx[] = { p_n_rm, p_n_lm, p_n_cm, p_n_zm };
2527   static const UINT16 *const *const p_p_n_mx[] = { p_n_rm, p_n_lm, p_n_cm, p_n_zm };
25282528   static const UINT32 *const p_n_tr[] = { &TRX, &TRY, &TRZ };
25292529   static const UINT32 *const p_n_bk[] = { &RBK, &GBK, &BBK };
25302530   static const UINT32 *const p_n_fc[] = { &RFC, &GFC, &BFC };
25312531   static const UINT32 *const p_n_zc[] = { &n_zc, &n_zc, &n_zc };
2532   static const UINT32 *const *p_p_n_cv[] = { p_n_tr, p_n_bk, p_n_fc, p_n_zc };
2532   static const UINT32 *const *const p_p_n_cv[] = { p_n_tr, p_n_bk, p_n_fc, p_n_zc };
25332533
25342534   switch( GTE_FUNCT( gteop ) )
25352535   {
r1404r1405
27882788      }
27892789      break;
27902790   case 0x1b:
2791      if( gteop == 0x108041b )
2791      if( gteop == 0x108041b || gteop == 0x118041b )
27922792      {
27932793         GTELOG( "NCCS" );
27942794         FLAG = 0;
src/emu/cpu/tms7000/tms70tb.c
r1404r1405
1717 *
1818 *****************************************************************************/
1919
20static void (*opfn[0x100])(void) = {
20static void (*const opfn[0x100])(void) = {
2121/*          0xX0,   0xX1,     0xX2,    0xX3,    0xX4,    0xX5,    0xX6,    0xX7,
2222            0xX8,   0xX9,     0xXA,    0xXB,    0xXC,    0xXD,    0xXE,    0xXF   */
2323
r1404r1405
7070            trap_7,  trap_6,  trap_5,  trap_4,  trap_3,  trap_2,  trap_1,  trap_0
7171};
7272
73static void (*opfn_exl[0x100])(void) = {
73static void (*const opfn_exl[0x100])(void) = {
7474/*          0xX0,   0xX1,     0xX2,    0xX3,    0xX4,    0xX5,    0xX6,    0xX7,
7575            0xX8,   0xX9,     0xXA,    0xXB,    0xXC,    0xXD,    0xXE,    0xXF   */
7676
src/emu/cpu/asap/asap.c
r1404r1405
217217static void jsr_c0(void);
218218static void trapf(void);
219219
220static void (*opcodetable[32][4])(void) =
220static void (*const opcodetable[32][4])(void) =
221221{
222222   {   trap0,      trap0,      trap0,      trap0      },
223223   {   NULL,      NULL,      NULL,      NULL      },
r1404r1405
253253   {   trapf,      trapf,      trapf,      trapf      }
254254};
255255
256static void (*conditiontable[16])(void) =
256static void (*const conditiontable[16])(void) =
257257{
258258   bsp, bmz, bgt, ble, bge, blt, bhi, bls,
259259   bcc, bcs, bpl, bmi, bne, beq, bvc, bvs
src/emu/cpu/tms32025/tms32025.c
r1404r1405
15611561 *  Cycle Timings
15621562 ***********************************************************************/
15631563
1564static unsigned cycles_main[256]=
1564static const unsigned cycles_main[256]=
15651565{
15661566/*00*/      1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK,
15671567/*08*/      1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK,
r1404r1405
15971597/*F8*/      2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK
15981598};
15991599
1600static unsigned cycles_DX_subset[8]=
1600static const unsigned cycles_DX_subset[8]=
16011601{
16021602/*00*/      2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 0
16031603};
16041604
1605static unsigned cycles_CE_subset[256]=
1605static const unsigned cycles_CE_subset[256]=
16061606{
16071607/*00*/      1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK,
16081608/*08*/      1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK,
src/emu/cpu/pic16c5x/pic16c5x.c
r1404r1405
107107static int    pic16C5x_reset_vector;
108108static int    pic16C5x_icount;
109109typedef void (*opcode_fn) (void);
110static unsigned cycles_000_other[16];
110static const unsigned cycles_000_other[16];
111111
112112
113113#define TMR0   internalram[1]
r1404r1405
174174
175175/* Easy bit position selectors */
176176#define POS    ((R.opcode.b.l >> 5) & 7)
177static unsigned int bit_clr[8] = { 0xfe, 0xfd, 0xfb, 0xf7, 0xef, 0xdf, 0xbf, 0x7f };
178static unsigned int bit_set[8] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 };
177static const unsigned int bit_clr[8] = { 0xfe, 0xfd, 0xfb, 0xf7, 0xef, 0xdf, 0xbf, 0x7f };
178static const unsigned int bit_set[8] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 };
179179
180180
181181INLINE void CLR(UINT16 flag) { R.STATUS &= ~flag; }
r1404r1405
615615 *  Cycle Timings
616616 ***********************************************************************/
617617
618static unsigned cycles_main[256]=
618static const unsigned cycles_main[256]=
619619{
620620/*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,
621621/*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,
r1404r1405
635635/*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
636636};
637637
638static opcode_fn opcode_main[256]=
638static const opcode_fn opcode_main[256]=
639639{
640640/*00*/  nop,   illegal,movwf,   movwf,   clrw,   illegal,clrf,   clrf,
641641/*08*/  subwf,   subwf,   subwf,   subwf,   decf,   decf,   decf,   decf,
r1404r1405
672672};
673673
674674
675static unsigned cycles_000_other[16]=
675static const unsigned cycles_000_other[16]=
676676{
677677/*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
678678};
679679
680static opcode_fn opcode_000_other[16]=
680static const opcode_fn opcode_000_other[16]=
681681{
682682/*00*/  nop,   illegal,option,   sleepic,clrwdt,   tris,   tris,   tris,
683683/*08*/  illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal
src/emu/cpu/h6280/tblh6280.c
r1404r1405
308308OP(_0df) { int tmp; H6280_CYCLES(4); RD_ZPG; BBS(5);      } // 6/8 BBS5 ZPG,REL
309309OP(_0ff) { int tmp; H6280_CYCLES(4); RD_ZPG; BBS(7);      } // 6/8 BBS7 ZPG,REL
310310
311static void (*insnh6280[0x100])(void) = {
311static void (*const insnh6280[0x100])(void) = {
312312   h6280_000,h6280_001,h6280_002,h6280_003,h6280_004,h6280_005,h6280_006,h6280_007,
313313   h6280_008,h6280_009,h6280_00a,h6280_00b,h6280_00c,h6280_00d,h6280_00e,h6280_00f,
314314   h6280_010,h6280_011,h6280_012,h6280_013,h6280_014,h6280_015,h6280_016,h6280_017,
src/emu/cpu/saturn/saturnds.c
r1404r1405
191191
192192} MNEMONICS;
193193
194static struct {
194static const struct {
195195   const char *name[2];
196196} mnemonics[]={
197197   { { "rtn",               "RET" } },
src/emu/cpu/konami/konamtbl.c
r1404r1405
350350
351351INLINE void opcode2( void );
352352
353static void (*konami_main[0x100])(void) = {
353static void (*const konami_main[0x100])(void) = {
354354   illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,   /* 00 */
355355   opcode2,opcode2,opcode2,opcode2,pshs   ,pshu   ,puls   ,pulu   ,
356356   lda_im ,ldb_im ,opcode2,opcode2,adda_im,addb_im,opcode2,opcode2,   /* 10 */
r1404r1405
385385   illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal
386386};
387387
388static void (*konami_indexed[0x100])(void) = {
388static void (*const konami_indexed[0x100])(void) = {
389389   illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,   /* 00 */
390390   leax   ,leay   ,leau   ,leas   ,illegal,illegal,illegal,illegal,
391391   illegal,illegal,lda_ix ,ldb_ix ,illegal,illegal,adda_ix,addb_ix,   /* 10 */
r1404r1405
420420   illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal
421421};
422422
423static void (*konami_direct[0x100])(void) = {
423static void (*const konami_direct[0x100])(void) = {
424424   illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,   /* 00 */
425425   illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,
426426   illegal,illegal,lda_di ,ldb_di ,illegal,illegal,adda_di,addb_di,   /* 10 */
r1404r1405
455455   illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal
456456};
457457
458static void (*konami_extended[0x100])(void) = {
458static void (*const konami_extended[0x100])(void) = {
459459   illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,   /* 00 */
460460   illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal,
461461   illegal,illegal,lda_ex ,ldb_ex ,illegal,illegal,adda_ex,addb_ex,   /* 10 */
src/emu/uitext.c
r1404r1405
2121static lang_struct lang;
2222
2323/* All entries in this table must match the enum ordering in "uitext.h" */
24static const char *mame_default_text[] =
24static const char *const mame_default_text[] =
2525{
2626   APPNAME,
2727   /* copyright stuff */
r1404r1405
215215
216216
217217
218static const char **default_text[] =
218static const char *const *const default_text[] =
219219{
220220   mame_default_text,
221221#ifdef MESS
src/emu/hash.c
r1404r1405
185185   },
186186};
187187
188static const char* info_strings[] =
188static const char *const info_strings[] =
189189{
190190   "$ND$",       // No dump
191191   "$BD$"        // Bad dump
src/emu/video/tms9928a.c
r1404r1405
110110static void draw_sprites (running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect);
111111static void change_register (int reg, UINT8 data);
112112
113static void (*ModeHandlers[])(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) = {
113static void (*const ModeHandlers[])(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) = {
114114        draw_mode0, draw_mode1, draw_mode2,  draw_mode12,
115115        draw_mode3, draw_modebogus, draw_mode23,
116116        draw_modebogus };
r1404r1405
305305static void change_register (int reg, UINT8 val) {
306306    static const UINT8 Mask[8] =
307307        { 0x03, 0xfb, 0x0f, 0xff, 0x07, 0x7f, 0x07, 0xff };
308    static const char *modes[] = {
308    static const char *const modes[] = {
309309        "Mode 0 (GRAPHIC 1)", "Mode 1 (TEXT 1)", "Mode 2 (GRAPHIC 2)",
310310        "Mode 1+2 (TEXT 1 variation)", "Mode 3 (MULTICOLOR)",
311311        "Mode 1+3 (BOGUS)", "Mode 2+3 (MULTICOLOR variation)",
src/emu/video/tms34061.c
r1404r1405
4747
4848static struct tms34061_data tms34061;
4949
50static const char *regnames[] =
50static const char *const regnames[] =
5151{
5252   "HORENDSYNC",   "HORENDBLNK",   "HORSTARTBLNK",      "HORTOTAL",
5353   "VERENDSYNC",   "VERENDBLNK",   "VERSTARTBLNK",      "VERTOTAL",
r1404r1405
7474 *
7575 *************************************/
7676
77void tms34061_start(struct tms34061_interface *interface)
77void tms34061_start(const struct tms34061_interface *interface)
7878{
7979   /* reset the data */
8080   memset(&tms34061, 0, sizeof(tms34061));
src/emu/video/v9938.c
r1404r1405
6262#define V9938_MODE_UNKNOWN   (10)
6363
6464
65static const char *v9938_modes[] = {
65static const char *const v9938_modes[] = {
6666   "TEXT 1", "MULTICOLOR", "GRAPHIC 1", "GRAPHIC 2", "GRAPHIC 3",
6767   "GRAPHIC 4", "GRAPHIC 5", "GRAPHIC 6", "GRAPHIC 7", "TEXT 2",
6868   "UNKNOWN" };
r1404r1405
15041504                    register int DX, register int DY,
15051505                    register UINT8 CL, register UINT8 OP);
15061506
1507static int GetVdpTimingValue(register int *);
1507static int GetVdpTimingValue(register const int *);
15081508
15091509static void SrchEngine(void);
15101510static void LineEngine(void);
r1404r1405
15221522/*************************************************************/
15231523/** Variables visible only in this module                   **/
15241524/*************************************************************/
1525static UINT8 Mask[4] = { 0x0F,0x03,0x0F,0xFF };
1526static int  PPB[4]  = { 2,4,2,1 };
1527static int  PPL[4]  = { 256,512,512,256 };
1525static const UINT8 Mask[4] = { 0x0F,0x03,0x0F,0xFF };
1526static const int  PPB[4]  = { 2,4,2,1 };
1527static const int  PPL[4]  = { 256,512,512,256 };
15281528static int  VdpOpsCnt=1;
15291529static void (*VdpEngine)(void)=0;
15301530
15311531                      /*  SprOn SprOn SprOf SprOf */
15321532                      /*  ScrOf ScrOn ScrOf ScrOn */
1533static int srch_timing[8]={ 818, 1025,  818,  830,   /* ntsc */
1533static const int srch_timing[8]={ 818, 1025,  818,  830,   /* ntsc */
15341534                            696,  854,  696,  684 }; /* pal  */
1535static int line_timing[8]={ 1063, 1259, 1063, 1161,
1535static const int line_timing[8]={ 1063, 1259, 1063, 1161,
15361536                            904,  1026, 904,  953 };
1537static int hmmv_timing[8]={ 439,  549,  439,  531,
1537static const int hmmv_timing[8]={ 439,  549,  439,  531,
15381538                            366,  439,  366,  427 };
1539static int lmmv_timing[8]={ 873,  1135, 873, 1056,
1539static const int lmmv_timing[8]={ 873,  1135, 873, 1056,
15401540                            732,  909,  732,  854 };
1541static int ymmm_timing[8]={ 586,  952,  586,  610,
1541static const int ymmm_timing[8]={ 586,  952,  586,  610,
15421542                            488,  720,  488,  500 };
1543static int hmmm_timing[8]={ 818,  1111, 818,  854,
1543static const int hmmm_timing[8]={ 818,  1111, 818,  854,
15441544                            684,  879,  684,  708 };
1545static int lmmm_timing[8]={ 1160, 1599, 1160, 1172,
1545static const int lmmm_timing[8]={ 1160, 1599, 1160, 1172,
15461546                            964,  1257, 964,  977 };
15471547
15481548
r1404r1405
16951695/** GetVdpTimingValue() **************************************/
16961696/** Get timing value for a certain VDP command              **/
16971697/*************************************************************/
1698static int GetVdpTimingValue(register int *timing_values)
1698static int GetVdpTimingValue(register const int *timing_values)
16991699{
17001700  return(timing_values[((VDP[1]>>6)&1)|(VDP[8]&2)|((VDP[9]<<1)&4)]);
17011701}
r1404r1405
22492249/*************************************************************/
22502250static void ReportVdpCommand(register UINT8 Op)
22512251{
2252   static const char *Ops[16] =
2252   static const char *const Ops[16] =
22532253   {
22542254      "SET ","AND ","OR  ","XOR ","NOT ","NOP ","NOP ","NOP ",
22552255      "TSET","TAND","TOR ","TXOR","TNOT","NOP ","NOP ","NOP "
22562256   };
2257   static const char *Commands[16] =
2257   static const char *const Commands[16] =
22582258   {
22592259      " ABRT"," ????"," ????"," ????","POINT"," PSET"," SRCH"," LINE",
22602260      " LMMV"," LMMM"," LMCM"," LMMC"," HMMV"," HMMM"," YMMM"," HMMC"
src/emu/video/tms34061.h
r1404r1405
5656
5757
5858/* starts/stops the emulator */
59void tms34061_start(struct tms34061_interface *interface);
59void tms34061_start(const struct tms34061_interface *interface);
6060
6161/* reads/writes to the 34061 */
6262UINT8 tms34061_r(int col, int row, int func);
src/emu/video/rgbutil.h
r1404r1405
1414#define __RGBUTIL__
1515
1616/* use SSE on 64-bit implementations, where it can be assumed */
17#if defined(__SSE2__) || (defined(PTR64) && defined(_MSC_VER))
17#if (defined(__SSE2__) && defined(PTR64))
1818#include "rgbsse.h"
1919#elif defined(__ALTIVEC__)
2020#include "rgbvmx.h"
src/emu/video/vooddefs.h
r1404r1405
604604 *
605605 *************************************/
606606
607static const char *voodoo_reg_name[] =
607static const char *const voodoo_reg_name[] =
608608{
609609   /* 0x000 */
610610   "status",      "{intrCtrl}",   "vertexAx",      "vertexAy",
r1404r1405
681681};
682682
683683
684static const char *banshee_reg_name[] =
684static const char *const banshee_reg_name[] =
685685{
686686   /* 0x000 */
687687   "status",      "intrCtrl",      "vertexAx",      "vertexAy",
r1404r1405
843843 *
844844 *************************************/
845845
846static const char *banshee_io_reg_name[] =
846static const char *const banshee_io_reg_name[] =
847847{
848848   /* 0x000 */
849849   "status",      "pciInit0",      "sipMonitor",   "lfbMemoryConfig",
r1404r1405
924924 *
925925 *************************************/
926926
927static const char *banshee_agp_reg_name[] =
927static const char *const banshee_agp_reg_name[] =
928928{
929929   /* 0x000 */
930930   "agpReqSize",   "agpHostAddressLow","agpHostAddressHigh","agpGraphicsAddress",
r1404r1405
16811681
16821682   voodoo_reg   reg[0x400];            /* raw registers */
16831683   const UINT8 *regaccess;            /* register access array */
1684   const char **regnames;            /* register names array */
1684   const char *const *regnames;            /* register names array */
16851685   UINT8      alt_regmap;            /* enable alternate register map? */
16861686
16871687   pci_state   pci;               /* PCI state */
src/emu/video/s2636.c
r1404r1405
7676#include "driver.h"
7777#include "s2636.h"
7878
79static int SpriteOffset[4] = {0,0x10,0x20,0x40};
79static const int SpriteOffset[4] = {0,0x10,0x20,0x40};
8080
8181/* To adjust sprites against bitmap */
8282
src/emu/emuopts.c
r1404r1405
143143   { NULL,                          NULL,        OPTION_HEADER,     "CORE DEBUGGING OPTIONS" },
144144   { "log",                         "0",         OPTION_BOOLEAN,    "generate an error.log file" },
145145   { "verbose;v",                   "0",         OPTION_BOOLEAN,    "display additional diagnostic information" },
146   { "update_in_pause",             "0",         OPTION_BOOLEAN,    "keep calling video updates while in pause" },
146147#ifdef MAME_DEBUG
147148   { "debug;d",                     "1",         OPTION_BOOLEAN,    "enable/disable debugger" },
148149   { "debugscript",                 NULL,        0,                 "script for debugger" },
src/emu/emuopts.h
r1404r1405
133133#define OPTION_LOG               "log"
134134#define OPTION_DEBUG            "debug"
135135#define OPTION_DEBUGSCRIPT         "debugscript"
136#define OPTION_UPDATEINPAUSE      "update_in_pause"
136137
137138/* core misc options */
138139#define OPTION_BIOS               "bios"
src/emu/uimenu.c
r1404r1405
130130
131131static render_texture *arrow_texture;
132132
133static const char *input_format[] =
133static const char *const input_format[] =
134134{
135135   "%s",
136136   "%s Analog",
r1404r1405
18911891         ((in->type == IPT_OTHER && in->name != IP_NAME_DEFAULT) || port_type_to_group(in->type, in->player) != IPG_INVALID))
18921892      {
18931893         UINT16 sortorder;
1894         input_seq *curseq, *defseq;
1894         const input_seq *curseq, *defseq;
18951895
18961896         /* determine the sorting order */
18971897         if (in->type >= IPT_START1 && in->type <= __ipt_analog_end)
src/emu/video.c
r1404r1405
122122   UINT32               speed;            /* overall speed (*100) */
123123   UINT32               original_speed;      /* originally-specified speed */
124124   UINT8               refresh_speed;      /* flag: TRUE if we max out our speed according to the refresh */
125   UINT8               update_in_pause;   /* flag: TRUE if video is updated while in pause */
125126
126127   /* frameskipping */
127128   UINT8               empty_skip_count;   /* number of empty frames we have skipped */
r1404r1405
285286   global.seconds_to_run = options_get_int(mame_options(), OPTION_SECONDS_TO_RUN);
286287   global.original_speed = global.speed = (options_get_float(mame_options(), OPTION_SPEED) * 100.0 + 0.5);
287288   global.refresh_speed = options_get_bool(mame_options(), OPTION_REFRESHSPEED);
289   global.update_in_pause = options_get_bool(mame_options(), OPTION_UPDATEINPAUSE);
288290
289291   /* allocate memory for our private data */
290292   viddata = machine->video_data = auto_malloc(sizeof(*viddata));
r1404r1405
10241026   int phase = mame_get_phase(Machine);
10251027
10261028   /* only render sound and video if we're in the running phase */
1027#ifdef MAME_DEBUG
1028   if (phase == MAME_PHASE_RUNNING)
1029#else
1030   if (phase == MAME_PHASE_RUNNING && (debug || !mame_is_paused(Machine)))
1031#endif
1029   if (phase == MAME_PHASE_RUNNING && (!mame_is_paused(Machine) || global.update_in_pause))
10321030   {
10331031      int anything_changed = finish_screen_updates(Machine);
10341032
r1404r1405
15231521      }
15241522      current_ticks = new_ticks;
15251523   }
1524   profiler_mark(PROFILER_END);
15261525
15271526   return current_ticks;
15281527}
r1404r1405
18651864{
18661865   video_private *viddata = machine->video_data;
18671866   internal_screen_info *info = &viddata->scrinfo[scrnum];
1867   const rgb_t *palette;
18681868
18691869   /* only record if we have a file */
18701870   if (info->movie_file != NULL)
r1404r1405
19021902      }
19031903
19041904      /* write the next frame */
1905      error = mng_capture_frame(mame_core_file(info->movie_file), &pnginfo, bitmap, machine->drv->total_colors, palette_entry_list_adjusted(machine->palette));
1905      palette = (machine->palette != NULL) ? palette_entry_list_adjusted(machine->palette) : NULL;
1906      error = mng_capture_frame(mame_core_file(info->movie_file), &pnginfo, bitmap, machine->drv->total_colors, palette);
19061907      png_free(&pnginfo);
19071908      if (error != PNGERR_NONE)
19081909      {
src/emu/memory.c
r1404r1405
243243   UINT64               unmap;               /* unmapped value */
244244   table_data            read;               /* memory read lookup table */
245245   table_data            write;               /* memory write lookup table */
246   data_accessors *      accessors;            /* pointer to the memory accessors */
246   const data_accessors *      accessors;            /* pointer to the memory accessors */
247247   address_map *         map;               /* original memory map */
248248   address_map *         adjmap;               /* adjusted memory map */
249249};
r1404r1405
300300static debug_hook_write_ptr   debug_hook_write;            /* pointer to debugger callback for memory writes */
301301#endif
302302
303static data_accessors memory_accessors[ADDRESS_SPACES][4][2] =
303static const data_accessors memory_accessors[ADDRESS_SPACES][4][2] =
304304{
305305   /* program accessors */
306306   {
r1404r1405
363363   },
364364};
365365
366const char *address_space_names[ADDRESS_SPACES] = { "program", "data", "I/O" };
366const char *const address_space_names[ADDRESS_SPACES] = { "program", "data", "I/O" };
367367
368368
369369/*-------------------------------------------------
r1404r1405
32543254
32553255static const char *handler_to_string(const table_data *table, UINT8 entry)
32563256{
3257   static const char *strings[] =
3257   static const char *const strings[] =
32583258   {
32593259      "invalid",      "bank 1",      "bank 2",      "bank 3",
32603260      "bank 4",      "bank 5",      "bank 6",      "bank 7",
src/emu/memory.h
r1404r1405
591591   UINT8 *            writelookup;      /* write table lookup */
592592   handler_data *      readhandlers;      /* read handlers */
593593   handler_data *      writehandlers;      /* write handlers */
594   data_accessors *   accessors;         /* pointers to the data access handlers */
594   const data_accessors *   accessors;         /* pointers to the data access handlers */
595595};
596596
597597
r1404r1405
728728   ADDRESS_SPACES               /* maximum number of address spaces */
729729};
730730
731extern const char *address_space_names[ADDRESS_SPACES];
731extern const char *const address_space_names[ADDRESS_SPACES];
732732
733733/* ----- address map lookup table definitions ----- */
734734#define SUBTABLE_COUNT         64                  /* number of slots reserved for subtables */
src/emu/mame.c
r1404r1405
190190static void *output_cb_param[OUTPUT_CHANNEL_COUNT];
191191
192192/* the "disclaimer" that should be printed when run with no parameters */
193const char *mame_disclaimer =
193const char mame_disclaimer[] =
194194   "MAME is an emulator: it reproduces, more or less faithfully, the behaviour of\n"
195195   "several arcade machines. But hardware is useless without software, so an image\n"
196196   "of the ROMs which run on that hardware is required. Such ROMs, like any other\n"
r1404r1405
200200   "images is a violation of copyright law and should be promptly reported to the\n"
201201   "authors so that appropriate legal action can be taken.\n";
202202
203const char *memory_region_names[REGION_MAX] =
203const char *const memory_region_names[REGION_MAX] =
204204{
205205   "REGION_INVALID",
206206   "REGION_CPU1",
src/emu/inptport.c
r1404r1405
264264static UINT8 ui_memory[__ipt_max];
265265
266266/* XML attributes for the different types */
267static const char *seqtypestrings[] = { "standard", "decrement", "increment" };
267static const char *const seqtypestrings[] = { "standard", "decrement", "increment" };
268268
269269/* original input_ports without modifications */
270270static input_port_entry *input_ports_default;
r1404r1405
25982598}
25992599
26002600
2601input_seq *input_port_seq(input_port_entry *port, int seqtype)
2601const input_seq *input_port_seq(input_port_entry *port, int seqtype)
26022602{
2603   static input_seq ip_none = SEQ_DEF_0;
2603   static const input_seq ip_none = SEQ_DEF_0;
26042604   input_seq *portseq;
26052605
26062606   /* if port is disabled, return no key */
r1404r1405
26392639}
26402640
26412641
2642input_seq *input_port_default_seq(int type, int player, int seqtype)
2642const input_seq *input_port_default_seq(int type, int player, int seqtype)
26432643{
2644   static input_seq ip_none = SEQ_DEF_0;
2644   static const input_seq ip_none = SEQ_DEF_0;
26452645
26462646   /* find the default setting */
26472647   int defindex = default_ports_lookup[type][player];
src/emu/machine/cr589.c
r1404r1405
1414} SCSICr589;
1515
1616static const int identity_offset = 0x3ab;
17static const char *download_identity = "MATSHITA CD98Q4 DOWNLOADGS0N";
17static const char download_identity[] = "MATSHITA CD98Q4 DOWNLOADGS0N";
1818
1919static int cr589_exec_command( SCSIInstance *scsiInstance, UINT8 *statusCode )
2020{
r1404r1405
144144   return SCSIBase( &SCSIClassCr589, operation, file, intparm, ptrparm );
145145}
146146
147SCSIClass SCSIClassCr589 =
147const SCSIClass SCSIClassCr589 =
148148{
149149   &SCSIClassCDROM,
150150   cr589_dispatch,
src/emu/machine/scsihd.c
r1404r1405
303303   return SCSIBase( &SCSIClassHARDDISK, operation, file, intparm, ptrparm );
304304}
305305
306SCSIClass SCSIClassHARDDISK =
306const SCSIClass SCSIClassHARDDISK =
307307{
308308   &SCSIClassDevice,
309309   scsihd_dispatch,
src/emu/machine/cr589.h
r1404r1405
11#include "scsi.h"
22
3extern SCSIClass SCSIClassCr589;
3extern const SCSIClass SCSIClassCr589;
src/emu/machine/scsihd.h
r1404r1405
1010#include "machine/scsi.h"
1111
1212// CD-ROM handler
13extern SCSIClass SCSIClassHARDDISK;
13extern const SCSIClass SCSIClassHARDDISK;
1414#define SCSI_DEVICE_HARDDISK &SCSIClassHARDDISK
1515
1616#endif
src/emu/machine/53c810.c
r1404r1405
77#define DASM_OPCODES 0
88
99static SCSIInstance *devices[8];   /* SCSI IDs 0-7 */
10static struct LSI53C810interface *intf;
10static const struct LSI53C810interface *intf;
1111static UINT8 last_id;
1212
1313static struct {
r1404r1405
659659   }
660660}
661661
662extern void lsi53c810_init(struct LSI53C810interface *interface)
662extern void lsi53c810_init(const struct LSI53C810interface *interface)
663663{
664664   int i;
665665
r1404r1405
756756   UINT32 dest;
757757   int i;
758758
759   static const char *phases[] =
759   static const char *const phases[] =
760760   {
761761      "DATA_OUT", "DATA_IN", "CMD", "STATUS",
762762      "RESERVED_OUT??", "RESERVED_IN??", "MSG_OUT", "MSG_IN"
r1404r1405
777777   else if (((op & 0xF8000000) == 0x58000000)
778778      | ((op & 0xF8000000) == 0x60000000))
779779   {
780      static struct
780      static const struct
781781      {
782782         UINT32 flag;
783783         const char *text;
src/emu/machine/idectrl.c
r1404r1405
157157   UINT8   config_register[IDE_CONFIG_REGISTERS];
158158   UINT8   config_register_num;
159159
160   struct ide_interface *intf;
160   const struct ide_interface *intf;
161161   hard_disk_file *   disk;
162162   emu_timer *   last_status_timer;
163163   emu_timer *   reset_timer;
164164
165165   UINT8   master_password_enable;
166166   UINT8   user_password_enable;
167   UINT8 *   master_password;
168   UINT8 *   user_password;
167   const UINT8 *   master_password;
168   const UINT8 *   user_password;
169169};
170170
171171
r1404r1405
289289}
290290
291291
292int ide_controller_init_custom(int which, struct ide_interface *intf, chd_file *diskhandle)
292int ide_controller_init_custom(int which, const struct ide_interface *intf, chd_file *diskhandle)
293293{
294294   struct ide_state *ide = &idestate[which];
295295   const hard_disk_info *hdinfo;
r1404r1405
380380   return 0;
381381}
382382
383int ide_controller_init(int which, struct ide_interface *intf)
383int ide_controller_init(int which, const struct ide_interface *intf)
384384{
385385   /* we only support one hard disk right now; get a handle to it */
386386   return ide_controller_init_custom(which, intf, get_disk_handle(0));
r1404r1405
414414}
415415
416416
417void ide_set_master_password(int which, UINT8 *password)
417void ide_set_master_password(int which, const UINT8 *password)
418418{
419419   struct ide_state *ide = &idestate[which];
420420
r1404r1405
423423}
424424
425425
426void ide_set_user_password(int which, UINT8 *password)
426void ide_set_user_password(int which, const UINT8 *password)
427427{
428428   struct ide_state *ide = &idestate[which];
429429
src/emu/machine/roc10937.c
r1404r1405
6565This means our segment maths needs to be more than 16-bit to work!
6666*/
6767
68static UINT32 roc10937charset[]=
68static const UINT32 roc10937charset[]=
6969{           // 11 10 FEDC BA98 7654 3210
7070   0x0507F, //  0  0 0101 0000 0111 1111 @.
7171   0x044CF, //  0  0 0100 0100 1100 1111 A.
src/emu/machine/53c810.h
r1404r1405
55
66struct LSI53C810interface
77{
8   SCSIConfigTable *scsidevs;         /* SCSI devices */
8   const SCSIConfigTable *scsidevs;         /* SCSI devices */
99   void (*irq_callback)(void);         /* IRQ callback */
1010   void (*dma_callback)(UINT32, UINT32, int, int);   /* DMA callback */
1111   UINT32 (*fetch)(UINT32 dsp);
1212};
1313
14extern void lsi53c810_init(struct LSI53C810interface *interface);
14extern void lsi53c810_init(const struct LSI53C810interface *interface);
1515
1616extern void lsi53c810_read_data(int bytes, UINT8 *pData);
1717extern void lsi53c810_write_data(int bytes, UINT8 *pData);
src/emu/machine/idectrl.h
r1404r1405
1414   void    (*interrupt)(int state);
1515};
1616
17int ide_controller_init(int which, struct ide_interface *intf);
18int ide_controller_init_custom(int which, struct ide_interface *intf, chd_file *diskhandle);
17int ide_controller_init(int which, const struct ide_interface *intf);
18int ide_controller_init_custom(int which, const struct ide_interface *intf, chd_file *diskhandle);
1919void ide_controller_reset(int which);
2020UINT8 *ide_get_features(int which);
2121
22void ide_set_master_password(int which, UINT8 *password);
23void ide_set_user_password(int which, UINT8 *password);
22void ide_set_master_password(int which, const UINT8 *password);
23void ide_set_user_password(int which, const UINT8 *password);
2424
2525int ide_bus_0_r(int select, int offset);
2626void ide_bus_0_w(int select, int offset, int data);
src/emu/machine/wd33c93.c
r1404r1405
1818#define VERBOSE 0
1919
2020static SCSIInstance *devices[8];   // SCSI IDs 0-7
21static struct WD33C93interface *intf;
21static const struct WD33C93interface *intf;
2222
2323/* wd register names */
2424#define WD_OWN_ID               0x00
r1404r1405
457457}
458458
459459/* Command handlers */
460static cmd_handler wd33c93_cmds[0x22] =
460static const cmd_handler wd33c93_cmds[0x22] =
461461{
462462   &wd33c93_reset_cmd,      /* 0x00 - WD_CMD_RESET */
463463   &wd33c93_abort_cmd,      /* 0x01 - WD_CMD_ABORT */
r1404r1405
785785   return 0;
786786}
787787
788extern void wd33c93_init( struct WD33C93interface *interface )
788extern void wd33c93_init( const struct WD33C93interface *interface )
789789{
790790   int i;
791791
src/emu/machine/laserdsc.c
r1404r1405
363363    GLOBAL VARIABLES
364364***************************************************************************/
365365
366struct CustomSound_interface laserdisc_custom_interface =
366const struct CustomSound_interface laserdisc_custom_interface =
367367{
368368   custom_start
369369};
src/emu/machine/scsidev.c
r1404r1405
147147   return 0;
148148}
149149
150SCSIClass SCSIClassDevice =
150const SCSIClass SCSIClassDevice =
151151{
152152   NULL,
153153   scsidev_dispatch,
src/emu/machine/wd33c93.h
r1404r1405
1010
1111struct WD33C93interface
1212{
13   SCSIConfigTable *scsidevs;      /* SCSI devices */
13   const SCSIConfigTable *scsidevs;      /* SCSI devices */
1414   void (*irq_callback)(int state);   /* irq callback */
1515};
1616
17extern void wd33c93_init( struct WD33C93interface *interface );
17extern void wd33c93_init( const struct WD33C93interface *interface );
1818extern void wd33c93_get_dma_data(int bytes, UINT8 *pData);
1919extern void wd33c93_write_data(int bytes, UINT8 *pData);
2020extern void *wd33c93_get_device(int id);
src/emu/machine/laserdsc.h
r1404r1405
6060    GLOBAL VARIABLES
6161***************************************************************************/
6262
63extern struct CustomSound_interface laserdisc_custom_interface;
63extern const struct CustomSound_interface laserdisc_custom_interface;
6464
6565
6666
src/emu/machine/scsidev.h
r1404r1405
1010#include "machine/scsi.h"
1111
1212// base handler
13extern SCSIClass SCSIClassDevice;
13extern const SCSIClass SCSIClassDevice;
1414
1515#endif
src/emu/machine/scsicd.c
r1404r1405
760760   return SCSIBase( &SCSIClassCDROM, operation, file, intparm, ptrparm );
761761}
762762
763SCSIClass SCSIClassCDROM =
763const SCSIClass SCSIClassCDROM =
764764{
765765   &SCSIClassDevice,
766766   scsicd_dispatch,
src/emu/machine/ds2401.c
r1404r1405
4141   int shift;
4242   int rx;
4343   int tx;
44   UINT8 *data;
44   const UINT8 *data;
4545   emu_timer *timer;
4646   emu_timer *reset_timer;
4747   attotime t_samp;
r1404r1405
138138   }
139139}
140140
141void ds2401_init( int which, UINT8 *data )
141void ds2401_init( int which, const UINT8 *data )
142142{
143143   struct ds2401_chip *c = &ds2401[ which ];
144144
145   if( data == NULL )
146   {
147      data = auto_malloc( SIZE_DATA );
148   }
149
150145   c->state = STATE_IDLE;
151146   c->bit = 0;
152147   c->byte = 0;
r1404r1405
166161   state_save_register_item( "ds2401", which, c->shift );
167162   state_save_register_item( "ds2401", which, c->rx );
168163   state_save_register_item( "ds2401", which, c->tx );
169   state_save_register_item_pointer( "ds2401", which, data, SIZE_DATA );
164   state_save_register_generic( "ds2401", which, "data", (UINT8 *)&data[0], data[0], SIZE_DATA );
170165
171166   c->timer = timer_alloc( ds2401_tick , NULL);
172167   c->reset_timer = timer_alloc( ds2401_reset , NULL);
src/emu/machine/scsicd.h
r1404r1405
1010#include "machine/scsi.h"
1111
1212// CD-ROM handler
13extern SCSIClass SCSIClassCDROM;
13extern const SCSIClass SCSIClassCDROM;
1414#define SCSI_DEVICE_CDROM &SCSIClassCDROM
1515
1616#endif
src/emu/machine/ds2401.h
r1404r1405
1111
1212#define DS2401_MAXCHIP ( 3 )
1313
14extern void ds2401_init( int which, UINT8 *data );
14extern void ds2401_init( int which, const UINT8 *data );
1515extern void ds2401_write( int which, int data );
1616extern int ds2401_read( int which );
1717
src/emu/machine/6840ptm.c
r1404r1405
9797static ptm6840 ptm[PTM_6840_MAX];
9898
9999#if PTMVERBOSE
100static const char *opmode[] =
100static const char *const opmode[] =
101101{
102102   "000 continous mode",
103103   "001 freq comparison mode",
src/emu/machine/am53cf96.c
r1404r1405
1313#include "am53cf96.h"
1414
1515static UINT8 scsi_regs[32], fifo[16], fptr = 0, xfer_state, last_id;
16static struct AM53CF96interface *intf;
16static const struct AM53CF96interface *intf;
1717
1818static SCSIInstance *devices[8];   // SCSI IDs 0-7
1919
r1404r1405
208208   }
209209}
210210
211void am53cf96_init( struct AM53CF96interface *interface )
211void am53cf96_init( const struct AM53CF96interface *interface )
212212{
213213   int i;
214214
src/emu/machine/scsi.c
r1404r1405
11#include "scsi.h"
22
3void SCSIAllocInstance( SCSIClass *scsiClass, SCSIInstance **instance, int diskId )
3void SCSIAllocInstance( const SCSIClass *scsiClass, SCSIInstance **instance, int diskId )
44{
5   scsiClass->dispatch( SCSIOP_ALLOC_INSTANCE, scsiClass, diskId, instance );
5   scsiClass->dispatch( SCSIOP_ALLOC_INSTANCE, (void *)scsiClass, diskId, instance );
66}
77
88void SCSIDeleteInstance( SCSIInstance *instance )
r1404r1405
6060   *phase = instance->scsiClass->dispatch( SCSIOP_GET_PHASE, instance, 0, NULL );
6161}
6262
63int SCSIBase( SCSIClass *scsiClass, int operation, void *file, INT64 intparm, UINT8 *ptrparm )
63int SCSIBase( const SCSIClass *scsiClass, int operation, void *file, INT64 intparm, UINT8 *ptrparm )
6464{
6565   return scsiClass->baseClass->dispatch( operation, file, intparm, ptrparm );
6666}
6767
68SCSIInstance *SCSIMalloc( SCSIClass *scsiClass )
68SCSIInstance *SCSIMalloc( const SCSIClass *scsiClass )
6969{
7070   SCSIInstance *scsiInstance = (SCSIInstance *) malloc_or_die( SCSISizeof( scsiClass ) );
7171   scsiInstance->scsiClass = scsiClass;
7272   return scsiInstance;
7373}
7474
75void *SCSIThis( SCSIClass *scsiClass, SCSIInstance *instance )
75void *SCSIThis( const SCSIClass *scsiClass, SCSIInstance *instance )
7676{
7777   if( instance != NULL )
7878   {
r1404r1405
9090   return NULL;
9191}
9292
93int SCSISizeof( SCSIClass *scsiClass )
93int SCSISizeof( const SCSIClass *scsiClass )
9494{
9595   int sizeofData = sizeof( SCSIInstance );
9696
src/emu/machine/am53cf96.h
r1404r1405
1010
1111struct AM53CF96interface
1212{
13   SCSIConfigTable *scsidevs;   /* SCSI devices */
13   const SCSIConfigTable *scsidevs;   /* SCSI devices */
1414   void (*irq_callback)(void);   /* irq callback */
1515};
1616
17extern void am53cf96_init( struct AM53CF96interface *interface );
17extern void am53cf96_init( const struct AM53CF96interface *interface );
1818extern void am53cf96_read_data(int bytes, UINT8 *pData);
1919void am53cf96_write_data(int bytes, UINT8 *pData);
2020void *am53cf96_get_device(int id);
src/emu/machine/scsi.h
r1404r1405
1414
1515typedef struct _SCSIClass
1616{
17   struct _SCSIClass *baseClass;
17   const struct _SCSIClass *baseClass;
1818   pSCSIDispatch dispatch;
1919   int sizeofData;
2020} SCSIClass;
2121
2222typedef struct
2323{
24   SCSIClass *scsiClass;
24   const SCSIClass *scsiClass;
2525} SCSIInstance;
2626
2727// commands accepted by a SCSI device's dispatch handler
r1404r1405
4545{
4646   int scsiID;
4747   int diskID;
48   SCSIClass *scsiClass;
48   const SCSIClass *scsiClass;
4949} SCSIConfigItem;
5050
5151#define SCSI_MAX_DEVICES   (16)
r1404r1405
5353typedef struct scsiconfigtable
5454{
5555   int devs_present;
56   SCSIConfigItem devices[SCSI_MAX_DEVICES];
56   const SCSIConfigItem devices[SCSI_MAX_DEVICES];
5757} SCSIConfigTable;
5858
5959// SCSI IDs
r1404r1405
7777#define SCSI_PHASE_MESSAGE_OUT ( 6 )
7878#define SCSI_PHASE_MESSAGE_IN ( 7 )
7979
80extern void SCSIAllocInstance( SCSIClass *scsiClass, SCSIInstance **instance, int diskId );
80extern void SCSIAllocInstance( const SCSIClass *scsiClass, SCSIInstance **instance, int diskId );
8181extern void SCSIDeleteInstance( SCSIInstance *instance );
8282extern void SCSISetDevice( SCSIInstance *instance, void *device );
8383extern void SCSIGetDevice( SCSIInstance *instance, void **device );
r1404r1405
9090extern void SCSISetPhase( SCSIInstance *instance, int phase );
9191extern void SCSIGetPhase( SCSIInstance *instance, int *phase );
9292
93extern SCSIInstance *SCSIMalloc( SCSIClass *scsiClass );
94extern int SCSIBase( SCSIClass *scsiClass, int operation, void *file, INT64 intparm, UINT8 *ptrparm );
95extern void *SCSIThis( SCSIClass *scsiClass, SCSIInstance *instance );
96extern int SCSISizeof( SCSIClass *scsiClass );
93extern SCSIInstance *SCSIMalloc( const SCSIClass *scsiClass );
94extern int SCSIBase( const SCSIClass *scsiClass, int operation, void *file, INT64 intparm, UINT8 *ptrparm );
95extern void *SCSIThis( const SCSIClass *scsiClass, SCSIInstance *instance );
96extern int SCSISizeof( const SCSIClass *scsiClass );
9797extern int SCSILengthFromUINT8( UINT8 *length );
9898extern int SCSILengthFromUINT16( UINT8 *length );
9999
src/emu/machine/rp5h01.c
r1404r1405
44/****************************************************************************/
55
66/* local copy of the interface pointer */
7static struct RP5H01_interface *intf;
7static const struct RP5H01_interface *intf;
88
99/* these also work as the address masks */
1010enum {
r1404r1405
2525
2626/****************************************************************************/
2727
28int RP5H01_init( struct RP5H01_interface *interface ) {
28int RP5H01_init( const struct RP5H01_interface *interface ) {
2929   int i;
3030
3131   /* setup our local copy of the interface */
src/emu/machine/smc91c9x.c
r1404r1405
9292#define EINT_ERCV         0x40
9393
9494/* Ethernet register names */
95static const char *ethernet_regname[64] =
95static const char *const ethernet_regname[64] =
9696{
9797   "TCR", "EPH STATUS", "RCR", "COUNTER", "MIR", "MCR", "(0.6)", "BANK",
9898   "CONFIG", "BASE", "IA0-1", "IA2-3", "IA4-5", "GENERAL PURPOSE", "CONTROL", "BANK",
r1404r1405
164164 *
165165 *************************************/
166166
167void smc91c94_init(struct smc91c9x_interface *config)
167void smc91c94_init(const struct smc91c9x_interface *config)
168168{
169169   ethernet.irq_handler = config->irq_handler;
170170}
src/emu/machine/rp5h01.h
r1404r1405
1010   int offset[MAX_RP5H01];      /* memory offset within the above region where data resides */
1111};
1212
13int RP5H01_init( struct RP5H01_interface *interface );
13int RP5H01_init( const struct RP5H01_interface *interface );
1414void RP5H01_enable_w( int which, int data );            /* /CE */
1515void RP5H01_reset_w( int which, int data );            /* RESET */
1616void RP5H01_clock_w( int which, int data );            /* DATA CLOCK (active low) */
src/emu/machine/smc91c9x.h
r1404r1405
1414   void (*irq_handler)(int state);
1515};
1616
17void smc91c94_init(struct smc91c9x_interface *config);
17void smc91c94_init(const struct smc91c9x_interface *config);
1818void smc91c94_reset(void);
1919READ16_HANDLER( smc91c94_r );
2020WRITE16_HANDLER( smc91c94_w );
src/emu/machine/z80pio.c
r1404r1405
167167    INITIALIZATION/CONFIGURATION
168168***************************************************************************/
169169
170void z80pio_init(int which, z80pio_interface *intf)
170void z80pio_init(int which, const z80pio_interface *intf)
171171{
172172   z80pio *pio = pios + which;
173173
src/emu/machine/z80pio.h
r1404r1405
3333    INITIALIZATION/CONFIGURATION
3434***************************************************************************/
3535
36void z80pio_init(int which, z80pio_interface *intf);
36void z80pio_init(int which, const z80pio_interface *intf);
3737void z80pio_reset(int which);
3838
3939
src/emu/machine/mb87078.c
r1404r1405
1919
2020static struct MB87078 chip[MAX_MB87078];
2121
22static float MB87078_gain_decibel[66]={
22static const float MB87078_gain_decibel[66]={
2323   0.0, -0.5, -1.0, -1.5, -2.0, -2.5, -3.0, -3.5,
2424   -4.0, -4.5, -5.0, -5.5, -6.0, -6.5, -7.0, -7.5,
2525   -8.0, -8.5, -9.0, -9.5,-10.0,-10.5,-11.0,-11.5,
r1404r1405
3131  -32.0, -256.0
3232  };
3333
34static int MB87078_gain_percent[66]={
34static const int MB87078_gain_percent[66]={
3535   100,94,89,84,79,74,70,66,
3636    63,59,56,53,50,47,44,42,
3737    39,37,35,33,31,29,28,26,
src/emu/mame.h
r1404r1405
148148   REGION_MAX
149149};
150150
151extern const char *memory_region_names[REGION_MAX];
151extern const char *const memory_region_names[REGION_MAX];
152152
153153
154154
r1404r1405
249249***************************************************************************/
250250
251251extern running_machine *Machine;
252extern const char *mame_disclaimer;
252extern const char mame_disclaimer[];
253253extern char giant_string_buffer[];
254254
255255extern char build_version[];
src/emu/inptport.h
r1404r1405
876876read32_handler port_tag_to_handler32(const char *tag);
877877read64_handler port_tag_to_handler64(const char *tag);
878878const char *input_port_name(const input_port_entry *in);
879input_seq *input_port_seq(input_port_entry *in, int seqtype);
880input_seq *input_port_default_seq(int type, int player, int seqtype);
879const input_seq *input_port_seq(input_port_entry *in, int seqtype);
880const input_seq *input_port_default_seq(int type, int player, int seqtype);
881881int input_port_condition(const input_port_entry *in);
882882void input_port_set_changed_callback(int port, UINT32 mask, void (*callback)(void *, UINT32, UINT32), void *param);
883883
src/emu/rendlay.c
r1404r1405
17721772   /* loop over all the layer types we support */
17731773   for (layer = 0; layer < ITEM_LAYER_MAX; layer++)
17741774   {
1775      static const char *layer_node_name[ITEM_LAYER_MAX] = { "backdrop", "screen", "overlay", "bezel" };
1775      static const char *const layer_node_name[ITEM_LAYER_MAX] = { "backdrop", "screen", "overlay", "bezel" };
17761776      xml_data_node *itemnode;
17771777
17781778      /* initialize the list */
src/emu/cpuexec.h
r1404r1405
227227   int       vblank_interrupts_per_frame;/* usually 1 */
228228   void       (*timed_interrupt)(void);   /* for interrupts not tied to VBLANK */
229229   attoseconds_t timed_interrupt_period;   /* period for periodic interrupts */
230   void *      reset_param;            /* parameter for cpu_reset */
230   const void *reset_param;            /* parameter for cpu_reset */
231231   const char *tag;
232232};
233233
src/emu/sound/sp0256.c
r1404r1405
283283    return i;
284284}
285285
286static int stage_map[6] = { 0, 1, 2, 3, 4, 5 };
286static const int stage_map[6] = { 0, 1, 2, 3, 4, 5 };
287287
288288/* ======================================================================== */
289289/*  LPC12_REGDEC -- Decode the register set in the filter bank.             */
src/emu/sound/ym2413.c
r1404r1405
557557 - waveform DC and DM select are 100% correct
558558*/
559559
560static unsigned char table[19][8] = {
560static const unsigned char table[19][8] = {
561561/* MULT  MULT modTL DcDmFb AR/DR AR/DR SL/RR SL/RR */
562562/*   0     1     2     3     4     5     6    7    */
563563  {0x49, 0x4c, 0x4c, 0x12, 0x00, 0x00, 0x00, 0x00 },   //0
src/emu/sound/tms5110.c
r1404r1405
709709
710710#if 0
711711/*This is an example word TEN taken from the TMS5110A datasheet*/
712static unsigned int example_word_TEN[619]={
712static const unsigned int example_word_TEN[619]={
713713/* 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,
714714/* 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,
715715/* 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,
src/emu/sound/k054539.c
r1404r1405
123123   struct k054539_info *info = param;
124124#define VOL_CAP 1.80
125125
126   static INT16 dpcm[16] = {
126   static const INT16 dpcm[16] = {
127127      0<<8, 1<<8, 4<<8, 9<<8, 16<<8, 25<<8, 36<<8, 49<<8,
128128      -64<<8, -49<<8, -36<<8, -25<<8, -16<<8, -9<<8, -4<<8, -1<<8
129129   };
r1404r1405
368368
369369   #if CHANNEL_DEBUG
370370   {
371      static char gc_msg[32] = "chip :                         ";
371      static const char gc_msg[32] = "chip :                         ";
372372      static int gc_active=0, gc_chip=0, gc_pos[2]={0,0};
373373      double *gc_fptr;
374374      char *gc_cptr;
src/emu/sound/c140.c
r1404r1405
138138{
139139   long newadr = 0;
140140
141   static INT16 asic219banks[4] = { 0x1f7, 0x1f1, 0x1f3, 0x1f5 };
141   static const INT16 asic219banks[4] = { 0x1f7, 0x1f1, 0x1f3, 0x1f5 };
142142
143143   adrs=(bank<<16)+adrs;
144144
src/emu/sound/scsplfo.c
r1404r1405
2828
2929static int PLFO_TRI[256],PLFO_SQR[256],PLFO_SAW[256],PLFO_NOI[256];
3030static int ALFO_TRI[256],ALFO_SQR[256],ALFO_SAW[256],ALFO_NOI[256];
31static 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,
31static 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,
3232           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};
33static float ASCALE[8]={0.0,0.4,0.8,1.5,3.0,6.0,12.0,24.0};
34static float PSCALE[8]={0.0,7.0,13.5,27.0,55.0,112.0,230.0,494};
33static const float ASCALE[8]={0.0,0.4,0.8,1.5,3.0,6.0,12.0,24.0};
34static const float PSCALE[8]={0.0,7.0,13.5,27.0,55.0,112.0,230.0,494};
3535static int PSCALES[8][256];
3636static int ASCALES[8][256];
3737
r1404r1405
4747      if(i<128)
4848         p=i;
4949      else
50         p=255-i;
50          p=i-256;
5151      ALFO_SAW[i]=a;
5252      PLFO_SAW[i]=p;
5353
src/emu/sound/ymz280b.c
r1404r1405
117117static TIMER_CALLBACK( update_irq_state_timer_6 );
118118static TIMER_CALLBACK( update_irq_state_timer_7 );
119119
120static timer_callback update_irq_state_cb[] =
120static const timer_callback update_irq_state_cb[] =
121121{
122122   update_irq_state_timer_0,
123123   update_irq_state_timer_1,
src/emu/sound/scspdsp.c
r1404r1405
66
77static UINT16 PACK(INT32 val)
88{
9   //cut to 16 bits
10   INT32 f=((UINT32 ) val)>>8;
11   return f;
9   UINT32 temp;
10   int sign,exponent,k;
11
12   sign = (val >> 23) & 0x1;
13   temp = (val ^ (val << 1)) & 0xFFFFFF;
14   exponent = 0;
15   for (k=0; k<12; k++)
16   {
17      if (temp & 0x800000)
18         break;
19      temp <<= 1;
20      exponent += 1;
21   }
22   if (exponent < 12)
23      val = (val << exponent) & 0x3FFFFF;
24   else
25      val <<= 11;
26   val >>= 11;
27   val |= sign << 15;
28   val |= exponent << 11;
29
30   return (UINT16)val;
1231}
1332
1433static INT32 UNPACK(UINT16 val)
1534{
16   INT32 r=val<<8;
17   r<<=8;
18   r>>=8;
19   //if(r&0x00800000)
20   //  r|=0xFF000000;
21   return r;
35   int sign,exponent,mantissa;
36   INT32 uval;
37
38   sign = (val >> 15) & 0x1;
39   exponent = (val >> 11) & 0xF;
40   mantissa = val & 0x7FF;
41   uval = mantissa << 11;
42   if (exponent > 11)
43      exponent = 11;
44   else
45      uval |= (sign ^ 1) << 22;
46   uval |= sign << 23;
47   uval <<= 8;
48   uval >>= 8;
49   uval >>= exponent;
50
51   return uval;
2252}
2353
2454void SCSPDSP_Init(struct _SCSPDSP *DSP)
r1404r1405
125155      if(IRA<=0x1f)
126156         INPUTS=DSP->MEMS[IRA];
127157      else if(IRA<=0x2F)
128         INPUTS=DSP->MIXS[IRA-0x20]<<8;   //MIXS is 16 bit
158         INPUTS=DSP->MIXS[IRA-0x20]<<4;   //MIXS is 20 bit
129159      else if(IRA<=0x31)
130160         INPUTS=0;
131161
r1404r1405
298328void SCSPDSP_SetSample(struct _SCSPDSP *DSP,INT32 sample,int SEL,int MXL)
299329{
300330   //DSP->MIXS[SEL]+=sample<<(MXL+1)/*7*/;
301   DSP->MIXS[SEL]+=sample<<7;
331   DSP->MIXS[SEL]+=sample;
302332//  if(MXL)
303333//      int a=1;
304334}
src/emu/sound/speaker.c
r1404r1405
1111#include "streams.h"
1212#include "speaker.h"
1313
14static INT16 default_levels[2] = {0,32767};
14static const INT16 default_levels[2] = {0,32767};
1515
1616struct speaker
1717{
1818   sound_stream *channel;
19   INT16 *levels;
19   const INT16 *levels;
2020   int num_levels;
2121   int level;
2222};
src/emu/sound/tms36xx.c
r1404r1405
301301   B(1),   B(2),   Dx(3),   B(3),   Dx(4),   B(4)
302302};
303303
304static const int *tunes[] = {NULL,tune1,tune2,tune3,tune4};
304static const int *const tunes[] = {NULL,tune1,tune2,tune3,tune4};
305305
306306#define DECAY(voice)                                 \
307307   if( tms->vol[voice] > VMIN )                        \
src/emu/sound/tms5220r.c
r1404r1405
8383
8484/* chirp table */
8585
86static char chirptable[51]={
86static const char chirptable[51]={
87870x00, 0x2a, (char)0xd4, 0x32,
8888(char)0xb2, 0x12, 0x25, 0x14,
89890x02, (char)0xe1, (char)0xc5, 0x02,
r1404r1405
101101
102102/* interpolation coefficients (in rightshifts, as in actual chip) */
103103
104static char interp_coeff[8] = {
104static const char interp_coeff[8] = {
1051053, 3, 3, 2, 2, 1, 1, 0
106106};
107107
src/emu/sound/ym2151.c
r1404r1405
229229
230230
231231#define RATE_STEPS (8)
232static UINT8 eg_inc[19*RATE_STEPS]={
232static const UINT8 eg_inc[19*RATE_STEPS]={
233233
234234/*cycle:0 1  2 3  4 5  6 7*/
235235
r1404r1405
262262#define O(a) (a*RATE_STEPS)
263263
264264/*note that there is no O(17) in this table - it's directly in the code */
265static UINT8 eg_rate_select[32+64+32]={   /* Envelope Generator rates (32 + 64 rates + 32 RKS) */
265static const UINT8 eg_rate_select[32+64+32]={   /* Envelope Generator rates (32 + 64 rates + 32 RKS) */
266266/* 32 dummy (infinite time) rates */
267267O(18),O(18),O(18),O(18),O(18),O(18),O(18),O(18),
268268O(18),O(18),O(18),O(18),O(18),O(18),O(18),O(18),
r1404r1405
309309/*mask  2047, 1023, 511, 255, 127, 63, 31, 15, 7,  3, 1,  0,  0,  0,  0,  0 */
310310
311311#define O(a) (a*1)
312static UINT8 eg_rate_shift[32+64+32]={   /* Envelope Generator counter shifts (32 + 64 rates + 32 RKS) */
312static const UINT8 eg_rate_shift[32+64+32]={   /* Envelope Generator counter shifts (32 + 64 rates + 32 RKS) */
313313/* 32 infinite time rates */
314314O(0),O(0),O(0),O(0),O(0),O(0),O(0),O(0),
315315O(0),O(0),O(0),O(0),O(0),O(0),O(0),O(0),
r1404r1405
362362*   DT2=0 DT2=1 DT2=2 DT2=3
363363*   0     600   781   950
364364*/
365static UINT32 dt2_tab[4] = { 0, 384, 500, 608 };
365static const UINT32 dt2_tab[4] = { 0, 384, 500, 608 };
366366
367367/*  DT1 defines offset in Hertz from base note
368368*   This table is converted while initialization...
369369*   Detune table shown in YM2151 User's Manual is wrong (verified on the real chip)
370370*/
371371
372static UINT8 dt1_tab[4*32] = { /* 4*32 DT1 values */
372static const UINT8 dt1_tab[4*32] = { /* 4*32 DT1 values */
373373/* DT1=0 */
374374  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
375375  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
r1404r1405
387387  8, 8, 9,10,11,12,13,14,16,17,19,20,22,22,22,22
388388};
389389
390static UINT16 phaseinc_rom[768]={
390static const UINT16 phaseinc_rom[768]={
3913911299,1300,1301,1302,1303,1304,1305,1306,1308,1309,1310,1311,1313,1314,1315,1316,
3923921318,1319,1320,1321,1322,1323,1324,1325,1327,1328,1329,1330,1332,1333,1334,1335,
3933931337,1338,1339,1340,1341,1342,1343,1344,1346,1347,1348,1349,1351,1352,1353,1354,
r1404r1405
457457        some 0x80 could be 0x81 as well as some 0x00 could be 0x01.
458458*/
459459
460static UINT8 lfo_noise_waveform[256] = {
460static const UINT8 lfo_noise_waveform[256] = {
4614610xFF,0xEE,0xD3,0x80,0x58,0xDA,0x7F,0x94,0x9E,0xE3,0xFA,0x00,0x4D,0xFA,0xFF,0x6A,
4624620x7A,0xDE,0x49,0xF6,0x00,0x33,0xBB,0x63,0x91,0x60,0x51,0xFF,0x00,0xD8,0x7F,0xDE,
4634630xDC,0x73,0x21,0x85,0xB2,0x9C,0x5D,0x24,0xCD,0x91,0x9E,0x76,0x7F,0x20,0xFB,0xF3,
src/emu/sound/c6280.c
r1404r1405
214214
215215static void c6280_update(void *param, stream_sample_t **inputs, stream_sample_t **buffer, int length)
216216{
217    static int scale_tab[] = {
217    static const int scale_tab[] = {
218218        0x00, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
219219        0x10, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F
220220    };
src/emu/sound/discrete.c
r1404r1405
162162 *
163163 *************************************/
164164
165static discrete_module module_list[] =
165static const discrete_module module_list[] =
166166{
167167   { DSO_OUTPUT      ,"DSO_OUTPUT"      ,0                                      ,NULL                  ,NULL                 },
168168   { DSO_CSVLOG      ,"DSO_CSVLOG"      ,0                                      ,NULL                  ,NULL                 },
src/emu/sound/scsp.c
r1404r1405
411411         break;
412412      case DECAY1:
413413         slot->EG.volume-=slot->EG.D1R;
414         if(slot->EG.volume<=0)
415            slot->EG.volume=0;
414416         if(slot->EG.volume>>(EG_SHIFT+5)<slot->EG.DL)
415417            slot->EG.state=DECAY2;
416418         break;
r1404r1405
10631065
10641066typedef void (*_SCSPUpdateModes)(struct _SCSP *,struct _SLOT *,unsigned int,unsigned int);
10651067
1066static _SCSPUpdateModes SCSPUpdateModes[]=
1068static const _SCSPUpdateModes SCSPUpdateModes[]=
10671069{
10681070   SCSPTMPL(0,0,0,0)
10691071   SCSPTMPL(0,0,0,1)
r1404r1405
12251227   switch(LPCTL(slot))
12261228   {
12271229   case 0:   //no loop
1228      if(addr>LEA(slot))
1230      if(addr>=LEA(slot))
12291231      {
12301232         //slot->active=0;
12311233         SCSP_StopSlot(slot,0);
12321234      }
12331235      break;
12341236   case 1: //normal loop
1235      if(addr>LEA(slot))
1237      if(addr>=LEA(slot))
12361238         slot->cur_addr=LSA(slot)<<SHIFT;
12371239      break;
12381240   case 2:   //reverse loop
1239      if(addr>LEA(slot))
1241      if(addr>=LEA(slot))
12401242      {
12411243         slot->cur_addr=LEA(slot)<<SHIFT;
12421244         slot->Backwards=1;
r1404r1405
12451247         slot->cur_addr=LEA(slot)<<SHIFT;
12461248      break;
12471249   case 3: //ping-pong
1248      if(addr>LEA(slot)) //reached end, reverse till start
1250      if(addr>=LEA(slot)) //reached end, reverse till start
12491251      {
12501252         slot->cur_addr=LEA(slot)<<SHIFT;
12511253         slot->Backwards=1;
r1404r1405
13021304            ++SCSP->BUFPTR;
13031305            SCSP->BUFPTR&=63;
13041306#ifdef USEDSP
1305            SCSPDSP_SetSample(&SCSP->DSP,sample>>SHIFT,ISEL(slot),IMXL(slot));
1307             Enc=((TL(slot))<<0x0)|((IMXL(slot))<<0xd);
1308             SCSPDSP_SetSample(&SCSP->DSP,(sample*SCSP->LPANTABLE[Enc])>>SHIFT,ISEL(slot),IMXL(slot));
13061309#endif
13071310            Enc=((TL(slot))<<0x0)|((DIPAN(slot))<<0x8)|((DISDL(slot))<<0xd);
13081311            {
1309               smpl+=(sample*SCSP->LPANTABLE[Enc])>>SHIFT;
1310               smpr+=(sample*SCSP->RPANTABLE[Enc])>>SHIFT;
1312                smpl+=(sample*SCSP->LPANTABLE[Enc])>>SHIFT;
1313                smpr+=(sample*SCSP->RPANTABLE[Enc])>>SHIFT;
13111314            }
13121315         }
13131316
r1404r1405
13201323         struct _SLOT *slot=SCSP->Slots+i;
13211324         if(EFSDL(slot))
13221325         {
1323            unsigned short Enc=(TL(slot))|((EFPAN(slot))<<0x8)|((EFSDL(slot))<<0xd);
1324            smpl+=(SCSP->DSP.EFREG[i]*SCSP->LPANTABLE[Enc])>>(SHIFT-4);
1325            smpr+=(SCSP->DSP.EFREG[i]*SCSP->RPANTABLE[Enc])>>(SHIFT-4);
1326             unsigned short Enc=((EFPAN(slot))<<0x8)|((EFSDL(slot))<<0xd);
1327             smpl+=(SCSP->DSP.EFREG[i]*SCSP->LPANTABLE[Enc])>>SHIFT;
1328             smpr+=(SCSP->DSP.EFREG[i]*SCSP->RPANTABLE[Enc])>>SHIFT;
13261329         }
13271330      }
13281331
1329      *bufl++ = ICLIP16(smpl>>4);
1330      *bufr++ = ICLIP16(smpr>>4);
1332       *bufl++ = ICLIP16(smpl>>2);
1333       *bufr++ = ICLIP16(smpr>>2);
13311334   }
13321335}
13331336#endif
src/emu/sound/msm5232.c
r1404r1405
179179#if 0
180180{
181181   /* rate tables (in miliseconds) */
182   static int ATBL[8] = { 2,4,8,16, 32,64, 32,64};
183   static int DTBL[16]= { 40,80,160,320, 640,1280, 640,1280,
182   static const int ATBL[8] = { 2,4,8,16, 32,64, 32,64};
183   static const int DTBL[16]= { 40,80,160,320, 640,1280, 640,1280,
184184                     333,500,1000,2000, 4000,8000, 4000,8000};
185185   for (i=0; i<8; i++)
186186   {
src/emu/sound/flt_rc.c
r1404r1405
1111   int            type;
1212};
1313
14flt_rc_config flt_rc_ac_default = {FLT_RC_AC, 10000, 0, 0, CAP_U(1)};
14const flt_rc_config flt_rc_ac_default = {FLT_RC_AC, 10000, 0, 0, CAP_U(1)};
1515
1616
1717static void filter_rc_update(void *param, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
src/emu/sound/flt_rc.h
r1404r1405
5252   double   C;
5353};
5454
55extern flt_rc_config flt_rc_ac_default;
55extern const flt_rc_config flt_rc_ac_default;
5656
5757void filter_rc_set_RC(int num, int type, double R1, double R2, double R3, double C);
5858
src/emu/sound/tms3615.c
r1404r1405
77
88#define TONES 13
99
10static int divisor[TONES] = { 478, 451, 426, 402, 379, 358, 338, 319, 301, 284, 268, 253, 239 };
10static const int divisor[TONES] = { 478, 451, 426, 402, 379, 358, 338, 319, 301, 284, 268, 253, 239 };
1111
1212struct TMS3615 {
1313   sound_stream *channel;   /* returned by stream_create() */
src/emu/sound/s14001a.c
r1404r1405
172172#define REPEATCOUNT ((chip->PlayParams<<1)&0x6) // remember: its 3 bits and the bottom bit is always zero!
173173#define LOCALSILENCESTATE ((chip->OutputCounter & 0x2) && (MIRRORMODE)) // 1 when silent output, 0 when DAC output.
174174
175static INT8 DeltaTable[4][4] =
175static const INT8 DeltaTable[4][4] =
176176{
177177   { 0xCD, 0xCD, 0xEF, 0xEF, },
178178   { 0xEF, 0xEF, 0x00, 0x00, },
src/emu/sound/fm.c
r1404r1405
23332333   UINT8      addr_A1;         /* address line A1      */
23342334
23352335   /* ADPCM-A unit */
2336   UINT8      *pcmbuf;         /* pcm rom buffer       */
2336   const UINT8   *pcmbuf;         /* pcm rom buffer       */
23372337   UINT32      pcm_size;         /* size of pcm rom      */
23382338   UINT8      adpcmTL;         /* adpcmA total level   */
23392339   ADPCM_CH    adpcm[6];         /* adpcm channels       */
r1404r1405
23532353#define ADPCM_SHIFT    (16)      /* frequency step rate   */
23542354#define ADPCMA_ADDRESS_SHIFT 8   /* adpcm A address shift */
23552355
2356static UINT8 *pcmbufA;
2356static const UINT8 *pcmbufA;
23572357static UINT32 pcmsizeA;
23582358
23592359
23602360/* Algorithm and tables verified on real YM2608 and YM2610 */
23612361
23622362/* usual ADPCM table (16 * 1.1^N) */
2363static int steps[49] =
2363static const int steps[49] =
23642364{
23652365    16,  17,   19,   21,   23,   25,   28,
23662366    31,  34,   37,   41,   45,   50,   55,
r1404r1405
23722372};
23732373
23742374/* different from the usual ADPCM table */
2375static int step_inc[8] = { -1*16, -1*16, -1*16, -1*16, 2*16, 5*16, 7*16, 9*16 };
2375static const int step_inc[8] = { -1*16, -1*16, -1*16, -1*16, 2*16, 5*16, 7*16, 9*16 };
23762376
23772377/* speedup purposes only */
23782378static int jedi_table[ 49*16 ];
r1404r1405
25992599
26002600
26012601
2602static unsigned int YM2608_ADPCM_ROM_addr[2*6] = {
2602static const unsigned int YM2608_ADPCM_ROM_addr[2*6] = {
260326030x0000, 0x01bf, /* bass drum  */
260426040x01c0, 0x043f, /* snare drum */
260526050x0440, 0x1b7f, /* top cymbal */
r1404r1405
26142614    It was verified, using real YM2608, that this ADPCM stream produces 100% correct output signal.
26152615*/
26162616
2617static unsigned char YM2608_ADPCM_ROM[0x2000] = {
2617static const unsigned char YM2608_ADPCM_ROM[0x2000] = {
26182618
26192619/* Source: 01BD.ROM */
26202620/* Length: 448 / 0x000001C0 */
r1404r1405
41194119   F2610->OPN.ST.IRQ_Handler   = IRQHandler;
41204120   F2610->OPN.ST.SSG           = ssg;
41214121   /* ADPCM */
4122   F2610->pcmbuf   = (UINT8 *)pcmroma;
4122   F2610->pcmbuf   = (const UINT8 *)pcmroma;
41234123   F2610->pcm_size = pcmsizea;
41244124   /* DELTA-T */
41254125   F2610->deltaT.memory = (UINT8 *)pcmromb;
src/emu/sound/okim6295.c
r1404r1405
8686static void compute_tables(void)
8787{
8888   /* nibble to bit map */
89   static int nbl2bit[16][4] =
89   static const int nbl2bit[16][4] =
9090   {
9191      { 1, 0, 0, 0}, { 1, 0, 0, 1}, { 1, 0, 1, 0}, { 1, 0, 1, 1},
9292      { 1, 1, 0, 0}, { 1, 1, 0, 1}, { 1, 1, 1, 0}, { 1, 1, 1, 1},
src/emu/sound/k053260.c
r1404r1405
9595#define MINOUT -0x8000
9696
9797static void K053260_update( void * param, stream_sample_t **inputs, stream_sample_t **buffer, int length ) {
98   static long dpcmcnv[] = { 0,1,2,4,8,16,32,64, -128, -64, -32, -16, -8, -4, -2, -1};
98   static const long dpcmcnv[] = { 0,1,2,4,8,16,32,64, -128, -64, -32, -16, -8, -4, -2, -1};
9999
100100   int i, j, lvol[4], rvol[4], play[4], loop[4], ppcm_data[4], ppcm[4];
101101   unsigned char *rom[4];
src/emu/sound/multipcm.c
r1404r1405
3535#define MULTIPCM_CLOCKDIV       (360.0)
3636#define MULTIPCM_ONE      (18)
3737
38static int ctbl[] =
38static const int ctbl[] =
3939{
4040   0, 1, 2, 3, 4, 5, 6 , -1,   // voice number mapping
4141   7, 8, 9, 10,11,12,13, -1,
r1404r1405
4343   21,22,23,24,25,26,27, -1,
4444};
4545
46static int decaytbl[16] =   // decay times
46static const int decaytbl[16] =   // decay times
4747{
4848     0,   300,   800,  1400,
4949  2100,  3000,  4000,  5200,
src/emu/sound/sn76477.c
r1404r1405
643643static void log_enable_line(struct SN76477 *sn)
644644{
645645#if VERBOSE
646   static const char *desc[] =
646   static const char *const desc[] =
647647   {
648648      "Enabled", "Inhibited"
649649   };
src/emu/sound/vlm5030.c
r1404r1405
174174/* This is the energy lookup table */
175175
176176/* sampled from real chip */
177static unsigned short energytable[0x20] =
177static const unsigned short energytable[0x20] =
178178{
179179     0,  2,  4,  6, 10, 12, 14, 18, /*  0-7  */
180180    22, 26, 30, 34, 38, 44, 48, 54, /*  8-15 */
src/emu/sound/k007232.c
r1404r1405
5858
5959
6060#if 0
61static int kdac_note[] = {
61static const int kdac_note[] = {
6262  261.63/8, 277.18/8,
6363  293.67/8, 311.13/8,
6464  329.63/8,
r1404r1405
7070  523.25/8,
7171};
7272
73static float kdaca_fn[][2] = {
73static const float kdaca_fn[][2] = {
7474  /* B */
7575  { 0x03f, 493.88/8 },      /* ?? */
7676  { 0x11f, 493.88/4 },      /* ?? */
src/emu/sound/sidenvel.c
r1404r1405
4646
4747static UINT16 masterAmplModTable[16*256];
4848
49static float attackTimes[16] =
49static const float attackTimes[16] =
5050{
5151  /* milliseconds */
5252#if defined(SID_REFTIMES)
r1404r1405
6060#endif
6161};
6262
63static float decayReleaseTimes[16] =
63static const float decayReleaseTimes[16] =
6464{
6565  /* milliseconds */
6666#if defined(SID_REFTIMES)
src/emu/sound/side6581.h
r1404r1405
1111// C64 C PAL, MOS 6581R4 1686 S
1212//
1313
14static UINT8 releaseTab[] =
14static const UINT8 releaseTab[] =
1515{
1616  255, 255, 254, 254, 253, 253, 252, 252, 251, 251, 250, 250, 249, 249, 248,
1717  248, 247, 247, 246, 246, 245, 245, 244, 244, 243, 243, 242, 242, 241, 241,
src/emu/sound/ymdeltat.c
r1404r1405
151151
152152
153153/* 0-DRAM x1, 1-ROM, 2-DRAM x8, 3-ROM (3 is bad setting - not allowed by the manual) */
154static UINT8 dram_rightshift[4]={3,0,0,0};
154static const UINT8 dram_rightshift[4]={3,0,0,0};
155155
156156/* DELTA-T ADPCM write register */
157157void YM_DELTAT_ADPCM_Write(YM_DELTAT *DELTAT,int r,int v)
src/emu/sound/es5503.c
r1404r1405
7979   UINT32 output_rate;
8080} ES5503Chip;
8181
82static UINT16 wavesizes[8] = { 256, 512, 1024, 2048, 4096, 8192, 16384, 32768 };
83static UINT32 wavemasks[8] = { 0x1ff00, 0x1fe00, 0x1fc00, 0x1f800, 0x1f000, 0x1e000, 0x1c000, 0x18000 };
84static UINT32 accmasks[8]  = { 0xff, 0x1ff, 0x3ff, 0x7ff, 0xfff, 0x1fff, 0x3fff, 0x7fff };
85static int    resshifts[8] = { 9, 10, 11, 12, 13, 14, 15, 16 };
82static const UINT16 wavesizes[8] = { 256, 512, 1024, 2048, 4096, 8192, 16384, 32768 };
83static const UINT32 wavemasks[8] = { 0x1ff00, 0x1fe00, 0x1fc00, 0x1f800, 0x1f000, 0x1e000, 0x1c000, 0x18000 };
84static const UINT32 accmasks[8]  = { 0xff, 0x1ff, 0x3ff, 0x7ff, 0xfff, 0x1fff, 0x3fff, 0x7fff };
85static const int    resshifts[8] = { 9, 10, 11, 12, 13, 14, 15, 16 };
8686
8787enum
8888{
src/emu/ui.c
r1404r1405
11411141      bufptr += sprintf(bufptr, "\n%s\n", ui_getstring(UI_vectorgame));
11421142
11431143   /* display screen resolution and refresh rate info for raster games */
1144   else
1144   else if (Machine->drv->video_attributes & VIDEO_TYPE_RASTER)
11451145      bufptr += sprintf(bufptr,"\n%s:\n%d " UTF8_MULTIPLY " %d (%s) %f" UTF8_NBSP "Hz\n",
11461146            ui_getstring(UI_screenres),
11471147            Machine->screen[0].visarea.max_x - Machine->screen[0].visarea.min_x + 1,
11481148            Machine->screen[0].visarea.max_y - Machine->screen[0].visarea.min_y + 1,
11491149            (Machine->gamedrv->flags & ORIENTATION_SWAP_XY) ? "V" : "H",
11501150            ATTOSECONDS_TO_HZ(Machine->screen[0].refresh));
1151   else
1152      *bufptr++ = '\0';
1153
11511154   return bufptr - buffer;
11521155}
11531156
src/emu/profiler.c
r1404r1405
102102   int i,j;
103103   UINT64 total,normalize;
104104   UINT64 computed;
105   static const char *names[PROFILER_TOTAL] =
105   static const char *const names[PROFILER_TOTAL] =
106106   {
107107      "CPU 1  ",
108108      "CPU 2  ",
src/emu/input.c
r1404r1405
337337static INT32             joystick_saturation;
338338
339339/* standard joystick mappings */
340const char *            joystick_map_8way = "7778...4445";
341const char *            joystick_map_4way_sticky = "s8.4s8.44s8.4445";
342const char *            joystick_map_4way_diagonal = "4444s8888..444458888.444555888.ss5.222555666.222256666.2222s6666.2222s6666";
340const char         joystick_map_8way[] = "7778...4445";
341const char         joystick_map_4way_sticky[] = "s8.4s8.44s8.4445";
342const char         joystick_map_4way_diagonal[] = "4444s8888..444458888.444555888.ss5.222555666.222256666.2222s6666.2222s6666";
343343
344344
345345
r1404r1405
15491549                  JOYSTICK_MAP_DOWN | JOYSTICK_MAP_RIGHT,
15501550                  JOYSTICK_MAP_STICKY
15511551               };
1552               static const char *validchars = "789456123s";
1552               static const char validchars[] = "789456123s";
15531553               const char *ptr = strchr(validchars, *mapstring++);
15541554
15551555               /* invalid characters exit immediately */
src/emu/driver.h
r1404r1405
119119
120120/* ----- flags for video_attributes ----- */
121121
122/* is the video hardware raser or vector base? */
123#define   VIDEO_TYPE_RASTER            0x0000
124#define   VIDEO_TYPE_VECTOR            0x0001
122/* is the video hardware raster or vector based? */
123#define VIDEO_TYPE_NONE                 0x0000
124#define   VIDEO_TYPE_RASTER            0x0001
125#define   VIDEO_TYPE_VECTOR            0x0002
125126
126127/* should VIDEO_UPDATE by called at the start of VBLANK or at the end? */
127128#define   VIDEO_UPDATE_BEFORE_VBLANK      0x0000
128#define   VIDEO_UPDATE_AFTER_VBLANK      0x0002
129#define   VIDEO_UPDATE_AFTER_VBLANK      0x0004
129130
130131/* indicates VIDEO_UPDATE will add container bits its */
131#define VIDEO_SELF_RENDER            0x0004
132#define VIDEO_SELF_RENDER            0x0008
132133
133134/* automatically extend the palette creating a darker copy for shadows */
134135#define VIDEO_HAS_SHADOWS            0x0010
src/emu/cpuint.c
r1404r1405
8383static int cpu_6_irq_callback(int line);
8484static int cpu_7_irq_callback(int line);
8585
86int (*cpu_irq_callbacks[MAX_CPU])(int) =
86int (*const cpu_irq_callbacks[MAX_CPU])(int) =
8787{
8888   cpu_0_irq_callback,
8989   cpu_1_irq_callback,
src/emu/drawgfx.c
r1404r1405
8282    offset
8383-------------------------------------------------*/
8484
85INLINE int readbit(const UINT8 *src, int bitnum)
85INLINE int readbit(const UINT8 *src, unsigned int bitnum)
8686{
8787   return src[bitnum / 8] & (0x80 >> (bitnum % 8));
8888}
src/emu/input.h
r1404r1405
485485***************************************************************************/
486486
487487/* joystick maps */
488extern const char *   joystick_map_8way;
489extern const char *   joystick_map_4way_sticky;
490extern const char *   joystick_map_4way_diagonal;
488extern const char joystick_map_8way[];
489extern const char joystick_map_4way_sticky[];
490extern const char joystick_map_4way_diagonal[];
491491
492492
493493
src/emu/cpuint.h
r1404r1405
3030
3131void cpuint_reset(void);
3232
33extern int (*cpu_irq_callbacks[])(int);
33extern int (*const cpu_irq_callbacks[])(int);
3434
3535
3636
src/emu/state.c
r1404r1405
135135static void ss_c4(UINT8 *, UINT32);
136136static void ss_c8(UINT8 *, UINT32);
137137
138static void (*ss_conv[])(UINT8 *, UINT32) = { 0, 0, ss_c2, 0, ss_c4, 0, 0, 0, ss_c8 };
138static void (*const ss_conv[])(UINT8 *, UINT32) = { 0, 0, ss_c2, 0, ss_c4, 0, 0, 0, ss_c8 };
139139
140140
141141
src/emu/cheat.c
r1404r1405
563563
564564static UINT32            cheatOptions = 2;
565565
566static const char *  kCheatNameTemplates[] =
566static const char *const kCheatNameTemplates[] =
567567{
568568    "Infinite Credits",
569569   "Infinite Time",
r1404r1405
724724   0x01
725725};
726726
727static const char * kWatchLabelStringList[] =
727static const char *const kWatchLabelStringList[] =
728728{
729729   "None",
730730   "Address",
731731   "String"
732732};
733733
734static const char * kWatchDisplayTypeStringList[] =
734static const char *const kWatchDisplayTypeStringList[] =
735735{
736736   "Hex",
737737   "Decimal",
r1404r1405
28272827
28282828static int EditCheatMenu(CheatEntry * entry, int index, int selection)
28292829{
2830   static const char *   kTypeNames[] =
2830   static const char *const kTypeNames[] =
28312831   {
28322832      "Normal/Delay",
28332833      "Wait",
r1404r1405
28372837      "Select"
28382838   };
28392839
2840   static const char *   kNumbersTable[] =
2840   static const char *const kNumbersTable[] =
28412841   {
28422842      "0",   "1",   "2",   "3",   "4",   "5",   "6",   "7",
28432843      "8",   "9",   "10",   "11",   "12",   "13",   "14",   "15",
r1404r1405
28452845      "24",   "25",   "26",   "27",   "28",   "29",   "30",   "31"
28462846   };
28472847
2848   static const char *   kOperationNames[] =
2848   static const char *const kOperationNames[] =
28492849   {
28502850      "Write",
28512851      "Add/Subtract",
r1404r1405
28572857      "Null"
28582858   };
28592859
2860   static const char *   kAddSubtractNames[] =
2860   static const char *const kAddSubtractNames[] =
28612861   {
28622862      "Add",
28632863      "Subtract"
28642864   };
28652865
2866   static const char *   kSetClearNames[] =
2866   static const char *const kSetClearNames[] =
28672867   {
28682868      "Set",
28692869      "Clear"
28702870   };
28712871
2872   static const char *   kPrefillNames[] =
2872   static const char *const kPrefillNames[] =
28732873   {
28742874      "None",
28752875      "FF",
r1404r1405
28772877      "01"
28782878   };
28792879
2880   static const char *   kEndiannessNames[] =
2880   static const char *const kEndiannessNames[] =
28812881   {
28822882      "Normal",
28832883      "Swap"
28842884   };
28852885
2886   static const char *   kRegionNames[] =
2886   static const char *const kRegionNames[] =
28872887   {
28882888      "CPU1",      "CPU2",      "CPU3",      "CPU4",      "CPU5",      "CPU6",      "CPU7",      "CPU8",
28892889      "GFX1",      "GFX2",      "GFX3",      "GFX4",      "GFX5",      "GFX6",      "GFX7",      "GFX8",
r1404r1405
28922892      "USER1",   "USER2",   "USER3",   "USER4",   "USER5",   "USER6",   "USER7",   "USER8"
28932893   };
28942894
2895   static const char *   kLocationNames[] =
2895   static const char *const kLocationNames[] =
28962896   {
28972897      "Normal",
28982898      "Region",
r1404r1405
29042904      "Unused (7)"
29052905   };
29062906
2907   static const char *   kCustomLocationNames[] =
2907   static const char *const kCustomLocationNames[] =
29082908   {
29092909      "Comment",
29102910      "EEPROM",
r1404r1405
29172917      "Unused (28)",   "Unused (29)",   "Unused (30)",   "Unused (31)"
29182918   };
29192919
2920   static const char *   kSizeNames[] =
2920   static const char *const kSizeNames[] =
29212921   {
29222922      "8 Bit",
29232923      "16 Bit",
r1404r1405
52705270
52715271static int DoSearchMenuClassic(int selection)
52725272{
5273   static const char * energyStrings[] =
5273   static const char *const energyStrings[] =
52745274   {
52755275      "Less",
52765276      "Greater",
r1404r1405
52785278      "Greater or Equal",
52795279   };
52805280
5281   static const char * equalOrNotStrings[] =
5281   static const char *const equalOrNotStrings[] =
52825282   {
52835283      "Equal",
52845284      "Not Equal",
52855285   };
52865286
5287   static const char * operandStrings[] =
5287   static const char *const operandStrings[] =
52885288   {
52895289      "Previous Data",
52905290      "First Data",
r1404r1405
58005800static int DoSearchMenu(int selection)
58015801{
58025802   /* menu stirngs */
5803   static const char * kOperandNameTable[] =
5803   static const char *const kOperandNameTable[] =
58045804   {
58055805      "Current Data",
58065806      "Previous Data",
r1404r1405
58085808      "Value"
58095809   };
58105810
5811   static const char * kComparisonNameTable[] =
5811   static const char *const kComparisonNameTable[] =
58125812   {
58135813      "Less",
58145814      "Greater",
r1404r1405
58205820      "Near To"
58215821   };
58225822
5823   static const char * kSearchByteNameTable[] =
5823   static const char *const kSearchByteNameTable[] =
58245824   {
58255825      "1",
58265826      "2",
r1404r1405
62896289
62906290static int SelectSearchRegions(int selection, SearchInfo * search)
62916291{
6292   static const char   * kSearchSpeedList[] =
6292   static const char *const kSearchSpeedList[] =
62936293   {
62946294      "Fast",
62956295      "Medium",
r1404r1405
70667066      kMenu_Return
70677067   };
70687068
7069   static const char * kWatchSizeStringList[] =
7069   static const char *const kWatchSizeStringList[] =
70707070   {
70717071      "8 Bit",
70727072      "16 Bit",
r1404r1405
92469246      UINT8   customField;
92479247   };
92489248
9249   static struct ConversionTable kConversionTable[] =
9249   static const struct ConversionTable kConversionTable[] =
92509250   {
92519251      {   0,      0x00000000,   kCustomField_None },
92529252      {   1,      0x00000001,   kCustomField_None },
r1404r1405
93139313      {   -1,      0x00000000,   kCustomField_End }
93149314   };
93159315
9316   struct ConversionTable   * traverse = kConversionTable;
9316   const struct ConversionTable   * traverse = kConversionTable;
93179317   UINT32               newCode;
93189318   UINT8               linkCheat = 0;
93199319
src/emu/validity.c
r1404r1405
654654      {
655655#define SPACE_SHIFT(a)      ((addr_shift < 0) ? ((a) << -addr_shift) : ((a) >> addr_shift))
656656#define SPACE_SHIFT_END(a)   ((addr_shift < 0) ? (((a) << -addr_shift) | ((1 << -addr_shift) - 1)) : ((a) >> addr_shift))
657         static const char *spacename[] = { "program", "data", "I/O" };
657         static const char *const spacename[] = { "program", "data", "I/O" };
658658         int databus_width = cputype_databus_width(cpu->type, spacenum);
659659         int addr_shift = cputype_addrbus_shift(cpu->type, spacenum);
660660         int alignunit = databus_width/8;
src/lib/util/options.h
r1404r1405
8787    GLOBAL VARIABLES
8888***************************************************************************/
8989
90extern const char *option_unadorned[MAX_UNADORNED_OPTIONS];
90extern const char *const option_unadorned[MAX_UNADORNED_OPTIONS];
9191
9292
9393
src/lib/util/options.c
r1404r1405
110110    GLOBAL VARIABLES
111111***************************************************************************/
112112
113const char *option_unadorned[MAX_UNADORNED_OPTIONS] =
113const char *const option_unadorned[MAX_UNADORNED_OPTIONS] =
114114{
115115   "<UNADORNED0>",
116116   "<UNADORNED1>",
src/mess/includes/pclpt.h
r1404r1405
2121   // dma for ecp
2222} PC_LPT_CONFIG;
2323
24void pc_lpt_config(int nr, PC_LPT_CONFIG *config);
24void pc_lpt_config(int nr, const PC_LPT_CONFIG *config);
2525
2626void pc_lpt_set_device(int nr, CENTRONICS_DEVICE *device);
2727
src/mess/includes/centroni.h
r1404r1405
4444   void (*handshake_out)(int n, int data, int mask);
4545} CENTRONICS_CONFIG;
4646
47void centronics_config(int nr, CENTRONICS_CONFIG *config);
47void centronics_config(int nr, const CENTRONICS_CONFIG *config);
4848
4949void centronics_write_data(int nr, UINT8 data);
5050void centronics_write_handshake(int nr, int data, int mask);
src/mess/osd/windows/dialog.c
r1404r1405
12081208}
12091209
12101210//============================================================
1211//   input_port_mutable_seq
1212//============================================================
1213
1214static input_seq *input_port_mutable_seq(input_port_entry *in, int seqtype)
1215{
1216   const input_seq *const_seq = input_port_seq(in, seqtype);
1217   input_seq *seq;
1218
1219   if (const_seq == &in->seq)
1220      seq = &in->seq;
1221   else if (const_seq == &in->analog.incseq)
1222      seq = &in->analog.incseq;
1223   else if (const_seq == &in->analog.decseq)
1224      seq = &in->analog.decseq;
1225   else
1226      seq = NULL;
1227
1228   return seq;
1229}
1230
1231//============================================================
12111232//   dialog_add_single_seqselect
12121233//============================================================
12131234
r1404r1405
12171238   seqselect_info *stuff;
12181239   input_seq *code;
12191240
1220   code = input_port_seq(port, seq);
1241   code = input_port_mutable_seq(port, seq);
12211242
12221243   if (dialog_write_item(di, WS_CHILD | WS_VISIBLE | SS_ENDELLIPSIS | ES_CENTER | SS_SUNKEN,
12231244         x, y, cx, cy, NULL, DLGITEM_EDIT, NULL))
src/mess/machine/pclpt.c
r1404r1405
3535
3636typedef struct {
3737   CENTRONICS_DEVICE *device;
38   PC_LPT_CONFIG *config;
38   const PC_LPT_CONFIG *config;
3939   int on;
4040   UINT8 data;
4141   UINT8 status;
r1404r1405
4545   { 0 }
4646};
4747
48void pc_lpt_config(int nr, PC_LPT_CONFIG *config)
48void pc_lpt_config(int nr, const PC_LPT_CONFIG *config)
4949{
5050   PC_LPT *This=LPT+nr;
5151   This->config=config;
src/mess/machine/centroni.c
r1404r1405
77#include "devices/printer.h"
88
99typedef struct {
10   CENTRONICS_CONFIG *config;
10   const CENTRONICS_CONFIG *config;
1111   UINT8 data;
1212   UINT8 control;
1313   double time_;
r1404r1405
3333
3434static TIMER_CALLBACK(centronics_timer_callback);
3535
36void centronics_config(int nr, CENTRONICS_CONFIG *config)
36void centronics_config(int nr, const CENTRONICS_CONFIG *config)
3737{
3838   CENTRONICS *This=cent+nr;
3939   This->config=config;
docs/messnew.txt
r1404r1405
1414
1515- [QL] Added sound. [Curt Coder]
1616
17- [SG1000] Fixed keyboard/joystick detection. (bug #1444) [Curt Coder]
18
1719- [SYM1] Fixed bug #1442.  [Dirk Best]
1820
1921- [TI99] Fixed fatal regressions introduced a few releases ago.  [Michael Zapf]
2022
2123- [X68000] Improved video timing.  [Barry Rodewald]
2224
23- [SG1000] Fixed keyboard/joystick detection. (bug #1444) [Curt Coder]
2425
2526
26
2727User Interface Changes:
2828-----------------------
2929- [Windows] Fixed occasional crash in menu bar when multithreading is on.
r1404r1405
3939
4040Source Changes:
4141----------------
42- The core is based on MAME 0.121u3.  This incorporates all features of the
42- The core is based on MAME 0.121u4.  This incorporates all features of the
4343  update to this core.  [MAME team]
4444
4545- Changed spacing between natural keyboard key names.  [Nate Woods]
makefile
r1404r1405
495495# executable targets and dependencies
496496#-------------------------------------------------
497497
498ifndef EXECUTABLE_DEFINED
499
498500$(EMULATOR): $(VERSIONOBJ) $(DRVLIBS) $(LIBOSD) $(LIBEMU) $(LIBCPU) $(LIBSOUND) $(LIBUTIL) $(EXPAT) $(ZLIB) $(LIBOCORE) $(RESFILE)
499501# always recompile the version string
500502   $(CC) $(CDEFS) $(CFLAGS) -c $(SRC)/version.c -o $(VERSIONOBJ)
501503   @echo Linking $@...
502504   $(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $^ $(LIBS) -o $@
503505
506endif
504507
505508
509
506510#-------------------------------------------------
507511# generic rules
508512#-------------------------------------------------

Previous 15994 Revisions Next


© 1998-2018 The MESS Team