| 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 |
| r1404 | r1405 | |
|---|---|---|
| 57 | 57 | }; |
| 58 | 58 | |
| 59 | 59 | |
| 60 | static discrete_dac_r1_ladder spiders_fire_dac = | |
| 60 | static const discrete_dac_r1_ladder spiders_fire_dac = | |
| 61 | 61 | { |
| 62 | 62 | 1, |
| 63 | 63 | {RES_K(10)}, // R29 |
| r1404 | r1405 | |
| 67 | 67 | CAP_N(100) // C100 |
| 68 | 68 | }; |
| 69 | 69 | |
| 70 | static discrete_dac_r1_ladder spiders_web_exp_dac = | |
| 70 | static const discrete_dac_r1_ladder spiders_web_exp_dac = | |
| 71 | 71 | { |
| 72 | 72 | 1, |
| 73 | 73 | {RES_K(10)}, // R44 |
| r1404 | r1405 | |
|---|---|---|
| 55 | 55 | ADDRESS_MAP_END |
| 56 | 56 | |
| 57 | 57 | |
| 58 | struct AY8910interface timeplt_ay8910_interface = | |
| 58 | const struct AY8910interface timeplt_ay8910_interface = | |
| 59 | 59 | { |
| 60 | 60 | soundlatch_r, |
| 61 | 61 | timeplt_portB_r |
| r1404 | r1405 | |
| 79 | 79 | /* Bit 7 comes from the QA output of the LS90 producing a sequence of */ |
| 80 | 80 | /* 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 */ |
| 81 | 81 | |
| 82 | static int timeplt_timer[10] = | |
| 82 | static const int timeplt_timer[10] = | |
| 83 | 83 | { |
| 84 | 84 | 0x00, 0x10, 0x20, 0x30, 0x40, 0x90, 0xa0, 0xb0, 0xa0, 0xd0 |
| 85 | 85 | }; |
| r1404 | r1405 | |
|---|---|---|
| 1468 | 1468 | } |
| 1469 | 1469 | |
| 1470 | 1470 | |
| 1471 | static struct AY8910interface demon_ay8910_interface_1 = | |
| 1471 | static const struct AY8910interface demon_ay8910_interface_1 = | |
| 1472 | 1472 | { |
| 1473 | 1473 | sound_porta_r, |
| 1474 | 1474 | sound_portb_r, |
| r1404 | r1405 | |
| 1476 | 1476 | sound_portb_w |
| 1477 | 1477 | }; |
| 1478 | 1478 | |
| 1479 | static struct AY8910interface demon_ay8910_interface_3 = | |
| 1479 | static const struct AY8910interface demon_ay8910_interface_3 = | |
| 1480 | 1480 | { |
| 1481 | 1481 | 0, |
| 1482 | 1482 | 0, |
| r1404 | r1405 | |
| 1543 | 1543 | ADDRESS_MAP_END |
| 1544 | 1544 | |
| 1545 | 1545 | |
| 1546 | static struct z80_irq_daisy_chain daisy_chain[] = | |
| 1546 | static const struct z80_irq_daisy_chain daisy_chain[] = | |
| 1547 | 1547 | { |
| 1548 | 1548 | { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 }, |
| 1549 | 1549 | { 0,0,0,0,-1 } |
| r1404 | r1405 | |
|---|---|---|
| 2 | 2 | ADDRESS_MAP_EXTERN(timeplt_sound_writemem); |
| 3 | 3 | ADDRESS_MAP_EXTERN(locomotn_sound_readmem); |
| 4 | 4 | ADDRESS_MAP_EXTERN(locomotn_sound_writemem); |
| 5 | extern struct AY8910interface timeplt_ay8910_interface; | |
| 5 | extern const struct AY8910interface timeplt_ay8910_interface; | |
| 6 | 6 | WRITE8_HANDLER( timeplt_sh_irqtrigger_w ); |
| r1404 | r1405 | |
|---|---|---|
| 791 | 791 | * |
| 792 | 792 | *************************************/ |
| 793 | 793 | |
| 794 | static struct YM2151interface ym2151_interface = | |
| 794 | static const struct YM2151interface ym2151_interface = | |
| 795 | 795 | { |
| 796 | 796 | atarigen_ym2151_irq_gen |
| 797 | 797 | }; |
| r1404 | r1405 | |
|---|---|---|
| 87 | 87 | #define SPORT_DATA_TX 0x48 |
| 88 | 88 | #define SPORT_DATA_RX 0x4c |
| 89 | 89 | |
| 90 | static const char *register_names[] = | |
| 90 | static const char *const register_names[] = | |
| 91 | 91 | { |
| 92 | 92 | "TMS32031-DMA global control", NULL, NULL, NULL, |
| 93 | 93 | "TMS32031-DMA source address", NULL, "TMS32031-DMA destination address", NULL, |
| r1404 | r1405 | |
| 590 | 590 | * |
| 591 | 591 | *************************************/ |
| 592 | 592 | |
| 593 | static struct tms32031_config cage_config = | |
| 593 | static const struct tms32031_config cage_config = | |
| 594 | 594 | { |
| 595 | 595 | 0x400000 |
| 596 | 596 | }; |
| r1404 | r1405 | |
|---|---|---|
| 11 | 11 | cpunum_set_input_line(1, 0, state); |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | static z80pio_interface pio_intf = | |
| 14 | static const z80pio_interface pio_intf = | |
| 15 | 15 | { |
| 16 | 16 | pio_interrupt, |
| 17 | 17 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | |
| 78 | struct AY8910interface cclimber_ay8910_interface = | |
| 78 | const struct AY8910interface cclimber_ay8910_interface = | |
| 79 | 79 | { |
| 80 | 80 | 0, |
| 81 | 81 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 412 | 412 | |
| 413 | 413 | READ8_HANDLER( ssio_input_port_r ) |
| 414 | 414 | { |
| 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" }; | |
| 416 | 416 | UINT8 result = readinputportbytag_safe(port[offset], 0xff); |
| 417 | 417 | if (ssio_custom_input[offset]) |
| 418 | 418 | result = (result & ~ssio_custom_input_mask[offset]) | |
| r1404 | r1405 | |
| 443 | 443 | |
| 444 | 444 | |
| 445 | 445 | /********* sound interfaces ***********/ |
| 446 | static struct AY8910interface ssio_ay8910_interface_1 = | |
| 446 | static const struct AY8910interface ssio_ay8910_interface_1 = | |
| 447 | 447 | { |
| 448 | 448 | 0, |
| 449 | 449 | 0, |
| r1404 | r1405 | |
| 451 | 451 | ssio_portb0_w |
| 452 | 452 | }; |
| 453 | 453 | |
| 454 | static struct AY8910interface ssio_ay8910_interface_2 = | |
| 454 | static const struct AY8910interface ssio_ay8910_interface_2 = | |
| 455 | 455 | { |
| 456 | 456 | 0, |
| 457 | 457 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 9 | 9 | }; |
| 10 | 10 | |
| 11 | 11 | |
| 12 | static struct gotya_sample gotya_samples[] = | |
| 12 | static const struct gotya_sample gotya_samples[] = | |
| 13 | 13 | { |
| 14 | 14 | { 0x01, 0, 0 }, |
| 15 | 15 | { 0x02, 1, 0 }, |
| r1404 | r1405 | |
|---|---|---|
| 233 | 233 | } |
| 234 | 234 | |
| 235 | 235 | |
| 236 | struct YM2151interface t5182_ym2151_interface = | |
| 236 | const struct YM2151interface t5182_ym2151_interface = | |
| 237 | 237 | { |
| 238 | 238 | t5182_ym2151_irq_handler |
| 239 | 239 | }; |
| r1404 | r1405 | |
|---|---|---|
| 264 | 264 | * |
| 265 | 265 | *************************************/ |
| 266 | 266 | |
| 267 | static struct sp0250_interface sp0250_interface = | |
| 267 | static const struct sp0250_interface sp0250_interface = | |
| 268 | 268 | { |
| 269 | 269 | speech_drq_w |
| 270 | 270 | }; |
| r1404 | r1405 | |
| 902 | 902 | * |
| 903 | 903 | *************************************/ |
| 904 | 904 | |
| 905 | static struct CustomSound_interface usb_custom_interface = | |
| 905 | static const struct CustomSound_interface usb_custom_interface = | |
| 906 | 906 | { |
| 907 | 907 | usb_start |
| 908 | 908 | }; |
| r1404 | r1405 | |
|---|---|---|
| 11 | 11 | |
| 12 | 12 | extern UINT8 *t5182_sharedram; |
| 13 | 13 | |
| 14 | extern struct YM2151interface t5182_ym2151_interface; | |
| 14 | extern const struct YM2151interface t5182_ym2151_interface; |
| r1404 | r1405 | |
|---|---|---|
| 751 | 751 | static double hd38880_speed; |
| 752 | 752 | |
| 753 | 753 | |
| 754 | static void rockola_speech_w(UINT8 data, UINT16 *table, int start) | |
| 754 | static void rockola_speech_w(UINT8 data, const UINT16 *table, int start) | |
| 755 | 755 | { |
| 756 | 756 | /* |
| 757 | 757 | bit description |
| r1404 | r1405 | |
| 894 | 894 | |
| 895 | 895 | WRITE8_HANDLER( vanguard_speech_w ) |
| 896 | 896 | { |
| 897 | static UINT16 vanguard_table[16] = | |
| 897 | static const UINT16 vanguard_table[16] = | |
| 898 | 898 | { |
| 899 | 899 | 0x04000, |
| 900 | 900 | 0x04325, |
| r1404 | r1405 | |
| 919 | 919 | |
| 920 | 920 | WRITE8_HANDLER( fantasy_speech_w ) |
| 921 | 921 | { |
| 922 | static UINT16 fantasy_table[16] = | |
| 922 | static const UINT16 fantasy_table[16] = | |
| 923 | 923 | { |
| 924 | 924 | 0x04000, |
| 925 | 925 | 0x04297, |
| r1404 | r1405 | |
|---|---|---|
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | |
| 101 | static struct AY8910interface irem_ay8910_interface_1 = | |
| 101 | static const struct AY8910interface irem_ay8910_interface_1 = | |
| 102 | 102 | { |
| 103 | 103 | soundlatch_r, |
| 104 | 104 | 0, |
| r1404 | r1405 | |
| 106 | 106 | irem_msm5205_w |
| 107 | 107 | }; |
| 108 | 108 | |
| 109 | static struct AY8910interface irem_ay8910_interface_2 = | |
| 109 | static const struct AY8910interface irem_ay8910_interface_2 = | |
| 110 | 110 | { |
| 111 | 111 | 0, |
| 112 | 112 | 0, |
| r1404 | r1405 | |
| 114 | 114 | 0 |
| 115 | 115 | }; |
| 116 | 116 | |
| 117 | static struct MSM5205interface irem_msm5205_interface_1 = | |
| 117 | static const struct MSM5205interface irem_msm5205_interface_1 = | |
| 118 | 118 | { |
| 119 | 119 | irem_adpcm_int, /* interrupt function */ |
| 120 | 120 | MSM5205_S96_4B /* default to 4KHz, but can be changed at run time */ |
| 121 | 121 | }; |
| 122 | 122 | |
| 123 | static struct MSM5205interface irem_msm5205_interface_2 = | |
| 123 | static const struct MSM5205interface irem_msm5205_interface_2 = | |
| 124 | 124 | { |
| 125 | 125 | 0, /* interrupt function */ |
| 126 | 126 | MSM5205_SEX_4B /* default to 4KHz, but can be changed at run time, slave */ |
| r1404 | r1405 | |
|---|---|---|
| 1265 | 1265 | * |
| 1266 | 1266 | *************************************/ |
| 1267 | 1267 | |
| 1268 | static const char *dkongjr_sample_names[] = | |
| 1268 | static const char *const dkongjr_sample_names[] = | |
| 1269 | 1269 | { |
| 1270 | 1270 | "*dkongjr", |
| 1271 | 1271 | "jump.wav", |
| r1404 | r1405 | |
| 1283 | 1283 | 0 /* end of array */ |
| 1284 | 1284 | }; |
| 1285 | 1285 | |
| 1286 | static struct Samplesinterface dkongjr_samples_interface = | |
| 1286 | static const struct Samplesinterface dkongjr_samples_interface = | |
| 1287 | 1287 | { |
| 1288 | 1288 | 8, /* 8 channels */ |
| 1289 | 1289 | dkongjr_sample_names |
| 1290 | 1290 | }; |
| 1291 | 1291 | |
| 1292 | static const char *radarsc1_sample_names[] = | |
| 1292 | static const char *const radarsc1_sample_names[] = | |
| 1293 | 1293 | { |
| 1294 | 1294 | "*radarsc1", |
| 1295 | 1295 | "10.wav", |
| r1404 | r1405 | |
| 1304 | 1304 | 0 /* end of array */ |
| 1305 | 1305 | }; |
| 1306 | 1306 | |
| 1307 | static struct Samplesinterface radarsc1_samples_interface = | |
| 1307 | static const struct Samplesinterface radarsc1_samples_interface = | |
| 1308 | 1308 | { |
| 1309 | 1309 | 8, /* 8 channels */ |
| 1310 | 1310 | radarsc1_sample_names |
| 1311 | 1311 | }; |
| 1312 | 1312 | |
| 1313 | static struct NESinterface nes_interface_1 = { REGION_CPU2 }; | |
| 1314 | static struct NESinterface nes_interface_2 = { REGION_CPU3 }; | |
| 1313 | static const struct NESinterface nes_interface_1 = { REGION_CPU2 }; | |
| 1314 | static const struct NESinterface nes_interface_2 = { REGION_CPU3 }; | |
| 1315 | 1315 | |
| 1316 | 1316 | /************************************* |
| 1317 | 1317 | * |
| r1404 | r1405 | |
|---|---|---|
| 260 | 260 | //cpunum_set_input_line(1, INPUT_LINE_RESET, ASSERT_LINE); |
| 261 | 261 | } |
| 262 | 262 | |
| 263 | struct ES5505interface es5505_interface = | |
| 263 | const struct ES5505interface es5505_interface = | |
| 264 | 264 | { |
| 265 | 265 | REGION_SOUND1, /* Bank 0: Unused by F3 games? */ |
| 266 | 266 | REGION_SOUND1, /* Bank 1: All games seem to use this */ |
| r1404 | r1405 | |
|---|---|---|
| 25 | 25 | |
| 26 | 26 | ADDRESS_MAP_EXTERN(f3_sound_map); |
| 27 | 27 | |
| 28 | extern struct ES5505interface es5505_interface; | |
| 28 | extern const struct ES5505interface es5505_interface; |
| r1404 | r1405 | |
|---|---|---|
| 76 | 76 | |
| 77 | 77 | #define SEIBU_SOUND_SYSTEM_YM3812_HARDWARE \ |
| 78 | 78 | \ |
| 79 | static struct YM3812interface ym3812_interface = | |
| 79 | static const struct YM3812interface ym3812_interface = | |
| 80 | 80 | { \ |
| 81 | 81 | seibu_ym3812_irqhandler \ |
| 82 | 82 | }; |
| 83 | 83 | |
| 84 | 84 | #define SEIBU_SOUND_SYSTEM_ADPCM_HARDWARE \ |
| 85 | 85 | \ |
| 86 | static struct CustomSound_interface adpcm_interface = | |
| 86 | static const struct CustomSound_interface adpcm_interface = | |
| 87 | 87 | { \ |
| 88 | 88 | seibu_adpcm_start, \ |
| 89 | 89 | seibu_adpcm_stop \ |
| r1404 | r1405 | |
| 91 | 91 | |
| 92 | 92 | #define SEIBU_SOUND_SYSTEM_YM2151_HARDWARE \ |
| 93 | 93 | \ |
| 94 | static struct YM2151interface ym2151_interface = | |
| 94 | static const struct YM2151interface ym2151_interface = | |
| 95 | 95 | { \ |
| 96 | 96 | seibu_ym2151_irqhandler \ |
| 97 | 97 | }; |
| 98 | 98 | |
| 99 | 99 | #define SEIBU_SOUND_SYSTEM_YM2203_HARDWARE \ |
| 100 | 100 | \ |
| 101 | static struct YM2203interface ym2203_interface = | |
| 101 | static const struct YM2203interface ym2203_interface = | |
| 102 | 102 | { \ |
| 103 | 103 | 0,0,0,0,seibu_ym2203_irqhandler \ |
| 104 | 104 | }; |
| r1404 | r1405 | |
|---|---|---|
| 418 | 418 | }; |
| 419 | 419 | |
| 420 | 420 | |
| 421 | static struct CustomSound_interface sega005_custom_interface = | |
| 421 | static const struct CustomSound_interface sega005_custom_interface = | |
| 422 | 422 | { |
| 423 | 423 | sega005_custom_start |
| 424 | 424 | }; |
| r1404 | r1405 | |
| 782 | 782 | }; |
| 783 | 783 | |
| 784 | 784 | |
| 785 | static struct TMS36XXinterface monsterb_tms3617_interface = | |
| 785 | static const struct TMS36XXinterface monsterb_tms3617_interface = | |
| 786 | 786 | { |
| 787 | 787 | TMS3617, |
| 788 | 788 | {0.5,0.5,0.5,0.5,0.5,0.5} /* decay times of voices */ |
| r1404 | r1405 | |
|---|---|---|
| 158 | 158 | ****************************************************************************/ |
| 159 | 159 | |
| 160 | 160 | /* YM2151 structure (CVSD variant) */ |
| 161 | static struct YM2151interface cvsd_ym2151_interface = | |
| 161 | static const struct YM2151interface cvsd_ym2151_interface = | |
| 162 | 162 | { |
| 163 | 163 | cvsd_ym2151_irq |
| 164 | 164 | }; |
| 165 | 165 | |
| 166 | 166 | |
| 167 | 167 | /* YM2151 structure (ADPCM variant) */ |
| 168 | static struct YM2151interface adpcm_ym2151_interface = | |
| 168 | static const struct YM2151interface adpcm_ym2151_interface = | |
| 169 | 169 | { |
| 170 | 170 | adpcm_ym2151_irq |
| 171 | 171 | }; |
| r1404 | r1405 | |
|---|---|---|
| 24 | 24 | void namcoc7x_set_host_ram(UINT32 *hostram); |
| 25 | 25 | |
| 26 | 26 | #define NAMCO_C7X_HARDWARE \ |
| 27 | static struct C352interface namcoc7x_c352_interface = \ | |
| 27 | static const struct C352interface namcoc7x_c352_interface = \ | |
| 28 | 28 | { \ |
| 29 | 29 | REGION_SOUND1 \ |
| 30 | 30 | }; |
| r1404 | r1405 | |
|---|---|---|
| 36 | 36 | /* Bit 7 comes from the QA output of the LS90 producing a sequence of */ |
| 37 | 37 | /* 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 */ |
| 38 | 38 | |
| 39 | static int scramble_timer[10] = | |
| 39 | static const int scramble_timer[10] = | |
| 40 | 40 | { |
| 41 | 41 | 0x00, 0x10, 0x20, 0x30, 0x40, 0x90, 0xa0, 0xb0, 0xa0, 0xd0 |
| 42 | 42 | }; |
| r1404 | r1405 | |
| 78 | 78 | /* Bit 7 comes from the QA output of the LS90 producing a sequence of */ |
| 79 | 79 | /* 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 */ |
| 80 | 80 | |
| 81 | static int frogger_timer[10] = | |
| 81 | static const int frogger_timer[10] = | |
| 82 | 82 | { |
| 83 | 83 | 0x00, 0x10, 0x08, 0x18, 0x40, 0x90, 0x88, 0x98, 0x88, 0xd0 |
| 84 | 84 | }; |
| r1404 | r1405 | |
|---|---|---|
| 15 | 15 | #define BERZERK_AUDIO_DEBUG (0) |
| 16 | 16 | |
| 17 | 17 | |
| 18 | static struct S14001A_interface berzerk_s14001a_interface = | |
| 18 | static const struct S14001A_interface berzerk_s14001a_interface = | |
| 19 | 19 | { |
| 20 | 20 | REGION_SOUND1 /* voice data region */ |
| 21 | 21 | }; |
| 22 | 22 | |
| 23 | 23 | |
| 24 | static struct CustomSound_interface custom_interface = | |
| 24 | static const struct CustomSound_interface custom_interface = | |
| 25 | 25 | { |
| 26 | 26 | berzerk_sh_start |
| 27 | 27 | }; |
| r1404 | r1405 | |
|---|---|---|
| 26 | 26 | #define POLEPOS_R167_SHUNT 1.0/(1.0/POLEPOS_R166 + 1.0/250) |
| 27 | 27 | #define POLEPOS_R168_SHUNT 1.0/(1.0/POLEPOS_R166 + 1.0/250) |
| 28 | 28 | |
| 29 | static double volume_table[8] = | |
| 29 | static const double volume_table[8] = | |
| 30 | 30 | { |
| 31 | 31 | (POLEPOS_R168_SHUNT + POLEPOS_R167_SHUNT + POLEPOS_R166_SHUNT + 2200) / 10000, |
| 32 | 32 | (POLEPOS_R168_SHUNT + POLEPOS_R167_SHUNT + POLEPOS_R166 + 2200) / 10000, |
| r1404 | r1405 | |
| 40 | 40 | |
| 41 | 41 | static filter2_context filter_engine[3]; |
| 42 | 42 | |
| 43 | static double r_filt_out[3] = {RES_K(4.7), RES_K(7.5), RES_K(10)}; | |
| 44 | static double r_filt_total = 1.0 / (1.0/RES_K(4.7) + 1.0/RES_K(7.5) + 1.0/RES_K(10)); | |
| 43 | static const double r_filt_out[3] = {RES_K(4.7), RES_K(7.5), RES_K(10)}; | |
| 44 | static const double r_filt_total = 1.0 / (1.0/RES_K(4.7) + 1.0/RES_K(7.5) + 1.0/RES_K(10)); | |
| 45 | 45 | |
| 46 | 46 | /************************************/ |
| 47 | 47 | /* Stream updater */ |
| r1404 | r1405 | |
|---|---|---|
| 86 | 86 | 0 /* VEE */ |
| 87 | 87 | }; |
| 88 | 88 | |
| 89 | static discrete_dac_r1_ladder tank8_dac = | |
| 89 | static const discrete_dac_r1_ladder tank8_dac = | |
| 90 | 90 | { |
| 91 | 91 | 1, |
| 92 | 92 | {RES_K(4.7)}, // R89 |
| r1404 | r1405 | |
|---|---|---|
| 21 | 21 | /* Bit 3 comes from the QA output of the LS90 producing a sequence of */ |
| 22 | 22 | /* 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 */ |
| 23 | 23 | |
| 24 | static int gyruss_timer[10] = | |
| 24 | static const int gyruss_timer[10] = | |
| 25 | 25 | { |
| 26 | 26 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x09, 0x0a, 0x0b, 0x0a, 0x0d |
| 27 | 27 | }; |
| r1404 | r1405 | |
|---|---|---|
| 28 | 28 | static UINT8 tone_pointer; |
| 29 | 29 | static UINT8 tone_offset; |
| 30 | 30 | |
| 31 | static UINT8 tone_prom[32] = | |
| 31 | static const UINT8 tone_prom[32] = | |
| 32 | 32 | { |
| 33 | 33 | 0xE5,0xE5,0xED,0xED,0xE5,0xE5,0xED,0xED,0xE7,0xE7,0xEF,0xEF,0xE7,0xE7,0xEF,0xEF, |
| 34 | 34 | 0xC1,0xE1,0xC9,0xE9,0xC5,0xE5,0xCD,0xED,0xC3,0xE3,0xCB,0xEB,0xC7,0xE7,0xCF,0xEF |
| r1404 | r1405 | |
|---|---|---|
| 877 | 877 | SCU DSP Disassembler |
| 878 | 878 | |
| 879 | 879 | ************************************************************************/ |
| 880 | static const char* ALU_Commands[] = | |
| 880 | static const char *const ALU_Commands[] = | |
| 881 | 881 | { |
| 882 | 882 | "", /* 0000 */ |
| 883 | 883 | "AND", /* 0001 */ |
| r1404 | r1405 | |
| 897 | 897 | "RL8", /* 1111 */ |
| 898 | 898 | }; |
| 899 | 899 | |
| 900 | static const char* X_Commands[] = | |
| 900 | static const char *const X_Commands[] = | |
| 901 | 901 | { |
| 902 | 902 | "", /* 000 */ |
| 903 | 903 | "", /* 001 */ /* NOP? check instruction @ 0x0B */ |
| r1404 | r1405 | |
| 906 | 906 | "MOV %s,X", /* 100 */ |
| 907 | 907 | }; |
| 908 | 908 | |
| 909 | static const char* Y_Commands[] = | |
| 909 | static const char *const Y_Commands[] = | |
| 910 | 910 | { |
| 911 | 911 | "", /* 000 */ |
| 912 | 912 | "CLR A", /* 001 */ |
| r1404 | r1405 | |
| 915 | 915 | "MOV %s,Y", /* 100 */ |
| 916 | 916 | }; |
| 917 | 917 | |
| 918 | static const char* D1_Commands[] = | |
| 918 | static const char *const D1_Commands[] = | |
| 919 | 919 | { |
| 920 | 920 | "", /* 00 */ |
| 921 | 921 | "MOV %I8,%d", /* 01 */ |
| r1404 | r1405 | |
| 923 | 923 | "MOV %S,%d", /* 11 */ |
| 924 | 924 | }; |
| 925 | 925 | |
| 926 | static const char* SourceMemory[] = | |
| 926 | static const char *const SourceMemory[] = | |
| 927 | 927 | { |
| 928 | 928 | "M0", /* 000 */ |
| 929 | 929 | "M1", /* 001 */ |
| r1404 | r1405 | |
| 935 | 935 | "MC3", /* 111 */ |
| 936 | 936 | }; |
| 937 | 937 | |
| 938 | static const char* SourceMemory2[] = | |
| 938 | static const char *const SourceMemory2[] = | |
| 939 | 939 | { |
| 940 | 940 | "M0", /* 0000 */ |
| 941 | 941 | "M1", /* 0001 */ |
| r1404 | r1405 | |
| 955 | 955 | "???", /* 1111 */ |
| 956 | 956 | }; |
| 957 | 957 | |
| 958 | static const char* DestMemory[] = | |
| 958 | static const char *const DestMemory[] = | |
| 959 | 959 | { |
| 960 | 960 | "MC0", /* 0000 */ |
| 961 | 961 | "MC1", /* 0001 */ |
| r1404 | r1405 | |
| 975 | 975 | "CT3", /* 1111 */ |
| 976 | 976 | }; |
| 977 | 977 | |
| 978 | static const char* DestDMAMemory[] = | |
| 978 | static const char *const DestDMAMemory[] = | |
| 979 | 979 | { |
| 980 | 980 | "M0", /* 000 */ |
| 981 | 981 | "M1", /* 001 */ |
| r1404 | r1405 | |
| 987 | 987 | "???", /* 111 */ |
| 988 | 988 | }; |
| 989 | 989 | |
| 990 | static const char* MVI_Command[] = | |
| 990 | static const char *const MVI_Command[] = | |
| 991 | 991 | { |
| 992 | 992 | "MVI %I,%d", /* 0 */ |
| 993 | 993 | "MVI %I,%d,%f", /* 1 */ |
| 994 | 994 | }; |
| 995 | 995 | |
| 996 | static const char* JMP_Command[] = | |
| 996 | static const char *const JMP_Command[] = | |
| 997 | 997 | { |
| 998 | 998 | "JMP %IA", |
| 999 | 999 | "JMP %f,%IA", |
| 1000 | 1000 | }; |
| 1001 | 1001 | |
| 1002 | static const char* DMA_Command[] = | |
| 1002 | static const char *const DMA_Command[] = | |
| 1003 | 1003 | { |
| 1004 | 1004 | "DMA%H%A D0,%M,%I", |
| 1005 | 1005 | "DMA%H%A %s,D0,%I", |
| r1404 | r1405 | |
|---|---|---|
| 229 | 229 | } |
| 230 | 230 | |
| 231 | 231 | #if LOG_AKIKO |
| 232 | static const char* akiko_reg_names[] = | |
| 232 | static const char *const akiko_reg_names[] = | |
| 233 | 233 | { |
| 234 | 234 | /*0*/ "ID", |
| 235 | 235 | /*1*/ "CDROM STATUS 1", |
| r1404 | r1405 | |
|---|---|---|
| 587 | 587 | |
| 588 | 588 | static void fm_voices_update(void) |
| 589 | 589 | { |
| 590 | static int ym2203_registers[0x18] = | |
| 590 | static const int ym2203_registers[0x18] = | |
| 591 | 591 | { |
| 592 | 592 | 0x30,0x38,0x34,0x3C,0x40,0x48,0x44,0x4C,0x50,0x58,0x54,0x5C,0x60,0x68,0x64,0x6C, |
| 593 | 593 | 0x70,0x78,0x74,0x7C,0x80,0x88,0x84,0x8C |
| r1404 | r1405 | |
| 896 | 896 | |
| 897 | 897 | static void get_command(void) |
| 898 | 898 | { |
| 899 | static UINT8 from_main[] = | |
| 899 | static const UINT8 from_main[] = | |
| 900 | 900 | { |
| 901 | 901 | 0x00,0x22,0x62,0x8c,0xc7,0x00,0x00,0x3f,0x7f,0x89,0xc7,0x00,0x00,0x2b,0x6b |
| 902 | 902 | }; |
| 903 | static UINT8 to_main[] = | |
| 903 | static const UINT8 to_main[] = | |
| 904 | 904 | { |
| 905 | 905 | 0x82,0xc7,0x00,0x2c,0x6c,0x00,0x9f,0xc7,0x00,0x29,0x69,0x00,0x8b,0xc7,0x00 |
| 906 | 906 | }; |
| r1404 | r1405 | |
| 1019 | 1019 | |
| 1020 | 1020 | static TIMER_CALLBACK( real_nmk004_init ) |
| 1021 | 1021 | { |
| 1022 | static UINT8 ym2203_init[] = | |
| 1022 | static const UINT8 ym2203_init[] = | |
| 1023 | 1023 | { |
| 1024 | 1024 | 0x07,0x38,0x08,0x00,0x09,0x00,0x0A,0x00,0x24,0xB3,0x25,0x00,0x26,0xF9,0x27,0x15, |
| 1025 | 1025 | 0x28,0x00,0x28,0x01,0x28,0x02,0x40,0x00,0x41,0x00,0x42,0x00,0x44,0x00,0x45,0x00, |
| r1404 | r1405 | |
|---|---|---|
| 6323 | 6323 | int s7,s6,s5,s4,s3,s2,s1,s0; |
| 6324 | 6324 | }; |
| 6325 | 6325 | |
| 6326 | static UINT8 basetable_fd1089[0x100] = | |
| 6326 | static const UINT8 basetable_fd1089[0x100] = | |
| 6327 | 6327 | { |
| 6328 | 6328 | 0x00,0x1c,0x75,0x69,0x5d,0x41,0x24,0x38,0x4b,0x67,0xae,0x82,0xea,0xc6,0x03,0x2f, |
| 6329 | 6329 | 0x46,0x6a,0xaf,0x83,0xe7,0xcb,0x02,0x2e,0x01,0x1d,0x78,0x64,0x5c,0x40,0x29,0x35, |
| r1404 | r1405 | |
| 6345 | 6345 | |
| 6346 | 6346 | |
| 6347 | 6347 | /* common to FD1089A and FD1089B */ |
| 6348 | static struct parameters addr_params[16] = | |
| 6348 | static const struct parameters addr_params[16] = | |
| 6349 | 6349 | { |
| 6350 | 6350 | { 0x26, 3,1,7,5,2,4,6,0 }, |
| 6351 | 6351 | { 0x08, 6,7,4,2,0,5,1,3 }, |
| r1404 | r1405 | |
| 6368 | 6368 | |
| 6369 | 6369 | static int decode_fd1089a(int val,int table,int opcode) |
| 6370 | 6370 | { |
| 6371 | static struct parameters data_params[16] = | |
| 6371 | static const struct parameters data_params[16] = | |
| 6372 | 6372 | { |
| 6373 | 6373 | { 0x94, 7,6,4,2,1,5,0,3 }, |
| 6374 | 6374 | { 0x3f, 7,3,1,2,4,6,0,5 }, |
| r1404 | r1405 | |
| 6387 | 6387 | { 0x71, 4,3,7,1,5,6,0,2 }, |
| 6388 | 6388 | { 0x57, 6,4,7,2,0,5,3,1 }, |
| 6389 | 6389 | }; |
| 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; | |
| 6392 | 6392 | int family = table & 0x0e; |
| 6393 | 6393 | |
| 6394 | 6394 | |
| r1404 | r1405 | |
| 6445 | 6445 | |
| 6446 | 6446 | static int decode_fd1089b(int val,int table,int opcode) |
| 6447 | 6447 | { |
| 6448 | struct parameters *p = &addr_params[table >> 4]; | |
| 6448 | const struct parameters *p = &addr_params[table >> 4]; | |
| 6449 | 6449 | |
| 6450 | 6450 | |
| 6451 | 6451 | /* special case - don't decrypt */ |
| r1404 | r1405 | |
|---|---|---|
| 254 | 254 | } |
| 255 | 255 | |
| 256 | 256 | /* RP5H01 interface */ |
| 257 | static struct RP5H01_interface rp5h01_interface = | |
| 257 | static const struct RP5H01_interface rp5h01_interface = | |
| 258 | 258 | { |
| 259 | 259 | 1, |
| 260 | 260 | { REGION_USER1 }, |
| r1404 | r1405 | |
|---|---|---|
| 116 | 116 | 0x060427FC (1st) (resets the sh2) |
| 117 | 117 | 0x0603B1B2 (1st) (crashes the sh2) |
| 118 | 118 | */ |
| 119 | static UINT32 vector_prot[] = { 0x0603B1B2,0x234 }; | |
| 119 | static const UINT32 vector_prot[] = { 0x0603B1B2,0x234 }; | |
| 120 | 120 | |
| 121 | 121 | static READ32_HANDLER( a_bus_ctrl_r ) |
| 122 | 122 | { |
| r1404 | r1405 | |
|---|---|---|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | |
| 66 | static UINT8 tokio_prot_data[] = | |
| 66 | static const UINT8 tokio_prot_data[] = | |
| 67 | 67 | { |
| 68 | 68 | 0x6c, |
| 69 | 69 | 0x7f,0x5f,0x7f,0x6f,0x5f,0x77,0x5f,0x7f,0x5f,0x7f,0x5f,0x7f,0x5b,0x7f,0x5f,0x7f, |
| r1404 | r1405 | |
| 337 | 337 | |
| 338 | 338 | WRITE8_HANDLER( boblbobl_ic43_b_w ) |
| 339 | 339 | { |
| 340 | static int xor[4] = { 4, 1, 8, 2 }; | |
| 340 | static const int xor[4] = { 4, 1, 8, 2 }; | |
| 341 | 341 | |
| 342 | 342 | // logerror("%04x: ic43_b_w (offs %d) %02x\n",activecpu_get_pc(),offset,data); |
| 343 | 343 | ic43_b = (data >> 4) ^ xor[offset]; |
| r1404 | r1405 | |
|---|---|---|
| 320 | 320 | |
| 321 | 321 | |
| 322 | 322 | #ifdef UNUSED_FUNCTION |
| 323 | static UINT8 dfront_tab[256] = { | |
| 323 | static const UINT8 dfront_tab[256] = { | |
| 324 | 324 | 0x51, 0xc4, 0xe3, 0x10, 0x1c, 0xad, 0x8a, 0x39, 0x8c, 0xe0, 0xa5, 0x04, 0x0f, 0xe4, 0x35, 0xc3, |
| 325 | 325 | 0x2d, 0x6b, 0x32, 0xe2, 0x60, 0x54, 0x63, 0x06, 0xa3, 0xf1, 0x0b, 0x5f, 0x6c, 0x5c, 0xb3, 0xec, |
| 326 | 326 | 0x77, 0x61, 0x69, 0xe7, 0x3c, 0xb7, 0x42, 0x72, 0x1a, 0x70, 0xb0, 0x96, 0xa4, 0x28, 0xc0, 0xfb, |
| r1404 | r1405 | |
| 380 | 380 | } |
| 381 | 381 | |
| 382 | 382 | |
| 383 | static UINT8 ddp2_tab[256] = { | |
| 383 | static const UINT8 ddp2_tab[256] = { | |
| 384 | 384 | 0x2a, 0x4a, 0x39, 0x98, 0xac, 0x39, 0xb2, 0x55, 0x72, 0xf3, 0x7b, 0x3c, 0xee, 0x94, 0x6e, 0xd5, |
| 385 | 385 | 0xcd, 0xbc, 0x9a, 0xd0, 0x45, 0x7d, 0x49, 0x68, 0xb1, 0x61, 0x54, 0xef, 0xa2, 0x84, 0x29, 0x20, |
| 386 | 386 | 0x32, 0x52, 0x82, 0x04, 0x38, 0x69, 0x9f, 0x24, 0x46, 0xf4, 0x3f, 0xc2, 0xf1, 0x25, 0xac, 0x2d, |
| r1404 | r1405 | |
| 435 | 435 | #endif |
| 436 | 436 | |
| 437 | 437 | |
| 438 | static UINT8 mm_tab[256] = { | |
| 438 | static const UINT8 mm_tab[256] = { | |
| 439 | 439 | 0xd0, 0x45, 0xbc, 0x84, 0x93, 0x60, 0x7d, 0x49, 0x68, 0xb1, 0x54, 0xa2, 0x05, 0x29, 0x41, 0x20, |
| 440 | 440 | 0x04, 0x08, 0x52, 0x25, 0x89, 0xf4, 0x69, 0x9f, 0x24, 0x46, 0x3d, 0xf1, 0xf9, 0xab, 0xa6, 0x2d, |
| 441 | 441 | 0x18, 0x19, 0x6d, 0x33, 0x79, 0x23, 0x3b, 0x1d, 0xe0, 0xb8, 0x61, 0x1a, 0xe1, 0x4c, 0x5d, 0x3f, |
| r1404 | r1405 | |
|---|---|---|
| 83 | 83 | #if 0 // simulation |
| 84 | 84 | READ16_HANDLER(ga2_sprite_protection_r) |
| 85 | 85 | { |
| 86 | static UINT | |
| 86 | static const UINT16 prot[16] = | |
| 87 | 87 | { |
| 88 | 88 | 0x0a, 0, |
| 89 | 89 | 0xc5, 0, |
| r1404 | r1405 | |
| 100 | 100 | |
| 101 | 101 | READ16_HANDLER(ga2_wakeup_protection_r) |
| 102 | 102 | { |
| 103 | static const char | |
| 103 | static const char | |
| 104 | 104 | "wake up! GOLDEN AXE The Revenge of Death-Adder! "; |
| 105 | 105 | return prot[offset]; |
| 106 | 106 | } |
| r1404 | r1405 | |
| 310 | 310 | |
| 311 | 311 | READ16_HANDLER(arf_wakeup_protection_r) |
| 312 | 312 | { |
| 313 | static const char | |
| 313 | static const char | |
| 314 | 314 | "wake up! ARF! "; |
| 315 | 315 | return prot[offset]; |
| 316 | 316 | } |
| r1404 | r1405 | |
|---|---|---|
| 54 | 54 | extern WRITE8_HANDLER(equites_dac1_w); |
| 55 | 55 | |
| 56 | 56 | extern UINT16 *equites_8404ram; |
| 57 | extern struct MSM5232interface equites_5232intf; | |
| 58 | extern struct AY8910interface equites_8910intf; | |
| 57 | extern struct const MSM5232interface equites_5232intf; | |
| 58 | extern struct const AY8910interface equites_8910intf; | |
| 59 | 59 | |
| 60 | 60 | static ADDRESS_MAP_START( equites_s_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 61 | 61 | { 0x0000, 0xbfff, MRA8_ROM }, // sound program |
| r1404 | r1405 | |
| 92 | 92 | /******************************************************************************/ |
| 93 | 93 | // Locals |
| 94 | 94 | |
| 95 | static UINT16 e_ent_addr[8][4] = | |
| 95 | static const UINT16 e_ent_addr[8][4] = | |
| 96 | 96 | { |
| 97 | 97 | {0xce25, 0xcd3c, 0xcd89, 0xcdd5}, |
| 98 | 98 | { 0, 0xce6e, 0xcebe, 0xcff2}, |
| r1404 | r1405 | |
| 104 | 104 | { 0, 0, 0, 0}, |
| 105 | 105 | }; |
| 106 | 106 | |
| 107 | static UINT16 e_exit_pos[8][4] = | |
| 107 | static const UINT16 e_exit_pos[8][4] = | |
| 108 | 108 | { |
| 109 | 109 | {0x1878, 0x4878, 0x7878, 0x3878}, |
| 110 | 110 | { 0, 0x3878, 0x4878, 0x4878}, |
| r1404 | r1405 | |
| 116 | 116 | { 0, 0, 0, 0}, |
| 117 | 117 | }; |
| 118 | 118 | |
| 119 | static UINT16 e_swap_addr[4][4] = | |
| 119 | static const UINT16 e_swap_addr[4][4] = | |
| 120 | 120 | { |
| 121 | 121 | { 0, 0x92ec, 0, 0x92ec}, |
| 122 | 122 | { 0, 0x92ec, 0, 0x92ec}, |
| r1404 | r1405 | |
| 124 | 124 | { 0, 0x92d2, 0, 0x92d2}, |
| 125 | 125 | }; |
| 126 | 126 | |
| 127 | static UINT16 e_respawn_addr[4][4] = | |
| 127 | static const UINT16 e_respawn_addr[4][4] = | |
| 128 | 128 | { |
| 129 | 129 | { 0, 0x9382, 0, 0x9382}, |
| 130 | 130 | { 0, 0x9382, 0, 0x9382}, |
| r1404 | r1405 | |
| 132 | 132 | { 0, 0x0cc8, 0, 0x9382}, |
| 133 | 133 | }; |
| 134 | 134 | |
| 135 | static UINT16 h_respawn_addr[2][4] = | |
| 135 | static const UINT16 h_respawn_addr[2][4] = | |
| 136 | 136 | { |
| 137 | 137 | {0x1026, 0x0fb6, 0x0fb6, 0x0fb6}, |
| 138 | 138 | {0x11ac, 0x20b0, 0x1c44, 0x1996}, |
| 139 | 139 | }; |
| 140 | 140 | |
| 141 | static UINT16 s_respawn_addr[3][6] = | |
| 141 | static const UINT16 s_respawn_addr[3][6] = | |
| 142 | 142 | { |
| 143 | 143 | {0x0b6a, 0x0b52, 0x29da, 0x0846, 0x1610, 0x0c84}, // game over seq |
| 144 | 144 | {0x347e, 0x0e10, 0x0c2c, 0x0c2c, 0x0c2c, 0x0c2c}, // depth seq |
| 145 | 145 | {0x0c2e, 0x1fbe, 0x166a, 0x0c84, 0x0c2c, 0x0c2c}, // level change seq |
| 146 | 146 | }; |
| 147 | 147 | |
| 148 | static UINT16 s_lvdata_addr[6] = {0xccc2, 0xd04a, 0xd408, 0xd796, 0xdaa8, 0xdbd6}; | |
| 148 | static const UINT16 s_lvdata_addr[6] = {0xccc2, 0xd04a, 0xd408, 0xd796, 0xdaa8, 0xdbd6}; | |
| 149 | 149 | |
| 150 | static UINT16 s_objdata_addr[6] = {0xb7ce, 0xba64, 0xbdbc, 0xc0f2, 0xc446, 0xc810}; | |
| 150 | static const UINT16 s_objdata_addr[6] = {0xb7ce, 0xba64, 0xbdbc, 0xc0f2, 0xc446, 0xc810}; | |
| 151 | 151 | |
| 152 | static UINT8 s_spawn_list[8] = {0x07, 0x08, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26}; | |
| 152 | static const UINT8 s_spawn_list[8] = {0x07, 0x08, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26}; | |
| 153 | 153 | |
| 154 | static UINT8 s_pow_list[8] = {0, 0, 2, 2, 2, 2, 2, 1}; | |
| 154 | static const UINT8 s_pow_list[8] = {0, 0, 2, 2, 2, 2, 2, 1}; | |
| 155 | 155 | |
| 156 | 156 | static struct MRULE |
| 157 | 157 | { |
| r1404 | r1405 | |
| 428 | 428 | /******************************************************************************/ |
| 429 | 429 | // Alpha "Soundboard 7" Chip Definitions |
| 430 | 430 | |
| 431 | struct MSM5232interface equites_5232intf = | |
| 431 | const struct MSM5232interface equites_5232intf = | |
| 432 | 432 | { |
| 433 | 433 | { 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 |
| 434 | 434 | }; |
| 435 | 435 | |
| 436 | struct AY8910interface equites_8910intf = | |
| 436 | const struct AY8910interface equites_8910intf = | |
| 437 | 437 | { |
| 438 | 438 | 0, |
| 439 | 439 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 7 | 7 | #include "driver.h" |
| 8 | 8 | #include "copsnrob.h" |
| 9 | 9 | |
| 10 | static int gun_mask[] = {0x7e, 0x7d, 0x7b, 0x77, 0x6f, 0x5f, 0x3f}; | |
| 10 | static const int gun_mask[] = {0x7e, 0x7d, 0x7b, 0x77, 0x6f, 0x5f, 0x3f}; | |
| 11 | 11 | |
| 12 | 12 | // The gun control is a 7 position switch. I'm doing the following to |
| 13 | 13 | // emulate it: |
| r1404 | r1405 | |
|---|---|---|
| 24 | 24 | static UINT32 dsp_addr_w, main_ram_seg; |
| 25 | 25 | |
| 26 | 26 | #if LOG_DSP_CALLS |
| 27 | ||
| 27 | ||
| 28 | 28 | #endif |
| 29 | 29 | |
| 30 | 30 | UINT8 *twincobr_sharedram; |
| r1404 | r1405 | |
|---|---|---|
| 414 | 414 | static WRITE16_HANDLER ( cthd2003_bankswitch_w ) |
| 415 | 415 | { |
| 416 | 416 | int bankaddress; |
| 417 | static int cthd2003_banks[8] = | |
| 417 | static const int cthd2003_banks[8] = | |
| 418 | 418 | { |
| 419 | 419 | 1,0,1,0,1,0,3,2, |
| 420 | 420 | }; |
| r1404 | r1405 | |
|---|---|---|
| 72 | 72 | UINT8 dcs_cpu; |
| 73 | 73 | UINT8 shuffle_type; |
| 74 | 74 | UINT8 shuffle_active; |
| 75 | UINT8 * shuffle_map; | |
| 75 | const UINT8 * shuffle_map; | |
| 76 | 76 | void (*irq_callback)(int); |
| 77 | 77 | UINT8 irq_state; |
| 78 | 78 | UINT16 sound_irq_state; |
| r1404 | r1405 | |
| 589 | 589 | |
| 590 | 590 | void midway_ioasic_init(int shuffle, int upper, int yearoffs, void (*irq_callback)(int)) |
| 591 | 591 | { |
| 592 | static UINT8 shuffle_maps[][16] = | |
| 592 | static const UINT8 shuffle_maps[][16] = | |
| 593 | 593 | { |
| 594 | 594 | { 0x0,0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8,0x9,0xa,0xb,0xc,0xd,0xe,0xf }, /* WarGods, WG3DH, SFRush, MK4 */ |
| 595 | 595 | { 0x4,0x5,0x6,0x7,0xb,0xa,0x9,0x8,0x3,0x2,0x1,0x0,0xf,0xe,0xd,0xc }, /* Blitz, Blitz99 */ |
| r1404 | r1405 | |
|---|---|---|
| 920 | 920 | static void konamigx_precache_registers(void) |
| 921 | 921 | { |
| 922 | 922 | // (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}; | |
| 925 | 925 | int i; |
| 926 | 926 | |
| 927 | 927 | K053246_objset1 = K053246_read_register(5); |
| r1404 | r1405 | |
| 1232 | 1232 | tilemap *sub2, int sub2flags, |
| 1233 | 1233 | int mixerflags) |
| 1234 | 1234 | { |
| 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 }; | |
| 1237 | 1237 | static int parity = 0; |
| 1238 | 1238 | |
| 1239 | 1239 | int objbuf[GX_MAX_OBJECTS]; |
| r1404 | r1405 | |
| 2049 | 2049 | { |
| 2050 | 2050 | |
| 2051 | 2051 | // hand-filled but should be close |
| 2052 | static UINT8 ztable[7][8] = | |
| 2052 | static const UINT8 ztable[7][8] = | |
| 2053 | 2053 | { |
| 2054 | 2054 | {5,4,3,2,1,7,6,0}, |
| 2055 | 2055 | {4,3,2,1,0,7,6,5}, |
| r1404 | r1405 | |
| 2060 | 2060 | {5,4,3,2,1,7,6,0} |
| 2061 | 2061 | }; |
| 2062 | 2062 | |
| 2063 | static UINT8 ptable[7][8] = | |
| 2063 | static const UINT8 ptable[7][8] = | |
| 2064 | 2064 | { |
| 2065 | 2065 | {0x00,0x00,0x00,0x10,0x20,0x00,0x00,0x30}, |
| 2066 | 2066 | {0x20,0x20,0x20,0x20,0x20,0x00,0x20,0x20}, |
| r1404 | r1405 | |
| 2074 | 2074 | INT32 data1, data2, i, j, vpos, hpos, voffs, hoffs, vcorr, hcorr, vmask, hmask, magicid; |
| 2075 | 2075 | UINT32 *src, *srcend, *obj, *objend; |
| 2076 | 2076 | UINT16 *dst; |
| 2077 | UINT8 *zcode, *pcode; | |
| 2077 | const UINT8 *zcode, *pcode; | |
| 2078 | 2078 | |
| 2079 | 2079 | if (!count || !srcbase) return; |
| 2080 | 2080 |
| r1404 | r1405 | |
|---|---|---|
| 129 | 129 | |
| 130 | 130 | static int daikaiju_buffer[256]; |
| 131 | 131 | |
| 132 | static int xortable[]= | |
| 132 | static const int xortable[]= | |
| 133 | 133 | { |
| 134 | 134 | 0xF5, 0xD5, 0x6A, 0x26, 0x00, 0x29, 0x29, 0x29, 0x29, 0x29, 0x29, 0x16, 0x00, 0xCB, 0x23, 0x19, |
| 135 | 135 | 0x11, 0x00, 0xC0, 0x19, 0xD1, 0xF1, 0xC9, -1 |
| r1404 | r1405 | |
|---|---|---|
| 277 | 277 | verified on Namco original hardware, but they are the same in all the bootlegs, |
| 278 | 278 | so we can assume they are right. |
| 279 | 279 | */ |
| 280 | static int joy_map[16] = | |
| 280 | static const int joy_map[16] = | |
| 281 | 281 | /* LDRU, LDR, LDU, LD, LRU, LR, LU, L, DRU, DR, DU, D, RU, R, U, center */ |
| 282 | 282 | { 0xf, 0xe, 0xd, 0x5, 0xc, 0x9, 0x7, 0x6, 0xb, 0x3, 0xa, 0x4, 0x1, 0x2, 0x0, 0x8 }; |
| 283 | 283 |
| r1404 | r1405 | |
|---|---|---|
| 66 | 66 | |
| 67 | 67 | static READ8_HANDLER( scrambls_input_port_2_r ) |
| 68 | 68 | { |
| 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 }; | |
| 70 | 70 | |
| 71 | 71 | UINT8 res; |
| 72 | 72 |
| r1404 | r1405 | |
|---|---|---|
| 483 | 483 | /*irqs : A/B */ 0, 0 |
| 484 | 484 | }; |
| 485 | 485 | |
| 486 | static struct TTL74148_interface TTL74148_3S_intf = | |
| 486 | static const struct TTL74148_interface TTL74148_3S_intf = | |
| 487 | 487 | { |
| 488 | 488 | TTL74148_3S_cb |
| 489 | 489 | }; |
| 490 | 490 | |
| 491 | static struct TTL7474_interface TTL7474_2S_1_intf = | |
| 491 | static const struct TTL7474_interface TTL7474_2S_1_intf = | |
| 492 | 492 | { |
| 493 | 493 | TTL7474_2S_1_cb |
| 494 | 494 | }; |
| 495 | 495 | |
| 496 | static struct TTL7474_interface TTL7474_2S_2_intf = | |
| 496 | static const struct TTL7474_interface TTL7474_2S_2_intf = | |
| 497 | 497 | { |
| 498 | 498 | TTL7474_2S_2_cb |
| 499 | 499 | }; |
| 500 | 500 | |
| 501 | static struct TTL7474_interface TTL7474_2U_1_intf = | |
| 501 | static const struct TTL7474_interface TTL7474_2U_1_intf = | |
| 502 | 502 | { |
| 503 | 503 | TTL7474_2U_1_cb |
| 504 | 504 | }; |
| 505 | 505 | |
| 506 | static struct TTL7474_interface TTL7474_2U_2_intf = | |
| 506 | static const struct TTL7474_interface TTL7474_2U_2_intf = | |
| 507 | 507 | { |
| 508 | 508 | TTL7474_2U_2_cb |
| 509 | 509 | }; |
| r1404 | r1405 | |
|---|---|---|
| 58 | 58 | |
| 59 | 59 | |
| 60 | 60 | /* key set 3 */ |
| 61 | static int at_keyboard_scancode_set_2_3[]= | |
| 61 | static const int at_keyboard_scancode_set_2_3[]= | |
| 62 | 62 | { |
| 63 | 63 | 0, |
| 64 | 64 | 0x076, |
| r1404 | r1405 | |
| 199 | 199 | } extended_keyboard_code; |
| 200 | 200 | |
| 201 | 201 | |
| 202 | static extended_keyboard_code keyboard_mf2_code[0x10][2/*numlock off, on*/]={ | |
| 202 | static const extended_keyboard_code keyboard_mf2_code[0x10][2/*numlock off, on*/]={ | |
| 203 | 203 | { { "\xe0\x1c", "\xe0\x9c" } }, // keypad enter |
| 204 | 204 | { { "\xe0\x1d", "\xe0\x9d" } }, // right control |
| 205 | 205 | { { "\xe0\x35", "\xe0\xb5" } }, |
| r1404 | r1405 | |
| 220 | 220 | |
| 221 | 221 | /* I don't think these keys change if num-lock is active! */ |
| 222 | 222 | /* pc-at extended keyboard make/break codes for code set 3 */ |
| 223 | static extended_keyboard_code at_keyboard_extended_codes_set_2_3[]= | |
| 223 | static const extended_keyboard_code at_keyboard_extended_codes_set_2_3[]= | |
| 224 | 224 | { |
| 225 | 225 | /*keypad enter */ |
| 226 | 226 | { |
| r1404 | r1405 | |
| 477 | 477 | case 2: |
| 478 | 478 | case 3: |
| 479 | 479 | { |
| 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]; | |
| 481 | 481 | |
| 482 | 482 | if (pressed) |
| 483 | 483 | { |
| r1404 | r1405 | |
|---|---|---|
| 564 | 564 | } |
| 565 | 565 | |
| 566 | 566 | |
| 567 | rsp_config n64_rsp_config = | |
| 567 | const rsp_config n64_rsp_config = | |
| 568 | 568 | { |
| 569 | 569 | n64_dp_reg_r, |
| 570 | 570 | n64_dp_reg_w, |
| r1404 | r1405 | |
|---|---|---|
| 170 | 170 | * Machine hardware for MSM5205 ADPCM sound control |
| 171 | 171 | */ |
| 172 | 172 | |
| 173 | static int sampleLimits[] = | |
| 173 | static const int sampleLimits[] = | |
| 174 | 174 | { |
| 175 | 175 | 0x0000, // machine gun fire? |
| 176 | 176 | 0x1000, // player getting shot |
| r1404 | r1405 | |
|---|---|---|
| 22 | 22 | #define NEXT(new_state) fsm[state][new_state] |
| 23 | 23 | |
| 24 | 24 | static INT32 state; // current state |
| 25 | static INT32 fsm[][2] = { | |
| 25 | static const INT32 fsm[][2] = { | |
| 26 | 26 | { 1, 0 }, // 0 Test-Logic/Reset |
| 27 | 27 | { 1, 2 }, // 1 Run-Test/Idle |
| 28 | 28 | { 3, 9 }, // 2 Select-DR-Scan |
| r1404 | r1405 | |
|---|---|---|
| 260 | 260 | 0xce39, 0x1c02, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 |
| 261 | 261 | }; |
| 262 | 262 | |
| 263 | static const UINT16* palette_data_lookup[] = | |
| 263 | static const UINT16 *const palette_data_lookup[] = | |
| 264 | 264 | { |
| 265 | 265 | 0, |
| 266 | 266 | palette_data_01, |
| r1404 | r1405 | |
|---|---|---|
| 1066 | 1066 | #if LOG_CEM_WRITES |
| 1067 | 1067 | if (temp != cem3394_get_parameter(i, reg)) |
| 1068 | 1068 | { |
| 1069 | static const char *names[] = | |
| 1069 | static const char *const names[] = | |
| 1070 | 1070 | { |
| 1071 | 1071 | "VCO_FREQUENCY", |
| 1072 | 1072 | "FINAL_GAIN", |
| r1404 | r1405 | |
|---|---|---|
| 14 | 14 | |
| 15 | 15 | static UINT16 decrypt(UINT16 data, int address, int select_xor) |
| 16 | 16 | { |
| 17 | static UINT16 xors[16] = | |
| 17 | static const UINT16 xors[16] = | |
| 18 | 18 | { |
| 19 | 19 | 0xb52c,0x2458,0x139a,0xc998,0xce8e,0x5144,0x0429,0xaad4,0xa331,0x3645,0x69a3,0xac64,0x1a53,0x5083,0x4dea,0xd237 |
| 20 | 20 | }; |
| 21 | static UINT8 bitswaps[16][16] = | |
| 21 | static const UINT8 bitswaps[16][16] = | |
| 22 | 22 | { |
| 23 | 23 | { 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 }, |
| 24 | 24 | { 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 }, |
| r1404 | r1405 | |
| 30 | 30 | { 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 } |
| 31 | 31 | }; |
| 32 | 32 | int j, xor; |
| 33 | UINT8 *bs; | |
| 33 | const UINT8 *bs; | |
| 34 | 34 | |
| 35 | 35 | // calculate bitswap to use |
| 36 | 36 | j = ((address ^ select_xor) & 0xf0) >> 4; |
| r1404 | r1405 | |
|---|---|---|
| 16 | 16 | |
| 17 | 17 | /* Locals */ |
| 18 | 18 | static int input_latch[4]; |
| 19 | static UINT8 *remapped_colortable; | |
| 19 | static const UINT8 *remapped_colortable; | |
| 20 | 20 | |
| 21 | 21 | static int sound_fix=0; |
| 22 | 22 | /************************************* |
| r1404 | r1405 | |
| 27 | 27 | |
| 28 | 28 | /* RP2C04-001 */ |
| 29 | 29 | /* check 0x08 */ |
| 30 | static UINT8 rp2c04001_colortable[] = | |
| 30 | static const UINT8 rp2c04001_colortable[] = | |
| 31 | 31 | { |
| 32 | 32 | 0x35, 0xff, 0x16, 0x22, 0x1c, 0xff, 0xff, 0x15, /* 0x00 - 0x07 */ |
| 33 | 33 | 0x20, 0x00, 0x27, 0x05, 0x04, 0x27, 0x08, 0x30, /* 0x08 - 0x0f */ |
| r1404 | r1405 | |
| 41 | 41 | |
| 42 | 42 | /* RP2C04-002 */ |
| 43 | 43 | /* 0x04, 0x24 */ |
| 44 | static UINT8 rp2c04002_colortable[] = | |
| 44 | static const UINT8 rp2c04002_colortable[] = | |
| 45 | 45 | { |
| 46 | 46 | 0xff, 0x27, 0x18, 0xff, 0x3a, 0x25, 0x2b, 0x31, /* 0x00 - 0x07 */ |
| 47 | 47 | 0x15, 0x13, 0x38, 0x34, 0x20, 0x23, 0xff, 0x0b, /* 0x08 - 0x0f */ |
| r1404 | r1405 | |
| 55 | 55 | |
| 56 | 56 | /* RP2C04-003 */ |
| 57 | 57 | /* check 0x0f, 0x2e, 0x34 */ |
| 58 | static UINT8 rp2c04003_colortable[] = | |
| 58 | static const UINT8 rp2c04003_colortable[] = | |
| 59 | 59 | { |
| 60 | 60 | 0xff, 0xff, 0xff, 0x10, 0x1a, 0x30, 0x31, 0x09, /* 0x00 - 0x07 */ |
| 61 | 61 | 0x01, 0x0f, 0x36, 0x08, 0x15, 0xff, 0xff, 0x30, /* 0x08 - 0x0f */ |
| r1404 | r1405 | |
| 69 | 69 | |
| 70 | 70 | /* RP2C05-004 */ |
| 71 | 71 | /* check 0x03 0x1d, 0x38, 0x3b*/ |
| 72 | static UINT8 rp2c05004_colortable[] = | |
| 72 | static const UINT8 rp2c05004_colortable[] = | |
| 73 | 73 | { |
| 74 | 74 | 0x18, 0xff, 0x1c, 0x89, 0xff, 0xff, 0x01, 0x17, /* 0x00 - 0x07 */ |
| 75 | 75 | 0x10, 0x0f, 0x2a, 0xff, 0x36, 0x37, 0x1a, 0xff, /* 0x08 - 0x0f */ |
| r1404 | r1405 | |
| 1075 | 1075 | static READ8_HANDLER( tko_security_r ) |
| 1076 | 1076 | { |
| 1077 | 1077 | static int security_counter; |
| 1078 | static UINT8 security_data[] = { | |
| 1078 | static const UINT8 security_data[] = { | |
| 1079 | 1079 | 0xff, 0xbf, 0xb7, 0x97, 0x97, 0x17, 0x57, 0x4f, |
| 1080 | 1080 | 0x6f, 0x6b, 0xeb, 0xa9, 0xb1, 0x90, 0x94, 0x14, |
| 1081 | 1081 | 0x56, 0x4e, 0x6f, 0x6b, 0xeb, 0xa9, 0xb1, 0x90, |
| r1404 | r1405 | |
|---|---|---|
| 107 | 107 | |
| 108 | 108 | if (mexico86_protection_ram[0xe0] > 0 && mexico86_protection_ram[0xe0] < 4) |
| 109 | 109 | { |
| 110 | static UINT8 answers[3][16] = | |
| 110 | static const UINT8 answers[3][16] = | |
| 111 | 111 | { |
| 112 | 112 | { 0x00,0x40,0x48,0x50,0x58,0x60,0x68,0x70,0x78,0x80,0x88,0x00,0x00,0x00,0x00,0x00 }, |
| 113 | 113 | { 0x00,0x04,0x08,0x0C,0x10,0x14,0x18,0x1C,0x20,0x31,0x2B,0x35,0x00,0x00,0x00,0x00 }, |
| r1404 | r1405 | |
| 130 | 130 | // The following is missing from Knight Boy |
| 131 | 131 | // this should be equivalent to the obfuscated kiki_clogic() below |
| 132 | 132 | { |
| 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}; | |
| 134 | 134 | int sy = mexico86_protection_ram[0xa0] + ((0x18)>>1); |
| 135 | 135 | int sx = mexico86_protection_ram[0xa1] + ((0x18)>>1); |
| 136 | 136 | |
| r1404 | r1405 | |
| 175 | 175 | |
| 176 | 176 | static void kiki_clogic(int address, int latch) |
| 177 | 177 | { |
| 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}; | |
| 179 | 179 | static UINT8 queue[64]; |
| 180 | 180 | static int qfront = 0, state = 0; |
| 181 | 181 | int sy, sx, hw, i, qptr, diff1, diff2; |
| r1404 | r1405 | |
|---|---|---|
| 46 | 46 | |
| 47 | 47 | // full graphic variables |
| 48 | 48 | static UINT16 vram_fgr_high, vram_fgr_increment, vram_fgr_count, vram_fgr_mask, vram_fgr_shift, vram_read_buffer; |
| 49 | static UINT16 vram_fgr_inctab[4] = { 1, 32, 128, 128 }; | |
| 50 | static UINT16 vram_fgr_inccnts[4] = { 0, 32, 64, 128 }; | |
| 51 | static UINT16 vram_fgr_shiftab[4] = { 0, 5, 6, 7 }; | |
| 49 | static const UINT16 vram_fgr_inctab[4] = { 1, 32, 128, 128 }; | |
| 50 | static const UINT16 vram_fgr_inccnts[4] = { 0, 32, 64, 128 }; | |
| 51 | static const UINT16 vram_fgr_shiftab[4] = { 0, 5, 6, 7 }; | |
| 52 | 52 | |
| 53 | 53 | struct snes_cart_info snes_cart = { SNES_MODE_20, 0x40000, 0x40000 }; |
| 54 | 54 |
| r1404 | r1405 | |
|---|---|---|
| 79 | 79 | static emu_timer * amiga_irq_timer; |
| 80 | 80 | static emu_timer * amiga_blitter_timer; |
| 81 | 81 | |
| 82 | const char *amiga_custom_names[0x100] = | |
| 82 | const char *const amiga_custom_names[0x100] = | |
| 83 | 83 | { |
| 84 | 84 | /* 0x000 */ |
| 85 | 85 | "BLTDDAT", "DMACONR", "VPOSR", "VHPOSR", |
| r1404 | r1405 | |
| 925 | 925 | /* logging */ |
| 926 | 926 | if (LOG_BLITS) |
| 927 | 927 | { |
| 928 | static const char *type[] = { "ASCENDING", "LINE", "DESCENDING", "LINE" }; | |
| 928 | static const char *const type[] = { "ASCENDING", "LINE", "DESCENDING", "LINE" }; | |
| 929 | 929 | 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)); |
| 930 | 930 | if (CUSTOM_REG(REG_BLTCON0) & 0x0800) |
| 931 | 931 | 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)); |
| r1404 | r1405 | |
|---|---|---|
| 39 | 39 | static UINT8 adc_result; |
| 40 | 40 | |
| 41 | 41 | /* 8254 timer config */ |
| 42 | static struct pit8253_config pit8254_config = | |
| 42 | static const struct pit8253_config pit8254_config = | |
| 43 | 43 | { |
| 44 | 44 | TYPE8254, |
| 45 | 45 | { |
| r1404 | r1405 | |
| 59 | 59 | } |
| 60 | 60 | }; |
| 61 | 61 | |
| 62 | static struct TTL74148_interface irq_encoder = | |
| 62 | static const struct TTL74148_interface irq_encoder = | |
| 63 | 63 | { |
| 64 | 64 | update_irq |
| 65 | 65 | }; |
| r1404 | r1405 | |
|---|---|---|
| 104 | 104 | |
| 105 | 105 | /* PC interface to PC-com hardware. Done this way because PCW16 also |
| 106 | 106 | uses PC-com hardware and doesn't have the same setup! */ |
| 107 | static uart8250_interface com_interface[4]= | |
| 107 | static const uart8250_interface com_interface[4]= | |
| 108 | 108 | { |
| 109 | 109 | { |
| 110 | 110 | TYPE8250, |
| r1404 | r1405 | |
| 201 | 201 | |
| 202 | 202 | |
| 203 | 203 | #ifdef MESS |
| 204 | static PC_LPT_CONFIG lpt_config[3]={ | |
| 204 | static const PC_LPT_CONFIG lpt_config[3]={ | |
| 205 | 205 | { |
| 206 | 206 | 1, |
| 207 | 207 | LPT_UNIDIRECTIONAL, |
| r1404 | r1405 | |
| 219 | 219 | } |
| 220 | 220 | }; |
| 221 | 221 | |
| 222 | static CENTRONICS_CONFIG cent_config[3]={ | |
| 222 | static const CENTRONICS_CONFIG cent_config[3]={ | |
| 223 | 223 | { |
| 224 | 224 | PRINTER_IBM, |
| 225 | 225 | pc_lpt_handshake_in |
| r1404 | r1405 | |
| 367 | 367 | |
| 368 | 368 | |
| 369 | 369 | |
| 370 | static struct dma8237_interface pc_dma = | |
| 370 | static const struct dma8237_interface pc_dma = | |
| 371 | 371 | { |
| 372 | 372 | 0, |
| 373 | 373 | 1.0e-6, // 1us |
| r1404 | r1405 | |
|---|---|---|
| 189 | 189 | static WRITE16_HANDLER( kof99_bankswitch_w ) |
| 190 | 190 | { |
| 191 | 191 | int bankaddress; |
| 192 | static int bankoffset[64] = | |
| 192 | static const int bankoffset[64] = | |
| 193 | 193 | { |
| 194 | 194 | 0x000000, 0x100000, 0x200000, 0x300000, |
| 195 | 195 | 0x3cc000, 0x4cc000, 0x3f2000, 0x4f2000, |
| r1404 | r1405 | |
| 221 | 221 | { |
| 222 | 222 | /* thanks to Razoola and Mr K for the info */ |
| 223 | 223 | int bankaddress; |
| 224 | static int bankoffset[64] = | |
| 224 | static const int bankoffset[64] = | |
| 225 | 225 | { |
| 226 | 226 | 0x000000, 0x100000, 0x200000, 0x300000, // 00 |
| 227 | 227 | 0x280000, 0x380000, 0x2d0000, 0x3d0000, // 04 |
| r1404 | r1405 | |
| 258 | 258 | { |
| 259 | 259 | /* thanks to Razoola and Mr K for the info */ |
| 260 | 260 | int bankaddress; |
| 261 | static int bankoffset[64] = | |
| 261 | static const int bankoffset[64] = | |
| 262 | 262 | { |
| 263 | 263 | 0x000000, 0x100000, 0x200000, 0x300000, // 00 |
| 264 | 264 | 0x280000, 0x380000, 0x2d0000, 0x3d0000, // 04 |
| r1404 | r1405 | |
| 297 | 297 | { |
| 298 | 298 | /* thanks to Razoola and Mr K for the info */ |
| 299 | 299 | int bankaddress; |
| 300 | static int bankoffset[64] = | |
| 300 | static const int bankoffset[64] = | |
| 301 | 301 | { |
| 302 | 302 | 0x000000, 0x020000, 0x040000, 0x060000, // 00 |
| 303 | 303 | 0x070000, 0x090000, 0x0b0000, 0x0d0000, // 04 |
| r1404 | r1405 | |
| 333 | 333 | { |
| 334 | 334 | /* thanks to Razoola and Mr K for the info */ |
| 335 | 335 | int bankaddress; |
| 336 | static int bankoffset[64] = | |
| 336 | static const int bankoffset[64] = | |
| 337 | 337 | { |
| 338 | 338 | 0x000000, 0x100000, 0x200000, 0x300000, // 00 |
| 339 | 339 | 0x3f7800, 0x4f7800, 0x3ff800, 0x4ff800, // 04 |
| r1404 | r1405 | |
|---|---|---|
| 101 | 101 | * |
| 102 | 102 | *************************************/ |
| 103 | 103 | |
| 104 | gfx_layout mcr_bg_layout = | |
| 104 | const gfx_layout mcr_bg_layout = | |
| 105 | 105 | { |
| 106 | 106 | 8,8, |
| 107 | 107 | RGN_FRAC(1,2), |
| r1404 | r1405 | |
| 113 | 113 | }; |
| 114 | 114 | |
| 115 | 115 | |
| 116 | gfx_layout mcr_sprite_layout = | |
| 116 | const gfx_layout mcr_sprite_layout = | |
| 117 | 117 | { |
| 118 | 118 | 32,32, |
| 119 | 119 | RGN_FRAC(1,4), |
| r1404 | r1405 | |
| 199 | 199 | } |
| 200 | 200 | |
| 201 | 201 | |
| 202 | struct z80_irq_daisy_chain mcr_daisy_chain[] = | |
| 202 | const struct z80_irq_daisy_chain mcr_daisy_chain[] = | |
| 203 | 203 | { |
| 204 | 204 | { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 }, /* CTC number 0 */ |
| 205 | 205 | { 0, 0, 0, 0, -1 } /* end mark */ |
| 206 | 206 | }; |
| 207 | 207 | |
| 208 | 208 | |
| 209 | struct z80_irq_daisy_chain mcr_ipu_daisy_chain[] = | |
| 209 | const struct z80_irq_daisy_chain mcr_ipu_daisy_chain[] = | |
| 210 | 210 | { |
| 211 | 211 | { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 1 }, /* CTC number 1 */ |
| 212 | 212 | { z80pio_reset, z80pio_irq_state, z80pio_irq_ack, z80pio_irq_reti, 1 }, /* PIO number 1 */ |
| r1404 | r1405 | |
| 238 | 238 | }; |
| 239 | 239 | |
| 240 | 240 | |
| 241 | static z80pio_interface nflfoot_pio_intf = | |
| 241 | static const z80pio_interface nflfoot_pio_intf = | |
| 242 | 242 | { |
| 243 | 243 | ipu_ctc_interrupt, |
| 244 | 244 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 184 | 184 | |
| 185 | 185 | for (A = 0x0000;A < 0x8000-14;A++) |
| 186 | 186 | { |
| 187 | static char text[] = "INSERT COIN"; | |
| 187 | static const char text[] = "INSERT COIN"; | |
| 188 | 188 | int i; |
| 189 | 189 | |
| 190 | 190 |
| r1404 | r1405 | |
|---|---|---|
| 997 | 997 | static UINT16 m_p_n_mdec_g5[ 256 * 3 ]; |
| 998 | 998 | static UINT16 m_p_n_mdec_b5[ 256 * 3 ]; |
| 999 | 999 | |
| 1000 | static UINT32 m_p_n_mdec_zigzag[ DCTSIZE2 ] = | |
| 1000 | static const UINT32 m_p_n_mdec_zigzag[ DCTSIZE2 ] = | |
| 1001 | 1001 | { |
| 1002 | 1002 | 0, 1, 8, 16, 9, 2, 3, 10, |
| 1003 | 1003 | 17, 24, 32, 25, 18, 11, 4, 5, |
| r1404 | r1405 | |
|---|---|---|
| 20 | 20 | static WRITE8_HANDLER( b_via_1_pb_w ); |
| 21 | 21 | static void b_via_1_irq (int level); |
| 22 | 22 | |
| 23 | static struct via6522_interface b_via_0_interface = | |
| 23 | static const struct via6522_interface b_via_0_interface = | |
| 24 | 24 | { |
| 25 | 25 | /*inputs : A/B */ 0, b_via_0_pb_r, |
| 26 | 26 | /*inputs : CA/B1,CA/B2 */ 0, via_1_ca2_r, b_via_0_ca2_r, via_1_ca1_r, |
| r1404 | r1405 | |
| 29 | 29 | /*irq */ b_via_0_irq |
| 30 | 30 | }; |
| 31 | 31 | |
| 32 | static struct via6522_interface b_via_1_interface = | |
| 32 | static const struct via6522_interface b_via_1_interface = | |
| 33 | 33 | { |
| 34 | 34 | /*inputs : A/B */ b_via_1_pa_r, b_via_1_pb_r, |
| 35 | 35 | /*inputs : CA/B1,CA/B2 */ via_0_cb2_r, 0, via_0_cb1_r, 0, |
| r1404 | r1405 | |
|---|---|---|
| 47 | 47 | /* This code for sound communication is a hack, it will not be |
| 48 | 48 | identical to the code derived from the real c-chip */ |
| 49 | 49 | |
| 50 | static UINT8 superman_code[40] = | |
| 50 | static const UINT8 superman_code[40] = | |
| 51 | 51 | { |
| 52 | 52 | 0x48, 0xe7, 0x80, 0x80, /* MOVEM.L D0/A0,-(A7) ( Preserve Regs ) */ |
| 53 | 53 | 0x20, 0x6d, 0x1c, 0x40, /* MOVEA.L ($1C40,A5),A0 ( Load sound pointer in A0 ) */ |
| r1404 | r1405 | |
|---|---|---|
| 16 | 16 | static UINT16 pstar_e7,pstar_b1,pstar_ce; |
| 17 | 17 | static UINT16 pstar_ram[3]; |
| 18 | 18 | |
| 19 | static int Pstar_ba[0x1E]={ | |
| 19 | static const int Pstar_ba[0x1E]={ | |
| 20 | 20 | 0x02,0x00,0x00,0x01,0x00,0x03,0x00,0x00, //0 |
| 21 | 21 | 0x02,0x00,0x06,0x00,0x22,0x04,0x00,0x03, //8 |
| 22 | 22 | 0x00,0x00,0x06,0x00,0x20,0x07,0x00,0x03, //10 |
| 23 | 23 | 0x00,0x21,0x01,0x00,0x00,0x63 |
| 24 | 24 | }; |
| 25 | 25 | |
| 26 | static int Pstar_b0[0x10]={ | |
| 26 | static const int Pstar_b0[0x10]={ | |
| 27 | 27 | 0x09,0x0A,0x0B,0x00,0x01,0x02,0x03,0x04, |
| 28 | 28 | 0x05,0x06,0x07,0x08,0x00,0x00,0x00,0x00 |
| 29 | 29 | }; |
| 30 | 30 | |
| 31 | static int Pstar_ae[0x10]={ | |
| 31 | static const int Pstar_ae[0x10]={ | |
| 32 | 32 | 0x5D,0x86,0x8C ,0x8B,0xE0,0x8B,0x62,0xAF, |
| 33 | 33 | 0xB6,0xAF,0x10A,0xAF,0x00,0x00,0x00,0x00 |
| 34 | 34 | }; |
| 35 | 35 | |
| 36 | static int Pstar_a0[0x10]={ | |
| 36 | static const int Pstar_a0[0x10]={ | |
| 37 | 37 | 0x02,0x03,0x04,0x05,0x06,0x01,0x0A,0x0B, |
| 38 | 38 | 0x0C,0x0D,0x0E,0x09,0x00,0x00,0x00,0x00, |
| 39 | 39 | }; |
| 40 | 40 | |
| 41 | static int Pstar_9d[0x10]={ | |
| 41 | static const int Pstar_9d[0x10]={ | |
| 42 | 42 | 0x05,0x03,0x00,0x00,0x00,0x00,0x00,0x00, |
| 43 | 43 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 44 | 44 | }; |
| 45 | 45 | |
| 46 | static int Pstar_90[0x10]={ | |
| 46 | static const int Pstar_90[0x10]={ | |
| 47 | 47 | 0x0C,0x10,0x0E,0x0C,0x00,0x00,0x00,0x00, |
| 48 | 48 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
| 49 | 49 | }; |
| 50 | static int Pstar_8c[0x23]={ | |
| 50 | static const int Pstar_8c[0x23]={ | |
| 51 | 51 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 52 | 52 | 0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01, |
| 53 | 53 | 0x01,0x01,0x01,0x01,0x02,0x02,0x02,0x02, |
| r1404 | r1405 | |
| 55 | 55 | 0x03,0x03,0x03 |
| 56 | 56 | }; |
| 57 | 57 | |
| 58 | static int Pstar_80[0x1a3]={ | |
| 58 | static const int Pstar_80[0x1a3]={ | |
| 59 | 59 | 0x03,0x03,0x04,0x04,0x04,0x04,0x05,0x05, |
| 60 | 60 | 0x05,0x05,0x06,0x06,0x03,0x03,0x04,0x04, |
| 61 | 61 | 0x05,0x05,0x05,0x05,0x06,0x06,0x07,0x07, |
| r1404 | r1405 | |
| 317 | 317 | static void asic3_compute_hold(void) |
| 318 | 318 | { |
| 319 | 319 | // 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 }; | |
| 321 | 321 | int mode = modes[readinputport(4) & 3]; |
| 322 | 322 | |
| 323 | 323 | switch(mode) { |
| r1404 | r1405 | |
|---|---|---|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | |
| 62 | struct upd7759_interface sys16_upd7759_interface = | |
| 62 | const struct upd7759_interface sys16_upd7759_interface = | |
| 63 | 63 | { |
| 64 | 64 | 0, /* memory region 3 contains the sample data */ |
| 65 | 65 | sound_cause_nmi |
| r1404 | r1405 | |
|---|---|---|
| 17 | 17 | #define kYaw 1 |
| 18 | 18 | #define kThrust 2 |
| 19 | 19 | |
| 20 | /* Constants for mat | |
| 20 | /* Constants for matri | |
| 21 | 21 | #define NOP 0x00 |
| 22 | 22 | #define LAC 0x01 |
| 23 | 23 | #define READ_ACC 0x02 |
| r1404 | r1405 | |
| 31 | 31 | /* Debugging flag */ |
| 32 | 32 | #define MATHDEBUG 0 |
| 33 | 33 | |
| 34 | #define MASTER_CLOCK (12096000) | |
| 34 | 35 | |
| 35 | 36 | UINT8 *starwars_mathram; |
| 36 | 37 | UINT8 *starwars_ram_overlay; |
| r1404 | r1405 | |
| 49 | 50 | static UINT8 *PROM_MAS; /* Storage for direct address only */ |
| 50 | 51 | static UINT8 *PROM_AM; /* Storage for address mode select only */ |
| 51 | 52 | |
| 53 | static int math_run; | |
| 54 | static emu_timer *math_timer; | |
| 52 | 55 | |
| 53 | 56 | /* Local function prototypes */ |
| 54 | static void run_m | |
| 57 | static void run_mproc(void); | |
| 55 | 58 | |
| 56 | 59 | |
| 60 | static TIMER_CALLBACK( math_run_clear ) | |
| 61 | { | |
| 62 | math_run = 0; | |
| 63 | } | |
| 57 | 64 | |
| 65 | ||
| 58 | 66 | /************************************* |
| 59 | 67 | * |
| 60 | 68 | * X2212 nvram store |
| r1404 | r1405 | |
| 122 | 130 | { |
| 123 | 131 | int x = readinputport(1); |
| 124 | 132 | |
| 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) | |
| 128 | 135 | x |= 0x80; |
| 136 | else | |
| 137 | x &= ~0x80; | |
| 129 | 138 | |
| 130 | 139 | /* set the AVG done flag */ |
| 131 | 140 | if (avgdvg_done()) |
| r1404 | r1405 | |
| 169 | 178 | |
| 170 | 179 | /************************************* |
| 171 | 180 | * |
| 172 | * Mat | |
| 181 | * Matri | |
| 173 | 182 | * |
| 174 | 183 | *************************************/ |
| 175 | 184 | |
| 176 | void sw | |
| 185 | void starw | |
| 177 | 186 | { |
| 178 | 187 | UINT8 *src = memory_region(REGION_USER2); |
| 179 | 188 | int cnt, val; |
| r1404 | r1405 | |
| 195 | 204 | PROM_MAS[cnt] = val & 0x007f; |
| 196 | 205 | PROM_AM[cnt] = (val >> 7) & 0x0001; |
| 197 | 206 | } |
| 207 | ||
| 208 | math_timer = timer_alloc(math_run_clear, NULL); | |
| 198 | 209 | } |
| 199 | 210 | |
| 200 | 211 | |
| 201 | 212 | |
| 202 | 213 | /************************************* |
| 203 | 214 | * |
| 204 | * Mat | |
| 215 | * Matri | |
| 205 | 216 | * |
| 206 | 217 | *************************************/ |
| 207 | 218 | |
| 208 | void sw | |
| 219 | void starw | |
| 209 | 220 | { |
| 210 | 221 | MPA = BIC = 0; |
| 222 | math_run = 0; | |
| 211 | 223 | } |
| 212 | 224 | |
| 213 | 225 | |
| 214 | 226 | |
| 215 | 227 | /************************************* |
| 216 | 228 | * |
| 217 | * Mat | |
| 229 | * Matri | |
| 218 | 230 | * |
| 219 | 231 | *************************************/ |
| 220 | 232 | |
| 221 | void run_m | |
| 233 | void run_mproc(void) | |
| 222 | 234 | { |
| 223 | 235 | static INT16 A, B, C; |
| 224 | 236 | static INT32 ACC; |
| r1404 | r1405 | |
| 229 | 241 | int M_STOP = 100000; /* Limit on number of instructions allowed before halt */ |
| 230 | 242 | int MA; |
| 231 | 243 | int IP15_8, IP7, IP6_0; /* Instruction PROM values */ |
| 244 | int mptime; | |
| 232 | 245 | |
| 246 | logerror("Running Matrix Processor...\n"); | |
| 233 | 247 | |
| 234 | logerror("Running Mathbox...\n"); | |
| 248 | mptime = 0; | |
| 249 | math_run = 1; | |
| 235 | 250 | |
| 236 | 251 | /* loop until finished */ |
| 237 | 252 | while (M_STOP > 0) |
| 238 | 253 | { |
| 254 | ||
| 255 | /* each step of the matrix processor takes five clock cycles */ | |
| 256 | mptime += 5; | |
| 257 | ||
| 239 | 258 | /* fetch the current instruction data */ |
| 240 | 259 | IP15_8 = PROM_STR[MPA]; |
| 241 | 260 | IP7 = PROM_AM[MPA]; |
| r1404 | r1405 | |
| 341 | 360 | */ |
| 342 | 361 | A = (A & 0x8000)? 0xffff: 0; |
| 343 | 362 | B = (B & 0x8000)? 0xffff: 0; |
| 363 | ||
| 364 | /* The multiply-add holds the main matrix processor counter | |
| 365 | * for 33 cycles | |
| 366 | */ | |
| 367 | mptime += 33; | |
| 344 | 368 | } |
| 345 | 369 | |
| 346 | 370 | /* 0x40 - LDB */ |
| r1404 | r1405 | |
| 362 | 386 | |
| 363 | 387 | M_STOP--; /* Decrease count */ |
| 364 | 388 | } |
| 389 | ||
| 390 | timer_adjust(math_timer, attotime_mul(ATTOTIME_IN_HZ(MASTER_CLOCK), mptime), 1, attotime_zero); | |
| 365 | 391 | } |
| 366 | 392 | |
| 367 | 393 | |
| r1404 | r1405 | |
| 372 | 398 | * |
| 373 | 399 | *************************************/ |
| 374 | 400 | |
| 375 | READ8_HANDLER( sw | |
| 401 | READ8_HANDLER( starw | |
| 376 | 402 | { |
| 377 | 403 | /* |
| 378 | 404 | * The PRNG is a modified 23 bit LFSR. Taps are at 4 and 22 so the |
| r1404 | r1405 | |
| 394 | 420 | |
| 395 | 421 | /************************************* |
| 396 | 422 | * |
| 397 | * | |
| 423 | * S | |
| 398 | 424 | * |
| 399 | 425 | *************************************/ |
| 400 | 426 | |
| 401 | READ8_HANDLER( sw | |
| 427 | READ8_HANDLER( starw | |
| 402 | 428 | { |
| 403 | 429 | return (quotient_shift & 0xff00) >> 8; |
| 404 | 430 | } |
| 405 | 431 | |
| 406 | 432 | |
| 407 | READ8_HANDLER( sw | |
| 433 | READ8_HANDLER( starw | |
| 408 | 434 | { |
| 409 | 435 | return quotient_shift & 0x00ff; |
| 410 | 436 | } |
| 411 | 437 | |
| 412 | 438 | |
| 413 | WRITE8_HANDLER( swmath | |
| 439 | WRITE8_HANDLER( starwars_math | |
| 414 | 440 | { |
| 415 | 441 | int i; |
| 416 | 442 | |
| r1404 | r1405 | |
| 419 | 445 | { |
| 420 | 446 | case 0: /* mw0 */ |
| 421 | 447 | MPA = data << 2; /* Set starting PROM address */ |
| 422 | run_m | |
| 448 | run_mproc(); /* and run the Matri | |
| 423 | 449 | break; |
| 424 | 450 | |
| 425 | 451 | case 1: /* mw1 */ |
| r1404 | r1405 | |
|---|---|---|
| 2157 | 2157 | } |
| 2158 | 2158 | |
| 2159 | 2159 | /* TGP config */ |
| 2160 | struct mb86233_config model1_vr_tgp_config = | |
| 2160 | const struct mb86233_config model1_vr_tgp_config = | |
| 2161 | 2161 | { |
| 2162 | 2162 | copro_fifoin_pop, |
| 2163 | 2163 | copro_fifoout_push |
| r1404 | r1405 | |
|---|---|---|
| 35 | 35 | ** 1 - fuse blown: disconnected from input (equal to 1) |
| 36 | 36 | ** 0 - fuse not blown: connected to input (ie. x, not x, q, not q accordingly) |
| 37 | 37 | */ |
| 38 | static UINT8 fusemap[64*32]= | |
| 38 | static const UINT8 fusemap[64*32]= | |
| 39 | 39 | { |
| 40 | 40 | 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, |
| 41 | 41 | 1,1,1,1,1,1,0,1,1,1,1,0,1,1,0,1,1,1,1,0,1,1,0,1,1,1,0,1,1,1,1,1, |
| r1404 | r1405 | |
|---|---|---|
| 71 | 71 | |
| 72 | 72 | */ |
| 73 | 73 | |
| 74 | static UINT16 BD1charset[]= | |
| 74 | static const UINT16 BD1charset[]= | |
| 75 | 75 | { // FEDC BA98 7654 3210 |
| 76 | 76 | 0xA626, // 1010 0110 0010 0110 @. |
| 77 | 77 | 0xE027, // 1110 0000 0010 0111 A. |
| r1404 | r1405 | |
|---|---|---|
| 565 | 565 | DRIVER( popflamn ) /* (c) 1982 Jaleco */ |
| 566 | 566 | DRIVER( trvmstr ) /* (c) 1985 Enerdyne Technologies Inc. */ |
| 567 | 567 | DRIVER( trvmstra ) /* (c) 1985 Enerdyne Technologies Inc. */ |
| 568 | DRIVER( trvmstrb ) /* (c) 1985 Enerdyne Technologies Inc. */ | |
| 568 | 569 | DRIVER( trvgns ) /* (c) 198? Enerdyne Technologies Inc. */ |
| 569 | 570 | |
| 570 | 571 | |
| r1404 | r1405 | |
| 2820 | 2821 | DRIVER( tekken3b ) /* Tekken 3 (TET3/VER.A) */ |
| 2821 | 2822 | DRIVER( tekken3c ) /* Tekken 3 (TET2/VER.A) */ |
| 2822 | 2823 | DRIVER( lbgrande ) /* Libero Grande (LG2/VER.A) */ |
| 2824 | DRIVER( toukon3 ) /* Shin Nihon Pro Wrestling Toukon Retsuden 3 Arcade Edition (TR1/VER.A) */ | |
| 2823 | 2825 | DRIVER( soulclbr ) /* Soul Calibur (SOC14/VER.C) */ |
| 2824 | 2826 | DRIVER( soulclba ) /* Soul Calibur (SOC11/VER.C) */ |
| 2825 | 2827 | DRIVER( soulclbb ) /* Soul Calibur (SOC13/VER.B) */ |
| r1404 | r1405 | |
| 2827 | 2829 | DRIVER( soulclbd ) /* Soul Calibur (SOC11/VER.A2) */ |
| 2828 | 2830 | DRIVER( ehrgeiz ) /* Ehrgeiz (EG3/VER.A) */ |
| 2829 | 2831 | DRIVER( ehrgeiza ) /* Ehrgeiz (EG2/VER.A) */ |
| 2832 | DRIVER( kaiunqz ) /* Kaiun Quiz (KW1/VER.A) */ | |
| 2830 | 2833 | DRIVER( mdhorse ) /* Derby Quiz My Dream Horse (MDH1/VER.A2) */ |
| 2834 | DRIVER( sws98 ) /* Super World Stadium '98 (SS81/VER.A) */ | |
| 2831 | 2835 | DRIVER( tenkomor ) /* Tenkomori Shooting (TKM2/VER.A1) */ |
| 2832 | 2836 | DRIVER( tenkomoj ) /* Tenkomori Shooting (TKM1/VER.A1) */ |
| 2833 | 2837 | DRIVER( fgtlayer ) /* Fighting Layer (FTL0/VER.A) */ |
| r1404 | r1405 | |
| 2845 | 2849 | DRIVER( pacappsp ) /* Paca Paca Passion Special (PSP1/VER.A) */ |
| 2846 | 2850 | DRIVER( golgo13 ) /* Golgo 13 (GLG1/VER.A) */ |
| 2847 | 2851 | 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) */ | |
| 2848 | 2854 | |
| 2849 | 2855 | /* Namco System 10 */ |
| 2850 | 2856 | DRIVER( mrdrilr2 ) /* Mr Driller 2 (DR21 Ver.A) */ |
| r1404 | r1405 | |
|---|---|---|
| 14 | 14 | |
| 15 | 15 | INTERRUPT_GEN( cps1_qsound_interrupt ); |
| 16 | 16 | |
| 17 | extern struct QSound_interface qsound_interface; | |
| 17 | extern const struct QSound_interface qsound_interface; | |
| 18 | 18 | |
| 19 | 19 | READ16_HANDLER( cps1_dsw_r ); |
| 20 | 20 | READ16_HANDLER( cps1_in0_r ); |
| r1404 | r1405 | |
|---|---|---|
| 42 | 42 | |
| 43 | 43 | /*----------- defined in machine/n64.c -----------*/ |
| 44 | 44 | |
| 45 | extern rsp_config n64_rsp_config; | |
| 45 | extern const rsp_config n64_rsp_config; | |
| 46 | 46 | |
| 47 | 47 | extern UINT32 *rdram; |
| 48 | 48 | extern UINT32 *rsp_imem; |
| r1404 | r1405 | |
|---|---|---|
| 33 | 33 | extern UINT8 *galaga_videoram; |
| 34 | 34 | extern UINT8 *galaga_ram1,*galaga_ram2,*galaga_ram3; |
| 35 | 35 | extern UINT8 galaga_starcontrol[]; |
| 36 | extern struct star star_seed_tab[]; | |
| 36 | extern const struct star star_seed_tab[]; | |
| 37 | 37 | |
| 38 | 38 | PALETTE_INIT( galaga ); |
| 39 | 39 | READ8_HANDLER( galaga_videoram_r ); |
| r1404 | r1405 | |
|---|---|---|
| 369 | 369 | extern UINT16 *amiga_expansion_ram; |
| 370 | 370 | extern UINT16 *amiga_autoconfig_mem; |
| 371 | 371 | |
| 372 | extern const char *amiga_custom_names[0x100]; | |
| 372 | extern const char *const amiga_custom_names[0x100]; | |
| 373 | 373 | |
| 374 | 374 | extern UINT16 (*amiga_chip_ram_r)(offs_t offset); |
| 375 | 375 | extern void (*amiga_chip_ram_w)(offs_t offset, UINT16 data); |
| r1404 | r1405 | |
|---|---|---|
| 38 | 38 | |
| 39 | 39 | /*----------- defined in audio/cclimber.c -----------*/ |
| 40 | 40 | |
| 41 | extern struct AY8910interface cclimber_ay8910_interface; | |
| 41 | extern const struct AY8910interface cclimber_ay8910_interface; | |
| 42 | 42 | extern const struct Samplesinterface cclimber_samples_interface; |
| 43 | 43 | WRITE8_HANDLER( cclimber_sample_trigger_w ); |
| 44 | 44 | WRITE8_HANDLER( cclimber_sample_rate_w ); |
| r1404 | r1405 | |
|---|---|---|
| 20 | 20 | |
| 21 | 21 | extern attotime mcr68_timing_factor; |
| 22 | 22 | |
| 23 | extern struct z80_irq_daisy_chain mcr_daisy_chain[]; | |
| 24 | extern struct z80_irq_daisy_chain mcr_ipu_daisy_chain[]; | |
| 23 | extern const struct z80_irq_daisy_chain mcr_daisy_chain[]; | |
| 24 | extern const struct z80_irq_daisy_chain mcr_ipu_daisy_chain[]; | |
| 25 | 25 | extern UINT8 mcr_cocktail_flip; |
| 26 | 26 | |
| 27 | extern gfx_layout mcr_bg_layout; | |
| 28 | extern gfx_layout mcr_sprite_layout; | |
| 27 | extern const gfx_layout mcr_bg_layout; | |
| 28 | extern const gfx_layout mcr_sprite_layout; | |
| 29 | 29 | |
| 30 | 30 | extern UINT32 mcr_cpu_board; |
| 31 | 31 | extern UINT32 mcr_sprite_board; |
| r1404 | r1405 | |
|---|---|---|
| 90 | 90 | extern UINT16 *sys16_extraram3; |
| 91 | 91 | |
| 92 | 92 | /* sound */ |
| 93 | extern struct upd7759_interface sys16_upd7759_interface; | |
| 93 | extern const struct upd7759_interface sys16_upd7759_interface; | |
| 94 | 94 | |
| 95 | 95 | extern int sys18_sound_info[4*2]; |
| 96 | 96 | |
| r1404 | r1405 | |
| 233 | 233 | extern int sys16_sprxoffset; |
| 234 | 234 | extern int sys16_bgxoffset; |
| 235 | 235 | extern int sys16_fgxoffset; |
| 236 | extern int *sys16_obj_bank; | |
| 236 | extern const int *sys16_obj_bank; | |
| 237 | 237 | extern int sys16_textlayer_lo_min; |
| 238 | 238 | extern int sys16_textlayer_lo_max; |
| 239 | 239 | extern int sys16_textlayer_hi_min; |
| r1404 | r1405 | |
|---|---|---|
| 22 | 22 | READ8_HANDLER( starwars_adc_r ); |
| 23 | 23 | WRITE8_HANDLER( starwars_adc_select_w ); |
| 24 | 24 | |
| 25 | void swmathbox_init(void); | |
| 26 | void swmathbox_reset(void); | |
| 25 | void starwars_mproc_init(void); | |
| 26 | void starwars_mproc_reset(void); | |
| 27 | 27 | |
| 28 | READ8_HANDLER( swmathbx_prng_r ); | |
| 29 | READ8_HANDLER( swmathbx_reh_r ); | |
| 30 | READ8_HANDLER( swmathbx_rel_r ); | |
| 28 | READ8_HANDLER( starwars_prng_r ); | |
| 29 | READ8_HANDLER( starwars_div_reh_r ); | |
| 30 | READ8_HANDLER( starwars_div_rel_r ); | |
| 31 | 31 | |
| 32 | WRITE8_HANDLER( swmath | |
| 32 | WRITE8_HANDLER( starwars_math | |
| 33 | 33 | |
| 34 | 34 | |
| 35 | 35 | /*----------- defined in audio/starwars.c -----------*/ |
| r1404 | r1405 | |
|---|---|---|
| 35 | 35 | { |
| 36 | 36 | /* the tile priority table is a guess compiled by looking at the game. It |
| 37 | 37 | was not derived from a PROM so it could be wrong. */ |
| 38 | static int split_table[16] = | |
| 38 | static const int split_table[16] = | |
| 39 | 39 | { |
| 40 | 40 | 3,0,2,2, /* the fourth could be 1 instead of 2 */ |
| 41 | 41 | 0,1,0,0, |
| r1404 | r1405 | |
|---|---|---|
| 394 | 394 | DMA_DRAW_FUNC(prefix##_c0p1_xf, XFLIP_YES, PIXEL_COLOR, PIXEL_COPY) \ |
| 395 | 395 | DMA_DRAW_FUNC(prefix##_p0c1_xf, XFLIP_YES, PIXEL_COPY, PIXEL_COLOR) \ |
| 396 | 396 | \ |
| 397 | static dma_draw_func prefix[32] = \ | |
| 397 | static const dma_draw_func prefix[32] = \ | |
| 398 | 398 | { \ |
| 399 | 399 | /* B0:N / B1:N B0:Y / B1:N B0:N / B1:Y B0:Y / B1:Y */ \ |
| 400 | 400 | dma_draw_none, prefix##_p0, prefix##_p1, prefix##_p0p1, /* no color */ \ |
| r1404 | r1405 | |
|---|---|---|
| 715 | 715 | } |
| 716 | 716 | |
| 717 | 717 | #ifdef _SHOW_VIDEO_DEBUG |
| 718 | static char *mode[] = { "2PLANE_8BIT", | |
| 718 | static const char *const mode[] = { "2PLANE_8BIT", | |
| 719 | 719 | "2PLANE_16BIT", |
| 720 | 720 | "1PLANE_16COLORS", |
| 721 | 721 | "1PLANE_256COLORS" }; |
| 722 | 722 | |
| 723 | static char *psize[] = { "8x8", "16x16", "32x32", "64x64" }; | |
| 723 | static const char *const psize[] = { "8x8", "16x16", "32x32", "64x64" }; | |
| 724 | 724 | #endif |
| 725 | 725 | |
| 726 | 726 | VIDEO_UPDATE( ygv608 ) |
| r1404 | r1405 | |
|---|---|---|
| 79 | 79 | { |
| 80 | 80 | /* Star Force has more tiles in bg1, so to get a uniform color code spread */ |
| 81 | 81 | /* 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 }; | |
| 83 | 83 | UINT8 code = senjyo_bg1videoram[tile_index]; |
| 84 | 84 | SET_TILE_INFO( |
| 85 | 85 | 1, |
| r1404 | r1405 | |
|---|---|---|
| 343 | 343 | } |
| 344 | 344 | } |
| 345 | 345 | |
| 346 | static int sprite_xtable[2][8] = | |
| 346 | static const int sprite_xtable[2][8] = | |
| 347 | 347 | { |
| 348 | 348 | { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 }, |
| 349 | 349 | { 7*16, 6*16, 5*16, 4*16, 3*16, 2*16, 1*16, 0*16 } |
| 350 | 350 | }; |
| 351 | static int sprite_ytable[2][8] = | |
| 351 | static const int sprite_ytable[2][8] = | |
| 352 | 352 | { |
| 353 | 353 | { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 }, |
| 354 | 354 | { 7*16, 6*16, 5*16, 4*16, 3*16, 2*16, 1*16, 0*16 } |
| r1404 | r1405 | |
|---|---|---|
| 66 | 66 | |
| 67 | 67 | /* Sauro */ |
| 68 | 68 | |
| 69 | static int scroll2_map [8] = {2, 1, 4, 3, 6, 5, 0, 7}; | |
| 70 | static int scroll2_map_flip[8] = {0, 7, 2, 1, 4, 3, 6, 5}; | |
| 69 | static const int scroll2_map[8] = {2, 1, 4, 3, 6, 5, 0, 7}; | |
| 70 | static const int scroll2_map_flip[8] = {0, 7, 2, 1, 4, 3, 6, 5}; | |
| 71 | 71 | |
| 72 | 72 | WRITE8_HANDLER( sauro_scroll_fg_w ) |
| 73 | 73 | { |
| 74 | int *map = (flip_screen ? scroll2_map_flip : scroll2_map); | |
| 74 | const int *map = (flip_screen ? scroll2_map_flip : scroll2_map); | |
| 75 | 75 | int scroll = (data & 0xf8) | map[data & 7]; |
| 76 | 76 | |
| 77 | 77 | tilemap_set_scrollx(fg_tilemap, 0, scroll); |
| r1404 | r1405 | |
|---|---|---|
| 275 | 275 | /* is it on? */ |
| 276 | 276 | if ((spriteram_3[offs+1] & 2) == 0) |
| 277 | 277 | { |
| 278 | static int gfx_offs[2][2] = | |
| 278 | static const int gfx_offs[2][2] = | |
| 279 | 279 | { |
| 280 | 280 | { 0, 1 }, |
| 281 | 281 | { 2, 3 } |
| r1404 | r1405 | |
|---|---|---|
| 556 | 556 | DMA_DRAW_FUNC(prefix##_c0p1_xf, bpp, extract, XFLIP_YES, skip, scale, PIXEL_COLOR, PIXEL_COPY) \ |
| 557 | 557 | DMA_DRAW_FUNC(prefix##_p0c1_xf, bpp, extract, XFLIP_YES, skip, scale, PIXEL_COPY, PIXEL_COLOR) \ |
| 558 | 558 | \ |
| 559 | static dma_draw_func prefix[32] = \ | |
| 559 | static const dma_draw_func prefix[32] = \ | |
| 560 | 560 | { \ |
| 561 | 561 | /* B0:N / B1:N B0:Y / B1:N B0:N / B1:Y B0:Y / B1:Y */ \ |
| 562 | 562 | dma_draw_none, prefix##_p0, prefix##_p1, prefix##_p0p1, /* no color */ \ |
| r1404 | r1405 | |
|---|---|---|
| 380 | 380 | } |
| 381 | 381 | } |
| 382 | 382 | |
| 383 | static void (*blit_z[4])(mame_bitmap *bitmap, const rectangle *cliprect, const UINT8 *src, int x, int y, int sx, int sy, UINT16 zx, UINT16 zy, int colour) = { | |
| 383 | static void (*const blit_z[4])(mame_bitmap *bitmap, const rectangle *cliprect, const UINT8 *src, int x, int y, int sx, int sy, UINT16 zx, UINT16 zy, int colour) = { | |
| 384 | 384 | blit_nf_z, |
| 385 | 385 | blit_fy_z, |
| 386 | 386 | blit_fx_z, |
| r1404 | r1405 | |
|---|---|---|
| 8 | 8 | #include "eminline.h" |
| 9 | 9 | #include "includes/midzeus.h" |
| 10 | 10 | #include "video/poly.h" |
| 11 | #include "video/rgbutil.h" | |
| 11 | 12 | |
| 12 | 13 | |
| 13 | 14 | |
| r1404 | r1405 | |
| 33 | 34 | { |
| 34 | 35 | const UINT64 * palbase; |
| 35 | 36 | const UINT64 * texbase; |
| 37 | UINT16 solidcolor; | |
| 38 | INT16 zoffset; | |
| 36 | 39 | UINT16 transcolor; |
| 37 | 40 | UINT16 texwidth; |
| 38 | 41 | UINT16 color; |
| r1404 | r1405 | |
| 50 | 53 | UINT32 *zeusbase; |
| 51 | 54 | |
| 52 | 55 | static poly_manager *poly; |
| 56 | static UINT8 log_fifo; | |
| 53 | 57 | |
| 54 | static UINT32 zeuscmd_buffer[20]; | |
| 55 | static UINT8 zeuscmd_buffer_words; | |
| 56 | static UINT8 zeuscmd_buffer_expected_words; | |
| 58 | static UINT32 zeus_fifo[20]; | |
| 59 | static UINT8 zeus_fifo_words; | |
| 57 | 60 | static INT16 zeus_matrix[3][3]; |
| 61 | static INT16 zeus_matrix2[3][3]; | |
| 62 | static UINT8 zeus_usematrix2; | |
| 58 | 63 | static INT32 zeus_point[3]; |
| 59 | 64 | static UINT64 *zeus_renderbase; |
| 60 | 65 | static UINT64 *zeus_palbase; |
| 61 | 66 | static int zeus_enable_logging; |
| 62 | static UINT32 zeus_blend; | |
| 63 | static UINT32 zeus_texdata; | |
| 64 | 67 | static UINT32 zeus_objdata; |
| 68 | static rectangle zeus_cliprect; | |
| 65 | 69 | |
| 66 | 70 | static UINT64 *waveram[2]; |
| 67 | 71 | |
| r1404 | r1405 | |
| 82 | 86 | |
| 83 | 87 | static void exit_handler(running_machine *machine); |
| 84 | 88 | |
| 85 | static void zeus_write_16bit(offs_t offset, UINT16 data, int logit); | |
| 86 | static void zeus_write_32bit(offs_t offset, UINT32 data, int logit); | |
| 87 | static void zeus_process_write(offs_t offset); | |
| 88 | static void zeuscmd_execute(int words); | |
| 89 | static UINT8 zeuscmd_length(UINT32 word); | |
| 89 | static void zeus_pointer_w(UINT32 which, UINT32 data, int logit); | |
| 90 | static void zeus_register16_w(offs_t offset, UINT16 data, int logit); | |
| 91 | static void zeus_register32_w(offs_t offset, UINT32 data, int logit); | |
| 92 | static void zeus_register_update(offs_t offset); | |
| 93 | static int zeus_fifo_process(const UINT32 *data, int numwords); | |
| 94 | static void zeus_draw_model(UINT32 texdata, int logit); | |
| 95 | static void zeus_draw_quad(const UINT32 *databuffer, UINT32 texdata, int logit); | |
| 90 | 96 | |
| 97 | static void render_poly_4bit(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid); | |
| 98 | static void render_poly_8bit(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid); | |
| 99 | static void render_poly_shade(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid); | |
| 100 | static void render_poly_solid(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid); | |
| 101 | static void render_poly_solid_fixedz(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid); | |
| 91 | 102 | |
| 103 | static void log_fifo_command(const UINT32 *data, int numwords, const char *suffix); | |
| 104 | static void log_waveram(UINT32 length_and_base); | |
| 92 | 105 | |
| 106 | ||
| 107 | ||
| 93 | 108 | /************************************* |
| 94 | 109 | * |
| 95 | 110 | * Inlines |
| r1404 | r1405 | |
| 110 | 125 | |
| 111 | 126 | INLINE UINT64 *waveram_ptr_from_texture_addr(UINT8 bank, UINT32 addr, int width) |
| 112 | 127 | { |
| 113 | return &waveram[bank][(addr * width) / 8]; | |
| 128 | return &waveram[bank][((addr & ~1) * width) / 8]; | |
| 114 | 129 | } |
| 115 | 130 | |
| 116 | 131 | |
| r1404 | r1405 | |
| 160 | 175 | } |
| 161 | 176 | |
| 162 | 177 | |
| 178 | INLINE 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 | ||
| 163 | 190 | INLINE UINT8 get_texel_8bit(const UINT64 *base, int y, int x, int width) |
| 164 | 191 | { |
| 165 | 192 | const UINT8 *base8 = (const UINT8 *)base; |
| 166 | x &= width - 1; | |
| 167 | 193 | base8 += BYTE8_XOR_LE((y / 2) * (width * 2) + (x / 4) * 8 + (y & 1) * 4 + (x & 3)); |
| 168 | 194 | return *base8; |
| 169 | 195 | } |
| r1404 | r1405 | |
| 172 | 198 | INLINE UINT8 get_texel_4bit(const UINT64 *base, int y, int x, int width) |
| 173 | 199 | { |
| 174 | 200 | const UINT8 *base8 = (const UINT8 *)base; |
| 175 | x &= (width * 2) - 1; | |
| 176 | 201 | base8 += BYTE8_XOR_LE((y / 2) * (width * 2) + (x / 8) * 8 + (y & 1) * 4 + ((x / 2) & 3)); |
| 177 | 202 | return (*base8 >> (4 * (x & 1))) & 0x0f; |
| 178 | 203 | } |
| r1404 | r1405 | |
| 197 | 222 | int i; |
| 198 | 223 | |
| 199 | 224 | /* 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])); | |
| 202 | 227 | state_save_register_global_pointer(waveram[0], WAVERAM_WIDTH * WAVERAM_HEIGHT); |
| 203 | 228 | state_save_register_global_pointer(waveram[1], WAVERAM_WIDTH * WAVERAM_HEIGHT); |
| 204 | 229 | |
| r1404 | r1405 | |
| 250 | 275 | if (!input_code_pressed(KEYCODE_W)) |
| 251 | 276 | { |
| 252 | 277 | UINT64 *base = waveram_ptr_from_expanded_addr(1, zeusbase[0xcc]); |
| 278 | int xoffs = machine->screen[screen].visarea.min_x; | |
| 253 | 279 | for (y = cliprect->min_y; y <= cliprect->max_y; y++) |
| 254 | 280 | { |
| 255 | 281 | UINT16 *dest = (UINT16 *)bitmap->base + y * bitmap->rowpixels; |
| 256 | 282 | 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); | |
| 258 | 284 | } |
| 259 | 285 | |
| 260 | 286 | if (single_step) |
| r1404 | r1405 | |
| 319 | 345 | |
| 320 | 346 | |
| 321 | 347 | |
| 348 | /************************************* | |
| 349 | * | |
| 350 | * Core read handler | |
| 351 | * | |
| 352 | *************************************/ | |
| 322 | 353 | |
| 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 | ||
| 397 | MK4: | |
| 398 | ||
| 399 | Zeus cmd 18 : 18D60000 500A00FF | |
| 400 | Zeus cmd 00 : 0005C0A5 21001125 | |
| 401 | Zeus cmd 25 : 25000000 007F0018 01000400 B0F60008 | |
| 402 | Zeus cmd 18 : 18D60000 500A00FF | |
| 403 | Zeus cmd 18 : 18CE0000 00FFFFFF | |
| 404 | Zeus cmd 1A : 1A000000 | |
| 405 | Zeus cmd 18 : 187E0000 0000FFFF | |
| 406 | Zeus cmd 1A : 1A000000 | |
| 407 | Zeus cmd 18 : 18CE0000 00FFFFFF | |
| 408 | Zeus cmd 1A : 1A000000 | |
| 409 | Zeus cmd 18 : 187E0000 FF980000 | |
| 410 | Zeus cmd 00 : 0080C0A5 3F00102F | |
| 411 | Zeus cmd 17 : 17681370 | |
| 412 | Zeus cmd 17 : 176940C4 | |
| 413 | Zeus cmd 1C : ( 4000 0000 0000 ) ( 0000 4000 0000 ) ( 0000 0000 4000 ) -152.00 -50.00 1.25000 | |
| 414 | Zeus cmd 00 : 0000C040 0318E132 -> palette @ (18E,132) | |
| 415 | Zeus cmd 67 : 67008000 0919F1C4 151 01FA4C -> render @ (19F,1C4) | |
| 416 | Zeus cmd 1C : ( 4000 0000 0000 ) ( 0000 4000 0000 ) ( 0000 0000 4000 ) -135.00 -50.00 1.25000 | |
| 417 | Zeus cmd 67 : 67008000 0919F1C4 151 01FA4C | |
| 418 | Zeus cmd 1C : ( 4000 0000 0000 ) ( 0000 4000 0000 ) ( 0000 0000 4000 ) -118.00 -50.00 1.25000 | |
| 419 | Zeus cmd 67 : 67008000 0919F1C4 151 01F988 | |
| 420 | Zeus cmd 1C : ( 4000 0000 0000 ) ( 0000 4000 0000 ) ( 0000 0000 4000 ) -101.00 -50.00 1.25000 | |
| 421 | ||
| 422 | 19F1BA: 19DC0000 00000000 19840000 00F01605 25810000 21010000 FFD00000 00000000 FFD00038 000E0000 00080038 0E0E0000 00080000 0E000000 30000000 30000000 30000000 30000000 08000000 00000000 | |
| 423 | 19F1C4: 19DC0000 00000000 19840000 00F01605 25800000 21010000 FFD0FFFC 00000000 FFD0003C 00100000 0008003C 0E100000 0008FFFC 0E000000 30000000 30000000 30000000 30000000 08000000 00000000 | |
| 424 | 19F1CE: 19DC0000 00000000 19840000 00F01605 25800000 21010000 FFD0FFFC 00000000 FFD00028 000B0000 00080028 0E0B0000 0008FFFC 0E000000 30000000 30000000 30000000 30000000 08000000 00000000 | |
| 425 | 19F1D8: 19DC0000 00000000 19840000 00F01605 25800000 21010000 FFD00000 00000000 FFD00034 000D0000 00080034 0E0D0000 00080000 0E000000 30000000 30000000 30000000 30000000 08000000 00000000 | |
| 426 | 19F1E2: 19DC0000 00000000 19840000 00F01605 25800000 21010000 FFD00000 00000000 FFD00028 000A0000 000C0028 0F0A0000 000C0000 0F000000 30000000 30000000 30000000 30000000 08000000 00000000 | |
| 427 | 19F1EC: 19DC0000 00000000 19840000 00F01605 25800000 21010000 FFD00000 00000000 FFD00014 00050000 00080014 0E050000 00080000 0E000000 30000000 30000000 30000000 30000000 08000000 00000000 | |
| 428 | 19F1F6: 19DC0000 00000000 19840000 00F01605 25810000 21010000 FFD0FFFC 00000000 FFD00034 000E0000 00080034 0E0E0000 0008FFFC 0E000000 30000000 30000000 30000000 30000000 08000000 00000000 | |
| 429 | 1A0000: 19DC0000 00000000 19840000 00F01605 25800000 21010000 FFCC0000 00000000 FFCC0038 000E0000 000C0038 100E0000 000C0000 10000000 30000000 30000000 30000000 30000000 08000000 00000000 | |
| 430 | 1A000A: 19DC0000 00000000 19840000 00F01605 25800000 21010000 FFCC0000 00000000 FFCC0034 000D0000 000C0034 100D0000 000C0000 10000000 30000000 30000000 30000000 30000000 08000000 00000000 | |
| 431 | 1A0014: 19DC0000 00000000 19840000 00F01605 25800000 21010000 FFCC0000 00000000 FFCC002C 000B0000 0008002C 0F0B0000 00080000 0F000000 30000000 30000000 30000000 30000000 08000000 00000000 | |
| 432 | 1A001E: 19DC0000 00000000 19840000 00F01605 25800000 21010000 FFCC0000 00000000 FFCC002C 000B0000 000C002C 100B0000 000C0000 10000000 30000000 30000000 30000000 30000000 08000000 00000000 | |
| 433 | 1A0028: 19DC0000 00000000 19840000 00F01605 25800000 21010000 FFD00000 00000000 FFD0002C 000B0000 000C002C 0F0B0000 000C0000 0F000000 30000000 30000000 30000000 30000000 08000000 00000000 | |
| 434 | 1A0032: 19DC0000 00000000 19840000 00F01605 25800000 21010000 FFD00000 00000000 FFD00018 00060000 00080018 0E060000 00080000 0E000000 30000000 30000000 30000000 30000000 08000000 00000000 | |
| 435 | 1A003C: 19DC0000 40B68800 19840000 00001604 25800000 21010000 FF9CFF64 00000000 FF9C0084 00480000 005C0084 30480000 005CFF64 30000000 30000000 30000000 30000000 30000000 08000000 00000000 | |
| 436 | 1A0046: 19DC0000 40B68800 19840000 00001604 25800000 21010000 FF80FF48 00000000 FF80009C 00550000 0070009C 3C550000 0070FF48 3C000000 30000000 30000000 30000000 30000000 08000000 00000000 | |
| 437 | 1A0050: 19DC0000 40B68800 19840000 00001604 25800000 21010000 FF68FF30 00000000 FF6800B0 00600000 008800B0 48600000 0088FF30 48000000 30000000 30000000 30000000 30000000 08000000 00000000 | |
| 438 | 1A005A: 19DC0000 40B68800 19840000 00001604 25800000 21010000 FF54FF20 00000000 FF5400C4 00690000 00A000C4 53690000 00A0FF20 53000000 30000000 30000000 30000000 30000000 08000000 00000000 | |
| 439 | 1A0064: 19DC0000 40B68800 19840000 00001604 25800000 21010000 FF44FF10 00000000 FF4400D4 00710000 00B000D4 5B710000 00B0FF10 5B000000 30000000 30000000 30000000 30000000 08000000 00000000 | |
| 440 | 1A006E: 19DC0000 40B68800 19840000 00001604 25800000 21010000 FF3CFF08 00000000 FF3C00E4 00770000 00B400E4 5E770000 00B4FF08 5E000000 30000000 30000000 30000000 30000000 08000000 00000000 | |
| 441 | 1A0078: 19DC0000 40B68800 19840000 00001604 25800000 21010000 FF38FEFC 00000000 FF3800E4 007A0000 00C000E4 627A0000 00C0FEFC 62000000 30000000 30000000 30000000 30000000 08000000 00000000 | |
| 442 | 1A0082: 19DC0000 40B68800 19840000 00001604 25800000 21010000 FF28FEFC 00000000 FF2800EC 007C0000 00C000EC 667C0000 00C0FEFC 66000000 30000000 30000000 30000000 30000000 08000000 00000000 | |
| 443 | 1A008C: 19DC0000 40B68800 19840000 00001604 25800000 21010000 FF60FF28 00000000 FF6000C0 00660000 009C00C0 4F660000 009CFF28 4F000000 30000000 30000000 30000000 30000000 08000000 00000000 | |
| 444 | 1A0096: 19DC0000 40B68800 19840000 00001604 25800000 21010000 FF80FF48 00000000 FF80009C 00550000 0078009C 3E550000 0078FF48 3E000000 30000000 30000000 30000000 30000000 08000000 00000000 | |
| 445 | 1A00A0: 19DC0000 40B68800 19840000 00001604 25800000 21010000 FF94FF5C 00000000 FF940088 004B0000 00640088 344B0000 0064FF5C 34000000 30000000 30000000 30000000 30000000 08000000 00000000 | |
| 446 | 1A00AA: 19DC0000 40B68800 19840000 00001604 25810000 21010000 FFA4FF6C 00000000 FFA4007C 00440000 0054007C 2C440000 0054FF6C 2C000000 30000000 30000000 30000000 30000000 08000000 00000000 | |
| 447 | 1A00B4: 19DC0000 40B68800 19840000 00001604 25800000 21010000 FFACFF78 00000000 FFAC0070 003E0000 00480070 273E0000 0048FF78 27000000 30000000 30000000 30000000 30000000 08000000 00000000 | |
| 448 | 1A00BE: 19DC0000 40B68800 19840000 00001604 25800000 21010000 FFB4FF7C 00000000 FFB4006C 003C0000 0044006C 243C0000 0044FF7C 24000000 30000000 30000000 30000000 30000000 08000000 00000000 | |
| 449 | 1A00C8: 19DC0000 00000000 19840000 00001605 25800000 21000000 FF42FF02 00000000 FF4200FE 007F0000 00BE00FE 5F7F0000 00BEFF02 5F000000 30000000 30000000 30000000 30000000 08000000 00000000 | |
| 450 | 1A00D2: 19DC0000 00000000 19840000 00001605 25800000 21010000 FFB0FF70 00000000 FFB0007C 00430000 0054007C 29430000 0054FF70 29000000 30000000 30000000 30000000 30000000 08000000 00000000 | |
| 451 | 1A00DC: 19DC0000 40B68800 19840000 00001604 25800000 21010000 FA10F810 00000000 FA1007F0 007F0000 05F007F0 5F7F0000 05F0F810 5F000000 30000000 30000000 30000000 30000000 08000000 00000000 | |
| 452 | 1A00E6: 0C02C0F0 0F18E1BE | |
| 453 | 19DC0000 4B23CB00 19840000 00001605 252978EF 200C0000 04480000 00000000 043D0000 0000001E 043DFFEB 00000015 043DFFEB 00000015 00040000 0A331400 0743178C 0743178C | |
| 454 | 1A00F0: 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 | |
| 458 | 1A010C: 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 | |
| 464 | 1A0130: 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 | |
| 468 | 1A014C: 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 | |
| 474 | 1A0170: 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 | |
| 478 | 1A018C: 2597392B 200C0000 04290000 0000FFD7 0429001D 0000FFE3 043D0015 0000FFEB 043D0000 0000FFE2 30911006 34D110AA 3732D870 34D2D815 | |
| 479 | 0C018000 381A0194 | |
| 480 | 1A0194: 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 | |
| 484 | 1A01B0: 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 | |
| 488 | 1A01CC: 0C018000 311A01CD | |
| 489 | 25300076 200C0000 F6660029 00000000 F666001D 0000001D 0429001D 0000001D 04290029 00000000 00FF24FA 0A6F24BB 0A60DCBB 00F0DCFA | |
| 490 | 1A01D4: 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 | |
| 494 | 1A01F0: 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 | |
| 497 | 1A1000: 25D00076 200C0000 F666001D 0000FFE3 F6660029 00000000 04290029 00000000 0429001D 0000FFE3 35AF24BB 3F1F24FA 3F10DCFA 35A0DCBB | |
| 498 | 08000000 00000000 | |
| 499 | */ | |
| 500 | ||
| 501 | /* | |
| 502 | ||
| 503 | Note this sequence: | |
| 504 | Zeus cmd 17 : 1757500A | |
| 505 | Zeus cmd 17 : 175600FF | |
| 506 | Zeus cmd 17 : 176F0032 | |
| 507 | Zeus cmd 17 : 176E0031 | |
| 508 | Zeus cmd 17 : 176D003B | |
| 509 | Zeus cmd 17 : 176C002F | |
| 510 | ||
| 511 | Appears to do the same thing as: | |
| 512 | Zeus cmd 18 : 18D60000 500A00FF | |
| 513 | Zeus cmd 18 : 18EE0000 00320031 | |
| 514 | Zeus cmd 18 : 18EC0000 003B002F | |
| 515 | ||
| 516 | ||
| 517 | ||
| 518 | Also this sequence: | |
| 519 | Zeus cmd 17 : 176940C4 | |
| 520 | Zeus cmd 17 : 17681370 | |
| 521 | ||
| 522 | Seems to have the same purpose as this part of the command stream: | |
| 523 | 19E80000 40C41370 | |
| 524 | ||
| 525 | ||
| 526 | ||
| 527 | Invasion startup: | |
| 528 | ||
| 529 | 00CC86:zeus16_w(81) = 0000 [00000000] | |
| 530 | 00CC86:zeus16_w(80) = 0000 [00000000] | |
| 531 | 00CC86:zeus16_w(4B) = 018F [018F0000] | |
| 532 | 00CC86:zeus16_w(4A) = 01FE [018F01FE] | |
| 533 | 00CC86:zeus16_w(49) = 018F [018F0000] | |
| 534 | 00CC86:zeus16_w(48) = 01FE [018F01FE] | |
| 535 | 00CC86:zeus16_w(CE) = 7620 [00007620] | |
| 536 | 00CC86:zeus16_w(CD) = 0000 [00000000] | |
| 537 | 00CC86:zeus16_w(CC) = 0000 [00000000] | |
| 538 | 00CC86:zeus16_w(CB) = 0116 [01160000] | |
| 539 | 00CC86:zeus16_w(CA) = 0107 [01160107] | |
| 540 | 00CC86:zeus16_w(C9) = 0103 [01030000] | |
| 541 | 00CC86:zeus16_w(C8) = 00FF [010300FF] | |
| 542 | 00CC86:zeus16_w(C7) = 0211 [02110000] | |
| 543 | 00CC86:zeus16_w(C6) = 007F [0211007F] | |
| 544 | 00CC86:zeus16_w(C5) = 000C [000C0000] | |
| 545 | 00CC86:zeus16_w(C4) = 004C [000C004C] | |
| 546 | 00CC86:zeus16_w(C3) = 001F [001F0000] | |
| 547 | 00CC86:zeus16_w(C2) = E591 [001FE591] | |
| 548 | 00CC86:zeus16_w(C1) = 801F [801F0000] | |
| 549 | 00CC86:zeus16_w(C0) = 2500 [801F2500] | |
| 550 | 00CC86:zeus16_w(86) = 8003 [00008003] | |
| 551 | 00CC86:zeus16_w(80) = 0C05 [00000C05] | |
| 552 | 00CC86:zeus16_w(8F) = 0206 [02060000] | |
| 553 | 00CC86:zeus16_w(8E) = 0000 [02060000] | |
| 554 | 00CC86:zeus16_w(8D) = 0226 [02260000] | |
| 555 | 00CC86:zeus16_w(8C) = 0000 [02260000] | |
| 556 | 00CC86:zeus16_w(8B) = 0000 [00000000] | |
| 557 | 00CC86:zeus16_w(8A) = FAFA [0000FAFA] | |
| 558 | 00CC86:zeus16_w(89) = 0000 [00000000] | |
| 559 | 00CC86:zeus16_w(88) = FAFA [0000FAFA] | |
| 560 | 00CC86:zeus16_w(80) = 0001 [00000001] | |
| 561 | 00CC86:zeus16_w(8F) = 0207 [02070000] | |
| 562 | 00CC86:zeus16_w(8E) = BFFF [0207BFFF] | |
| 563 | 00CC86:zeus16_w(8F) = 0206 [0206BFFF] | |
| 564 | 00CC86:zeus16_w(8E) = 0000 [02060000] | |
| 565 | 00CC86:zeus16_w(8D) = 0227 [02270000] | |
| 566 | 00CC86:zeus16_w(8C) = BFFF [0227BFFF] | |
| 567 | 00CC86:zeus16_w(8D) = 0226 [0226BFFF] | |
| 568 | 00CC86:zeus16_w(8C) = 0000 [02260000] | |
| 569 | 00CC86:zeus16_w(8F) = 0207 [02070000] | |
| 570 | 00CC86:zeus16_w(8E) = F020 [0207F020] | |
| 571 | 00CC86:zeus16_w(8F) = 0206 [0206F020] | |
| 572 | 00CC86:zeus16_w(8E) = 0000 [02060000] | |
| 573 | 00CC86:zeus16_w(8D) = 0227 [02270000] | |
| 574 | 00CC86:zeus16_w(8C) = F020 [0227F020] | |
| 575 | 00CC86:zeus16_w(8D) = 0226 [0226F020] | |
| 576 | 00CC86:zeus16_w(8C) = 0000 [02260000] | |
| 577 | 00CC86:zeus16_w(8F) = 0207 [02070000] | |
| 578 | 00CC86:zeus16_w(8E) = DFFF [0207DFFF] | |
| 579 | 00CC86:zeus16_w(8F) = 0206 [0206DFFF] | |
| 580 | 00CC86:zeus16_w(8E) = 0000 [02060000] | |
| 581 | 00CC86:zeus16_w(8D) = 0227 [02270000] | |
| 582 | 00CC86:zeus16_w(8C) = DFFF [0227DFFF] | |
| 583 | 00CC86:zeus16_w(8D) = 0226 [0226DFFF] | |
| 584 | 00CC86:zeus16_w(8C) = 0000 [02260000] | |
| 585 | 00CC86:zeus16_w(8F) = 0207 [02070000] | |
| 586 | 00CC86:zeus16_w(8E) = DFFF [0207DFFF] | |
| 587 | 00CC86:zeus16_w(8F) = 0206 [0206DFFF] | |
| 588 | 00CC86:zeus16_w(8E) = 0000 [02060000] | |
| 589 | 00CC86:zeus16_w(8D) = 0227 [02270000] | |
| 590 | 00CC86:zeus16_w(8C) = DFFF [0227DFFF] | |
| 591 | 00CC86:zeus16_w(8D) = 0226 [0226DFFF] | |
| 592 | 00CC86:zeus16_w(8C) = 0000 [02260000] | |
| 593 | 00CC86:zeus16_w(8F) = 0206 [02060000] | |
| 594 | 00CC86:zeus16_w(8E) = 0000 [02060000] | |
| 595 | 00CC86:zeus16_w(8D) = 0226 [02260000] | |
| 596 | 00CC86:zeus16_w(8C) = 0000 [02260000] | |
| 597 | 00CC86:zeus16_w(8B) = 0000 [0000FAFA] | |
| 598 | 00CC86:zeus16_w(8A) = D254 [0000D254] | |
| 599 | 00CC86:zeus16_w(89) = 8FFF [8FFFFAFA] | |
| 600 | 00CC86:zeus16_w(88) = D794 [8FFFD794] | |
| 601 | 00CC86:zeus16_w(85) = 0000 [00000000] | |
| 602 | 00CC86:zeus16_w(84) = 0000 [00000000] | |
| 603 | 00CC86:zeus16_w(83) = 1F1F [1F1F0000] | |
| 604 | 00CC86:zeus16_w(82) = 2011 [1F1F2011] | |
| 605 | 00CC86:zeus16_w(69) = 0003 [00030000] | |
| 606 | 00CC86:zeus16_w(69) = 0000 [00000000] | |
| 607 | 00CC86:zeus16_w(68) = 0100 [00000100] | |
| 608 | 00CC92:zeus16_w(200) = 0100 [00000100] | |
| 609 | 00CC92:zeus16_w(201) = 0000 [00000100] | |
| 610 | 00CC92:zeus16_w(202) = 0000 [00000000] | |
| 611 | 00CC92:zeus16_w(203) = 0000 [00000000] | |
| 612 | 00CC92:zeus16_w(204) = 00D4 [000000D4] | |
| 613 | 00CC92:zeus16_w(205) = 0000 [000000D4] | |
| 614 | 00CC92:zeus16_w(206) = 0000 [00000000] | |
| 615 | 00CC92:zeus16_w(207) = A000 [A0000000] | |
| 616 | 00CC92:zeus16_w(208) = 0050 [00000050] | |
| 617 | 00CC92:zeus16_w(209) = 0000 [00000050] | |
| 618 | 00CC92:zeus16_w(20A) = 0000 [00000000] | |
| 619 | 00CC92:zeus16_w(20B) = A000 [A0000000] | |
| 620 | 00CC92:zeus16_w(20C) = 0703 [00000703] | |
| 621 | 00CC92:zeus16_w(20D) = 0000 [00000703] | |
| 622 | 00CC92:zeus16_w(20E) = 0000 [00000000] | |
| 623 | 00CC92:zeus16_w(20F) = 0000 [00000000] | |
| 624 | 00CC92:zeus16_w(210) = 0050 [00000050] | |
| 625 | 00CC92:zeus16_w(211) = 0000 [00000050] | |
| 626 | 00CC92:zeus16_w(212) = 0000 [00000000] | |
| 627 | 00CC92:zeus16_w(213) = A000 [A0000000] | |
| 628 | 00CC92:zeus16_w(214) = 005A [0000005A] | |
| 629 | 00CC92:zeus16_w(215) = 01C0 [01C0005A] | |
| 630 | 00CC92:zeus16_w(216) = 0000 [00000000] | |
| 631 | 00CC92:zeus16_w(217) = B000 [B0000000] | |
| 632 | 00CC92:zeus16_w(218) = 00D8 [000000D8] | |
| 633 | 00CC92:zeus16_w(219) = 0000 [000000D8] | |
| 634 | 00CC92:zeus16_w(21A) = 0000 [00000000] | |
| 635 | 00CC92:zeus16_w(21B) = 9000 [90000000] | |
| 636 | 00CC92:zeus16_w(21C) = 0607 [00000607] | |
| 637 | 00CC92:zeus16_w(21D) = 0000 [00000607] | |
| 638 | 00CC92:zeus16_w(21E) = 0000 [00000000] | |
| 639 | 00CC92:zeus16_w(21F) = 0000 [00000000] | |
| 640 | 00CC92:zeus16_w(220) = C000 [0000C000] | |
| 641 | 00CC92:zeus16_w(221) = 0008 [0008C000] | |
| 642 | 00CC92:zeus16_w(222) = 0000 [00000000] | |
| 643 | 00CC92:zeus16_w(223) = 003F [003F0000] | |
| 644 | 00CC92:zeus16_w(224) = 006A [0000006A] | |
| 645 | 00CC92:zeus16_w(225) = 01D0 [01D0006A] | |
| 646 | 00CC92:zeus16_w(226) = 0025 [00000025] | |
| 647 | 00CC92:zeus16_w(227) = B000 [B0000025] | |
| 648 | 00CC92:zeus16_w(228) = 0F00 [00000F00] | |
| 649 | 00CC92:zeus16_w(229) = 0000 [00000F00] | |
| 650 | 00CC92:zeus16_w(22A) = 0001 [00000001] | |
| 651 | 00CC92:zeus16_w(22B) = 0000 [00000001] | |
| 652 | 00CC92:zeus16_w(22C) = 0E08 [00000E08] | |
| 653 | 00CC92:zeus16_w(22D) = 0000 [00000E08] | |
| 654 | 00CC92:zeus16_w(22E) = 0000 [00000000] | |
| 655 | 00CC92:zeus16_w(22F) = 0000 [00000000] | |
| 656 | 00CC92:zeus16_w(230) = 00D4 [000000D4] | |
| 657 | 00CC92:zeus16_w(231) = 0000 [000000D4] | |
| 658 | 00CC92:zeus16_w(232) = 0000 [00000000] | |
| 659 | 00CC92:zeus16_w(233) = A000 [A0000000] | |
| 660 | 00CC92:zeus16_w(234) = 0050 [00000050] | |
| 661 | 00CC92:zeus16_w(235) = 0000 [00000050] | |
| 662 | 00CC92:zeus16_w(236) = 0000 [00000000] | |
| 663 | 00CC92:zeus16_w(237) = A000 [A0000000] | |
| 664 | 00CC92:zeus16_w(238) = 070E [0000070E] | |
| 665 | 00CC92:zeus16_w(239) = 0000 [0000070E] | |
| 666 | 00CC92:zeus16_w(23A) = 0000 [00000000] | |
| 667 | 00CC92:zeus16_w(23B) = 0000 [00000000] | |
| 668 | 00CC92:zeus16_w(23C) = 0050 [00000050] | |
| 669 | 00CC92:zeus16_w(23D) = 0000 [00000050] | |
| 670 | 00CC92:zeus16_w(23E) = 0000 [00000000] | |
| 671 | 00CC92:zeus16_w(23F) = A000 [A0000000] | |
| 672 | 00CC92:zeus16_w(240) = 005A [0000005A] | |
| 673 | 00CC92:zeus16_w(241) = 01C0 [01C0005A] | |
| 674 | 00CC92:zeus16_w(242) = 0000 [00000000] | |
| 675 | 00CC92:zeus16_w(243) = B000 [B0000000] | |
| 676 | 00CC92:zeus16_w(244) = 00D8 [000000D8] | |
| 677 | 00CC92:zeus16_w(245) = 0000 [000000D8] | |
| 678 | 00CC92:zeus16_w(246) = 0000 [00000000] | |
| 679 | 00CC92:zeus16_w(247) = 8CC0 [8CC00000] | |
| 680 | 00CC92:zeus16_w(248) = 0612 [00000612] | |
| 681 | 00CC92:zeus16_w(249) = 0000 [00000612] | |
| 682 | 00CC92:zeus16_w(24A) = 0000 [00000000] | |
| 683 | 00CC92:zeus16_w(24B) = 0000 [00000000] | |
| 684 | 00CC92:zeus16_w(24C) = D000 [0000D000] | |
| 685 | 00CC92:zeus16_w(24D) = 0008 [0008D000] | |
| 686 | 00CC92:zeus16_w(24E) = 8000 [00008000] | |
| 687 | 00CC92:zeus16_w(24F) = 003E [003E8000] | |
| 688 | 00CC92:zeus16_w(250) = 006A [0000006A] | |
| 689 | 00CC92:zeus16_w(251) = 01D0 [01D0006A] | |
| 690 | 00CC92:zeus16_w(252) = 0025 [00000025] | |
| 691 | 00CC92:zeus16_w(253) = B000 [B0000025] | |
| 692 | 00CC92:zeus16_w(254) = 0F00 [00000F00] | |
| 693 | 00CC92:zeus16_w(255) = 0000 [00000F00] | |
| 694 | 00CC92:zeus16_w(256) = 0001 [00000001] | |
| 695 | 00CC92:zeus16_w(257) = 0000 [00000001] | |
| 696 | 00CC92:zeus16_w(258) = 0E13 [00000E13] | |
| 697 | 00CC92:zeus16_w(259) = 0000 [00000E13] | |
| 698 | 00CC92:zeus16_w(25A) = 0000 [00000000] | |
| 699 | 00CC92:zeus16_w(25B) = 0000 [00000000] | |
| 700 | 00CC92:zeus16_w(25C) = 0F00 [00000F00] | |
| 701 | 00CC92:zeus16_w(25D) = 05C0 [05C00F00] | |
| 702 | 00CC92:zeus16_w(25E) = 0000 [00000000] | |
| 703 | 00CC92:zeus16_w(25F) = B000 [B0000000] | |
| 704 | 00CC92:zeus16_w(260) = 0F80 [00000F80] | |
| 705 | 00CC92:zeus16_w(261) = 0400 [04000F80] | |
| 706 | 00CC92:zeus16_w(262) = 0000 [00000000] | |
| 707 | 00CC92:zeus16_w(263) = 9000 [90000000] | |
| 708 | 00CC92:zeus16_w(264) = 0F80 [00000F80] | |
| 709 | 00CC92:zeus16_w(265) = 0400 [04000F80] | |
| 710 | 00CC92:zeus16_w(266) = 0000 [00000000] | |
| 711 | 00CC92:zeus16_w(267) = 8CC0 [8CC00000] | |
| 712 | 00CC92:zeus16_w(268) = 011A [0000011A] | |
| 713 | 00CC92:zeus16_w(269) = 0000 [0000011A] | |
| 714 | 00CC92:zeus16_w(26A) = 0000 [00000000] | |
| 715 | 00CC92:zeus16_w(26B) = 0000 [00000000] | |
| 716 | 00CC92:zeus16_w(26C) = 0F00 [00000F00] | |
| 717 | 00CC92:zeus16_w(26D) = 0000 [00000F00] | |
| 718 | 00CC92:zeus16_w(26E) = 0000 [00000000] | |
| 719 | 00CC92:zeus16_w(26F) = 0000 [00000000] | |
| 720 | 00CC92:zeus16_w(270) = A001 [0000A001] | |
| 721 | 00CC92:zeus16_w(271) = 0003 [0003A001] | |
| 722 | 00CC92:zeus16_w(272) = 0025 [00000025] | |
| 723 | 00CC92:zeus16_w(273) = 0000 [00000025] | |
| 724 | 00CC92:zeus16_w(274) = 0000 [00000000] | |
| 725 | 00CC92:zeus16_w(275) = 40F3 [40F30000] | |
| 726 | 00CC92:zeus16_w(276) = 0000 [00000000] | |
| 727 | 00CC92:zeus16_w(277) = 0000 [00000000] | |
| 728 | 00CC92:zeus16_w(278) = 4000 [00004000] | |
| 729 | 00CC92:zeus16_w(279) = 0803 [08034000] | |
| 730 | 00CC92:zeus16_w(27A) = 2000 [00002000] | |
| 731 | 00CC92:zeus16_w(27B) = 0013 [00132000] | |
| 732 | 00CC92:zeus16_w(27C) = 8000 [00008000] | |
| 733 | 00CC92:zeus16_w(27D) = 0003 [00038000] | |
| 734 | 00CC92:zeus16_w(27E) = 1000 [00001000] | |
| 735 | 00CC92:zeus16_w(27F) = 003E [003E1000] | |
| 736 | 00CC92:zeus16_w(280) = 20F0 [000020F0] | |
| 737 | 00CC92:zeus16_w(281) = 0001 [000120F0] | |
| 738 | 00CC92:zeus16_w(282) = 0000 [00000000] | |
| 739 | 00CC92:zeus16_w(283) = 93C0 [93C00000] | |
| 740 | 00CC92:zeus16_w(284) = 60F2 [000060F2] | |
| 741 | 00CC92:zeus16_w(285) = 0001 [000160F2] | |
| 742 | 00CC92:zeus16_w(286) = 0000 [00000000] | |
| 743 | 00CC92:zeus16_w(287) = 9380 [93800000] | |
| 744 | 00CC92:zeus16_w(288) = FFF4 [0000FFF4] | |
| 745 | 00CC92:zeus16_w(289) = 0001 [0001FFF4] | |
| 746 | 00CC92:zeus16_w(28A) = 0000 [00000000] | |
| 747 | 00CC92:zeus16_w(28B) = 90C0 [90C00000] | |
| 748 | 00CC92:zeus16_w(28C) = 0000 [00000000] | |
| 749 | 00CC92:zeus16_w(28D) = 0000 [00000000] | |
| 750 | 00CC92:zeus16_w(28E) = 0000 [00000000] | |
| 751 | 00CC92:zeus16_w(28F) = 0000 [00000000] | |
| 752 | 00CC92:zeus16_w(290) = 0000 [00000000] | |
| 753 | 00CC92:zeus16_w(291) = 0000 [00000000] | |
| 754 | 00CC92:zeus16_w(292) = 0000 [00000000] | |
| 755 | 00CC92:zeus16_w(293) = 0000 [00000000] | |
| 756 | 00CC92:zeus16_w(294) = 0000 [00000000] | |
| 757 | 00CC92:zeus16_w(295) = 0000 [00000000] | |
| 758 | 00CC92:zeus16_w(296) = 0000 [00000000] | |
| 759 | 00CC92:zeus16_w(297) = 0000 [00000000] | |
| 760 | 00CC92:zeus16_w(298) = 0000 [00000000] | |
| 761 | 00CC92:zeus16_w(299) = 0000 [00000000] | |
| 762 | 00CC92:zeus16_w(29A) = 0000 [00000000] | |
| 763 | 00CC92:zeus16_w(29B) = 0000 [00000000] | |
| 764 | 00CC92:zeus16_w(29C) = 0000 [00000000] | |
| 765 | 00CC92:zeus16_w(29D) = 0000 [00000000] | |
| 766 | 00CC92:zeus16_w(29E) = 0000 [00000000] | |
| 767 | 00CC92:zeus16_w(29F) = 0000 [00000000] | |
| 768 | 00CC92:zeus16_w(2A0) = 0000 [00000000] | |
| 769 | 00CC92:zeus16_w(2A1) = 0000 [00000000] | |
| 770 | 00CC92:zeus16_w(2A2) = 0000 [00000000] | |
| 771 | 00CC92:zeus16_w(2A3) = 0000 [00000000] | |
| 772 | 00CC92:zeus16_w(2A4) = 0000 [00000000] | |
| 773 | 00CC92:zeus16_w(2A5) = 0000 [00000000] | |
| 774 | 00CC92:zeus16_w(2A6) = 0000 [00000000] | |
| 775 | 00CC92:zeus16_w(2A7) = 0000 [00000000] | |
| 776 | 00CC92:zeus16_w(2A8) = 0000 [00000000] | |
| 777 | 00CC92:zeus16_w(2A9) = 0000 [00000000] | |
| 778 | 00CC92:zeus16_w(2AA) = 0000 [00000000] | |
| 779 | 00CC92:zeus16_w(2AB) = 0000 [00000000] | |
| 780 | 00CC92:zeus16_w(2AC) = 0000 [00000000] | |
| 781 | 00CC92:zeus16_w(2AD) = 0000 [00000000] | |
| 782 | 00CC92:zeus16_w(2AE) = 0000 [00000000] | |
| 783 | 00CC92:zeus16_w(2AF) = 0000 [00000000] | |
| 784 | 00CC92:zeus16_w(2B0) = 0000 [00000000] | |
| 785 | 00CC92:zeus16_w(2B1) = 0000 [00000000] | |
| 786 | 00CC92:zeus16_w(2B2) = 0000 [00000000] | |
| 787 | 00CC92:zeus16_w(2B3) = 0000 [00000000] | |
| 788 | 00CC92:zeus16_w(2B4) = 7F00 [00007F00] | |
| 789 | 00CC92:zeus16_w(2B5) = 0001 [00017F00] | |
| 790 | 00CC92:zeus16_w(2B6) = 0000 [00000000] | |
| 791 | 00CC92:zeus16_w(2B7) = 03C0 [03C00000] | |
| 792 | 00CC92:zeus16_w(2B8) = C000 [0000C000] | |
| 793 | 00CC92:zeus16_w(2B9) = 0003 [0003C000] | |
| 794 | 00CC92:zeus16_w(2BA) = 0000 [00000000] | |
| 795 | 00CC92:zeus16_w(2BB) = 0000 [00000000] | |
| 796 | 00CC92:zeus16_w(2BC) = EF00 [0000EF00] | |
| 797 | 00CC92:zeus16_w(2BD) = 0001 [0001EF00] | |
| 798 | 00CC92:zeus16_w(2BE) = 0000 [00000000] | |
| 799 | 00CC92:zeus16_w(2BF) = 03C0 [03C00000] | |
| 800 | 00CC92:zeus16_w(2C0) = 0007 [00000007] | |
| 801 | 00CC86:zeus16_w(68) = 0008 [00000008] | |
| 802 | 00CC86:zeus16_w(80) = 0C01 [00000C01] | |
| 803 | 00CC86:zeus16_w(80) = 0C1D [00000C1D] | |
| 804 | 00CC86:zeus16_w(69) = 0003 [00030008] | |
| 805 | 00CC86:zeus16_w(69) = 0000 [00000008] | |
| 806 | 00CC86:zeus16_w(80) = 0C01 [00000C01] | |
| 807 | 00CC86:zeus16_w(80) = FC1D [0000FC1D] | |
| 808 | 00CC86:zeus16_w(81) = 0022 [0022FC1D] | |
| 809 | Zeus cmd 1A : 1A000000 | |
| 810 | 00CFDC:zeus32_w(86) = 00008020 | |
| 811 | 00CFE0:zeus32_w(8E) = 0207F440 | |
| 812 | 00CFE1:zeus32_w(100) = 00000000 | |
| 813 | 00CFE5:zeus32_w(86) = 00008000 | |
| 814 | 00CFE7:zeus32_w(8E) = 02060000 | |
| 815 | 00D0FC:zeus32_w(CE) = 00C97020 | |
| 816 | 00D09A:zeus32_w(80) = 0022FC3F | |
| 817 | 00D104:zeus32_w(CE) = 00C87020 | |
| 818 | 00D034:zeus32_w(84) = 00000100 | |
| 819 | 00D0C9:zeus32_w(68) = 00000100 | |
| 820 | 00D0CA:zeus32_w(00) = 0000C3F0 | |
| 821 | 00D0CC:zeus32_w(5C) = 00000000 | |
| 822 | 00D0CE:zeus32_w(06) = FFFF0030 | |
| 823 | 00D0D0:zeus32_w(02) = 000C0000 | |
| 824 | 00D0D2:zeus32_w(04) = 00000E01 | |
| 825 | 00D0D4:zeus32_w(4C) = 00808080 | |
| 826 | 00D0D5:zeus32_w(4E) = 00808080 | |
| 827 | 00D0D6:zeus32_w(08) = 00000000 | |
| 828 | 00D0D7:zeus32_w(0C) = 00FF018F | |
| 829 | 00D0DD:zeus32_w(0A) = 0000018F | |
| 830 | 00D0E3:zeus32_w(0E) = 00FF0000 | |
| 831 | 00D0E5:zeus32_w(1E) = FFFFFFFF | |
| 832 | 00D0E6:zeus32_w(1C) = FFFFFFFF | |
| 833 | 00D0E7:zeus32_w(1A) = FFFFFFFF | |
| 834 | 00D0E8:zeus32_w(18) = FFFFFFFF | |
| 835 | 00D0EA:zeus32_w(46) = 00000000 | |
| 836 | 00D0EB:zeus32_w(44) = 00000000 | |
| 837 | 00D0EC:zeus32_w(42) = 00000000 | |
| 838 | 00D0ED:zeus32_w(40) = 00000000 | |
| 839 | 00D0EE:zeus32_w(26) = 00000000 | |
| 840 | 00D0EF:zeus32_w(24) = 00000000 | |
| 841 | 00D0F0:zeus32_w(22) = 00000000 | |
| 842 | 00D0F1:zeus32_w(20) = 00000000 | |
| 843 | 00D09A:zeus32_w(80) = 0022FCFF | |
| 844 | 00D0F6:zeus32_w(60) = 00000001 | |
| 845 | 00D09A:zeus32_w(80) = 0022FC3F | |
| 846 | 00D01E:zeus32_w(76) = F8800000 | |
| 847 | 00D020:zeus32_w(CC) = 00000000 | |
| 848 | 00D034:zeus32_w(84) = 00000080 | |
| 849 | 00D0FC:zeus32_w(CE) = 00C97020 | |
| 850 | 00D09A:zeus32_w(80) = 0022FC3F | |
| 851 | 00D104:zeus32_w(CE) = 00C87020 | |
| 852 | Zeus cmd 1A : 1A000000 | |
| 853 | Zeus cmd 18 : 187E0000 0000FFFF | |
| 854 | Zeus cmd 18 : 187C0000 FFFFFFE0 | |
| 855 | Zeus cmd 18 : 187A0000 00800000 | |
| 856 | Zeus cmd 18 : 18780000 000000C7 | |
| 857 | Zeus cmd 18 : 18760000 F8800000 | |
| 858 | Zeus cmd 17 : 176F0032 | |
| 859 | Zeus cmd 17 : 176E0031 | |
| 860 | Zeus cmd 17 : 176D003B | |
| 861 | Zeus cmd 17 : 176C002B | |
| 862 | Zeus cmd 18 : 184E0000 00808080 | |
| 863 | Zeus cmd 18 : 184C0000 00808080 | |
| 864 | Zeus cmd 18 : 184A0000 00FF018E | |
| 865 | Zeus cmd 18 : 18480000 00FF018E | |
| 866 | Zeus cmd 17 : 176940C4 | |
| 867 | Zeus cmd 17 : 17681370 | |
| 868 | Zeus cmd 17 : 1707FFFF | |
| 869 | Zeus cmd 17 : 17060030 | |
| 870 | Zeus cmd 17 : 17010000 | |
| 871 | Zeus cmd 2D : 2D007FFF | |
| 872 | Zeus cmd 2E : 2E000800 00000000 | |
| 873 | Zeus cmd 17 : 1757500A | |
| 874 | Zeus cmd 17 : 175600FF | |
| 875 | Zeus cmd 17 : 17524321 | |
| 876 | Zeus cmd 17 : 1752BCDE | |
| 877 | Zeus cmd 01 : 0100C0B0 3F001059 | |
| 878 | 00D09A:zeus32_w(80) = 0222FC3F | |
| 879 | .... | |
| 880 | Zeus cmd 1A : 1A000000 | |
| 881 | Zeus cmd 1A : 1A000000 | |
| 882 | .... | |
| 883 | Zeus cmd 1A : 1A000000 | |
| 884 | Zeus cmd 1A : 1A000000 | |
| 885 | .... | |
| 886 | Zeus cmd 01 : 0100C0B0 3F001059 | |
| 887 | 00D09A:zeus32_w(80) = 0222FC3F | |
| 888 | .... | |
| 889 | Zeus cmd 1A : 1A000000 | |
| 890 | Zeus cmd 1A : 1A000000 | |
| 891 | .... | |
| 892 | 00D09A:zeus32_w(80) = FB22FC3F | |
| 893 | 00D01E:zeus32_w(76) = F8800000 | |
| 894 | 00D020:zeus32_w(CC) = 00800000 | |
| 895 | 00D034:zeus32_w(84) = 00000000 | |
| 896 | 00D0C9:zeus32_w(68) = 00000100 | |
| 897 | 00D0CA:zeus32_w(00) = 00000000 | |
| 898 | 00D0CC:zeus32_w(5C) = 00000000 | |
| 899 | 00D0CE:zeus32_w(06) = FFFF0030 | |
| 900 | 00D0D0:zeus32_w(02) = 000C0000 | |
| 901 | 00D0D2:zeus32_w(04) = 00000E01 | |
| 902 | 00D0D4:zeus32_w(4C) = 00808080 | |
| 903 | 00D0D5:zeus32_w(4E) = 00808080 | |
| 904 | 00D0D6:zeus32_w(08) = 00000000 | |
| 905 | 00D0D7:zeus32_w(0C) = 00FF018F | |
| 906 | 00D0DD:zeus32_w(0A) = 0000018F | |
| 907 | 00D0E3:zeus32_w(0E) = 00FF0000 | |
| 908 | 00D0E5:zeus32_w(1E) = FFFFFFFF | |
| 909 | 00D0E6:zeus32_w(1C) = FFFFFFFF | |
| 910 | 00D0E7:zeus32_w(1A) = FFFFFFFF | |
| 911 | 00D0E8:zeus32_w(18) = FFFFFFFF | |
| 912 | 00D0EA:zeus32_w(46) = 00000000 | |
| 913 | 00D0EB:zeus32_w(44) = 00000000 | |
| 914 | 00D0EC:zeus32_w(42) = 00000000 | |
| 915 | 00D0ED:zeus32_w(40) = 00000000 | |
| 916 | 00D0EE:zeus32_w(26) = 00000000 | |
| 917 | 00D0EF:zeus32_w(24) = 00000000 | |
| 918 | 00D0F0:zeus32_w(22) = 00000000 | |
| 919 | 00D0F1:zeus32_w(20) = 00000000 | |
| 920 | 00D09A:zeus32_w(80) = FB22FCFF | |
| 921 | 00D0F6:zeus32_w(60) = 00000001 | |
| 922 | 00D09A:zeus32_w(80) = FB22FC3F | |
| 923 | Zeus cmd 17 : 1757500A | |
| 924 | Zeus cmd 17 : 175600FF | |
| 925 | 00D09A:zeus32_w(80) = 0222FC3F | |
| 926 | ||
| 927 | ||
| 928 | */ | |
| 929 | static 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 | ||
| 944 | if (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 | ||
| 969 | static 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 | ||
| 984 | if (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 | ||
| 1009 | static 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 | ||
| 1020 | static 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 | ||
| 1162 | 354 | READ32_HANDLER( zeus_r ) |
| 1163 | 355 | { |
| 1164 | 356 | int logit = (offset < 0xb0 || offset > 0xb7); |
| r1404 | r1405 | |
| 1176 | 368 | result = zeusbase[0x08]; |
| 1177 | 369 | break; |
| 1178 | 370 | |
| 371 | case 0xf0: | |
| 372 | result = video_screen_get_hpos(0); | |
| 373 | logit = 0; | |
| 374 | break; | |
| 375 | ||
| 1179 | 376 | 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 | |
| 1182 | 377 | result = video_screen_get_vpos(0); |
| 1183 | 378 | logit = 0; |
| 1184 | 379 | break; |
| r1404 | r1405 | |
| 1229 | 424 | } |
| 1230 | 425 | |
| 1231 | 426 | |
| 427 | ||
| 428 | /************************************* | |
| 429 | * | |
| 430 | * Core write handler | |
| 431 | * | |
| 432 | *************************************/ | |
| 433 | ||
| 1232 | 434 | WRITE32_HANDLER( zeus_w ) |
| 1233 | 435 | { |
| 1234 | 436 | int logit = zeus_enable_logging || ((offset < 0xb0 || offset > 0xb7) && (offset < 0xe0 || offset > 0xe1)); |
| r1404 | r1405 | |
| 1238 | 440 | |
| 1239 | 441 | /* 32-bit mode */ |
| 1240 | 442 | if (zeusbase[0x80] & 0x00020000) |
| 1241 | zeus_ | |
| 443 | zeus_ | |
| 1242 | 444 | |
| 1243 | 445 | /* 16-bit mode */ |
| 1244 | 446 | else |
| 1245 | zeus_ | |
| 447 | zeus_ | |
| 1246 | 448 | } |
| 1247 | 449 | |
| 1248 | 450 | |
| 1249 | 451 | READ32_HANDLER( zeus2_r ) |
| 1250 | 452 | { |
| 453 | logerror("%06X:zeus_r(%02X)\n", activecpu_get_pc(), offset * 2); | |
| 1251 | 454 | return zeus_r(offset * 2, 0); |
| 1252 | 455 | } |
| 1253 | 456 | |
| 1254 | 457 | |
| 1255 | 458 | WRITE32_HANDLER( zeus2_w ) |
| 1256 | 459 | { |
| 1257 | zeus_w(offset * 2, data | |
| 460 | logerror("%06X:zeus_w(%02X) = %08X\n", activecpu_get_pc(), offset * 2, data | |
| 1258 | 461 | } |
| 1259 | 462 | |
| 1260 | 463 | |
| 1261 | static 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 | ||
| 472 | static void zeus_pointer_w(UINT32 which, UINT32 data, int logit) | |
| 1262 | 473 | { |
| 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 | ||
| 534 | static void zeus_register16_w(offs_t offset, UINT16 data, int logit) | |
| 535 | { | |
| 1263 | 536 | /* writes to register $CC need to force a partial update */ |
| 1264 | 537 | if ((offset & ~1) == 0xcc) |
| 1265 | 538 | video_screen_update_partial(0, video_screen_get_vpos(0)); |
| r1404 | r1405 | |
| 1278 | 551 | |
| 1279 | 552 | /* handle the update */ |
| 1280 | 553 | if ((offset & 1) == 0) |
| 1281 | zeus_ | |
| 554 | zeus_ | |
| 1282 | 555 | } |
| 1283 | 556 | |
| 1284 | 557 | |
| 1285 | static void zeus_ | |
| 558 | static void zeus_ | |
| 1286 | 559 | { |
| 1287 | 560 | /* writes to register $CC need to force a partial update */ |
| 1288 | 561 | if ((offset & ~1) == 0xcc) |
| r1404 | r1405 | |
| 1304 | 577 | |
| 1305 | 578 | /* handle the update */ |
| 1306 | 579 | if ((offset & 1) == 0) |
| 1307 | zeus_ | |
| 580 | zeus_ | |
| 1308 | 581 | } |
| 1309 | 582 | |
| 1310 | 583 | |
| 1311 | /* | |
| 1312 | 584 | |
| 1313 | New analysis: | |
| 585 | /************************************* | |
| 586 | * | |
| 587 | * Update state after a register write | |
| 588 | * | |
| 589 | *************************************/ | |
| 1314 | 590 | |
| 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 | ||
| 1413 | Notes: | |
| 1414 | ||
| 1415 | In 16-bit mode, writes to $E0 are done via $E1 first then $E0 | |
| 1416 | ||
| 1417 | ------------------------------------------------------- | |
| 1418 | ||
| 1419 | Old 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 | ||
| 1447 | static void zeus_process_write(offs_t offset) | |
| 591 | static void zeus_register_update(offs_t offset) | |
| 1448 | 592 | { |
| 1449 | 593 | /* handle the writes; only trigger on low accesses */ |
| 1450 | 594 | switch (offset) |
| 1451 | 595 | { |
| 596 | case 0x52: | |
| 597 | zeusbase[0xb2] = zeusbase[0x52]; | |
| 598 | break; | |
| 599 | ||
| 1452 | 600 | case 0x60: |
| 1453 | 601 | /* invasn writes here to execute a command (?) */ |
| 1454 | 602 | if (zeusbase[0x60] & 1) |
| r1404 | r1405 | |
| 1489 | 637 | vert[3].x = (INT16)zeusbase[0x0e]; |
| 1490 | 638 | vert[3].y = (INT16)(zeusbase[0x0e] >> 16); |
| 1491 | 639 | |
| 1492 | extra->transcolor = zeusbase[0x00]; | |
| 640 | extra->solidcolor = zeusbase[0x00]; | |
| 641 | extra->zoffset = 0x7fff; | |
| 1493 | 642 | |
| 1494 | poly_render_quad(poly, NULL, & | |
| 643 | poly_render_quad(poly, NULL, &z | |
| 1495 | 644 | poly_wait(poly, "Normal"); |
| 1496 | ||
| 1497 | single_step = input_code_pressed(KEYCODE_S); | |
| 1498 | if (single_step) | |
| 1499 | popmessage("Single Step"); | |
| 1500 | 645 | } |
| 1501 | 646 | else |
| 1502 | 647 | logerror("Execute unknown command\n"); |
| 1503 | 648 | } |
| 1504 | 649 | break; |
| 1505 | 650 | |
| 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 | ||
| 1506 | 679 | case 0xb0: |
| 1507 | 680 | case 0xb2: |
| 1508 | 681 | if ((zeusbase[0xb6] >> 16) != 0) |
| r1404 | r1405 | |
| 1534 | 707 | } |
| 1535 | 708 | break; |
| 1536 | 709 | |
| 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 | } | |
| 1539 | 734 | break; |
| 1540 | 735 | |
| 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"); | |
| 1543 | 743 | break; |
| 1544 | 744 | |
| 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; | |
| 1547 | 749 | break; |
| 750 | } | |
| 751 | } | |
| 1548 | 752 | |
| 1549 | case 0x4e: | |
| 1550 | zeus_blend = zeusbase[0x4e]; | |
| 753 | ||
| 754 | ||
| 755 | /************************************* | |
| 756 | * | |
| 757 | * Process the FIFO | |
| 758 | * | |
| 759 | *************************************/ | |
| 760 | ||
| 761 | static 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); | |
| 1551 | 775 | break; |
| 1552 | 776 | |
| 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); | |
| 1555 | 782 | break; |
| 1556 | 783 | |
| 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); | |
| 1559 | 789 | break; |
| 1560 | 790 | |
| 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); | |
| 1565 | 799 | break; |
| 1566 | 800 | |
| 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) | |
| 1572 | 810 | { |
| 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]; | |
| 1575 | 846 | } |
| 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 | } | |
| 1576 | 903 | 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; | |
| 1577 | 959 | } |
| 960 | return TRUE; | |
| 1578 | 961 | } |
| 1579 | 962 | |
| 1580 | 963 | |
| 1581 | static void log_waveram(UINT32 length_and_base) | |
| 964 | ||
| 965 | /************************************* | |
| 966 | * | |
| 967 | * Draw a model in waveram | |
| 968 | * | |
| 969 | *************************************/ | |
| 970 | ||
| 971 | static void zeus_draw_model(UINT32 texdata, int logit) | |
| 1582 | 972 | { |
| 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; | |
| 1588 | 976 | |
| 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); | |
| 1594 | 979 | |
| 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; | |
| 1597 | 984 | |
| 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--) | |
| 1600 | 990 | { |
| 1601 | foundit = TRUE; | |
| 1602 | break; | |
| 1603 | } | |
| 991 | int countneeded; | |
| 992 | UINT8 cmd; | |
| 1604 | 993 | |
| 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; | |
| 1615 | 997 | |
| 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 | } | |
| 1619 | 1012 | |
| 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; | |
| 1620 | 1021 | |
| 1621 | static 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; | |
| 1626 | 1025 | |
| 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; | |
| 1628 | 1033 | |
| 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; | |
| 1630 | 1041 | |
| 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; | |
| 1635 | 1046 | |
| 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 | } | |
| 1647 | 1052 | |
| 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 | } | |
| 1652 | 1059 | |
| 1653 | 0x17: | |
| 1654 | 1060 | |
| 1655 | 1707FFFF | |
| 1656 | 1752159D | |
| 1657 | 17680070 17681370 | |
| 1658 | 176940C4 | |
| 1659 | 1770xxxx - set x coordinate | |
| 1660 | 1772yyyy - set y coordinate | |
| 1661 | 1774zzzz - set z coordinate | |
| 1662 | 1061 | |
| 1663 | 0x00: | |
| 1062 | /************************************* | |
| 1063 | * | |
| 1064 | * Draw a quad | |
| 1065 | * | |
| 1066 | *************************************/ | |
| 1664 | 1067 | |
| 1665 | 0004C09C 08001026 | |
| 1666 | 0002C0E7 0800101C | |
| 1667 | 0003C0F0 00001025 | |
| 1668 | 0080C0A5 3F00102F | |
| 1669 | 0005C0A5 21001125 | |
| 1670 | 0000C040 0318E132 - set palette base | |
| 1068 | static 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; | |
| 1671 | 1078 | |
| 1672 | command 25: | |
| 1079 | /* | |
| 1080 | int testbit = 0; | |
| 1673 | 1081 | |
| 1674 | 25000000 007F0018 01000400 B0F60008 -- during diagnostics screen | |
| 1675 | 25000080 007F0018 01000400 B0F60008 -- alternate frames during text screen | |
| 1082 | if (input_code_pressed(KEYCODE_Z)) testbit = 0x01; | |
| 1083 | if (input_code_pressed(KEYCODE_X)) testbit = 0x02; | |
| 1084 | if (input_code_pressed(KEYCODE_C)) testbit = 0x04; | |
| 1085 | if (input_code_pressed(KEYCODE_V)) testbit = 0x08; | |
| 1086 | if (input_code_pressed(KEYCODE_B)) testbit = 0x10; | |
| 1087 | if (input_code_pressed(KEYCODE_N)) testbit = 0x20; | |
| 1088 | if (input_code_pressed(KEYCODE_M)) testbit = 0x40; | |
| 1089 | if (input_code_pressed(KEYCODE_COMMA)) testbit = 0x80; | |
| 1090 | if (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); | |
| 1676 | 1095 | |
| 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; | |
| 1679 | 1099 | |
| 1100 | uscale = (8 >> ((zeusbase[0x04] >> 4) & 3)) * 0.125f * 256.0f; | |
| 1101 | vscale = (8 >> ((zeusbase[0x04] >> 6) & 3)) * 0.125f * 256.0f; | |
| 1680 | 1102 | |
| 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; | |
| 1682 | 1111 | |
| 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]); | |
| 1683 | 1139 | |
| 1684 | */ | |
| 1140 | x += zeus_point[0]; | |
| 1141 | y += zeus_point[1]; | |
| 1142 | z += zeus_point[2]; | |
| 1685 | 1143 | |
| 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++) | |
| 1687 | 1165 | { |
| 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; | |
| 1691 | 1172 | } |
| 1692 | 1173 | |
| 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) | |
| 1694 | 1184 | { |
| 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 | } | |
| 1707 | 1191 | |
| 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"); | |
| 1713 | 1194 | |
| 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 | } | |
| 1719 | 1198 | |
| 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; | |
| 1732 | 1199 | |
| 1733 | default: | |
| 1734 | if (logcmd) | |
| 1735 | logerror(" -- setptr(%06X)\n", zeuscmd_buffer[0] & 0xffffff); | |
| 1736 | break; | |
| 1737 | } | |
| 1738 | 1200 | |
| 1739 | if (logcmd) | |
| 1740 | log_waveram(zeuscmd_buffer[1]); | |
| 1741 | break; | |
| 1201 | /************************************* | |
| 1202 | * | |
| 1203 | * Rasterizers | |
| 1204 | * | |
| 1205 | *************************************/ | |
| 1742 | 1206 | |
| 1743 | /* 0x13: render model based on previously set information */ | |
| 1744 | case 0x13: /* invasn */ | |
| 1745 | zeus_draw_model(zeus_objdata, zeus_texdata, logcmd); | |
| 1746 | break; | |
| 1207 | static 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; | |
| 1747 | 1221 | |
| 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 | } | |
| 1754 | 1254 | |
| 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 | } | |
| 1762 | 1260 | |
| 1763 | /* 0x1A: sync pipeline(?) */ | |
| 1764 | case 0x1a: | |
| 1765 | if (logcmd) | |
| 1766 | logerror(" -- sync\n"); | |
| 1767 | break; | |
| 1768 | 1261 | |
| 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))); | |
| 1262 | static 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; | |
| 1785 | 1276 | |
| 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 | } | |
| 1799 | 1309 | |
| 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 | } | |
| 1805 | 1315 | |
| 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; | |
| 1813 | 1316 | |
| 1814 | /* 0x67: render model with inline texture info */ | |
| 1815 | case 0x67: | |
| 1816 | zeus_draw_model(zeuscmd_buffer[1], zeuscmd_buffer[2], logcmd); | |
| 1817 | break; | |
| 1317 | static 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; | |
| 1818 | 1321 | |
| 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 | } | |
| 1823 | 1340 | } |
| 1824 | 1341 | } |
| 1825 | 1342 | |
| 1826 | 1343 | |
| 1827 | static | |
| 1344 | static void | |
| 1828 | 1345 | { |
| 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++) | |
| 1830 | 1353 | { |
| 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 | } | |
| 1834 | 1361 | |
| 1835 | case 0x13: | |
| 1836 | case 0x17: | |
| 1837 | case 0x1a: | |
| 1838 | case 0x2d: /* invasn */ | |
| 1839 | case 0x70: | |
| 1840 | return 1; | |
| 1841 | 1362 | |
| 1842 | case 0x18: | |
| 1843 | case 0x23: | |
| 1844 | case 0x2e: /* invasn */ | |
| 1845 | return 2; | |
| 1363 | static 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; | |
| 1846 | 1369 | |
| 1847 | case 0x67: | |
| 1848 | return 3; | |
| 1370 | for (x = extent->startx; x < extent->stopx; x++) | |
| 1371 | waveram_plot_depth(scanline, x, color, depth); | |
| 1372 | } | |
| 1849 | 1373 | |
| 1850 | case 0x25: | |
| 1851 | case 0x30: /* invasn */ | |
| 1852 | if (word & 0x808000) | |
| 1853 | return 10; | |
| 1854 | return 4; /* ??? */ | |
| 1855 | 1374 | |
| 1856 | case 0x1c: | |
| 1857 | if ((word & 0xffffff) == 0x7fff) /* invasn */ | |
| 1858 | return 8+5; | |
| 1859 | return 8; | |
| 1860 | 1375 | |
| 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 | ||
| 1382 | static 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); | |
| 1866 | 1390 | } |
| 1867 | 1391 | |
| 1868 | 1392 | |
| 1393 | static 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 | } |
| r1404 | r1405 | |
|---|---|---|
| 219 | 219 | { |
| 220 | 220 | int i; |
| 221 | 221 | gfx_element *gfx0,*gfx1; |
| 222 | static tile_get_info_callback get_info[4] = | |
| 222 | static const tile_get_info_callback get_info[4] = | |
| 223 | 223 | { tilemap_get_info0, tilemap_get_info1, tilemap_get_info2, tilemap_get_info3 }; |
| 224 | 224 | |
| 225 | 225 | for( i=0; i<NAMCONA1_NUM_TILEMAPS; i++ ) |
| r1404 | r1405 | |
|---|---|---|
| 232 | 232 | static UINT16 m_p_n_redsubtrans[ MAX_LEVEL * MAX_LEVEL ]; |
| 233 | 233 | static UINT16 m_p_n_greensubtrans[ MAX_LEVEL * MAX_LEVEL ]; |
| 234 | 234 | static UINT16 m_p_n_bluesubtrans[ MAX_LEVEL * MAX_LEVEL ]; |
| 235 | static UINT16 m_p_n_nextpointlist4[] = { 1, 3, 0, 2 }; | |
| 236 | static UINT16 m_p_n_prevpointlist4[] = { 2, 0, 3, 1 }; | |
| 237 | static UINT16 m_p_n_nextpointlist3[] = { 1, 2, 0 }; | |
| 238 | static UINT16 m_p_n_prevpointlist3[] = { 2, 0, 1 }; | |
| 235 | static const UINT16 m_p_n_nextpointlist4[] = { 1, 3, 0, 2 }; | |
| 236 | static const UINT16 m_p_n_prevpointlist4[] = { 2, 0, 3, 1 }; | |
| 237 | static const UINT16 m_p_n_nextpointlist3[] = { 1, 2, 0 }; | |
| 238 | static const UINT16 m_p_n_prevpointlist3[] = { 2, 0, 1 }; | |
| 239 | 239 | |
| 240 | 240 | static UINT16 m_p_n_g0r0[ 0x10000 ]; |
| 241 | 241 | static UINT16 m_p_n_b0[ 0x10000 ]; |
| r1404 | r1405 | |
| 1486 | 1486 | UINT16 n_point; |
| 1487 | 1487 | UINT16 n_rightpoint; |
| 1488 | 1488 | 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; | |
| 1491 | 1491 | |
| 1492 | 1492 | UINT16 *p_vram; |
| 1493 | 1493 | |
| r1404 | r1405 | |
| 1658 | 1658 | UINT16 n_point; |
| 1659 | 1659 | UINT16 n_rightpoint; |
| 1660 | 1660 | 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; | |
| 1663 | 1663 | UINT16 *p_clut; |
| 1664 | 1664 | UINT16 *p_vram; |
| 1665 | 1665 | UINT32 n_bgr; |
| r1404 | r1405 | |
| 1878 | 1878 | UINT16 n_point; |
| 1879 | 1879 | UINT16 n_rightpoint; |
| 1880 | 1880 | 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; | |
| 1883 | 1883 | |
| 1884 | 1884 | UINT16 *p_vram; |
| 1885 | 1885 | |
| r1404 | r1405 | |
| 2108 | 2108 | UINT16 n_point; |
| 2109 | 2109 | UINT16 n_rightpoint; |
| 2110 | 2110 | 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; | |
| 2113 | 2113 | UINT16 *p_clut; |
| 2114 | 2114 | UINT16 *p_vram; |
| 2115 | 2115 | UINT32 n_bgr; |
| r1404 | r1405 | |
|---|---|---|
| 144 | 144 | drawgfx( bitmap, machine->gfx[3], code, flags >> 4, \ |
| 145 | 145 | bank&1, bank&2, sx, sy, cliprect, TRANSPARENCY_PEN, 0 ) |
| 146 | 146 | |
| 147 | static char pos32x32[] = { 0, 1, 2, 3 }; | |
| 148 | static char pos32x32x[] = { 1, 0, 3, 2 }; | |
| 149 | static char pos32x32y[] = { 2, 3, 0, 1 }; | |
| 150 | static char pos32x32xy[] = { 3, 2, 1, 0 }; | |
| 151 | ||
| 152 | static char pos32x64[] = { 0, 1, 2, 3, 4, 5, 6, 7 }; | |
| 153 | static char pos32x64x[] = { 5, 4, 7, 6, 1, 0, 3, 2 }; | |
| 154 | static char pos32x64y[] = { 2, 3, 0, 1, 6, 7, 4, 5 }; | |
| 155 | static char pos32x64xy[] = { 7, 6, 5, 4, 3, 2, 1, 0 }; | |
| 156 | ||
| 157 | static char pos64x32[] = { 0, 1, 2, 3, 4, 5, 6, 7 }; | |
| 158 | static char pos64x32x[] = { 1, 0, 3, 2, 5, 4, 7, 6 }; | |
| 159 | static char pos64x32y[] = { 6, 7, 4, 5, 2, 3, 0, 1 }; | |
| 160 | static char pos64x32xy[] = { 7, 6, 5, 4, 3, 2, 1, 0 }; | |
| 161 | ||
| 162 | static char pos64x64[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; | |
| 163 | static char pos64x64x[] = { 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10 }; | |
| 164 | static char pos64x64y[] = { 10, 11, 8, 9, 14, 15, 12, 13, 2, 3, 0, 1, 6, 7, 4, 5 }; | |
| 165 | static char pos64x64xy[] = { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; | |
| 166 | ||
| 167 | static char* p32x32[4] = { | |
| 168 | pos32x32, | |
| 169 | pos32x32x, | |
| 170 | pos32x32y, | |
| 171 | pos32x32xy | |
| 147 | static 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 } | |
| 172 | 152 | }; |
| 173 | 153 | |
| 174 | static char* p32x64[4] = { | |
| 175 | pos32x64, | |
| 176 | pos32x64x, | |
| 177 | pos32x64y, | |
| 178 | pos32x64xy | |
| 154 | static 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 } | |
| 179 | 159 | }; |
| 180 | 160 | |
| 181 | static char* p64x32[4] = { | |
| 182 | pos64x32, | |
| 183 | pos64x32x, | |
| 184 | pos64x32y, | |
| 185 | pos64x32xy | |
| 161 | static 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 } | |
| 186 | 166 | }; |
| 187 | 167 | |
| 188 | static char* p64x64[4] = { | |
| 189 | pos64x64, | |
| 190 | pos64x64x, | |
| 191 | pos64x64y, | |
| 192 | pos64x64xy | |
| 168 | static 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 } | |
| 193 | 173 | }; |
| 194 | 174 | |
| 195 | 175 | static void draw_sprite_16x16(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int code, |
| r1404 | r1405 | |
| 237 | 217 | static void draw_sprite_32x32(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int code, |
| 238 | 218 | int sx, int sy, int bank, int flags ) { |
| 239 | 219 | |
| 240 | char *p = p32x32[ bank&3 ]; | |
| 220 | const char *p = p32x32[ bank&3 ]; | |
| 241 | 221 | |
| 242 | 222 | WC90_DRAW_SPRITE( code+p[0], sx, sy ); |
| 243 | 223 | WC90_DRAW_SPRITE( code+p[1], sx+16, sy ); |
| r1404 | r1405 | |
| 248 | 228 | static void draw_sprite_32x64(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int code, |
| 249 | 229 | int sx, int sy, int bank, int flags ) { |
| 250 | 230 | |
| 251 | char *p = p32x64[ bank&3 ]; | |
| 231 | const char *p = p32x64[ bank&3 ]; | |
| 252 | 232 | |
| 253 | 233 | WC90_DRAW_SPRITE( code+p[0], sx, sy ); |
| 254 | 234 | WC90_DRAW_SPRITE( code+p[1], sx+16, sy ); |
| r1404 | r1405 | |
| 278 | 258 | static void draw_sprite_64x32(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int code, |
| 279 | 259 | int sx, int sy, int bank, int flags ) { |
| 280 | 260 | |
| 281 | char *p = p64x32[ bank&3 ]; | |
| 261 | const char *p = p64x32[ bank&3 ]; | |
| 282 | 262 | |
| 283 | 263 | WC90_DRAW_SPRITE( code+p[0], sx, sy ); |
| 284 | 264 | WC90_DRAW_SPRITE( code+p[1], sx+16, sy ); |
| r1404 | r1405 | |
| 293 | 273 | static void draw_sprite_64x64(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int code, |
| 294 | 274 | int sx, int sy, int bank, int flags ) { |
| 295 | 275 | |
| 296 | char *p = p64x64[ bank&3 ]; | |
| 276 | const char *p = p64x64[ bank&3 ]; | |
| 297 | 277 | |
| 298 | 278 | WC90_DRAW_SPRITE( code+p[0], sx, sy ); |
| 299 | 279 | WC90_DRAW_SPRITE( code+p[1], sx+16, sy ); |
| r1404 | r1405 | |
| 321 | 301 | |
| 322 | 302 | typedef void (*draw_sprites_procdef)(running_machine *, mame_bitmap *, const rectangle *, int, int, int, int, int ); |
| 323 | 303 | |
| 324 | static draw_sprites_procdef draw_sprites_proc[16] = { | |
| 304 | static const draw_sprites_procdef draw_sprites_proc[16] = { | |
| 325 | 305 | draw_sprite_invalid, /* 0000 = 08x08 */ |
| 326 | 306 | draw_sprite_invalid, /* 0001 = 16x08 */ |
| 327 | 307 | draw_sprite_invalid, /* 0010 = 32x08 */ |
| r1404 | r1405 | |
|---|---|---|
| 108 | 108 | |
| 109 | 109 | for (offs = 0x80-2;offs >= 0;offs-=2) |
| 110 | 110 | { |
| 111 | static int gfx_offs[2][2] = | |
| 111 | static const int gfx_offs[2][2] = | |
| 112 | 112 | { |
| 113 | 113 | { 0, 1 }, |
| 114 | 114 | { 2, 3 } |
| r1404 | r1405 | |
|---|---|---|
| 119 | 119 | /* video driver constants (potentially different for each game) */ |
| 120 | 120 | int sys16_gr_bitmap_width; |
| 121 | 121 | int (*sys16_spritesystem)( struct sys16_sprite_attributes *sprite, const UINT16 *source, int bJustGetColor ); |
| 122 | int *sys16_obj_bank; | |
| 122 | const int *sys16_obj_bank; | |
| 123 | 123 | int sys16_sprxoffset; |
| 124 | 124 | int sys16_bgxoffset; |
| 125 | 125 | int sys16_fgxoffset; |
| r1404 | r1405 | |
| 760 | 760 | /***************************************************************************/ |
| 761 | 761 | |
| 762 | 762 | VIDEO_START( system16 ){ |
| 763 | static int bank_default[16] = { | |
| 763 | static const int bank_default[16] = { | |
| 764 | 764 | 0x0,0x1,0x2,0x3, |
| 765 | 765 | 0x4,0x5,0x6,0x7, |
| 766 | 766 | 0x8,0x9,0xa,0xb, |
| r1404 | r1405 | |
|---|---|---|
| 24 | 24 | /* There might be a color PROM that dictates this? */ |
| 25 | 25 | /* These guesses are based on comparing the color bars on the test |
| 26 | 26 | screen with the picture in the manual */ |
| 27 | static UINT8 color_lookup[] = { | |
| 27 | static const UINT8 color_lookup[] = { | |
| 28 | 28 | 1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3, |
| 29 | 29 | 1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3, |
| 30 | 30 | 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, |
| r1404 | r1405 | |
|---|---|---|
| 754 | 754 | common_get_PC080SN_fg_tile_info(machine,tileinfo,tile_index,PC080SN_bg_ram[1][1],PC080SN_bg_gfx[1]); |
| 755 | 755 | } |
| 756 | 756 | |
| 757 | static tile_get_info_callback PC080SN_get_tile_info[PC080SN_MAX_CHIPS][2] = | |
| 757 | static const tile_get_info_callback PC080SN_get_tile_info[PC080SN_MAX_CHIPS][2] = | |
| 758 | 758 | { |
| 759 | 759 | { PC080SN_get_bg_tile_info_0, PC080SN_get_fg_tile_info_0 }, |
| 760 | 760 | { PC080SN_get_bg_tile_info_1, PC080SN_get_fg_tile_info_1 } |
| r1404 | r1405 | |
| 1371 | 1371 | |
| 1372 | 1372 | |
| 1373 | 1373 | #if 0 |
| 1374 | static int TC0080VCO_zoomy_conv_table[] = | |
| 1374 | static const int TC0080VCO_zoomy_conv_table[] = | |
| 1375 | 1375 | { |
| 1376 | 1376 | /* These are hand-tuned values... */ |
| 1377 | 1377 | /* +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +a +b +c +d +e +f */ |
| r1404 | r1405 | |
| 2163 | 2163 | |
| 2164 | 2164 | /* This array changes with TC0100SCN_MAX_CHIPS */ |
| 2165 | 2165 | |
| 2166 | static tile_get_info_callback TC0100SCN_get_tile_info[TC0100SCN_MAX_CHIPS][3] = | |
| 2166 | static const tile_get_info_callback TC0100SCN_get_tile_info[TC0100SCN_MAX_CHIPS][3] = | |
| 2167 | 2167 | { |
| 2168 | 2168 | { TC0100SCN_get_bg_tile_info_0, TC0100SCN_get_fg_tile_info_0, TC0100SCN_get_tx_tile_info_0 }, |
| 2169 | 2169 | { TC0100SCN_get_bg_tile_info_1, TC0100SCN_get_fg_tile_info_1, TC0100SCN_get_tx_tile_info_1 }, |
| r1404 | r1405 | |
| 3011 | 3011 | common_get_tc0480tx_tile_info(machine,tileinfo,tile_index,TC0480SCP_tx_ram,TC0480SCP_tx_gfx); |
| 3012 | 3012 | } |
| 3013 | 3013 | |
| 3014 | static tile_get_info_callback tc480_get_tile_info[5] = | |
| 3014 | static const tile_get_info_callback tc480_get_tile_info[5] = | |
| 3015 | 3015 | { |
| 3016 | 3016 | TC0480SCP_get_bg0_tile_info, TC0480SCP_get_bg1_tile_info, |
| 3017 | 3017 | TC0480SCP_get_bg2_tile_info, TC0480SCP_get_bg3_tile_info, |
| r1404 | r1405 | |
| 3892 | 3892 | |
| 3893 | 3893 | /* For evidence table of TC0480SCP bg layer priorities, refer to mame55 source */ |
| 3894 | 3894 | |
| 3895 | static UINT16 TC0480SCP_bg_pri_lookup[8] = | |
| 3895 | static const UINT16 TC0480SCP_bg_pri_lookup[8] = | |
| 3896 | 3896 | { |
| 3897 | 3897 | 0x0123, |
| 3898 | 3898 | 0x1230, |
| r1404 | r1405 | |
|---|---|---|
| 407 | 407 | {"xmcotah", NOBATTRY, 4,4,4, 0x0000,0xffff,0x0000,0xffff, 8 }, |
| 408 | 408 | {"xmcotaj", NOBATTRY, 4,4,4, 0x0000,0xffff,0x0000,0xffff, 8 }, |
| 409 | 409 | {"xmcotaj1",NOBATTRY, 4,4,4, 0x0000,0xffff,0x0000,0xffff, 8 }, |
| 410 | {"xmcotaj2",NOBATTRY, 4,4,4, 0x0000,0xffff,0x0000,0xffff, 8 }, | |
| 410 | 411 | {"xmcotajr",NOBATTRY, 4,4,4, 0x0000,0xffff,0x0000,0xffff, 8 }, |
| 411 | 412 | {"xmcotaa", NOBATTRY, 4,4,4, 0x0000,0xffff,0x0000,0xffff, 8 }, |
| 412 | 413 | {"hsf2", NOBATTRY, 4,4,0, 0x0000,0xffff,0x0000,0xffff, 9 }, |
| r1404 | r1405 | |
|---|---|---|
| 112 | 112 | /* The first 16 came from the 7448 BCD to 7-segment decoder data sheet */ |
| 113 | 113 | /* The rest are made up */ |
| 114 | 114 | |
| 115 | static UINT8 stactics_special_chars[32*8] = { | |
| 115 | static const UINT8 stactics_special_chars[32*8] = { | |
| 116 | 116 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Space */ |
| 117 | 117 | 0x80, 0x80, 0x80, 0xf0, 0x80, 0x80, 0xf0, 0x00, /* extras... */ |
| 118 | 118 | 0xf0, 0x80, 0x80, 0xf0, 0x00, 0x00, 0xf0, 0x00, /* extras... */ |
| r1404 | r1405 | |
|---|---|---|
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | |
| 173 | static struct tms34061_interface tms34061intf = | |
| 173 | static const struct tms34061_interface tms34061intf = | |
| 174 | 174 | { |
| 175 | 175 | 0, /* the screen we are acting on */ |
| 176 | 176 | 8, /* VRAM address is (row << rowshift) | col */ |
| r1404 | r1405 | |
|---|---|---|
| 922 | 922 | |
| 923 | 923 | /***********************************************************************************************/ |
| 924 | 924 | |
| 925 | static poly_draw_scanline render_funcs[8] = | |
| 925 | static const poly_draw_scanline render_funcs[8] = | |
| 926 | 926 | { |
| 927 | 927 | model2_3d_render_0, /* checker = 0, textured = 0, translucent = 0 */ |
| 928 | 928 | model2_3d_render_1, /* checker = 0, textured = 0, translucent = 1 */ |
| r1404 | r1405 | |
|---|---|---|
| 156 | 156 | |
| 157 | 157 | ***************************************************************************/ |
| 158 | 158 | |
| 159 | static int lordgun_gun_x_table[] = | |
| 159 | static const int lordgun_gun_x_table[] = | |
| 160 | 160 | { |
| 161 | 161 | -100, 0x001,0x001,0x002,0x002,0x003,0x003,0x004,0x005,0x006,0x007,0x008,0x009,0x00A,0x00B,0x00C, |
| 162 | 162 | 0x00D,0x00E,0x00F,0x010,0x011,0x012,0x013,0x014,0x015,0x016,0x017,0x018,0x019,0x01A,0x01B,0x01C, |
| r1404 | r1405 | |
|---|---|---|
| 222 | 222 | bitmap_4_draw(firstpix, iwidth, src, xpos, 7, -1); |
| 223 | 223 | } |
| 224 | 224 | |
| 225 | static void (*bitmap4[8])(INT32, INT32, UINT32 *, INT32) = | |
| 225 | static void (*const bitmap4[8])(INT32, INT32, UINT32 *, INT32) = | |
| 226 | 226 | { |
| 227 | 227 | bitmap_4_0, |
| 228 | 228 | bitmap_4_1, |
| r1404 | r1405 | |
| 352 | 352 | bitmap_8_draw(firstpix, iwidth, src, xpos, 7, -1); |
| 353 | 353 | } |
| 354 | 354 | |
| 355 | static void (*bitmap8[8])(INT32, INT32, UINT32 *, INT32) = | |
| 355 | static void (*const bitmap8[8])(INT32, INT32, UINT32 *, INT32) = | |
| 356 | 356 | { |
| 357 | 357 | bitmap_8_0, |
| 358 | 358 | bitmap_8_1, |
| r1404 | r1405 | |
| 459 | 459 | bitmap_16_draw(firstpix, iwidth, src, xpos, 7, -1); |
| 460 | 460 | } |
| 461 | 461 | |
| 462 | static void (*bitmap16[8])(INT32, INT32, UINT32 *, INT32) = | |
| 462 | static void (*const bitmap16[8])(INT32, INT32, UINT32 *, INT32) = | |
| 463 | 463 | { |
| 464 | 464 | bitmap_16_0, |
| 465 | 465 | bitmap_16_1, |
| r1404 | r1405 | |
|---|---|---|
| 289 | 289 | |
| 290 | 290 | /* handle the hardware flip of the bit order from 765 to 576 that |
| 291 | 291 | 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, | |
| 293 | 293 | 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, |
| 294 | 294 | 0x10, 0x12, 0x14, 0x16, 0x11, 0x13, 0x15, 0x17 }; |
| 295 | 295 |
| r1404 | r1405 | |
|---|---|---|
| 124 | 124 | int i; |
| 125 | 125 | |
| 126 | 126 | |
| 127 | static UINT8 ledvalues[] = | |
| 127 | static const UINT8 ledvalues[] = | |
| 128 | 128 | { 0x86, 0xdb, 0xcf, 0xe6, 0xed, 0xfd, 0x87, 0xff, 0xf3, 0xf1 }; |
| 129 | 129 | |
| 130 | 130 |
| r1404 | r1405 | |
|---|---|---|
| 26 | 26 | cpunum_set_input_line(0, M6809_FIRQ_LINE, state); |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | static struct tms34061_interface tms34061intf = | |
| 29 | static const struct tms34061_interface tms34061intf = | |
| 30 | 30 | { |
| 31 | 31 | 0, /* the screen we are acting on */ |
| 32 | 32 | 8, /* VRAM address is (row << rowshift) | col */ |
| r1404 | r1405 | |
|---|---|---|
| 242 | 242 | /* this conversion table should be about right. It gives a reasonable */ |
| 243 | 243 | /* gray scale in the test screen, and the red, green and blue squares */ |
| 244 | 244 | /* in the same screen are barely visible, as the manual requires. */ |
| 245 | static UINT8 table[16] = | |
| 245 | static const UINT8 table[16] = | |
| 246 | 246 | { |
| 247 | 247 | 0x00, /* value = 0, intensity = 0 */ |
| 248 | 248 | 0x12, /* value = 0, intensity = 1 */ |
| r1404 | r1405 | |
|---|---|---|
| 99 | 99 | }; |
| 100 | 100 | static struct DEBUGOPTS debug_options = {5, {0,0,0,0,0,0}, 0, 0, 0}; |
| 101 | 101 | /* red green blue purple yellow cyan grey white */ |
| 102 | static UINT16 dbg_mode_colours[8] = { 0x1f, 0x3e0, 0x7c00, 0x7c1f, 0x3ff, 0x7fe0, 0x4210, 0x7fff }; | |
| 102 | static const UINT16 dbg_mode_colours[8] = { 0x1f, 0x3e0, 0x7c00, 0x7c1f, 0x3ff, 0x7fe0, 0x4210, 0x7fff }; | |
| 103 | 103 | static UINT8 snes_dbg_video(running_machine *machine, mame_bitmap *bitmap, UINT16 curline); |
| 104 | 104 | #endif /* SNES_DBG_video */ |
| 105 | 105 | |
| r1404 | r1405 | |
| 142 | 142 | |
| 143 | 143 | static struct SCANLINE scanlines[2]; |
| 144 | 144 | struct SNES_PPU_STRUCT snes_ppu; |
| 145 | static struct SNES_MODE_CONFIG snes_modedefs[8] = | |
| 145 | static const struct SNES_MODE_CONFIG snes_modedefs[8] = | |
| 146 | 146 | { |
| 147 | 147 | /*0*/ { {snes_update_line_2, snes_update_line_2, snes_update_line_2, snes_update_line_2}, 4 }, |
| 148 | 148 | /*1*/ { {snes_update_line_4, snes_update_line_4, snes_update_line_2, NULL}, 3 }, |
| r1404 | r1405 | |
| 2001 | 2001 | { |
| 2002 | 2002 | //UINT16 y = 1; |
| 2003 | 2003 | char t[100]; |
| 2004 | static char WINLOGIC[4] = { '|', '&', '^', '!' }; | |
| 2004 | static const char WINLOGIC[4] = { '|', '&', '^', '!' }; | |
| 2005 | 2005 | |
| 2006 | 2006 | if( !debug_options.input_count-- ) |
| 2007 | 2007 | { |
| r1404 | r1405 | |
|---|---|---|
| 128 | 128 | int i, x, y, ex, ey; |
| 129 | 129 | const gfx_element *gfx = machine->gfx[0]; |
| 130 | 130 | |
| 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}; | |
| 133 | 133 | |
| 134 | 134 | for (i = 0x800 - 4 - 1; i >= 3; i -= 4){ |
| 135 | 135 | int sx = gaelco_spriteram[i+2] & 0x01ff; |
| r1404 | r1405 | |
|---|---|---|
| 42 | 42 | UINT16 *wecleman_videostatus; |
| 43 | 43 | UINT16 *wecleman_pageram, *wecleman_txtram, *wecleman_roadram; |
| 44 | 44 | size_t wecleman_roadram_size; |
| 45 | static int wecleman_bgpage[4], wecleman_fgpage[4], *wecleman_gfx_bank; | |
| 45 | static int wecleman_bgpage[4], wecleman_fgpage[4]; | |
| 46 | static const int *wecleman_gfx_bank; | |
| 46 | 47 | |
| 47 | 48 | /* Variables only used here: */ |
| 48 | 49 | static tilemap *bg_tilemap, *fg_tilemap, *txt_tilemap; |
| r1404 | r1405 | |
| 874 | 875 | Sprite banking - each bank is 0x20000 bytes (we support 0x40 bank codes) |
| 875 | 876 | This game has ROMs for 16 banks |
| 876 | 877 | */ |
| 877 | static int bank[0x40] = | |
| 878 | static const int bank[0x40] = | |
| 878 | 879 | { |
| 879 | 880 | 0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7, |
| 880 | 881 | 8,8,9,9,10,10,11,11,12,12,13,13,14,14,15,15, |
| r1404 | r1405 | |
| 977 | 978 | Sprite banking - each bank is 0x20000 bytes (we support 0x40 bank codes) |
| 978 | 979 | This game has ROMs for 0x30 banks |
| 979 | 980 | */ |
| 980 | static int bank[0x40] = | |
| 981 | static const int bank[0x40] = | |
| 981 | 982 | { |
| 982 | 983 | 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15, |
| 983 | 984 | 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31, |
| r1404 | r1405 | |
|---|---|---|
| 11 | 11 | static UINT8 palette_bank; |
| 12 | 12 | |
| 13 | 13 | |
| 14 | static pen_t pens_from_color_prom[] = | |
| 14 | static const pen_t pens_from_color_prom[] = | |
| 15 | 15 | { |
| 16 | 16 | RGB_BLACK, |
| 17 | 17 | MAKE_RGB(0x00, 0xff, 0x00), |
| r1404 | r1405 | |
|---|---|---|
| 351 | 351 | structure for each big sprite: the hardware is probably |
| 352 | 352 | constructing each 4x4 sprite from 4 2x2 sprites... */ |
| 353 | 353 | |
| 354 | static UINT8 xlookup[16] = | |
| 354 | static const UINT8 xlookup[16] = | |
| 355 | 355 | { 0, 1, 0, 1, |
| 356 | 356 | 2, 3, 2, 3, |
| 357 | 357 | 0, 1, 0, 1, |
| 358 | 358 | 2, 3, 2, 3 }; |
| 359 | 359 | |
| 360 | static UINT8 ylookup[16] = | |
| 360 | static const UINT8 ylookup[16] = | |
| 361 | 361 | { 0, 0, 1, 1, |
| 362 | 362 | 0, 0, 1, 1, |
| 363 | 363 | 2, 2, 3, 3, |
| r1404 | r1405 | |
|---|---|---|
| 59 | 59 | extern int TC0080VCO_has_tx; |
| 60 | 60 | |
| 61 | 61 | /* These are hand-tuned values */ |
| 62 | static int zoomy_conv_table[] = | |
| 62 | static const int zoomy_conv_table[] = | |
| 63 | 63 | { |
| 64 | 64 | /* +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +a +b +c +d +e +f */ |
| 65 | 65 | 0x00,0x01,0x01,0x02,0x02,0x03,0x04,0x05, 0x06,0x06,0x07,0x08,0x09,0x0a,0x0a,0x0b, /* 0x00 */ |
| r1404 | r1405 | |
|---|---|---|
| 932 | 932 | dst[31] |= color; \ |
| 933 | 933 | } \ |
| 934 | 934 | } \ |
| 935 | static void (*render_##player[4])(UINT8 *dst)={ \ | |
| 935 | static void (*const render_##player[4])(UINT8 *dst)={ \ | |
| 936 | 936 | render_##player##_w1, \ |
| 937 | 937 | render_##player##_w2, \ |
| 938 | 938 | render_##player##_w2, \ |
| r1404 | r1405 | |
| 977 | 977 | dst[ 7] |= color; \ |
| 978 | 978 | } \ |
| 979 | 979 | } \ |
| 980 | static void (*render_##missile[4])(UINT8 *dst) = { \ | |
| 980 | static void (*const render_##missile[4])(UINT8 *dst) = { \ | |
| 981 | 981 | render_##missile##_w1, \ |
| 982 | 982 | render_##missile##_w2, \ |
| 983 | 983 | render_##missile##_w2, \ |
| r1404 | r1405 | |
|---|---|---|
| 27 | 27 | MAKE_RGB(0x7f,0x7f,0x7f) /* grey */ |
| 28 | 28 | }; |
| 29 | 29 | |
| 30 | static UINT16 geebee_colortable[] = | |
| 30 | static const UINT16 geebee_colortable[] = | |
| 31 | 31 | { |
| 32 | 32 | 0, 1, |
| 33 | 33 | 1, 0, |
| r1404 | r1405 | |
| 35 | 35 | 2, 0 |
| 36 | 36 | }; |
| 37 | 37 | |
| 38 | static UINT16 navarone_colortable[] = | |
| 38 | static const UINT16 navarone_colortable[] = | |
| 39 | 39 | { |
| 40 | 40 | 0, 2, |
| 41 | 41 | 2, 0, |
| r1404 | r1405 | |
|---|---|---|
| 55 | 55 | |
| 56 | 56 | int cvs_collision_register=0; |
| 57 | 57 | |
| 58 | static int ModeOffset[4] = {223,191,255,127}; | |
| 58 | static const int ModeOffset[4] = {223,191,255,127}; | |
| 59 | 59 | |
| 60 | 60 | /****************************************************** |
| 61 | 61 | * Convert Colour prom to format for Mame Colour Map * |
| r1404 | r1405 | |
|---|---|---|
| 167 | 167 | }; |
| 168 | 168 | |
| 169 | 169 | /* note that drgnunit, stg and qzkklogy run on the same board, yet they need different alignment */ |
| 170 | static struct x_offset game_offsets[] = | |
| 170 | static const struct x_offset game_offsets[] = | |
| 171 | 171 | { |
| 172 | 172 | /* only sprites */ |
| 173 | 173 | { "tndrcade", { -1, 0 } }, // correct (wall at beginning of game) |
| r1404 | r1405 | |
| 217 | 217 | { NULL } |
| 218 | 218 | }; |
| 219 | 219 | |
| 220 | static struct x_offset *global_offsets; | |
| 220 | static const struct x_offset *global_offsets; | |
| 221 | 221 | |
| 222 | 222 | |
| 223 | 223 | /* ---- 3--- Coin #1 Lock Out |
| r1404 | r1405 | |
| 229 | 229 | { |
| 230 | 230 | static int seta_coin_lockout = 1; |
| 231 | 231 | 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"}; | |
| 233 | 233 | |
| 234 | 234 | /* Only compute seta_coin_lockout when confronted with a new gamedrv */ |
| 235 | 235 | if (seta_driver != Machine->gamedrv) |
| r1404 | r1405 | |
|---|---|---|
| 368 | 368 | |
| 369 | 369 | for (i = 0;i < 4;i++) |
| 370 | 370 | { |
| 371 | static int disp_x[] = { 25, 27, 28, 29 }; | |
| 371 | static const int disp_x[] = { 25, 27, 28, 29 }; | |
| 372 | 372 | |
| 373 | 373 | j = i << 2; |
| 374 | 374 | scrollx = ( namcos1_playfield_control[j+1] + (namcos1_playfield_control[j+0]<<8) ) - disp_x[i]; |
| r1404 | r1405 | |
|---|---|---|
| 40 | 40 | |
| 41 | 41 | */ |
| 42 | 42 | |
| 43 | struct star star_seed_tab[252]= | |
| 43 | const struct star star_seed_tab[252]= | |
| 44 | 44 | { |
| 45 | 45 | |
| 46 | 46 | /* also shared by Bosconian */ |
| r1404 | r1405 | |
| 501 | 501 | |
| 502 | 502 | for (offs = 0;offs < 0x80;offs += 2) |
| 503 | 503 | { |
| 504 | static int gfx_offs[2][2] = | |
| 504 | static const int gfx_offs[2][2] = | |
| 505 | 505 | { |
| 506 | 506 | { 0, 1 }, |
| 507 | 507 | { 2, 3 } |
| r1404 | r1405 | |
|---|---|---|
| 59 | 59 | extern int TC0080VCO_has_tx; |
| 60 | 60 | |
| 61 | 61 | /* These are hand-tuned values */ |
| 62 | static int zoomy_conv_table[] = | |
| 62 | static const int zoomy_conv_table[] = | |
| 63 | 63 | { |
| 64 | 64 | /* +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +a +b +c +d +e +f */ |
| 65 | 65 | 0x00,0x01,0x01,0x02,0x02,0x03,0x04,0x05, 0x06,0x06,0x07,0x08,0x09,0x0a,0x0a,0x0b, /* 0x00 */ |
| r1404 | r1405 | |
|---|---|---|
| 291 | 291 | |
| 292 | 292 | for (offs = 0;offs < 0x80;offs += 2) |
| 293 | 293 | { |
| 294 | static int gfx_offs[2][2] = | |
| 294 | static const int gfx_offs[2][2] = | |
| 295 | 295 | { |
| 296 | 296 | { 0, 1 }, |
| 297 | 297 | { 2, 3 } |
| r1404 | r1405 | |
|---|---|---|
| 199 | 199 | } |
| 200 | 200 | |
| 201 | 201 | { |
| 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 }; | |
| 204 | 204 | int x,y, ex, ey; |
| 205 | 205 | |
| 206 | 206 | for( y=0; y < height; y++ ){ |
| r1404 | r1405 | |
|---|---|---|
| 34 | 34 | static rectangle spritearea[32]; /*areas on bitmap (sprite locations)*/ |
| 35 | 35 | static UINT8 spriteon[32]; /* 1 if sprite is active */ |
| 36 | 36 | |
| 37 | static int playfield_enable_mask[3] = { 0x10, 0x20, 0x40 }; | |
| 37 | static const int playfield_enable_mask[3] = { 0x10, 0x20, 0x40 }; | |
| 38 | 38 | |
| 39 | 39 | |
| 40 | 40 | /*************************************************************************** |
| r1404 | r1405 | |
| 707 | 707 | |
| 708 | 708 | static void draw_playfield(running_machine *machine, int n, mame_bitmap *bitmap) |
| 709 | 709 | { |
| 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 }; | |
| 712 | 712 | |
| 713 | 713 | if (taitosj_video_enable & playfield_enable_mask[n]) |
| 714 | 714 | { |
| r1404 | r1405 | |
|---|---|---|
| 130 | 130 | static int flip_x, flip_y; |
| 131 | 131 | |
| 132 | 132 | static vgdata vgd, *vg; |
| 133 | static vgconf *vgc; | |
| 133 | static const vgconf *vgc; | |
| 134 | 134 | static int nvect; |
| 135 | 135 | static vgvector vectbuf[MAXVECT]; |
| 136 | 136 | |
| r1404 | r1405 | |
| 1274 | 1274 | * |
| 1275 | 1275 | *************************************/ |
| 1276 | 1276 | |
| 1277 | static vgconf dvg_default = | |
| 1277 | static const vgconf dvg_default = | |
| 1278 | 1278 | { |
| 1279 | 1279 | { |
| 1280 | 1280 | dvg_dmapush, |
| r1404 | r1405 | |
| 1292 | 1292 | dvg_vgrst |
| 1293 | 1293 | }; |
| 1294 | 1294 | |
| 1295 | static vgconf avg_default = | |
| 1295 | static const vgconf avg_default = | |
| 1296 | 1296 | { |
| 1297 | 1297 | { |
| 1298 | 1298 | avg_latch0, |
| r1404 | r1405 | |
| 1310 | 1310 | avg_vgrst |
| 1311 | 1311 | }; |
| 1312 | 1312 | |
| 1313 | static vgconf avg_mhavoc = | |
| 1313 | static const vgconf avg_mhavoc = | |
| 1314 | 1314 | { |
| 1315 | 1315 | { |
| 1316 | 1316 | avg_latch0, |
| r1404 | r1405 | |
| 1328 | 1328 | mhavoc_vgrst |
| 1329 | 1329 | }; |
| 1330 | 1330 | |
| 1331 | static vgconf avg_starwars = | |
| 1331 | static const vgconf avg_starwars = | |
| 1332 | 1332 | { |
| 1333 | 1333 | { |
| 1334 | 1334 | avg_latch0, |
| r1404 | r1405 | |
| 1346 | 1346 | avg_vgrst |
| 1347 | 1347 | }; |
| 1348 | 1348 | |
| 1349 | static vgconf avg_tempest = | |
| 1349 | static const vgconf avg_tempest = | |
| 1350 | 1350 | { |
| 1351 | 1351 | { |
| 1352 | 1352 | avg_latch0, |
| r1404 | r1405 | |
| 1364 | 1364 | avg_vgrst |
| 1365 | 1365 | }; |
| 1366 | 1366 | |
| 1367 | static vgconf avg_bzone = | |
| 1367 | static const vgconf avg_bzone = | |
| 1368 | 1368 | { |
| 1369 | 1369 | { |
| 1370 | 1370 | avg_latch0, |
| r1404 | r1405 | |
| 1382 | 1382 | avg_vgrst |
| 1383 | 1383 | }; |
| 1384 | 1384 | |
| 1385 | static vgconf avg_quantum = | |
| 1385 | static const vgconf avg_quantum = | |
| 1386 | 1386 | { |
| 1387 | 1387 | { |
| 1388 | 1388 | quantum_st2st3, |
| r1404 | r1405 | |
|---|---|---|
| 1353 | 1353 | int yflip = source[offs[4]] & 0x20; /* flip y */ |
| 1354 | 1354 | int color = base_color + ((source[offs[1]] & 0xf0) >> 4); |
| 1355 | 1355 | 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}; | |
| 1358 | 1358 | int x,y, ex, ey; |
| 1359 | 1359 | |
| 1360 | 1360 | if (attr & 0x01) sx -= 256; |
| r1404 | r1405 | |
| 1730 | 1730 | for (offs = K007420_SPRITERAM_SIZE - 8; offs >= 0; offs -= 8) |
| 1731 | 1731 | { |
| 1732 | 1732 | 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 }; | |
| 1735 | 1735 | |
| 1736 | 1736 | code = K007420_ram[offs+1]; |
| 1737 | 1737 | color = K007420_ram[offs+2]; |
| r1404 | r1405 | |
| 2682 | 2682 | 40 41 44 45 56 57 60 61 |
| 2683 | 2683 | 42 43 46 47 58 59 62 63 |
| 2684 | 2684 | */ |
| 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 }; | |
| 2689 | 2689 | |
| 2690 | 2690 | |
| 2691 | 2691 | offs = sortedlist[pri_code]; |
| r1404 | r1405 | |
| 4153 | 4153 | 40 41 44 45 56 57 60 61 |
| 4154 | 4154 | 42 43 46 47 58 59 62 63 |
| 4155 | 4155 | */ |
| 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 }; | |
| 4158 | 4158 | |
| 4159 | 4159 | int sortedlist[NUM_SPRITES]; |
| 4160 | 4160 | int offs,zcode; |
| r1404 | r1405 | |
| 4551 | 4551 | void (*callback)(int *code,int *color,int *flags)) |
| 4552 | 4552 | { |
| 4553 | 4553 | 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 }; | |
| 4555 | 4555 | |
| 4556 | 4556 | /* find first empty slot to decode gfx */ |
| 4557 | 4557 | for (gfx_index = 0; gfx_index < MAX_GFX_ELEMENTS; gfx_index++) |
| r1404 | r1405 | |
| 5421 | 5421 | |
| 5422 | 5422 | INLINE void K056832_get_tile_info( running_machine *machine, tile_data *tileinfo, int tile_index, int pageIndex ) |
| 5423 | 5423 | { |
| 5424 | static struct K056832_SHIFTMASKS | |
| 5424 | static const struct K056832_SHIFTMASKS | |
| 5425 | 5425 | { |
| 5426 | 5426 | int flips, palm1, pals2, palm2; |
| 5427 | 5427 | } |
| 5428 | 5428 | K056832_shiftmasks[4] = {{6,0x3f,0,0x00},{4,0x0f,2,0x30},{2,0x03,2,0x3c},{0,0x00,2,0x3f}}; |
| 5429 | 5429 | |
| 5430 | struct K056832_SHIFTMASKS *smptr; | |
| 5430 | const struct K056832_SHIFTMASKS *smptr; | |
| 5431 | 5431 | int layer, flip, fbits, attr, code, color, flags; |
| 5432 | 5432 | UINT16 *pMem; |
| 5433 | 5433 | |
| r1404 | r1405 | |
| 7101 | 7101 | void K055555_write_reg(UINT8 regnum, UINT8 regdat) |
| 7102 | 7102 | { |
| 7103 | 7103 | #if VERBOSE |
| 7104 | static const char *rnames[46] = | |
| 7104 | static const char *const rnames[46] = | |
| 7105 | 7105 | { |
| 7106 | 7106 | "BGC CBLK", "BGC SET", "COLSET0", "COLSET1", "COLSET2", "COLSET3", "COLCHG ON", |
| 7107 | 7107 | "A PRI 0", "A PRI 1", "A COLPRI", "B PRI 0", "B PRI 1", "B COLPRI", "C PRI", "D PRI", |
| r1404 | r1405 | |
|---|---|---|
| 193 | 193 | |
| 194 | 194 | for (offs = 0;offs < 0x80;offs += 2) |
| 195 | 195 | { |
| 196 | static int gfx_offs[2][2] = | |
| 196 | static const int gfx_offs[2][2] = | |
| 197 | 197 | { |
| 198 | 198 | { 0, 1 }, |
| 199 | 199 | { 2, 3 } |
| r1404 | r1405 | |
|---|---|---|
| 326 | 326 | |
| 327 | 327 | typedef void (*_DrawTemplate)(_Quad *); |
| 328 | 328 | |
| 329 | static _DrawTemplate DrawImage[]= | |
| 329 | static const _DrawTemplate DrawImage[]= | |
| 330 | 330 | { |
| 331 | 331 | TILENAME(4,0,0), |
| 332 | 332 | TILENAME(8,0,0), |
| r1404 | r1405 | |
| 344 | 344 | TILENAME(16,0,2), |
| 345 | 345 | }; |
| 346 | 346 | |
| 347 | static _DrawTemplate DrawTile[]= | |
| 347 | static const _DrawTemplate DrawTile[]= | |
| 348 | 348 | { |
| 349 | 349 | TILENAME(4,1,0), |
| 350 | 350 | TILENAME(8,1,0), |
| r1404 | r1405 | |
|---|---|---|
| 260 | 260 | |
| 261 | 261 | for (offs = 0;offs < 0x80;offs += 2) |
| 262 | 262 | { |
| 263 | static int gfx_offs[2][2] = | |
| 263 | static const int gfx_offs[2][2] = | |
| 264 | 264 | { |
| 265 | 265 | { 0, 1 }, |
| 266 | 266 | { 2, 3 } |
| r1404 | r1405 | |
|---|---|---|
| 460 | 460 | ************************************************************************/ |
| 461 | 461 | static void cclk_init(void) |
| 462 | 462 | { |
| 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}; | |
| 467 | 467 | int i; |
| 468 | 468 | UINT8 * dst; |
| 469 | 469 | |
| r1404 | r1405 | |
| 1088 | 1088 | } |
| 1089 | 1089 | |
| 1090 | 1090 | |
| 1091 | static renderer_function renderer[2][19][5] = { | |
| 1091 | static const renderer_function renderer[2][19][5] = { | |
| 1092 | 1092 | /* no playfield narrow normal wide */ |
| 1093 | 1093 | { |
| 1094 | 1094 | {antic_mode_0_xx,antic_mode_0_xx,antic_mode_0_xx,antic_mode_0_xx}, |
| r1404 | r1405 | |
|---|---|---|
| 2166 | 2166 | } |
| 2167 | 2167 | /* |
| 2168 | 2168 | { |
| 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" }; | |
| 2170 | 2170 | for (groupnum = 0; groupnum <= sprgroup_mask; groupnum++) |
| 2171 | 2171 | { |
| 2172 | 2172 | mame_printf_debug("%X: ", groupnum); |
| r1404 | r1405 | |
| 2539 | 2539 | |
| 2540 | 2540 | #if SHOW_ALPHA |
| 2541 | 2541 | { |
| 2542 | static const char *layername[] = { "TEXT ", "NBG0 ", "NBG1 ", "NBG2 ", "NBG3 ", "BITMAP " }; | |
| 2542 | static const char *const layername[] = { "TEXT ", "NBG0 ", "NBG1 ", "NBG2 ", "NBG3 ", "BITMAP " }; | |
| 2543 | 2543 | char temp[100]; |
| 2544 | 2544 | int count = 0, i; |
| 2545 | 2545 | sprintf(temp, "ALPHA(%d):", (mixer_control[which][0x4e/2] >> 8) & 7); |
| r1404 | r1405 | |
|---|---|---|
| 39 | 39 | #define L0 0xaa |
| 40 | 40 | #define L1 0xcc |
| 41 | 41 | #define L2 0xf0 |
| 42 | static int primask[2][4] = | |
| 42 | static const int primask[2][4] = | |
| 43 | 43 | { |
| 44 | 44 | { L0|L2, L0, L0|L2, L0|L1|L2 }, |
| 45 | 45 | { L1|L2, L2, 0, L0|L1|L2 } |
| r1404 | r1405 | |
|---|---|---|
| 204 | 204 | |
| 205 | 205 | for (offs = 0;offs < 0x80;offs += 2) |
| 206 | 206 | { |
| 207 | static int gfx_offs[2][2] = | |
| 207 | static const int gfx_offs[2][2] = | |
| 208 | 208 | { |
| 209 | 209 | { 0, 1 }, |
| 210 | 210 | { 2, 3 } |
| r1404 | r1405 | |
|---|---|---|
| 37 | 37 | |
| 38 | 38 | for (pri_code = NUM_SPRITES - 1; pri_code >= 0; pri_code--) |
| 39 | 39 | { |
| 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 }; | |
| 43 | 43 | int x, y; |
| 44 | 44 | int ox, oy; |
| 45 | 45 | int flipx, flipy; |
| r1404 | r1405 | |
|---|---|---|
| 2448 | 2448 | } |
| 2449 | 2449 | |
| 2450 | 2450 | #if LOG_RDP_EXECUTION |
| 2451 | static const char *image_format[] = { "RGBA", "YUV", "CI", "IA", "I", "???", "???", "???" }; | |
| 2452 | static const char *image_size[] = { "4-bit", "8-bit", "16-bit", "32-bit" }; | |
| 2451 | static const char *const image_format[] = { "RGBA", "YUV", "CI", "IA", "I", "???", "???", "???" }; | |
| 2452 | static const char *const image_size[] = { "4-bit", "8-bit", "16-bit", "32-bit" }; | |
| 2453 | 2453 | #endif |
| 2454 | 2454 | |
| 2455 | 2455 | static const int rdp_command_length[64] = |
| r1404 | r1405 | |
| 3392 | 3392 | |
| 3393 | 3393 | /*****************************************************************************/ |
| 3394 | 3394 | |
| 3395 | static void (* rdp_command_table[64])(UINT32 w1, UINT32 w2) = | |
| 3395 | static void (*const rdp_command_table[64])(UINT32 w1, UINT32 w2) = | |
| 3396 | 3396 | { |
| 3397 | 3397 | /* 0x00 */ |
| 3398 | 3398 | rdp_noop, rdp_invalid, rdp_invalid, rdp_invalid, |
| r1404 | r1405 | |
|---|---|---|
| 716 | 716 | tilemap_draw(bitmap, cliprect, bg_tilemap[homedata_visible_page][1], 0, 0); |
| 717 | 717 | return 0; |
| 718 | 718 | } |
| 719 | /* | |
| 719 | ||
| 720 | #ifdef UNUSED_FUNCTION | |
| 720 | 721 | VIDEO_UPDATE( reikaids ) |
| 721 | 722 | { |
| 722 | 723 | int flags; |
| 723 | static int pritable[8][4] = | |
| 724 | static const int pritable[8][4] = | |
| 724 | 725 | { |
| 725 | 726 | { 3,1,0,2 }, |
| 726 | 727 | { 1,3,0,2 }, |
| r1404 | r1405 | |
| 749 | 750 | tilemap_draw(bitmap, cliprect, bg_tilemap[homedata_visible_page][pritable[pri][3-i]], 0, 0); |
| 750 | 751 | return 0; |
| 751 | 752 | } |
| 753 | #endif | |
| 752 | 754 | |
| 753 | */ | |
| 754 | 755 | VIDEO_UPDATE( reikaids ) |
| 755 | 756 | { |
| 756 | 757 | 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 */ | |
| 758 | 759 | { |
| 759 | 760 | { |
| 760 | 761 | { 3,1,0,2 }, |
| r1404 | r1405 | |
|---|---|---|
| 204 | 204 | |
| 205 | 205 | for (offs = 0;offs < 0x80;offs += 2) |
| 206 | 206 | { |
| 207 | static int tile_offset[2][2] = | |
| 207 | static const int tile_offset[2][2] = | |
| 208 | 208 | { |
| 209 | 209 | {0x0,0x1}, |
| 210 | 210 | {0x2,0x3}, |
| r1404 | r1405 | |
|---|---|---|
| 155 | 155 | int j, x, y, ex, ey; |
| 156 | 156 | const gfx_element *gfx = machine->gfx[0]; |
| 157 | 157 | |
| 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}; | |
| 160 | 160 | |
| 161 | 161 | for (j = 0; j < sprite_count[pri]; j++){ |
| 162 | 162 | int i = sprite_table[pri][j]; |
| r1404 | r1405 | |
|---|---|---|
| 217 | 217 | #define ADJUST_COLOR(c) ((c < 0) ? 0 : ((c > 255) ? 255 : c)) |
| 218 | 218 | |
| 219 | 219 | /* table used for color adjustment */ |
| 220 | static int pen_color_adjust[16] = { | |
| 220 | static const int pen_color_adjust[16] = { | |
| 221 | 221 | +RGB_CHG*0, -RGB_CHG*1, -RGB_CHG*2, -RGB_CHG*3, -RGB_CHG*4, -RGB_CHG*5, -RGB_CHG*6, -RGB_CHG*7, |
| 222 | 222 | +RGB_CHG*8, +RGB_CHG*7, +RGB_CHG*6, +RGB_CHG*5, +RGB_CHG*4, +RGB_CHG*3, +RGB_CHG*2, +RGB_CHG*1 |
| 223 | 223 | }; |
| r1404 | r1405 | |
|---|---|---|
| 48 | 48 | //**************************************************************************** |
| 49 | 49 | // Exports |
| 50 | 50 | |
| 51 | gfx_layout bwing_tilelayout = | |
| 51 | const gfx_layout bwing_tilelayout = | |
| 52 | 52 | { |
| 53 | 53 | 16, 16, |
| 54 | 54 | BW_NTILES, |
| r1404 | r1405 | |
|---|---|---|
| 126 | 126 | |
| 127 | 127 | INLINE int sf_invert(int nb) |
| 128 | 128 | { |
| 129 | static int delta[4] = {0x00, 0x18, 0x18, 0x00}; | |
| 129 | static const int delta[4] = {0x00, 0x18, 0x18, 0x00}; | |
| 130 | 130 | return nb ^ delta[(nb >> 3) & 3]; |
| 131 | 131 | } |
| 132 | 132 |
| r1404 | r1405 | |
|---|---|---|
| 118 | 118 | int i, x, y, ex, ey; |
| 119 | 119 | const gfx_element *gfx = machine->gfx[0]; |
| 120 | 120 | |
| 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}; | |
| 123 | 123 | |
| 124 | 124 | for (i = 3; i < (0x1000 - 6)/2; i += 4){ |
| 125 | 125 | int sx = wrally_spriteram[i+2] & 0x03ff; |
| r1404 | r1405 | |
|---|---|---|
| 750 | 750 | if (data < 0x08) |
| 751 | 751 | { |
| 752 | 752 | /* TODO: Don't need this table! */ |
| 753 | static UINT32 offs_table[2][8] = | |
| 753 | static const UINT32 offs_table[2][8] = | |
| 754 | 754 | { |
| 755 | 755 | { 0x10000, 0x14000, 0x18000, 0x1c000, 0x00000, 0x04000, 0x08000, 0x0c000 }, |
| 756 | 756 | { 0x00000, 0x04000, 0x08000, 0x0c000, 0x10000, 0x14000, 0x18000, 0x1c000 } |
| r1404 | r1405 | |
| 1367 | 1367 | /* |
| 1368 | 1368 | What are the correct ACIA clocks ? |
| 1369 | 1369 | */ |
| 1370 | static struct acia6850_interface z80_acia_if = | |
| 1370 | static const struct acia6850_interface z80_acia_if = | |
| 1371 | 1371 | { |
| 1372 | 1372 | 500000, |
| 1373 | 1373 | 500000, |
| r1404 | r1405 | |
| 1379 | 1379 | z80_acia_irq |
| 1380 | 1380 | }; |
| 1381 | 1381 | |
| 1382 | static struct acia6850_interface m6809_acia_if = | |
| 1382 | static const struct acia6850_interface m6809_acia_if = | |
| 1383 | 1383 | { |
| 1384 | 1384 | 500000, |
| 1385 | 1385 | 500000, |
| r1404 | r1405 | |
| 1391 | 1391 | NULL |
| 1392 | 1392 | }; |
| 1393 | 1393 | |
| 1394 | static struct acia6850_interface data_acia_if = | |
| 1394 | static const struct acia6850_interface data_acia_if = | |
| 1395 | 1395 | { |
| 1396 | 1396 | 500000, |
| 1397 | 1397 | 500000, |
| r1404 | r1405 | |
| 1474 | 1474 | state_save_register_global_pointer(video_ram, 0x20000); |
| 1475 | 1475 | } |
| 1476 | 1476 | |
| 1477 | static struct upd7759_interface upd7759_interface = | |
| 1477 | static const struct upd7759_interface upd7759_interface = | |
| 1478 | 1478 | { |
| 1479 | 1479 | REGION_SOUND1 |
| 1480 | 1480 | }; |
| r1404 | r1405 | |
|---|---|---|
| 283 | 283 | GFXDECODE_ENTRY( REGION_GFX2, 0x0000, charlayout2, 0, 16 ) |
| 284 | 284 | GFXDECODE_END |
| 285 | 285 | |
| 286 | static struct AY8910interface ay8910_interface = | |
| 286 | static const struct AY8910interface ay8910_interface = | |
| 287 | 287 | { |
| 288 | 288 | input_port_2_r, // DSW1 |
| 289 | 289 | input_port_3_r, // DSW2 |
| r1404 | r1405 | |
|---|---|---|
| 294 | 294 | |
| 295 | 295 | } |
| 296 | 296 | |
| 297 | static struct AY8910interface ay8910_interface = | |
| 297 | static const struct AY8910interface ay8910_interface = | |
| 298 | 298 | { |
| 299 | 299 | 0, |
| 300 | 300 | 0, |
| r1404 | r1405 | |
| 302 | 302 | unk_w |
| 303 | 303 | }; |
| 304 | 304 | |
| 305 | static struct MSM5232interface msm5232_interface = | |
| 305 | static const struct MSM5232interface msm5232_interface = | |
| 306 | 306 | { |
| 307 | 307 | { 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) */ |
| 308 | 308 | }; |
| r1404 | r1405 | |
|---|---|---|
| 1422 | 1422 | } |
| 1423 | 1423 | |
| 1424 | 1424 | |
| 1425 | static struct MSM5205interface msm5205_interface = | |
| 1425 | static const struct MSM5205interface msm5205_interface = | |
| 1426 | 1426 | { |
| 1427 | 1427 | spangbl_adpcm_int, /* interrupt function */ |
| 1428 | 1428 | MSM5205_S48_4B /* 4KHz 4-bit */ |
| r1404 | r1405 | |
|---|---|---|
| 601 | 601 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 602 | 602 | } |
| 603 | 603 | |
| 604 | static struct YM2151interface ym2151_interface = | |
| 604 | static const struct YM2151interface ym2151_interface = | |
| 605 | 605 | { |
| 606 | 606 | irqhandler, |
| 607 | 607 | bankswitch_w |
| r1404 | r1405 | |
|---|---|---|
| 289 | 289 | cpunum_set_input_line(1,0,linestate); |
| 290 | 290 | } |
| 291 | 291 | |
| 292 | static struct YM3812interface ym3812_interface = | |
| 292 | static const struct YM3812interface ym3812_interface = | |
| 293 | 293 | { |
| 294 | 294 | irqhandler |
| 295 | 295 | }; |
| r1404 | r1405 | |
|---|---|---|
| 250 | 250 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 251 | 251 | } |
| 252 | 252 | |
| 253 | static struct YM2203interface ym2203_interface = | |
| 253 | static const struct YM2203interface ym2203_interface = | |
| 254 | 254 | { |
| 255 | 255 | 0, |
| 256 | 256 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 425 | 425 | raster_irq_timer = timer_alloc(interrupt_gen, NULL); |
| 426 | 426 | } |
| 427 | 427 | |
| 428 | static struct YMZ280Binterface ymz280b_intf = | |
| 428 | static const struct YMZ280Binterface ymz280b_intf = | |
| 429 | 429 | { |
| 430 | 430 | REGION_SOUND1, |
| 431 | 431 | 0 |
| r1404 | r1405 | |
|---|---|---|
| 296 | 296 | * |
| 297 | 297 | *************************************/ |
| 298 | 298 | |
| 299 | static struct POKEYinterface pokey_interface_1 = | |
| 299 | static const struct POKEYinterface pokey_interface_1 = | |
| 300 | 300 | { |
| 301 | 301 | { 0 }, |
| 302 | 302 | dsw1_r |
| 303 | 303 | }; |
| 304 | 304 | |
| 305 | static struct POKEYinterface pokey_interface_2 = | |
| 305 | static const struct POKEYinterface pokey_interface_2 = | |
| 306 | 306 | { |
| 307 | 307 | { input_port_1_r,input_port_2_r,dsw2_0r,dsw2_1r,dsw2_2r,dsw2_3r,dsw2_4r } |
| 308 | 308 | }; |
| r1404 | r1405 | |
|---|---|---|
| 301 | 301 | AM_RANGE(0xfff0, 0xfff3) AM_WRITE(MWA8_NOP) |
| 302 | 302 | ADDRESS_MAP_END |
| 303 | 303 | |
| 304 | static struct K054539interface k054539_interface = | |
| 304 | static const struct K054539interface k054539_interface = | |
| 305 | 305 | { |
| 306 | 306 | REGION_SOUND1 |
| 307 | 307 | }; |
| r1404 | r1405 | |
|---|---|---|
| 814 | 814 | |
| 815 | 815 | INPUT_PORTS_END |
| 816 | 816 | |
| 817 | static struct VR0Interface vr0_interface = | |
| 817 | static const struct VR0Interface vr0_interface = | |
| 818 | 818 | { |
| 819 | 819 | 0x04800000 |
| 820 | 820 | }; |
| r1404 | r1405 | |
|---|---|---|
| 558 | 558 | * |
| 559 | 559 | *************************************/ |
| 560 | 560 | |
| 561 | static struct POKEYinterface pokey_interface_1 = | |
| 561 | static const struct POKEYinterface pokey_interface_1 = | |
| 562 | 562 | { |
| 563 | 563 | { input_port_1_bit_r,input_port_1_bit_r,input_port_1_bit_r,input_port_1_bit_r, |
| 564 | 564 | input_port_1_bit_r,input_port_1_bit_r,input_port_1_bit_r,input_port_1_bit_r } |
| 565 | 565 | }; |
| 566 | 566 | |
| 567 | static struct POKEYinterface pokey_interface_2 = | |
| 567 | static const struct POKEYinterface pokey_interface_2 = | |
| 568 | 568 | { |
| 569 | 569 | { input_port_2_bit_r,input_port_2_bit_r,input_port_2_bit_r,input_port_2_bit_r, |
| 570 | 570 | input_port_2_bit_r,input_port_2_bit_r,input_port_2_bit_r,input_port_2_bit_r } |
| r1404 | r1405 | |
|---|---|---|
| 276 | 276 | cpunum_set_input_line(1,1,state); /* IRQ 2 */ |
| 277 | 277 | } |
| 278 | 278 | |
| 279 | static struct YM2151interface ym2151_interface = | |
| 279 | static const struct YM2151interface ym2151_interface = | |
| 280 | 280 | { |
| 281 | 281 | sound_irq |
| 282 | 282 | }; |
| r1404 | r1405 | |
|---|---|---|
| 720 | 720 | cpunum_set_input_line(2, 0, irq ? ASSERT_LINE : CLEAR_LINE); |
| 721 | 721 | } |
| 722 | 722 | |
| 723 | static struct YM2203interface ym2203_interface = | |
| 723 | static const struct YM2203interface ym2203_interface = | |
| 724 | 724 | { |
| 725 | 725 | 0, |
| 726 | 726 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | |
| 97 | static struct YM2203interface ym2203_interface = | |
| 97 | static const struct YM2203interface ym2203_interface = | |
| 98 | 98 | { |
| 99 | 99 | input_port_0_r, |
| 100 | 100 | input_port_1_r, |
| r1404 | r1405 | |
|---|---|---|
| 1380 | 1380 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 1381 | 1381 | } |
| 1382 | 1382 | |
| 1383 | static struct YM2610interface ym2610_interface = | |
| 1383 | static const struct YM2610interface ym2610_interface = | |
| 1384 | 1384 | { |
| 1385 | 1385 | irqhandler, |
| 1386 | 1386 | REGION_SOUND1, |
| 1387 | 1387 | REGION_SOUND2 |
| 1388 | 1388 | }; |
| 1389 | 1389 | |
| 1390 | static struct YM3812interface ym3812_interface = | |
| 1390 | static const struct YM3812interface ym3812_interface = | |
| 1391 | 1391 | { |
| 1392 | 1392 | irqhandler /* IRQ Line */ |
| 1393 | 1393 | }; |
| r1404 | r1405 | |
|---|---|---|
| 617 | 617 | pia_reset(); |
| 618 | 618 | } |
| 619 | 619 | |
| 620 | static struct AY8910interface ay8912_interface = | |
| 620 | static const struct AY8910interface ay8912_interface = | |
| 621 | 621 | { |
| 622 | 622 | input_port_4_r |
| 623 | 623 | }; |
| r1404 | r1405 | |
|---|---|---|
| 616 | 616 | |
| 617 | 617 | /* Sound Interfaces */ |
| 618 | 618 | |
| 619 | static struct MSM5205interface msm5205_interface = | |
| 619 | static const struct MSM5205interface msm5205_interface = | |
| 620 | 620 | { |
| 621 | 621 | idsoccer_adpcm_int, // interrupt function |
| 622 | 622 | MSM5205_S64_4B // 6 kHz ??? |
| r1404 | r1405 | |
|---|---|---|
| 247 | 247 | eeprom_handler(file, read_or_write); |
| 248 | 248 | } |
| 249 | 249 | |
| 250 | static ppc_config ultrsprt_ppc_cfg = | |
| 250 | static const ppc_config ultrsprt_ppc_cfg = | |
| 251 | 251 | { |
| 252 | 252 | PPC_MODEL_403GA |
| 253 | 253 | }; |
| 254 | 254 | |
| 255 | static struct K054539interface k054539_interface = | |
| 255 | static const struct K054539interface k054539_interface = | |
| 256 | 256 | { |
| 257 | 257 | REGION_SOUND1 |
| 258 | 258 | }; |
| r1404 | r1405 | |
|---|---|---|
| 358 | 358 | 256 |
| 359 | 359 | }; |
| 360 | 360 | |
| 361 | static struct namco_interface snkwave_interface = | |
| 361 | static const struct namco_interface snkwave_interface = | |
| 362 | 362 | { |
| 363 | 363 | 1, |
| 364 | 364 | -1 |
| r1404 | r1405 | |
|---|---|---|
| 852 | 852 | * |
| 853 | 853 | *************************************/ |
| 854 | 854 | |
| 855 | static tms34010_config zunit_tms_config = | |
| 855 | static const tms34010_config zunit_tms_config = | |
| 856 | 856 | { |
| 857 | 857 | FALSE, /* halt on reset */ |
| 858 | 858 | 0, /* the screen operated on */ |
| r1404 | r1405 | |
| 864 | 864 | midyunit_from_shiftreg /* read from shiftreg function */ |
| 865 | 865 | }; |
| 866 | 866 | |
| 867 | static tms34010_config yunit_tms_config = | |
| 867 | static const tms34010_config yunit_tms_config = | |
| 868 | 868 | { |
| 869 | 869 | FALSE, /* halt on reset */ |
| 870 | 870 | 0, /* the screen operated on */ |
| r1404 | r1405 | |
|---|---|---|
| 640 | 640 | |
| 641 | 641 | |
| 642 | 642 | |
| 643 | static struct z80_irq_daisy_chain daisy_chain[] = | |
| 643 | static const struct z80_irq_daisy_chain daisy_chain[] = | |
| 644 | 644 | { |
| 645 | 645 | { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti , 0 }, /* device 0 = CTC_0 , high priority */ |
| 646 | 646 | { z80pio_reset, z80pio_irq_state, z80pio_irq_ack, z80pio_irq_reti , 0 }, /* device 1 = PIO_0 , low priority */ |
| r1404 | r1405 | |
|---|---|---|
| 248 | 248 | |
| 249 | 249 | |
| 250 | 250 | |
| 251 | static struct VLM5030interface vlm5030_interface = | |
| 251 | static const struct VLM5030interface vlm5030_interface = | |
| 252 | 252 | { |
| 253 | 253 | REGION_SOUND1, /* memory region */ |
| 254 | 254 | 0 /* memory size of speech rom */ |
| r1404 | r1405 | |
|---|---|---|
| 1521 | 1521 | |
| 1522 | 1522 | /* SnowBros Sound */ |
| 1523 | 1523 | |
| 1524 | static struct YM3812interface ym3812_interface = | |
| 1524 | static const struct YM3812interface ym3812_interface = | |
| 1525 | 1525 | { |
| 1526 | 1526 | irqhandler |
| 1527 | 1527 | }; |
| 1528 | 1528 | |
| 1529 | 1529 | /* SemiCom Sound */ |
| 1530 | 1530 | |
| 1531 | static struct YM2151interface ym2151_interface = | |
| 1531 | static const struct YM2151interface ym2151_interface = | |
| 1532 | 1532 | { |
| 1533 | 1533 | irqhandler |
| 1534 | 1534 | }; |
| r1404 | r1405 | |
|---|---|---|
| 502 | 502 | * |
| 503 | 503 | *************************************/ |
| 504 | 504 | |
| 505 | static struct POKEYinterface pokey_interface = | |
| 505 | static const struct POKEYinterface pokey_interface = | |
| 506 | 506 | { |
| 507 | 507 | { 0 }, |
| 508 | 508 | input_port_3_r |
| r1404 | r1405 | |
|---|---|---|
| 539 | 539 | * |
| 540 | 540 | *************************************/ |
| 541 | 541 | |
| 542 | static struct POKEYinterface bzone_pokey_interface = | |
| 542 | static const struct POKEYinterface bzone_pokey_interface = | |
| 543 | 543 | { |
| 544 | 544 | { 0 }, |
| 545 | 545 | input_port_3_r |
| 546 | 546 | }; |
| 547 | 547 | |
| 548 | 548 | |
| 549 | static struct CustomSound_interface bzone_custom_interface = | |
| 549 | static const struct CustomSound_interface bzone_custom_interface = | |
| 550 | 550 | { |
| 551 | 551 | bzone_sh_start |
| 552 | 552 | }; |
| 553 | 553 | |
| 554 | 554 | |
| 555 | static struct POKEYinterface redbaron_pokey_interface = | |
| 555 | static const struct POKEYinterface redbaron_pokey_interface = | |
| 556 | 556 | { |
| 557 | 557 | { 0 }, |
| 558 | 558 | redbaron_joy_r |
| 559 | 559 | }; |
| 560 | 560 | |
| 561 | 561 | |
| 562 | static struct CustomSound_interface redbaron_custom_interface = | |
| 562 | static const struct CustomSound_interface redbaron_custom_interface = | |
| 563 | 563 | { |
| 564 | 564 | redbaron_sh_start |
| 565 | 565 | }; |
| r1404 | r1405 | |
|---|---|---|
| 235 | 235 | |
| 236 | 236 | static READ16_HANDLER( adc_r ) |
| 237 | 237 | { |
| 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" }; | |
| 239 | 239 | int which = (iochip_regs[0][2] >> 2) & 7; |
| 240 | 240 | |
| 241 | 241 | /* on the write, latch the selected input port and stash the value */ |
| r1404 | r1405 | |
| 1082 | 1082 | * |
| 1083 | 1083 | *************************************/ |
| 1084 | 1084 | |
| 1085 | static struct YM2151interface ym2151_interface = | |
| 1085 | static const struct YM2151interface ym2151_interface = | |
| 1086 | 1086 | { |
| 1087 | 1087 | sound_cpu_irq |
| 1088 | 1088 | }; |
| 1089 | 1089 | |
| 1090 | 1090 | |
| 1091 | static struct SEGAPCMinterface segapcm_interface = | |
| 1091 | static const struct SEGAPCMinterface segapcm_interface = | |
| 1092 | 1092 | { |
| 1093 | 1093 | BANK_512, |
| 1094 | 1094 | REGION_SOUND1 |
| r1404 | r1405 | |
|---|---|---|
| 4118 | 4118 | INPUT_PORTS_END |
| 4119 | 4119 | |
| 4120 | 4120 | |
| 4121 | static struct z80_irq_daisy_chain daisy_chain_main[] = | |
| 4121 | static const struct z80_irq_daisy_chain daisy_chain_main[] = | |
| 4122 | 4122 | { |
| 4123 | 4123 | { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 }, /* device 0 = CTC_0 */ |
| 4124 | 4124 | { 0, 0, 0, 0, -1 } /* end mark */ |
| 4125 | 4125 | }; |
| 4126 | 4126 | |
| 4127 | static struct z80_irq_daisy_chain daisy_chain_sound[] = | |
| 4127 | static const struct z80_irq_daisy_chain daisy_chain_sound[] = | |
| 4128 | 4128 | { |
| 4129 | 4129 | { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 1 }, /* device 0 = CTC_1 */ |
| 4130 | 4130 | { 0, 0, 0, 0, -1 } /* end mark */ |
| r1404 | r1405 | |
|---|---|---|
| 252 | 252 | K007232_set_volume(0,1,0,(v & 0x0f) * 0x11); |
| 253 | 253 | } |
| 254 | 254 | |
| 255 | static struct K007232_interface k007232_interface = | |
| 255 | static const struct K007232_interface k007232_interface = | |
| 256 | 256 | { |
| 257 | 257 | REGION_SOUND1, /* memory regions */ |
| 258 | 258 | volume_callback /* external port callback */ |
| 259 | 259 | }; |
| 260 | 260 | |
| 261 | static struct YM3812interface ym3812_interface = | |
| 261 | static const struct YM3812interface ym3812_interface = | |
| 262 | 262 | { |
| 263 | 263 | irqhandler |
| 264 | 264 | }; |
| r1404 | r1405 | |
|---|---|---|
| 449 | 449 | * |
| 450 | 450 | *************************************/ |
| 451 | 451 | |
| 452 | static tms34010_config tms_config = | |
| 452 | static const tms34010_config tms_config = | |
| 453 | 453 | { |
| 454 | 454 | TRUE, /* halt on reset */ |
| 455 | 455 | 0, /* the screen operated on */ |
| r1404 | r1405 | |
|---|---|---|
| 638 | 638 | cpunum_set_input_line(1,0,linestate); |
| 639 | 639 | } |
| 640 | 640 | |
| 641 | static struct YM3812interface ym3812_interface = | |
| 641 | static const struct YM3812interface ym3812_interface = | |
| 642 | 642 | { |
| 643 | 643 | irqhandler |
| 644 | 644 | }; |
| r1404 | r1405 | |
|---|---|---|
| 532 | 532 | // mame_printf_debug("sound irq\n"); |
| 533 | 533 | } |
| 534 | 534 | |
| 535 | static struct YM2151interface ym2151_interface = | |
| 535 | static const struct YM2151interface ym2151_interface = | |
| 536 | 536 | { |
| 537 | 537 | sound_irq |
| 538 | 538 | }; |
| r1404 | r1405 | |
|---|---|---|
| 331 | 331 | * |
| 332 | 332 | *************************************/ |
| 333 | 333 | |
| 334 | static struct AY8910interface ay8910_interface = | |
| 334 | static const struct AY8910interface ay8910_interface = | |
| 335 | 335 | { |
| 336 | 336 | 0, |
| 337 | 337 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 221 | 221 | |
| 222 | 222 | ***************************************************************************/ |
| 223 | 223 | |
| 224 | static struct YM2203interface ym2203_interface_1 = | |
| 224 | static const struct YM2203interface ym2203_interface_1 = | |
| 225 | 225 | { |
| 226 | 226 | input_port_0_r, |
| 227 | 227 | input_port_1_r |
| 228 | 228 | }; |
| 229 | 229 | |
| 230 | static struct YM2203interface ym2203_interface_2 = | |
| 230 | static const struct YM2203interface ym2203_interface_2 = | |
| 231 | 231 | { |
| 232 | 232 | 0, |
| 233 | 233 | input_port_2_r |
| r1404 | r1405 | |
|---|---|---|
| 845 | 845 | |
| 846 | 846 | INPUT_PORTS_END |
| 847 | 847 | |
| 848 | static struct RF5C400interface rf5c400_interface = | |
| 848 | static const struct RF5C400interface rf5c400_interface = | |
| 849 | 849 | { |
| 850 | 850 | REGION_SOUND1 |
| 851 | 851 | }; |
| 852 | 852 | |
| 853 | static ppc_config hornet_ppc_cfg = | |
| 853 | static const ppc_config hornet_ppc_cfg = | |
| 854 | 854 | { |
| 855 | 855 | PPC_MODEL_403GA |
| 856 | 856 | }; |
| r1404 | r1405 | |
|---|---|---|
| 531 | 531 | } |
| 532 | 532 | |
| 533 | 533 | |
| 534 | static struct YM2608interface ym2608_interface = | |
| 534 | static const struct YM2608interface ym2608_interface = | |
| 535 | 535 | { |
| 536 | 536 | 0,0,0,0,irqhandler, |
| 537 | 537 | REGION_SOUND1 |
| 538 | 538 | }; |
| 539 | 539 | |
| 540 | 540 | |
| 541 | static struct YM2610interface ym2610_interface = | |
| 541 | static const struct YM2610interface ym2610_interface = | |
| 542 | 542 | { |
| 543 | 543 | irqhandler, |
| 544 | 544 | REGION_SOUND1, |
| r1404 | r1405 | |
|---|---|---|
| 448 | 448 | * |
| 449 | 449 | *************************************/ |
| 450 | 450 | |
| 451 | static struct POKEYinterface pokey_interface = | |
| 451 | static const struct POKEYinterface pokey_interface = | |
| 452 | 452 | { |
| 453 | 453 | { 0 }, |
| 454 | 454 | input_port_1_r |
| r1404 | r1405 | |
|---|---|---|
| 480 | 480 | cpunum_set_input_line( 1, 0 , irq ? ASSERT_LINE : CLEAR_LINE ); |
| 481 | 481 | } |
| 482 | 482 | |
| 483 | static struct YM2151interface ym2151_interface = | |
| 483 | static const struct YM2151interface ym2151_interface = | |
| 484 | 484 | { |
| 485 | 485 | dd3_ymirq_handler |
| 486 | 486 | }; |
| r1404 | r1405 | |
|---|---|---|
| 441 | 441 | * |
| 442 | 442 | *************************************/ |
| 443 | 443 | |
| 444 | static tms34010_config master_config = | |
| 444 | static const tms34010_config master_config = | |
| 445 | 445 | { |
| 446 | 446 | FALSE, /* halt on reset */ |
| 447 | 447 | 0, /* the screen operated on */ |
| r1404 | r1405 | |
| 453 | 453 | exterm_from_shiftreg_master /* read from shiftreg function */ |
| 454 | 454 | }; |
| 455 | 455 | |
| 456 | static tms34010_config slave_config = | |
| 456 | static const tms34010_config slave_config = | |
| 457 | 457 | { |
| 458 | 458 | TRUE, /* halt on reset */ |
| 459 | 459 | 0, /* the screen operated on */ |
| r1404 | r1405 | |
|---|---|---|
| 464 | 464 | |
| 465 | 465 | |
| 466 | 466 | |
| 467 | static struct MSM5205interface discoboy_msm5205_interface = | |
| 467 | static const struct MSM5205interface discoboy_msm5205_interface = | |
| 468 | 468 | { |
| 469 | 469 | splash_msm5205_int, /* IRQ handler */ |
| 470 | 470 | MSM5205_S48_4B /* ??? unknown hz */ |
| r1404 | r1405 | |
|---|---|---|
| 916 | 916 | pic8259_set_irq_line(1, 6, state); |
| 917 | 917 | } |
| 918 | 918 | |
| 919 | static struct kbdc8042_interface at8042 = | |
| 919 | static const struct kbdc8042_interface at8042 = | |
| 920 | 920 | { |
| 921 | 921 | KBDC8042_AT386, set_gate_a20, keyboard_interrupt |
| 922 | 922 | }; |
| 923 | 923 | |
| 924 | static struct ide_interface ide_intf = | |
| 924 | static const struct ide_interface ide_intf = | |
| 925 | 925 | { |
| 926 | 926 | ide_interrupt |
| 927 | 927 | }; |
| 928 | 928 | |
| 929 | static struct pci_device_info cx5510 = | |
| 929 | static const struct pci_device_info cx5510 = | |
| 930 | 930 | { |
| 931 | 931 | cx5510_pci_r, |
| 932 | 932 | cx5510_pci_w |
| r1404 | r1405 | |
|---|---|---|
| 169 | 169 | GFXDECODE_END |
| 170 | 170 | |
| 171 | 171 | |
| 172 | static struct AY8910interface ay8910_interface_1 = | |
| 172 | static const struct AY8910interface ay8910_interface_1 = | |
| 173 | 173 | { |
| 174 | 174 | input_port_0_r |
| 175 | 175 | }; |
| 176 | 176 | |
| 177 | static struct AY8910interface ay8910_interface_2 = | |
| 177 | static const struct AY8910interface ay8910_interface_2 = | |
| 178 | 178 | { |
| 179 | 179 | input_port_1_r |
| 180 | 180 | }; |
| r1404 | r1405 | |
|---|---|---|
| 464 | 464 | * |
| 465 | 465 | *************************************/ |
| 466 | 466 | |
| 467 | static struct r3000_config config = | |
| 467 | static const struct r3000_config config = | |
| 468 | 468 | { |
| 469 | 469 | 0, /* 1 if we have an FPU, 0 otherwise */ |
| 470 | 470 | 4096, /* code cache size */ |
| r1404 | r1405 | |
|---|---|---|
| 1111 | 1111 | } |
| 1112 | 1112 | } |
| 1113 | 1113 | |
| 1114 | static struct YMF271interface ymf271_interface = | |
| 1114 | static const struct YMF271interface ymf271_interface = | |
| 1115 | 1115 | { |
| 1116 | 1116 | REGION_SOUND1, |
| 1117 | 1117 | flashrom_read, |
| r1404 | r1405 | |
|---|---|---|
| 646 | 646 | * |
| 647 | 647 | *************************************/ |
| 648 | 648 | |
| 649 | static tms34010_config tms_config_amerdart = | |
| 649 | static const tms34010_config tms_config_amerdart = | |
| 650 | 650 | { |
| 651 | 651 | FALSE, /* halt on reset */ |
| 652 | 652 | 0, /* the screen operated on */ |
| r1404 | r1405 | |
| 659 | 659 | }; |
| 660 | 660 | |
| 661 | 661 | |
| 662 | static tms34010_config tms_config_coolpool = | |
| 662 | static const tms34010_config tms_config_coolpool = | |
| 663 | 663 | { |
| 664 | 664 | FALSE, /* halt on reset */ |
| 665 | 665 | 0, /* the screen operated on */ |
| r1404 | r1405 | |
|---|---|---|
| 200 | 200 | } |
| 201 | 201 | |
| 202 | 202 | /* chip #0: player inputs, buttons, coins */ |
| 203 | static struct namcoio_interface intf0 = | |
| 203 | static const struct namcoio_interface intf0 = | |
| 204 | 204 | { |
| 205 | 205 | { in1_h, in0_l, in0_h, in1_l }, /* port read handlers */ |
| 206 | 206 | { NULL, NULL } /* port write handlers */ |
| 207 | 207 | }; |
| 208 | static struct namcoio_interface intf0_lamps = | |
| 208 | static const struct namcoio_interface intf0_lamps = | |
| 209 | 209 | { |
| 210 | 210 | { in1_h, in0_l, in0_h, in1_l }, /* port read handlers */ |
| 211 | 211 | { out_lamps0, out_lamps1 } /* port write handlers */ |
| 212 | 212 | }; |
| 213 | 213 | /* chip #1: dip switches */ |
| 214 | static struct namcoio_interface intf1 = | |
| 214 | static const struct namcoio_interface intf1 = | |
| 215 | 215 | { |
| 216 | 216 | { dipA_h, dipB_l, dipB_h, dipA_l }, /* port read handlers */ |
| 217 | 217 | { NULL, NULL } /* port write handlers */ |
| r1404 | r1405 | |
| 731 | 731 | GFXDECODE_ENTRY( REGION_GFX2, 0x0000, spritelayout, 64*4, 64 ) |
| 732 | 732 | GFXDECODE_END |
| 733 | 733 | |
| 734 | static struct namco_interface namco_interface = | |
| 734 | static const struct namco_interface namco_interface = | |
| 735 | 735 | { |
| 736 | 736 | 8, /* number of voices */ |
| 737 | 737 | REGION_SOUND1 /* memory region */ |
| r1404 | r1405 | |
|---|---|---|
| 580 | 580 | * |
| 581 | 581 | *************************************/ |
| 582 | 582 | |
| 583 | static tms34010_config tms_config = | |
| 583 | static const tms34010_config tms_config = | |
| 584 | 584 | { |
| 585 | 585 | FALSE, /* halt on reset */ |
| 586 | 586 | 0, /* the screen operated on */ |
| r1404 | r1405 | |
|---|---|---|
| 219 | 219 | GFXDECODE_ENTRY( REGION_GFX2, 0x0000, spritelayout8, 256, 32 ) /* sprites */ |
| 220 | 220 | GFXDECODE_END |
| 221 | 221 | |
| 222 | static struct MSM5205interface msm5205_interface = | |
| 222 | static const struct MSM5205interface msm5205_interface = | |
| 223 | 223 | { |
| 224 | 224 | pcm_w, /* IRQ handler */ |
| 225 | 225 | MSM5205_S64_4B /* 6 KHz */ |
| r1404 | r1405 | |
|---|---|---|
| 218 | 218 | |
| 219 | 219 | /* Sound Interface */ |
| 220 | 220 | |
| 221 | static struct AY8910interface ay8910_interface = | |
| 221 | static const struct AY8910interface ay8910_interface = | |
| 222 | 222 | { |
| 223 | 223 | input_port_3_r,// DSWA |
| 224 | 224 | input_port_4_r,// DSWB |
| r1404 | r1405 | |
|---|---|---|
| 157 | 157 | INPUT_PORTS_END |
| 158 | 158 | |
| 159 | 159 | |
| 160 | static struct AY8910interface ay8910_interface = | |
| 160 | static const struct AY8910interface ay8910_interface = | |
| 161 | 161 | { |
| 162 | 162 | input_port_0_r, |
| 163 | 163 | input_port_1_r |
| r1404 | r1405 | |
|---|---|---|
| 334 | 334 | /* protection values from real hardware, these were verified to be the same on the title |
| 335 | 335 | screen and in the first level... they're all jumps that the MCU appears to put in RAM |
| 336 | 336 | at some point */ |
| 337 | static | |
| 337 | static const int shtngtab[]= | |
| 338 | 338 | { |
| 339 | 339 | 0xC3,0xC1,0x39, |
| 340 | 340 | 0xC3,0x6F,0x0A, |
| r1404 | r1405 | |
|---|---|---|
| 336 | 336 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 337 | 337 | } |
| 338 | 338 | |
| 339 | static struct YM2203interface ym2203_interface = | |
| 339 | static const struct YM2203interface ym2203_interface = | |
| 340 | 340 | { |
| 341 | 341 | 0, 0, 0, 0, |
| 342 | 342 | irqhandler |
| r1404 | r1405 | |
|---|---|---|
| 839 | 839 | cpunum_set_input_line(0, 1, HOLD_LINE); |
| 840 | 840 | } |
| 841 | 841 | |
| 842 | static struct z80_irq_daisy_chain daisy_chain_sound[] = | |
| 842 | static const struct z80_irq_daisy_chain daisy_chain_sound[] = | |
| 843 | 843 | { |
| 844 | 844 | { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 }, /* device 0 = CTC_1 */ |
| 845 | 845 | { 0, 0, 0, 0, -1 } /* end mark */ |
| r1404 | r1405 | |
|---|---|---|
| 3031 | 3031 | |
| 3032 | 3032 | INPUT_PORTS_END |
| 3033 | 3033 | |
| 3034 | static struct upd7759_interface upd7759_interface = | |
| 3034 | static const struct upd7759_interface upd7759_interface = | |
| 3035 | 3035 | { |
| 3036 | 3036 | REGION_SOUND1, /* memory region */ |
| 3037 | 3037 | 0 |
| r1404 | r1405 | |
|---|---|---|
| 929 | 929 | |
| 930 | 930 | /***** MACHINE DRIVER *****/ |
| 931 | 931 | |
| 932 | static struct YMZ280Binterface ymz280b_intf = | |
| 932 | static const struct YMZ280Binterface ymz280b_intf = | |
| 933 | 933 | { |
| 934 | 934 | REGION_SOUND1, |
| 935 | 935 | 0 // irq ? |
| r1404 | r1405 | |
|---|---|---|
| 1741 | 1741 | } |
| 1742 | 1742 | } |
| 1743 | 1743 | |
| 1744 | static struct x1_010_interface x1_010_sound_intf = | |
| 1744 | static const struct x1_010_interface x1_010_sound_intf = | |
| 1745 | 1745 | { |
| 1746 | 1746 | 0x0000, /* address */ |
| 1747 | 1747 | }; |
| r1404 | r1405 | |
|---|---|---|
| 413 | 413 | static READ8_HANDLER(portA_r) { return readinputportbytag("YM_PortA"); } |
| 414 | 414 | static READ8_HANDLER(portB_r) { return readinputportbytag("YM_PortB");} |
| 415 | 415 | |
| 416 | static struct YM2203interface ym2203_interface_0 = | |
| 416 | static const struct YM2203interface ym2203_interface_0 = | |
| 417 | 417 | { |
| 418 | 418 | portA_r, |
| 419 | 419 | portB_r, |
| r1404 | r1405 | |
| 421 | 421 | NULL |
| 422 | 422 | }; |
| 423 | 423 | |
| 424 | static struct YM2203interface ym2203_interface_1 = | |
| 424 | static const struct YM2203interface ym2203_interface_1 = | |
| 425 | 425 | { |
| 426 | 426 | NULL, |
| 427 | 427 | NULL, |
| r1404 | r1405 | |
| 655 | 655 | |
| 656 | 656 | INPUT_PORTS_END |
| 657 | 657 | |
| 658 | static struct ES8712interface es8712_interface = | |
| 658 | static const struct ES8712interface es8712_interface = | |
| 659 | 659 | { |
| 660 | 660 | REGION_SOUND1 |
| 661 | 661 | }; |
| r1404 | r1405 | |
|---|---|---|
| 260 | 260 | K007232_set_volume(0,1,0,(v & 0x0f) * 0x11); |
| 261 | 261 | } |
| 262 | 262 | |
| 263 | static struct K007232_interface k007232_interface = | |
| 263 | static const struct K007232_interface k007232_interface = | |
| 264 | 264 | { |
| 265 | 265 | REGION_SOUND1, /* memory region */ |
| 266 | 266 | volume_callback0 /* external port callback */ |
| r1404 | r1405 | |
|---|---|---|
| 3576 | 3576 | Hana no Mai |
| 3577 | 3577 | ***************************************************************************/ |
| 3578 | 3578 | |
| 3579 | static struct YM2203interface hanamai_ym2203_interface = | |
| 3579 | static const struct YM2203interface hanamai_ym2203_interface = | |
| 3580 | 3580 | { |
| 3581 | 3581 | input_port_1_r, /* Port A Read: DSW */ |
| 3582 | 3582 | input_port_0_r, /* Port B Read: DSW */ |
| r1404 | r1405 | |
| 3585 | 3585 | sprtmtch_sound_callback /* IRQ handler */ |
| 3586 | 3586 | }; |
| 3587 | 3587 | |
| 3588 | static struct MSM5205interface hanamai_msm5205_interface = | |
| 3588 | static const struct MSM5205interface hanamai_msm5205_interface = | |
| 3589 | 3589 | { |
| 3590 | 3590 | adpcm_int, /* IRQ handler */ |
| 3591 | 3591 | MSM5205_S48_4B /* 8 KHz, 4 Bits */ |
| r1404 | r1405 | |
| 3642 | 3642 | Hana Oriduru |
| 3643 | 3643 | ***************************************************************************/ |
| 3644 | 3644 | |
| 3645 | static struct AY8910interface hnoridur_ay8910_interface = | |
| 3645 | static const struct AY8910interface hnoridur_ay8910_interface = | |
| 3646 | 3646 | { |
| 3647 | 3647 | input_port_0_r /* Port A Read: DSW */ |
| 3648 | 3648 | }; |
| r1404 | r1405 | |
| 3691 | 3691 | Sports Match |
| 3692 | 3692 | ***************************************************************************/ |
| 3693 | 3693 | |
| 3694 | static struct YM2203interface sprtmtch_ym2203_interface = | |
| 3694 | static const struct YM2203interface sprtmtch_ym2203_interface = | |
| 3695 | 3695 | { |
| 3696 | 3696 | input_port_3_r, /* Port A Read: DSW */ |
| 3697 | 3697 | input_port_4_r, /* Port B Read: DSW */ |
| r1404 | r1405 | |
| 3861 | 3861 | |
| 3862 | 3862 | // dual monitor, 2 CPU's, 2 blitters |
| 3863 | 3863 | |
| 3864 | static struct YM2203interface jantouki_ym2203_interface = | |
| 3864 | static const struct YM2203interface jantouki_ym2203_interface = | |
| 3865 | 3865 | { |
| 3866 | 3866 | 0, /* Port A Read: DSW */ |
| 3867 | 3867 | 0, /* Port B Read: DSW */ |
| r1404 | r1405 | |
| 3870 | 3870 | jantouki_sound_callback /* IRQ handler */ |
| 3871 | 3871 | }; |
| 3872 | 3872 | |
| 3873 | static struct MSM5205interface jantouki_msm5205_interface = | |
| 3873 | static const struct MSM5205interface jantouki_msm5205_interface = | |
| 3874 | 3874 | { |
| 3875 | 3875 | adpcm_int_cpu1, /* IRQ handler */ |
| 3876 | 3876 | MSM5205_S48_4B /* 8 KHz, 4 Bits */ |
| r1404 | r1405 | |
| 4033 | 4033 | Hanafuda Hana Tengoku |
| 4034 | 4034 | ***************************************************************************/ |
| 4035 | 4035 | |
| 4036 | static struct AY8910interface htengoku_ay8910_interface = | |
| 4036 | static const struct AY8910interface htengoku_ay8910_interface = | |
| 4037 | 4037 | { |
| 4038 | 4038 | // A B |
| 4039 | 4039 | htengoku_dsw_r, 0, // R |
| r1404 | r1405 | |
| 4091 | 4091 | } |
| 4092 | 4092 | } |
| 4093 | 4093 | |
| 4094 | static struct AY8910interface tenkai_ay8910_interface = | |
| 4094 | static const struct AY8910interface tenkai_ay8910_interface = | |
| 4095 | 4095 | { |
| 4096 | 4096 | // A // B |
| 4097 | 4097 | tenkai_dsw_r, 0, // Read |
| r1404 | r1405 | |
|---|---|---|
| 272 | 272 | cpunum_set_input_line(0,0,linestate); |
| 273 | 273 | } |
| 274 | 274 | |
| 275 | static struct YM2203interface ym2203_interface = | |
| 275 | static const struct YM2203interface ym2203_interface = | |
| 276 | 276 | { |
| 277 | 277 | 0,0,0,0,shootout_snd_irq |
| 278 | 278 | }; |
| 279 | 279 | |
| 280 | static struct YM2203interface ym2203_interface2 = | |
| 280 | static const struct YM2203interface ym2203_interface2 = | |
| 281 | 281 | { |
| 282 | 282 | 0, |
| 283 | 283 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 103 | 103 | static const UINT8 kn01[ 8 ] = { 0xf8, 0xe1, 0xe2, 0xfe, 0x3c, 0x30, 0x70, 0x80 }; /* brute forced */ |
| 104 | 104 | static const UINT8 kn02[ 8 ] = { 0x01, 0x18, 0xe2, 0xfe, 0x3c, 0x30, 0x70, 0x80 }; /* brute forced */ |
| 105 | 105 | |
| 106 | static struct | |
| 106 | static const struct | |
| 107 | 107 | { |
| 108 | 108 | const char *s_name; |
| 109 | 109 | const UINT8 *p_n_mainsec; |
| r1404 | r1405 | |
| 407 | 407 | at28c16_init( 0, memory_region( REGION_USER4 ), NULL ); |
| 408 | 408 | } |
| 409 | 409 | |
| 410 | static struct PSXSPUinterface psxspu_interface = | |
| 410 | static const struct PSXSPUinterface psxspu_interface = | |
| 411 | 411 | { |
| 412 | 412 | &g_p_n_psxram, |
| 413 | 413 | psx_irq_set, |
| r1404 | r1405 | |
| 614 | 614 | AM_RANGE(0x00, 0x00) AM_READ(soundlatch_r) |
| 615 | 615 | ADDRESS_MAP_END |
| 616 | 616 | |
| 617 | static struct QSound_interface qsound_interface = | |
| 617 | static const struct QSound_interface qsound_interface = | |
| 618 | 618 | { |
| 619 | 619 | REGION_SOUND1 |
| 620 | 620 | }; |
| r1404 | r1405 | |
| 1305 | 1305 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 1306 | 1306 | } |
| 1307 | 1307 | |
| 1308 | static struct YM2610interface ym2610_interface = | |
| 1308 | static const struct YM2610interface ym2610_interface = | |
| 1309 | 1309 | { |
| 1310 | 1310 | irq_handler, |
| 1311 | 1311 | REGION_SOUND1, /* Delta-T */ |
| r1404 | r1405 | |
| 1765 | 1765 | } |
| 1766 | 1766 | } |
| 1767 | 1767 | |
| 1768 | static struct ide_interface atpsx_intf = | |
| 1768 | static const struct ide_interface atpsx_intf = | |
| 1769 | 1769 | { |
| 1770 | 1770 | atpsx_interrupt |
| 1771 | 1771 | }; |
| r1404 | r1405 | |
| 2060 | 2060 | AM_RANGE(0x100020, 0xffffff) AM_WRITENOP |
| 2061 | 2061 | ADDRESS_MAP_END |
| 2062 | 2062 | |
| 2063 | static struct YMF271interface ymf271_interface = | |
| 2063 | static const struct YMF271interface ymf271_interface = | |
| 2064 | 2064 | { |
| 2065 | 2065 | REGION_SOUND1 |
| 2066 | 2066 | }; |
| r1404 | r1405 | |
| 2284 | 2284 | } |
| 2285 | 2285 | } |
| 2286 | 2286 | |
| 2287 | static struct ide_interface jdredd_ide_intf = | |
| 2287 | static const struct ide_interface jdredd_ide_intf = | |
| 2288 | 2288 | { |
| 2289 | 2289 | jdredd_ide_interrupt |
| 2290 | 2290 | }; |
| r1404 | r1405 | |
| 2929 | 2929 | AM_RANGE( 0x91, 0x91 ) AM_READ( cbaj_z80_ready_r ) |
| 2930 | 2930 | ADDRESS_MAP_END |
| 2931 | 2931 | |
| 2932 | static struct YMZ280Binterface ymz280b_intf = | |
| 2932 | static const struct YMZ280Binterface ymz280b_intf = | |
| 2933 | 2933 | { |
| 2934 | 2934 | REGION_SOUND1, |
| 2935 | 2935 | 0 |
| r1404 | r1405 | |
|---|---|---|
| 240 | 240 | cpunum_set_input_line(1, 0, irq ? ASSERT_LINE : CLEAR_LINE); |
| 241 | 241 | } |
| 242 | 242 | |
| 243 | static struct YM2203interface ym2203_interface = | |
| 243 | static const struct YM2203interface ym2203_interface = | |
| 244 | 244 | { |
| 245 | 245 | input_port_0_r, /* DSW A */ |
| 246 | 246 | input_port_1_r, /* DSW B */ |
| r1404 | r1405 | |
|---|---|---|
| 223 | 223 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 224 | 224 | INPUT_PORTS_END |
| 225 | 225 | |
| 226 | static struct AY8910interface frogger_ay8910_interface = | |
| 226 | static const struct AY8910interface frogger_ay8910_interface = | |
| 227 | 227 | { |
| 228 | 228 | soundlatch_r, |
| 229 | 229 | frogger_portB_r |
| r1404 | r1405 | |
|---|---|---|
| 1650 | 1650 | * |
| 1651 | 1651 | *************************************/ |
| 1652 | 1652 | |
| 1653 | static struct cem3394_interface cem_interface = | |
| 1653 | static const struct cem3394_interface cem_interface = | |
| 1654 | 1654 | { |
| 1655 | 1655 | 431.894, |
| 1656 | 1656 | 1300.0, |
| r1404 | r1405 | |
|---|---|---|
| 1148 | 1148 | (megadrive_region_pal<<0); // PAL MODE FLAG checked by striker for region prot.. |
| 1149 | 1149 | } |
| 1150 | 1150 | |
| 1151 | static UINT8 vc_ntsc_224[] = | |
| 1151 | static const UINT8 vc_ntsc_224[] = | |
| 1152 | 1152 | { |
| 1153 | 1153 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 1154 | 1154 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, |
| r1404 | r1405 | |
| 1169 | 1169 | 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, |
| 1170 | 1170 | }; |
| 1171 | 1171 | |
| 1172 | static UINT8 vc_ntsc_240[] = | |
| 1172 | static const UINT8 vc_ntsc_240[] = | |
| 1173 | 1173 | { |
| 1174 | 1174 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 1175 | 1175 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, |
| r1404 | r1405 | |
| 1190 | 1190 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05 |
| 1191 | 1191 | }; |
| 1192 | 1192 | |
| 1193 | static UINT8 vc_pal_224[] = | |
| 1193 | static const UINT8 vc_pal_224[] = | |
| 1194 | 1194 | { |
| 1195 | 1195 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 1196 | 1196 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, |
| r1404 | r1405 | |
| 1214 | 1214 | 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, |
| 1215 | 1215 | }; |
| 1216 | 1216 | |
| 1217 | static UINT8 vc_pal_240[] = | |
| 1217 | static const UINT8 vc_pal_240[] = | |
| 1218 | 1218 | { |
| 1219 | 1219 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 1220 | 1220 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, |
| r1404 | r1405 | |
|---|---|---|
| 363 | 363 | ADDRESS_MAP_END |
| 364 | 364 | |
| 365 | 365 | |
| 366 | static struct YMZ280Binterface ymz280b_intf = | |
| 366 | static const struct YMZ280Binterface ymz280b_intf = | |
| 367 | 367 | { |
| 368 | 368 | REGION_SOUND1, |
| 369 | 369 | 0 // irq ? |
| r1404 | r1405 | |
|---|---|---|
| 640 | 640 | } |
| 641 | 641 | |
| 642 | 642 | |
| 643 | static struct via6522_interface via_interface = | |
| 643 | static const struct via6522_interface via_interface = | |
| 644 | 644 | { |
| 645 | 645 | /*inputs : A/B */ 0, 0, |
| 646 | 646 | /*inputs : CA/B1,CA/B2 */ 0, 0, 0, 0, |
| r1404 | r1405 | |
| 650 | 650 | }; |
| 651 | 651 | |
| 652 | 652 | |
| 653 | static struct via6522_interface drivedge_via_interface = | |
| 653 | static const struct via6522_interface drivedge_via_interface = | |
| 654 | 654 | { |
| 655 | 655 | /*inputs : A/B */ 0, 0, |
| 656 | 656 | /*inputs : CA/B1,CA/B2 */ 0, 0, 0, 0, |
| r1404 | r1405 | |
| 1484 | 1484 | * |
| 1485 | 1485 | *************************************/ |
| 1486 | 1486 | |
| 1487 | static struct ES5506interface es5506_interface = | |
| 1487 | static const struct ES5506interface es5506_interface = | |
| 1488 | 1488 | { |
| 1489 | 1489 | REGION_SOUND1, |
| 1490 | 1490 | REGION_SOUND2, |
| r1404 | r1405 | |
|---|---|---|
| 369 | 369 | |
| 370 | 370 | |
| 371 | 371 | |
| 372 | static struct YM2203interface ym2203_interface = | |
| 372 | static const struct YM2203interface ym2203_interface = | |
| 373 | 373 | { |
| 374 | 374 | input_port_3_r, |
| 375 | 375 | input_port_4_r |
| r1404 | r1405 | |
|---|---|---|
| 106 | 106 | AM_RANGE(0xc000, 0xffff) AM_WRITE(MWA8_BANK1) // bitmap plane 1-4 |
| 107 | 107 | ADDRESS_MAP_END |
| 108 | 108 | |
| 109 | static struct AY8910interface ay8910_interface_1 = | |
| 109 | static const struct AY8910interface ay8910_interface_1 = | |
| 110 | 110 | { |
| 111 | 111 | input_port_5_r, // DSW A |
| 112 | 112 | input_port_4_r // DSW B |
| 113 | 113 | }; |
| 114 | 114 | |
| 115 | static struct AY8910interface ay8910_interface_2 = | |
| 115 | static const struct AY8910interface ay8910_interface_2 = | |
| 116 | 116 | { |
| 117 | 117 | 0, |
| 118 | 118 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 390 | 390 | // pic8259_0_issue_irq(0); |
| 391 | 391 | } |
| 392 | 392 | |
| 393 | static struct pit8253_config pc_pit8253_config = | |
| 393 | static const struct pit8253_config pc_pit8253_config = | |
| 394 | 394 | { |
| 395 | 395 | TYPE8253, |
| 396 | 396 | { |
| r1404 | r1405 | |
|---|---|---|
| 330 | 330 | cpunum_set_input_line(1, INPUT_LINE_NMI, PULSE_LINE); |
| 331 | 331 | } |
| 332 | 332 | |
| 333 | static struct MSM5205interface msm5205_interface = | |
| 333 | static const struct MSM5205interface msm5205_interface = | |
| 334 | 334 | { |
| 335 | 335 | ashnojoe_adpcm_int, /* interrupt function */ |
| 336 | 336 | MSM5205_S48_4B /* 4KHz 4-bit */ |
| 337 | 337 | }; |
| 338 | 338 | |
| 339 | static struct YM2203interface ym2203_interface = | |
| 339 | static const struct YM2203interface ym2203_interface = | |
| 340 | 340 | { |
| 341 | 341 | 0, |
| 342 | 342 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 178 | 178 | if (data == 0) signature_pos = 0; |
| 179 | 179 | else |
| 180 | 180 | { |
| 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 }; | |
| 182 | 182 | |
| 183 | 183 | signature_answer = signature[signature_pos++]; |
| 184 | 184 |
| r1404 | r1405 | |
|---|---|---|
| 1798 | 1798 | OKIM6295_set_bank_base(1, ((data >> 1)& 1) * 0x40000); |
| 1799 | 1799 | } |
| 1800 | 1800 | |
| 1801 | static struct YM2151interface ym2151_interface = | |
| 1801 | static const struct YM2151interface ym2151_interface = | |
| 1802 | 1802 | { |
| 1803 | 1803 | sound_irq, |
| 1804 | 1804 | sound_bankswitch_w |
| 1805 | 1805 | }; |
| 1806 | 1806 | |
| 1807 | static struct YM2151interface ym2151_interface_nslasher = | |
| 1807 | static const struct YM2151interface ym2151_interface_nslasher = | |
| 1808 | 1808 | { |
| 1809 | 1809 | sound_irq_nslasher, |
| 1810 | 1810 | sound_bankswitch_w |
| r1404 | r1405 | |
|---|---|---|
| 107 | 107 | * |
| 108 | 108 | *************************************/ |
| 109 | 109 | |
| 110 | static struct CustomSound_interface custom_interface = | |
| 110 | static const struct CustomSound_interface custom_interface = | |
| 111 | 111 | { |
| 112 | 112 | exidy440_sh_start, |
| 113 | 113 | exidy440_sh_stop |
| r1404 | r1405 | |
|---|---|---|
| 25 | 25 | |
| 26 | 26 | #define CPU_CLOCK 60000000 |
| 27 | 27 | |
| 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 */ | |
| 28 | 31 | |
| 32 | static UINT32 gun_control; | |
| 33 | static UINT8 gun_irq_state; | |
| 34 | static emu_timer * gun_timer[2]; | |
| 35 | static INT32 gun_x[2], gun_y[2]; | |
| 36 | ||
| 29 | 37 | static UINT32 *ram_base; |
| 30 | 38 | static UINT8 cmos_protected; |
| 31 | 39 | |
| r1404 | r1405 | |
| 34 | 42 | static UINT32 *tms32031_control; |
| 35 | 43 | |
| 36 | 44 | |
| 45 | static TIMER_CALLBACK( invasn_gun_callback ); | |
| 37 | 46 | |
| 47 | ||
| 48 | ||
| 38 | 49 | /************************************* |
| 39 | 50 | * |
| 40 | 51 | * Machine init |
| r1404 | r1405 | |
| 49 | 60 | |
| 50 | 61 | timer[0] = timer_alloc(NULL, NULL); |
| 51 | 62 | 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); | |
| 52 | 66 | } |
| 53 | 67 | |
| 54 | 68 | |
| r1404 | r1405 | |
| 124 | 138 | } |
| 125 | 139 | |
| 126 | 140 | |
| 141 | /************************************* | |
| 142 | * | |
| 143 | * Lightgun handling | |
| 144 | * | |
| 145 | *************************************/ | |
| 127 | 146 | |
| 147 | static 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 | ||
| 156 | static 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 | ||
| 170 | static 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 | ||
| 200 | static 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 | ||
| 128 | 218 | /************************************* |
| 129 | 219 | * |
| 130 | 220 | * Memory maps |
| r1404 | r1405 | |
| 155 | 245 | AM_RANGE(0x880000, 0x8803ff) AM_READWRITE(zeus_r, zeus_w) AM_BASE(&zeusbase) |
| 156 | 246 | AM_RANGE(0x8d0000, 0x8d0003) AM_READWRITE(unknown_8d0000_r, unknown_8d0000_w) AM_BASE(&unknown_8d0000) |
| 157 | 247 | AM_RANGE(0x990000, 0x99000f) AM_READWRITE(midway_ioasic_r, midway_ioasic_w) |
| 158 | //9d0000 -- page select? | |
| 159 | 248 | AM_RANGE(0x9e0000, 0x9e0000) AM_WRITENOP // watchdog? |
| 160 | 249 | AM_RANGE(0x9f0000, 0x9f7fff) AM_READWRITE(cmos_r, cmos_w) AM_BASE(&generic_nvram32) AM_SIZE(&generic_nvram_size) |
| 161 | 250 | AM_RANGE(0x9f8000, 0x9f8000) AM_WRITE(cmos_protect_w) |
| r1404 | r1405 | |
| 171 | 260 | AM_RANGE(0x880000, 0x8801ff) AM_READWRITE(zeus2_r, zeus2_w) AM_BASE(&zeusbase) |
| 172 | 261 | AM_RANGE(0x8d0000, 0x8d0003) AM_READWRITE(unknown_8d0000_r, unknown_8d0000_w) AM_BASE(&unknown_8d0000) |
| 173 | 262 | AM_RANGE(0x990000, 0x99000f) AM_READWRITE(midway_ioasic_r, midway_ioasic_w) |
| 174 | //9d0000 -- page select? | |
| 175 | 263 | AM_RANGE(0x9e0000, 0x9e0000) AM_WRITENOP // watchdog? |
| 176 | 264 | AM_RANGE(0x9f0000, 0x9f7fff) AM_READWRITE(cmos_r, cmos_w) AM_BASE(&generic_nvram32) AM_SIZE(&generic_nvram_size) |
| 177 | 265 | AM_RANGE(0x9f8000, 0x9f8000) AM_WRITE(cmos_protect_w) |
| r1404 | r1405 | |
| 364 | 452 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BILL1 ) /* Bill */ |
| 365 | 453 | |
| 366 | 454 | 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 ) | |
| 383 | 461 | |
| 384 | 462 | 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) | |
| 393 | 476 | INPUT_PORTS_END |
| 394 | 477 | |
| 395 | 478 | |
| r1404 | r1405 | |
| 782 | 865 | } |
| 783 | 866 | |
| 784 | 867 | |
| 785 | static READ32_HANDLER( gun_r ) | |
| 786 | { | |
| 787 | return ~0; | |
| 788 | } | |
| 789 | 868 | static DRIVER_INIT( invasn ) |
| 790 | 869 | { |
| 791 | 870 | 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); | |
| 794 | 873 | } |
| 795 | 874 | |
| 796 | 875 | |
| r1404 | r1405 | |
| 816 | 895 | * |
| 817 | 896 | *************************************/ |
| 818 | 897 | |
| 819 | GAME( 1997, mk4, 0, midzeus, mk4, mk4, ROT0, "Midway", "Mortal Kombat 4 (3.0)", GAME_NOT_WORKING | GAME_NO_SOUND ) | |
| 820 | GAME( 1997, mk4a, mk4, midzeus, mk4, mk4, ROT0, "Midway", "Mortal Kombat 4 (2.1)", GAME_NOT_WORKING | GAME_NO_SOUND ) | |
| 821 | GAME( 1999, invasn, 0, midzeus, invasn, invasn, ROT0, "Midway", "Invasion (Midway)", GAME_NOT_WORKING | GAME_NO_SOUND ) | |
| 822 | GAME( 1999, crusnexo, 0, midzeus2, crusnexo, crusnexo, ROT0, "Midway", "Cruis'n Exotica", GAME_NOT_WORKING | GAME_NO_SOUND ) | |
| 823 | GAME( 2001, thegrid, 0, midzeus2, thegrid, thegrid, ROT0, "Midway", "The Grid (version 1.1)", GAME_NOT_WORKING | GAME_NO_SOUND ) | |
| 898 | GAME( 1997, mk4, 0, midzeus, mk4, mk4, ROT0, "Midway", "Mortal Kombat 4 (3.0)", GAME_IMPERFECT_GRAPHICS ) | |
| 899 | GAME( 1997, mk4a, mk4, midzeus, mk4, mk4, ROT0, "Midway", "Mortal Kombat 4 (2.1)", GAME_IMPERFECT_GRAPHICS ) | |
| 900 | GAME( 1999, invasn, 0, midzeus, invasn, invasn, ROT0, "Midway", "Invasion (Midway)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS ) | |
| 901 | GAME( 1999, crusnexo, 0, midzeus2, crusnexo, crusnexo, ROT0, "Midway", "Cruis'n Exotica", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_NO_SOUND ) | |
| 902 | GAME( 2001, thegrid, 0, midzeus2, thegrid, thegrid, ROT0, "Midway", "The Grid (version 1.1)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_NO_SOUND ) |
| r1404 | r1405 | |
|---|---|---|
| 451 | 451 | * |
| 452 | 452 | *************************************/ |
| 453 | 453 | |
| 454 | static struct AY8910interface ay8910_interface_1 = | |
| 454 | static const struct AY8910interface ay8910_interface_1 = | |
| 455 | 455 | { |
| 456 | 456 | 0, |
| 457 | 457 | 0, |
| r1404 | r1405 | |
| 459 | 459 | grchamp_portB_0_w |
| 460 | 460 | }; |
| 461 | 461 | |
| 462 | static struct AY8910interface ay8910_interface_3 = | |
| 462 | static const struct AY8910interface ay8910_interface_3 = | |
| 463 | 463 | { |
| 464 | 464 | 0, |
| 465 | 465 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 171 | 171 | cpunum_set_input_line(1, 0, irq ? ASSERT_LINE : CLEAR_LINE); |
| 172 | 172 | } |
| 173 | 173 | |
| 174 | static struct YM2203interface ym2203_interface = | |
| 174 | static const struct YM2203interface ym2203_interface = | |
| 175 | 175 | { |
| 176 | 176 | 0, |
| 177 | 177 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 313 | 313 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 314 | 314 | } |
| 315 | 315 | |
| 316 | static struct YM2203interface ym2203_interface = | |
| 316 | static const struct YM2203interface ym2203_interface = | |
| 317 | 317 | { |
| 318 | 318 | 0, |
| 319 | 319 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 175 | 175 | static WRITE8_HANDLER( superdq_io_w ) |
| 176 | 176 | { |
| 177 | 177 | int i; |
| 178 | static UINT8 | |
| 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}; | |
| 179 | 179 | |
| 180 | 180 | if ( data & 0x40 ) /* bit 6 = irqack */ |
| 181 | 181 | cpunum_set_input_line(0, 0, CLEAR_LINE); |
| r1404 | r1405 | |
|---|---|---|
| 189 | 189 | if (ACCESSING_MSB) |
| 190 | 190 | { |
| 191 | 191 | static int jumpcode; |
| 192 | static int jumppoints[] = | |
| 192 | static const int jumppoints[] = | |
| 193 | 193 | { |
| 194 | 194 | 0x0c0c,0x0cac,0x0d42,0x0da2,0x0eea,0x112e,0x1300,0x13fa, |
| 195 | 195 | 0x159a,0x1630,0x109a,0x1700,0x1750,0x1806,0x18d6,0x1a44, |
| r1404 | r1405 | |
| 286 | 286 | */ |
| 287 | 287 | |
| 288 | 288 | /* these are used during startup */ |
| 289 | static int jumppoints_00[0x100] = | |
| 289 | static const int jumppoints_00[0x100] = | |
| 290 | 290 | { |
| 291 | 291 | 0x6669, -1, -1, -1, -1, -1, -1, -1, |
| 292 | 292 | -1, -1, -1, -1, -1, -1,0x4a46, -1, |
| r1404 | r1405 | |
| 299 | 299 | }; |
| 300 | 300 | |
| 301 | 301 | /* these are used the rest of the time */ |
| 302 | static int jumppoints_other[0x100] = | |
| 302 | static const int jumppoints_other[0x100] = | |
| 303 | 303 | { |
| 304 | 304 | 0x5457,0x494e,0x5f4b,0x4149,0x5345,0x525f,0x4d49,0x5941, |
| 305 | 305 | 0x5241,0x5349,0x4d4f,0x4a49, -1, -1, -1, -1, |
| r1404 | r1405 | |
| 311 | 311 | -1, -1, -1, -1, -1, -1, -1, -1 |
| 312 | 312 | }; |
| 313 | 313 | |
| 314 | static int *raiga_jumppoints = jumppoints_00; | |
| 314 | static const int *raiga_jumppoints = jumppoints_00; | |
| 315 | 315 | |
| 316 | 316 | static MACHINE_RESET ( raiga ) |
| 317 | 317 | { |
| r1404 | r1405 | |
| 954 | 954 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 955 | 955 | } |
| 956 | 956 | |
| 957 | static struct YM2203interface ym2203_interface = | |
| 957 | static const struct YM2203interface ym2203_interface = | |
| 958 | 958 | { |
| 959 | 959 | 0,0,0,0,irqhandler |
| 960 | 960 | }; |
| r1404 | r1405 | |
|---|---|---|
| 416 | 416 | |
| 417 | 417 | static UINT32 razmataz_dial_r(void *param) |
| 418 | 418 | { |
| 419 | static const char *dialname[2] = { "DIAL0", "DIAL1" }; | |
| 419 | static const char *const dialname[2] = { "DIAL0", "DIAL1" }; | |
| 420 | 420 | int num = (FPTR)param; |
| 421 | 421 | int delta, res; |
| 422 | 422 |
| r1404 | r1405 | |
|---|---|---|
| 408 | 408 | INPUT_PORTS_END |
| 409 | 409 | |
| 410 | 410 | /* ?? */ |
| 411 | static struct mips3_config config = | |
| 411 | static const struct mips3_config config = | |
| 412 | 412 | { |
| 413 | 413 | 16384, /* code cache size */ |
| 414 | 414 | 8192, /* data cache size */ |
| r1404 | r1405 | |
|---|---|---|
| 844 | 844 | GFXDECODE_END |
| 845 | 845 | |
| 846 | 846 | |
| 847 | static struct VLM5030interface trackfld_vlm5030_interface = | |
| 847 | static const struct VLM5030interface trackfld_vlm5030_interface = | |
| 848 | 848 | { |
| 849 | 849 | REGION_SOUND1, /* memory region */ |
| 850 | 850 | 0 /* memory size */ |
| 851 | 851 | }; |
| 852 | 852 | |
| 853 | static struct MSM5205interface msm5205_interface = | |
| 853 | static const struct MSM5205interface msm5205_interface = | |
| 854 | 854 | { |
| 855 | 855 | NULL, /* VCK function */ |
| 856 | 856 | MSM5205_S48_4B /* 8 kHz */ |
| r1404 | r1405 | |
|---|---|---|
| 671 | 671 | cpunum_set_input_line(1,0,linestate); /* IRQ */ |
| 672 | 672 | } |
| 673 | 673 | |
| 674 | static struct YM3526interface ym3526_interface = | |
| 674 | static const struct YM3526interface ym3526_interface = | |
| 675 | 675 | { |
| 676 | 676 | sound_irq |
| 677 | 677 | }; |
| r1404 | r1405 | |
|---|---|---|
| 844 | 844 | GFXDECODE_ENTRY( REGION_GFX4, 0, bg2_tilelayout, 0, 8 ) /* colors 0-127 */ |
| 845 | 845 | GFXDECODE_END |
| 846 | 846 | |
| 847 | static struct MSM5205interface msm5205_interface = | |
| 847 | static const struct MSM5205interface msm5205_interface = | |
| 848 | 848 | { |
| 849 | 849 | 0, /* interrupt function */ |
| 850 | 850 | MSM5205_SEX_4B /* slave mode */ |
| r1404 | r1405 | |
|---|---|---|
| 333 | 333 | * |
| 334 | 334 | *************************************/ |
| 335 | 335 | |
| 336 | static tms34010_config tms_config = | |
| 336 | static const tms34010_config tms_config = | |
| 337 | 337 | { |
| 338 | 338 | FALSE, /* halt on reset */ |
| 339 | 339 | 0, /* the screen operated on */ |
| r1404 | r1405 | |
|---|---|---|
| 422 | 422 | } |
| 423 | 423 | |
| 424 | 424 | |
| 425 | static struct POKEYinterface pokey_interface = { | |
| 425 | static const struct POKEYinterface pokey_interface = { | |
| 426 | 426 | { 0 }, |
| 427 | 427 | 0, |
| 428 | 428 | 0,0, |
| r1404 | r1405 | |
|---|---|---|
| 764 | 764 | |
| 765 | 765 | |
| 766 | 766 | |
| 767 | static struct NESinterface nes_interface = | |
| 767 | static const struct NESinterface nes_interface = | |
| 768 | 768 | { |
| 769 | 769 | REGION_CPU2 |
| 770 | 770 | }; |
| 771 | 771 | |
| 772 | 772 | |
| 773 | static struct VLM5030interface vlm5030_interface = | |
| 773 | static const struct VLM5030interface vlm5030_interface = | |
| 774 | 774 | { |
| 775 | 775 | REGION_SOUND1, /* memory region of speech rom */ |
| 776 | 776 | 0 /* memory size of speech rom */ |
| r1404 | r1405 | |
|---|---|---|
| 1272 | 1272 | update_nile_irqs(); |
| 1273 | 1273 | } |
| 1274 | 1274 | |
| 1275 | static struct ide_interface ide_intf = | |
| 1275 | static const struct ide_interface ide_intf = | |
| 1276 | 1276 | { |
| 1277 | 1277 | ide_interrupt |
| 1278 | 1278 | }; |
| r1404 | r1405 | |
| 2203 | 2203 | * |
| 2204 | 2204 | *************************************/ |
| 2205 | 2205 | |
| 2206 | static struct mips3_config config = | |
| 2206 | static const struct mips3_config config = | |
| 2207 | 2207 | { |
| 2208 | 2208 | 16384, /* code cache size */ |
| 2209 | 2209 | 16384, /* data cache size */ |
| r1404 | r1405 | |
| 2440 | 2440 | |
| 2441 | 2441 | static void init_common(int ioasic, int serialnum) |
| 2442 | 2442 | { |
| 2443 | static struct smc91c9x_interface ethernet_intf = | |
| 2443 | static const struct smc91c9x_interface ethernet_intf = | |
| 2444 | 2444 | { |
| 2445 | 2445 | ethernet_interrupt |
| 2446 | 2446 | }; |
| r1404 | r1405 | |
|---|---|---|
| 549 | 549 | cpunum_set_input_line(1,0,linestate); |
| 550 | 550 | } |
| 551 | 551 | |
| 552 | static struct YM3526interface ym3812_interface = | |
| 552 | static const struct YM3526interface ym3812_interface = | |
| 553 | 553 | { |
| 554 | 554 | irqhandler |
| 555 | 555 | }; |
| 556 | 556 | |
| 557 | static struct MSM5205interface msm5205_interface = | |
| 557 | static const struct MSM5205interface msm5205_interface = | |
| 558 | 558 | { |
| 559 | 559 | tecmo_adpcm_int, /* interrupt function */ |
| 560 | 560 | MSM5205_S48_4B /* 8KHz */ |
| r1404 | r1405 | |
|---|---|---|
| 354 | 354 | |
| 355 | 355 | static WRITE16_HANDLER( analog_w ) |
| 356 | 356 | { |
| 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" }; | |
| 358 | 358 | int selected = ((offset & 3) == 3) ? (3 + (misc_io_data[0x08/2] & 3)) : (offset & 3); |
| 359 | 359 | int value = readinputportbytag_safe(ports[selected], 0xff); |
| 360 | 360 | analog_data[offset & 3] = value; |
| r1404 | r1405 | |
| 933 | 933 | * |
| 934 | 934 | *************************************/ |
| 935 | 935 | |
| 936 | static struct YM2151interface ym2151_interface = | |
| 936 | static const struct YM2151interface ym2151_interface = | |
| 937 | 937 | { |
| 938 | 938 | sound_cpu_irq |
| 939 | 939 | }; |
| 940 | 940 | |
| 941 | 941 | |
| 942 | static struct SEGAPCMinterface segapcm_interface = | |
| 942 | static const struct SEGAPCMinterface segapcm_interface = | |
| 943 | 943 | { |
| 944 | 944 | BANK_12M | BANK_MASKF8, |
| 945 | 945 | REGION_SOUND1 |
| r1404 | r1405 | |
|---|---|---|
| 392 | 392 | |
| 393 | 393 | |
| 394 | 394 | |
| 395 | static struct AY8910interface ay8910_interface = | |
| 395 | static const struct AY8910interface ay8910_interface = | |
| 396 | 396 | { |
| 397 | 397 | sound_latch_r, |
| 398 | 398 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 149 | 149 | PORT_START // IN0 |
| 150 | 150 | INPUT_PORTS_END |
| 151 | 151 | |
| 152 | static struct YM2203interface ym2203_interface_1 = | |
| 152 | static const struct YM2203interface ym2203_interface_1 = | |
| 153 | 153 | { |
| 154 | 154 | soundlatch_r, OKIM6295_status_0_r, // read A,B |
| 155 | 155 | 0, OKIM6295_data_0_w, // write A,B |
| r1404 | r1405 | |
|---|---|---|
| 391 | 391 | |
| 392 | 392 | case 0x30/2: |
| 393 | 393 | { |
| 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" }; | |
| 395 | 395 | return readinputportbytag_safe(ports[adc_select], 0x0010); |
| 396 | 396 | } |
| 397 | 397 | |
| r1404 | r1405 | |
| 454 | 454 | |
| 455 | 455 | case 0x3020/2: |
| 456 | 456 | { |
| 457 | static const char *ports[] = { "ADC0", "ADC1", "ADC2", "ADC3" }; | |
| 457 | static const char *const ports[] = { "ADC0", "ADC1", "ADC2", "ADC3" }; | |
| 458 | 458 | return readinputportbytag_safe(ports[adc_select], 0x0010); |
| 459 | 459 | } |
| 460 | 460 | } |
| r1404 | r1405 | |
| 772 | 772 | * |
| 773 | 773 | *************************************/ |
| 774 | 774 | |
| 775 | static struct SEGAPCMinterface segapcm_interface = | |
| 775 | static const struct SEGAPCMinterface segapcm_interface = | |
| 776 | 776 | { |
| 777 | 777 | BANK_512, |
| 778 | 778 | REGION_SOUND1 |
| r1404 | r1405 | |
|---|---|---|
| 238 | 238 | GFXDECODE_END |
| 239 | 239 | |
| 240 | 240 | |
| 241 | static struct AY8910interface ay8910_interface = | |
| 241 | static const struct AY8910interface ay8910_interface = | |
| 242 | 242 | { |
| 243 | 243 | 0, input_r, |
| 244 | 244 | unknown_w, 0 |
| r1404 | r1405 | |
|---|---|---|
| 121 | 121 | |
| 122 | 122 | |
| 123 | 123 | |
| 124 | static struct AY8910interface ay8910_interface = | |
| 124 | static const struct AY8910interface ay8910_interface = | |
| 125 | 125 | { |
| 126 | 126 | input_port_0_r, |
| 127 | 127 | input_port_1_r, |
| r1404 | r1405 | |
|---|---|---|
| 728 | 728 | } |
| 729 | 729 | |
| 730 | 730 | |
| 731 | static ppc_config gticlub_ppc_cfg = | |
| 731 | static const ppc_config gticlub_ppc_cfg = | |
| 732 | 732 | { |
| 733 | 733 | PPC_MODEL_403GA |
| 734 | 734 | }; |
| 735 | 735 | |
| 736 | static sharc_config sharc_cfg = | |
| 736 | static const sharc_config sharc_cfg = | |
| 737 | 737 | { |
| 738 | 738 | BOOT_MODE_EPROM |
| 739 | 739 | }; |
| 740 | 740 | |
| 741 | static struct RF5C400interface rf5c400_interface = | |
| 741 | static const struct RF5C400interface rf5c400_interface = | |
| 742 | 742 | { |
| 743 | 743 | REGION_SOUND1 |
| 744 | 744 | }; |
| r1404 | r1405 | |
|---|---|---|
| 311 | 311 | * |
| 312 | 312 | *************************************/ |
| 313 | 313 | |
| 314 | static struct POKEYinterface pokey_interface_1 = | |
| 314 | static const struct POKEYinterface pokey_interface_1 = | |
| 315 | 315 | { |
| 316 | 316 | { 0 }, |
| 317 | 317 | input_port_3_r |
| 318 | 318 | }; |
| 319 | 319 | |
| 320 | static struct POKEYinterface pokey_interface_2 = | |
| 320 | static const struct POKEYinterface pokey_interface_2 = | |
| 321 | 321 | { |
| 322 | 322 | { 0 }, |
| 323 | 323 | input_port_4_r |
| r1404 | r1405 | |
|---|---|---|
| 1468 | 1468 | |
| 1469 | 1469 | |
| 1470 | 1470 | /* only Great Guns */ |
| 1471 | static struct AY8910interface ay8912_interface_1 = | |
| 1471 | static const struct AY8910interface ay8912_interface_1 = | |
| 1472 | 1472 | { |
| 1473 | 1473 | 0, |
| 1474 | 1474 | soundcommand_r |
| 1475 | 1475 | }; |
| 1476 | 1476 | |
| 1477 | static struct AY8910interface ay8912_interface_2 = | |
| 1477 | static const struct AY8910interface ay8912_interface_2 = | |
| 1478 | 1478 | { |
| 1479 | 1479 | 0, |
| 1480 | 1480 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 356 | 356 | return (readinputport(5) >> offset) << 7; |
| 357 | 357 | } |
| 358 | 358 | |
| 359 | static struct POKEYinterface pokey_interface = | |
| 359 | static const struct POKEYinterface pokey_interface = | |
| 360 | 360 | { |
| 361 | 361 | { pot_r,pot_r,pot_r,pot_r,pot_r,pot_r,pot_r,pot_r } |
| 362 | 362 | }; |
| r1404 | r1405 | |
|---|---|---|
| 1289 | 1289 | // bit 7 => port 7 |
| 1290 | 1290 | static READ8_HANDLER( portana_r ) |
| 1291 | 1291 | { |
| 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 }; | |
| 1293 | 1293 | UINT8 port = readinputport(2); |
| 1294 | 1294 | |
| 1295 | 1295 | return (port & bitnum[offset>>1]) ? 0xff : 0x00; |
| r1404 | r1405 | |
| 1334 | 1334 | } |
| 1335 | 1335 | } |
| 1336 | 1336 | |
| 1337 | static struct C140interface C140_interface_typeA = | |
| 1337 | static const struct C140interface C140_interface_typeA = | |
| 1338 | 1338 | { |
| 1339 | 1339 | C140_TYPE_ASIC219, |
| 1340 | 1340 | 0 |
| r1404 | r1405 | |
|---|---|---|
| 230 | 230 | * |
| 231 | 231 | *************************************/ |
| 232 | 232 | |
| 233 | static struct dma8257_interface dk_dma = | |
| 233 | static const struct dma8257_interface dk_dma = | |
| 234 | 234 | { |
| 235 | 235 | 0, |
| 236 | 236 | CLOCK_1H, |
| r1404 | r1405 | |
| 243 | 243 | { 0, 0, 0, 0 } |
| 244 | 244 | }; |
| 245 | 245 | |
| 246 | static struct dma8257_interface hb_dma = | |
| 246 | static const struct dma8257_interface hb_dma = | |
| 247 | 247 | { |
| 248 | 248 | 0, |
| 249 | 249 | CLOCK_1H, |
| r1404 | r1405 | |
|---|---|---|
| 216 | 216 | |
| 217 | 217 | |
| 218 | 218 | |
| 219 | static struct MSM5205interface msm5205_interface = | |
| 219 | static const struct MSM5205interface msm5205_interface = | |
| 220 | 220 | { |
| 221 | 221 | appoooh_adpcm_int,/* interrupt function */ |
| 222 | 222 | MSM5205_S64_4B /* 6KHz */ |
| r1404 | r1405 | |
|---|---|---|
| 228 | 228 | GFXDECODE_END |
| 229 | 229 | |
| 230 | 230 | |
| 231 | static struct AY8910interface ay8910_interface = | |
| 231 | static const struct AY8910interface ay8910_interface = | |
| 232 | 232 | { |
| 233 | 233 | input_port_3_r, |
| 234 | 234 | input_port_4_r |
| r1404 | r1405 | |
|---|---|---|
| 291 | 291 | cpunum_set_input_line(0,M6809_IRQ_LINE,linestate); |
| 292 | 292 | } |
| 293 | 293 | |
| 294 | static struct YM3526interface ym3526_interface = | |
| 294 | static const struct YM3526interface ym3526_interface = | |
| 295 | 295 | { |
| 296 | 296 | metlclsh_irqhandler |
| 297 | 297 | }; |
| r1404 | r1405 | |
|---|---|---|
| 245 | 245 | K007232_set_volume(0,1,0,(v >> 4) * 0x11); |
| 246 | 246 | } |
| 247 | 247 | |
| 248 | static struct K007232_interface k007232_interface = | |
| 248 | static const struct K007232_interface k007232_interface = | |
| 249 | 249 | { |
| 250 | 250 | REGION_SOUND1, /* memory regions */ |
| 251 | 251 | volume_callback /* external port callback */ |
| 252 | 252 | }; |
| 253 | 253 | |
| 254 | static struct YM2151interface ym2151_interface = | |
| 254 | static const struct YM2151interface ym2151_interface = | |
| 255 | 255 | { |
| 256 | 256 | 0, |
| 257 | 257 | aliens_snd_bankswitch_w |
| r1404 | r1405 | |
|---|---|---|
| 75 | 75 | { |
| 76 | 76 | int res; |
| 77 | 77 | static int cheat = 0; |
| 78 | static int bits[] = { 0xee, 0xff, 0xbb, 0xaa }; | |
| 78 | static const int bits[] = { 0xee, 0xff, 0xbb, 0xaa }; | |
| 79 | 79 | |
| 80 | 80 | res = readinputportbytag("IN1"); |
| 81 | 81 | |
| r1404 | r1405 | |
| 93 | 93 | { |
| 94 | 94 | int res; |
| 95 | 95 | static int cheat = 0; |
| 96 | static int bits[] = { 0xee, 0xff, 0xbb, 0xaa }; | |
| 96 | static const int bits[] = { 0xee, 0xff, 0xbb, 0xaa }; | |
| 97 | 97 | |
| 98 | 98 | res = readinputportbytag("IN2"); |
| 99 | 99 | |
| r1404 | r1405 | |
| 275 | 275 | |
| 276 | 276 | |
| 277 | 277 | |
| 278 | static struct upd7759_interface upd7759_interface_1 = | |
| 278 | static const struct upd7759_interface upd7759_interface_1 = | |
| 279 | 279 | { |
| 280 | 280 | REGION_SOUND1 /* memory region */ |
| 281 | 281 | }; |
| 282 | 282 | |
| 283 | static struct upd7759_interface upd7759_interface_2 = | |
| 283 | static const struct upd7759_interface upd7759_interface_2 = | |
| 284 | 284 | { |
| 285 | 285 | REGION_SOUND2 /* memory region */ |
| 286 | 286 | }; |
| r1404 | r1405 | |
|---|---|---|
| 6569 | 6569 | MACHINE_DRIVER_END |
| 6570 | 6570 | |
| 6571 | 6571 | |
| 6572 | static struct AY8910interface quiz365_ay8910_interface = | |
| 6572 | static const struct AY8910interface quiz365_ay8910_interface = | |
| 6573 | 6573 | { |
| 6574 | 6574 | quiz365_input_r, |
| 6575 | 6575 | 0, |
| r1404 | r1405 | |
| 6909 | 6909 | cpunum_set_input_line(0, INPUT_LINE_NMI, PULSE_LINE); |
| 6910 | 6910 | } |
| 6911 | 6911 | |
| 6912 | static struct AY8910interface mjmyster_ay8910_interface = | |
| 6912 | static const struct AY8910interface mjmyster_ay8910_interface = | |
| 6913 | 6913 | { |
| 6914 | 6914 | 0, |
| 6915 | 6915 | 0, |
| r1404 | r1405 | |
| 6957 | 6957 | cpunum_set_input_line_and_vector(0, 0, HOLD_LINE, 0xf8); |
| 6958 | 6958 | } |
| 6959 | 6959 | |
| 6960 | static struct AY8910interface hginga_ay8910_interface = | |
| 6960 | static const struct AY8910interface hginga_ay8910_interface = | |
| 6961 | 6961 | { |
| 6962 | 6962 | // A B |
| 6963 | 6963 | hginga_dsw_r, 0, // R |
| r1404 | r1405 | |
|---|---|---|
| 460 | 460 | cpunum_set_input_line( 2, 0, irq ? ASSERT_LINE : CLEAR_LINE ); |
| 461 | 461 | } |
| 462 | 462 | |
| 463 | static struct YM2151interface ym2151_interface = | |
| 463 | static const struct YM2151interface ym2151_interface = | |
| 464 | 464 | { |
| 465 | 465 | chinagat_irq_handler |
| 466 | 466 | }; |
| 467 | 467 | |
| 468 | 468 | |
| 469 | 469 | /* This on the bootleg board, instead of the m6295 */ |
| 470 | static struct MSM5205interface msm5205_interface = | |
| 470 | static const struct MSM5205interface msm5205_interface = | |
| 471 | 471 | { |
| 472 | 472 | saiyugb1_m5205_irq_w, /* Interrupt function */ |
| 473 | 473 | MSM5205_S64_4B /* vclk input mode (6030Hz, 4-bit) */ |
| r1404 | r1405 | |
| 480 | 480 | } |
| 481 | 481 | |
| 482 | 482 | /* This is only on the second bootleg board */ |
| 483 | static struct YM2203interface ym2203_interface = | |
| 483 | static const struct YM2203interface ym2203_interface = | |
| 484 | 484 | { |
| 485 | 485 | 0, |
| 486 | 486 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 1756 | 1756 | } |
| 1757 | 1757 | } |
| 1758 | 1758 | |
| 1759 | static struct AY8910interface ay8910_intf_dsw = | |
| 1759 | static const struct AY8910interface ay8910_intf_dsw = | |
| 1760 | 1760 | { |
| 1761 | 1761 | input_port_4_r, /* input A: DSW 1 */ |
| 1762 | 1762 | input_port_5_r /* input B: DSW 2 */ |
| 1763 | 1763 | }; |
| 1764 | 1764 | |
| 1765 | static struct AY8910interface ay8910_intf_eeprom = | |
| 1765 | static const struct AY8910interface ay8910_intf_eeprom = | |
| 1766 | 1766 | { |
| 1767 | 1767 | kaneko16_eeprom_r, /* inputs A: 0,EEPROM bit read */ |
| 1768 | 1768 | 0, /* inputs B */ |
| r1404 | r1405 | |
|---|---|---|
| 50 | 50 | |
| 51 | 51 | static READ8_HANDLER( protection_r ) |
| 52 | 52 | { |
| 53 | static int data[4] = { 0x47, 0x4f, 0x4c, 0x44 }; | |
| 53 | static const int data[4] = { 0x47, 0x4f, 0x4c, 0x44 }; | |
| 54 | 54 | |
| 55 | 55 | dataoffset %= 4; |
| 56 | 56 | return data[dataoffset++]; |
| r1404 | r1405 | |
| 277 | 277 | |
| 278 | 278 | |
| 279 | 279 | |
| 280 | static struct AY8910interface ay8910_interface = | |
| 280 | static const struct AY8910interface ay8910_interface = | |
| 281 | 281 | { |
| 282 | 282 | input_port_7_r, /* DSW 4 */ |
| 283 | 283 | input_port_6_r, /* DSW 3 */ |
| r1404 | r1405 | |
|---|---|---|
| 406 | 406 | |
| 407 | 407 | /**********************************************************************************/ |
| 408 | 408 | |
| 409 | static struct YM2151interface ym2151_interface = | |
| 409 | static const struct YM2151interface ym2151_interface = | |
| 410 | 410 | { |
| 411 | 411 | dbz_sound_irq |
| 412 | 412 | }; |
| r1404 | r1405 | |
|---|---|---|
| 556 | 556 | } |
| 557 | 557 | } |
| 558 | 558 | |
| 559 | static struct Y8950interface y8950_interface = { | |
| 559 | static const struct Y8950interface y8950_interface = { | |
| 560 | 560 | 0, /* TODO */ |
| 561 | 561 | REGION_SOUND1 /* memory region */ |
| 562 | 562 | }; |
| r1404 | r1405 | |
|---|---|---|
| 336 | 336 | cpunum_set_input_line(2,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 337 | 337 | } |
| 338 | 338 | |
| 339 | static struct YM2608interface ym2608_interface = | |
| 339 | static const struct YM2608interface ym2608_interface = | |
| 340 | 340 | { |
| 341 | 341 | 0,0,0,0,irqhandler, |
| 342 | 342 | REGION_SOUND1 |
| r1404 | r1405 | |
|---|---|---|
| 1370 | 1370 | AM_RANGE(0x8000, 0xffff) AM_WRITE(MWA8_ROM) |
| 1371 | 1371 | ADDRESS_MAP_END |
| 1372 | 1372 | |
| 1373 | static struct YMF271interface ymf271_interface = | |
| 1373 | static const struct YMF271interface ymf271_interface = | |
| 1374 | 1374 | { |
| 1375 | 1375 | REGION_SOUND1 |
| 1376 | 1376 | }; |
| r1404 | r1405 | |
|---|---|---|
| 409 | 409 | |
| 410 | 410 | INPUT_PORTS_END |
| 411 | 411 | |
| 412 | static struct AY8910interface ay8910_interface = | |
| 412 | static const struct AY8910interface ay8910_interface = | |
| 413 | 413 | { |
| 414 | 414 | input_port_6_r, input_port_7_r, |
| 415 | 415 | 0, 0 |
| r1404 | r1405 | |
|---|---|---|
| 278 | 278 | cpunum_set_input_line(1,1,state); /* IRQ 2 */ |
| 279 | 279 | } |
| 280 | 280 | |
| 281 | static struct YM2151interface ym2151_interface = | |
| 281 | static const struct YM2151interface ym2151_interface = | |
| 282 | 282 | { |
| 283 | 283 | sound_irq |
| 284 | 284 | }; |
| r1404 | r1405 | |
|---|---|---|
| 226 | 226 | GFXDECODE_ENTRY( 0, 0, spritelayout, 0, 64 ) |
| 227 | 227 | GFXDECODE_END |
| 228 | 228 | |
| 229 | static struct namco_interface namco_interface = | |
| 229 | static const struct namco_interface namco_interface = | |
| 230 | 230 | { |
| 231 | 231 | 3, /* number of voices */ |
| 232 | 232 | -1, /* memory region */ |
| r1404 | r1405 | |
|---|---|---|
| 388 | 388 | |
| 389 | 389 | |
| 390 | 390 | |
| 391 | static struct AY8910interface ay8910_interface = | |
| 391 | static const struct AY8910interface ay8910_interface = | |
| 392 | 392 | { |
| 393 | 393 | 0, |
| 394 | 394 | friskyt_portB_r, |
| r1404 | r1405 | |
|---|---|---|
| 346 | 346 | cpunum_set_input_line(1,0,linestate); |
| 347 | 347 | } |
| 348 | 348 | |
| 349 | static struct YM3812interface ym3812_interface = | |
| 349 | static const struct YM3812interface ym3812_interface = | |
| 350 | 350 | { |
| 351 | 351 | irqhandler |
| 352 | 352 | }; |
| r1404 | r1405 | |
|---|---|---|
| 159 | 159 | void fd1094_machine_init(void); |
| 160 | 160 | void fd1094_driver_init(void (*set_decrypted)(UINT8 *)); |
| 161 | 161 | |
| 162 | static void sys16_video_config(void (*update)(void), int sprxoffs, int *bank) | |
| 162 | static void sys16_video_config(void (*update)(void), int sprxoffs, const int *bank) | |
| 163 | 163 | { |
| 164 | static int bank_default[16] = | |
| 164 | static const int bank_default[16] = | |
| 165 | 165 | { |
| 166 | 166 | 0x0,0x1,0x2,0x3, |
| 167 | 167 | 0x4,0x5,0x6,0x7, |
| r1404 | r1405 | |
| 264 | 264 | cpunum_set_input_line(1, INPUT_LINE_NMI, PULSE_LINE); |
| 265 | 265 | } |
| 266 | 266 | |
| 267 | static struct MSM5205interface tturfbl_msm5205_interface = | |
| 267 | static const struct MSM5205interface tturfbl_msm5205_interface = | |
| 268 | 268 | { |
| 269 | 269 | tturfbl_msm5205_callback, |
| 270 | 270 | MSM5205_S48_4B |
| r1404 | r1405 | |
| 640 | 640 | |
| 641 | 641 | static MACHINE_RESET( bayroute ) |
| 642 | 642 | { |
| 643 | static int bank[16] = { | |
| 643 | static const int bank[16] = { | |
| 644 | 644 | 0,0,0,0, |
| 645 | 645 | 0,0,0,3, |
| 646 | 646 | 0,0,0,2, |
| r1404 | r1405 | |
| 805 | 805 | |
| 806 | 806 | static DRIVER_INIT( dduxbl ) |
| 807 | 807 | { |
| 808 | static int bank[16] = { //* | |
| 808 | static const int bank[16] = { //* | |
| 809 | 809 | 0,0,0,0, |
| 810 | 810 | 0,0,0,4, |
| 811 | 811 | 0,0,0,3, |
| r1404 | r1405 | |
| 922 | 922 | |
| 923 | 923 | static MACHINE_RESET( eswatbl ) |
| 924 | 924 | { |
| 925 | static int bank[] = { | |
| 925 | static const int bank[16] = { | |
| 926 | 926 | 0,1, 4,5, |
| 927 | 927 | 8,9, 12,13, |
| 928 | 928 | 2,3, 6,7, |
| r1404 | r1405 | |
| 1277 | 1277 | |
| 1278 | 1278 | static MACHINE_RESET( goldnaxe ) |
| 1279 | 1279 | { |
| 1280 | static int bank[16] = { | |
| 1280 | static const int bank[16] = { | |
| 1281 | 1281 | 0,1,4,5, |
| 1282 | 1282 | 8,9,0,0, |
| 1283 | 1283 | 2,3,6,7, |
| r1404 | r1405 | |
| 1758 | 1758 | |
| 1759 | 1759 | static MACHINE_RESET( shinobl ) |
| 1760 | 1760 | { |
| 1761 | static int bank[] = { | |
| 1761 | static const int bank[16] = { | |
| 1762 | 1762 | 0,2,4,6, |
| 1763 | 1763 | 1,3,5,7 |
| 1764 | 1764 | }; |
| r1404 | r1405 | |
| 2047 | 2047 | |
| 2048 | 2048 | static MACHINE_RESET( tturfbl ) |
| 2049 | 2049 | { |
| 2050 | static int bank[16] = { | |
| 2050 | static const int bank[16] = { | |
| 2051 | 2051 | 0,0,0,0, |
| 2052 | 2052 | 0,0,0,3, |
| 2053 | 2053 | 0,0,0,2, |
| r1404 | r1405 | |
| 2186 | 2186 | |
| 2187 | 2187 | static MACHINE_RESET( wb3bbl ) |
| 2188 | 2188 | { |
| 2189 | static int bank[16] = { | |
| 2189 | static const int bank[16] = { | |
| 2190 | 2190 | 2,0, |
| 2191 | 2191 | 1,0, |
| 2192 | 2192 | 3,0, |
| r1404 | r1405 | |
|---|---|---|
| 311 | 311 | cpunum_set_input_line(1,0,linestate); |
| 312 | 312 | } |
| 313 | 313 | |
| 314 | static struct YM3812interface ym3812_interface = | |
| 314 | static const struct YM3812interface ym3812_interface = | |
| 315 | 315 | { |
| 316 | 316 | irqhandler |
| 317 | 317 | }; |
| r1404 | r1405 | |
|---|---|---|
| 208 | 208 | } |
| 209 | 209 | |
| 210 | 210 | |
| 211 | static TTL74123_interface ic48_1_intf = | |
| 211 | static const TTL74123_interface ic48_1_intf = | |
| 212 | 212 | { |
| 213 | 213 | TTL74123_GROUNDED, /* the hook up type */ |
| 214 | 214 | RES_K(22), /* resistor connected to RCext */ |
| r1404 | r1405 | |
| 454 | 454 | } |
| 455 | 455 | |
| 456 | 456 | |
| 457 | static struct AY8910interface ay8910_37_interface = | |
| 457 | static const struct AY8910interface ay8910_37_interface = | |
| 458 | 458 | { |
| 459 | 459 | 0, |
| 460 | 460 | 0, |
| r1404 | r1405 | |
| 463 | 463 | }; |
| 464 | 464 | |
| 465 | 465 | |
| 466 | static struct AY8910interface ay8910_64_interface = | |
| 466 | static const struct AY8910interface ay8910_64_interface = | |
| 467 | 467 | { |
| 468 | 468 | input_port_3_r, |
| 469 | 469 | input_port_2_r |
| r1404 | r1405 | |
|---|---|---|
| 453 | 453 | *****************************************************************************************************/ |
| 454 | 454 | |
| 455 | 455 | |
| 456 | static gfx_layout tile_layout = | |
| 456 | static const gfx_layout tile_layout = | |
| 457 | 457 | { |
| 458 | 458 | 8,8, |
| 459 | 459 | RGN_FRAC(1,1), |
| r1404 | r1405 | |
|---|---|---|
| 299 | 299 | GFXDECODE_END |
| 300 | 300 | |
| 301 | 301 | /* Arbitrary colortable */ |
| 302 | static UINT16 colortable_source[] = | |
| 302 | static const UINT16 colortable_source[] = | |
| 303 | 303 | { |
| 304 | 304 | 0,7, |
| 305 | 305 | 0,6, |
| r1404 | r1405 | |
| 344 | 344 | } |
| 345 | 345 | } |
| 346 | 346 | |
| 347 | static struct AY8910interface redalert_ay8910_interface = | |
| 347 | static const struct AY8910interface redalert_ay8910_interface = | |
| 348 | 348 | { |
| 349 | 349 | redalert_AY8910_A_r, /* Port A Read */ |
| 350 | 350 | 0, /* Port B Read */ |
| r1404 | r1405 | |
|---|---|---|
| 206 | 206 | |
| 207 | 207 | static WRITE8_HANDLER( maxrpm_op6_w ) |
| 208 | 208 | { |
| 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" }; | |
| 210 | 210 | |
| 211 | 211 | /* |
| 212 | 212 | Reflective Sensor Control: |
| r1404 | r1405 | |
| 388 | 388 | /* bit 5 = STR1 (J1-13) */ |
| 389 | 389 | if (((last_op4 ^ data) & 0x20) && !(data & 0x20)) |
| 390 | 390 | { |
| 391 | static const char *lampname[8] = | |
| 391 | static const char *const lampname[8] = | |
| 392 | 392 | { |
| 393 | 393 | "lamp0", "lamp1", "lamp2", "lamp3", |
| 394 | 394 | "lamp4", "lamp5", "lamp6", "lamp7" |
| r1404 | r1405 | |
|---|---|---|
| 300 | 300 | 0, // ZC/TO2 callback |
| 301 | 301 | }; |
| 302 | 302 | |
| 303 | static struct z80_irq_daisy_chain daisy_chain_sound[] = | |
| 303 | static const struct z80_irq_daisy_chain daisy_chain_sound[] = | |
| 304 | 304 | { |
| 305 | 305 | { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 }, /* device 0 = CTC_1 */ |
| 306 | 306 | { 0, 0, 0, 0, -1 } /* end mark */ |
| r1404 | r1405 | |
| 317 | 317 | { vidctrl_w, protection_w, NULL }, /* Port C write */ |
| 318 | 318 | }; |
| 319 | 319 | |
| 320 | static struct YM2203interface ym2203_interface = | |
| 320 | static const struct YM2203interface ym2203_interface = | |
| 321 | 321 | { |
| 322 | 322 | 0, |
| 323 | 323 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 329 | 329 | * |
| 330 | 330 | *************************************/ |
| 331 | 331 | |
| 332 | static struct namco_interface namco_interface = | |
| 332 | static const struct namco_interface namco_interface = | |
| 333 | 333 | { |
| 334 | 334 | 3, /* number of voices */ |
| 335 | 335 | REGION_SOUND1 /* memory region */ |
| r1404 | r1405 | |
|---|---|---|
| 269 | 269 | cpunum_set_input_line(1,0,linestate); |
| 270 | 270 | } |
| 271 | 271 | |
| 272 | static struct YM3812interface ym3812_interface = | |
| 272 | static const struct YM3812interface ym3812_interface = | |
| 273 | 273 | { |
| 274 | 274 | irqhandler |
| 275 | 275 | }; |
| r1404 | r1405 | |
|---|---|---|
| 219 | 219 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 220 | 220 | } |
| 221 | 221 | |
| 222 | static struct YM3812interface ym3812_interface = | |
| 222 | static const struct YM3812interface ym3812_interface = | |
| 223 | 223 | { |
| 224 | 224 | irqhandler |
| 225 | 225 | }; |
| 226 | 226 | |
| 227 | static struct upd7759_interface upd7759_interface = | |
| 227 | static const struct upd7759_interface upd7759_interface = | |
| 228 | 228 | { |
| 229 | 229 | REGION_SOUND1 /* memory region */ |
| 230 | 230 | }; |
| r1404 | r1405 | |
|---|---|---|
| 225 | 225 | |
| 226 | 226 | ***************************************************************************/ |
| 227 | 227 | |
| 228 | static struct K053260_interface k053260_interface = | |
| 228 | static const struct K053260_interface k053260_interface = | |
| 229 | 229 | { |
| 230 | 230 | REGION_SOUND1 /* memory region */ |
| 231 | 231 | }; |
| r1404 | r1405 | |
|---|---|---|
| 94 | 94 | |
| 95 | 95 | static int sound_cpu_busy; |
| 96 | 96 | |
| 97 | static struct namco_interface snkwave_interface = | |
| 97 | static const struct namco_interface snkwave_interface = | |
| 98 | 98 | { |
| 99 | 99 | 1, /* number of voices */ |
| 100 | 100 | -1 /* memory region */ |
| r1404 | r1405 | |
|---|---|---|
| 347 | 347 | cpunum_set_input_line( 1, 0 , irq ? ASSERT_LINE : CLEAR_LINE ); |
| 348 | 348 | } |
| 349 | 349 | |
| 350 | static struct YM2151interface ym2151_interface = | |
| 350 | static const struct YM2151interface ym2151_interface = | |
| 351 | 351 | { |
| 352 | 352 | wwfsstar_ymirq_handler |
| 353 | 353 | }; |
| r1404 | r1405 | |
|---|---|---|
| 1077 | 1077 | AM_RANGE(0xf00000, 0xf0ffff) AM_RAM |
| 1078 | 1078 | ADDRESS_MAP_END |
| 1079 | 1079 | |
| 1080 | static struct MultiPCM_interface m1_multipcm_interface_1 = | |
| 1080 | static const struct MultiPCM_interface m1_multipcm_interface_1 = | |
| 1081 | 1081 | { |
| 1082 | 1082 | REGION_SOUND1 |
| 1083 | 1083 | }; |
| 1084 | 1084 | |
| 1085 | static struct MultiPCM_interface m1_multipcm_interface_2 = | |
| 1085 | static const struct MultiPCM_interface m1_multipcm_interface_2 = | |
| 1086 | 1086 | { |
| 1087 | 1087 | REGION_SOUND2 |
| 1088 | 1088 | }; |
| r1404 | r1405 | |
|---|---|---|
| 380 | 380 | cpunum_set_input_line(1,0,linestate); /* IRQ */ |
| 381 | 381 | } |
| 382 | 382 | |
| 383 | static struct YM3812interface ym3812_interface = | |
| 383 | static const struct YM3812interface ym3812_interface = | |
| 384 | 384 | { |
| 385 | 385 | sound_irq |
| 386 | 386 | }; |
| r1404 | r1405 | |
|---|---|---|
| 397 | 397 | coin_lockout_global_w(data & 1); |
| 398 | 398 | } |
| 399 | 399 | |
| 400 | static struct namcoio_interface intf0 = | |
| 400 | static const struct namcoio_interface intf0 = | |
| 401 | 401 | { |
| 402 | 402 | { in0_l, in0_h, dipB_l, dipB_h }, /* port read handlers */ |
| 403 | 403 | { out_0, out_1 } /* port write handlers */ |
| 404 | 404 | }; |
| 405 | static struct namcoio_interface intf1 = | |
| 405 | static const struct namcoio_interface intf1 = | |
| 406 | 406 | { |
| 407 | 407 | { in1_l, in1_h, dipA_l, dipA_h }, /* port read handlers */ |
| 408 | 408 | { NULL, NULL } /* port write handlers */ |
| r1404 | r1405 | |
| 825 | 825 | * Sound interfaces |
| 826 | 826 | *********************************************************************/ |
| 827 | 827 | |
| 828 | static struct namco_interface namco_interface = | |
| 828 | static const struct namco_interface namco_interface = | |
| 829 | 829 | { |
| 830 | 830 | 8, /* number of voices */ |
| 831 | 831 | REGION_SOUND1, /* memory region */ |
| r1404 | r1405 | |
| 852 | 852 | * to allow headroom when more the one effect is played. |
| 853 | 853 | */ |
| 854 | 854 | |
| 855 | static struct namco_52xx_interface namco_52xx_interface = | |
| 855 | static const struct namco_52xx_interface namco_52xx_interface = | |
| 856 | 856 | { |
| 857 | 857 | REGION_SOUND3, /* memory region */ |
| 858 | 858 | 0, /* Use internal Playback frequency */ |
| r1404 | r1405 | |
| 863 | 863 | .5 /* Combined gain of both filters */ |
| 864 | 864 | }; |
| 865 | 865 | |
| 866 | static struct CustomSound_interface custom_interface = | |
| 866 | static const struct CustomSound_interface custom_interface = | |
| 867 | 867 | { |
| 868 | 868 | polepos_sh_start, |
| 869 | 869 | NULL, |
| r1404 | r1405 | |
|---|---|---|
| 2581 | 2581 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 2582 | 2582 | } |
| 2583 | 2583 | |
| 2584 | static struct YM2610interface ym2610_interface_rsaga2 = | |
| 2584 | static const struct YM2610interface ym2610_interface_rsaga2 = | |
| 2585 | 2585 | { |
| 2586 | 2586 | irqhandler, |
| 2587 | 2587 | REGION_SOUND1, |
| 2588 | 2588 | REGION_SOUND2 |
| 2589 | 2589 | }; |
| 2590 | 2590 | |
| 2591 | static struct YM2610interface ym2610_interface_crimec = | |
| 2591 | static const struct YM2610interface ym2610_interface_crimec = | |
| 2592 | 2592 | { |
| 2593 | 2593 | irqhandler, |
| 2594 | 2594 | REGION_SOUND1, |
| 2595 | 2595 | REGION_SOUND1 |
| 2596 | 2596 | }; |
| 2597 | 2597 | |
| 2598 | static struct YM2203interface ym2203_interface = | |
| 2598 | static const struct YM2203interface ym2203_interface = | |
| 2599 | 2599 | { |
| 2600 | 2600 | 0, |
| 2601 | 2601 | 0, |
| r1404 | r1405 | |
| 2627 | 2627 | } |
| 2628 | 2628 | } |
| 2629 | 2629 | |
| 2630 | static struct MB87078interface mb87078_interface = | |
| 2630 | static const struct MB87078interface mb87078_interface = | |
| 2631 | 2631 | { |
| 2632 | 2632 | mb87078_gain_changed /*callback function for gain change*/ |
| 2633 | 2633 | }; |
| r1404 | r1405 | |
|---|---|---|
| 157 | 157 | |
| 158 | 158 | static int cf_card_ide = 0; |
| 159 | 159 | |
| 160 | static UINT8 cf_card_tuples[] = | |
| 160 | static const UINT8 cf_card_tuples[] = | |
| 161 | 161 | { |
| 162 | 162 | 0x01, // Device Tuple |
| 163 | 163 | 0x01, // Tuple size |
| r1404 | r1405 | |
| 608 | 608 | |
| 609 | 609 | INPUT_PORTS_END |
| 610 | 610 | |
| 611 | static ppc_config viper_ppc_cfg = | |
| 611 | static const ppc_config viper_ppc_cfg = | |
| 612 | 612 | { |
| 613 | 613 | PPC_MODEL_MPC8240, |
| 614 | 614 | 0x30, |
| r1404 | r1405 | |
| 659 | 659 | { |
| 660 | 660 | } |
| 661 | 661 | |
| 662 | static struct pci_device_info mpc8240 = | |
| 662 | static const struct pci_device_info mpc8240 = | |
| 663 | 663 | { |
| 664 | 664 | mpc8240_pci_r, |
| 665 | 665 | mpc8240_pci_w |
| 666 | 666 | }; |
| 667 | 667 | |
| 668 | static struct pci_device_info voodoo3 = | |
| 668 | static const struct pci_device_info voodoo3 = | |
| 669 | 669 | { |
| 670 | 670 | voodoo3_pci_r, |
| 671 | 671 | voodoo3_pci_w |
| 672 | 672 | }; |
| 673 | 673 | |
| 674 | static struct ide_interface ide_intf = | |
| 674 | static const struct ide_interface ide_intf = | |
| 675 | 675 | { |
| 676 | 676 | ide_interrupt |
| 677 | 677 | }; |
| r1404 | r1405 | |
|---|---|---|
| 274 | 274 | */ |
| 275 | 275 | int i; |
| 276 | 276 | |
| 277 | static const char *lamp_names[] = | |
| 277 | static const char *const lamp_names[] = | |
| 278 | 278 | { |
| 279 | 279 | "EXP_LAMP_0", "EXP_LAMP_1", "EXP_LAMP_2", "EXP_LAMP_3", |
| 280 | 280 | "EXP_LAMP_4", "EXP_LAMP_5", "EXP_LAMP_6", "EXP_LAMP_7", |
| r1404 | r1405 | |
|---|---|---|
| 1046 | 1046 | |
| 1047 | 1047 | /*******************************************************************/ |
| 1048 | 1048 | |
| 1049 | static struct namco_interface namco_interface = | |
| 1049 | static const struct namco_interface namco_interface = | |
| 1050 | 1050 | { |
| 1051 | 1051 | 8, /* number of voices */ |
| 1052 | 1052 | -1, /* memory region */ |
| 1053 | 1053 | 0 /* stereo */ |
| 1054 | 1054 | }; |
| 1055 | 1055 | |
| 1056 | static struct namco_63701x_interface namco_63701x_interface = | |
| 1056 | static const struct namco_63701x_interface namco_63701x_interface = | |
| 1057 | 1057 | { |
| 1058 | 1058 | REGION_SOUND1 /* memory region */ |
| 1059 | 1059 | }; |
| r1404 | r1405 | |
|---|---|---|
| 1531 | 1531 | |
| 1532 | 1532 | /* 1 x 24 MHz crystal */ |
| 1533 | 1533 | |
| 1534 | static struct AY8910interface hardhead_ay8910_interface = | |
| 1534 | static const struct AY8910interface hardhead_ay8910_interface = | |
| 1535 | 1535 | { |
| 1536 | 1536 | 0, |
| 1537 | 1537 | 0, |
| r1404 | r1405 | |
| 1648 | 1648 | |
| 1649 | 1649 | /* 1 x 24 MHz crystal */ |
| 1650 | 1650 | |
| 1651 | static struct YM3812interface brickzn_ym3812_interface = | |
| 1651 | static const struct YM3812interface brickzn_ym3812_interface = | |
| 1652 | 1652 | { |
| 1653 | 1653 | soundirq /* IRQ Line */ |
| 1654 | 1654 | }; |
| r1404 | r1405 | |
| 1754 | 1754 | Star Fighter |
| 1755 | 1755 | ***************************************************************************/ |
| 1756 | 1756 | |
| 1757 | static struct AY8910interface starfigh_ay8910_interface = | |
| 1757 | static const struct AY8910interface starfigh_ay8910_interface = | |
| 1758 | 1758 | { |
| 1759 | 1759 | 0, |
| 1760 | 1760 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 262 | 262 | cpunum_set_input_line(1,1,state); /* IRQ 2 */ |
| 263 | 263 | } |
| 264 | 264 | |
| 265 | static struct YM2151interface ym2151_interface = | |
| 265 | static const struct YM2151interface ym2151_interface = | |
| 266 | 266 | { |
| 267 | 267 | sound_irq |
| 268 | 268 | }; |
| r1404 | r1405 | |
|---|---|---|
| 593 | 593 | * |
| 594 | 594 | *************************************/ |
| 595 | 595 | |
| 596 | static struct ide_interface ide_intf = | |
| 596 | static const struct ide_interface ide_intf = | |
| 597 | 597 | { |
| 598 | 598 | ide_interrupt, |
| 599 | 599 | }; |
| 600 | 600 | |
| 601 | static struct ide_interface gp2_ide_intf = | |
| 601 | static const struct ide_interface gp2_ide_intf = | |
| 602 | 602 | { |
| 603 | 603 | gp2_ide_interrupt, |
| 604 | 604 | }; |
| r1404 | r1405 | |
| 616 | 616 | cpunum_set_input_line(0, 1, HOLD_LINE); |
| 617 | 617 | } |
| 618 | 618 | |
| 619 | static struct K054539interface k054539_interface = | |
| 619 | static const struct K054539interface k054539_interface = | |
| 620 | 620 | { |
| 621 | 621 | REGION_SOUND1, |
| 622 | 622 | NULL, |
| 623 | 623 | sound_irq |
| 624 | 624 | }; |
| 625 | 625 | |
| 626 | static struct K054539interface gp2_k054539_interface = | |
| 626 | static const struct K054539interface gp2_k054539_interface = | |
| 627 | 627 | { |
| 628 | 628 | REGION_SOUND1 |
| 629 | 629 | }; |
| r1404 | r1405 | |
|---|---|---|
| 162 | 162 | |
| 163 | 163 | READ16_HANDLER( cps1_dsw_r ) |
| 164 | 164 | { |
| 165 | static const char *dswname[3] = { "DSWA", "DSWB", "DSWC" }; | |
| 165 | static const char *const dswname[3] = { "DSWA", "DSWB", "DSWC" }; | |
| 166 | 166 | int control = readinputportbytag(dswname[offset]); |
| 167 | 167 | return control << 8 | control; |
| 168 | 168 | } |
| r1404 | r1405 | |
| 306 | 306 | * |
| 307 | 307 | ********************************************************************/ |
| 308 | 308 | |
| 309 | struct QSound_interface qsound_interface = | |
| 309 | const struct QSound_interface qsound_interface = | |
| 310 | 310 | { |
| 311 | 311 | REGION_SOUND1 |
| 312 | 312 | }; |
| r1404 | r1405 | |
| 3463 | 3463 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 3464 | 3464 | } |
| 3465 | 3465 | |
| 3466 | static struct YM2151interface ym2151_interface = | |
| 3466 | static const struct YM2151interface ym2151_interface = | |
| 3467 | 3467 | { |
| 3468 | 3468 | cps1_irq_handler_mus |
| 3469 | 3469 | }; |
| r1404 | r1405 | |
|---|---|---|
| 173 | 173 | |
| 174 | 174 | |
| 175 | 175 | |
| 176 | static struct AY8910interface ay8910_interface_1 = | |
| 176 | static const struct AY8910interface ay8910_interface_1 = | |
| 177 | 177 | { |
| 178 | 178 | 0, |
| 179 | 179 | 0, |
| r1404 | r1405 | |
| 181 | 181 | nova2001_scroll_y_w |
| 182 | 182 | }; |
| 183 | 183 | |
| 184 | static struct AY8910interface ay8910_interface_2 = | |
| 184 | static const struct AY8910interface ay8910_interface_2 = | |
| 185 | 185 | { |
| 186 | 186 | input_port_3_r, |
| 187 | 187 | input_port_4_r |
| r1404 | r1405 | |
|---|---|---|
| 150 | 150 | GFXDECODE_END |
| 151 | 151 | |
| 152 | 152 | |
| 153 | static UINT16 colortable_source[] = | |
| 153 | static const UINT16 colortable_source[] = | |
| 154 | 154 | { |
| 155 | 155 | 0x00, 0x01, /* White on Black */ |
| 156 | 156 | }; |
| r1404 | r1405 | |
|---|---|---|
| 519 | 519 | cpunum_set_input_line(1, 0, state); |
| 520 | 520 | } |
| 521 | 521 | |
| 522 | static struct YM3812interface magicbub_ym3812_intf = | |
| 522 | static const struct YM3812interface magicbub_ym3812_intf = | |
| 523 | 523 | { |
| 524 | 524 | soundirq /* IRQ Line */ |
| 525 | 525 | }; |
| r1404 | r1405 | |
|---|---|---|
| 82 | 82 | |
| 83 | 83 | |
| 84 | 84 | |
| 85 | static struct AY8910interface hustler_ay8910_interface = | |
| 85 | static const struct AY8910interface hustler_ay8910_interface = | |
| 86 | 86 | { |
| 87 | 87 | soundlatch_r, |
| 88 | 88 | frogger_portB_r |
| r1404 | r1405 | |
| 1373 | 1373 | INPUT_PORTS_END |
| 1374 | 1374 | |
| 1375 | 1375 | |
| 1376 | static struct AY8910interface scobra_ay8910_interface_2 = | |
| 1376 | static const struct AY8910interface scobra_ay8910_interface_2 = | |
| 1377 | 1377 | { |
| 1378 | 1378 | soundlatch_r, |
| 1379 | 1379 | scramble_portB_r |
| r1404 | r1405 | |
|---|---|---|
| 52 | 52 | int i, x, y, ex, ey; |
| 53 | 53 | const gfx_element *gfx = machine->gfx[0]; |
| 54 | 54 | |
| 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}; | |
| 57 | 57 | |
| 58 | 58 | for (i = 3; i < 0x1000/2; i+=4){ |
| 59 | 59 | int sx = drtomy_spriteram[i+2] & 0x01ff; |
| r1404 | r1405 | |
|---|---|---|
| 928 | 928 | * |
| 929 | 929 | *************************************/ |
| 930 | 930 | |
| 931 | static struct tms32031_config tms_config = | |
| 931 | static const struct tms32031_config tms_config = | |
| 932 | 932 | { |
| 933 | 933 | 0x1000, |
| 934 | 934 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 789 | 789 | AM_RANGE(0xfffe0130, 0xfffe0133) AM_WRITENOP |
| 790 | 790 | ADDRESS_MAP_END |
| 791 | 791 | |
| 792 | static struct | |
| 792 | static const struct | |
| 793 | 793 | { |
| 794 | 794 | const char *s_name; |
| 795 | 795 | read32_handler keycus_r; |
| r1404 | r1405 | |
|---|---|---|
| 469 | 469 | * |
| 470 | 470 | *************************************/ |
| 471 | 471 | |
| 472 | static tms34010_config tms_config = | |
| 472 | static const tms34010_config tms_config = | |
| 473 | 473 | { |
| 474 | 474 | FALSE, /* halt on reset */ |
| 475 | 475 | 0, /* the screen operated on */ |
| r1404 | r1405 | |
| 481 | 481 | NULL /* read from shiftreg function */ |
| 482 | 482 | }; |
| 483 | 483 | |
| 484 | static tms34010_config tms_config_lethalj = | |
| 484 | static const tms34010_config tms_config_lethalj = | |
| 485 | 485 | { |
| 486 | 486 | FALSE, /* halt on reset */ |
| 487 | 487 | 0, /* the screen operated on */ |
| r1404 | r1405 | |
|---|---|---|
| 521 | 521 | |
| 522 | 522 | static void via_irq(int state); |
| 523 | 523 | |
| 524 | static struct via6522_interface via_interface = | |
| 524 | static const struct via6522_interface via_interface = | |
| 525 | 525 | { |
| 526 | 526 | /*inputs : A/B */ 0, 0, |
| 527 | 527 | /*inputs : CA/B1,CA/B2 */ 0, 0, 0, 0, |
| r1404 | r1405 | |
| 1734 | 1734 | * |
| 1735 | 1735 | *************************************/ |
| 1736 | 1736 | |
| 1737 | static struct YM2203interface ym2203_interface = | |
| 1737 | static const struct YM2203interface ym2203_interface = | |
| 1738 | 1738 | { |
| 1739 | 1739 | 0, |
| 1740 | 1740 | 0, |
| r1404 | r1405 | |
| 1744 | 1744 | }; |
| 1745 | 1745 | |
| 1746 | 1746 | |
| 1747 | static struct YM3812interface ym3812_interface = | |
| 1747 | static const struct YM3812interface ym3812_interface = | |
| 1748 | 1748 | { |
| 1749 | 1749 | generate_sound_irq |
| 1750 | 1750 | }; |
| r1404 | r1405 | |
|---|---|---|
| 4236 | 4236 | GFXDECODE_ENTRY( REGION_GFX1, 0x4000, _4in1_spritelayout, 0, 8 ) |
| 4237 | 4237 | GFXDECODE_END |
| 4238 | 4238 | |
| 4239 | static struct AY8910interface checkmaj_ay8910_interface = | |
| 4239 | static const struct AY8910interface checkmaj_ay8910_interface = | |
| 4240 | 4240 | { |
| 4241 | 4241 | soundlatch_r |
| 4242 | 4242 | }; |
| 4243 | 4243 | |
| 4244 | static struct AY8910interface bongo_ay8910_interface = | |
| 4244 | static const struct AY8910interface bongo_ay8910_interface = | |
| 4245 | 4245 | { |
| 4246 | 4246 | input_port_3_r |
| 4247 | 4247 | }; |
| r1404 | r1405 | |
|---|---|---|
| 642 | 642 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 643 | 643 | } |
| 644 | 644 | |
| 645 | static struct YM2608interface ym2608_interface = | |
| 645 | static const struct YM2608interface ym2608_interface = | |
| 646 | 646 | { |
| 647 | 647 | 0,0,0,0,sound_irq, |
| 648 | 648 | REGION_SOUND1 |
| 649 | 649 | }; |
| 650 | 650 | |
| 651 | static struct YM2610interface ym2610_interface = | |
| 651 | static const struct YM2610interface ym2610_interface = | |
| 652 | 652 | { |
| 653 | 653 | sound_irq, |
| 654 | 654 | REGION_SOUND2, |
| r1404 | r1405 | |
|---|---|---|
| 276 | 276 | cpunum_set_input_line(1, 0, CLEAR_LINE); |
| 277 | 277 | } |
| 278 | 278 | |
| 279 | static struct YM2610interface ym2610_interface = | |
| 279 | static const struct YM2610interface ym2610_interface = | |
| 280 | 280 | { |
| 281 | 281 | gs_ym2610_irq, |
| 282 | 282 | REGION_SOUND1, |
| r1404 | r1405 | |
|---|---|---|
| 364 | 364 | if( state ) snk_sound_register |= 0x02; |
| 365 | 365 | } |
| 366 | 366 | |
| 367 | static struct YM3526interface ym3526_interface_0 = { | |
| 367 | static const struct YM3526interface ym3526_interface_0 = { | |
| 368 | 368 | snk_sound_callback0_w /* ? */ |
| 369 | 369 | }; |
| 370 | 370 | |
| 371 | static struct YM3526interface ym3526_interface_1 = { | |
| 371 | static const struct YM3526interface ym3526_interface_1 = { | |
| 372 | 372 | snk_sound_callback1_w /* ? */ |
| 373 | 373 | }; |
| 374 | 374 | |
| 375 | static struct Y8950interface y8950_interface = { | |
| 375 | static const struct Y8950interface y8950_interface = { | |
| 376 | 376 | snk_sound_callback1_w, /* ? */ |
| 377 | 377 | REGION_SOUND1 /* memory region */ |
| 378 | 378 | }; |
| 379 | 379 | |
| 380 | static struct YM3812interface ym3812_interface = { | |
| 380 | static const struct YM3812interface ym3812_interface = { | |
| 381 | 381 | snk_sound_callback0_w /* ? */ |
| 382 | 382 | }; |
| 383 | 383 |
| r1404 | r1405 | |
|---|---|---|
| 713 | 713 | cpunum_set_input_line(1, 1, HOLD_LINE); |
| 714 | 714 | } |
| 715 | 715 | |
| 716 | static struct YM2151interface ym2151_interface = | |
| 716 | static const struct YM2151interface ym2151_interface = | |
| 717 | 717 | { |
| 718 | 718 | sound_irq |
| 719 | 719 | }; |
| r1404 | r1405 | |
|---|---|---|
| 716 | 716 | GFXDECODE_END |
| 717 | 717 | |
| 718 | 718 | |
| 719 | static struct AY8910interface ay8910_interface = | |
| 719 | static const struct AY8910interface ay8910_interface = | |
| 720 | 720 | { |
| 721 | 721 | 0, |
| 722 | 722 | 0, |
| r1404 | r1405 | |
| 724 | 724 | sound_control_3_w |
| 725 | 725 | }; |
| 726 | 726 | |
| 727 | static struct MSM5232interface msm5232_interface = | |
| 727 | static const struct MSM5232interface msm5232_interface = | |
| 728 | 728 | { |
| 729 | 729 | { 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) */ |
| 730 | 730 | }; |
| r1404 | r1405 | |
|---|---|---|
| 316 | 316 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 317 | 317 | } |
| 318 | 318 | |
| 319 | static struct YM2610interface ym2610_interface = | |
| 319 | static const struct YM2610interface ym2610_interface = | |
| 320 | 320 | { |
| 321 | 321 | irqhandler, |
| 322 | 322 | REGION_SOUND1, |
| r1404 | r1405 | |
|---|---|---|
| 306 | 306 | * |
| 307 | 307 | *************************************/ |
| 308 | 308 | |
| 309 | static struct POKEYinterface pokey_interface_1 = | |
| 309 | static const struct POKEYinterface pokey_interface_1 = | |
| 310 | 310 | { |
| 311 | 311 | { 0 }, |
| 312 | 312 | input_port_0_r |
| 313 | 313 | }; |
| 314 | 314 | |
| 315 | 315 | |
| 316 | static struct POKEYinterface pokey_interface_2 = | |
| 316 | static const struct POKEYinterface pokey_interface_2 = | |
| 317 | 317 | { |
| 318 | 318 | { 0 }, |
| 319 | 319 | input_port_1_r |
| r1404 | r1405 | |
|---|---|---|
| 951 | 951 | |
| 952 | 952 | /* Protection handling */ |
| 953 | 953 | |
| 954 | static UINT8 ZGUNProt[] = | |
| 954 | static const UINT8 ZGUNProt[] = | |
| 955 | 955 | { |
| 956 | 956 | 0x7F,0x4E,0x1B,0x1E,0xA8,0x48,0xF5,0x49,0x31,0x32,0x4A,0x09,0x89,0x29,0xC0,0x41, |
| 957 | 957 | 0x3A,0x49,0x85,0x24,0xA0,0x4D,0x21,0x31,0xEA,0xC3,0x3F,0xAF,0x0E,0x4B,0x25,0x02, |
| r1404 | r1405 | |
| 962 | 962 | 0x94,0xD5,0x73,0x09,0xE4,0x3D,0x2D,0x92,0xC9,0xA7,0xA3,0x53,0x42,0x82,0x55,0x67, |
| 963 | 963 | 0xE4,0x66,0xD0,0x4A,0x7D,0x4A,0x13,0xDE,0xD7,0x9F,0x38,0xAA,0x00,0x56,0x85,0x0A |
| 964 | 964 | }; |
| 965 | static UINT8 DCOPKey1326[]= | |
| 965 | static const UINT8 DCOPKey1326[]= | |
| 966 | 966 | { |
| 967 | 967 | 0x43,0x66,0x54,0x11,0x99,0xfe,0xcc,0x8e,0xdd,0x87,0x11,0x89,0x22,0xdf,0x44,0x09 |
| 968 | 968 | }; |
| r1404 | r1405 | |
| 1694 | 1694 | } |
| 1695 | 1695 | } |
| 1696 | 1696 | |
| 1697 | static struct SCSPinterface scsp_interface = | |
| 1697 | static const struct SCSPinterface scsp_interface = | |
| 1698 | 1698 | { |
| 1699 | 1699 | REGION_CPU2, |
| 1700 | 1700 | 0, |
| 1701 | 1701 | scsp_irq |
| 1702 | 1702 | }; |
| 1703 | 1703 | |
| 1704 | static struct MultiPCM_interface m1_multipcm_interface_1 = | |
| 1704 | static const struct MultiPCM_interface m1_multipcm_interface_1 = | |
| 1705 | 1705 | { |
| 1706 | 1706 | REGION_SOUND1 |
| 1707 | 1707 | }; |
| 1708 | 1708 | |
| 1709 | static struct MultiPCM_interface m1_multipcm_interface_2 = | |
| 1709 | static const struct MultiPCM_interface m1_multipcm_interface_2 = | |
| 1710 | 1710 | { |
| 1711 | 1711 | REGION_SOUND2 |
| 1712 | 1712 | }; |
| r1404 | r1405 | |
| 1775 | 1775 | |
| 1776 | 1776 | /*****************************************************************************/ |
| 1777 | 1777 | |
| 1778 | static struct mb86233_config tgp_config = | |
| 1778 | static const struct mb86233_config tgp_config = | |
| 1779 | 1779 | { |
| 1780 | 1780 | copro_fifoin_pop, |
| 1781 | 1781 | copro_fifoout_push, |
| r1404 | r1405 | |
| 1865 | 1865 | MACHINE_DRIVER_END |
| 1866 | 1866 | |
| 1867 | 1867 | |
| 1868 | static sharc_config sharc_cfg = | |
| 1868 | static const sharc_config sharc_cfg = | |
| 1869 | 1869 | { |
| 1870 | 1870 | BOOT_MODE_HOST |
| 1871 | 1871 | }; |
| r1404 | r1405 | |
|---|---|---|
| 460 | 460 | } |
| 461 | 461 | |
| 462 | 462 | |
| 463 | static struct AY8910interface ay8910_interface = | |
| 463 | static const struct AY8910interface ay8910_interface = | |
| 464 | 464 | { |
| 465 | 465 | dips1_r, |
| 466 | 466 | 0, |
| r1404 | r1405 | |
| 469 | 469 | }; |
| 470 | 470 | |
| 471 | 471 | |
| 472 | static struct via6522_interface via_interface = | |
| 472 | static const struct via6522_interface via_interface = | |
| 473 | 473 | { |
| 474 | 474 | /*inputs : A/B */ 0, via_b_in, |
| 475 | 475 | /*inputs : CA/B1,CA/B2 */ 0, 0, 0, 0, |
| r1404 | r1405 | |
|---|---|---|
| 310 | 310 | * |
| 311 | 311 | *************************************/ |
| 312 | 312 | |
| 313 | static struct CustomSound_interface i80186_custom_interface = | |
| 313 | static const struct CustomSound_interface i80186_custom_interface = | |
| 314 | 314 | { |
| 315 | 315 | leland_80186_sh_start |
| 316 | 316 | }; |
| r1404 | r1405 | |
|---|---|---|
| 331 | 331 | cpunum_set_input_line(1,0,state); |
| 332 | 332 | } |
| 333 | 333 | |
| 334 | static struct YM2203interface ym2203_interface = | |
| 334 | static const struct YM2203interface ym2203_interface = | |
| 335 | 335 | { |
| 336 | 336 | 0,0,0,0,irqhandler |
| 337 | 337 | }; |
| r1404 | r1405 | |
|---|---|---|
| 297 | 297 | |
| 298 | 298 | |
| 299 | 299 | |
| 300 | static struct CustomSound_interface custom_interface = | |
| 300 | static const struct CustomSound_interface custom_interface = | |
| 301 | 301 | { |
| 302 | 302 | wiping_sh_start |
| 303 | 303 | }; |
| r1404 | r1405 | |
|---|---|---|
| 476 | 476 | * |
| 477 | 477 | *************************************/ |
| 478 | 478 | |
| 479 | static struct AY8910interface ay8910_interface = | |
| 479 | static const struct AY8910interface ay8910_interface = | |
| 480 | 480 | { |
| 481 | 481 | input_port_0_r, |
| 482 | 482 | input_port_1_r |
| r1404 | r1405 | |
|---|---|---|
| 696 | 696 | register. |
| 697 | 697 | */ |
| 698 | 698 | |
| 699 | static struct AY8910interface ay8910_interface = | |
| 699 | static const struct AY8910interface ay8910_interface = | |
| 700 | 700 | { |
| 701 | 701 | leland_sound_port_r, |
| 702 | 702 | 0, |
| r1404 | r1405 | |
| 705 | 705 | }; |
| 706 | 706 | |
| 707 | 707 | |
| 708 | static struct CustomSound_interface dac_custom_interface = | |
| 708 | static const struct CustomSound_interface dac_custom_interface = | |
| 709 | 709 | { |
| 710 | 710 | leland_sh_start |
| 711 | 711 | }; |
| 712 | 712 | |
| 713 | 713 | |
| 714 | static struct CustomSound_interface i80186_custom_interface = | |
| 714 | static const struct CustomSound_interface i80186_custom_interface = | |
| 715 | 715 | { |
| 716 | 716 | leland_80186_sh_start |
| 717 | 717 | }; |
| 718 | 718 | |
| 719 | 719 | |
| 720 | static struct CustomSound_interface redline_custom_interface = | |
| 720 | static const struct CustomSound_interface redline_custom_interface = | |
| 721 | 721 | { |
| 722 | 722 | redline_80186_sh_start |
| 723 | 723 | }; |
| r1404 | r1405 | |
|---|---|---|
| 65 | 65 | INPUT_PORTS_END |
| 66 | 66 | |
| 67 | 67 | |
| 68 | static struct AY8910interface ay8910_interface = | |
| 68 | static const struct AY8910interface ay8910_interface = | |
| 69 | 69 | { |
| 70 | 70 | 0, /* Input A: DSW 2 */ |
| 71 | 71 | 0, /* Input B: DSW 1 */ |
| 72 | 72 | }; |
| 73 | 73 | |
| 74 | static struct MSM5205interface msm5205_interface = | |
| 74 | static const struct MSM5205interface msm5205_interface = | |
| 75 | 75 | { |
| 76 | 76 | 0, /* IRQ handler */ |
| 77 | 77 | MSM5205_S48_4B /* 8 KHz, 4 Bits ?? */ |
| r1404 | r1405 | |
|---|---|---|
| 469 | 469 | return res; |
| 470 | 470 | } |
| 471 | 471 | |
| 472 | static struct AY8910interface ay8910_interface = | |
| 472 | static const struct AY8910interface ay8910_interface = | |
| 473 | 473 | { |
| 474 | 474 | popeye_portA_r, |
| 475 | 475 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 342 | 342 | |
| 343 | 343 | |
| 344 | 344 | |
| 345 | static struct AY8910interface ay8910_interface_1 = | |
| 345 | static const struct AY8910interface ay8910_interface_1 = | |
| 346 | 346 | { |
| 347 | 347 | p8910_0a_r, |
| 348 | 348 | 0, |
| r1404 | r1405 | |
| 350 | 350 | p8910_0b_w |
| 351 | 351 | }; |
| 352 | 352 | |
| 353 | static struct AY8910interface ay8910_interface_2 = | |
| 353 | static const struct AY8910interface ay8910_interface_2 = | |
| 354 | 354 | { |
| 355 | 355 | p8910_1a_r |
| 356 | 356 | }; |
| r1404 | r1405 | |
|---|---|---|
| 198 | 198 | cpunum_set_input_line(0,0,linestate); |
| 199 | 199 | } |
| 200 | 200 | |
| 201 | static struct YM2203interface ym2203_interface = | |
| 201 | static const struct YM2203interface ym2203_interface = | |
| 202 | 202 | { |
| 203 | 203 | 0, |
| 204 | 204 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 1342 | 1342 | |
| 1343 | 1343 | |
| 1344 | 1344 | |
| 1345 | static struct m68k_encryption_interface cps2_encryption = | |
| 1345 | static const struct m68k_encryption_interface cps2_encryption = | |
| 1346 | 1346 | { |
| 1347 | 1347 | CPS2_Read8, CPS2_Read16, CPS2_Read32, |
| 1348 | 1348 | CPS2_Read16, CPS2_Read32 |
| r1404 | r1405 | |
|---|---|---|
| 429 | 429 | cpunum_set_input_line(1, 0, state); |
| 430 | 430 | } |
| 431 | 431 | |
| 432 | static struct YM3812interface lordgun_ym3812_interface = | |
| 432 | static const struct YM3812interface lordgun_ym3812_interface = | |
| 433 | 433 | { |
| 434 | 434 | soundirq |
| 435 | 435 | }; |
| r1404 | r1405 | |
|---|---|---|
| 264 | 264 | cpunum_set_input_line(1,0,state); |
| 265 | 265 | } |
| 266 | 266 | |
| 267 | static struct YM2151interface ym2151_interface = | |
| 267 | static const struct YM2151interface ym2151_interface = | |
| 268 | 268 | { |
| 269 | 269 | sound_irq |
| 270 | 270 | }; |
| r1404 | r1405 | |
|---|---|---|
| 423 | 423 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 424 | 424 | } |
| 425 | 425 | |
| 426 | static struct YM2203interface ym2203_interface = | |
| 426 | static const struct YM2203interface ym2203_interface = | |
| 427 | 427 | { |
| 428 | 428 | 0,0,0,0,irqhandler |
| 429 | 429 | }; |
| r1404 | r1405 | |
|---|---|---|
| 43 | 43 | { |
| 44 | 44 | int res; |
| 45 | 45 | static int cheat = 0; |
| 46 | static int bits[] = { 0xee, 0xff, 0xbb, 0xaa }; | |
| 46 | static const int bits[] = { 0xee, 0xff, 0xbb, 0xaa }; | |
| 47 | 47 | |
| 48 | 48 | res = readinputportbytag("IN1"); |
| 49 | 49 | |
| r1404 | r1405 | |
| 450 | 450 | |
| 451 | 451 | |
| 452 | 452 | |
| 453 | static struct VLM5030interface hyperspt_vlm5030_interface = | |
| 453 | static const struct VLM5030interface hyperspt_vlm5030_interface = | |
| 454 | 454 | { |
| 455 | 455 | REGION_SOUND1, /* memory region */ |
| 456 | 456 | 0 /* memory size */ |
| r1404 | r1405 | |
|---|---|---|
| 267 | 267 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, sprites16x16_layout, 0, 16 ) |
| 268 | 268 | GFXDECODE_END |
| 269 | 269 | |
| 270 | static struct CustomSound_interface tiamc1_custom_interface = | |
| 270 | static const struct CustomSound_interface tiamc1_custom_interface = | |
| 271 | 271 | { |
| 272 | 272 | tiamc1_sh_start |
| 273 | 273 | }; |
| r1404 | r1405 | |
|---|---|---|
| 1572 | 1572 | cpunum_set_input_line(1,0,linestate); |
| 1573 | 1573 | } |
| 1574 | 1574 | |
| 1575 | static struct YM3812interface ym3812_interface = | |
| 1575 | static const struct YM3812interface ym3812_interface = | |
| 1576 | 1576 | { |
| 1577 | 1577 | irqhandler |
| 1578 | 1578 | }; |
| r1404 | r1405 | |
|---|---|---|
| 602 | 602 | } |
| 603 | 603 | |
| 604 | 604 | |
| 605 | static struct YM2203interface ym2203_interface = | |
| 605 | static const struct YM2203interface ym2203_interface = | |
| 606 | 606 | { |
| 607 | 607 | input_port_0_r, |
| 608 | 608 | input_port_1_r, |
| r1404 | r1405 | |
| 611 | 611 | irqhandler |
| 612 | 612 | }; |
| 613 | 613 | |
| 614 | static struct MSM5205interface msm5205_interface = | |
| 614 | static const struct MSM5205interface msm5205_interface = | |
| 615 | 615 | { |
| 616 | 616 | 0, /* IRQ handler */ |
| 617 | 617 | MSM5205_SEX_4B |
| r1404 | r1405 | |
|---|---|---|
| 37 | 37 | static INT16 cpx,cpy; |
| 38 | 38 | |
| 39 | 39 | |
| 40 | static int instruction_length[64] = | |
| 40 | static const int instruction_length[64] = | |
| 41 | 41 | { |
| 42 | 42 | 0, 3, 2, 1, /* 0x */ |
| 43 | 43 | 0, 0,-1, 2, /* 1x */ |
| r1404 | r1405 | |
| 57 | 57 | 5, 5, 5, 5 /* Fx */ |
| 58 | 58 | }; |
| 59 | 59 | |
| 60 | static const char *instruction_name[64] = | |
| 60 | static const char *const instruction_name[64] = | |
| 61 | 61 | { |
| 62 | 62 | "undef","ORG ","WPR ","RPR ", /* 0x */ |
| 63 | 63 | "undef","undef","WPTN ","RPTN ", /* 1x */ |
| r1404 | r1405 | |
| 971 | 971 | |
| 972 | 972 | |
| 973 | 973 | |
| 974 | static struct YM2203interface sh_ym2203_interface = | |
| 974 | static const struct YM2203interface sh_ym2203_interface = | |
| 975 | 975 | { |
| 976 | 976 | input_port_3_r, |
| 977 | 977 | input_port_4_r |
| r1404 | r1405 | |
|---|---|---|
| 2463 | 2463 | cbj_snd_irqlatch = state; |
| 2464 | 2464 | } |
| 2465 | 2465 | |
| 2466 | static struct YM2151interface ym2151_interface_cbj = | |
| 2466 | static const struct YM2151interface ym2151_interface_cbj = | |
| 2467 | 2467 | { |
| 2468 | 2468 | cbj_irq_handler |
| 2469 | 2469 | }; |
| r1404 | r1405 | |
| 2474 | 2474 | K007232_set_volume(0,1,0,(v & 0x0f) * 0x11); |
| 2475 | 2475 | } |
| 2476 | 2476 | |
| 2477 | static struct K007232_interface k007232_interface = | |
| 2477 | static const struct K007232_interface k007232_interface = | |
| 2478 | 2478 | { |
| 2479 | 2479 | REGION_SOUND1, /* memory regions */ |
| 2480 | 2480 | volume_callback /* external port callback */ |
| 2481 | 2481 | }; |
| 2482 | 2482 | |
| 2483 | static struct upd7759_interface upd7759_interface = | |
| 2483 | static const struct upd7759_interface upd7759_interface = | |
| 2484 | 2484 | { |
| 2485 | 2485 | REGION_SOUND2 /* memory region */ |
| 2486 | 2486 | }; |
| r1404 | r1405 | |
| 2492 | 2492 | tmnt_decode_sample |
| 2493 | 2493 | }; |
| 2494 | 2494 | |
| 2495 | static struct K053260_interface k053260_interface = | |
| 2495 | static const struct K053260_interface k053260_interface = | |
| 2496 | 2496 | { |
| 2497 | 2497 | REGION_SOUND1 /* memory region */ |
| 2498 | 2498 | }; |
| r1404 | r1405 | |
| 2785 | 2785 | cpunum_set_input_line(1, INPUT_LINE_NMI, PULSE_LINE); |
| 2786 | 2786 | } |
| 2787 | 2787 | |
| 2788 | static struct K054539interface k054539_interface = | |
| 2788 | static const struct K054539interface k054539_interface = | |
| 2789 | 2789 | { |
| 2790 | 2790 | REGION_SOUND1, |
| 2791 | 2791 | NULL, |
| r1404 | r1405 | |
| 4247 | 4247 | /* 9 low bits of the sprite line address, which bit to pick it from. */ |
| 4248 | 4248 | /* For example, when the PROM contains 4, which applies to 4x2 sprites, */ |
| 4249 | 4249 | /* 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] = | |
| 4251 | 4251 | { |
| 4252 | 4252 | /*0(1x1) 1(2x1) 2(1x2) 3(2x2) 4(4x2) 5(2x4) 6(4x4) 7(8x8) */ |
| 4253 | 4253 | { CA3, CA3, CA3, CA3, CA3, CA3, CA3, CA3 }, /* CA3 */ |
| r1404 | r1405 | |
|---|---|---|
| 794 | 794 | * |
| 795 | 795 | *************************************/ |
| 796 | 796 | |
| 797 | static struct upd7759_interface upd7759_interface = | |
| 797 | static const struct upd7759_interface upd7759_interface = | |
| 798 | 798 | { |
| 799 | 799 | REGION_SOUND1 |
| 800 | 800 | }; |
| r1404 | r1405 | |
| 812 | 812 | update_irqs(); |
| 813 | 813 | } |
| 814 | 814 | |
| 815 | static tms34010_config tms_config = | |
| 815 | static const tms34010_config tms_config = | |
| 816 | 816 | { |
| 817 | 817 | TRUE, /* halt on reset */ |
| 818 | 818 | 0, /* the screen operated on */ |
| r1404 | r1405 | |
|---|---|---|
| 14 | 14 | - golgo13 assumes the test switch is a switch, not a button - must hold down F2 to stay in test mode |
| 15 | 15 | |
| 16 | 16 | |
| 17 | Namco System 12 - Arcade PSX Hardware | |
| 18 | ===================================== | |
| 19 | ||
| 17 | 20 | Game & software revision Company/Year CPU board Mother board Daughter board Keycus |
| 18 | 21 | ------------------------------------------------------------------------------------------------------------------------ |
| 19 | *Aerosmith - Quest for Fame (C) Namco, 2001 | |
| 20 | 22 | Aqua Rush (AQ1/VER.A1) (C) Namco, 1999 COH-700 SYSTEM12 MOTHER(C) SYSTEM12 M5F2 KC053 |
| 21 | *Attack Pla-Rail (C) Tomy/Namco, 199? | |
| 22 | 23 | Derby Quiz My Dream Horse (MDH1/VER.A2) (C) Namco, 1998 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M10X64 KC035 |
| 23 | 24 | Ehrgeiz (EG2/VER.A) (C) Square/Namco, 1998 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M4F6 KC021 |
| 24 | 25 | Ehrgeiz (EG3/VER.A) (C) Square/Namco, 1998 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M4F6 KC021 |
| 25 | 26 | Fighting Layer (FTL0/VER.A) (C) Arika/Namco, 1998 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M5F4 KC037 |
| 26 | *Fighting Spirit Biography 3 (C) Namco, 1997 | |
| 27 | 27 | Ghoul Panic (OB2/VER.A) (C) Namco/Raizing,1999 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M4F6 KC045 |
| 28 | 28 | Golgo 13 (GLG1/VER.A) (C) Raizing/Namco,1999 COH-700 SYSTEM12 MOTHER(C) SYSTEM12 M8F6 KC054 |
| 29 | 29 | Golgo 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 | |
| 30 | Kaiun Quiz (KW1/VER.A1) (C) Namco/Moss, 1999 COH-700 SYSTEM12 MOTHER(C) SYSTEM12 M10X64 KC050 | |
| 32 | 31 | Libero Grande (LG2/VER.A) (C) Namco, 1997 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M8F2F KC014 |
| 33 | 32 | Mr 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 | |
| 36 | 33 | Paca Paca Passion (PPP1/VER.A2) (C) Produce/Namco,1999 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M8F2F KC038 |
| 37 | 34 | Paca Paca Passion Special (PSP1/VER.A) (C) Produce/Namco,1999 COH-700 SYSTEM12 MOTHER(C) SYSTEM12 M5F2 KC052 |
| 38 | 35 | Paca Paca Passion 2 (PKS1/VER.A) (C) Produce/Namco,1999 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M5F2 KC046 |
| 39 | 36 | Point Blank 2 (GNB5/VER.A) (C) Namco, 1999 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M4F0 KC042 |
| 40 | 37 | Soul Calibur (SOC11/VER.A2) (C) Namco, 1998 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M5F2 KC020 |
| 41 | 38 | Soul Calibur (SOC11/VER.B) (C) Namco, 1998 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M5F2 KC020 |
| 39 | Soul Calibur (SOC11/VER.C) (C) Namco, 1998 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M5F4 KC020 | |
| 42 | 40 | Soul Calibur (SOC13/VER.B) (C) Namco, 1998 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M5F4 KC020 |
| 43 | Soul Calibur (SOC11/VER.C) (C) Namco, 1998 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M5F4 KC020 | |
| 44 | 41 | Soul 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 | |
| 42 | Super World Stadium '98 (SS81/VER.A) (C) Namco, 1998 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M4F6 KC025 | |
| 48 | 43 | Super 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 | |
| 44 | Super World Stadium 2000 (SS01/VER.A3) (C) Namco, 2000 COH-700 SYSTEM12 MOTHER(C) SYSTEM12 M5F4 KC055 | |
| 45 | Super World Stadium 2001 (SS11/VER.A2) (C) Namco, 2001 COH-716 SYSTEM12 MOTHER(C) SYSTEM12 F2M5 KC061 | |
| 53 | 46 | Tenkomori Shooting (TKM1/VER.A1) (C) Namco, 1998 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M4F6 KC036 |
| 54 | 47 | Tenkomori Shooting (TKM2/VER.A1) (C) Namco, 1998 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M4F6 KC036 |
| 55 | 48 | Tekken 3 (TET1/VER.E1) (C) Namco, 1996 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M8F2F KC006 |
| r1404 | r1405 | |
| 58 | 51 | Tekken 3 (TET3/VER.B) (C) Namco, 1996 COH-700 SYSTEM12 MOTHER SYSTEM12 M8F2F KC006 |
| 59 | 52 | Tekken Tag Tournament (TEG3/VER.B) (C) Namco, 1999 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M8F4 KC044 |
| 60 | 53 | Tekken 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 | |
| 54 | Toukon Retsuden 3 (TR1/VER.A) (C) Namco, 1997 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M8F2F KC019 | |
| 64 | 55 | |
| 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 :-) | |
| 68 | 56 | |
| 57 | Wanted Games | |
| 58 | ------------ | |
| 59 | Aerosmith - Quest for Fame (C) Namco, 2001 | |
| 60 | http://www.bandainamcogames.co.jp/aa/am/vg/questforfame/ | |
| 61 | ||
| 62 | Attack Pla-Rail (C) Tomy/Namco, 199? | |
| 63 | Possibly some kind of redemption game for kids | |
| 64 | ||
| 65 | Kart Duel (C) Namco, 2000 | |
| 66 | http://www.bandainamcogames.co.jp/aa/am/vg/kartduel/ | |
| 67 | ||
| 68 | Oh Bakyuuun (C) Namco/Raizing,1999 | |
| 69 | http://www.8ing.net/prd/ohbakyun/index.html | |
| 70 | ||
| 71 | Soul Calibur Ver.B (C) Namco, 199? | |
| 72 | Probably doesn't exist | |
| 73 | ||
| 74 | Submarines (C) Namco, 199? | |
| 75 | http://www.arcadeflyers.com/?page=thumbs&db=videodb&id=5531 | |
| 76 | This was cancelled, only the flyer exists. | |
| 77 | It was shown only at an amusement show. Possibly a prototype still exists. Possibly not. | |
| 78 | ||
| 79 | Techno Drive (C) Namco, 1998 | |
| 80 | http://www.bandainamcogames.co.jp/aa/am/em/techno-drive/main/index.php | |
| 81 | ||
| 82 | Tekno Werk (C) Namco, 1999 | |
| 83 | Some kind of music game similar to Konami's Keyboard Mania series | |
| 84 | ||
| 85 | Truck Kyosokyoku (C) Namco, 2000 | |
| 86 | http://www.bandainamcogames.co.jp/aa/am/vg/truckkyosokyoku/ | |
| 87 | ||
| 88 | Um Jammer Lammy (C) Namco, 1999 | |
| 89 | http://www.bandainamcogames.co.jp/aa/am/vg/umjammerlammy/#nbgiWrapper | |
| 90 | ||
| 91 | If you can help with the remaining undumped S12 games, please contact me at http://www.mameworld.net/gurudumps/ | |
| 92 | Note that this list above may not be 100% complete. Alternative versions are also welcome :-) | |
| 93 | ||
| 69 | 94 | The Namco System 12 system comprises 3 mandatory PCB's.... |
| 70 | 95 | MOTHER PCB - This is the main PCB. It holds all sound circuitry, sound ROMs, program ROMs, shared RAM, bank-switching |
| 71 | 96 | logic, controller/input logic (including sound CPU) and some video output circuitry. |
| r1404 | r1405 | |
| 73 | 98 | some of the PALs are different and it has the capability to use 1x TSOP56 ROM in the program location, |
| 74 | 99 | instead of the regular TSOP40/48 ROMs. The first 2 revisions appear to be identical. |
| 75 | 100 | CPU PCB - All games use the exact same PCB. Contains main CPU/RAM and GPU/Video RAM |
| 76 | ROM PCB - There are | |
| 101 | ROM PCB - There are nine | |
| 77 | 102 | number of ROMs used. Most have a PAL and a CPLD known as a 'KEYCUS'. Some also have an additional CPLD for |
| 78 | 103 | protection. |
| 79 | 104 | |
| r1404 | r1405 | |
| 110 | 135 | PCB is wired for 1x 32M TSOP56 FlashROM (replaces 2E & 2J) and 2x 16M TSOP48 FlashROMs (replaces 2R/2P/2N/2L). |
| 111 | 136 | One other difference is that the motherboard has a serial number sticker on it and the program ROMs also contain |
| 112 | 137 | that same serial number, so all the games running on the Rev. C mother board have serialised ROMs. I'm not sure why, |
| 113 | they're not exactly _easily_ tracable and no one cares either way ;-) | |
| 138 | they're not exactly _easily_ traceable and no one cares either way ;-) | |
| 114 | 139 | |--------------------------------------------------------------| |
| 115 | 140 | |-| SOUND.11S |--------------| AT28C16 | |
| 116 | 141 | | |--------------| | |
| r1404 | r1405 | |
| 192 | 217 | D6345 : NEC uPD6345 Serial 8-bit Shift Register IC (SOIC16) |
| 193 | 218 | |
| 194 | 219 | PRG.2L/PRG.2P: Main program ROMs, Intel 28F016S5 2M x8 FLASHROM (both TSOP40) |
| 220 | or Fujitsu 29F016A 2M x8 FLASHROM (both TSOP48) | |
| 195 | 221 | These ROMs are populated on the following games.... |
| 196 | 222 | |
| 197 | 223 | Test Mode S/W |
| r1404 | r1405 | |
| 202 | 228 | Ehrgeiz EG3 Ver.A EG3/VER.A MOTHER(B) |
| 203 | 229 | Golgo 13 GLG1 Ver.A GLG1/VER.A MOTHER(C) (ROMs serialised) |
| 204 | 230 | 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) | |
| 205 | 232 | Libero Grande LG2 Ver.A LG2/VER.A MOTHER(B) |
| 206 | 233 | Mr Driller DRI1 Ver.A DRI1/VER.A2 MOTHER(C) (ROMs serialised) |
| 207 | 234 | Paca Paca Passion PPP1 Ver.A PPP1/VER.A2 MOTHER(B) |
| r1404 | r1405 | |
| 211 | 238 | Soul Calibur SOC1 Ver.A SOC11/VER.A2 MOTHER(B) |
| 212 | 239 | Soul Calibur SOC3 Ver.B SOC13/VER.B MOTHER(B) |
| 213 | 240 | 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) | |
| 214 | 243 | Tekken Tag Tournament TEG3 Ver.B TEG3/VER.B MOTHER(B) |
| 215 | 244 | Tekken Tag Tournament TEG3 Ver.B TEG3/VER.C1 MOTHER(B) |
| 216 | 245 | |
| r1404 | r1405 | |
| 233 | 262 | Ghoul Panic OB2 Ver.A OB2/VER.A MOTHER(B) |
| 234 | 263 | Soul Calibur SOC1 Ver.B SOC11/VER.B MOTHER(B) |
| 235 | 264 | 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) | |
| 236 | 266 | Super World Stadium '99 SS91 Ver.A SS91/VER.A3 MOTHER(B) |
| 237 | 267 | Tekken 3 TET1 Ver.A TET1/VER.E1 MOTHER(B) |
| 238 | 268 | Tekken 3 TET2 Ver.A TET2/VER.A MOTHER |
| r1404 | r1405 | |
| 254 | 284 | PAL and a KEYCUS (which is a PLCC CPLD) and in some cases an extra TQFP CPLD. |
| 255 | 285 | The PCBs are named with a special coding. First a letter M, denoting MASKROM (always SOP44), then a number denoting how |
| 256 | 286 | many ROMs of that type, then another letter F, denoting FLASHROM (always TSOP40/48/56), then a number denoting how many |
| 257 | ROMs of that type. | |
| 287 | ROMs of that type. That number is always the maximum amount of that ROM type that can be used on the PCB. The actual number | |
| 288 | of ROMs populated on the PCB can be less. | |
| 258 | 289 | |
| 259 | 290 | ******** |
| 260 | 291 | *Type 1* |
| r1404 | r1405 | |
| 281 | 312 | |----------|----|----| |----------|----| |
| 282 | 313 | |
| 283 | 314 | 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) | |
| 285 | 316 | ROM0x: 64M SOP44 MASKROM (size fixed at 64M, no configure options) |
| 286 | 317 | IC3 : MACH211 CPLD (PLCC44, labelled 'KEYCUS' and stamped with 'KC' & a 3-digit number which is different per game.) |
| 287 | 318 | IC4 : PALCE 16V8H (PLCC20, PCB labelled 'A_DECO', chip stamped 'A DECO') |
| r1404 | r1405 | |
| 320 | 351 | (i.e no FlashROMs) (note these ROMs contains the same data as) |
| 321 | 352 | (the ones used on System 11 Point Blank 2) |
| 322 | 353 | |
| 354 | Super World SS81/VER.A SYSTEM 12 M4F6 PCB 8661960901 (8661970901) KC025 SS81 WAVE0, SS81 WAVE1 | |
| 355 | Stadium '98 SS81 FL1U, SS81 FL1L, SS81 FL2U | |
| 356 | SS81 FL2L, SS81 FL3U, SS81 FL3L | |
| 357 | ||
| 323 | 358 | ******** |
| 324 | 359 | *Type 2* |
| 325 | 360 | ******** |
| r1404 | r1405 | |
| 428 | 463 | SS91 FL4L, SS91 FL4H |
| 429 | 464 | SS91 FL3L, SS91 FL3H |
| 430 | 465 | |
| 466 | Super World SS01/VER.A3 SYSTEM 12 M5F4 PCB 8661961200 (8661971200) KC055 SS01 WAVE0, SS01 WAVE1 | |
| 467 | Stadium 2000 SS01 ROM0, SS01 ROM1, SS01 ROM2 | |
| 468 | SS01 FL3L, SS01 FL3H | |
| 469 | ||
| 431 | 470 | Soul Calibur SOC13/VER.B SYSTEM 12 M5F4 PCB 8661961200 (8661971200) KC020 SOC1 WAVE0 |
| 432 | 471 | SOC1 ROM0, SOC1 ROM1, SOC1 ROM2 |
| 433 | 472 | SOC1 FL4L, SOC1 FL4H |
| r1404 | r1405 | |
| 512 | 551 | LG1 ROM0U, LG1 ROM0L |
| 513 | 552 | LG1 FL3L, LG1 FL3U |
| 514 | 553 | |
| 554 | Toukon TR1/VER.A SYSTEM 12 M8F2F PCB 8661960301 (8661970301) KC019 TR1 WAVE0, TR1 WAVE1 R4, R7 | |
| 555 | Retsuden 3 TR1 ROM0U, TR1 ROM0L | |
| 515 | 556 | |
| 516 | 557 | ******** |
| 517 | 558 | *Type 5* |
| r1404 | r1405 | |
| 621 | 662 | ******** |
| 622 | 663 | *Type 7* |
| 623 | 664 | ******** |
| 624 | SYSTEM 12 M10X64 PCB | |
| 665 | SYSTEM 12 M10X64 PCB 8661961500 (8661971500) | |
| 625 | 666 | |----------------------------------------------------------| |
| 626 | 667 | |WAVE0 | |
| 627 | | ROM0L ROM0U ROM2L ROM3L ROM4L | | |
| 668 | | ROM3L ROM3U ROM2L ROM2U ROM1L ROM0L | | |
| 669 | | IC4 | | |
| 670 | | ROM1U ROM0U | | |
| 628 | 671 | | | |
| 629 | | ROM1L ROM1U ROM2U ROM3U ROM4U | | |
| 630 | | | | |
| 631 | 672 | |WAVE1 | |
| 632 | 673 | | KEYCUS |-------------------| | |
| 633 | 674 | | |-------------------| | |
| 634 | 675 | |----------------------------------------------------------| |
| 635 | 676 | Notes: |
| 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 | |----------|----|----| | |
| 641 | 685 | |
| 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') | |
| 645 | 690 | |
| 646 | 691 | This PCB is used on: |
| 647 | 692 | |
| 648 | 693 | Software |
| 649 | 694 | Game Revision PCB KEYCUS ROMs Populated |
| 650 | 695 | ----------------------------------------------------------------------------------------------------------- |
| 651 | Derby Quiz My MDH1/VER.A2 SYSTEM 12 M10X64 PCB | |
| 696 | Derby Quiz My MDH1/VER.A2 SYSTEM 12 M10X64 PCB 8661961500 (8661971500) KC035 MDH1 WAVE0 | |
| 652 | 697 | Dream Horse MDH1 ROM0L, MDH1 ROM1L |
| 653 | 698 | MDH1 ROM2L, MDH1 ROM0U |
| 654 | 699 | MDH1 ROM1U, MDH1 ROM2U |
| 655 | 700 | |
| 701 | Kaiun 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 | ||
| 656 | 706 | ******** |
| 657 | 707 | *Type 8* |
| 658 | 708 | ******** |
| r1404 | r1405 | |
| 694 | 744 | ROM1-1, ROM2, ROM2-1 |
| 695 | 745 | FL3, FL4 |
| 696 | 746 | |
| 747 | ******** | |
| 748 | *Type 9* | |
| 749 | ******** | |
| 750 | SYSTEM 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 | |----------------------------------------------------------| | |
| 761 | Notes: | |
| 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') | |
| 697 | 767 | |
| 768 | This PCB is used on: | |
| 769 | ||
| 770 | Software | |
| 771 | Game Revision PCB KEYCUS ROMs Populated | |
| 772 | ------------------------------------------------------------------------------------------------------------------- | |
| 773 | Super World SS11/VER.A2 SYSTEM 12 F2M5 PCB 8661962600 (8661972600) KC061 SS01 WAVE0, SS01 WAVE1 | |
| 774 | Stadium 2001 SS01 ROM0, SS01 ROM1, SS01 ROM2 | |
| 775 | SS11FL1L, SS11FL1U | |
| 776 | ||
| 777 | ||
| 698 | 778 | CPU PCB |
| 699 | 779 | ------- |
| 700 | COH-700 GP-15 | |
| 780 | ||
| 781 | There are 2 known types (so far). Type 1 is the most common. | |
| 782 | ||
| 783 | Type 1 | |
| 784 | ------ | |
| 785 | COH-700 GP-15 (manufactured by Sony) | |
| 701 | 786 | |-------------------------------------------| |
| 702 | 787 | | 74F74 74ALS08 | |
| 703 | 788 | | | |
| r1404 | r1405 | |
| 727 | 812 | CXD8661R : Sony CXD8661R R3000A-based CPU (QFP208) |
| 728 | 813 | MC44200FT : Motorola MC44200FT Triple 8-bit Video DAC (QFP44) |
| 729 | 814 | |
| 815 | Type 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) | |
| 730 | 826 | |
| 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 | ||
| 731 | 833 | NETWORK PCB |
| 732 | 834 | ----------- |
| 733 | 835 | SYSTEM12 HSC PCB 8661960601 (8661970601) |
| r1404 | r1405 | |
| 838 | 940 | va_start( v, s_fmt ); |
| 839 | 941 | vsprintf( buf, s_fmt, v ); |
| 840 | 942 | 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 | } | |
| 842 | 951 | } |
| 843 | 952 | } |
| 844 | 953 | |
| r1404 | r1405 | |
| 931 | 1040 | |
| 932 | 1041 | static void namcos12_rom_read( UINT32 n_address, INT32 n_size ) |
| 933 | 1042 | { |
| 934 | INT32 n_left; | |
| 1043 | int n_region; | |
| 1044 | int n_offset; | |
| 1045 | ||
| 1046 | INT32 n_ramleft; | |
| 1047 | INT32 n_romleft; | |
| 1048 | ||
| 935 | 1049 | UINT32 *p_n_src; |
| 936 | 1050 | UINT32 *p_n_dst; |
| 937 | 1051 | |
| 938 | verboselog( 1, "namcos12_rom_read( %08x, %08x )\n", n_address, n_size ); | |
| 939 | ||
| 940 | 1052 | if( ( m_n_dmaoffset >= 0x80000000 ) || ( m_n_dmabias == 0x1f300000 ) ) |
| 941 | 1053 | { |
| 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 ); | |
| 943 | 1057 | } |
| 944 | 1058 | else if( m_n_tektagdmaoffset >= 0x00000000 && m_n_tektagdmaoffset <= 0x03800000 ) |
| 945 | 1059 | { |
| 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 ); | |
| 947 | 1063 | } |
| 948 | 1064 | else if( m_n_tektagdmaoffset >= 0x04000000 && m_n_tektagdmaoffset <= 0x04400000 ) |
| 949 | 1065 | { |
| 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 ); | |
| 951 | 1069 | } |
| 952 | 1070 | else |
| 953 | 1071 | { |
| 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 ); | |
| 955 | 1075 | } |
| 956 | 1076 | |
| 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 | } | |
| 957 | 1084 | |
| 958 | 1085 | 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 ) | |
| 962 | 1088 | { |
| 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; | |
| 964 | 1091 | } |
| 1092 | ||
| 965 | 1093 | while( n_size > 0 ) |
| 966 | 1094 | { |
| 967 | 1095 | *( p_n_dst++ ) = *( p_n_src++ ); |
| r1404 | r1405 | |
| 1131 | 1259 | strcmp( machine->gamedrv->name, "tenkomoj" ) == 0 || |
| 1132 | 1260 | strcmp( machine->gamedrv->name, "tenkomor" ) == 0 || |
| 1133 | 1261 | strcmp( machine->gamedrv->name, "ptblank2" ) == 0 || |
| 1262 | strcmp( machine->gamedrv->name, "sws2000" ) == 0 || | |
| 1263 | strcmp( machine->gamedrv->name, "sws2001" ) == 0 || | |
| 1134 | 1264 | strcmp( machine->gamedrv->name, "ghlpanic" ) == 0 ) |
| 1135 | 1265 | { |
| 1136 | 1266 | /* this is based on guesswork, it might not even be keycus. */ |
| r1404 | r1405 | |
| 1192 | 1322 | { |
| 1193 | 1323 | UINT8 ret = 0; |
| 1194 | 1324 | 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 }; | |
| 1196 | 1326 | |
| 1197 | 1327 | mame_get_current_datetime(Machine, &systime); |
| 1198 | 1328 | |
| r1404 | r1405 | |
| 1328 | 1458 | AM_RANGE(H8_ADC_3_H, H8_ADC_3_L) AM_NOP |
| 1329 | 1459 | ADDRESS_MAP_END |
| 1330 | 1460 | |
| 1331 | static struct C352interface c352_interface = | |
| 1461 | static const struct C352interface c352_interface = | |
| 1332 | 1462 | { |
| 1333 | 1463 | REGION_SOUND1 |
| 1334 | 1464 | }; |
| r1404 | r1405 | |
| 1666 | 1796 | ROM_LOAD( "ob1wave.ic2", 0x000000, 0x800000, CRC(e7bc7202) SHA1(f0f598304866ebe62642eaac6b7d8709baa14fe1) ) |
| 1667 | 1797 | ROM_END |
| 1668 | 1798 | |
| 1799 | ROM_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) ) | |
| 1817 | ROM_END | |
| 1818 | ||
| 1669 | 1819 | ROM_START( lbgrande ) |
| 1670 | 1820 | ROM_REGION32_LE( 0x00400000, REGION_USER1, 0 ) /* main prg */ |
| 1671 | 1821 | ROM_LOAD16_BYTE( "lg2vera.2l", 0x0000000, 0x200000, CRC(5ed6b152) SHA1(fdab457862bd6e0a3178c9329bd0978b6aa3ae2f) ) |
| r1404 | r1405 | |
| 1889 | 2039 | ROM_LOAD( "soc1wave0.2", 0x0000000, 0x800000, CRC(c100618d) SHA1(b87f88ee42ad9c5affa674e5f816d902143fed99) ) |
| 1890 | 2040 | ROM_END |
| 1891 | 2041 | |
| 2042 | ROM_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) ) | |
| 2061 | ROM_END | |
| 2062 | ||
| 1892 | 2063 | ROM_START( sws99 ) |
| 1893 | 2064 | ROM_REGION32_LE( 0x00400000, REGION_USER1, 0 ) /* main prg */ |
| 1894 | 2065 | ROM_LOAD16_BYTE( "ss91vera.2e", 0x0000000, 0x200000, CRC(4dd928d7) SHA1(d76c0f52d1a2cd101a6879e6ff57ed1c52b5e228) ) |
| r1404 | r1405 | |
| 1911 | 2082 | ROM_LOAD( "ss91wave1.1", 0x0800000, 0x800000, CRC(5f4c8861) SHA1(baee7182c32bc064d805de5a16948faf78941ac4) ) |
| 1912 | 2083 | ROM_END |
| 1913 | 2084 | |
| 2085 | ROM_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) ) | |
| 2103 | ROM_END | |
| 2104 | ||
| 2105 | ROM_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) ) | |
| 2123 | ROM_END | |
| 2124 | ||
| 1914 | 2125 | ROM_START( tekken3 ) |
| 1915 | 2126 | ROM_REGION32_LE( 0x00400000, REGION_USER1, 0 ) /* main prg */ |
| 1916 | 2127 | ROM_LOAD16_BYTE( "tet1vere.2e", 0x0000000, 0x200000, CRC(8b01113b) SHA1(45fdfd58293641ed16bc59c633a85a9cf64ccbaf) ) |
| r1404 | r1405 | |
| 2149 | 2360 | ROM_LOAD( "tkm1wave1.1", 0x0800000, 0x800000, CRC(7567796b) SHA1(99e4b867477da2ccddfa9bebc4be84adc5cba53c) ) |
| 2150 | 2361 | ROM_END |
| 2151 | 2362 | |
| 2363 | ROM_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) ) | |
| 2378 | ROM_END | |
| 2379 | ||
| 2152 | 2380 | GAME( 1996, tekken3, 0, coh700, namcos12, namcos12, ROT0, "Namco", "Tekken 3 (TET1/VER.E1)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC006 */ |
| 2153 | 2381 | GAME( 1996, tekken3a, tekken3, coh700, namcos12, namcos12, ROT0, "Namco", "Tekken 3 (TET2/VER.B)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC006 */ |
| 2154 | 2382 | GAME( 1996, tekken3b, tekken3, coh700, namcos12, namcos12, ROT0, "Namco", "Tekken 3 (TET3/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC006 */ |
| 2155 | 2383 | GAME( 1996, tekken3c, tekken3, coh700, namcos12, namcos12, ROT0, "Namco", "Tekken 3 (TET2/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC006 */ |
| 2156 | 2384 | GAME( 1997, lbgrande, 0, coh700, namcos12, namcos12, ROT0, "Namco", "Libero Grande (LG2/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC006 */ |
| 2385 | GAME( 1997, toukon3, 0, coh700, namcos12, namcos12, ROT0, "Tomy/Namco", "Shin Nihon Pro Wrestling Toukon Retsuden 3 Arcade Edition (TR1/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC019 */ | |
| 2157 | 2386 | GAME( 1998, soulclbr, 0, coh700, namcos12, namcos12, ROT0, "Namco", "Soul Calibur (SOC14/VER.C)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) |
| 2158 | 2387 | GAME( 1998, soulclba, soulclbr, coh700, namcos12, namcos12, ROT0, "Namco", "Soul Calibur (SOC11/VER.C)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) /* KC020 */ |
| 2159 | 2388 | GAME( 1998, soulclbb, soulclbr, coh700, namcos12, namcos12, ROT0, "Namco", "Soul Calibur (SOC13/VER.B)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) /* KC020 */ |
| r1404 | r1405 | |
| 2161 | 2390 | GAME( 1998, soulclbd, soulclbr, coh700, namcos12, namcos12, ROT0, "Namco", "Soul Calibur (SOC11/VER.A2)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) /* KC020 */ |
| 2162 | 2391 | GAME( 1998, ehrgeiz, 0, coh700, namcos12, namcos12, ROT0, "Square/Namco", "Ehrgeiz (EG3/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC021 */ |
| 2163 | 2392 | GAME( 1998, ehrgeiza, ehrgeiz, coh700, namcos12, namcos12, ROT0, "Square/Namco", "Ehrgeiz (EG2/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC021 */ |
| 2393 | GAME( 1999, kaiunqz, 0, coh700, namcos12, namcos12, ROT0, "Namco", "Kaiun Quiz (KW1/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* KC050 */ | |
| 2164 | 2394 | GAME( 1998, mdhorse, 0, coh700, namcos12, namcos12, ROT0, "Namco", "Derby Quiz My Dream Horse (MDH1/VER.A2)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC035 */ |
| 2395 | GAME( 1998, sws98, 0, coh700, namcos12, namcos12, ROT0, "Namco", "Super World Stadium '98 (SS81/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC0?? */ | |
| 2165 | 2396 | GAME( 1998, tenkomor, 0, coh700, namcos12, namcos12, ROT90, "Namco", "Tenkomori Shooting (TKM2/VER.A1)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC036 */ |
| 2166 | 2397 | GAME( 1998, tenkomoj, tenkomor, coh700, namcos12, namcos12, ROT90, "Namco", "Tenkomori Shooting (TKM1/VER.A1)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC036 */ |
| 2167 | 2398 | GAME( 1998, fgtlayer, 0, coh700, namcos12, namcos12, ROT0, "Arika/Namco", "Fighting Layer (FTL0/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC037 */ |
| r1404 | r1405 | |
| 2179 | 2410 | GAME( 1999, aquarush, 0, coh700, namcos12, namcos12, ROT0, "Namco", "Aqua Rush (AQ1/VER.A1)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC053 */ |
| 2180 | 2411 | GAME( 1999, golgo13, 0, coh700, golgo13, golgo13, ROT0, "Raizing/Namco", "Golgo 13 (GLG1/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC054 */ |
| 2181 | 2412 | GAME( 1999, g13knd, 0, coh700, golgo13, golgo13, ROT0, "Raizing/Namco", "Golgo 13 Kiseki no Dandou (GLS1/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) /* KC059 */ |
| 2413 | GAME( 2000, sws2000, 0, coh700, namcos12, namcos12, ROT0, "Namco", "Super World Stadium 2000 (SS01/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* KC055 */ | |
| 2414 | GAME( 2001, sws2001, sws2000, coh700, namcos12, namcos12, ROT0, "Namco", "Super World Stadium 2001 (SS11/VER.A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* KC061 */ | |
| 2415 |
| r1404 | r1405 | |
|---|---|---|
| 1930 | 1930 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, ad2083_spritelayout, 0, 8 ) |
| 1931 | 1931 | GFXDECODE_END |
| 1932 | 1932 | |
| 1933 | static struct AY8910interface scramble_ay8910_interface_2 = | |
| 1933 | static const struct AY8910interface scramble_ay8910_interface_2 = | |
| 1934 | 1934 | { |
| 1935 | 1935 | soundlatch_r, |
| 1936 | 1936 | scramble_portB_r |
| 1937 | 1937 | }; |
| 1938 | 1938 | |
| 1939 | static struct AY8910interface sfx_ay8910_interface_1 = | |
| 1939 | static const struct AY8910interface sfx_ay8910_interface_1 = | |
| 1940 | 1940 | { |
| 1941 | 1941 | 0, |
| 1942 | 1942 | 0, |
| r1404 | r1405 | |
| 1944 | 1944 | sfx_sh_irqtrigger_w |
| 1945 | 1945 | }; |
| 1946 | 1946 | |
| 1947 | static struct AY8910interface explorer_ay8910_interface_1 = | |
| 1947 | static const struct AY8910interface explorer_ay8910_interface_1 = | |
| 1948 | 1948 | { |
| 1949 | 1949 | scramble_portB_r |
| 1950 | 1950 | }; |
| 1951 | 1951 | |
| 1952 | static struct AY8910interface explorer_ay8910_interface_2 = | |
| 1952 | static const struct AY8910interface explorer_ay8910_interface_2 = | |
| 1953 | 1953 | { |
| 1954 | 1954 | hotshock_soundlatch_r |
| 1955 | 1955 | }; |
| 1956 | 1956 | |
| 1957 | static struct AY8910interface hotshock_ay8910_interface_2 = | |
| 1957 | static const struct AY8910interface hotshock_ay8910_interface_2 = | |
| 1958 | 1958 | { |
| 1959 | 1959 | hotshock_soundlatch_r, |
| 1960 | 1960 | scramble_portB_r |
| 1961 | 1961 | }; |
| 1962 | 1962 | |
| 1963 | static struct AY8910interface scorpion_ay8910_interface_1 = | |
| 1963 | static const struct AY8910interface scorpion_ay8910_interface_1 = | |
| 1964 | 1964 | { |
| 1965 | 1965 | 0, |
| 1966 | 1966 | 0, |
| r1404 | r1405 | |
| 1968 | 1968 | scorpion_sound_cmd_w, |
| 1969 | 1969 | }; |
| 1970 | 1970 | |
| 1971 | static struct AY8910interface triplep_ay8910_interface = | |
| 1971 | static const struct AY8910interface triplep_ay8910_interface = | |
| 1972 | 1972 | { |
| 1973 | 1973 | 0 |
| 1974 | 1974 | }; |
| 1975 | 1975 | |
| 1976 | static struct TMS5110interface tms5110_interface = | |
| 1976 | static const struct TMS5110interface tms5110_interface = | |
| 1977 | 1977 | { |
| 1978 | 1978 | 0, /* irq callback function */ |
| 1979 | 1979 | ad2083_speech_rom_read_bit /* M0 callback function. Called whenever chip requests a single bit of data */ |
| r1404 | r1405 | |
| 2169 | 2169 | AM_RANGE(0x80, 0x80) AM_WRITE(AY8910_control_port_0_w) |
| 2170 | 2170 | ADDRESS_MAP_END |
| 2171 | 2171 | |
| 2172 | static struct AY8910interface frogger_ay8910_interface = | |
| 2172 | static const struct AY8910interface frogger_ay8910_interface = | |
| 2173 | 2173 | { |
| 2174 | 2174 | soundlatch_r, |
| 2175 | 2175 | frogger_portB_r |
| r1404 | r1405 | |
|---|---|---|
| 184 | 184 | cpunum_set_input_line(1, INPUT_LINE_NMI, PULSE_LINE); |
| 185 | 185 | } |
| 186 | 186 | |
| 187 | static struct MSM5205interface shdancbl_msm5205_interface = | |
| 187 | static const struct MSM5205interface shdancbl_msm5205_interface = | |
| 188 | 188 | { |
| 189 | 189 | shdancbl_msm5205_callback, |
| 190 | 190 | MSM5205_S48_4B |
| r1404 | r1405 | |
|---|---|---|
| 349 | 349 | // cpunum_set_input_line(2,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 350 | 350 | } |
| 351 | 351 | |
| 352 | static struct YM3526interface ym3526_interface = | |
| 352 | static const struct YM3526interface ym3526_interface = | |
| 353 | 353 | { |
| 354 | 354 | irqhandler |
| 355 | 355 | }; |
| r1404 | r1405 | |
|---|---|---|
| 271 | 271 | 8*8*2 |
| 272 | 272 | }; |
| 273 | 273 | |
| 274 | static struct AY8910interface ay8910_interface = | |
| 274 | static const struct AY8910interface ay8910_interface = | |
| 275 | 275 | { |
| 276 | 276 | soundlatch_r, |
| 277 | 277 | soundlatch_r |
| r1404 | r1405 | |
|---|---|---|
| 213 | 213 | |
| 214 | 214 | static READ16_HANDLER( ddealer_mcu_r ) |
| 215 | 215 | { |
| 216 | static int resp[] = | |
| 216 | static const int resp[] = | |
| 217 | 217 | { |
| 218 | 218 | 0x93, 0xc7, 0x00, 0x8000, |
| 219 | 219 | 0x2d, 0x6d, 0x00, 0x8000, |
| r1404 | r1405 | |
|---|---|---|
| 357 | 357 | * |
| 358 | 358 | *************************************/ |
| 359 | 359 | |
| 360 | static struct POKEYinterface pokey_interface_1 = | |
| 360 | static const struct POKEYinterface pokey_interface_1 = | |
| 361 | 361 | { |
| 362 | 362 | { 0 }, |
| 363 | 363 | input_port_3_r |
| 364 | 364 | }; |
| 365 | 365 | |
| 366 | 366 | |
| 367 | static struct POKEYinterface pokey_interface_2 = | |
| 367 | static const struct POKEYinterface pokey_interface_2 = | |
| 368 | 368 | { |
| 369 | 369 | { 0 }, |
| 370 | 370 | input_port_2_r |
| r1404 | r1405 | |
|---|---|---|
| 772 | 772 | |
| 773 | 773 | |
| 774 | 774 | |
| 775 | static struct AY8910interface ay8910_interface_1 = | |
| 775 | static const struct AY8910interface ay8910_interface_1 = | |
| 776 | 776 | { |
| 777 | 777 | 0, |
| 778 | 778 | 0, |
| r1404 | r1405 | |
| 780 | 780 | tehkanwc_portB_w |
| 781 | 781 | }; |
| 782 | 782 | |
| 783 | static struct AY8910interface ay8910_interface_2 = | |
| 783 | static const struct AY8910interface ay8910_interface_2 = | |
| 784 | 784 | { |
| 785 | 785 | tehkanwc_portA_r, |
| 786 | 786 | tehkanwc_portB_r |
| 787 | 787 | }; |
| 788 | 788 | |
| 789 | static struct MSM5205interface msm5205_interface = | |
| 789 | static const struct MSM5205interface msm5205_interface = | |
| 790 | 790 | { |
| 791 | 791 | tehkanwc_adpcm_int, /* interrupt function */ |
| 792 | 792 | MSM5205_S48_4B /* 8KHz */ |
| r1404 | r1405 | |
|---|---|---|
| 196 | 196 | |
| 197 | 197 | |
| 198 | 198 | |
| 199 | static struct YM2203interface ym2203_interface = | |
| 199 | static const struct YM2203interface ym2203_interface = | |
| 200 | 200 | { |
| 201 | 201 | soundlatch_r, |
| 202 | 202 | soundlatch2_r, |
| r1404 | r1405 | |
|---|---|---|
| 307 | 307 | * |
| 308 | 308 | *************************************/ |
| 309 | 309 | |
| 310 | static struct AY8910interface ay8910_interface = | |
| 310 | static const struct AY8910interface ay8910_interface = | |
| 311 | 311 | { |
| 312 | 312 | sound_data_r |
| 313 | 313 | }; |
| r1404 | r1405 | |
|---|---|---|
| 507 | 507 | K007232_set_volume(1,1,0,(v & 0x0f) * 0x11); |
| 508 | 508 | } |
| 509 | 509 | |
| 510 | static struct K007232_interface k007232_interface_1 = | |
| 510 | static const struct K007232_interface k007232_interface_1 = | |
| 511 | 511 | { |
| 512 | 512 | REGION_SOUND1, |
| 513 | 513 | volume_callback0 |
| 514 | 514 | }; |
| 515 | 515 | |
| 516 | static struct K007232_interface k007232_interface_2 = | |
| 516 | static const struct K007232_interface k007232_interface_2 = | |
| 517 | 517 | { |
| 518 | 518 | REGION_SOUND2, |
| 519 | 519 | volume_callback1 |
| r1404 | r1405 | |
| 525 | 525 | cpunum_set_input_line(1, INPUT_LINE_NMI, linestate); |
| 526 | 526 | } |
| 527 | 527 | |
| 528 | static struct YM3812interface ym3812_interface = | |
| 528 | static const struct YM3812interface ym3812_interface = | |
| 529 | 529 | { |
| 530 | 530 | irqhandler |
| 531 | 531 | }; |
| r1404 | r1405 | |
|---|---|---|
| 1552 | 1552 | ***************************************************************************/ |
| 1553 | 1553 | |
| 1554 | 1554 | |
| 1555 | static struct YM2610interface sngkace_ym2610_interface = | |
| 1555 | static const struct YM2610interface sngkace_ym2610_interface = | |
| 1556 | 1556 | { |
| 1557 | 1557 | sound_irq, /* irq */ |
| 1558 | 1558 | REGION_SOUND1, /* delta_t */ |
| r1404 | r1405 | |
| 1606 | 1606 | ***************************************************************************/ |
| 1607 | 1607 | |
| 1608 | 1608 | |
| 1609 | static struct YM2610interface gunbird_ym2610_interface = | |
| 1609 | static const struct YM2610interface gunbird_ym2610_interface = | |
| 1610 | 1610 | { |
| 1611 | 1611 | sound_irq, /* irq */ |
| 1612 | 1612 | REGION_SOUND1, /* delta_t */ |
| r1404 | r1405 | |
| 1669 | 1669 | cpunum_set_input_line(1, 0, CLEAR_LINE); |
| 1670 | 1670 | } |
| 1671 | 1671 | |
| 1672 | static struct YMF278B_interface ymf278b_interface = | |
| 1672 | static const struct YMF278B_interface ymf278b_interface = | |
| 1673 | 1673 | { |
| 1674 | 1674 | REGION_SOUND1, |
| 1675 | 1675 | irqhandler |
| r1404 | r1405 | |
|---|---|---|
| 967 | 967 | } |
| 968 | 968 | } |
| 969 | 969 | |
| 970 | static SCSIConfigTable scsi_dev_table = | |
| 970 | static const SCSIConfigTable scsi_dev_table = | |
| 971 | 971 | { |
| 972 | 972 | 1, /* 1 SCSI device */ |
| 973 | 973 | { |
| r1404 | r1405 | |
| 975 | 975 | } |
| 976 | 976 | }; |
| 977 | 977 | |
| 978 | static struct LSI53C810interface scsi_intf = | |
| 978 | static const struct LSI53C810interface scsi_intf = | |
| 979 | 979 | { |
| 980 | 980 | &scsi_dev_table, /* SCSI device table */ |
| 981 | 981 | &scsi_irq_callback, |
| r1404 | r1405 | |
| 1333 | 1333 | |
| 1334 | 1334 | static int prot_data_ptr = 0; |
| 1335 | 1335 | |
| 1336 | static UINT16 vs299_prot_data[] = | |
| 1336 | static const UINT16 vs299_prot_data[] = | |
| 1337 | 1337 | { |
| 1338 | 1338 | 0xc800, 0x4a20, 0x5041, 0x4e41, 0x4920, 0x4154, 0x594c, 0x4220, |
| 1339 | 1339 | 0x4152, 0x4953, 0x204c, 0x5241, 0x4547, 0x544e, 0x4e49, 0x2041, |
| r1404 | r1405 | |
| 1350 | 1350 | 0x4149, 0x4620, 0x5f43, 0x4553, 0x4147 |
| 1351 | 1351 | }; |
| 1352 | 1352 | |
| 1353 | static UINT16 swt_prot_data[] = | |
| 1353 | static const UINT16 swt_prot_data[] = | |
| 1354 | 1354 | { |
| 1355 | 1355 | 0xffff, |
| 1356 | 1356 | 0x3d3d, 0x3d3d, 0x203d, 0x5453, 0x5241, 0x5720, 0x5241, 0x2053, |
| r1404 | r1405 | |
| 1362 | 1362 | 0x614b, 0x6f79, 0x6f6b, 0x5920, 0x6d61, 0x6d61, 0x746f, 0x0a6f, |
| 1363 | 1363 | }; |
| 1364 | 1364 | |
| 1365 | static UINT16 fvipers2_prot_data[] = | |
| 1365 | static const UINT16 fvipers2_prot_data[] = | |
| 1366 | 1366 | { |
| 1367 | 1367 | 0x2a2a, |
| 1368 | 1368 | 0x2a2a, 0x2a2a, 0x2a2a, 0x2a2a, 0x2a2a, 0x2a2a, 0x202a, 0x5b5b, |
| r1404 | r1405 | |
| 1375 | 1375 | 0x2e64, 0x2a20, 0x2a2a, 0x2a2a, 0x2a2a, 0x2a2a, 0x2a2a, 0x2a2a, |
| 1376 | 1376 | }; |
| 1377 | 1377 | |
| 1378 | static UINT16 spikeout_prot_data[] = | |
| 1378 | static const UINT16 spikeout_prot_data[] = | |
| 1379 | 1379 | { |
| 1380 | 1380 | 0x0000, |
| 1381 | 1381 | 0x4f4d, 0x4544, 0x2d4c, 0x2033, 0x7953, 0x7473, 0x6d65, 0x5020, |
| r1404 | r1405 | |
| 1386 | 1386 | 0x6465, 0x202e, 0x2020, 0x0020 |
| 1387 | 1387 | }; |
| 1388 | 1388 | |
| 1389 | static UINT16 eca_prot_data[] = | |
| 1389 | static const UINT16 eca_prot_data[] = | |
| 1390 | 1390 | { |
| 1391 | 1391 | 0x0000, |
| 1392 | 1392 | 0x2d2f, 0x202d, 0x4d45, 0x5245, 0x4547, 0x434e, 0x2059, 0x4143, |
| r1404 | r1405 | |
| 4003 | 4003 | } |
| 4004 | 4004 | } |
| 4005 | 4005 | |
| 4006 | static struct SCSPinterface scsp_interface = | |
| 4006 | static const struct SCSPinterface scsp_interface = | |
| 4007 | 4007 | { |
| 4008 | 4008 | REGION_CPU2, |
| 4009 | 4009 | 0, |
| 4010 | 4010 | scsp_irq |
| 4011 | 4011 | }; |
| 4012 | 4012 | |
| 4013 | static struct SCSPinterface scsp2_interface = | |
| 4013 | static const struct SCSPinterface scsp2_interface = | |
| 4014 | 4014 | { |
| 4015 | 4015 | REGION_SOUND3, |
| 4016 | 4016 | 0, |
| r1404 | r1405 | |
| 4042 | 4042 | model3_vblank &= 1; |
| 4043 | 4043 | } |
| 4044 | 4044 | |
| 4045 | static ppc_config model3_10 = | |
| 4045 | static const ppc_config model3_10 = | |
| 4046 | 4046 | { |
| 4047 | 4047 | PPC_MODEL_603E, /* 603e, Stretch, 1.3 */ |
| 4048 | 4048 | 0x10, /* Multiplier 1, Bus = 66MHz, Core = 66MHz */ |
| 4049 | 4049 | BUS_FREQUENCY_66MHZ |
| 4050 | 4050 | }; |
| 4051 | 4051 | |
| 4052 | static ppc_config model3_15 = | |
| 4052 | static const ppc_config model3_15 = | |
| 4053 | 4053 | { |
| 4054 | 4054 | PPC_MODEL_603E, /* 603e, Stretch, 1.3 */ |
| 4055 | 4055 | 0x15, /* Multiplier 1.5, Bus = 66MHz, Core = 100MHz */ |
| 4056 | 4056 | BUS_FREQUENCY_66MHZ |
| 4057 | 4057 | }; |
| 4058 | 4058 | |
| 4059 | static ppc_config model3_2x = | |
| 4059 | static const ppc_config model3_2x = | |
| 4060 | 4060 | { |
| 4061 | 4061 | PPC_MODEL_603R, /* 603e-PID7t, Goldeneye, 2.1 */ |
| 4062 | 4062 | 0x25, /* Multiplier 2.5, Bus = 66MHz, Core = 166MHz */ |
| r1404 | r1405 | |
|---|---|---|
| 1502 | 1502 | GFXDECODE_ENTRY( REGION_GFX1, 0x000000, tile_layout, 0x1000, 0x10 ) |
| 1503 | 1503 | GFXDECODE_END |
| 1504 | 1504 | |
| 1505 | static struct C140interface C140_interface_typeA = | |
| 1505 | static const struct C140interface C140_interface_typeA = | |
| 1506 | 1506 | { |
| 1507 | 1507 | C140_TYPE_SYSTEM21_A, |
| 1508 | 1508 | REGION_SOUND1 |
| 1509 | 1509 | }; |
| 1510 | 1510 | |
| 1511 | static struct C140interface C140_interface_typeB = | |
| 1511 | static const struct C140interface C140_interface_typeB = | |
| 1512 | 1512 | { |
| 1513 | 1513 | C140_TYPE_SYSTEM21_B, |
| 1514 | 1514 | REGION_SOUND1 |
| r1404 | r1405 | |
|---|---|---|
| 460 | 460 | cpunum_set_input_line(1, 0, level); |
| 461 | 461 | } |
| 462 | 462 | |
| 463 | static struct ics2115_interface pgm_ics2115_interface = { | |
| 463 | static const struct ics2115_interface pgm_ics2115_interface = { | |
| 464 | 464 | REGION_SOUND1, |
| 465 | 465 | sound_irq |
| 466 | 466 | }; |
| r1404 | r1405 | |
|---|---|---|
| 285 | 285 | } |
| 286 | 286 | |
| 287 | 287 | |
| 288 | static struct via6522_interface gameplan_via_0_interface = | |
| 288 | static const struct via6522_interface gameplan_via_0_interface = | |
| 289 | 289 | { |
| 290 | 290 | 0, 0, /*inputs : A/B */ |
| 291 | 291 | /*vblank*/0, 0, 0, 0, /*inputs : CA/B1,CA/B2 */ |
| r1404 | r1405 | |
| 295 | 295 | }; |
| 296 | 296 | |
| 297 | 297 | |
| 298 | static struct via6522_interface leprechn_via_0_interface = | |
| 298 | static const struct via6522_interface leprechn_via_0_interface = | |
| 299 | 299 | { |
| 300 | 300 | 0, 0, /*inputs : A/B */ |
| 301 | 301 | /*vblank*/0, 0, 0, 0, /*inputs : CA/B1,CA/B2 */ |
| r1404 | r1405 | |
| 365 | 365 | } |
| 366 | 366 | |
| 367 | 367 | |
| 368 | static struct via6522_interface via_1_interface = | |
| 368 | static const struct via6522_interface via_1_interface = | |
| 369 | 369 | { |
| 370 | 370 | io_port_r, 0, /*inputs : A/B */ |
| 371 | 371 | 0, 0, 0, 0, /*inputs : CA/B1,CA/B2 */ |
| r1404 | r1405 | |
| 406 | 406 | } |
| 407 | 407 | |
| 408 | 408 | |
| 409 | static struct via6522_interface via_2_interface = | |
| 409 | static const struct via6522_interface via_2_interface = | |
| 410 | 410 | { |
| 411 | 411 | 0, soundlatch2_r, /*inputs : A/B */ |
| 412 | 412 | 0, 0, 0, 0, /*inputs : CA/B1,CA/B2 */ |
| r1404 | r1405 | |
| 1395 | 1395 | |
| 1396 | 1396 | |
| 1397 | 1397 | |
| 1398 | static struct AY8910interface ay8910_interface = | |
| 1398 | static const struct AY8910interface ay8910_interface = | |
| 1399 | 1399 | { |
| 1400 | 1400 | input_port_6_r, |
| 1401 | 1401 | input_port_7_r, |
| r1404 | r1405 | |
|---|---|---|
| 329 | 329 | * |
| 330 | 330 | *************************************/ |
| 331 | 331 | |
| 332 | static struct YM2203interface ym2203_interface = | |
| 332 | static const struct YM2203interface ym2203_interface = | |
| 333 | 333 | { |
| 334 | 334 | ticket_dispenser_r, |
| 335 | 335 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 547 | 547 | } |
| 548 | 548 | } |
| 549 | 549 | |
| 550 | static struct MSM5205interface msm5205_interface = | |
| 550 | static const struct MSM5205interface msm5205_interface = | |
| 551 | 551 | { |
| 552 | 552 | darius_adpcm_int, /* interrupt function */ |
| 553 | 553 | MSM5205_S48_4B /* 8KHz */ |
| r1404 | r1405 | |
| 832 | 832 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 833 | 833 | } |
| 834 | 834 | |
| 835 | static struct YM2203interface ym2203_interface_1 = | |
| 835 | static const struct YM2203interface ym2203_interface_1 = | |
| 836 | 836 | { |
| 837 | 837 | 0, /* portA read */ |
| 838 | 838 | 0, |
| r1404 | r1405 | |
| 841 | 841 | irqhandler |
| 842 | 842 | }; |
| 843 | 843 | |
| 844 | static struct YM2203interface ym2203_interface_2 = | |
| 844 | static const struct YM2203interface ym2203_interface_2 = | |
| 845 | 845 | { |
| 846 | 846 | 0, /* portA read */ |
| 847 | 847 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 259 | 259 | } |
| 260 | 260 | |
| 261 | 261 | |
| 262 | static struct ide_interface ide_intf = | |
| 262 | static const struct ide_interface ide_intf = | |
| 263 | 263 | { |
| 264 | 264 | ide_interrupt |
| 265 | 265 | }; |
| r1404 | r1405 | |
| 643 | 643 | * |
| 644 | 644 | *************************************/ |
| 645 | 645 | |
| 646 | static struct mips3_config config = | |
| 646 | static const struct mips3_config config = | |
| 647 | 647 | { |
| 648 | 648 | 16384, /* code cache size */ |
| 649 | 649 | 16384 /* data cache size */ |
| r1404 | r1405 | |
|---|---|---|
| 402 | 402 | } |
| 403 | 403 | |
| 404 | 404 | extern UINT8 *st0016_charram; |
| 405 | static struct ST0016interface st0016_interface = | |
| 405 | static const struct ST0016interface st0016_interface = | |
| 406 | 406 | { |
| 407 | 407 | &st0016_charram |
| 408 | 408 | }; |
| r1404 | r1405 | |
|---|---|---|
| 159 | 159 | * |
| 160 | 160 | *************************************/ |
| 161 | 161 | |
| 162 | static struct z80_irq_daisy_chain daisy_chain[] = | |
| 162 | static const struct z80_irq_daisy_chain daisy_chain[] = | |
| 163 | 163 | { |
| 164 | 164 | { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 }, /* CTC number 0 */ |
| 165 | 165 | { 0,0,0,0,-1 } /* end mark */ |
| r1404 | r1405 | |
|---|---|---|
| 227 | 227 | GFXDECODE_END |
| 228 | 228 | |
| 229 | 229 | |
| 230 | static struct VLM5030interface sbasketb_vlm5030_interface = | |
| 230 | static const struct VLM5030interface sbasketb_vlm5030_interface = | |
| 231 | 231 | { |
| 232 | 232 | REGION_SOUND1, /* memory region */ |
| 233 | 233 | 0 /* memory size */ |
| r1404 | r1405 | |
|---|---|---|
| 357 | 357 | cpunum_set_input_line(1,1,state); /* IRQ 2 */ |
| 358 | 358 | } |
| 359 | 359 | |
| 360 | static struct YM2151interface ym2151_interface = | |
| 360 | static const struct YM2151interface ym2151_interface = | |
| 361 | 361 | { |
| 362 | 362 | sound_irq |
| 363 | 363 | }; |
| r1404 | r1405 | |
|---|---|---|
| 179 | 179 | //DAC ? communication with main cpu ? |
| 180 | 180 | } |
| 181 | 181 | |
| 182 | static struct AY8910interface ay8910_interface_1 = | |
| 182 | static const struct AY8910interface ay8910_interface_1 = | |
| 183 | 183 | { |
| 184 | 184 | soundlatch_r, |
| 185 | 185 | 0, |
| r1404 | r1405 | |
| 187 | 187 | dummy_w |
| 188 | 188 | }; |
| 189 | 189 | |
| 190 | static struct AY8910interface ay8910_interface_2 = | |
| 190 | static const struct AY8910interface ay8910_interface_2 = | |
| 191 | 191 | { |
| 192 | 192 | 0, |
| 193 | 193 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 261 | 261 | // cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 262 | 262 | } |
| 263 | 263 | |
| 264 | static struct YM2203interface ym2203_interface = | |
| 264 | static const struct YM2203interface ym2203_interface = | |
| 265 | 265 | { |
| 266 | 266 | input_port_5_r, |
| 267 | 267 | input_port_6_r, |
| r1404 | r1405 | |
|---|---|---|
| 464 | 464 | |
| 465 | 465 | |
| 466 | 466 | |
| 467 | static struct K054539interface k054539_interface = | |
| 467 | static const struct K054539interface k054539_interface = | |
| 468 | 468 | { |
| 469 | 469 | REGION_SOUND1, |
| 470 | 470 | ym_set_mixing |
| r1404 | r1405 | |
|---|---|---|
| 382 | 382 | GFXDECODE_END |
| 383 | 383 | |
| 384 | 384 | |
| 385 | static struct YM2203interface ym2203_interface = | |
| 385 | static const struct YM2203interface ym2203_interface = | |
| 386 | 386 | { |
| 387 | 387 | 0, |
| 388 | 388 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 93 | 93 | |
| 94 | 94 | static UINT16 tempbuf[8]; |
| 95 | 95 | |
| 96 | static int gfxlookup[][4]= | |
| 96 | static const int gfxlookup[][4]= | |
| 97 | 97 | { |
| 98 | 98 | { 0x0000000, 0x0000000, 512, 256 }, |
| 99 | 99 | { 0x0060000, 0x0007fa5, 512, 256 }, |
| r1404 | r1405 | |
|---|---|---|
| 274 | 274 | AM_RANGE(0x580000, 0x580001) AM_WRITE(MWA16_NOP) /* ?? */ |
| 275 | 275 | ADDRESS_MAP_END |
| 276 | 276 | |
| 277 | static struct K054539interface k054539_interface = | |
| 277 | static const struct K054539interface k054539_interface = | |
| 278 | 278 | { |
| 279 | 279 | REGION_SOUND1 |
| 280 | 280 | }; |
| r1404 | r1405 | |
| 325 | 325 | psx_irq_set(0x400); |
| 326 | 326 | } |
| 327 | 327 | |
| 328 | static SCSIConfigTable dev_table = | |
| 328 | static const SCSIConfigTable dev_table = | |
| 329 | 329 | { |
| 330 | 330 | 1, /* 1 SCSI device */ |
| 331 | 331 | { |
| r1404 | r1405 | |
| 333 | 333 | } |
| 334 | 334 | }; |
| 335 | 335 | |
| 336 | static struct AM53CF96interface scsi_intf = | |
| 336 | static const struct AM53CF96interface scsi_intf = | |
| 337 | 337 | { |
| 338 | 338 | &dev_table, /* SCSI device table */ |
| 339 | 339 | &scsi_irq, /* command completion IRQ */ |
| r1404 | r1405 | |
|---|---|---|
| 2478 | 2478 | //static struct sh2_config sh2cp_conf_slave = { 1 }; |
| 2479 | 2479 | |
| 2480 | 2480 | |
| 2481 | static struct CustomSound_interface custom_interface = | |
| 2481 | static const struct CustomSound_interface custom_interface = | |
| 2482 | 2482 | { |
| 2483 | 2483 | cps3_sh_start |
| 2484 | 2484 | }; |
| r1404 | r1405 | |
| 2497 | 2497 | cpunum_set_reg(0,SH2_VBR, 0x6000000); |
| 2498 | 2498 | } |
| 2499 | 2499 | |
| 2500 | static SCSIConfigTable dev_table = | |
| 2500 | static const SCSIConfigTable dev_table = | |
| 2501 | 2501 | { |
| 2502 | 2502 | 1, /* 1 SCSI device */ |
| 2503 | 2503 | { { SCSI_ID_1, 0, SCSI_DEVICE_CDROM } } /* SCSI ID 2, using CD 0, and it's a CD-ROM */ |
| 2504 | 2504 | }; |
| 2505 | 2505 | |
| 2506 | static struct WD33C93interface scsi_intf = | |
| 2506 | static const struct WD33C93interface scsi_intf = | |
| 2507 | 2507 | { |
| 2508 | 2508 | &dev_table, /* SCSI device table */ |
| 2509 | 2509 | NULL /* command completion IRQ */ |
| r1404 | r1405 | |
|---|---|---|
| 343 | 343 | } |
| 344 | 344 | |
| 345 | 345 | |
| 346 | static TTL74123_interface ic60_intf = | |
| 346 | static const TTL74123_interface ic60_intf = | |
| 347 | 347 | { |
| 348 | 348 | TTL74123_GROUNDED, /* the hook up type */ |
| 349 | 349 | RES_K(22), /* resistor connected to RCext */ |
| r1404 | r1405 | |
|---|---|---|
| 481 | 481 | { |
| 482 | 482 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 483 | 483 | } |
| 484 | static struct YM2610interface mcatadv_ym2610_interface = | |
| 484 | static const struct YM2610interface mcatadv_ym2610_interface = | |
| 485 | 485 | { |
| 486 | 486 | sound_irq, /* irq */ |
| 487 | 487 | REGION_SOUND1, /* delta_t */ |
| r1404 | r1405 | |
|---|---|---|
| 957 | 957 | * |
| 958 | 958 | *************************************/ |
| 959 | 959 | |
| 960 | static struct CCPUConfig config_nojmi = | |
| 960 | static const struct CCPUConfig config_nojmi = | |
| 961 | 961 | { |
| 962 | 962 | joystick_read, |
| 963 | 963 | cinemat_vector_callback, |
| 964 | 964 | 0 |
| 965 | 965 | }; |
| 966 | 966 | |
| 967 | static struct CCPUConfig config_jmi = | |
| 967 | static const struct CCPUConfig config_jmi = | |
| 968 | 968 | { |
| 969 | 969 | NULL, |
| 970 | 970 | cinemat_vector_callback, |
| r1404 | r1405 | |
|---|---|---|
| 3265 | 3265 | cpunum_set_input_line(1,0,linestate); |
| 3266 | 3266 | } |
| 3267 | 3267 | |
| 3268 | static struct YM3812interface ym3812_interface = | |
| 3268 | static const struct YM3812interface ym3812_interface = | |
| 3269 | 3269 | { |
| 3270 | 3270 | irqhandler |
| 3271 | 3271 | }; |
| 3272 | 3272 | |
| 3273 | static struct YMZ280Binterface ymz280b_interface = | |
| 3273 | static const struct YMZ280Binterface ymz280b_interface = | |
| 3274 | 3274 | { |
| 3275 | 3275 | REGION_SOUND1, |
| 3276 | 3276 | bbakraid_irqhandler |
| r1404 | r1405 | |
|---|---|---|
| 45 | 45 | INPUT_PORTS_END |
| 46 | 46 | |
| 47 | 47 | |
| 48 | static struct VR0Interface vr0_interface = | |
| 48 | static const struct VR0Interface vr0_interface = | |
| 49 | 49 | { |
| 50 | 50 | 0x04800000 |
| 51 | 51 | }; |
| r1404 | r1405 | |
|---|---|---|
| 343 | 343 | GFXDECODE_END |
| 344 | 344 | |
| 345 | 345 | |
| 346 | static struct CustomSound_interface adpcm_interface = | |
| 346 | static const struct CustomSound_interface adpcm_interface = | |
| 347 | 347 | { |
| 348 | 348 | mjkjidai_adpcm_start |
| 349 | 349 | }; |
| r1404 | r1405 | |
|---|---|---|
| 735 | 735 | |
| 736 | 736 | /* sound stuff */ |
| 737 | 737 | |
| 738 | static struct YMZ280Binterface ymz280b_intf = | |
| 738 | static const struct YMZ280Binterface ymz280b_intf = | |
| 739 | 739 | { |
| 740 | 740 | REGION_SOUND1, |
| 741 | 741 | 0 // irq ? |
| r1404 | r1405 | |
|---|---|---|
| 221 | 221 | |
| 222 | 222 | |
| 223 | 223 | |
| 224 | static struct VLM5030interface vlm5030_interface = | |
| 224 | static const struct VLM5030interface vlm5030_interface = | |
| 225 | 225 | { |
| 226 | 226 | REGION_SOUND1, /* memory region of speech rom */ |
| 227 | 227 | 0 /* memory size of speech rom */ |
| r1404 | r1405 | |
|---|---|---|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | #if 0 |
| 122 | static struct AY8910interface ay8910_interface = | |
| 122 | static const struct AY8910interface ay8910_interface = | |
| 123 | 123 | { |
| 124 | 124 | input_port_4_r, |
| 125 | 125 | }; |
| r1404 | r1405 | |
|---|---|---|
| 346 | 346 | GFXDECODE_ENTRY( REGION_GFX1, 0, tiles8x8_layout, 0, 16 ) |
| 347 | 347 | GFXDECODE_END |
| 348 | 348 | |
| 349 | static struct MSM5205interface msm5205_interface = | |
| 349 | static const struct MSM5205interface msm5205_interface = | |
| 350 | 350 | { |
| 351 | 351 | ml_msm5205_vck, /* VCK function */ |
| 352 | 352 | MSM5205_S48_4B /* 8 kHz */ |
| 353 | 353 | }; |
| 354 | 354 | |
| 355 | static struct YM2151interface ym2151_interface = | |
| 355 | static const struct YM2151interface ym2151_interface = | |
| 356 | 356 | { |
| 357 | 357 | irq_handler, |
| 358 | 358 | sound_bankswitch_w |
| r1404 | r1405 | |
|---|---|---|
| 358 | 358 | GFXDECODE_ENTRY( REGION_GFX3, 0, charlayout2, 0x60, 16 ) /* txt tilemap characters*/ |
| 359 | 359 | GFXDECODE_END |
| 360 | 360 | |
| 361 | static struct AY8910interface ay8910_interface = | |
| 361 | static const struct AY8910interface ay8910_interface = | |
| 362 | 362 | { |
| 363 | 363 | tankbust_soundlatch_r, |
| 364 | 364 | tankbust_soundtimer_r |
| r1404 | r1405 | |
|---|---|---|
| 723 | 723 | } |
| 724 | 724 | } |
| 725 | 725 | |
| 726 | static struct K007232_interface hotchase_k007232_interface_1 = | |
| 726 | static const struct K007232_interface hotchase_k007232_interface_1 = | |
| 727 | 727 | { |
| 728 | 728 | REGION_SOUND1 |
| 729 | 729 | }; |
| 730 | 730 | |
| 731 | static struct K007232_interface hotchase_k007232_interface_2 = | |
| 731 | static const struct K007232_interface hotchase_k007232_interface_2 = | |
| 732 | 732 | { |
| 733 | 733 | REGION_SOUND2 |
| 734 | 734 | }; |
| 735 | 735 | |
| 736 | static struct K007232_interface hotchase_k007232_interface_3 = | |
| 736 | static const struct K007232_interface hotchase_k007232_interface_3 = | |
| 737 | 737 | { |
| 738 | 738 | REGION_SOUND3 |
| 739 | 739 | }; |
| r1404 | r1405 | |
| 1099 | 1099 | cpunum_set_input_line(0, 5, HOLD_LINE); /* to read input ports */ |
| 1100 | 1100 | } |
| 1101 | 1101 | |
| 1102 | static struct K007232_interface wecleman_k007232_interface = | |
| 1102 | static const struct K007232_interface wecleman_k007232_interface = | |
| 1103 | 1103 | { |
| 1104 | 1104 | REGION_SOUND1 /* but the 2 channels use different ROMs !*/ |
| 1105 | 1105 | }; |
| r1404 | r1405 | |
|---|---|---|
| 191 | 191 | INPUT_PORTS_END |
| 192 | 192 | |
| 193 | 193 | |
| 194 | static struct AY8910interface ay8910_interface = | |
| 194 | static const struct AY8910interface ay8910_interface = | |
| 195 | 195 | { |
| 196 | 196 | input_port_1_r, |
| 197 | 197 | input_port_0_r |
| r1404 | r1405 | |
|---|---|---|
| 587 | 587 | } |
| 588 | 588 | |
| 589 | 589 | |
| 590 | static struct ide_interface ide_intf = | |
| 590 | static const struct ide_interface ide_intf = | |
| 591 | 591 | { |
| 592 | 592 | ide_interrupt |
| 593 | 593 | }; |
| r1404 | r1405 | |
| 614 | 614 | } |
| 615 | 615 | |
| 616 | 616 | |
| 617 | static struct smc91c9x_interface ethernet_intf = | |
| 617 | static const struct smc91c9x_interface ethernet_intf = | |
| 618 | 618 | { |
| 619 | 619 | ethernet_interrupt |
| 620 | 620 | }; |
| r1404 | r1405 | |
| 2447 | 2447 | * |
| 2448 | 2448 | *************************************/ |
| 2449 | 2449 | |
| 2450 | static struct mips3_config config = | |
| 2450 | static const struct mips3_config config = | |
| 2451 | 2451 | { |
| 2452 | 2452 | 16384, /* code cache size */ |
| 2453 | 2453 | 16384, /* data cache size */ |
| r1404 | r1405 | |
|---|---|---|
| 294 | 294 | GFXDECODE_END |
| 295 | 295 | |
| 296 | 296 | |
| 297 | static struct AY8910interface ay8910_interface = | |
| 297 | static const struct AY8910interface ay8910_interface = | |
| 298 | 298 | { |
| 299 | 299 | input_port_3_r |
| 300 | 300 | }; |
| r1404 | r1405 | |
|---|---|---|
| 302 | 302 | * |
| 303 | 303 | *************************************/ |
| 304 | 304 | |
| 305 | static tms34010_config tms_config = | |
| 305 | static const tms34010_config tms_config = | |
| 306 | 306 | { |
| 307 | 307 | FALSE, /* halt on reset */ |
| 308 | 308 | 0, /* the screen operated on */ |
| r1404 | r1405 | |
|---|---|---|
| 995 | 995 | |
| 996 | 996 | ***************************************************************************/ |
| 997 | 997 | |
| 998 | static struct YMZ280Binterface ymz280b_intf = | |
| 998 | static const struct YMZ280Binterface ymz280b_intf = | |
| 999 | 999 | { |
| 1000 | 1000 | REGION_SOUND1, |
| 1001 | 1001 | 0 // irq |
| r1404 | r1405 | |
|---|---|---|
| 234 | 234 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 235 | 235 | } |
| 236 | 236 | |
| 237 | static struct YM2203interface ym2203_interface = | |
| 237 | static const struct YM2203interface ym2203_interface = | |
| 238 | 238 | { |
| 239 | 239 | 0,0,0,0,irqhandler |
| 240 | 240 | }; |
| r1404 | r1405 | |
|---|---|---|
| 359 | 359 | - Super Stingray : 0x21,0x22,0x23,0x24,0x34,0x37,0x3a,0x3d,0x40,0x43,0x46,0x49 |
| 360 | 360 | */ |
| 361 | 361 | 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}}; | |
| 364 | 364 | |
| 365 | 365 | static int latch; |
| 366 | 366 | int source=shared_ram[offset]; |
| r1404 | r1405 | |
| 441 | 441 | - Gold Medalist : 0x21,0x23,0x24,0x5b |
| 442 | 442 | */ |
| 443 | 443 | 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}}; | |
| 446 | 446 | |
| 447 | 447 | static int latch; |
| 448 | 448 | int source=shared_ram[offset]; |
| r1404 | r1405 | |
| 537 | 537 | - Super Champion Baseball : 0x21,0x23,0x24 |
| 538 | 538 | */ |
| 539 | 539 | 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}}; | |
| 542 | 542 | |
| 543 | 543 | static int latch; |
| 544 | 544 | int source=shared_ram[offset]; |
| r1404 | r1405 | |
| 2018 | 2018 | |
| 2019 | 2019 | /******************************************************************************/ |
| 2020 | 2020 | |
| 2021 | static struct AY8910interface ay8910_interface = | |
| 2021 | static const struct AY8910interface ay8910_interface = | |
| 2022 | 2022 | { |
| 2023 | 2023 | soundlatch_r |
| 2024 | 2024 | }; |
| 2025 | 2025 | |
| 2026 | static struct YM2203interface ym2203_interface = | |
| 2026 | static const struct YM2203interface ym2203_interface = | |
| 2027 | 2027 | { |
| 2028 | 2028 | soundlatch_r |
| 2029 | 2029 | }; |
| r1404 | r1405 | |
| 2033 | 2033 | cpunum_set_input_line(1, 0, (param) ? HOLD_LINE : CLEAR_LINE); |
| 2034 | 2034 | } |
| 2035 | 2035 | |
| 2036 | static struct YM3812interface ym3812_interface = | |
| 2036 | static const struct YM3812interface ym3812_interface = | |
| 2037 | 2037 | { |
| 2038 | 2038 | YM3812_irq |
| 2039 | 2039 | }; |
| r1404 | r1405 | |
|---|---|---|
| 357 | 357 | GFXDECODE_ENTRY( REGION_GFX2, 0x1000, spritelayout2, 0, 64 ) |
| 358 | 358 | GFXDECODE_END |
| 359 | 359 | |
| 360 | static struct AY8910interface ay8910_interface = | |
| 360 | static const struct AY8910interface ay8910_interface = | |
| 361 | 361 | { |
| 362 | 362 | input_port_7_r, // DSW3 |
| 363 | 363 | input_port_8_r, // DSW4 |
| r1404 | r1405 | |
|---|---|---|
| 1798 | 1798 | } |
| 1799 | 1799 | } |
| 1800 | 1800 | |
| 1801 | static struct C352interface c352_interface = | |
| 1801 | static const struct C352interface c352_interface = | |
| 1802 | 1802 | { |
| 1803 | 1803 | REGION_SOUND1 |
| 1804 | 1804 | }; |
| r1404 | r1405 | |
|---|---|---|
| 243 | 243 | static GFXDECODE_START( speglsht ) |
| 244 | 244 | GFXDECODE_END |
| 245 | 245 | |
| 246 | static struct ST0016interface st0016_interface = | |
| 246 | static const struct ST0016interface st0016_interface = | |
| 247 | 247 | { |
| 248 | 248 | &st0016_charram |
| 249 | 249 | }; |
| r1404 | r1405 | |
| 253 | 253 | cpunum_set_input_line(1, R3000_IRQ4, ASSERT_LINE); |
| 254 | 254 | } |
| 255 | 255 | |
| 256 | static struct r3000_config config = | |
| 256 | static const struct r3000_config config = | |
| 257 | 257 | { |
| 258 | 258 | 0, |
| 259 | 259 | 4096, /* code cache size */ |
| r1404 | r1405 | |
|---|---|---|
| 708 | 708 | |
| 709 | 709 | /* Sound Interfaces */ |
| 710 | 710 | |
| 711 | static struct CustomSound_interface custom_interface = | |
| 711 | static const struct CustomSound_interface custom_interface = | |
| 712 | 712 | { |
| 713 | 713 | rockola_sh_start |
| 714 | 714 | }; |
| r1404 | r1405 | |
|---|---|---|
| 1595 | 1595 | * |
| 1596 | 1596 | *************************************/ |
| 1597 | 1597 | |
| 1598 | static struct AY8910interface centipdb_ay8910_interface = | |
| 1598 | static const struct AY8910interface centipdb_ay8910_interface = | |
| 1599 | 1599 | { |
| 1600 | 1600 | caterplr_rand_r |
| 1601 | 1601 | }; |
| 1602 | 1602 | |
| 1603 | 1603 | |
| 1604 | static struct POKEYinterface milliped_pokey_interface_1 = | |
| 1604 | static const struct POKEYinterface milliped_pokey_interface_1 = | |
| 1605 | 1605 | { |
| 1606 | 1606 | { 0 }, |
| 1607 | 1607 | input_port_4_r |
| 1608 | 1608 | }; |
| 1609 | 1609 | |
| 1610 | 1610 | |
| 1611 | static struct POKEYinterface milliped_pokey_interface_2 = | |
| 1611 | static const struct POKEYinterface milliped_pokey_interface_2 = | |
| 1612 | 1612 | { |
| 1613 | 1613 | { 0 }, |
| 1614 | 1614 | input_port_5_r |
| 1615 | 1615 | }; |
| 1616 | 1616 | |
| 1617 | 1617 | |
| 1618 | static struct POKEYinterface warlords_pokey_interface = | |
| 1618 | static const struct POKEYinterface warlords_pokey_interface = | |
| 1619 | 1619 | { |
| 1620 | 1620 | { input_port_4_r,input_port_5_r,input_port_6_r,input_port_7_r } |
| 1621 | 1621 | }; |
| r1404 | r1405 | |
|---|---|---|
| 384 | 384 | } |
| 385 | 385 | |
| 386 | 386 | |
| 387 | static struct via6522_interface via_interface = | |
| 387 | static const struct via6522_interface via_interface = | |
| 388 | 388 | { |
| 389 | 389 | /*inputs : A/B */ via_pa_r, via_pb_r, |
| 390 | 390 | /*inputs : CA/B1,CA/B2 */ 0, 0, 0, 0, |
| r1404 | r1405 | |
| 722 | 722 | * |
| 723 | 723 | *************************************/ |
| 724 | 724 | |
| 725 | static struct YM2151interface ym2151_interface = | |
| 725 | static const struct YM2151interface ym2151_interface = | |
| 726 | 726 | { |
| 727 | 727 | atarigen_ym2151_irq_gen |
| 728 | 728 | }; |
| r1404 | r1405 | |
|---|---|---|
| 951 | 951 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 952 | 952 | } |
| 953 | 953 | |
| 954 | static struct YM2610interface ym2610_interface = | |
| 954 | static const struct YM2610interface ym2610_interface = | |
| 955 | 955 | { |
| 956 | 956 | irqhandler, |
| 957 | 957 | REGION_SOUND2, /* Delta-T */ |
| r1404 | r1405 | |
|---|---|---|
| 720 | 720 | cpunum_set_input_line(1, 0, irq ? ASSERT_LINE : CLEAR_LINE); |
| 721 | 721 | } |
| 722 | 722 | |
| 723 | static struct YM2610interface ym2610_interface = | |
| 723 | static const struct YM2610interface ym2610_interface = | |
| 724 | 724 | { |
| 725 | 725 | irqhandler, |
| 726 | 726 | REGION_SOUND1, |
| r1404 | r1405 | |
|---|---|---|
| 85 | 85 | static int bgcolor=0; |
| 86 | 86 | |
| 87 | 87 | |
| 88 | static UINT8 tile_lookup[0x10]= | |
| 88 | static const UINT8 tile_lookup[0x10]= | |
| 89 | 89 | { |
| 90 | 90 | 0x00, 0x10, 0x40, 0x50, |
| 91 | 91 | 0x20, 0x30, 0x60, 0x70, |
| r1404 | r1405 | |
|---|---|---|
| 912 | 912 | cpunum_set_input_line(1,1,linestate); /* IRQ2 */ |
| 913 | 913 | } |
| 914 | 914 | |
| 915 | static struct YM3812interface ym3812_interface = | |
| 915 | static const struct YM3812interface ym3812_interface = | |
| 916 | 916 | { |
| 917 | 917 | sound_irq |
| 918 | 918 | }; |
| 919 | 919 | |
| 920 | static struct YM3812interface ym3812b_interface = | |
| 920 | static const struct YM3812interface ym3812b_interface = | |
| 921 | 921 | { |
| 922 | 922 | sound_irq2 |
| 923 | 923 | }; |
| r1404 | r1405 | |
| 1965 | 1965 | |
| 1966 | 1966 | ROM_START( secretag ) |
| 1967 | 1967 | 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) ) | |
| 1972 | 1972 | |
| 1973 | 1973 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* Sound CPU */ |
| 1974 | 1974 | ROM_LOAD( "fa10.5h", 0x00000, 0x10000, CRC(dfd2ff25) SHA1(3dcd6d50b92b49daae4b51581abe9c95f764e848) ) |
| r1404 | r1405 | |
|---|---|---|
| 30 | 30 | STA-0001 SAM-5127 93 Dyna Gears Sammy |
| 31 | 31 | STA-0001B VISCO-001B 94 Drift Out '94 Visco |
| 32 | 32 | STA-0001B GOLF ROM 94 Eagle Shot Golf Sammy |
| 33 | STA-0001B ? 94 Twin Eagle II - The Rescue Mission Seta | |
| 34 | STA-0001B VISCO 95 Mobil Suit Gundam Final Shooting (1) Banpresto | |
| 33 | STA-0001B STS0003 94 Twin Eagle II - The Rescue Mission (1) Seta | |
| 34 | STA-0001B VISCO 95 Mobil Suit Gundam Final Shooting (2) Banpresto | |
| 35 | 35 | STA-0001B P1-102A 95 Mahjong Hyper Reaction Sammy |
| 36 | 36 | ? ? 95 Ultra X Weapons / Ultra Keibitai Banpresto + Tsuburaya Prod. |
| 37 | 37 | STA-0001B VISCO-JJ1 96 Lovely Pop Mahjong JangJang Shimasho Visco |
| 38 | 38 | STA-0001B VISCO-001B 96 Storm Blade Visco |
| 39 | 39 | STA-0001B P1-105A 96? Meosis Magic Sammy |
| 40 | STA-0001B ? 97 Joryuu Syougi Kyoushitsu ( | |
| 40 | STA-0001B ? 97 Joryuu Syougi Kyoushitsu (3) Visco | |
| 41 | 41 | STA-0001B VISCO-JJ1 97 Koi Koi Shimasho 2 Visco |
| 42 | 42 | STA-0001B P1-112A 97 Mahjong Hyper Reaction 2 Sammy |
| 43 | 43 | STA-0001B ? 97 Monster Slider Visco / Datt |
| r1404 | r1405 | |
| 51 | 51 | STA-0001B SSV_SUB 01 Vasara 2 Visco |
| 52 | 52 | ----------------------------------------------------------------------------------- |
| 53 | 53 | |
| 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) | |
| 56 | 57 | |
| 57 | 58 | SSV Hardware Overview |
| 58 | 59 | Sammy/Seta/Visco, 1993-2001 |
| r1404 | r1405 | |
| 2675 | 2676 | |
| 2676 | 2677 | ***************************************************************************/ |
| 2677 | 2678 | |
| 2678 | static struct ES5506interface es5506_interface = | |
| 2679 | static const struct ES5506interface es5506_interface = | |
| 2679 | 2680 | { |
| 2680 | 2681 | REGION_SOUND1, |
| 2681 | 2682 | REGION_SOUND2, |
| r1404 | r1405 | |
| 4336 | 4337 | /*************************************************************************** |
| 4337 | 4338 | |
| 4338 | 4339 | Twin Eagle II |
| 4340 | SETA, 1994 | |
| 4339 | 4341 | |
| 4342 | STS0003 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 | ||
| 4368 | SX002-13 is GAL16V8B (undumped) | |
| 4369 | SETA ST010 is some type of MCU/Math chip? | |
| 4370 | All roms are 16M Mask roms | |
| 4371 | ||
| 4340 | 4372 | ***************************************************************************/ |
| 4341 | 4373 | |
| 4342 | 4374 | ROM_START( twineag2 ) |
| 4343 | 4375 | ROM_REGION16_LE( 0x200000, REGION_USER1, 0 ) /* V60 Code */ |
| 4344 | ROM_LOAD16_WORD( "sx002 | |
| 4376 | ROM_LOAD16_WORD( "sx002-12.u22", 0x000000, 0x200000, CRC(846044dc) SHA1(c1c85de1c466fb7c3580824baa1571cd0fed6ec6) ) | |
| 4345 | 4377 | |
| 4346 | 4378 | 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 */ | |
| 4350 | 4382 | |
| 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 */ | |
| 4354 | 4386 | |
| 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 */ | |
| 4358 | 4390 | |
| 4359 | 4391 | ROM_FILL( 0x1200000, 0x600000, 0 ) |
| 4360 | 4392 | |
| 4361 | 4393 | ROM_REGION16_BE( 0x400000, REGION_SOUND1, ROMREGION_ERASE | 0 ) /* Samples */ |
| 4362 | ROM_LOAD16_BYTE( "sx002 | |
| 4394 | ROM_LOAD16_BYTE( "sx002-10.u14", 0x000000, 0x200000, CRC(b0669dfa) SHA1(ff805f59864ac4ccee3e249c06804d844d3df59c) ) | |
| 4363 | 4395 | |
| 4364 | 4396 | ROM_REGION16_BE( 0x400000, REGION_SOUND2, ROMREGION_ERASE | 0 ) /* Samples */ |
| 4365 | ROM_LOAD16_BYTE( "sx002 | |
| 4397 | ROM_LOAD16_BYTE( "sx002-11.u7", 0x000000, 0x200000, CRC(b8dd621a) SHA1(f9b43e018f2bb121e4f4e9554419cd32b870556b) ) | |
| 4366 | 4398 | |
| 4367 | 4399 | ROM_REGION16_BE( 0x400000, REGION_SOUND3, 0 ) /* Samples */ |
| 4368 | 4400 | ROM_COPY( REGION_SOUND1, 0x000000, 0x000000, 0x400000 ) |
| r1404 | r1405 | |
|---|---|---|
| 575 | 575 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 576 | 576 | } |
| 577 | 577 | |
| 578 | static struct YM2610interface airsys_ym2610_interface = | |
| 578 | static const struct YM2610interface airsys_ym2610_interface = | |
| 579 | 579 | { |
| 580 | 580 | irqhandler, |
| 581 | 581 | REGION_SOUND2, |
| r1404 | r1405 | |
|---|---|---|
| 489 | 489 | |
| 490 | 490 | /*******************************************************************/ |
| 491 | 491 | |
| 492 | static struct namco_interface namco_interface = | |
| 492 | static const struct namco_interface namco_interface = | |
| 493 | 493 | { |
| 494 | 494 | 8, /* number of voices */ |
| 495 | 495 | -1, /* memory region */ |
| r1404 | r1405 | |
|---|---|---|
| 193 | 193 | GFXDECODE_END |
| 194 | 194 | |
| 195 | 195 | |
| 196 | static struct AY8910interface ay8910_interface = | |
| 196 | static const struct AY8910interface ay8910_interface = | |
| 197 | 197 | { |
| 198 | 198 | input_port_1_r, |
| 199 | 199 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 300 | 300 | update_mpu68_interrupts(); |
| 301 | 301 | } |
| 302 | 302 | |
| 303 | static struct acia6850_interface m6809_acia_if = | |
| 303 | static const struct acia6850_interface m6809_acia_if = | |
| 304 | 304 | { |
| 305 | 305 | MPU4_MASTER_CLOCK/44,//This isn't a real division, this is just to work around |
| 306 | 306 | MPU4_MASTER_CLOCK/44,//the ACIA code's hard coding |
| r1404 | r1405 | |
| 312 | 312 | m6809_acia_irq |
| 313 | 313 | }; |
| 314 | 314 | |
| 315 | static struct acia6850_interface m68k_acia_if = | |
| 315 | static const struct acia6850_interface m68k_acia_if = | |
| 316 | 316 | { |
| 317 | 317 | MPU4_MASTER_CLOCK/44, |
| 318 | 318 | MPU4_MASTER_CLOCK/44, |
| r1404 | r1405 | |
|---|---|---|
| 358 | 358 | cpunum_set_input_line( 1, 0 , irq ? ASSERT_LINE : CLEAR_LINE ); |
| 359 | 359 | } |
| 360 | 360 | |
| 361 | static struct YM2151interface ym2151_interface = | |
| 361 | static const struct YM2151interface ym2151_interface = | |
| 362 | 362 | { |
| 363 | 363 | irq_handler |
| 364 | 364 | }; |
| r1404 | r1405 | |
|---|---|---|
| 517 | 517 | cpunum_set_input_line(1, UPD7810_INTF2, state ? ASSERT_LINE : CLEAR_LINE); |
| 518 | 518 | } |
| 519 | 519 | |
| 520 | static struct YM2151interface ym2151_interface = | |
| 520 | static const struct YM2151interface ym2151_interface = | |
| 521 | 521 | { |
| 522 | 522 | metro_sound_irq_handler /* irq handler */ |
| 523 | 523 | }; |
| r1404 | r1405 | |
| 555 | 555 | } |
| 556 | 556 | |
| 557 | 557 | |
| 558 | static struct YMF278B_interface ymf278b_interface = | |
| 558 | static const struct YMF278B_interface ymf278b_interface = | |
| 559 | 559 | { |
| 560 | 560 | REGION_SOUND1, |
| 561 | 561 | ymf278b_interrupt |
| r1404 | r1405 | |
| 1942 | 1942 | cpunum_set_input_line(1, 0, irq ? ASSERT_LINE : CLEAR_LINE); |
| 1943 | 1943 | } |
| 1944 | 1944 | |
| 1945 | static struct YM2610interface blzntrnd_ym2610_interface = | |
| 1945 | static const struct YM2610interface blzntrnd_ym2610_interface = | |
| 1946 | 1946 | { |
| 1947 | 1947 | blzntrnd_irqhandler, |
| 1948 | 1948 | REGION_SOUND1, |
| r1404 | r1405 | |
| 3679 | 3679 | |
| 3680 | 3680 | ***************************************************************************/ |
| 3681 | 3681 | |
| 3682 | static UPD7810_CONFIG metro_cpu_config = | |
| 3682 | static const UPD7810_CONFIG metro_cpu_config = | |
| 3683 | 3683 | { |
| 3684 | 3684 | TYPE_7810, |
| 3685 | 3685 | metro_io_callback |
| r1404 | r1405 | |
|---|---|---|
| 565 | 565 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 566 | 566 | } |
| 567 | 567 | |
| 568 | static struct YM2203interface ym2203_interface = | |
| 568 | static const struct YM2203interface ym2203_interface = | |
| 569 | 569 | { |
| 570 | 570 | 0, |
| 571 | 571 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 248 | 248 | * |
| 249 | 249 | *************************************/ |
| 250 | 250 | |
| 251 | static struct namco_interface namco_interface = | |
| 251 | static const struct namco_interface namco_interface = | |
| 252 | 252 | { |
| 253 | 253 | 3, /* number of voices */ |
| 254 | 254 | REGION_SOUND1 /* memory region */ |
| r1404 | r1405 | |
|---|---|---|
| 337 | 337 | |
| 338 | 338 | /* values from offset 3, 6, and 10 must add up to 0x904752a2 */ |
| 339 | 339 | static UINT16 bit_index; |
| 340 | static UINT32 bit_data[0x10] = | |
| 340 | static const UINT32 bit_data[0x10] = | |
| 341 | 341 | { |
| 342 | 342 | 0x3017c636,0x3017c636,0x3017c636,0x3017c636, |
| 343 | 343 | 0x3017c636,0x3017c636,0x3017c636,0x3017c636, |
| r1404 | r1405 | |
| 503 | 503 | ADDRESS_MAP_END |
| 504 | 504 | |
| 505 | 505 | |
| 506 | static struct tms32031_config midvplus_config = { 0, NULL, midvplus_xf1_w }; | |
| 506 | static const struct tms32031_config midvplus_config = { 0, NULL, midvplus_xf1_w }; | |
| 507 | 507 | |
| 508 | 508 | static ADDRESS_MAP_START( midvplus_map, ADDRESS_SPACE_PROGRAM, 32 ) |
| 509 | 509 | AM_RANGE(0x000000, 0x01ffff) AM_RAM AM_BASE(&ram_base) |
| r1404 | r1405 | |
| 1388 | 1388 | } |
| 1389 | 1389 | |
| 1390 | 1390 | |
| 1391 | static struct ide_interface ide_intf = | |
| 1391 | static const struct ide_interface ide_intf = | |
| 1392 | 1392 | { |
| 1393 | 1393 | 0 |
| 1394 | 1394 | }; |
| r1404 | r1405 | |
|---|---|---|
| 264 | 264 | AM_RANGE(H8_ADC_0_L, H8_ADC_3_H) AM_NOP // MCU reads these, but the games have no analog controls |
| 265 | 265 | ADDRESS_MAP_END |
| 266 | 266 | |
| 267 | static struct C352interface c352_interface = | |
| 267 | static const struct C352interface c352_interface = | |
| 268 | 268 | { |
| 269 | 269 | REGION_SOUND1 |
| 270 | 270 | }; |
| r1404 | r1405 | |
|---|---|---|
| 138 | 138 | |
| 139 | 139 | static READ16_HANDLER( opwolf_in_r ) |
| 140 | 140 | { |
| 141 | static const char *inname[2] = { "IN0", "IN1" }; | |
| 141 | static const char *const inname[2] = { "IN0", "IN1" }; | |
| 142 | 142 | return readinputportbytag(inname[offset]); |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | static READ16_HANDLER( opwolf_dsw_r ) |
| 146 | 146 | { |
| 147 | static const char *dswname[2] = { "DSWA", "DSWB" }; | |
| 147 | static const char *const dswname[2] = { "DSWA", "DSWB" }; | |
| 148 | 148 | return readinputportbytag(dswname[offset]); |
| 149 | 149 | } |
| 150 | 150 | |
| r1404 | r1405 | |
| 542 | 542 | } |
| 543 | 543 | |
| 544 | 544 | |
| 545 | static struct YM2151interface ym2151_interface = | |
| 545 | static const struct YM2151interface ym2151_interface = | |
| 546 | 546 | { |
| 547 | 547 | irq_handler, |
| 548 | 548 | sound_bankswitch_w |
| 549 | 549 | }; |
| 550 | 550 | |
| 551 | 551 | |
| 552 | static struct MSM5205interface msm5205_interface = | |
| 552 | static const struct MSM5205interface msm5205_interface = | |
| 553 | 553 | { |
| 554 | 554 | opwolf_msm5205_vck, /* VCK function */ |
| 555 | 555 | MSM5205_S48_4B /* 8 kHz */ |
| r1404 | r1405 | |
|---|---|---|
| 226 | 226 | cpunum_set_input_line(0,KONAMI_FIRQ_LINE,linestate); |
| 227 | 227 | } |
| 228 | 228 | |
| 229 | static struct YM2151interface ym2151_interface = | |
| 229 | static const struct YM2151interface ym2151_interface = | |
| 230 | 230 | { |
| 231 | 231 | irqhandler |
| 232 | 232 | }; |
| r1404 | r1405 | |
|---|---|---|
| 1011 | 1011 | cpunum_set_input_line(1, INPUT_LINE_IRQ0, state); |
| 1012 | 1012 | } |
| 1013 | 1013 | |
| 1014 | static struct YM3526interface bestbest_ym3526_interface = | |
| 1014 | static const struct YM3526interface bestbest_ym3526_interface = | |
| 1015 | 1015 | { |
| 1016 | 1016 | bestbest_ym3526_irqhandler |
| 1017 | 1017 | }; |
| r1404 | r1405 | |
| 1021 | 1021 | // ? |
| 1022 | 1022 | } |
| 1023 | 1023 | |
| 1024 | static struct AY8910interface bestbest_ay8910_interface = | |
| 1024 | static const struct AY8910interface bestbest_ay8910_interface = | |
| 1025 | 1025 | { |
| 1026 | 1026 | 0, 0, |
| 1027 | 1027 | bestbest_ay8910_port_a_w, 0 |
| r1404 | r1405 | |
|---|---|---|
| 91 | 91 | if (data & 1) /* DAC enable */ |
| 92 | 92 | { |
| 93 | 93 | /* 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 }; | |
| 95 | 95 | DAC_signed_data_w(0,table[(data & 0x06) >> 1]); |
| 96 | 96 | } |
| 97 | 97 | else |
| r1404 | r1405 | |
| 641 | 641 | GFXDECODE_END |
| 642 | 642 | |
| 643 | 643 | |
| 644 | static struct AY8910interface ay8910_interface = | |
| 644 | static const struct AY8910interface ay8910_interface = | |
| 645 | 645 | { |
| 646 | 646 | 0, |
| 647 | 647 | soundlatch2_r, |
| r1404 | r1405 | |
| 649 | 649 | 0 |
| 650 | 650 | }; |
| 651 | 651 | |
| 652 | static struct TMS5220interface tms5220_interface = | |
| 652 | static const struct TMS5220interface tms5220_interface = | |
| 653 | 653 | { |
| 654 | 654 | tms5220_irq_handler /* IRQ handler */ |
| 655 | 655 | }; |
| r1404 | r1405 | |
|---|---|---|
| 536 | 536 | cpunum_set_input_line( 1, 0, irq ? ASSERT_LINE : CLEAR_LINE ); |
| 537 | 537 | } |
| 538 | 538 | |
| 539 | static struct YM2151interface ym2151_interface = | |
| 539 | static const struct YM2151interface ym2151_interface = | |
| 540 | 540 | { |
| 541 | 541 | irq_handler |
| 542 | 542 | }; |
| r1404 | r1405 | |
|---|---|---|
| 580 | 580 | } |
| 581 | 581 | } |
| 582 | 582 | |
| 583 | static struct AY8910interface ay8910_interface = | |
| 583 | static const struct AY8910interface ay8910_interface = | |
| 584 | 584 | { |
| 585 | 585 | keyboard1_r, |
| 586 | 586 | keyboard2_r, |
| r1404 | r1405 | |
|---|---|---|
| 46 | 46 | #include "includes/attckufo.h" |
| 47 | 47 | |
| 48 | 48 | |
| 49 | static struct CustomSound_interface attckufo_sound_interface = | |
| 49 | static const struct CustomSound_interface attckufo_sound_interface = | |
| 50 | 50 | { |
| 51 | 51 | attckufo_custom_start |
| 52 | 52 | }; |
| r1404 | r1405 | |
|---|---|---|
| 1339 | 1339 | } |
| 1340 | 1340 | } |
| 1341 | 1341 | |
| 1342 | static int cab_data[2] = { 0x0, 0x8 }; | |
| 1343 | static int kbm_cab_data[2] = { 0x2, 0x8 }; | |
| 1344 | static int ppd_cab_data[2] = { 0x1, 0x9 }; | |
| 1342 | static const int cab_data[2] = { 0x0, 0x8 }; | |
| 1343 | static const int kbm_cab_data[2] = { 0x2, 0x8 }; | |
| 1344 | static const int ppd_cab_data[2] = { 0x1, 0x9 }; | |
| 1345 | 1345 | static int cab_data_ptr = 0; |
| 1346 | static int * cur_cab_data = cab_data; | |
| 1346 | static const int * cur_cab_data = cab_data; | |
| 1347 | 1347 | |
| 1348 | 1348 | static READ32_HANDLER( cabinet_r ) |
| 1349 | 1349 | { |
| r1404 | r1405 | |
| 1783 | 1783 | { |
| 1784 | 1784 | } |
| 1785 | 1785 | |
| 1786 | static struct YMZ280Binterface ymz280b_intf = | |
| 1786 | static const struct YMZ280Binterface ymz280b_intf = | |
| 1787 | 1787 | { |
| 1788 | 1788 | REGION_SOUND1, |
| 1789 | 1789 | sound_irq_callback, // irq |
| r1404 | r1405 | |
| 1974 | 1974 | cdda_set_cdrom(0, cd); |
| 1975 | 1975 | } |
| 1976 | 1976 | |
| 1977 | static ppc_config firebeat_ppc_cfg = | |
| 1977 | static const ppc_config firebeat_ppc_cfg = | |
| 1978 | 1978 | { |
| 1979 | 1979 | PPC_MODEL_403GCX |
| 1980 | 1980 | }; |
| r1404 | r1405 | |
|---|---|---|
| 468 | 468 | } |
| 469 | 469 | |
| 470 | 470 | |
| 471 | static struct MSM5232interface msm5232_interface = | |
| 471 | static const struct MSM5232interface msm5232_interface = | |
| 472 | 472 | { |
| 473 | 473 | { 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 */ |
| 474 | 474 | }; |
| r1404 | r1405 | |
|---|---|---|
| 547 | 547 | |
| 548 | 548 | |
| 549 | 549 | |
| 550 | static struct AY8910interface ay8910_interface = | |
| 550 | static const struct AY8910interface ay8910_interface = | |
| 551 | 551 | { |
| 552 | 552 | input_port_0_r, |
| 553 | 553 | input_port_1_r, |
| 554 | 554 | }; |
| 555 | 555 | |
| 556 | static struct TMS5110interface tms5110_interface = | |
| 556 | static const struct TMS5110interface tms5110_interface = | |
| 557 | 557 | { |
| 558 | 558 | 0, /*irq callback function*/ |
| 559 | 559 | bagman_speech_rom_read_bit /*M0 callback function. Called whenever chip requests a single bit of data*/ |
| r1404 | r1405 | |
|---|---|---|
| 700 | 700 | { |
| 701 | 701 | UINT8 ret = 0; |
| 702 | 702 | 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 }; | |
| 704 | 704 | |
| 705 | 705 | mame_get_current_datetime(Machine, &systime); |
| 706 | 706 | |
| r1404 | r1405 | |
| 837 | 837 | GFXDECODE_ENTRY( 0, 0, namcos23_cg_layout, 0, 0x80 ) |
| 838 | 838 | GFXDECODE_END |
| 839 | 839 | |
| 840 | static struct mips3_config config = | |
| 840 | static const struct mips3_config config = | |
| 841 | 841 | { |
| 842 | 842 | 8192, /* code cache size - VERIFIED */ |
| 843 | 843 | 8192 /* data cache size - VERIFIED */ |
| r1404 | r1405 | |
| 847 | 847 | { |
| 848 | 848 | } |
| 849 | 849 | |
| 850 | static struct C352interface c352_interface = | |
| 850 | static const struct C352interface c352_interface = | |
| 851 | 851 | { |
| 852 | 852 | REGION_SOUND1 |
| 853 | 853 | }; |
| r1404 | r1405 | |
|---|---|---|
| 381 | 381 | cpunum_set_input_line(1, 0, irq ? ASSERT_LINE : CLEAR_LINE); |
| 382 | 382 | } |
| 383 | 383 | |
| 384 | static struct YM2610interface ym2610_interface = | |
| 384 | static const struct YM2610interface ym2610_interface = | |
| 385 | 385 | { |
| 386 | 386 | irqhandler, |
| 387 | 387 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 144 | 144 | INPUT_PORTS_END |
| 145 | 145 | |
| 146 | 146 | |
| 147 | static gfx_layout charlayout = | |
| 147 | static const gfx_layout charlayout = | |
| 148 | 148 | { |
| 149 | 149 | 8,8, |
| 150 | 150 | RGN_FRAC(1,1), |
| r1404 | r1405 | |
|---|---|---|
| 298 | 298 | |
| 299 | 299 | static WRITE16_HANDLER( bankselect_w ) |
| 300 | 300 | { |
| 301 | static int bankoffset[64] = | |
| 301 | static const int bankoffset[64] = | |
| 302 | 302 | { |
| 303 | 303 | 0x28000, 0x20000, 0x18000, 0x10000, |
| 304 | 304 | 0x2a000, 0x22000, 0x1a000, 0x12000, |
| r1404 | r1405 | |
| 1268 | 1268 | * |
| 1269 | 1269 | *************************************/ |
| 1270 | 1270 | |
| 1271 | static struct POKEYinterface pokey_interface_1 = | |
| 1271 | static const struct POKEYinterface pokey_interface_1 = | |
| 1272 | 1272 | { |
| 1273 | 1273 | { 0 }, |
| 1274 | 1274 | input_port_11_r |
| 1275 | 1275 | }; |
| 1276 | 1276 | |
| 1277 | static struct POKEYinterface pokey_interface_2 = | |
| 1277 | static const struct POKEYinterface pokey_interface_2 = | |
| 1278 | 1278 | { |
| 1279 | 1279 | { 0 }, |
| 1280 | 1280 | input_port_12_r |
| r1404 | r1405 | |
| 1288 | 1288 | * |
| 1289 | 1289 | *************************************/ |
| 1290 | 1290 | |
| 1291 | static struct t11_setup t11_data = | |
| 1291 | static const struct t11_setup t11_data = | |
| 1292 | 1292 | { |
| 1293 | 1293 | 0x36ff /* initial mode word has DAL15,14,11,8 pulled low */ |
| 1294 | 1294 | }; |
| r1404 | r1405 | |
|---|---|---|
| 296 | 296 | |
| 297 | 297 | /****************************************************************************/ |
| 298 | 298 | |
| 299 | static struct AY8910interface ay8910_interface = | |
| 299 | static const struct AY8910interface ay8910_interface = | |
| 300 | 300 | { |
| 301 | 301 | input_port_0_r, |
| 302 | 302 | input_port_1_r |
| r1404 | r1405 | |
|---|---|---|
| 462 | 462 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 463 | 463 | } |
| 464 | 464 | |
| 465 | static struct YM2203interface ym2203_interface = | |
| 465 | static const struct YM2203interface ym2203_interface = | |
| 466 | 466 | { |
| 467 | 467 | 0,0,0,0,irqhandler |
| 468 | 468 | }; |
| r1404 | r1405 | |
|---|---|---|
| 100 | 100 | * |
| 101 | 101 | *************************************/ |
| 102 | 102 | |
| 103 | static UINT16 colortable_source[] = | |
| 103 | static const UINT16 colortable_source[] = | |
| 104 | 104 | { |
| 105 | 105 | 0x02, 0x00, |
| 106 | 106 | 0x02, 0x01, |
| r1404 | r1405 | |
|---|---|---|
| 516 | 516 | cpunum_set_input_line(1, INPUT_LINE_NMI, PULSE_LINE); |
| 517 | 517 | } |
| 518 | 518 | |
| 519 | static struct MSM5205interface yunsung8_msm5205_interface = | |
| 519 | static const struct MSM5205interface yunsung8_msm5205_interface = | |
| 520 | 520 | { |
| 521 | 521 | yunsung8_adpcm_int, /* interrupt function */ |
| 522 | 522 | MSM5205_S96_4B /* 4KHz, 4 Bits */ |
| r1404 | r1405 | |
|---|---|---|
| 818 | 818 | GFXDECODE_END |
| 819 | 819 | |
| 820 | 820 | |
| 821 | static struct CustomSound_interface geebee_custom_interface = | |
| 821 | static const struct CustomSound_interface geebee_custom_interface = | |
| 822 | 822 | { |
| 823 | 823 | geebee_sh_start |
| 824 | 824 | }; |
| 825 | 825 | |
| 826 | static struct CustomSound_interface warpwarp_custom_interface = | |
| 826 | static const struct CustomSound_interface warpwarp_custom_interface = | |
| 827 | 827 | { |
| 828 | 828 | warpwarp_sh_start |
| 829 | 829 | }; |
| r1404 | r1405 | |
|---|---|---|
| 257 | 257 | * |
| 258 | 258 | *************************************/ |
| 259 | 259 | |
| 260 | static struct CustomSound_interface amiga_custom_interface = | |
| 260 | static const struct CustomSound_interface amiga_custom_interface = | |
| 261 | 261 | { |
| 262 | 262 | amiga_sh_start |
| 263 | 263 | }; |
| r1404 | r1405 | |
|---|---|---|
| 335 | 335 | cpunum_set_input_line(1,1,state); /* IRQ 2 */ |
| 336 | 336 | } |
| 337 | 337 | |
| 338 | static struct YM2151interface ym2151_interface = | |
| 338 | static const struct YM2151interface ym2151_interface = | |
| 339 | 339 | { |
| 340 | 340 | sound_irq |
| 341 | 341 | }; |
| r1404 | r1405 | |
|---|---|---|
| 661 | 661 | Machine Drivers |
| 662 | 662 | ***************************************************************************/ |
| 663 | 663 | |
| 664 | static struct AY8910interface dunhuang_ay8910_interface = | |
| 664 | static const struct AY8910interface dunhuang_ay8910_interface = | |
| 665 | 665 | { |
| 666 | 666 | // A B |
| 667 | 667 | 0, dunhuang_dsw_r, // R |
| r1404 | r1405 | |
|---|---|---|
| 255 | 255 | cpunum_set_input_line(1,0,linestate); |
| 256 | 256 | } |
| 257 | 257 | |
| 258 | static struct YM3812interface ym3812_interface = | |
| 258 | static const struct YM3812interface ym3812_interface = | |
| 259 | 259 | { |
| 260 | 260 | irqhandler /* IRQ Line */ |
| 261 | 261 | }; |
| r1404 | r1405 | |
|---|---|---|
| 924 | 924 | GFXDECODE_END |
| 925 | 925 | |
| 926 | 926 | |
| 927 | static struct AY8910interface ojankohs_ay8910_interface = | |
| 927 | static const struct AY8910interface ojankohs_ay8910_interface = | |
| 928 | 928 | { |
| 929 | 929 | ojankohs_ay8910_0_r, /* read port #0 */ |
| 930 | 930 | ojankohs_ay8910_1_r /* read port #1 */ |
| 931 | 931 | }; |
| 932 | 932 | |
| 933 | static struct AY8910interface ojankoy_ay8910_interface = | |
| 933 | static const struct AY8910interface ojankoy_ay8910_interface = | |
| 934 | 934 | { |
| 935 | 935 | ojankoy_ay8910_0_r, /* read port #0 */ |
| 936 | 936 | ojankoy_ay8910_1_r, /* read port #1 */ |
| 937 | 937 | }; |
| 938 | 938 | |
| 939 | static struct AY8910interface ojankoc_ay8910_interface = | |
| 939 | static const struct AY8910interface ojankoc_ay8910_interface = | |
| 940 | 940 | { |
| 941 | 941 | input_port_0_r, /* read port #0 */ |
| 942 | 942 | input_port_1_r /* read port #1 */ |
| 943 | 943 | }; |
| 944 | 944 | |
| 945 | static struct MSM5205interface msm5205_interface = | |
| 945 | static const struct MSM5205interface msm5205_interface = | |
| 946 | 946 | { |
| 947 | 947 | ojankohs_adpcm_int, /* IRQ handler */ |
| 948 | 948 | MSM5205_S48_4B /* 8 KHz */ |
| r1404 | r1405 | |
|---|---|---|
| 206 | 206 | |
| 207 | 207 | |
| 208 | 208 | |
| 209 | static struct AY8910interface ay8910_interface_1 = | |
| 209 | static const struct AY8910interface ay8910_interface_1 = | |
| 210 | 210 | { |
| 211 | 211 | input_port_0_r, |
| 212 | 212 | input_port_1_r |
| 213 | 213 | }; |
| 214 | 214 | |
| 215 | static struct AY8910interface ay8910_interface_2 = | |
| 215 | static const struct AY8910interface ay8910_interface_2 = | |
| 216 | 216 | { |
| 217 | 217 | input_port_2_r, |
| 218 | 218 | input_port_3_r |
| r1404 | r1405 | |
|---|---|---|
| 3013 | 3013 | |
| 3014 | 3014 | |
| 3015 | 3015 | |
| 3016 | static struct AY8910interface ay8910_interface = | |
| 3016 | static const struct AY8910interface ay8910_interface = | |
| 3017 | 3017 | { |
| 3018 | 3018 | input_port_0_r, // DIPSW-A read |
| 3019 | 3019 | input_port_1_r // DIPSW-B read |
| r1404 | r1405 | |
|---|---|---|
| 363 | 363 | cpunum_set_input_line(2, INPUT_LINE_NMI, irq ? ASSERT_LINE : CLEAR_LINE); |
| 364 | 364 | } |
| 365 | 365 | |
| 366 | static struct YM2203interface ym2203_interface = | |
| 366 | static const struct YM2203interface ym2203_interface = | |
| 367 | 367 | { |
| 368 | 368 | 0,0,0,0,irqhandler |
| 369 | 369 | }; |
| r1404 | r1405 | |
| 381 | 381 | |
| 382 | 382 | } |
| 383 | 383 | |
| 384 | static struct MSM5205interface msm5205_interface = | |
| 384 | static const struct MSM5205interface msm5205_interface = | |
| 385 | 385 | { |
| 386 | 386 | adpcm_int, /* interrupt function */ |
| 387 | 387 | MSM5205_S96_4B /* 4KHz 4-bit */ |
| r1404 | r1405 | |
|---|---|---|
| 280 | 280 | |
| 281 | 281 | |
| 282 | 282 | |
| 283 | static struct AY8910interface ay8910_interface_1 = | |
| 283 | static const struct AY8910interface ay8910_interface_1 = | |
| 284 | 284 | { |
| 285 | 285 | input_port_0_r, |
| 286 | 286 | input_port_1_r |
| 287 | 287 | }; |
| 288 | 288 | |
| 289 | static struct AY8910interface ay8910_interface_2 = | |
| 289 | static const struct AY8910interface ay8910_interface_2 = | |
| 290 | 290 | { |
| 291 | 291 | input_port_2_r, |
| 292 | 292 | input_port_3_r |
| r1404 | r1405 | |
|---|---|---|
| 416 | 416 | cpunum_set_input_line(1,M6809_FIRQ_LINE,irq ? ASSERT_LINE : CLEAR_LINE); |
| 417 | 417 | } |
| 418 | 418 | |
| 419 | static struct YM3812interface ym3812_interface = | |
| 419 | static const struct YM3812interface ym3812_interface = | |
| 420 | 420 | { |
| 421 | 421 | irq_handler |
| 422 | 422 | }; |
| 423 | 423 | |
| 424 | static struct MSM5205interface msm5205_interface = | |
| 424 | static const struct MSM5205interface msm5205_interface = | |
| 425 | 425 | { |
| 426 | 426 | spd_adpcm_int, /* interrupt function */ |
| 427 | 427 | MSM5205_S48_4B /* 8kHz? */ |
| r1404 | r1405 | |
|---|---|---|
| 219 | 219 | else return 0; |
| 220 | 220 | } |
| 221 | 221 | |
| 222 | static struct TMS5110interface tms5110_interface = | |
| 222 | static const struct TMS5110interface tms5110_interface = | |
| 223 | 223 | { |
| 224 | 224 | 0, /*irq callback function*/ |
| 225 | 225 | cvs_speech_rom_read_bit /*M0 callback function. Called whenever chip requests a single bit of data*/ |
| r1404 | r1405 | |
|---|---|---|
| 1340 | 1340 | |
| 1341 | 1341 | ***************************************************************************/ |
| 1342 | 1342 | |
| 1343 | static struct x1_010_interface seta_sound_intf = | |
| 1343 | static const struct x1_010_interface seta_sound_intf = | |
| 1344 | 1344 | { |
| 1345 | 1345 | 0x0000, /* address */ |
| 1346 | 1346 | }; |
| 1347 | static struct x1_010_interface seta_sound_intf2 = | |
| 1347 | static const struct x1_010_interface seta_sound_intf2 = | |
| 1348 | 1348 | { |
| 1349 | 1349 | 0x1000, /* address */ |
| 1350 | 1350 | }; |
| r1404 | r1405 | |
| 1354 | 1354 | cpunum_set_input_line(1, INPUT_LINE_NMI, linestate); |
| 1355 | 1355 | } |
| 1356 | 1356 | |
| 1357 | static struct YM3438interface utoukond_ym3438_intf = | |
| 1357 | static const struct YM3438interface utoukond_ym3438_intf = | |
| 1358 | 1358 | { |
| 1359 | 1359 | utoukond_ym3438_interrupt // IRQ handler |
| 1360 | 1360 | }; |
| r1404 | r1405 | |
| 6378 | 6378 | Thundercade |
| 6379 | 6379 | ***************************************************************************/ |
| 6380 | 6380 | |
| 6381 | static struct YM2203interface tndrcade_ym2203_interface = | |
| 6381 | static const struct YM2203interface tndrcade_ym2203_interface = | |
| 6382 | 6382 | { |
| 6383 | 6383 | dsw1_r, /* input A: DSW 1 */ |
| 6384 | 6384 | dsw2_r /* input B: DSW 2 */ |
| r1404 | r1405 | |
| 9000 | 9000 | memcpy(temp,&src[i],16); |
| 9001 | 9001 | for (j = 0;j < 16;j++) |
| 9002 | 9002 | { |
| 9003 | static int convtable[16] = | |
| 9003 | static const int convtable[16] = | |
| 9004 | 9004 | { |
| 9005 | 9005 | 0x0, 0x1, 0x8, 0x9, |
| 9006 | 9006 | 0x2, 0x3, 0xa, 0xb, |
| r1404 | r1405 | |
|---|---|---|
| 651 | 651 | /*irqs : A/B */ zaccaria_irq0a, zaccaria_irq0b |
| 652 | 652 | }; |
| 653 | 653 | |
| 654 | static struct AY8910interface ay8910_interface = | |
| 654 | static const struct AY8910interface ay8910_interface = | |
| 655 | 655 | { |
| 656 | 656 | 0, |
| 657 | 657 | soundlatch_r, |
| r1404 | r1405 | |
|---|---|---|
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | |
| 227 | static struct via6522_interface via_0_interface = | |
| 227 | static const struct via6522_interface via_0_interface = | |
| 228 | 228 | { |
| 229 | 229 | /*inputs : A/B */ input_port_0_r, input_port_1_r, |
| 230 | 230 | /*inputs : CA/B1,CA/B2 */ NULL, NULL, NULL, NULL, |
| r1404 | r1405 | |
| 233 | 233 | /*irq */ NULL |
| 234 | 234 | }; |
| 235 | 235 | |
| 236 | static struct via6522_interface via_1_interface = | |
| 236 | static const struct via6522_interface via_1_interface = | |
| 237 | 237 | { |
| 238 | 238 | /*inputs : A/B */ input_port_2_r, input_port_3_r, |
| 239 | 239 | /*inputs : CA/B1,CA/B2 */ NULL, NULL, NULL, NULL, |
| r1404 | r1405 | |
| 242 | 242 | /*irq */ via_irq |
| 243 | 243 | }; |
| 244 | 244 | |
| 245 | static struct via6522_interface via_2_interface = | |
| 245 | static const struct via6522_interface via_2_interface = | |
| 246 | 246 | { |
| 247 | 247 | /*inputs : A/B */ NULL, trvquest_vblank_r, |
| 248 | 248 | /*inputs : CA/B1,CA/B2 */ NULL, NULL, NULL, NULL, |
| r1404 | r1405 | |
|---|---|---|
| 12 | 12 | |
| 13 | 13 | static READ16_HANDLER( ssf2ghw_dsw_r ) |
| 14 | 14 | { |
| 15 | static const char *dswname[3] = { "DSWA", "DSWB", "DSWC" }; | |
| 15 | static const char *const dswname[3] = { "DSWA", "DSWB", "DSWC" }; | |
| 16 | 16 | return readinputportbytag(dswname[offset]); |
| 17 | 17 | } |
| 18 | 18 |
| r1404 | r1405 | |
|---|---|---|
| 1246 | 1246 | GFXDECODE_END |
| 1247 | 1247 | |
| 1248 | 1248 | |
| 1249 | static struct YM2203interface ym2203_interface = | |
| 1249 | static const struct YM2203interface ym2203_interface = | |
| 1250 | 1250 | { |
| 1251 | 1251 | input_port_0_r, /* DSW1 connected to port A */ |
| 1252 | 1252 | input_port_1_r /* DSW2 connected to port B */ |
| r1404 | r1405 | |
| 1259 | 1259 | cpunum_set_input_line(2, INPUT_LINE_NMI, irq ? ASSERT_LINE : CLEAR_LINE); |
| 1260 | 1260 | } |
| 1261 | 1261 | |
| 1262 | static struct YM2203interface kageki_ym2203_interface = | |
| 1262 | static const struct YM2203interface kageki_ym2203_interface = | |
| 1263 | 1263 | { |
| 1264 | 1264 | kageki_csport_r, |
| 1265 | 1265 | 0, |
| r1404 | r1405 | |
| 1267 | 1267 | kageki_csport_w |
| 1268 | 1268 | }; |
| 1269 | 1269 | |
| 1270 | static struct YM2203interface ym2203b_interface = | |
| 1270 | static const struct YM2203interface ym2203b_interface = | |
| 1271 | 1271 | { |
| 1272 | 1272 | 0,0,0,0, |
| 1273 | 1273 | irqhandler |
| 1274 | 1274 | }; |
| 1275 | 1275 | |
| 1276 | static struct YM2203interface kabukiz_ym2203_interface = | |
| 1276 | static const struct YM2203interface kabukiz_ym2203_interface = | |
| 1277 | 1277 | { |
| 1278 | 1278 | 0,0,kabukiz_sound_bank_w,kabukiz_sample_w, |
| 1279 | 1279 | irqhandler |
| r1404 | r1405 | |
|---|---|---|
| 803 | 803 | OKIM6295_set_bank_base(1, ((data & 2)>>1) * 0x40000); |
| 804 | 804 | } |
| 805 | 805 | |
| 806 | static struct YM2151interface ym2151_interface = | |
| 806 | static const struct YM2151interface ym2151_interface = | |
| 807 | 807 | { |
| 808 | 808 | sound_irq, |
| 809 | 809 | sound_bankswitch_w |
| r1404 | r1405 | |
|---|---|---|
| 391 | 391 | cpunum_set_input_line( 1, 0 , irq ? ASSERT_LINE : CLEAR_LINE ); |
| 392 | 392 | } |
| 393 | 393 | |
| 394 | static struct YM2151interface ym2151_interface = | |
| 394 | static const struct YM2151interface ym2151_interface = | |
| 395 | 395 | { |
| 396 | 396 | vball_irq_handler |
| 397 | 397 | }; |
| r1404 | r1405 | |
|---|---|---|
| 657 | 657 | AM_RANGE(0xfff1, 0xfff3) AM_WRITE(MWA8_NOP) |
| 658 | 658 | ADDRESS_MAP_END |
| 659 | 659 | |
| 660 | static struct K054539interface k054539_interface = | |
| 660 | static const struct K054539interface k054539_interface = | |
| 661 | 661 | { |
| 662 | 662 | REGION_SOUND1 |
| 663 | 663 | }; |
| r1404 | r1405 | |
|---|---|---|
| 1071 | 1071 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 1072 | 1072 | } |
| 1073 | 1073 | |
| 1074 | static struct YM2151interface afega_ym2151_intf = | |
| 1074 | static const struct YM2151interface afega_ym2151_intf = | |
| 1075 | 1075 | { |
| 1076 | 1076 | irq_handler |
| 1077 | 1077 | }; |
| r1404 | r1405 | |
|---|---|---|
| 443 | 443 | |
| 444 | 444 | #define CPU_CLOCK 200000000 |
| 445 | 445 | /* MD2 MD1 MD0 MD6 MD4 MD3 MD5 MD7 MD8 */ |
| 446 | static struct sh4_config sh4cpu_config = { 1, 0, 1, 0, 0, 0, 1, 1, 0, CPU_CLOCK }; | |
| 446 | static const struct sh4_config sh4cpu_config = { 1, 0, 1, 0, 0, 0, 1, 1, 0, CPU_CLOCK }; | |
| 447 | 447 | |
| 448 | 448 | static UINT64 *dc_sound_ram; |
| 449 | 449 |
| r1404 | r1405 | |
|---|---|---|
| 2088 | 2088 | |
| 2089 | 2089 | /******************************************************************************/ |
| 2090 | 2090 | |
| 2091 | static struct AY8910interface ay8910_interface_1 = | |
| 2091 | static const struct AY8910interface ay8910_interface_1 = | |
| 2092 | 2092 | { |
| 2093 | 2093 | nemesis_portA_r |
| 2094 | 2094 | }; |
| 2095 | 2095 | |
| 2096 | static struct AY8910interface ay8910_interface_2 = | |
| 2096 | static const struct AY8910interface ay8910_interface_2 = | |
| 2097 | 2097 | { |
| 2098 | 2098 | 0, |
| 2099 | 2099 | 0, |
| r1404 | r1405 | |
| 2101 | 2101 | k005289_control_B_w |
| 2102 | 2102 | }; |
| 2103 | 2103 | |
| 2104 | static struct k005289_interface k005289_interface = | |
| 2104 | static const struct k005289_interface k005289_interface = | |
| 2105 | 2105 | { |
| 2106 | 2106 | REGION_SOUND1 /* prom memory region */ |
| 2107 | 2107 | }; |
| r1404 | r1405 | |
| 2112 | 2112 | /*cpunum_set_input_line(1,0,HOLD_LINE);*/ |
| 2113 | 2113 | } |
| 2114 | 2114 | |
| 2115 | static struct YM2151interface ym2151_interface = | |
| 2115 | static const struct YM2151interface ym2151_interface = | |
| 2116 | 2116 | { |
| 2117 | 2117 | sound_irq |
| 2118 | 2118 | }; |
| 2119 | 2119 | |
| 2120 | static struct YM3812interface ym3812_interface = | |
| 2120 | static const struct YM3812interface ym3812_interface = | |
| 2121 | 2121 | { |
| 2122 | 2122 | sound_irq |
| 2123 | 2123 | }; |
| 2124 | 2124 | |
| 2125 | static struct VLM5030interface vlm5030_interface = | |
| 2125 | static const struct VLM5030interface vlm5030_interface = | |
| 2126 | 2126 | { |
| 2127 | 2127 | REGION_SOUND1, /* memory region */ |
| 2128 | 2128 | 0 /* memory length */ |
| r1404 | r1405 | |
| 2134 | 2134 | K007232_set_volume(0,1,0,(v & 0x0f) * 0x11); |
| 2135 | 2135 | } |
| 2136 | 2136 | |
| 2137 | static struct K007232_interface k007232_interface = | |
| 2137 | static const struct K007232_interface k007232_interface = | |
| 2138 | 2138 | { |
| 2139 | 2139 | REGION_SOUND2, /* memory regions */ |
| 2140 | 2140 | volume_callback /* external port callback */ |
| r1404 | r1405 | |
|---|---|---|
| 120 | 120 | PORT_BIT( 0x80, IP_ACTIVE_HIGH,IPT_COIN2 ) PORT_IMPULSE(2) |
| 121 | 121 | INPUT_PORTS_END |
| 122 | 122 | |
| 123 | static gfx_layout charlayout = | |
| 123 | static const gfx_layout charlayout = | |
| 124 | 124 | { |
| 125 | 125 | 8,8, /* 8*8 characters */ |
| 126 | 126 | 1024, /* 1024 characters */ |
| r1404 | r1405 | |
| 131 | 131 | 8*8 /* every char takes 8 consecutive bytes */ |
| 132 | 132 | }; |
| 133 | 133 | |
| 134 | static gfx_layout spritelayout = | |
| 134 | static const gfx_layout spritelayout = | |
| 135 | 135 | { |
| 136 | 136 | 16,16, /* 16*16 sprites */ |
| 137 | 137 | 256, /* 256 sprites */ |
| r1404 | r1405 | |
| 144 | 144 | 32*8 /* every sprite takes 32 consecutive bytes */ |
| 145 | 145 | }; |
| 146 | 146 | |
| 147 | static gfx_layout progolf_charlayout = | |
| 147 | static const gfx_layout progolf_charlayout = | |
| 148 | 148 | { |
| 149 | 149 | 8,8, /* 8*8 characters */ |
| 150 | 150 | RGN_FRAC(1,3), /* 512 characters */ |
| r1404 | r1405 | |
| 155 | 155 | 8*8 /* every char takes 8 consecutive bytes */ |
| 156 | 156 | }; |
| 157 | 157 | |
| 158 | static gfx_layout progolf_charlayout2 = | |
| 158 | static const gfx_layout progolf_charlayout2 = | |
| 159 | 159 | { |
| 160 | 160 | 8,8, /* 8*8 characters */ |
| 161 | 161 | RGN_FRAC(1,1), /* 512 characters */ |
| r1404 | r1405 | |
| 167 | 167 | }; |
| 168 | 168 | |
| 169 | 169 | #if 1 |
| 170 | static gfx_layout progolf_spritelayout2 = | |
| 170 | static const gfx_layout progolf_spritelayout2 = | |
| 171 | 171 | { |
| 172 | 172 | 16,16, /* 16*16 sprites */ |
| 173 | 173 | RGN_FRAC(1,1), /* 256 sprites */ |
| r1404 | r1405 | |
|---|---|---|
| 350 | 350 | GFXDECODE_END |
| 351 | 351 | |
| 352 | 352 | |
| 353 | static struct AY8910interface ay8910_interface = | |
| 353 | static const struct AY8910interface ay8910_interface = | |
| 354 | 354 | { |
| 355 | 355 | 0, |
| 356 | 356 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 192 | 192 | |
| 193 | 193 | static WRITE8_HANDLER( llander_led_w ) |
| 194 | 194 | { |
| 195 | static const char *lampname[] = | |
| 195 | static const char *const lampname[] = | |
| 196 | 196 | { |
| 197 | 197 | "lamp0", "lamp1", "lamp2", "lamp3", "lamp4" |
| 198 | 198 | }; |
| r1404 | r1405 | |
| 609 | 609 | * |
| 610 | 610 | *************************************/ |
| 611 | 611 | |
| 612 | static struct POKEYinterface pokey_interface = | |
| 612 | static const struct POKEYinterface pokey_interface = | |
| 613 | 613 | { |
| 614 | 614 | { 0 }, |
| 615 | 615 | input_port_3_r |
| r1404 | r1405 | |
|---|---|---|
| 933 | 933 | 7h |
| 934 | 934 | 7l PORT-AD |
| 935 | 935 | */ |
| 936 | static UINT8 port_ad[] = | |
| 936 | static const UINT8 port_ad[] = | |
| 937 | 937 | { |
| 938 | 938 | 0xcc,0xb2,0x99,0x7f,0x66,0x4c,0x33,0x19 |
| 939 | 939 | }; |
| r1404 | r1405 | |
| 2642 | 2642 | |
| 2643 | 2643 | GFXDECODE_END |
| 2644 | 2644 | |
| 2645 | static struct sh2_config sh2_conf_master = { 0 }; | |
| 2646 | static struct sh2_config sh2_conf_slave = { 1 }; | |
| 2645 | static const struct sh2_config sh2_conf_master = { 0 }; | |
| 2646 | static const struct sh2_config sh2_conf_slave = { 1 }; | |
| 2647 | 2647 | |
| 2648 | 2648 | static int scsp_last_line = 0; |
| 2649 | 2649 | |
| r1404 | r1405 | |
| 2670 | 2670 | } |
| 2671 | 2671 | } |
| 2672 | 2672 | |
| 2673 | static struct SCSPinterface scsp_interface = | |
| 2673 | static const struct SCSPinterface scsp_interface = | |
| 2674 | 2674 | { |
| 2675 | 2675 | 0, |
| 2676 | 2676 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 1308 | 1308 | /* 44 */ GAME( 1990, mt_arrow, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Arrow Flash (Mega-Tech)", GAME_NOT_WORKING ) |
| 1309 | 1309 | /* 45 */ // unknown |
| 1310 | 1310 | /* 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 ) | |
| 1312 | 1312 | /* 48 */ GAME( 1991, mt_wwar, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Wrestle War (Mega-Tech)", GAME_NOT_WORKING ) /* Copyright 1989, 1991 Sega */ |
| 1313 | 1313 | /* 49 */ GAME( 1991, mt_bbros, megatech, megatech, megatech, mtnew, ROT0, "Sega", "Bonanza Bros. (Mega-Tech)", GAME_NOT_WORKING ) |
| 1314 | 1314 | /* 50 */ // unknown |
| r1404 | r1405 | |
|---|---|---|
| 31 | 31 | |
| 32 | 32 | static int nmi_enabled = 0; |
| 33 | 33 | |
| 34 | static MACHINE_START( timelimt ) | |
| 35 | { | |
| 36 | soundlatch_setclearedvalue( 0 ); | |
| 37 | } | |
| 38 | ||
| 34 | 39 | static MACHINE_RESET( timelimt ) |
| 35 | 40 | { |
| 36 | soundlatch_setclearedvalue( 0 ); | |
| 37 | 41 | nmi_enabled = 0; |
| 38 | 42 | } |
| 39 | 43 | |
| r1404 | r1405 | |
| 239 | 243 | |
| 240 | 244 | /***************************************************************************/ |
| 241 | 245 | |
| 242 | static struct AY8910interface ay8910_interface = | |
| 246 | static const struct AY8910interface ay8910_interface = | |
| 243 | 247 | { |
| 244 | 248 | soundlatch_r |
| 245 | 249 | }; |
| r1404 | r1405 | |
| 269 | 273 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION) |
| 270 | 274 | MDRV_INTERLEAVE(50) |
| 271 | 275 | |
| 276 | MDRV_MACHINE_START(timelimt) | |
| 272 | 277 | MDRV_MACHINE_RESET(timelimt) |
| 273 | 278 | |
| 274 | 279 | /* video hardware */ |
| r1404 | r1405 | |
|---|---|---|
| 445 | 445 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 446 | 446 | } |
| 447 | 447 | |
| 448 | static struct YM2610interface ym2610_interface = | |
| 448 | static const struct YM2610interface ym2610_interface = | |
| 449 | 449 | { |
| 450 | 450 | irqhandler, |
| 451 | 451 | REGION_SOUND2, /* Delta-T */ |
| r1404 | r1405 | |
| 469 | 469 | return 0; |
| 470 | 470 | } |
| 471 | 471 | |
| 472 | static struct CustomSound_interface subwoofer_interface = | |
| 472 | static const struct CustomSound_interface subwoofer_interface = | |
| 473 | 473 | { |
| 474 | 474 | subwoofer_sh_start, |
| 475 | 475 | 0, /* none */ |
| r1404 | r1405 | |
|---|---|---|
| 2459 | 2459 | // cpunum_set_input_line(0, 3, state); |
| 2460 | 2460 | } |
| 2461 | 2461 | |
| 2462 | static struct ics2115_interface pgm_ics2115_interface = { | |
| 2462 | static const struct ics2115_interface pgm_ics2115_interface = { | |
| 2463 | 2463 | REGION_SOUND1, |
| 2464 | 2464 | sound_irq |
| 2465 | 2465 | }; |
| r1404 | r1405 | |
|---|---|---|
| 237 | 237 | cpunum_set_input_line(1, INPUT_LINE_NMI, irq ? ASSERT_LINE : CLEAR_LINE); |
| 238 | 238 | } |
| 239 | 239 | |
| 240 | static struct YM2203interface ym2203_interface = | |
| 240 | static const struct YM2203interface ym2203_interface = | |
| 241 | 241 | { |
| 242 | 242 | 0, |
| 243 | 243 | 0, |
| r1404 | r1405 | |
| 258 | 258 | cpunum_set_input_line(1, INPUT_LINE_NMI, PULSE_LINE); |
| 259 | 259 | } |
| 260 | 260 | |
| 261 | static struct MSM5205interface msm5205_interface = | |
| 261 | static const struct MSM5205interface msm5205_interface = | |
| 262 | 262 | { |
| 263 | 263 | goal92_adpcm_int, /* interrupt function */ |
| 264 | 264 | MSM5205_S96_4B /* 4KHz 4-bit */ |
| r1404 | r1405 | |
|---|---|---|
| 323 | 323 | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 32 ) |
| 324 | 324 | GFXDECODE_END |
| 325 | 325 | |
| 326 | static struct x1_010_interface champbwl_sound_intf = | |
| 326 | static const struct x1_010_interface champbwl_sound_intf = | |
| 327 | 327 | { |
| 328 | 328 | 0x0000 /* address */ |
| 329 | 329 | }; |
| r1404 | r1405 | |
|---|---|---|
| 256 | 256 | cpunum_set_input_line(0, MC68000_IRQ_1, CLEAR_LINE); |
| 257 | 257 | } |
| 258 | 258 | |
| 259 | static struct YMZ280Binterface ymz280b_intf = | |
| 259 | static const struct YMZ280Binterface ymz280b_intf = | |
| 260 | 260 | { |
| 261 | 261 | REGION_SOUND1, |
| 262 | 262 | sound_irq_gen |
| r1404 | r1405 | |
|---|---|---|
| 261 | 261 | GFXDECODE_ENTRY( REGION_GFX1, 0x00000, charlayout, 0, 32 ) |
| 262 | 262 | GFXDECODE_END |
| 263 | 263 | |
| 264 | static struct YM2203interface ym2203_interface = | |
| 264 | static const struct YM2203interface ym2203_interface = | |
| 265 | 265 | { |
| 266 | 266 | input_port_0_r, |
| 267 | 267 | input_port_1_r |
| r1404 | r1405 | |
|---|---|---|
| 436 | 436 | * |
| 437 | 437 | *************************************/ |
| 438 | 438 | |
| 439 | static struct CustomSound_interface amiga_custom_interface = | |
| 439 | static const struct CustomSound_interface amiga_custom_interface = | |
| 440 | 440 | { |
| 441 | 441 | amiga_sh_start |
| 442 | 442 | }; |
| r1404 | r1405 | |
|---|---|---|
| 687 | 687 | cpunum_set_input_line(1, 0, irq ? ASSERT_LINE : CLEAR_LINE); |
| 688 | 688 | } |
| 689 | 689 | |
| 690 | static struct YM2610interface ym2610_interface = | |
| 690 | static const struct YM2610interface ym2610_interface = | |
| 691 | 691 | { |
| 692 | 692 | irqhandler, |
| 693 | 693 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 402 | 402 | * |
| 403 | 403 | *************************************/ |
| 404 | 404 | |
| 405 | static struct CustomSound_interface custom_interface = | |
| 405 | static const struct CustomSound_interface custom_interface = | |
| 406 | 406 | { |
| 407 | 407 | gridlee_sh_start |
| 408 | 408 | }; |
| r1404 | r1405 | |
|---|---|---|
| 811 | 811 | GFXDECODE_END |
| 812 | 812 | |
| 813 | 813 | |
| 814 | static struct namco_interface namco_interface = | |
| 814 | static const struct namco_interface namco_interface = | |
| 815 | 815 | { |
| 816 | 816 | 3, /* number of voices */ |
| 817 | 817 | REGION_SOUND1 /* memory region */ |
| r1404 | r1405 | |
|---|---|---|
| 1306 | 1306 | ADDRESS_MAP_END |
| 1307 | 1307 | #endif |
| 1308 | 1308 | |
| 1309 | static struct YMF271interface ymf271_interface1 = | |
| 1309 | static const struct YMF271interface ymf271_interface1 = | |
| 1310 | 1310 | { |
| 1311 | 1311 | REGION_SOUND1 |
| 1312 | 1312 | }; |
| 1313 | 1313 | |
| 1314 | static struct YMF271interface ymf271_interface2 = | |
| 1314 | static const struct YMF271interface ymf271_interface2 = | |
| 1315 | 1315 | { |
| 1316 | 1316 | REGION_SOUND2 |
| 1317 | 1317 | }; |
| r1404 | r1405 | |
|---|---|---|
| 465 | 465 | 8*8 /* every char takes 8 consecutive bytes */ |
| 466 | 466 | }; |
| 467 | 467 | |
| 468 | static gfx_layout crowlayout = | |
| 468 | static const gfx_layout crowlayout = | |
| 469 | 469 | { |
| 470 | 470 | 16,32, /* 16*32 characters */ |
| 471 | 471 | 16, /* 16 characters */ |
| r1404 | r1405 | |
| 482 | 482 | 128*8 /* every sprite takes 128 consecutive bytes */ |
| 483 | 483 | }; |
| 484 | 484 | |
| 485 | static gfx_layout balllayout = | |
| 485 | static const gfx_layout balllayout = | |
| 486 | 486 | { |
| 487 | 487 | 8,16, /* 8*16 sprites */ |
| 488 | 488 | 8, /* 8 sprites */ |
| r1404 | r1405 | |
| 508 | 508 | if (data != 0x00) logerror("portB = %02x\n",data); |
| 509 | 509 | } |
| 510 | 510 | |
| 511 | static struct AY8910interface ay8910_interface = | |
| 511 | static const struct AY8910interface ay8910_interface = | |
| 512 | 512 | { |
| 513 | 513 | 0, |
| 514 | 514 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 366 | 366 | (SOUND) |
| 367 | 367 | **************************************************************/ |
| 368 | 368 | |
| 369 | static struct MSM5205interface msm5205_interface = | |
| 369 | static const struct MSM5205interface msm5205_interface = | |
| 370 | 370 | { |
| 371 | 371 | NULL, /* VCK function */ |
| 372 | 372 | MSM5205_S48_4B /* 8 kHz */ |
| r1404 | r1405 | |
|---|---|---|
| 654 | 654 | Billiard Academy Real Break |
| 655 | 655 | ***************************************************************************/ |
| 656 | 656 | |
| 657 | static struct YMZ280Binterface realbrk_ymz280b_intf = | |
| 657 | static const struct YMZ280Binterface realbrk_ymz280b_intf = | |
| 658 | 658 | { |
| 659 | 659 | REGION_SOUND1, |
| 660 | 660 | 0 |
| r1404 | r1405 | |
|---|---|---|
| 273 | 273 | * |
| 274 | 274 | *************************************/ |
| 275 | 275 | |
| 276 | static struct CustomSound_interface amiga_custom_interface = | |
| 276 | static const struct CustomSound_interface amiga_custom_interface = | |
| 277 | 277 | { |
| 278 | 278 | amiga_sh_start |
| 279 | 279 | }; |
| r1404 | r1405 | |
|---|---|---|
| 383 | 383 | K007232_set_volume(1,1,0,(v & 0x0f) * 0x11); |
| 384 | 384 | } |
| 385 | 385 | |
| 386 | static struct K007232_interface k007232_interface_1 = | |
| 386 | static const struct K007232_interface k007232_interface_1 = | |
| 387 | 387 | { |
| 388 | 388 | REGION_SOUND1, |
| 389 | 389 | volume_callback0 |
| 390 | 390 | }; |
| 391 | 391 | |
| 392 | static struct K007232_interface k007232_interface_2 = | |
| 392 | static const struct K007232_interface k007232_interface_2 = | |
| 393 | 393 | { |
| 394 | 394 | REGION_SOUND2, |
| 395 | 395 | volume_callback1 |
| r1404 | r1405 | |
|---|---|---|
| 224 | 224 | GFXDECODE_ENTRY( REGION_GFX3, 0, flower_tilelayout, 0, 16 ) |
| 225 | 225 | GFXDECODE_END |
| 226 | 226 | |
| 227 | static struct CustomSound_interface custom_interface = | |
| 227 | static const struct CustomSound_interface custom_interface = | |
| 228 | 228 | { |
| 229 | 229 | flower_sh_start |
| 230 | 230 | }; |
| r1404 | r1405 | |
|---|---|---|
| 259 | 259 | |
| 260 | 260 | /******************************************************************************/ |
| 261 | 261 | |
| 262 | static struct MSM5205interface msm5205_interface = | |
| 262 | static const struct MSM5205interface msm5205_interface = | |
| 263 | 263 | { |
| 264 | 264 | battlera_adpcm_int,/* interrupt function */ |
| 265 | 265 | MSM5205_S48_4B /* 8KHz */ |
| r1404 | r1405 | |
|---|---|---|
| 458 | 458 | cpunum_set_input_line(2,M6809_FIRQ_LINE,irq ? ASSERT_LINE : CLEAR_LINE); |
| 459 | 459 | } |
| 460 | 460 | |
| 461 | static struct YM2203interface ym2203_interface = | |
| 461 | static const struct YM2203interface ym2203_interface = | |
| 462 | 462 | { |
| 463 | 463 | 0,0,0,0,irqhandler |
| 464 | 464 | }; |
| r1404 | r1405 | |
|---|---|---|
| 965 | 965 | cpunum_set_input_line( 2, M6809_FIRQ_LINE, irq ? ASSERT_LINE : CLEAR_LINE); |
| 966 | 966 | } |
| 967 | 967 | |
| 968 | static struct YM2151interface ym2151_interface = | |
| 968 | static const struct YM2151interface ym2151_interface = | |
| 969 | 969 | { |
| 970 | 970 | namcos1_sound_interrupt |
| 971 | 971 | }; |
| 972 | 972 | |
| 973 | static struct namco_interface namco_interface = | |
| 973 | static const struct namco_interface namco_interface = | |
| 974 | 974 | { |
| 975 | 975 | 8, /* number of voices */ |
| 976 | 976 | -1, /* memory region */ |
| r1404 | r1405 | |
|---|---|---|
| 691 | 691 | K007232_set_volume(0,1,0,(v & 0x0f) * 0x11); |
| 692 | 692 | } |
| 693 | 693 | |
| 694 | static struct K007232_interface k007232_interface = | |
| 694 | static const struct K007232_interface k007232_interface = | |
| 695 | 695 | { |
| 696 | 696 | REGION_SOUND1, /* memory regions */ |
| 697 | 697 | volume_callback /* external port callback */ |
| 698 | 698 | }; |
| 699 | 699 | |
| 700 | static struct upd7759_interface upd7759_interface = | |
| 700 | static const struct upd7759_interface upd7759_interface = | |
| 701 | 701 | { |
| 702 | 702 | REGION_SOUND2, /* memory region */ |
| 703 | 703 | 0 |
| r1404 | r1405 | |
|---|---|---|
| 246 | 246 | |
| 247 | 247 | static UINT32 ebases_trackball_r(void *param) |
| 248 | 248 | { |
| 249 | static const char *names[] = { "TRACKX2", "TRACKY2", "TRACKX1", "TRACKY1" }; | |
| 249 | static const char *const names[] = { "TRACKX2", "TRACKY2", "TRACKX1", "TRACKY1" }; | |
| 250 | 250 | return readinputportbytag(names[input_select]); |
| 251 | 251 | } |
| 252 | 252 | |
| r1404 | r1405 | |
| 462 | 462 | |
| 463 | 463 | static UINT32 demndragn_joystick_r(void *param) |
| 464 | 464 | { |
| 465 | static const char *names[] = { "MOVEX", "MOVEY" }; | |
| 465 | static const char *const names[] = { "MOVEX", "MOVEY" }; | |
| 466 | 466 | return readinputportbytag(names[input_select]); |
| 467 | 467 | } |
| 468 | 468 | |
| r1404 | r1405 | |
| 1226 | 1226 | * |
| 1227 | 1227 | *************************************/ |
| 1228 | 1228 | |
| 1229 | static struct z80_irq_daisy_chain tenpin_daisy_chain[] = | |
| 1229 | static const struct z80_irq_daisy_chain tenpin_daisy_chain[] = | |
| 1230 | 1230 | { |
| 1231 | 1231 | { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 }, /* CTC number 0 */ |
| 1232 | 1232 | { 0, 0, 0, 0, -1 } /* end mark */ |
| r1404 | r1405 | |
|---|---|---|
| 315 | 315 | |
| 316 | 316 | |
| 317 | 317 | |
| 318 | static struct AY8910interface ay8910_interface = | |
| 318 | static const struct AY8910interface ay8910_interface = | |
| 319 | 319 | { |
| 320 | 320 | megazone_portA_r, |
| 321 | 321 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 409 | 409 | logerror("sound irq\n"); |
| 410 | 410 | } |
| 411 | 411 | |
| 412 | static struct YMZ280Binterface ymz280b_intf = | |
| 412 | static const struct YMZ280Binterface ymz280b_intf = | |
| 413 | 413 | { |
| 414 | 414 | REGION_SOUND1, |
| 415 | 415 | sound_irq_gen |
| r1404 | r1405 | |
|---|---|---|
| 413 | 413 | SEIBU_SOUND_SYSTEM_YM3812_HARDWARE |
| 414 | 414 | |
| 415 | 415 | |
| 416 | static struct MSM5205interface msm5205_interface = | |
| 416 | static const struct MSM5205interface msm5205_interface = | |
| 417 | 417 | { |
| 418 | 418 | toki_adpcm_int, /* interrupt function */ |
| 419 | 419 | MSM5205_S96_4B /* 4KHz */ |
| r1404 | r1405 | |
|---|---|---|
| 674 | 674 | palette_set_color(machine, 6, MAKE_RGB(255, 0, 0)); |
| 675 | 675 | } |
| 676 | 676 | |
| 677 | static struct AY8910interface ay8910_interface = | |
| 677 | static const struct AY8910interface ay8910_interface = | |
| 678 | 678 | { |
| 679 | 679 | input_port_3_r, |
| 680 | 680 | input_port_2_r, |
| r1404 | r1405 | |
|---|---|---|
| 1078 | 1078 | GFXDECODE_ENTRY( REGION_GFX1, 0, sprite_layout, 0, 64 ) |
| 1079 | 1079 | GFXDECODE_END |
| 1080 | 1080 | |
| 1081 | static struct AY8910interface ay8910_interface = | |
| 1081 | static const struct AY8910interface ay8910_interface = | |
| 1082 | 1082 | { |
| 1083 | 1083 | 0, |
| 1084 | 1084 | 0, |
| r1404 | r1405 | |
| 1086 | 1086 | sound_control_3_w |
| 1087 | 1087 | }; |
| 1088 | 1088 | |
| 1089 | static struct MSM5232interface msm5232_interface = | |
| 1089 | static const struct MSM5232interface msm5232_interface = | |
| 1090 | 1090 | { |
| 1091 | 1091 | { 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) */ |
| 1092 | 1092 | }; |
| r1404 | r1405 | |
|---|---|---|
| 331 | 331 | |
| 332 | 332 | |
| 333 | 333 | |
| 334 | static struct AY8910interface ay8910_interface = | |
| 334 | static const struct AY8910interface ay8910_interface = | |
| 335 | 335 | { |
| 336 | 336 | junofrst_portA_r, |
| 337 | 337 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 764 | 764 | cpunum_set_input_line(1, M6809_FIRQ_LINE, linestate); |
| 765 | 765 | } |
| 766 | 766 | |
| 767 | static struct YM3526interface ym3526_interface = | |
| 767 | static const struct YM3526interface ym3526_interface = | |
| 768 | 768 | { |
| 769 | 769 | irqhandler |
| 770 | 770 | }; |
| 771 | 771 | |
| 772 | static struct CustomSound_interface adpcm_interface = | |
| 772 | static const struct CustomSound_interface adpcm_interface = | |
| 773 | 773 | { |
| 774 | 774 | renegade_adpcm_start |
| 775 | 775 | }; |
| r1404 | r1405 | |
|---|---|---|
| 795 | 795 | coin_lockout_global_w(data & 1); |
| 796 | 796 | } |
| 797 | 797 | |
| 798 | static struct namcoio_interface intf0 = | |
| 798 | static const struct namcoio_interface intf0 = | |
| 799 | 799 | { |
| 800 | 800 | { in0_l, in0_h, in1_l, in1_h }, /* port read handlers */ |
| 801 | 801 | { out_0, out_1 } /* port write handlers */ |
| 802 | 802 | }; |
| 803 | static struct namcoio_interface intf1 = | |
| 803 | static const struct namcoio_interface intf1 = | |
| 804 | 804 | { |
| 805 | 805 | { dipA_l, dipA_h, dipB_l, dipB_h }, /* port read handlers */ |
| 806 | 806 | { NULL, NULL } /* port write handlers */ |
| r1404 | r1405 | |
| 1578 | 1578 | /* The resistance path of the namco sound is 16k compared to |
| 1579 | 1579 | * the 10k of the highest gain 54xx filter. Giving a 10/16 gain. |
| 1580 | 1580 | */ |
| 1581 | static struct namco_interface namco_interface = | |
| 1581 | static const struct namco_interface namco_interface = | |
| 1582 | 1582 | { |
| 1583 | 1583 | 3, /* number of voices */ |
| 1584 | 1584 | REGION_SOUND1 /* memory region */ |
| r1404 | r1405 | |
| 1588 | 1588 | * the signal is 1V, or 25%. The relative volume between |
| 1589 | 1589 | * 52xx & 54xx is the same. |
| 1590 | 1590 | */ |
| 1591 | static struct namco_52xx_interface namco_52xx_interface = | |
| 1591 | static const struct namco_52xx_interface namco_52xx_interface = | |
| 1592 | 1592 | { |
| 1593 | 1593 | REGION_SOUND2, /* memory region */ |
| 1594 | 1594 | 4000, /* Playback frequency - from 555 timer 6M */ |
| r1404 | r1405 | |
|---|---|---|
| 340 | 340 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 341 | 341 | INPUT_PORTS_END |
| 342 | 342 | |
| 343 | static struct ST0016interface st0016_interface = | |
| 343 | static const struct ST0016interface st0016_interface = | |
| 344 | 344 | { |
| 345 | 345 | &st0016_charram |
| 346 | 346 | }; |
| r1404 | r1405 | |
|---|---|---|
| 3126 | 3126 | INPUT_PORTS_END |
| 3127 | 3127 | |
| 3128 | 3128 | |
| 3129 | static struct AY8910interface ay8910_interface = | |
| 3129 | static const struct AY8910interface ay8910_interface = | |
| 3130 | 3130 | { |
| 3131 | 3131 | nb1413m3_dipsw1_r, // DIPSW-A read |
| 3132 | 3132 | nb1413m3_dipsw2_r // DIPSW-B read |
| r1404 | r1405 | |
|---|---|---|
| 539 | 539 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 540 | 540 | } |
| 541 | 541 | |
| 542 | static struct YM2203interface ym2203_interface = | |
| 542 | static const struct YM2203interface ym2203_interface = | |
| 543 | 543 | { |
| 544 | 544 | 0,0,0,0,irqhandler |
| 545 | 545 | }; |
| r1404 | r1405 | |
|---|---|---|
| 163 | 163 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | static struct YM2610interface syvalion_ym2610_interface = | |
| 166 | static const struct YM2610interface syvalion_ym2610_interface = | |
| 167 | 167 | { |
| 168 | 168 | irqhandler, |
| 169 | 169 | REGION_SOUND1, |
| 170 | 170 | REGION_SOUND2 |
| 171 | 171 | }; |
| 172 | 172 | |
| 173 | static struct YM2610interface dleague_ym2610_interface = | |
| 173 | static const struct YM2610interface dleague_ym2610_interface = | |
| 174 | 174 | { |
| 175 | 175 | irqhandler, |
| 176 | 176 | REGION_SOUND1, |
| r1404 | r1405 | |
|---|---|---|
| 419 | 419 | |
| 420 | 420 | static READ16_HANDLER( othunder_lightgun_r ) |
| 421 | 421 | { |
| 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 }; | |
| 423 | 423 | return readinputportbytag(dswname[offset]); |
| 424 | 424 | } |
| 425 | 425 | |
| r1404 | r1405 | |
| 689 | 689 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 690 | 690 | } |
| 691 | 691 | |
| 692 | static struct YM2610interface ym2610_interface = | |
| 692 | static const struct YM2610interface ym2610_interface = | |
| 693 | 693 | { |
| 694 | 694 | irqhandler, |
| 695 | 695 | REGION_SOUND2, /* Delta-T */ |
| r1404 | r1405 | |
|---|---|---|
| 339 | 339 | |
| 340 | 340 | |
| 341 | 341 | /* The Y8950 is basically a YM3526 with ADPCM built in */ |
| 342 | static struct Y8950interface y8950_interface = | |
| 342 | static const struct Y8950interface y8950_interface = | |
| 343 | 343 | { |
| 344 | 344 | 0, |
| 345 | 345 | REGION_SOUND1 /* ROM region */ |
| r1404 | r1405 | |
|---|---|---|
| 249 | 249 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 250 | 250 | } |
| 251 | 251 | |
| 252 | static struct YM2608interface ym2608_interface = | |
| 252 | static const struct YM2608interface ym2608_interface = | |
| 253 | 253 | { |
| 254 | 254 | 0, |
| 255 | 255 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 532 | 532 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 533 | 533 | } |
| 534 | 534 | |
| 535 | static struct YM2610interface ym2610_interface = | |
| 535 | static const struct YM2610interface ym2610_interface = | |
| 536 | 536 | { |
| 537 | 537 | irqhandler, |
| 538 | 538 | REGION_SOUND2, /* Delta-T */ |
| r1404 | r1405 | |
|---|---|---|
| 2069 | 2069 | PORT_DIPSETTING( 0xc0, "Wrong 3" ) |
| 2070 | 2070 | INPUT_PORTS_END |
| 2071 | 2071 | |
| 2072 | static struct NESinterface nes_interface_1 = | |
| 2072 | static const struct NESinterface nes_interface_1 = | |
| 2073 | 2073 | { |
| 2074 | 2074 | REGION_CPU1 |
| 2075 | 2075 | }; |
| 2076 | 2076 | |
| 2077 | static struct NESinterface nes_interface_2 = | |
| 2077 | static const struct NESinterface nes_interface_2 = | |
| 2078 | 2078 | { |
| 2079 | 2079 | REGION_CPU2 |
| 2080 | 2080 | }; |
| r1404 | r1405 | |
|---|---|---|
| 306 | 306 | * |
| 307 | 307 | *************************************/ |
| 308 | 308 | |
| 309 | static struct CustomSound_interface custom_interface = | |
| 309 | static const struct CustomSound_interface custom_interface = | |
| 310 | 310 | { |
| 311 | 311 | victory_sh_start, |
| 312 | 312 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 846 | 846 | OKIM6295_set_bank_base(1, (data & 1) * 0x40000); |
| 847 | 847 | } |
| 848 | 848 | |
| 849 | static struct YM2151interface ym2151_interface = | |
| 849 | static const struct YM2151interface ym2151_interface = | |
| 850 | 850 | { |
| 851 | 851 | sound_irq, |
| 852 | 852 | sound_bankswitch_w |
| 853 | 853 | }; |
| 854 | 854 | |
| 855 | static struct YM2151interface ym2151_interface2 = | |
| 855 | static const struct YM2151interface ym2151_interface2 = | |
| 856 | 856 | { |
| 857 | 857 | sound_irq2 |
| 858 | 858 | }; |
| r1404 | r1405 | |
|---|---|---|
| 400 | 400 | |
| 401 | 401 | |
| 402 | 402 | |
| 403 | static struct namco_interface namco_interface = | |
| 403 | static const struct namco_interface namco_interface = | |
| 404 | 404 | { |
| 405 | 405 | 8, /* number of voices */ |
| 406 | 406 | -1, /* memory region */ |
| r1404 | r1405 | |
|---|---|---|
| 481 | 481 | cpunum_set_input_line(0, 12, CLEAR_LINE); |
| 482 | 482 | } |
| 483 | 483 | |
| 484 | static struct YMF278B_interface ymf278b_interface = | |
| 484 | static const struct YMF278B_interface ymf278b_interface = | |
| 485 | 485 | { |
| 486 | 486 | REGION_SOUND1, |
| 487 | 487 | irqhandler |
| r1404 | r1405 | |
|---|---|---|
| 444 | 444 | cpunum_set_input_line(1,0,linestate); |
| 445 | 445 | } |
| 446 | 446 | |
| 447 | static struct YM3812interface ym3812_interface = | |
| 447 | static const struct YM3812interface ym3812_interface = | |
| 448 | 448 | { |
| 449 | 449 | irqhandler |
| 450 | 450 | }; |
| r1404 | r1405 | |
|---|---|---|
| 45 | 45 | static WRITE8_HANDLER(sharedram_w){ jcr_sharedram[offset]=data;} |
| 46 | 46 | #endif |
| 47 | 47 | |
| 48 | static struct namco_interface snkwave_interface = | |
| 48 | static const struct namco_interface snkwave_interface = | |
| 49 | 49 | { |
| 50 | 50 | 1, |
| 51 | 51 | -1 |
| r1404 | r1405 | |
|---|---|---|
| 443 | 443 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 444 | 444 | INPUT_PORTS_END |
| 445 | 445 | |
| 446 | static struct CustomSound_interface snes_sound_interface = | |
| 446 | static const struct CustomSound_interface snes_sound_interface = | |
| 447 | 447 | { snes_sh_start }; |
| 448 | 448 | |
| 449 | 449 | static GFXDECODE_START( nss ) |
| r1404 | r1405 | |
|---|---|---|
| 871 | 871 | * |
| 872 | 872 | *************************************/ |
| 873 | 873 | |
| 874 | static struct POKEYinterface pokey_interface = | |
| 874 | static const struct POKEYinterface pokey_interface = | |
| 875 | 875 | { |
| 876 | 876 | { 0 }, |
| 877 | 877 | input_port_3_r |
| r1404 | r1405 | |
|---|---|---|
| 322 | 322 | GFXDECODE_ENTRY( REGION_GFX2, 0x40000, spritelayout, 64, 16 ) /* colors 0-15 but using lookup table */ |
| 323 | 323 | GFXDECODE_END |
| 324 | 324 | |
| 325 | static struct YM2203interface ym2203_interface = | |
| 325 | static const struct YM2203interface ym2203_interface = | |
| 326 | 326 | { |
| 327 | 327 | 0, |
| 328 | 328 | ddrible_vlm5030_busy_r, |
| r1404 | r1405 | |
| 330 | 330 | 0 |
| 331 | 331 | }; |
| 332 | 332 | |
| 333 | static struct VLM5030interface vlm5030_interface = | |
| 333 | static const struct VLM5030interface vlm5030_interface = | |
| 334 | 334 | { |
| 335 | 335 | REGION_SOUND1,/* memory region of speech rom */ |
| 336 | 336 | 0x10000 /* memory size 64Kbyte * 2 bank */ |
| r1404 | r1405 | |
|---|---|---|
| 120 | 120 | |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | static struct AY8910interface ay8910_interface = | |
| 123 | static const struct AY8910interface ay8910_interface = | |
| 124 | 124 | { |
| 125 | 125 | 0, |
| 126 | 126 | 0, |
| r1404 | r1405 | |
| 128 | 128 | unk_w |
| 129 | 129 | }; |
| 130 | 130 | |
| 131 | static struct MSM5232interface msm5232_interface = | |
| 131 | static const struct MSM5232interface msm5232_interface = | |
| 132 | 132 | { |
| 133 | 133 | { 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6 } |
| 134 | 134 | }; |
| r1404 | r1405 | |
|---|---|---|
| 702 | 702 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 703 | 703 | } |
| 704 | 704 | |
| 705 | static struct YM2203interface ym2203_interface = | |
| 705 | static const struct YM2203interface ym2203_interface = | |
| 706 | 706 | { |
| 707 | 707 | 0,0,0,0,irqhandler |
| 708 | 708 | }; |
| 709 | 709 | |
| 710 | static struct YM2151interface whizz_ym2151_interface = | |
| 710 | static const struct YM2151interface whizz_ym2151_interface = | |
| 711 | 711 | { |
| 712 | 712 | irqhandler |
| 713 | 713 | }; |
| r1404 | r1405 | |
|---|---|---|
| 975 | 975 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 976 | 976 | } |
| 977 | 977 | |
| 978 | static struct YM2610interface ym2610_interface = | |
| 978 | static const struct YM2610interface ym2610_interface = | |
| 979 | 979 | { |
| 980 | 980 | irqhandler, |
| 981 | 981 | REGION_SOUND1, |
| 982 | 982 | REGION_SOUND1 |
| 983 | 983 | }; |
| 984 | 984 | |
| 985 | static struct YM2610interface ballbros_ym2610_interface = | |
| 985 | static const struct YM2610interface ballbros_ym2610_interface = | |
| 986 | 986 | { |
| 987 | 987 | irqhandler, |
| 988 | 988 | REGION_SOUND1, |
| 989 | 989 | REGION_SOUND2 |
| 990 | 990 | }; |
| 991 | 991 | |
| 992 | static struct YM2151interface ym2151_interface = | |
| 992 | static const struct YM2151interface ym2151_interface = | |
| 993 | 993 | { |
| 994 | 994 | irqhandler |
| 995 | 995 | }; |
| r1404 | r1405 | |
|---|---|---|
| 862 | 862 | GFXDECODE_ENTRY( REGION_GFX1, 0, joinem_charlayout, 0, 32 ) |
| 863 | 863 | GFXDECODE_END |
| 864 | 864 | |
| 865 | static struct AY8910interface ay8910_interface = | |
| 865 | static const struct AY8910interface ay8910_interface = | |
| 866 | 866 | { |
| 867 | 867 | soundlatch_r, |
| 868 | 868 | timer_r |
| r1404 | r1405 | |
|---|---|---|
| 310 | 310 | cpunum_set_input_line(1,1,state); /* IRQ 2 */ |
| 311 | 311 | } |
| 312 | 312 | |
| 313 | static struct YM2151interface ym2151_interface = | |
| 313 | static const struct YM2151interface ym2151_interface = | |
| 314 | 314 | { |
| 315 | 315 | sound_irq |
| 316 | 316 | }; |
| r1404 | r1405 | |
|---|---|---|
| 195 | 195 | cpunum_set_input_line(1,1,state); /* IRQ 2 */ |
| 196 | 196 | } |
| 197 | 197 | |
| 198 | static struct YM2151interface ym2151_interface = | |
| 198 | static const struct YM2151interface ym2151_interface = | |
| 199 | 199 | { |
| 200 | 200 | sound_irq |
| 201 | 201 | }; |
| r1404 | r1405 | |
|---|---|---|
| 1827 | 1827 | GFXDECODE_END |
| 1828 | 1828 | |
| 1829 | 1829 | |
| 1830 | static UINT8 voltable[256] = | |
| 1830 | static const UINT8 voltable[256] = | |
| 1831 | 1831 | { |
| 1832 | 1832 | 0xff,0xfe,0xfc,0xfb,0xf9,0xf7,0xf6,0xf4,0xf3,0xf2,0xf1,0xef,0xee,0xec,0xeb,0xea, |
| 1833 | 1833 | 0xe8,0xe7,0xe5,0xe4,0xe2,0xe1,0xe0,0xdf,0xde,0xdd,0xdc,0xdb,0xd9,0xd8,0xd7,0xd6, |
| r1404 | r1405 | |
| 1863 | 1863 | } |
| 1864 | 1864 | |
| 1865 | 1865 | |
| 1866 | static struct AY8910interface ay8910_interface_1 = | |
| 1866 | static const struct AY8910interface ay8910_interface_1 = | |
| 1867 | 1867 | { |
| 1868 | 1868 | input_port_6_r, |
| 1869 | 1869 | input_port_7_r |
| 1870 | 1870 | }; |
| 1871 | 1871 | |
| 1872 | static struct AY8910interface ay8910_interface_2 = | |
| 1872 | static const struct AY8910interface ay8910_interface_2 = | |
| 1873 | 1873 | { |
| 1874 | 1874 | 0, |
| 1875 | 1875 | 0, |
| r1404 | r1405 | |
| 1877 | 1877 | dac_vol_w /* port Bwrite */ |
| 1878 | 1878 | }; |
| 1879 | 1879 | |
| 1880 | static struct AY8910interface ay8910_interface_3 = | |
| 1880 | static const struct AY8910interface ay8910_interface_3 = | |
| 1881 | 1881 | { |
| 1882 | 1882 | 0, |
| 1883 | 1883 | 0, |
| r1404 | r1405 | |
| 1885 | 1885 | 0 |
| 1886 | 1886 | }; |
| 1887 | 1887 | |
| 1888 | static struct AY8910interface ay8910_interface_4 = | |
| 1888 | static const struct AY8910interface ay8910_interface_4 = | |
| 1889 | 1889 | { |
| 1890 | 1890 | 0, |
| 1891 | 1891 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 567 | 567 | |
| 568 | 568 | |
| 569 | 569 | |
| 570 | static struct YM2151interface ym2151_interface = | |
| 570 | static const struct YM2151interface ym2151_interface = | |
| 571 | 571 | { |
| 572 | 572 | m72_ym2151_irq_handler |
| 573 | 573 | }; |
| 574 | 574 | |
| 575 | static struct YM2203interface ym2203_interface = | |
| 575 | static const struct YM2203interface ym2203_interface = | |
| 576 | 576 | { |
| 577 | 577 | 0,0,0,0,m72_ym2151_irq_handler |
| 578 | 578 | }; |
| r1404 | r1405 | |
|---|---|---|
| 536 | 536 | GFXDECODE_ENTRY( REGION_GFX4, 0x00000, rk_bglayout, 0, 32 ) /* bg tiles */ |
| 537 | 537 | GFXDECODE_END |
| 538 | 538 | |
| 539 | static struct AY8910interface ay8910_interface = | |
| 539 | static const struct AY8910interface ay8910_interface = | |
| 540 | 540 | { |
| 541 | 541 | soundlatch_r |
| 542 | 542 | }; |
| r1404 | r1405 | |
|---|---|---|
| 1746 | 1746 | INPUT_PORTS_END |
| 1747 | 1747 | |
| 1748 | 1748 | |
| 1749 | static struct AY8910interface ay8910_interface = | |
| 1749 | static const struct AY8910interface ay8910_interface = | |
| 1750 | 1750 | { |
| 1751 | 1751 | input_port_0_r, // DIPSW-A read |
| 1752 | 1752 | input_port_1_r // DIPSW-B read |
| r1404 | r1405 | |
|---|---|---|
| 306 | 306 | cpunum_set_input_line_and_vector(1,0,irq ? ASSERT_LINE : CLEAR_LINE,0xff); |
| 307 | 307 | } |
| 308 | 308 | |
| 309 | static struct YM2151interface ym2151_interface = | |
| 309 | static const struct YM2151interface ym2151_interface = | |
| 310 | 310 | { |
| 311 | 311 | blockout_irq_handler |
| 312 | 312 | }; |
| r1404 | r1405 | |
|---|---|---|
| 200 | 200 | return 0; |
| 201 | 201 | } |
| 202 | 202 | |
| 203 | static struct AY8910interface ay8912_interface_2 = | |
| 203 | static const struct AY8910interface ay8912_interface_2 = | |
| 204 | 204 | { |
| 205 | 205 | input_port_1_r |
| 206 | 206 | }; |
| 207 | 207 | |
| 208 | static struct AY8910interface ay8912_interface_3 = | |
| 208 | static const struct AY8910interface ay8912_interface_3 = | |
| 209 | 209 | { |
| 210 | 210 | input_port_0_r |
| 211 | 211 | }; |
| r1404 | r1405 | |
|---|---|---|
| 422 | 422 | GFXDECODE_ENTRY( REGION_GFX1, 0x000000, tilelayout16,0,128 ) |
| 423 | 423 | GFXDECODE_END |
| 424 | 424 | |
| 425 | static struct MSM5205interface splash_msm5205_interface = | |
| 425 | static const struct MSM5205interface splash_msm5205_interface = | |
| 426 | 426 | { |
| 427 | 427 | splash_msm5205_int, /* IRQ handler */ |
| 428 | 428 | MSM5205_S48_4B /* 8KHz */ |
| r1404 | r1405 | |
| 471 | 471 | logerror("2203 IRQ: %d\n", state); |
| 472 | 472 | } |
| 473 | 473 | |
| 474 | static struct YM2203interface ym2203_interface = | |
| 474 | static const struct YM2203interface ym2203_interface = | |
| 475 | 475 | { |
| 476 | 476 | 0,0,0,0,ym_irq |
| 477 | 477 | }; |
| r1404 | r1405 | |
|---|---|---|
| 1293 | 1293 | |
| 1294 | 1294 | static READ16_HANDLER( urashima_mcu_r ) |
| 1295 | 1295 | { |
| 1296 | static int resp[] = { 0x99, 0xd8, 0x00, | |
| 1296 | static const int resp[] = { 0x99, 0xd8, 0x00, | |
| 1297 | 1297 | 0x2a, 0x6a, 0x00, |
| 1298 | 1298 | 0x9c, 0xd8, 0x00, |
| 1299 | 1299 | 0x2f, 0x6f, 0x00, |
| r1404 | r1405 | |
| 1444 | 1444 | |
| 1445 | 1445 | static READ16_HANDLER( daireika_mcu_r ) |
| 1446 | 1446 | { |
| 1447 | static int resp[] = { 0x99, 0xd8, 0x00, | |
| 1447 | static const int resp[] = { 0x99, 0xd8, 0x00, | |
| 1448 | 1448 | 0x2a, 0x6a, 0x00, |
| 1449 | 1449 | 0x9c, 0xd8, 0x00, |
| 1450 | 1450 | 0x2f, 0x6f, 0x00, |
| r1404 | r1405 | |
| 1729 | 1729 | |
| 1730 | 1730 | static READ16_HANDLER( mjzoomin_mcu_r ) |
| 1731 | 1731 | { |
| 1732 | static int resp[] = { 0x9c, 0xd8, 0x00, | |
| 1732 | static const int resp[] = { 0x9c, 0xd8, 0x00, | |
| 1733 | 1733 | 0x2a, 0x6a, 0x00, |
| 1734 | 1734 | 0x99, 0xd8, 0x00, |
| 1735 | 1735 | 0x2f, 0x6f, 0x00, |
| r1404 | r1405 | |
| 1842 | 1842 | |
| 1843 | 1843 | static READ16_HANDLER( kakumei_mcu_r ) |
| 1844 | 1844 | { |
| 1845 | static int resp[] = { 0x8a, 0xd8, 0x00, | |
| 1845 | static const int resp[] = { 0x8a, 0xd8, 0x00, | |
| 1846 | 1846 | 0x3c, 0x7c, 0x00, |
| 1847 | 1847 | 0x99, 0xd8, 0x00, |
| 1848 | 1848 | 0x25, 0x65, 0x00, |
| r1404 | r1405 | |
| 1863 | 1863 | |
| 1864 | 1864 | static READ16_HANDLER( suchipi_mcu_r ) |
| 1865 | 1865 | { |
| 1866 | static int resp[] = { 0x8a, 0xd8, 0x00, | |
| 1866 | static const int resp[] = { 0x8a, 0xd8, 0x00, | |
| 1867 | 1867 | 0x3c, 0x7c, 0x00, |
| 1868 | 1868 | 0x99, 0xd8, 0x00, |
| 1869 | 1869 | 0x25, 0x65, 0x00, |
| r1404 | r1405 | |
|---|---|---|
| 535 | 535 | cpunum_set_input_line(2,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 536 | 536 | } |
| 537 | 537 | |
| 538 | static struct YM2610interface ym2610_interface = | |
| 538 | static const struct YM2610interface ym2610_interface = | |
| 539 | 539 | { |
| 540 | 540 | irqhandler, |
| 541 | 541 | REGION_SOUND1, |
| r1404 | r1405 | |
|---|---|---|
| 461 | 461 | |
| 462 | 462 | /* Sound Interfaces */ |
| 463 | 463 | |
| 464 | static struct AY8910interface lcay8910_interface = | |
| 464 | static const struct AY8910interface lcay8910_interface = | |
| 465 | 465 | { |
| 466 | 466 | input_port_3_r, //DSW0 |
| 467 | 467 | input_port_4_r //DSW1 |
| r1404 | r1405 | |
|---|---|---|
| 611 | 611 | * |
| 612 | 612 | *************************************/ |
| 613 | 613 | |
| 614 | static tms34010_config tms_config = | |
| 614 | static const tms34010_config tms_config = | |
| 615 | 615 | { |
| 616 | 616 | FALSE, /* halt on reset */ |
| 617 | 617 | 0, /* the screen operated on */ |
| r1404 | r1405 | |
|---|---|---|
| 1530 | 1530 | GFXDECODE_ENTRY( REGION_GFX2, 0x000000, chr_layout, 16*256, 16 ) |
| 1531 | 1531 | GFXDECODE_END |
| 1532 | 1532 | |
| 1533 | static struct C140interface C140_interface = | |
| 1533 | static const struct C140interface C140_interface = | |
| 1534 | 1534 | { |
| 1535 | 1535 | C140_TYPE_SYSTEM2, |
| 1536 | 1536 | REGION_SOUND1 |
| r1404 | r1405 | |
|---|---|---|
| 566 | 566 | |
| 567 | 567 | |
| 568 | 568 | |
| 569 | static struct AY8910interface stratvox_ay8910_interface = | |
| 569 | static const struct AY8910interface stratvox_ay8910_interface = | |
| 570 | 570 | { |
| 571 | 571 | 0, |
| 572 | 572 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 521 | 521 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 522 | 522 | } |
| 523 | 523 | |
| 524 | static struct YMF262interface ymf262_interface = | |
| 524 | static const struct YMF262interface ymf262_interface = | |
| 525 | 525 | { |
| 526 | 526 | sound_irq /* irq */ |
| 527 | 527 | }; |
| 528 | 528 | |
| 529 | 529 | |
| 530 | static struct YMZ280Binterface ymz280b_interface = | |
| 530 | static const struct YMZ280Binterface ymz280b_interface = | |
| 531 | 531 | { |
| 532 | 532 | REGION_SOUND1, |
| 533 | 533 | 0 /* irq */ |
| r1404 | r1405 | |
|---|---|---|
| 315 | 315 | cpunum_set_input_line(1, 0, irq ? ASSERT_LINE : CLEAR_LINE); |
| 316 | 316 | } |
| 317 | 317 | |
| 318 | static struct YM2151interface ym2151_interface = | |
| 318 | static const struct YM2151interface ym2151_interface = | |
| 319 | 319 | { |
| 320 | 320 | irqhandler |
| 321 | 321 | }; |
| r1404 | r1405 | |
|---|---|---|
| 1040 | 1040 | * |
| 1041 | 1041 | *************************************/ |
| 1042 | 1042 | |
| 1043 | static struct CustomSound_interface custom_interface = | |
| 1043 | static const struct CustomSound_interface custom_interface = | |
| 1044 | 1044 | { |
| 1045 | 1045 | exidy440_sh_start, |
| 1046 | 1046 | exidy440_sh_stop |
| r1404 | r1405 | |
|---|---|---|
| 725 | 725 | /* TX-1 Sound Hardware */ |
| 726 | 726 | /****************************/ |
| 727 | 727 | |
| 728 | static struct AY8910interface tx1_ay8910_interface = | |
| 728 | static const struct AY8910interface tx1_ay8910_interface = | |
| 729 | 729 | { |
| 730 | 730 | 0, /* Probably hooked up to discrete sound filters */ |
| 731 | 731 | 0, |
| r1404 | r1405 | |
| 785 | 785 | |
| 786 | 786 | |
| 787 | 787 | /* YM2149 IC19 - front left */ |
| 788 | static struct AY8910interface buggyboy_ay8910_interface_1 = | |
| 788 | static const struct AY8910interface buggyboy_ay8910_interface_1 = | |
| 789 | 789 | { |
| 790 | 790 | input_port_2_r, |
| 791 | 791 | input_port_3_r, |
| r1404 | r1405 | |
| 795 | 795 | |
| 796 | 796 | |
| 797 | 797 | /* YM2149 IC24 - front right */ |
| 798 | static struct AY8910interface buggyboy_ay8910_interface_2 = | |
| 798 | static const struct AY8910interface buggyboy_ay8910_interface_2 = | |
| 799 | 799 | { |
| 800 | 800 | 0, |
| 801 | 801 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 780 | 780 | { NULL, misc_w }, /* Port C write */ |
| 781 | 781 | }; |
| 782 | 782 | |
| 783 | static struct AY8910interface merit_ay8912_interface = | |
| 783 | static const struct AY8910interface merit_ay8912_interface = | |
| 784 | 784 | { |
| 785 | 785 | 0,0, |
| 786 | 786 | led2_w,0 |
| r1404 | r1405 | |
|---|---|---|
| 542 | 542 | OKIM6295_set_bank_base(1, (data & 1) * 0x40000); |
| 543 | 543 | } |
| 544 | 544 | |
| 545 | static struct YM2151interface ym2151_interface = | |
| 545 | static const struct YM2151interface ym2151_interface = | |
| 546 | 546 | { |
| 547 | 547 | sound_irq, |
| 548 | 548 | sound_bankswitch_w |
| r1404 | r1405 | |
|---|---|---|
| 161 | 161 | GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 8*4 ) |
| 162 | 162 | GFXDECODE_END |
| 163 | 163 | |
| 164 | static struct AY8910interface ay8910_interface = | |
| 164 | static const struct AY8910interface ay8910_interface = | |
| 165 | 165 | { |
| 166 | 166 | 0, /* not used ? */ |
| 167 | 167 | input_port_3_r, |
| r1404 | r1405 | |
|---|---|---|
| 497 | 497 | cpunum_set_input_line(2, INPUT_LINE_IRQ0, state); |
| 498 | 498 | } |
| 499 | 499 | |
| 500 | static struct YM2151interface ym2151_interface = | |
| 500 | static const struct YM2151interface ym2151_interface = | |
| 501 | 501 | { |
| 502 | 502 | sound_irq |
| 503 | 503 | }; |
| r1404 | r1405 | |
|---|---|---|
| 365 | 365 | cpunum_set_input_line(1,1,state); /* IRQ 2 */ |
| 366 | 366 | } |
| 367 | 367 | |
| 368 | static struct YM2151interface ym2151_interface = | |
| 368 | static const struct YM2151interface ym2151_interface = | |
| 369 | 369 | { |
| 370 | 370 | sound_irq |
| 371 | 371 | }; |
| r1404 | r1405 | |
|---|---|---|
| 287 | 287 | K007232_set_volume(0,1,0,(v & 0x0f) * 0x11); |
| 288 | 288 | } |
| 289 | 289 | |
| 290 | static struct K007232_interface k007232_interface = | |
| 290 | static const struct K007232_interface k007232_interface = | |
| 291 | 291 | { |
| 292 | 292 | REGION_SOUND1, /* memory regions */ |
| 293 | 293 | volume_callback /* external port callback */ |
| r1404 | r1405 | |
|---|---|---|
| 805 | 805 | /* A fake for the missing ball sprites #3 and #4 */ |
| 806 | 806 | static DRIVER_INIT( gypsyjug ) |
| 807 | 807 | { |
| 808 | static UINT8 ball[16*2] = | |
| 808 | static const UINT8 ball[16*2] = | |
| 809 | 809 | { |
| 810 | 810 | 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, |
| 811 | 811 | 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, |
| r1404 | r1405 | |
|---|---|---|
| 190 | 190 | *************************************/ |
| 191 | 191 | |
| 192 | 192 | /* used on the medium-resolution driver boards */ |
| 193 | static tms34010_config gsp_config_driver = | |
| 193 | static const tms34010_config gsp_config_driver = | |
| 194 | 194 | { |
| 195 | 195 | TRUE, /* halt on reset */ |
| 196 | 196 | 0, /* the screen operated on */ |
| r1404 | r1405 | |
| 204 | 204 | |
| 205 | 205 | |
| 206 | 206 | /* used on the low-resolution multisync boards for harddrvc, racedrvc, steeltal */ |
| 207 | static tms34010_config gsp_config_multisync = | |
| 207 | static const tms34010_config gsp_config_multisync = | |
| 208 | 208 | { |
| 209 | 209 | TRUE, /* halt on reset */ |
| 210 | 210 | 0, /* the screen operated on */ |
| r1404 | r1405 | |
| 218 | 218 | |
| 219 | 219 | |
| 220 | 220 | /* used on the low-resolution multisync board for stunrun */ |
| 221 | static tms34010_config gsp_config_multisync_stunrun = | |
| 221 | static const tms34010_config gsp_config_multisync_stunrun = | |
| 222 | 222 | { |
| 223 | 223 | TRUE, /* halt on reset */ |
| 224 | 224 | 0, /* the screen operated on */ |
| r1404 | r1405 | |
| 231 | 231 | }; |
| 232 | 232 | |
| 233 | 233 | |
| 234 | static tms34010_config msp_config = | |
| 234 | static const tms34010_config msp_config = | |
| 235 | 235 | { |
| 236 | 236 | TRUE, /* halt on reset */ |
| 237 | 237 | 0, /* the screen operated on */ |
| r1404 | r1405 | |
| 242 | 242 | }; |
| 243 | 243 | |
| 244 | 244 | |
| 245 | static struct dsp32_config dsp32c_config = | |
| 245 | static const struct dsp32_config dsp32c_config = | |
| 246 | 246 | { |
| 247 | 247 | hddsk_update_pif /* a change has occurred on an output pin */ |
| 248 | 248 | }; |
| r1404 | r1405 | |
|---|---|---|
| 1035 | 1035 | |
| 1036 | 1036 | ***************************************************************************/ |
| 1037 | 1037 | |
| 1038 | static struct AY8910interface srmp2_ay8910_interface = | |
| 1038 | static const struct AY8910interface srmp2_ay8910_interface = | |
| 1039 | 1039 | { |
| 1040 | 1040 | input_port_2_r, /* Input A: DSW 2 */ |
| 1041 | 1041 | input_port_1_r, /* Input B: DSW 1 */ |
| 1042 | 1042 | }; |
| 1043 | 1043 | |
| 1044 | 1044 | |
| 1045 | static struct MSM5205interface msm5205_interface = | |
| 1045 | static const struct MSM5205interface msm5205_interface = | |
| 1046 | 1046 | { |
| 1047 | 1047 | srmp2_adpcm_int, /* IRQ handler */ |
| 1048 | 1048 | MSM5205_S48_4B /* 8 KHz, 4 Bits */ |
| r1404 | r1405 | |
|---|---|---|
| 1853 | 1853 | |
| 1854 | 1854 | |
| 1855 | 1855 | |
| 1856 | static struct YM2151interface ym2151_interface = | |
| 1856 | static const struct YM2151interface ym2151_interface = | |
| 1857 | 1857 | { |
| 1858 | 1858 | m72_ym2151_irq_handler |
| 1859 | 1859 | }; |
| r1404 | r1405 | |
|---|---|---|
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | |
| 189 | static struct AY8910interface ay8910_1_interface = | |
| 189 | static const struct AY8910interface ay8910_1_interface = | |
| 190 | 190 | { |
| 191 | 191 | input_port_3_r, |
| 192 | 192 | 0 |
| 193 | 193 | }; |
| 194 | 194 | |
| 195 | 195 | |
| 196 | static struct AY8910interface ay8910_2_interface = | |
| 196 | static const struct AY8910interface ay8910_2_interface = | |
| 197 | 197 | { |
| 198 | 198 | input_port_1_r, |
| 199 | 199 | input_port_2_r |
| r1404 | r1405 | |
| 226 | 226 | } |
| 227 | 227 | |
| 228 | 228 | |
| 229 | static TTL74123_interface ttl74123_intf = | |
| 229 | static const TTL74123_interface ttl74123_intf = | |
| 230 | 230 | { |
| 231 | 231 | TTL74123_GROUNDED, /* the hook up type */ |
| 232 | 232 | RES_K(22), /* resistor connected to RCext */ |
| r1404 | r1405 | |
|---|---|---|
| 682 | 682 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 683 | 683 | } |
| 684 | 684 | |
| 685 | static struct YM3812interface ym3812_interface = | |
| 685 | static const struct YM3812interface ym3812_interface = | |
| 686 | 686 | { |
| 687 | 687 | irqhandler |
| 688 | 688 | }; |
| 689 | 689 | |
| 690 | static struct upd7759_interface upd7759_interface = | |
| 690 | static const struct upd7759_interface upd7759_interface = | |
| 691 | 691 | { |
| 692 | 692 | REGION_SOUND1 /* memory region */ |
| 693 | 693 | }; |
| r1404 | r1405 | |
|---|---|---|
| 160 | 160 | { |
| 161 | 161 | rectangle rect = { 0, 127, 0, 127 }; |
| 162 | 162 | |
| 163 | static crtc6845_interface crtc6845_intf = | |
| 163 | static const crtc6845_interface crtc6845_intf = | |
| 164 | 164 | { |
| 165 | 165 | 0, /* screen we are acting on */ |
| 166 | 166 | PIXEL_CLOCK / 8, /* the clock of the chip */ |
| r1404 | r1405 | |
| 647 | 647 | GFXDECODE_END |
| 648 | 648 | |
| 649 | 649 | |
| 650 | static struct AY8910interface ay8910_interface = | |
| 650 | static const struct AY8910interface ay8910_interface = | |
| 651 | 651 | { |
| 652 | 652 | NULL, |
| 653 | 653 | NULL, |
| r1404 | r1405 | |
|---|---|---|
| 244 | 244 | |
| 245 | 245 | |
| 246 | 246 | |
| 247 | static struct AY8910interface ay8910_interface = | |
| 247 | static const struct AY8910interface ay8910_interface = | |
| 248 | 248 | { |
| 249 | 249 | soundlatch_r, |
| 250 | 250 | soundlatch2_r |
| r1404 | r1405 | |
|---|---|---|
| 292 | 292 | psx_irq_set(0x400); |
| 293 | 293 | } |
| 294 | 294 | |
| 295 | static SCSIConfigTable dev_table = | |
| 295 | static const SCSIConfigTable dev_table = | |
| 296 | 296 | { |
| 297 | 297 | 1, /* 1 SCSI device */ |
| 298 | 298 | { |
| r1404 | r1405 | |
| 300 | 300 | } |
| 301 | 301 | }; |
| 302 | 302 | |
| 303 | static struct AM53CF96interface scsi_intf = | |
| 303 | static const struct AM53CF96interface scsi_intf = | |
| 304 | 304 | { |
| 305 | 305 | &dev_table, /* SCSI device table */ |
| 306 | 306 | &scsi_irq, /* command completion IRQ */ |
| r1404 | r1405 | |
| 331 | 331 | state_save_register_global_array(btc_trackball_data); |
| 332 | 332 | } |
| 333 | 333 | |
| 334 | static struct PSXSPUinterface konamigv_psxspu_interface = | |
| 334 | static const struct PSXSPUinterface konamigv_psxspu_interface = | |
| 335 | 335 | { |
| 336 | 336 | &g_p_n_psxram, |
| 337 | 337 | psx_irq_set, |
| r1404 | r1405 | |
|---|---|---|
| 531 | 531 | |
| 532 | 532 | |
| 533 | 533 | |
| 534 | static struct MSM5205interface msm5205_interface = | |
| 534 | static const struct MSM5205interface msm5205_interface = | |
| 535 | 535 | { |
| 536 | 536 | firetrap_adpcm_int, /* interrupt function */ |
| 537 | 537 | MSM5205_S48_4B /* 8KHz ? */ |
| r1404 | r1405 | |
|---|---|---|
| 346 | 346 | * |
| 347 | 347 | *************************************/ |
| 348 | 348 | |
| 349 | static struct MSM5205interface msm5205_intf = | |
| 349 | static const struct MSM5205interface msm5205_intf = | |
| 350 | 350 | { |
| 351 | 351 | vck_callback, |
| 352 | 352 | MSM5205_S64_4B |
| r1404 | r1405 | |
|---|---|---|
| 644 | 644 | } |
| 645 | 645 | |
| 646 | 646 | |
| 647 | static struct MSM5205interface msm5205_interface = | |
| 647 | static const struct MSM5205interface msm5205_interface = | |
| 648 | 648 | { |
| 649 | 649 | mastboy_adpcm_int, /* interrupt function */ |
| 650 | 650 | MSM5205_SEX_4B /* 4KHz 4-bit */ |
| r1404 | r1405 | |
|---|---|---|
| 325 | 325 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 326 | 326 | } |
| 327 | 327 | |
| 328 | static struct YM2203interface thedeep_ym2203_intf = | |
| 328 | static const struct YM2203interface thedeep_ym2203_intf = | |
| 329 | 329 | { |
| 330 | 330 | 0,0,0,0, |
| 331 | 331 | irqhandler |
| r1404 | r1405 | |
|---|---|---|
| 361 | 361 | cpunum_set_input_line(1, 0, irq ? ASSERT_LINE : CLEAR_LINE); |
| 362 | 362 | } |
| 363 | 363 | |
| 364 | static struct YM3812interface ym3812_interface = | |
| 364 | static const struct YM3812interface ym3812_interface = | |
| 365 | 365 | { |
| 366 | 366 | irq_handler |
| 367 | 367 | }; |
| r1404 | r1405 | |
|---|---|---|
| 494 | 494 | |
| 495 | 495 | |
| 496 | 496 | |
| 497 | static struct AY8910interface ay8910_interface = | |
| 497 | static const struct AY8910interface ay8910_interface = | |
| 498 | 498 | { |
| 499 | 499 | input_port_0_r, |
| 500 | 500 | input_port_1_r |
| 501 | 501 | }; |
| 502 | 502 | |
| 503 | static struct MSM5205interface msm5205_interface = | |
| 503 | static const struct MSM5205interface msm5205_interface = | |
| 504 | 504 | { |
| 505 | 505 | 0, /* interrupt function */ |
| 506 | 506 | MSM5205_SEX_4B /* vclk input mode */ |
| r1404 | r1405 | |
|---|---|---|
| 661 | 661 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 662 | 662 | } |
| 663 | 663 | |
| 664 | static struct YM2151interface ym2151_interface = | |
| 664 | static const struct YM2151interface ym2151_interface = | |
| 665 | 665 | { |
| 666 | 666 | irq_handler, |
| 667 | 667 | sound_bankswitch_w |
| 668 | 668 | }; |
| 669 | 669 | |
| 670 | static struct MSM5205interface msm5205_interface = | |
| 670 | static const struct MSM5205interface msm5205_interface = | |
| 671 | 671 | { |
| 672 | 672 | topspeed_msm5205_vck, /* VCK function */ |
| 673 | 673 | MSM5205_S48_4B /* 8 kHz */ |
| r1404 | r1405 | |
|---|---|---|
| 388 | 388 | AM_RANGE(0x580000, 0x580001) AM_WRITENOP |
| 389 | 389 | ADDRESS_MAP_END |
| 390 | 390 | |
| 391 | static struct K054539interface k054539_interface = | |
| 391 | static const struct K054539interface k054539_interface = | |
| 392 | 392 | { |
| 393 | 393 | REGION_SOUND1 |
| 394 | 394 | }; |
| r1404 | r1405 | |
| 547 | 547 | |
| 548 | 548 | INPUT_PORTS_END |
| 549 | 549 | |
| 550 | static ppc_config zr107_ppc_cfg = | |
| 550 | static const ppc_config zr107_ppc_cfg = | |
| 551 | 551 | { |
| 552 | 552 | PPC_MODEL_403GA |
| 553 | 553 | }; |
| r1404 | r1405 | |
|---|---|---|
| 263 | 263 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 264 | 264 | } |
| 265 | 265 | |
| 266 | static struct YM2151interface amspdwy_ym2151_interface = | |
| 266 | static const struct YM2151interface amspdwy_ym2151_interface = | |
| 267 | 267 | { |
| 268 | 268 | irq_handler |
| 269 | 269 | }; |
| r1404 | r1405 | |
|---|---|---|
| 352 | 352 | |
| 353 | 353 | /* Precalculated tables for H/V counters. Note the position the counter 'jumps' is marked with with |
| 354 | 354 | an empty comment */ |
| 355 | static UINT8 hc_256[] = | |
| 355 | static const UINT8 hc_256[] = | |
| 356 | 356 | { |
| 357 | 357 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 358 | 358 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, |
| r1404 | r1405 | |
| 379 | 379 | }; |
| 380 | 380 | |
| 381 | 381 | |
| 382 | static UINT8 vc_ntsc_192[] = | |
| 382 | static const UINT8 vc_ntsc_192[] = | |
| 383 | 383 | { |
| 384 | 384 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 385 | 385 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, |
| r1404 | r1405 | |
| 400 | 400 | 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, |
| 401 | 401 | }; |
| 402 | 402 | |
| 403 | static UINT8 vc_ntsc_224[] = | |
| 403 | static const UINT8 vc_ntsc_224[] = | |
| 404 | 404 | { |
| 405 | 405 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 406 | 406 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, |
| r1404 | r1405 | |
| 421 | 421 | 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, |
| 422 | 422 | }; |
| 423 | 423 | |
| 424 | static UINT8 vc_ntsc_240[] = | |
| 424 | static const UINT8 vc_ntsc_240[] = | |
| 425 | 425 | { |
| 426 | 426 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 427 | 427 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, |
| r1404 | r1405 | |
| 444 | 444 | |
| 445 | 445 | |
| 446 | 446 | |
| 447 | static UINT8 vc_pal_192[] = | |
| 447 | static const UINT8 vc_pal_192[] = | |
| 448 | 448 | { |
| 449 | 449 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 450 | 450 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, |
| r1404 | r1405 | |
| 469 | 469 | }; |
| 470 | 470 | |
| 471 | 471 | |
| 472 | static UINT8 vc_pal_224[] = | |
| 472 | static const UINT8 vc_pal_224[] = | |
| 473 | 473 | { |
| 474 | 474 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 475 | 475 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, |
| r1404 | r1405 | |
| 493 | 493 | 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, |
| 494 | 494 | }; |
| 495 | 495 | |
| 496 | static UINT8 vc_pal_240[] = | |
| 496 | static const UINT8 vc_pal_240[] = | |
| 497 | 497 | { |
| 498 | 498 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
| 499 | 499 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, |
| r1404 | r1405 | |
| 517 | 517 | 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, |
| 518 | 518 | }; |
| 519 | 519 | |
| 520 | static struct | |
| 520 | static const struct | |
| 521 | 521 | { |
| 522 | 522 | UINT8 sms2_name[40]; |
| 523 | 523 | int sms2_valid; |
| 524 | 524 | int sms2_height; |
| 525 | 525 | 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; | |
| 528 | 528 | |
| 529 | 529 | } sms_mode_table[] = |
| 530 | 530 | { |
| r1404 | r1405 | |
|---|---|---|
| 755 | 755 | cpunum_set_input_line_and_vector(1, 0, line ? ASSERT_LINE : CLEAR_LINE, 0x80/4); |
| 756 | 756 | } |
| 757 | 757 | |
| 758 | static struct YM2151interface galaxygn_ym2151_interface = | |
| 758 | static const struct YM2151interface galaxygn_ym2151_interface = | |
| 759 | 759 | { |
| 760 | 760 | galaxygn_sound_irq |
| 761 | 761 | }; |
| r1404 | r1405 | |
| 798 | 798 | |
| 799 | 799 | |
| 800 | 800 | // OKI M5205 running at 384kHz [18.432/48]. Sample rate = 384000 / 48 |
| 801 | static struct MSM5205interface msm5205_interface = | |
| 801 | static const struct MSM5205interface msm5205_interface = | |
| 802 | 802 | { |
| 803 | 803 | borntofi_adpcm_int, /* IRQ handler */ |
| 804 | 804 | MSM5205_S48_4B /* 8 kHz, 4 Bits */ |
| r1404 | r1405 | |
|---|---|---|
| 241 | 241 | GFXDECODE_END |
| 242 | 242 | |
| 243 | 243 | |
| 244 | static struct AY8910interface ay8910_interface = | |
| 244 | static const struct AY8910interface ay8910_interface = | |
| 245 | 245 | { |
| 246 | 246 | input_port_5_r, |
| 247 | 247 | input_port_4_r |
| r1404 | r1405 | |
|---|---|---|
| 1316 | 1316 | int chip; |
| 1317 | 1317 | int size; |
| 1318 | 1318 | UINT8 *data; |
| 1319 | static struct | |
| 1319 | static const struct | |
| 1320 | 1320 | { |
| 1321 | 1321 | int *start; |
| 1322 | 1322 | int region; |
| r1404 | r1405 | |
| 1515 | 1515 | flash_bank = -1; |
| 1516 | 1516 | } |
| 1517 | 1517 | |
| 1518 | static struct PSXSPUinterface konami573_psxspu_interface = | |
| 1518 | static const struct PSXSPUinterface konami573_psxspu_interface = | |
| 1519 | 1519 | { |
| 1520 | 1520 | &g_p_n_psxram, |
| 1521 | 1521 | psx_irq_set, |
| r1404 | r1405 | |
| 1713 | 1713 | if( gx700pwfbf_output_callback != NULL ) |
| 1714 | 1714 | { |
| 1715 | 1715 | 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 }; | |
| 1717 | 1717 | for( i = 0; i < 8; i++ ) |
| 1718 | 1718 | { |
| 1719 | 1719 | int oldbit = ( gx700pwbf_output_data[ offset ] >> shift[ i ] ) & 1; |
| r1404 | r1405 | |
| 1802 | 1802 | int bit; |
| 1803 | 1803 | } stage[ 2 ]; |
| 1804 | 1804 | |
| 1805 | static int mask[] = | |
| 1805 | static const int mask[] = | |
| 1806 | 1806 | { |
| 1807 | 1807 | 0, 6, 2, 4, |
| 1808 | 1808 | 0, 4, 0, 4, |
| r1404 | r1405 | |
| 2024 | 2024 | |
| 2025 | 2025 | /* GX894 digital i/o */ |
| 2026 | 2026 | |
| 2027 | static UINT8 ds2401_xid[] = | |
| 2027 | static const UINT8 ds2401_xid[] = | |
| 2028 | 2028 | { |
| 2029 | 2029 | 0x3d, 0xbc, 0x9a, 0x78, 0x56, 0x34, 0x12, 0x01 |
| 2030 | 2030 | }; |
| r1404 | r1405 | |
| 2157 | 2157 | if( gx894pwbba_output_callback != NULL ) |
| 2158 | 2158 | { |
| 2159 | 2159 | int i; |
| 2160 | static int shift[] = { 0, 2, 3, 1 }; | |
| 2160 | static const int shift[] = { 0, 2, 3, 1 }; | |
| 2161 | 2161 | for( i = 0; i < 4; i++ ) |
| 2162 | 2162 | { |
| 2163 | 2163 | int oldbit = ( gx894pwbba_output_data[ offset ] >> shift[ i ] ) & 1; |
| r1404 | r1405 | |
|---|---|---|
| 415 | 415 | |
| 416 | 416 | ***************************************************************************/ |
| 417 | 417 | |
| 418 | static struct YM2203interface ym2203_interface = | |
| 418 | static const struct YM2203interface ym2203_interface = | |
| 419 | 419 | { |
| 420 | 420 | 0, |
| 421 | 421 | 0, |
| r1404 | r1405 | |
| 423 | 423 | bladestl_port_B_w |
| 424 | 424 | }; |
| 425 | 425 | |
| 426 | static struct upd7759_interface upd7759_interface = | |
| 426 | static const struct upd7759_interface upd7759_interface = | |
| 427 | 427 | { |
| 428 | 428 | REGION_SOUND1 /* memory regions */ |
| 429 | 429 | }; |
| r1404 | r1405 | |
|---|---|---|
| 659 | 659 | * |
| 660 | 660 | *************************************/ |
| 661 | 661 | |
| 662 | static struct POKEYinterface pokey_interface_1 = | |
| 662 | static const struct POKEYinterface pokey_interface_1 = | |
| 663 | 663 | { |
| 664 | 664 | { 0 }, |
| 665 | 665 | input_port_1_r |
| 666 | 666 | }; |
| 667 | 667 | |
| 668 | 668 | |
| 669 | static struct POKEYinterface pokey_interface_2 = | |
| 669 | static const struct POKEYinterface pokey_interface_2 = | |
| 670 | 670 | { |
| 671 | 671 | { 0 }, |
| 672 | 672 | input_port_2_r |
| r1404 | r1405 | |
|---|---|---|
| 429 | 429 | logerror("YMZ280 is generating an interrupt. State=%08x\n",state); |
| 430 | 430 | } |
| 431 | 431 | |
| 432 | static struct YMZ280Binterface ymz280b_interface = | |
| 432 | static const struct YMZ280Binterface ymz280b_interface = | |
| 433 | 433 | { |
| 434 | 434 | REGION_SOUND1, |
| 435 | 435 | livequiz_irqhandler |
| r1404 | r1405 | |
|---|---|---|
| 843 | 843 | * AY8910 Interfase * |
| 844 | 844 | *******************/ |
| 845 | 845 | |
| 846 | static struct AY8910interface ay8910_interface = | |
| 846 | static const struct AY8910interface ay8910_interface = | |
| 847 | 847 | { |
| 848 | 848 | 0, 0, 0, 0 /* no ports used */ |
| 849 | 849 | }; |
| r1404 | r1405 | |
|---|---|---|
| 1389 | 1389 | * Sound Interface * |
| 1390 | 1390 | ************************/ |
| 1391 | 1391 | |
| 1392 | static struct AY8910interface ay8910_intf = | |
| 1392 | static const struct AY8910interface ay8910_intf = | |
| 1393 | 1393 | { |
| 1394 | 1394 | 0, // portA in |
| 1395 | 1395 | 0, // portB in |
| r1404 | r1405 | |
|---|---|---|
| 385 | 385 | |
| 386 | 386 | |
| 387 | 387 | |
| 388 | static struct K053260_interface k053260_interface = | |
| 388 | static const struct K053260_interface k053260_interface = | |
| 389 | 389 | { |
| 390 | 390 | REGION_SOUND1 |
| 391 | 391 | }; |
| r1404 | r1405 | |
|---|---|---|
| 685 | 685 | K007232_set_volume(0,1,0,(v & 0x0f) * 0x11); |
| 686 | 686 | } |
| 687 | 687 | |
| 688 | static struct K007232_interface k007232_interface = | |
| 688 | static const struct K007232_interface k007232_interface = | |
| 689 | 689 | { |
| 690 | 690 | REGION_SOUND1, /* memory regions */ |
| 691 | 691 | volume_callback /* external port callback */ |
| r1404 | r1405 | |
|---|---|---|
| 228 | 228 | |
| 229 | 229 | |
| 230 | 230 | /* 1-bit RGB palette */ |
| 231 | static UINT16 colortable_source[] = | |
| 231 | static const UINT16 colortable_source[] = | |
| 232 | 232 | { |
| 233 | 233 | 0, 1, 2, 3, 4, 5, 6, 7, |
| 234 | 234 | 0, 0, 1, 2, 3, 4, 5, 6, /* not sure about these, but they are only used */ |
| r1404 | r1405 | |
|---|---|---|
| 242 | 242 | return 0; |
| 243 | 243 | } |
| 244 | 244 | |
| 245 | static struct TAITO8741interface gsword_8741interface= | |
| 245 | static const struct TAITO8741interface gsword_8741interface= | |
| 246 | 246 | { |
| 247 | 247 | 4, /* 4 chips */ |
| 248 | 248 | { TAITO8741_MASTER,TAITO8741_SLAVE,TAITO8741_PORT,TAITO8741_PORT }, /* program mode */ |
| r1404 | r1405 | |
| 670 | 670 | |
| 671 | 671 | |
| 672 | 672 | |
| 673 | static struct AY8910interface ay8910_interface = | |
| 673 | static const struct AY8910interface ay8910_interface = | |
| 674 | 674 | { |
| 675 | 675 | 0, |
| 676 | 676 | 0, |
| r1404 | r1405 | |
| 678 | 678 | 0 |
| 679 | 679 | }; |
| 680 | 680 | |
| 681 | static struct MSM5205interface msm5205_interface = | |
| 681 | static const struct MSM5205interface msm5205_interface = | |
| 682 | 682 | { |
| 683 | 683 | 0, /* interrupt function */ |
| 684 | 684 | MSM5205_SEX_4B /* vclk input mode */ |
| r1404 | r1405 | |
|---|---|---|
| 961 | 961 | cpunum_set_input_line(1, 0, state); |
| 962 | 962 | } |
| 963 | 963 | |
| 964 | static struct YM3812interface ym3812_intf = | |
| 964 | static const struct YM3812interface ym3812_intf = | |
| 965 | 965 | { |
| 966 | 966 | soundirq /* IRQ Line */ |
| 967 | 967 | }; |
| r1404 | r1405 | |
|---|---|---|
| 377 | 377 | mario_sample_names |
| 378 | 378 | }; |
| 379 | 379 | |
| 380 | static struct AY8910interface ay8910_interface = | |
| 380 | static const struct AY8910interface ay8910_interface = | |
| 381 | 381 | { |
| 382 | 382 | soundlatch_r |
| 383 | 383 | }; |
| r1404 | r1405 | |
|---|---|---|
| 499 | 499 | |
| 500 | 500 | |
| 501 | 501 | |
| 502 | static struct K054539interface k054539_interface = | |
| 502 | static const struct K054539interface k054539_interface = | |
| 503 | 503 | { |
| 504 | 504 | REGION_SOUND1 |
| 505 | 505 | }; |
| r1404 | r1405 | |
|---|---|---|
| 298 | 298 | return sound_flag; |
| 299 | 299 | } |
| 300 | 300 | |
| 301 | static struct AY8910interface ay8912_interface = | |
| 301 | static const struct AY8910interface ay8912_interface = | |
| 302 | 302 | { |
| 303 | 303 | sound_r |
| 304 | 304 | }; |
| r1404 | r1405 | |
|---|---|---|
| 610 | 610 | 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 |
| 611 | 611 | INPUT_PORTS_END |
| 612 | 612 | |
| 613 | static struct K054539interface k054539_interface = | |
| 613 | static const struct K054539interface k054539_interface = | |
| 614 | 614 | { |
| 615 | 615 | REGION_SOUND1, |
| 616 | 616 | NULL, |
| r1404 | r1405 | |
|---|---|---|
| 117 | 117 | static WRITE8_HANDLER( videopin_led_w ) |
| 118 | 118 | { |
| 119 | 119 | int i = (video_screen_get_vpos(0) >> 5) & 7; |
| 120 | static const char* matrix[8][4] = | |
| 120 | static const char *const matrix[8][4] = | |
| 121 | 121 | { |
| 122 | 122 | { "LED26", "LED18", "LED11", "LED13" }, |
| 123 | 123 | { "LED25", "LED17", "LED10", "LED08" }, |
| r1404 | r1405 | |
|---|---|---|
| 283 | 283 | cpunum_set_input_line_and_vector(1,0,linestate,0xff); |
| 284 | 284 | } |
| 285 | 285 | |
| 286 | static struct YM3526interface ym3526_interface = | |
| 286 | static const struct YM3526interface ym3526_interface = | |
| 287 | 287 | { |
| 288 | 288 | irqhandler |
| 289 | 289 | }; |
| r1404 | r1405 | |
|---|---|---|
| 430 | 430 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 431 | 431 | } |
| 432 | 432 | |
| 433 | static struct YM2151interface ym2151_interface = | |
| 433 | static const struct YM2151interface ym2151_interface = | |
| 434 | 434 | { |
| 435 | 435 | irqhandler |
| 436 | 436 | }; |
| r1404 | r1405 | |
|---|---|---|
| 184 | 184 | cpunum_set_input_line(0,5,irq ? ASSERT_LINE : CLEAR_LINE); |
| 185 | 185 | } |
| 186 | 186 | |
| 187 | static struct YM2610interface ym2610_interface = | |
| 187 | static const struct YM2610interface ym2610_interface = | |
| 188 | 188 | { |
| 189 | 189 | irqhandler, |
| 190 | 190 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 143 | 143 | |
| 144 | 144 | static READ8_HANDLER( popflame_protection_r ) /* Not used by bootleg/hack */ |
| 145 | 145 | { |
| 146 | static int values[4] = { 0x78, 0x68, 0x48, 0x38|0x80 }; | |
| 146 | static const int values[4] = { 0x78, 0x68, 0x48, 0x38|0x80 }; | |
| 147 | 147 | static int count; |
| 148 | 148 | |
| 149 | 149 | count = (count + 1) % 4; |
| r1404 | r1405 | |
| 351 | 351 | |
| 352 | 352 | |
| 353 | 353 | |
| 354 | static struct CustomSound_interface naughtyb_custom_interface = | |
| 354 | static const struct CustomSound_interface naughtyb_custom_interface = | |
| 355 | 355 | { |
| 356 | 356 | naughtyb_sh_start |
| 357 | 357 | }; |
| 358 | 358 | |
| 359 | static struct CustomSound_interface popflame_custom_interface = | |
| 359 | static const struct CustomSound_interface popflame_custom_interface = | |
| 360 | 360 | { |
| 361 | 361 | popflame_sh_start |
| 362 | 362 | }; |
| 363 | 363 | |
| 364 | static struct TMS36XXinterface tms3615_interface = | |
| 364 | static const struct TMS36XXinterface tms3615_interface = | |
| 365 | 365 | { |
| 366 | 366 | TMS3615, /* TMS36xx subtype */ |
| 367 | 367 | /* |
| r1404 | r1405 | |
| 706 | 706 | ROM_LOAD( "comic_hi.u7", 0x1c000, 0x4000, CRC(8e8b5f71) SHA1(71514af2af2468a13cf5cc4237fa2590d7a16b27) ) |
| 707 | 707 | ROM_END |
| 708 | 708 | |
| 709 | ROM_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) ) | |
| 736 | ROM_END | |
| 737 | ||
| 709 | 738 | /* 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). |
| 710 | 739 | This may be a hacked/bootlegged version of trivia master, hacked to run on a naughty boy pcb, or (if ALL versions of trivia master ran on naughty boy pcbs) may be a 'second source bootleg', a bootleg of the trivia master naughty boy conversion. |
| 711 | 740 | */ |
| r1404 | r1405 | |
| 786 | 815 | GAME( 1982, popflamn, popflame, naughtyb, naughtyb, 0, ROT90, "Jaleco", "Pop Flamer (bootleg on Naughty Boy PCB)", 0 ) |
| 787 | 816 | GAME( 1985, trvmstr, 0, naughtyb, trvmstr, trvmstr, ROT90, "Enerdyne Technologies Inc.", "Trivia Master (set 1)", 0 ) |
| 788 | 817 | GAME( 1985, trvmstra, trvmstr, naughtyb, trvmstr, trvmstr, ROT90, "Enerdyne Technologies Inc.", "Trivia Master (set 2)", 0 ) |
| 818 | GAME( 1985, trvmstrb, trvmstr, naughtyb, trvmstr, trvmstr, ROT90, "Enerdyne Technologies Inc.", "Trivia Master (set 3)", 0 ) | |
| 789 | 819 | GAME( 1985, trvgns, 0, naughtyb, trvmstr, trvmstr, ROT90, "bootleg?", "Trivia Genius", 0 ) |
| r1404 | r1405 | |
|---|---|---|
| 339 | 339 | GFXDECODE_END |
| 340 | 340 | |
| 341 | 341 | |
| 342 | static struct POKEYinterface pokey_interface_1 = | |
| 342 | static const struct POKEYinterface pokey_interface_1 = | |
| 343 | 343 | { |
| 344 | 344 | { 0 }, |
| 345 | 345 | input_port_3_r |
| 346 | 346 | }; |
| 347 | 347 | |
| 348 | static struct POKEYinterface pokey_interface_2 = | |
| 348 | static const struct POKEYinterface pokey_interface_2 = | |
| 349 | 349 | { |
| 350 | 350 | { runaway_pot_r,runaway_pot_r,runaway_pot_r,runaway_pot_r,runaway_pot_r,runaway_pot_r,runaway_pot_r,runaway_pot_r } |
| 351 | 351 | }; |
| r1404 | r1405 | |
|---|---|---|
| 439 | 439 | |
| 440 | 440 | MACHINE_DRIVER_END |
| 441 | 441 | |
| 442 | static struct pci_device_info intel82439tx = | |
| 442 | static const struct pci_device_info intel82439tx = | |
| 443 | 443 | { |
| 444 | 444 | intel82439tx_pci_r, |
| 445 | 445 | intel82439tx_pci_w |
| 446 | 446 | }; |
| 447 | 447 | |
| 448 | static struct pci_device_info intel82371ab = | |
| 448 | static const struct pci_device_info intel82371ab = | |
| 449 | 449 | { |
| 450 | 450 | intel82371ab_pci_r, |
| 451 | 451 | intel82371ab_pci_w |
| r1404 | r1405 | |
| 466 | 466 | pic8259_set_irq_line(1, 6, state); |
| 467 | 467 | } |
| 468 | 468 | |
| 469 | static struct kbdc8042_interface at8042 = | |
| 469 | static const struct kbdc8042_interface at8042 = | |
| 470 | 470 | { |
| 471 | 471 | KBDC8042_AT386, set_gate_a20, keyboard_interrupt |
| 472 | 472 | }; |
| 473 | 473 | |
| 474 | static struct ide_interface ide_intf = | |
| 474 | static const struct ide_interface ide_intf = | |
| 475 | 475 | { |
| 476 | 476 | ide_interrupt |
| 477 | 477 | }; |
| r1404 | r1405 | |
|---|---|---|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | /* chip #0: player inputs, buttons, coins */ |
| 84 | static struct namcoio_interface intf0_coin = | |
| 84 | static const struct namcoio_interface intf0_coin = | |
| 85 | 85 | { |
| 86 | 86 | { in1_h, in0_l, in0_h, in1_l }, /* port read handlers */ |
| 87 | 87 | { out_coin0, out_coin1 } /* port write handlers */ |
| 88 | 88 | }; |
| 89 | static struct namcoio_interface intf0 = | |
| 89 | static const struct namcoio_interface intf0 = | |
| 90 | 90 | { |
| 91 | 91 | { in1_h, in0_l, in0_h, in1_l }, /* port read handlers */ |
| 92 | 92 | { NULL, NULL } /* port write handlers */ |
| 93 | 93 | }; |
| 94 | 94 | |
| 95 | 95 | /* chip #1: dip switches */ |
| 96 | static struct namcoio_interface intf1 = | |
| 96 | static const struct namcoio_interface intf1 = | |
| 97 | 97 | { |
| 98 | 98 | { dipA_h, dipB_l, dipB_h, dipA_l }, /* port read handlers */ |
| 99 | 99 | { flip, NULL } /* port write handlers */ |
| 100 | 100 | }; |
| 101 | 101 | |
| 102 | 102 | /* chip #2: test/cocktail, optional buttons */ |
| 103 | static struct namcoio_interface intf2 = | |
| 103 | static const struct namcoio_interface intf2 = | |
| 104 | 104 | { |
| 105 | 105 | { NULL, in2_l, in2_h, in3 }, /* port read handlers */ |
| 106 | 106 | { NULL, NULL } /* port write handlers */ |
| r1404 | r1405 | |
| 557 | 557 | |
| 558 | 558 | |
| 559 | 559 | |
| 560 | static struct namco_interface namco_interface = | |
| 560 | static const struct namco_interface namco_interface = | |
| 561 | 561 | { |
| 562 | 562 | 8, /* number of voices */ |
| 563 | 563 | REGION_SOUND1 /* memory region */ |
| r1404 | r1405 | |
|---|---|---|
| 464 | 464 | tumbleb2_playmusic(); |
| 465 | 465 | } |
| 466 | 466 | |
| 467 | static int tumbleb_sound_lookup[256] = { | |
| 467 | static const int tumbleb_sound_lookup[256] = { | |
| 468 | 468 | /*0 1 2 3 4 5 6 7 8 9 a b c d e f*/ |
| 469 | 469 | 0x00, -2, 0x00, 0x00, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, 0x00, -2, /* 0 */ |
| 470 | 470 | -2, 0x00, -2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 1 */ |
| r1404 | r1405 | |
| 2159 | 2159 | } |
| 2160 | 2160 | |
| 2161 | 2161 | |
| 2162 | static struct YM2151interface semicom_ym2151_interface = | |
| 2162 | static const struct YM2151interface semicom_ym2151_interface = | |
| 2163 | 2163 | { |
| 2164 | 2164 | semicom_irqhandler |
| 2165 | 2165 | }; |
| r1404 | r1405 | |
|---|---|---|
| 840 | 840 | |
| 841 | 841 | |
| 842 | 842 | |
| 843 | static struct upd7759_interface upd7759_interface = | |
| 843 | static const struct upd7759_interface upd7759_interface = | |
| 844 | 844 | { |
| 845 | 845 | REGION_SOUND1 |
| 846 | 846 | }; |
| 847 | 847 | |
| 848 | static tms34010_config vgb_config = | |
| 848 | static const tms34010_config vgb_config = | |
| 849 | 849 | { |
| 850 | 850 | FALSE, /* halt on reset ????? - check this */ |
| 851 | 851 | 0, /* the screen operated on */ |
| r1404 | r1405 | |
|---|---|---|
| 243 | 243 | |
| 244 | 244 | /****************************************************************************/ |
| 245 | 245 | |
| 246 | static struct YM2203interface ym2203_interface = | |
| 246 | static const struct YM2203interface ym2203_interface = | |
| 247 | 247 | { |
| 248 | 248 | soundlatch_r |
| 249 | 249 | }; |
| r1404 | r1405 | |
|---|---|---|
| 420 | 420 | } |
| 421 | 421 | } |
| 422 | 422 | |
| 423 | static struct MSM5205interface msm_interface = | |
| 423 | static const struct MSM5205interface msm_interface = | |
| 424 | 424 | { |
| 425 | 425 | msmint, /* interrupt function */ |
| 426 | 426 | MSM5205_S96_4B /* 1 / 96 = 3906.25Hz playback */ |
| r1404 | r1405 | |
|---|---|---|
| 639 | 639 | |
| 640 | 640 | /*****************************************************************************/ |
| 641 | 641 | |
| 642 | static struct YM2151interface ym2151_interface = | |
| 642 | static const struct YM2151interface ym2151_interface = | |
| 643 | 643 | { |
| 644 | 644 | m72_ym2151_irq_handler |
| 645 | 645 | }; |
| r1404 | r1405 | |
|---|---|---|
| 347 | 347 | 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff |
| 348 | 348 | }; |
| 349 | 349 | |
| 350 | static struct EEPROM_interface gunbustr_eeprom_interface = | |
| 350 | static const struct EEPROM_interface gunbustr_eeprom_interface = | |
| 351 | 351 | { |
| 352 | 352 | 6, /* address bits */ |
| 353 | 353 | 16, /* data bits */ |
| r1404 | r1405 | |
|---|---|---|
| 1134 | 1134 | return 0xff; |
| 1135 | 1135 | } |
| 1136 | 1136 | |
| 1137 | static UINT8 nightstr_stick[128]= | |
| 1137 | static const UINT8 nightstr_stick[128]= | |
| 1138 | 1138 | { |
| 1139 | 1139 | 0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0xbe,0xbf,0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7, |
| 1140 | 1140 | 0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7, |
| r1404 | r1405 | |
| 2752 | 2752 | // cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 2753 | 2753 | } |
| 2754 | 2754 | |
| 2755 | static struct YM2610interface ym2610_interface = | |
| 2755 | static const struct YM2610interface ym2610_interface = | |
| 2756 | 2756 | { |
| 2757 | 2757 | irqhandler, |
| 2758 | 2758 | REGION_SOUND2, /* Delta-T */ |
| 2759 | 2759 | REGION_SOUND1 /* ADPCM */ |
| 2760 | 2760 | }; |
| 2761 | 2761 | |
| 2762 | static struct YM2610interface ym2610_interfaceb = | |
| 2762 | static const struct YM2610interface ym2610_interfaceb = | |
| 2763 | 2763 | { |
| 2764 | 2764 | irqhandlerb, |
| 2765 | 2765 | REGION_SOUND2, /* Delta-T */ |
| r1404 | r1405 | |
| 2786 | 2786 | return 0; |
| 2787 | 2787 | } |
| 2788 | 2788 | |
| 2789 | static struct CustomSound_interface subwoofer_interface = | |
| 2789 | static const struct CustomSound_interface subwoofer_interface = | |
| 2790 | 2790 | { |
| 2791 | 2791 | subwoofer_sh_start, |
| 2792 | 2792 | 0, /* none */ |
| r1404 | r1405 | |
|---|---|---|
| 674 | 674 | GFXDECODE_END |
| 675 | 675 | |
| 676 | 676 | |
| 677 | static struct TMS36XXinterface phoenix_tms36xx_interface = | |
| 677 | static const struct TMS36XXinterface phoenix_tms36xx_interface = | |
| 678 | 678 | { |
| 679 | 679 | MM6221AA, /* TMS36xx subtype(s) */ |
| 680 | 680 | {0.50,0,0,1.05,0,0}, /* decay times of voices */ |
| 681 | 681 | 0.21 /* tune speed (time between beats) */ |
| 682 | 682 | }; |
| 683 | 683 | |
| 684 | static struct CustomSound_interface phoenix_custom_interface = | |
| 684 | static const struct CustomSound_interface phoenix_custom_interface = | |
| 685 | 685 | { |
| 686 | 686 | phoenix_sh_start |
| 687 | 687 | }; |
| 688 | 688 | |
| 689 | static struct TMS36XXinterface pleiads_tms36xx_interface = | |
| 689 | static const struct TMS36XXinterface pleiads_tms36xx_interface = | |
| 690 | 690 | { |
| 691 | 691 | TMS3615, /* TMS36xx subtype(s) */ |
| 692 | 692 | /* |
| r1404 | r1405 | |
| 698 | 698 | {0.33,0.33,0,0.33,0,0.33} |
| 699 | 699 | }; |
| 700 | 700 | |
| 701 | static struct CustomSound_interface pleiads_custom_interface = | |
| 701 | static const struct CustomSound_interface pleiads_custom_interface = | |
| 702 | 702 | { |
| 703 | 703 | pleiads_sh_start |
| 704 | 704 | }; |
| 705 | 705 | |
| 706 | static struct AY8910interface survival_ay8910_interface = | |
| 706 | static const struct AY8910interface survival_ay8910_interface = | |
| 707 | 707 | { |
| 708 | 708 | 0, |
| 709 | 709 | survival_protection_r |
| r1404 | r1405 | |
|---|---|---|
| 517 | 517 | GFXDECODE_ENTRY( REGION_GFX2, 0, tile_layout, 0, 64 ) |
| 518 | 518 | GFXDECODE_END |
| 519 | 519 | |
| 520 | static struct MSM5232interface msm5232_interface = | |
| 520 | static const struct MSM5232interface msm5232_interface = | |
| 521 | 521 | { |
| 522 | 522 | { 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) */ |
| 523 | 523 | }; |
| r1404 | r1405 | |
|---|---|---|
| 869 | 869 | pbillian_sh_start |
| 870 | 870 | }; |
| 871 | 871 | |
| 872 | static struct AY8910interface pbillian_ay8910_interface = | |
| 872 | static const struct AY8910interface pbillian_ay8910_interface = | |
| 873 | 873 | { |
| 874 | 874 | pbillian_ay_port_a_r, /* port Aread */ |
| 875 | 875 | input_port_2_r /* port Bread */ |
| 876 | 876 | }; |
| 877 | 877 | |
| 878 | static struct AY8910interface hotsmash_ay8910_interface = | |
| 878 | static const struct AY8910interface hotsmash_ay8910_interface = | |
| 879 | 879 | { |
| 880 | 880 | hotsmash_ay_port_a_r, /* port Aread */ |
| 881 | 881 | input_port_2_r /* port Bread */ |
| 882 | 882 | }; |
| 883 | 883 | |
| 884 | static struct AY8910interface sqix_ay8910_interface_1 = | |
| 884 | static const struct AY8910interface sqix_ay8910_interface_1 = | |
| 885 | 885 | { |
| 886 | 886 | input_port_3_r, /* port Aread */ |
| 887 | 887 | in4_mcu_r, /* port Bread */ |
| 888 | 888 | }; |
| 889 | 889 | |
| 890 | static struct AY8910interface sqix_ay8910_interface_2 = | |
| 890 | static const struct AY8910interface sqix_ay8910_interface_2 = | |
| 891 | 891 | { |
| 892 | 892 | input_port_1_r, /* port Aread */ |
| 893 | 893 | sqix_from_mcu_r, /* port Bread */ |
| r1404 | r1405 | |
| 895 | 895 | sqix_z80_mcu_w /* port Bwrite */ |
| 896 | 896 | }; |
| 897 | 897 | |
| 898 | static struct AY8910interface bootleg_ay8910_interface_1 = | |
| 898 | static const struct AY8910interface bootleg_ay8910_interface_1 = | |
| 899 | 899 | { |
| 900 | 900 | input_port_3_r, /* port Aread */ |
| 901 | 901 | input_port_4_r /* port Bread */ |
| 902 | 902 | }; |
| 903 | 903 | |
| 904 | static struct AY8910interface bootleg_ay8910_interface_2 = | |
| 904 | static const struct AY8910interface bootleg_ay8910_interface_2 = | |
| 905 | 905 | { |
| 906 | 906 | input_port_1_r, /* port Aread */ |
| 907 | 907 | bootleg_in0_r /* port Bread */ |
| r1404 | r1405 | |
| 1246 | 1246 | memcpy(temp,&src[i],16); |
| 1247 | 1247 | for (j = 0;j < 16;j++) |
| 1248 | 1248 | { |
| 1249 | static int convtable[16] = | |
| 1249 | static const int convtable[16] = | |
| 1250 | 1250 | { |
| 1251 | 1251 | 0xc, 0x9, 0xb, 0xa, |
| 1252 | 1252 | 0x8, 0xd, 0xf, 0xe, |
| r1404 | r1405 | |
|---|---|---|
| 724 | 724 | cpunum_set_input_line(0, INPUT_LINE_NMI, PULSE_LINE); |
| 725 | 725 | } |
| 726 | 726 | |
| 727 | static struct NESinterface nes_interface = | |
| 727 | static const struct NESinterface nes_interface = | |
| 728 | 728 | { |
| 729 | 729 | REGION_CPU2 |
| 730 | 730 | }; |
| r1404 | r1405 | |
|---|---|---|
| 204 | 204 | |
| 205 | 205 | static UINT32 *rom_base; |
| 206 | 206 | |
| 207 | static struct ide_interface ide_intf = | |
| 207 | static const struct ide_interface ide_intf = | |
| 208 | 208 | { |
| 209 | 209 | jaguar_external_int |
| 210 | 210 | }; |
| r1404 | r1405 | |
| 964 | 964 | * |
| 965 | 965 | *************************************/ |
| 966 | 966 | |
| 967 | static struct r3000_config config = | |
| 967 | static const struct r3000_config config = | |
| 968 | 968 | { |
| 969 | 969 | 0, /* 1 if we have an FPU, 0 otherwise */ |
| 970 | 970 | 4096, /* code cache size */ |
| r1404 | r1405 | |
| 972 | 972 | }; |
| 973 | 973 | |
| 974 | 974 | |
| 975 | static struct jaguar_config gpu_config = | |
| 975 | static const struct jaguar_config gpu_config = | |
| 976 | 976 | { |
| 977 | 977 | jaguar_gpu_cpu_int |
| 978 | 978 | }; |
| 979 | 979 | |
| 980 | 980 | |
| 981 | static struct jaguar_config dsp_config = | |
| 981 | static const struct jaguar_config dsp_config = | |
| 982 | 982 | { |
| 983 | 983 | jaguar_dsp_cpu_int |
| 984 | 984 | }; |
| r1404 | r1405 | |
|---|---|---|
| 428 | 428 | * |
| 429 | 429 | *************************************/ |
| 430 | 430 | |
| 431 | static struct YM2151interface ym2151_interface = | |
| 431 | static const struct YM2151interface ym2151_interface = | |
| 432 | 432 | { |
| 433 | 433 | atarigen_ym2151_irq_gen |
| 434 | 434 | }; |
| r1404 | r1405 | |
|---|---|---|
| 575 | 575 | set_led_status(1,!(data & 0x10)); // 'LOCK-ON' lamp |
| 576 | 576 | } |
| 577 | 577 | |
| 578 | static struct YM2203interface ym2203_interface = | |
| 578 | static const struct YM2203interface ym2203_interface = | |
| 579 | 579 | { |
| 580 | 580 | input_port_2_r, |
| 581 | 581 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 626 | 626 | } |
| 627 | 627 | |
| 628 | 628 | /* chip #0: player inputs, buttons, coins */ |
| 629 | static struct namcoio_interface intf0 = | |
| 629 | static const struct namcoio_interface intf0 = | |
| 630 | 630 | { |
| 631 | 631 | { in1_h, in0_l, in0_h, in1_l }, /* port read handlers */ |
| 632 | 632 | { NULL, NULL } /* port write handlers */ |
| 633 | 633 | }; |
| 634 | static struct namcoio_interface intf0_lamps = | |
| 634 | static const struct namcoio_interface intf0_lamps = | |
| 635 | 635 | { |
| 636 | 636 | { in1_h, in0_l, in0_h, in1_l }, /* port read handlers */ |
| 637 | 637 | { out_lamps, NULL } /* port write handlers */ |
| 638 | 638 | }; |
| 639 | 639 | /* chip #1: dip switches, test/cocktail, optional buttons */ |
| 640 | static struct namcoio_interface intf1 = | |
| 640 | static const struct namcoio_interface intf1 = | |
| 641 | 641 | { |
| 642 | 642 | { dipB_mux, dipA_l, dipA_h, in2 }, /* port read handlers */ |
| 643 | 643 | { out_mux, NULL } /* port write handlers */ |
| 644 | 644 | }; |
| 645 | static struct namcoio_interface intf1_interleave = | |
| 645 | static const struct namcoio_interface intf1_interleave = | |
| 646 | 646 | { |
| 647 | 647 | { dipB_muxi, dipA_l, dipA_h, in2 }, /* port read handlers */ |
| 648 | 648 | { out_mux, NULL } /* port write handlers */ |
| r1404 | r1405 | |
| 1559 | 1559 | |
| 1560 | 1560 | |
| 1561 | 1561 | |
| 1562 | static struct namco_interface namco_interface = | |
| 1562 | static const struct namco_interface namco_interface = | |
| 1563 | 1563 | { |
| 1564 | 1564 | 8, /* number of voices */ |
| 1565 | 1565 | REGION_SOUND1 /* memory region */ |
| r1404 | r1405 | |
|---|---|---|
| 363 | 363 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 364 | 364 | } |
| 365 | 365 | |
| 366 | static struct YM2151interface ym2151_interface = | |
| 366 | static const struct YM2151interface ym2151_interface = | |
| 367 | 367 | { |
| 368 | 368 | irqhandler, |
| 369 | 369 | rastan_bankswitch_w |
| 370 | 370 | }; |
| 371 | 371 | |
| 372 | static struct MSM5205interface msm5205_interface = | |
| 372 | static const struct MSM5205interface msm5205_interface = | |
| 373 | 373 | { |
| 374 | 374 | rastan_msm5205_vck, /* VCK function */ |
| 375 | 375 | MSM5205_S48_4B /* 8 kHz */ |
| r1404 | r1405 | |
|---|---|---|
| 344 | 344 | |
| 345 | 345 | static READ16_HANDLER( pntnpuzl_280014_r ) |
| 346 | 346 | { |
| 347 | static int startup[3] = { 0x80, 0x0c, 0x00 }; | |
| 347 | static const int startup[3] = { 0x80, 0x0c, 0x00 }; | |
| 348 | 348 | int res; |
| 349 | 349 | |
| 350 | 350 | if (serial_out == 0x11) |
| r1404 | r1405 | |
|---|---|---|
| 331 | 331 | PORT_DIPUNUSED( 0x8000, IP_ACTIVE_LOW ) |
| 332 | 332 | INPUT_PORTS_END |
| 333 | 333 | |
| 334 | static struct K054539interface k054539_interface = | |
| 334 | static const struct K054539interface k054539_interface = | |
| 335 | 335 | { |
| 336 | 336 | REGION_SOUND1, |
| 337 | 337 | NULL, |
| r1404 | r1405 | |
|---|---|---|
| 51 | 51 | other locations are less frequently used. |
| 52 | 52 | */ |
| 53 | 53 | |
| 54 | static int f1dream_613ea_lookup[16] = { | |
| 54 | static const int f1dream_613ea_lookup[16] = { | |
| 55 | 55 | 0x0052, 0x0031, 0x00a7, 0x0043, 0x0007, 0x008a, 0x00b1, 0x0066, 0x009f, 0x00cc, 0x0009, 0x004d, 0x0033, 0x0028, 0x00d0, 0x0025}; |
| 56 | 56 | |
| 57 | static int f1dream_613eb_lookup[256] = { | |
| 57 | static const int f1dream_613eb_lookup[256] = { | |
| 58 | 58 | 0x0001, 0x00b5, 0x00b6, 0x00b6, 0x00b6, 0x00b6, 0x00b6, 0x00b6, 0x00b7, 0x0001, 0x00b8, 0x002f, 0x002f, 0x002f, 0x002f, 0x00b9, |
| 59 | 59 | 0x00aa, 0x0031, 0x00ab, 0x00ab, 0x00ab, 0x00ac, 0x00ad, 0x00ad, 0x00ae, 0x00af, 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x0091, |
| 60 | 60 | 0x009c, 0x009d, 0x009e, 0x009f, 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x009b, 0x0091, |
| r1404 | r1405 | |
| 72 | 72 | 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001e, 0x001e, 0x001e, 0x001f, 0x0020, |
| 73 | 73 | 0x000c, 0x000d, 0x000e, 0x0001, 0x000f, 0x0010, 0x0011, 0x0012, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x0013 }; |
| 74 | 74 | |
| 75 | static int f1dream_17b74_lookup[128] = { | |
| 75 | static const int f1dream_17b74_lookup[128] = { | |
| 76 | 76 | 0x0003, 0x0040, 0x0005, 0x0080, 0x0003, 0x0080, 0x0005, 0x00a0, 0x0003, 0x0040, 0x0005, 0x00c0, 0x0003, 0x0080, 0x0005, 0x00e0, |
| 77 | 77 | 0x0003, 0x0040, 0x0006, 0x0000, 0x0003, 0x0080, 0x0006, 0x0020, 0x0003, 0x0040, 0x0006, 0x0040, 0x0003, 0x0080, 0x0006, 0x0060, |
| 78 | 78 | 0x0000, 0x00a0, 0x0009, 0x00e0, 0x0000, 0x00e0, 0x000a, 0x0000, 0x0000, 0x00a0, 0x000a, 0x0020, 0x0000, 0x00e0, 0x000a, 0x0040, |
| r1404 | r1405 | |
| 82 | 82 | 0x0000, 0x00a0, 0x0009, 0x00e0, 0x0000, 0x00e0, 0x000a, 0x0000, 0x0000, 0x00a0, 0x000a, 0x0020, 0x0000, 0x00e0, 0x000a, 0x0040, |
| 83 | 83 | 0x0000, 0x00a0, 0x000a, 0x0060, 0x0000, 0x00e0, 0x000a, 0x0080, 0x0000, 0x00a0, 0x000a, 0x00a0, 0x0000, 0x00e0, 0x000a, 0x00c0 }; |
| 84 | 84 | |
| 85 | static int f1dream_2450_lookup[32] = { | |
| 85 | static const int f1dream_2450_lookup[32] = { | |
| 86 | 86 | 0x0003, 0x0080, 0x0006, 0x0060, 0x0000, 0x00e0, 0x000a, 0x00c0, 0x0003, 0x0080, 0x0006, 0x0060, 0x0000, 0x00e0, 0x000a, 0x00c0, |
| 87 | 87 | 0x0003, 0x0080, 0x0006, 0x0060, 0x0000, 0x00e0, 0x000a, 0x00c0, 0x0003, 0x0080, 0x0006, 0x0060, 0x0000, 0x00e0, 0x000a, 0x00c0 }; |
| 88 | 88 | |
| r1404 | r1405 | |
| 531 | 531 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 532 | 532 | } |
| 533 | 533 | |
| 534 | static struct YM2203interface ym2203_interface = | |
| 534 | static const struct YM2203interface ym2203_interface = | |
| 535 | 535 | { |
| 536 | 536 | 0,0,0,0,irqhandler |
| 537 | 537 | }; |
| 538 | 538 | |
| 539 | static struct MSM5205interface msm5205_interface = | |
| 539 | static const struct MSM5205interface msm5205_interface = | |
| 540 | 540 | { |
| 541 | 541 | 0, /* interrupt function */ |
| 542 | 542 | MSM5205_SEX_4B /* 4KHz playback ? */ |
| r1404 | r1405 | |
|---|---|---|
| 555 | 555 | * |
| 556 | 556 | *************************************/ |
| 557 | 557 | |
| 558 | static struct TMS5220interface tms5220_interface = | |
| 558 | static const struct TMS5220interface tms5220_interface = | |
| 559 | 559 | { |
| 560 | 560 | looping_spcint |
| 561 | 561 | }; |
| 562 | 562 | |
| 563 | static struct AY8910interface ay8910_interface = | |
| 563 | static const struct AY8910interface ay8910_interface = | |
| 564 | 564 | { |
| 565 | 565 | soundlatch_r |
| 566 | 566 | }; |
| r1404 | r1405 | |
|---|---|---|
| 860 | 860 | |
| 861 | 861 | static WRITE16_HANDLER( analog_custom_io_w ) |
| 862 | 862 | { |
| 863 | static const char *names[] = { "ANALOG1", "ANALOG2", "ANALOG3", "ANALOG4" }; | |
| 863 | static const char *const names[] = { "ANALOG1", "ANALOG2", "ANALOG3", "ANALOG4" }; | |
| 864 | 864 | switch (offset) |
| 865 | 865 | { |
| 866 | 866 | case 0x10/2: |
| r1404 | r1405 | |
| 876 | 876 | |
| 877 | 877 | static READ16_HANDLER( extra_custom_io_r ) |
| 878 | 878 | { |
| 879 | static const char *names[] = { "EXTRA1", "EXTRA2", "EXTRA3", "EXTRA4" }; | |
| 879 | static const char *const names[] = { "EXTRA1", "EXTRA2", "EXTRA3", "EXTRA4" }; | |
| 880 | 880 | switch (offset) |
| 881 | 881 | { |
| 882 | 882 | case 0x20/2: |
| r1404 | r1405 | |
| 893 | 893 | |
| 894 | 894 | static WRITE16_HANDLER( orunners_custom_io_w ) |
| 895 | 895 | { |
| 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" }; | |
| 897 | 897 | switch (offset) |
| 898 | 898 | { |
| 899 | 899 | case 0x10/2: |
| r1404 | r1405 | |
| 913 | 913 | |
| 914 | 914 | static READ16_HANDLER( sonic_custom_io_r ) |
| 915 | 915 | { |
| 916 | static const char *names[] = { "TRACKX1", "TRACKY1", "TRACKX2", "TRACKY2", "TRACKX3", "TRACKY3" }; | |
| 916 | static const char *const names[] = { "TRACKX1", "TRACKY1", "TRACKX2", "TRACKY2", "TRACKX3", "TRACKY3" }; | |
| 917 | 917 | |
| 918 | 918 | switch (offset) |
| 919 | 919 | { |
| r1404 | r1405 | |
| 933 | 933 | |
| 934 | 934 | static WRITE16_HANDLER( sonic_custom_io_w ) |
| 935 | 935 | { |
| 936 | static const char *names[] = { "TRACKX1", "TRACKY1", "TRACKX2", "TRACKY2", "TRACKX3", "TRACKY3" }; | |
| 936 | static const char *const names[] = { "TRACKX1", "TRACKY1", "TRACKX2", "TRACKY2", "TRACKX3", "TRACKY3" }; | |
| 937 | 937 | |
| 938 | 938 | switch (offset) |
| 939 | 939 | { |
| r1404 | r1405 | |
|---|---|---|
| 829 | 829 | |
| 830 | 830 | |
| 831 | 831 | |
| 832 | static struct AY8910interface ay8910_interface_1 = | |
| 832 | static const struct AY8910interface ay8910_interface_1 = | |
| 833 | 833 | { |
| 834 | 834 | input_port_0_r, |
| 835 | 835 | input_port_1_r |
| 836 | 836 | }; |
| 837 | 837 | |
| 838 | static struct AY8910interface ay8910_interface_2 = | |
| 838 | static const struct AY8910interface ay8910_interface_2 = | |
| 839 | 839 | { |
| 840 | 840 | input_port_2_r, |
| 841 | 841 | input_port_3_r |
| r1404 | r1405 | |
|---|---|---|
| 318 | 318 | GFXDECODE_ENTRY( REGION_GFX1, 0, layout_16x16x8, 0x000, 0x100 ) // 8bpp tiles |
| 319 | 319 | GFXDECODE_END |
| 320 | 320 | |
| 321 | static struct EEPROM_interface eeprom_interface_93C56 = | |
| 321 | static const struct EEPROM_interface eeprom_interface_93C56 = | |
| 322 | 322 | { |
| 323 | 323 | 8, // address bits 8 |
| 324 | 324 | 8, // data bits 8 |
| r1404 | r1405 | |
| 587 | 587 | cpunum_set_input_line(0, 12, CLEAR_LINE); |
| 588 | 588 | } |
| 589 | 589 | |
| 590 | static struct YMF278B_interface ymf278b_interface = | |
| 590 | static const struct YMF278B_interface ymf278b_interface = | |
| 591 | 591 | { |
| 592 | 592 | REGION_SOUND1, |
| 593 | 593 | irqhandler |
| r1404 | r1405 | |
|---|---|---|
| 276 | 276 | OKIM6295_set_bank_base(0, (data & 1) * 0x40000); |
| 277 | 277 | } |
| 278 | 278 | |
| 279 | static struct YM2151interface ym2151_interface = | |
| 279 | static const struct YM2151interface ym2151_interface = | |
| 280 | 280 | { |
| 281 | 281 | sound_irq, |
| 282 | 282 | sound_bankswitch_w |
| r1404 | r1405 | |
|---|---|---|
| 443 | 443 | GFXDECODE_END |
| 444 | 444 | |
| 445 | 445 | |
| 446 | static struct YM2203interface ym2203_interface = | |
| 446 | static const struct YM2203interface ym2203_interface = | |
| 447 | 447 | { |
| 448 | 448 | input_port_1_r, |
| 449 | 449 | input_port_0_r |
| r1404 | r1405 | |
|---|---|---|
| 558 | 558 | |
| 559 | 559 | ***************************************************************************/ |
| 560 | 560 | |
| 561 | static gfx_layout layout_16x16x8 = | |
| 561 | static const gfx_layout layout_16x16x8 = | |
| 562 | 562 | { |
| 563 | 563 | 16,16, |
| 564 | 564 | RGN_FRAC(1,4), |
| r1404 | r1405 | |
|---|---|---|
| 272 | 272 | * |
| 273 | 273 | *************************************/ |
| 274 | 274 | |
| 275 | static struct CustomSound_interface amiga_custom_interface = | |
| 275 | static const struct CustomSound_interface amiga_custom_interface = | |
| 276 | 276 | { |
| 277 | 277 | amiga_sh_start |
| 278 | 278 | }; |
| r1404 | r1405 | |
|---|---|---|
| 141 | 141 | |
| 142 | 142 | ADDRESS_MAP_END |
| 143 | 143 | |
| 144 | static gfx_layout layout16 = | |
| 144 | static const gfx_layout layout16 = | |
| 145 | 145 | { |
| 146 | 146 | 16,16, |
| 147 | 147 | RGN_FRAC(1,3), |
| r1404 | r1405 | |
| 154 | 154 | 16*16 |
| 155 | 155 | }; |
| 156 | 156 | |
| 157 | static gfx_layout layout8 = | |
| 157 | static const gfx_layout layout8 = | |
| 158 | 158 | { |
| 159 | 159 | 8,8, |
| 160 | 160 | RGN_FRAC(1,3), |
| r1404 | r1405 | |
|---|---|---|
| 325 | 325 | K007232_set_volume(0,1,0,(v & 0x0f) * 0x11); |
| 326 | 326 | } |
| 327 | 327 | |
| 328 | static struct K007232_interface k007232_interface = | |
| 328 | static const struct K007232_interface k007232_interface = | |
| 329 | 329 | { |
| 330 | 330 | REGION_SOUND1, /* memory regions */ |
| 331 | 331 | volume_callback /* external port callback */ |
| r1404 | r1405 | |
|---|---|---|
| 150 | 150 | PORT_BIT( 0xf5, IP_ACTIVE_HIGH, IPT_SPECIAL ) // h/w status bits |
| 151 | 151 | INPUT_PORTS_END |
| 152 | 152 | |
| 153 | static gfx_layout charlayout = | |
| 153 | static const gfx_layout charlayout = | |
| 154 | 154 | { |
| 155 | 155 | 8,8, |
| 156 | 156 | RGN_FRAC(1,1), |
| r1404 | r1405 | |
|---|---|---|
| 277 | 277 | * 5 4 3 2 1 0 for encoder 2 (not shifted..) |
| 278 | 278 | */ |
| 279 | 279 | |
| 280 | static UINT8 spinnerTable[64] = | |
| 280 | static const UINT8 spinnerTable[64] = | |
| 281 | 281 | { |
| 282 | 282 | 0x00, 0x04, 0x14, 0x10, 0x18, 0x1c, 0x5c, 0x58, |
| 283 | 283 | 0x50, 0x54, 0x44, 0x40, 0x48, 0x4c, 0x6c, 0x68, |
| r1404 | r1405 | |
|---|---|---|
| 29 | 29 | |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | static struct | |
| 32 | static const struct | |
| 33 | 33 | { |
| 34 | 34 | const char *s_name; |
| 35 | 35 | UINT32 speedup_address; |
| r1404 | r1405 | |
|---|---|---|
| 812 | 812 | AM_RANGE(0xfff0, 0xfff3) AM_WRITE(MWA8_NOP) // unknown write |
| 813 | 813 | ADDRESS_MAP_END |
| 814 | 814 | |
| 815 | static struct K054539interface k054539_interface = | |
| 815 | static const struct K054539interface k054539_interface = | |
| 816 | 816 | { |
| 817 | 817 | REGION_SOUND1 |
| 818 | 818 | }; |
| r1404 | r1405 | |
|---|---|---|
| 1041 | 1041 | * |
| 1042 | 1042 | *************************************/ |
| 1043 | 1043 | |
| 1044 | static struct MSM5205interface msm5205_interface = | |
| 1044 | static const struct MSM5205interface msm5205_interface = | |
| 1045 | 1045 | { |
| 1046 | 1046 | fromance_adpcm_int, /* IRQ handler */ |
| 1047 | 1047 | MSM5205_S48_4B /* 8 KHz */ |
| r1404 | r1405 | |
|---|---|---|
| 133 | 133 | }; |
| 134 | 134 | |
| 135 | 135 | |
| 136 | static struct z80_irq_daisy_chain dleuro_daisy_chain[] = | |
| 136 | static const struct z80_irq_daisy_chain dleuro_daisy_chain[] = | |
| 137 | 137 | { |
| 138 | 138 | { z80sio_reset, z80sio_irq_state, z80sio_irq_ack, z80sio_irq_reti, 0 }, |
| 139 | 139 | { z80ctc_reset, z80ctc_irq_state, z80ctc_irq_ack, z80ctc_irq_reti, 0 }, |
| r1404 | r1405 | |
| 783 | 783 | * |
| 784 | 784 | *************************************/ |
| 785 | 785 | |
| 786 | static struct AY8910interface ay8910_interface = | |
| 786 | static const struct AY8910interface ay8910_interface = | |
| 787 | 787 | { |
| 788 | 788 | input_port_0_r, |
| 789 | 789 | input_port_1_r |
| r1404 | r1405 | |
|---|---|---|
| 280 | 280 | * |
| 281 | 281 | *************************************/ |
| 282 | 282 | |
| 283 | static struct POKEYinterface pokey_interface = | |
| 283 | static const struct POKEYinterface pokey_interface = | |
| 284 | 284 | { |
| 285 | 285 | { 0 }, |
| 286 | 286 | input_port_4_r |
| r1404 | r1405 | |
|---|---|---|
| 439 | 439 | |
| 440 | 440 | |
| 441 | 441 | |
| 442 | static struct namco_interface namco_interface = | |
| 442 | static const struct namco_interface namco_interface = | |
| 443 | 443 | { |
| 444 | 444 | 8, /* number of voices */ |
| 445 | 445 | -1, /* memory region */ |
| r1404 | r1405 | |
|---|---|---|
| 287 | 287 | #define XMASK (SCREEN_WIDTH-1) |
| 288 | 288 | #define YMASK (SCREEN_HEIGHT-1) |
| 289 | 289 | |
| 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}; | |
| 293 | 293 | |
| 294 | 294 | UINT8 *param, *src_base; |
| 295 | 295 | UINT16 *dst_base; |
| r1404 | r1405 | |
| 1937 | 1937 | } |
| 1938 | 1938 | |
| 1939 | 1939 | |
| 1940 | static struct AY8910interface ay8910_interface = | |
| 1940 | static const struct AY8910interface ay8910_interface = | |
| 1941 | 1941 | { |
| 1942 | 1942 | 0, |
| 1943 | 1943 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 160 | 160 | GFXDECODE_END |
| 161 | 161 | |
| 162 | 162 | |
| 163 | static struct CustomSound_interface custom_interface = | |
| 163 | static const struct CustomSound_interface custom_interface = | |
| 164 | 164 | { |
| 165 | 165 | gomoku_sh_start |
| 166 | 166 | }; |
| r1404 | r1405 | |
|---|---|---|
| 1152 | 1152 | * |
| 1153 | 1153 | *************************************/ |
| 1154 | 1154 | |
| 1155 | static struct ide_interface ide_intf = | |
| 1155 | static const struct ide_interface ide_intf = | |
| 1156 | 1156 | { |
| 1157 | 1157 | ide_interrupt, |
| 1158 | 1158 | }; |
| r1404 | r1405 | |
| 1165 | 1165 | * |
| 1166 | 1166 | *************************************/ |
| 1167 | 1167 | |
| 1168 | static struct K054539interface k054539_interface = | |
| 1168 | static const struct K054539interface k054539_interface = | |
| 1169 | 1169 | { |
| 1170 | 1170 | REGION_SOUND1 |
| 1171 | 1171 | }; |
| r1404 | r1405 | |
| 1731 | 1731 | ide_controller_init(0, &ide_intf); |
| 1732 | 1732 | } |
| 1733 | 1733 | |
| 1734 | static UINT8 beatmania_master_password[2 + 32] = | |
| 1734 | static const UINT8 beatmania_master_password[2 + 32] = | |
| 1735 | 1735 | { |
| 1736 | 1736 | 0x01, 0x00, |
| 1737 | 1737 | 0x4d, 0x47, 0x43, 0x28, 0x4b, 0x29, 0x4e, 0x4f, |
| r1404 | r1405 | |
| 1742 | 1742 | |
| 1743 | 1743 | static DRIVER_INIT( hmcompmx ) |
| 1744 | 1744 | { |
| 1745 | static UINT8 hmcompmx_user_password[2 + 32] = | |
| 1745 | static const UINT8 hmcompmx_user_password[2 + 32] = | |
| 1746 | 1746 | { |
| 1747 | 1747 | 0x00, 0x00, |
| 1748 | 1748 | 0x44, 0x42, 0x56, 0x4b, 0x3a, 0x34, 0x38, 0x2a, |
| r1404 | r1405 | |
| 1759 | 1759 | |
| 1760 | 1760 | static DRIVER_INIT( bm4thmix ) |
| 1761 | 1761 | { |
| 1762 | static UINT8 bm4thmix_user_password[2 + 32] = | |
| 1762 | static const UINT8 bm4thmix_user_password[2 + 32] = | |
| 1763 | 1763 | { |
| 1764 | 1764 | 0x00, 0x00, |
| 1765 | 1765 | 0x44, 0x42, 0x29, 0x4b, 0x2f, 0x2c, 0x4c, 0x32, |
| r1404 | r1405 | |
| 1775 | 1775 | |
| 1776 | 1776 | static DRIVER_INIT( bm5thmix ) |
| 1777 | 1777 | { |
| 1778 | static UINT8 bm5thmix_user_password[2 + 32] = | |
| 1778 | static const UINT8 bm5thmix_user_password[2 + 32] = | |
| 1779 | 1779 | { |
| 1780 | 1780 | 0x00, 0x00, |
| 1781 | 1781 | 0x44, 0x42, 0x56, 0x4b, 0x37, 0x35, 0x4a, 0x23, |
| r1404 | r1405 | |
| 1792 | 1792 | |
| 1793 | 1793 | static DRIVER_INIT( bmclubmx ) |
| 1794 | 1794 | { |
| 1795 | static UINT8 bmclubmx_user_password[2 + 32] = | |
| 1795 | static const UINT8 bmclubmx_user_password[2 + 32] = | |
| 1796 | 1796 | { |
| 1797 | 1797 | 0x00, 0x00, |
| 1798 | 1798 | 0x44, 0x20, 0x30, 0x57, 0x3c, 0x3f, 0x38, 0x32, |
| r1404 | r1405 | |
| 1810 | 1810 | |
| 1811 | 1811 | static DRIVER_INIT( bmcompm2 ) |
| 1812 | 1812 | { |
| 1813 | static UINT8 bmcompm2_user_password[2 + 32] = | |
| 1813 | static const UINT8 bmcompm2_user_password[2 + 32] = | |
| 1814 | 1814 | { |
| 1815 | 1815 | 0x00, 0x00, |
| 1816 | 1816 | 0x3a, 0x20, 0x31, 0x3e, 0x46, 0x2c, 0x35, 0x46, |
| r1404 | r1405 | |
| 1827 | 1827 | |
| 1828 | 1828 | static DRIVER_INIT( hmcompm2 ) |
| 1829 | 1829 | { |
| 1830 | static UINT8 hmcompm2_user_password[2 + 32] = | |
| 1830 | static const UINT8 hmcompm2_user_password[2 + 32] = | |
| 1831 | 1831 | { |
| 1832 | 1832 | 0x00, 0x00, |
| 1833 | 1833 | 0x3b, 0x39, 0x24, 0x3e, 0x4e, 0x59, 0x5c, 0x32, |
| r1404 | r1405 | |
| 1844 | 1844 | |
| 1845 | 1845 | static DRIVER_INIT( bmdct ) |
| 1846 | 1846 | { |
| 1847 | static UINT8 bmdct_user_password[2 + 32] = | |
| 1847 | static const UINT8 bmdct_user_password[2 + 32] = | |
| 1848 | 1848 | { |
| 1849 | 1849 | 0x00, 0x00, |
| 1850 | 1850 | 0x52, 0x47, 0x30, 0x3f, 0x2f, 0x39, 0x54, 0x5e, |
| r1404 | r1405 | |
| 1861 | 1861 | |
| 1862 | 1862 | static DRIVER_INIT( bmcorerm ) |
| 1863 | 1863 | { |
| 1864 | static UINT8 bmcorerm_user_password[2 + 32] = | |
| 1864 | static const UINT8 bmcorerm_user_password[2 + 32] = | |
| 1865 | 1865 | { |
| 1866 | 1866 | 0x00, 0x00, |
| 1867 | 1867 | 0x44, 0x42, 0x56, 0x4b, 0x3f, 0x4d, 0x4a, 0x27, |
| r1404 | r1405 | |
| 1878 | 1878 | |
| 1879 | 1879 | static DRIVER_INIT( bm6thmix ) |
| 1880 | 1880 | { |
| 1881 | static UINT8 bm6thmix_user_password[2 + 32] = | |
| 1881 | static const UINT8 bm6thmix_user_password[2 + 32] = | |
| 1882 | 1882 | { |
| 1883 | 1883 | 0x00, 0x00, |
| 1884 | 1884 | 0x44, 0x42, 0x56, 0x4b, 0x3d, 0x4d, 0x4a, 0x23, |
| r1404 | r1405 | |
| 1895 | 1895 | |
| 1896 | 1896 | static DRIVER_INIT( bm7thmix ) |
| 1897 | 1897 | { |
| 1898 | static UINT8 bm7thmix_user_password[2 + 32] = | |
| 1898 | static const UINT8 bm7thmix_user_password[2 + 32] = | |
| 1899 | 1899 | { |
| 1900 | 1900 | 0x00, 0x00, |
| 1901 | 1901 | 0x44, 0x42, 0x56, 0x4b, 0x3f, 0x4e, 0x4a, 0x25, |
| r1404 | r1405 | |
| 1913 | 1913 | #if 0 |
| 1914 | 1914 | static DRIVER_INIT( bmfinal ) |
| 1915 | 1915 | { |
| 1916 | static UINT8 bmfinal_user_password[2 + 32] = | |
| 1916 | static const UINT8 bmfinal_user_password[2 + 32] = | |
| 1917 | 1917 | { |
| 1918 | 1918 | 0x00, 0x00, |
| 1919 | 1919 | 0x44, 0x42, 0x56, 0x4b, 0x3f, 0x4f, 0x4a, 0x23, |
| r1404 | r1405 | |
|---|---|---|
| 532 | 532 | { |
| 533 | 533 | switch(port) { |
| 534 | 534 | 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 }; | |
| 536 | 536 | return (readinputport(0) & 0xf) | ((~pos[readinputport(5)>>4]<<4) & 0xf0); |
| 537 | 537 | } |
| 538 | 538 | case 1: |
| r1404 | r1405 | |
| 763 | 763 | |
| 764 | 764 | // Protection magic latch |
| 765 | 765 | |
| 766 | static UINT8 mahmajn_mlt[8] = { 5, 1, 6, 2, 3, 7, 4, 0 }; | |
| 767 | static UINT8 mahmajn2_mlt[8] = { 6, 0, 5, 3, 1, 4, 2, 7 }; | |
| 768 | static UINT8 gqh_mlt[8] = { 3, 7, 4, 0, 2, 6, 5, 1 }; | |
| 769 | static UINT8 bnzabros_mlt[8] = { 2, 4, 0, 5, 7, 3, 1, 6 }; | |
| 770 | static UINT8 qrouka_mlt[8] = { 1, 6, 4, 7, 0, 5, 3, 2 }; | |
| 771 | static UINT8 quizmeku_mlt[8] = { 0, 3, 2, 4, 6, 1, 7, 5 }; | |
| 772 | static UINT8 dcclub_mlt[8] = { 4, 3, 7, 0, 2, 6, 1, 5 }; | |
| 766 | static const UINT8 mahmajn_mlt[8] = { 5, 1, 6, 2, 3, 7, 4, 0 }; | |
| 767 | static const UINT8 mahmajn2_mlt[8] = { 6, 0, 5, 3, 1, 4, 2, 7 }; | |
| 768 | static const UINT8 gqh_mlt[8] = { 3, 7, 4, 0, 2, 6, 5, 1 }; | |
| 769 | static const UINT8 bnzabros_mlt[8] = { 2, 4, 0, 5, 7, 3, 1, 6 }; | |
| 770 | static const UINT8 qrouka_mlt[8] = { 1, 6, 4, 7, 0, 5, 3, 2 }; | |
| 771 | static const UINT8 quizmeku_mlt[8] = { 0, 3, 2, 4, 6, 1, 7, 5 }; | |
| 772 | static const UINT8 dcclub_mlt[8] = { 4, 3, 7, 0, 2, 6, 1, 5 }; | |
| 773 | 773 | |
| 774 | 774 | static UINT8 mlatch; |
| 775 | 775 | static const UINT8 *mlatch_table; |
| r1404 | r1405 | |
| 1104 | 1104 | |
| 1105 | 1105 | static DRIVER_INIT(qrouka) |
| 1106 | 1106 | { |
| 1107 | system24temp_sys16_io_set_callbacks( | |
| 1107 | system24temp_sys16_io_set_callbacks(gg | |
| 1108 | 1108 | mlatch_table = qrouka_mlt; |
| 1109 | 1109 | track_size = 0; |
| 1110 | 1110 | } |
| r1404 | r1405 | |
| 1298 | 1298 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1299 | 1299 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1300 | 1300 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) |
| 1301 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1301 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) | |
| 1302 | 1302 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) |
| 1303 | 1303 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) |
| 1304 | 1304 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r1404 | r1405 | |
| 1746 | 1746 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) |
| 1747 | 1747 | INPUT_PORTS_END |
| 1748 | 1748 | |
| 1749 | static INPUT_PORTS_START( qrouka ) /* Missing stick input for the 3rd & 4th player */ | |
| 1750 | PORT_INCLUDE( system24_generic ) | |
| 1749 | static INPUT_PORTS_START( qrouka ) | |
| 1750 | PORT_INCLUDE( quizmeku ) | |
| 1751 | 1751 | |
| 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 | ||
| 1762 | 1752 | PORT_MODIFY("SERVICE") |
| 1763 | 1753 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN4 ) |
| 1764 | 1754 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN3 ) |
| r1404 | r1405 | |
| 1766 | 1756 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 1767 | 1757 | |
| 1768 | 1758 | 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 ) ) | |
| 1774 | 1761 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1775 | 1762 | PORT_DIPNAME( 0x08, 0x08, "Coin Chute" ) PORT_DIPLOCATION("SWB:4") |
| 1776 | 1763 | PORT_DIPSETTING( 0x08, "Common" ) |
| r1404 | r1405 | |
| 1780 | 1767 | PORT_DIPSETTING( 0x00, "3" ) |
| 1781 | 1768 | PORT_DIPSETTING( 0x30, "4" ) |
| 1782 | 1769 | 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 ) ) | |
| 1788 | 1770 | INPUT_PORTS_END |
| 1789 | 1771 | |
| 1790 | 1772 | static INPUT_PORTS_START( mahmajn ) |
| r1404 | r1405 | |
| 1861 | 1843 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 1862 | 1844 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) |
| 1863 | 1845 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3) |
| 1864 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE4 ) | |
| 1846 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE4 ) //enabled | |
| 1865 | 1847 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3) |
| 1866 | 1848 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3) |
| 1867 | 1849 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3) |
| r1404 | r1405 | |
| 1902 | 1884 | * |
| 1903 | 1885 | *************************************/ |
| 1904 | 1886 | |
| 1905 | static struct YM2151interface ym2151_interface = | |
| 1887 | static const struct YM2151interface ym2151_interface = | |
| 1906 | 1888 | { |
| 1907 | 1889 | irq_ym |
| 1908 | 1890 | }; |
| r1404 | r1405 | |
| 2299 | 2281 | /* 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 */ |
| 2300 | 2282 | /* 03 */GAME( 1988, gground, 0, system24, gground, gground, ROT270, "Sega", "Gain Ground (World, 3 Players, Floppy Based, FD1094 317-0058-03c?)", 0 ) |
| 2301 | 2283 | /* 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) | |
| 2305 | 2287 | /* 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 |
| 2306 | 2288 | /* 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? |
| 2307 | 2289 | /* 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? |
| r1404 | r1405 | |
|---|---|---|
| 378 | 378 | return 0; |
| 379 | 379 | } |
| 380 | 380 | |
| 381 | static struct AY8910interface ay8910_interface = | |
| 381 | static const struct AY8910interface ay8910_interface = | |
| 382 | 382 | { |
| 383 | 383 | soundlatch_r |
| 384 | 384 | }; |
| r1404 | r1405 | |
|---|---|---|
| 746 | 746 | |
| 747 | 747 | static READ16_HANDLER( sjryuko_custom_io_r ) |
| 748 | 748 | { |
| 749 | static const char *portname[] = { "MJ0", "MJ1", "MJ2", "MJ3", "MJ4", "MJ5" }; | |
| 749 | static const char *const portname[] = { "MJ0", "MJ1", "MJ2", "MJ3", "MJ4", "MJ5" }; | |
| 750 | 750 | |
| 751 | 751 | switch (offset & (0x3000/2)) |
| 752 | 752 | { |
| r1404 | r1405 | |
| 1748 | 1748 | * |
| 1749 | 1749 | *************************************/ |
| 1750 | 1750 | |
| 1751 | static struct YM2151interface ym2151_interface = | |
| 1751 | static const struct YM2151interface ym2151_interface = | |
| 1752 | 1752 | { |
| 1753 | 1753 | NULL, |
| 1754 | 1754 | n7751_control_w |
| r1404 | r1405 | |
|---|---|---|
| 1245 | 1245 | AM_RANGE(0x580000, 0x580001) AM_WRITENOP |
| 1246 | 1246 | ADDRESS_MAP_END |
| 1247 | 1247 | |
| 1248 | static struct K054539interface k054539_interface = | |
| 1248 | static const struct K054539interface k054539_interface = | |
| 1249 | 1249 | { |
| 1250 | 1250 | REGION_SOUND1 |
| 1251 | 1251 | }; |
| r1404 | r1405 | |
| 1268 | 1268 | 16*128 |
| 1269 | 1269 | }; |
| 1270 | 1270 | |
| 1271 | static gfx_layout t1_charlayout6 = | |
| 1271 | static const gfx_layout t1_charlayout6 = | |
| 1272 | 1272 | { |
| 1273 | 1273 | 16, 16, |
| 1274 | 1274 | RGN_FRAC(1,1), |
| r1404 | r1405 | |
| 1280 | 1280 | 16*16*6 |
| 1281 | 1281 | }; |
| 1282 | 1282 | |
| 1283 | static gfx_layout t1_charlayout8 = | |
| 1283 | static const gfx_layout t1_charlayout8 = | |
| 1284 | 1284 | { |
| 1285 | 1285 | 16, 16, |
| 1286 | 1286 | RGN_FRAC(1,1), |
| r1404 | r1405 | |
| 3476 | 3476 | #define BPP6 2 |
| 3477 | 3477 | #define BPP66 3 |
| 3478 | 3478 | |
| 3479 | static GXGameInfoT gameDefs[] = | |
| 3479 | static const GXGameInfoT gameDefs[] = | |
| 3480 | 3480 | { |
| 3481 | 3481 | { "racinfrc", 11, 0, 0, BPP4 }, |
| 3482 | 3482 | { "racinfru", 11, 0, 0, BPP4 }, |
| r1404 | r1405 | |
|---|---|---|
| 789 | 789 | * |
| 790 | 790 | *************************************/ |
| 791 | 791 | |
| 792 | static struct YM2203interface ym2203_interface = | |
| 792 | static const struct YM2203interface ym2203_interface = | |
| 793 | 793 | { |
| 794 | 794 | 0,0,0,0,sound_irq |
| 795 | 795 | }; |
| 796 | 796 | |
| 797 | 797 | |
| 798 | static struct YM2151interface ym2151_interface = | |
| 798 | static const struct YM2151interface ym2151_interface = | |
| 799 | 799 | { |
| 800 | 800 | sound_irq |
| 801 | 801 | }; |
| 802 | 802 | |
| 803 | 803 | |
| 804 | static struct SEGAPCMinterface segapcm_interface = | |
| 804 | static const struct SEGAPCMinterface segapcm_interface = | |
| 805 | 805 | { |
| 806 | 806 | BANK_512, |
| 807 | 807 | REGION_SOUND1 |
| r1404 | r1405 | |
|---|---|---|
| 271 | 271 | } |
| 272 | 272 | |
| 273 | 273 | /* these are set as input, but I have no idea which input port it uses is for the AY */ |
| 274 | static struct AY8910interface ay8910_interface = | |
| 274 | static const struct AY8910interface ay8910_interface = | |
| 275 | 275 | { |
| 276 | 276 | unknown_r, |
| 277 | 277 | unknown_r, |
| r1404 | r1405 | |
|---|---|---|
| 286 | 286 | |
| 287 | 287 | ***************************************************************************/ |
| 288 | 288 | |
| 289 | static struct K053260_interface k053260_interface = | |
| 289 | static const struct K053260_interface k053260_interface = | |
| 290 | 290 | { |
| 291 | 291 | REGION_SOUND1 /* memory region */ |
| 292 | 292 | }; |
| r1404 | r1405 | |
|---|---|---|
| 216 | 216 | * |
| 217 | 217 | *************************************/ |
| 218 | 218 | |
| 219 | static struct POKEYinterface pokey_interface_1 = | |
| 219 | static const struct POKEYinterface pokey_interface_1 = | |
| 220 | 220 | { |
| 221 | 221 | { input_1_r,input_1_r,input_1_r,input_1_r,input_1_r,input_1_r,input_1_r,input_1_r } |
| 222 | 222 | }; |
| 223 | 223 | |
| 224 | static struct POKEYinterface pokey_interface_2 = | |
| 224 | static const struct POKEYinterface pokey_interface_2 = | |
| 225 | 225 | { |
| 226 | 226 | { input_2_r,input_2_r,input_2_r,input_2_r,input_2_r,input_2_r,input_2_r,input_2_r } |
| 227 | 227 | }; |
| r1404 | r1405 | |
|---|---|---|
| 454 | 454 | |
| 455 | 455 | INPUT_PORTS_END |
| 456 | 456 | |
| 457 | static gfx_layout charlayout = | |
| 457 | static const gfx_layout charlayout = | |
| 458 | 458 | { |
| 459 | 459 | 8,8, /* 8*8 characters */ |
| 460 | 460 | 512, /* 512 characters (256 in Crazy Climber) */ |
| r1404 | r1405 | |
| 464 | 464 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, |
| 465 | 465 | 8*8 /* every char takes 8 consecutive bytes */ |
| 466 | 466 | }; |
| 467 | static gfx_layout bscharlayout = | |
| 467 | static const gfx_layout bscharlayout = | |
| 468 | 468 | { |
| 469 | 469 | 8,8, /* 8*8 characters */ |
| 470 | 470 | 512,//256, /* 256 characters */ |
| r1404 | r1405 | |
| 476 | 476 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, |
| 477 | 477 | 8*8 /* every char takes 8 consecutive bytes */ |
| 478 | 478 | }; |
| 479 | static gfx_layout spritelayout = | |
| 479 | static const gfx_layout spritelayout = | |
| 480 | 480 | { |
| 481 | 481 | 16,16, /* 16*16 sprites */ |
| 482 | 482 | 128, /* 128 sprites (64 in Crazy Climber) */ |
| r1404 | r1405 | |
| 490 | 490 | }; |
| 491 | 491 | |
| 492 | 492 | |
| 493 | static gfx_layout trcharlayout = | |
| 493 | static const gfx_layout trcharlayout = | |
| 494 | 494 | { |
| 495 | 495 | 8,8, |
| 496 | 496 | RGN_FRAC(1,2), |
| r1404 | r1405 | |
| 501 | 501 | 8*8 |
| 502 | 502 | }; |
| 503 | 503 | |
| 504 | static gfx_layout trspritelayout = | |
| 504 | static const gfx_layout trspritelayout = | |
| 505 | 505 | { |
| 506 | 506 | 16,16, /* 16*16 sprites */ |
| 507 | 507 | RGN_FRAC(1,2), /* 128 sprites (64 in Crazy Climber) */ |
| r1404 | r1405 | |
|---|---|---|
| 276 | 276 | |
| 277 | 277 | /* Sound Interfaces */ |
| 278 | 278 | |
| 279 | static struct AY8910interface ay8910_interface_1 = | |
| 279 | static const struct AY8910interface ay8910_interface_1 = | |
| 280 | 280 | { |
| 281 | 281 | 0, |
| 282 | 282 | soundlatch_r, |
| r1404 | r1405 | |
| 284 | 284 | 0 |
| 285 | 285 | }; |
| 286 | 286 | |
| 287 | static struct AY8910interface ay8910_interface_2 = | |
| 287 | static const struct AY8910interface ay8910_interface_2 = | |
| 288 | 288 | { |
| 289 | 289 | input_port_2_r, |
| 290 | 290 | input_port_3_r |
| r1404 | r1405 | |
|---|---|---|
| 639 | 639 | GFXDECODE_ENTRY( REGION_GFX2, 0x40000, sprite_layout, 0, 8*16 ) |
| 640 | 640 | GFXDECODE_END |
| 641 | 641 | |
| 642 | static struct YM2203interface ym2203_interface = | |
| 642 | static const struct YM2203interface ym2203_interface = | |
| 643 | 643 | { |
| 644 | 644 | 0, |
| 645 | 645 | 0, |
| r1404 | r1405 | |
| 647 | 647 | 0 |
| 648 | 648 | }; |
| 649 | 649 | |
| 650 | static struct upd7759_interface upd7759_interface = | |
| 650 | static const struct upd7759_interface upd7759_interface = | |
| 651 | 651 | { |
| 652 | 652 | REGION_SOUND1, /* memory region */ |
| 653 | 653 | 0 |
| r1404 | r1405 | |
|---|---|---|
| 283 | 283 | |
| 284 | 284 | ***************************************************************************/ |
| 285 | 285 | |
| 286 | static struct VLM5030interface vlm5030_interface = | |
| 286 | static const struct VLM5030interface vlm5030_interface = | |
| 287 | 287 | { |
| 288 | 288 | REGION_SOUND1, /* memory region of speech rom */ |
| 289 | 289 | 0 |
| r1404 | r1405 | |
|---|---|---|
| 169 | 169 | * |
| 170 | 170 | *************************************/ |
| 171 | 171 | |
| 172 | static tms34010_config tms_config = | |
| 172 | static const tms34010_config tms_config = | |
| 173 | 173 | { |
| 174 | 174 | FALSE, /* halt on reset */ |
| 175 | 175 | 0, /* the screen operated on */ |
| r1404 | r1405 | |
|---|---|---|
| 403 | 403 | } |
| 404 | 404 | |
| 405 | 405 | |
| 406 | static struct AY8910interface ay8910_interface_1 = | |
| 406 | static const struct AY8910interface ay8910_interface_1 = | |
| 407 | 407 | { |
| 408 | 408 | 0, |
| 409 | 409 | 0, |
| r1404 | r1405 | |
| 411 | 411 | portB_0_w |
| 412 | 412 | }; |
| 413 | 413 | |
| 414 | static struct AY8910interface ay8910_interface_2 = | |
| 414 | static const struct AY8910interface ay8910_interface_2 = | |
| 415 | 415 | { |
| 416 | 416 | 0, |
| 417 | 417 | 0, |
| r1404 | r1405 | |
| 419 | 419 | portB_1_w |
| 420 | 420 | }; |
| 421 | 421 | |
| 422 | static struct MSM5232interface msm5232_interface = | |
| 422 | static const struct MSM5232interface msm5232_interface = | |
| 423 | 423 | { |
| 424 | 424 | { 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) */ |
| 425 | 425 | }; |
| r1404 | r1405 | |
|---|---|---|
| 1264 | 1264 | Sound interfaces |
| 1265 | 1265 | ******************************************************************************/ |
| 1266 | 1266 | |
| 1267 | static struct upd7759_interface upd7759_intf = | |
| 1267 | static const struct upd7759_interface upd7759_intf = | |
| 1268 | 1268 | { |
| 1269 | 1269 | REGION_SOUND1 /* Memory pointer (gen.h) */ |
| 1270 | 1270 | }; |
| 1271 | 1271 | |
| 1272 | static struct YM3438interface ym3438_intf = | |
| 1272 | static const struct YM3438interface ym3438_intf = | |
| 1273 | 1273 | { |
| 1274 | 1274 | genesis_irq2_interrupt /* IRQ handler */ |
| 1275 | 1275 | }; |
| r1404 | r1405 | |
|---|---|---|
| 264 | 264 | cpunum_set_input_line(1,0,linestate); |
| 265 | 265 | } |
| 266 | 266 | |
| 267 | static struct YM2151interface ym2151_interface = | |
| 267 | static const struct YM2151interface ym2151_interface = | |
| 268 | 268 | { |
| 269 | 269 | irqhandler |
| 270 | 270 | }; |
| r1404 | r1405 | |
|---|---|---|
| 388 | 388 | return (activecpu_gettotalcycles() / 512) & 0x0f; |
| 389 | 389 | } |
| 390 | 390 | |
| 391 | static struct AY8910interface ay8910_interface = | |
| 391 | static const struct AY8910interface ay8910_interface = | |
| 392 | 392 | { |
| 393 | 393 | pandoras_portA_r, // not used |
| 394 | 394 | pandoras_portB_r |
| r1404 | r1405 | |
|---|---|---|
| 3823 | 3823 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 3824 | 3824 | } |
| 3825 | 3825 | |
| 3826 | static struct YM2610interface ym2610_interface = | |
| 3826 | static const struct YM2610interface ym2610_interface = | |
| 3827 | 3827 | { |
| 3828 | 3828 | irq_handler, |
| 3829 | 3829 | REGION_SOUND2, /* Delta-T */ |
| r1404 | r1405 | |
| 3836 | 3836 | // Implement // |
| 3837 | 3837 | } |
| 3838 | 3838 | |
| 3839 | static struct YM2203interface ym2203_interface = | |
| 3839 | static const struct YM2203interface ym2203_interface = | |
| 3840 | 3840 | { |
| 3841 | 3841 | 0, /* portA read */ |
| 3842 | 3842 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 476 | 476 | GFXDECODE_ENTRY( REGION_GFX4, 0x0000, spritelayout, 16*4+16*16+16*16, 16 ) |
| 477 | 477 | GFXDECODE_END |
| 478 | 478 | |
| 479 | static struct MSM5205interface msm5205_interface = | |
| 479 | static const struct MSM5205interface msm5205_interface = | |
| 480 | 480 | { |
| 481 | 481 | stfight_adpcm_int, /* interrupt function */ |
| 482 | 482 | MSM5205_S48_4B /* 8KHz */ |
| r1404 | r1405 | |
|---|---|---|
| 1523 | 1523 | #define gottlieb_samples_interface qbert_samples_interface /* not used */ |
| 1524 | 1524 | #define krull_samples_interface qbert_samples_interface /* not used */ |
| 1525 | 1525 | |
| 1526 | static struct sp0250_interface sp0250_interface = | |
| 1526 | static const struct sp0250_interface sp0250_interface = | |
| 1527 | 1527 | { |
| 1528 | 1528 | stooges_sp0250_drq |
| 1529 | 1529 | }; |
| r1404 | r1405 | |
|---|---|---|
| 353 | 353 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 354 | 354 | } |
| 355 | 355 | |
| 356 | static struct YM2203interface ym2203_intf_sandscrp = | |
| 356 | static const struct YM2203interface ym2203_intf_sandscrp = | |
| 357 | 357 | { |
| 358 | 358 | input_port_4_r, /* Port A Read - DSW 1 */ |
| 359 | 359 | input_port_5_r, /* Port B Read - DSW 2 */ |
| r1404 | r1405 | |
|---|---|---|
| 953 | 953 | cpunum_set_input_line( snd_cpu, ym_irq , irq ? ASSERT_LINE : CLEAR_LINE ); |
| 954 | 954 | } |
| 955 | 955 | |
| 956 | static struct YM2151interface ym2151_interface = | |
| 956 | static const struct YM2151interface ym2151_interface = | |
| 957 | 957 | { |
| 958 | 958 | irq_handler |
| 959 | 959 | }; |
| 960 | 960 | |
| 961 | static struct MSM5205interface msm5205_interface = | |
| 961 | static const struct MSM5205interface msm5205_interface = | |
| 962 | 962 | { |
| 963 | 963 | dd_adpcm_int, /* interrupt function */ |
| 964 | 964 | MSM5205_S48_4B /* 8kHz */ |
| r1404 | r1405 | |
|---|---|---|
| 266 | 266 | PORT_BIT( 0xf800, IP_ACTIVE_HIGH, IPT_UNKNOWN ) |
| 267 | 267 | INPUT_PORTS_END |
| 268 | 268 | |
| 269 | static struct K053260_interface k053260_interface = | |
| 269 | static const struct K053260_interface k053260_interface = | |
| 270 | 270 | { |
| 271 | 271 | REGION_SOUND1 /* memory region */ |
| 272 | 272 | }; |
| r1404 | r1405 | |
|---|---|---|
| 882 | 882 | * |
| 883 | 883 | *************************************/ |
| 884 | 884 | |
| 885 | static struct AY8910interface ay8910_interface_1 = | |
| 885 | static const struct AY8910interface ay8910_interface_1 = | |
| 886 | 886 | { |
| 887 | 887 | 0, |
| 888 | 888 | 0, |
| r1404 | r1405 | |
| 890 | 890 | ay8910_portB_0_w /* write port B */ |
| 891 | 891 | }; |
| 892 | 892 | |
| 893 | static struct AY8910interface ay8910_interface_2 = | |
| 893 | static const struct AY8910interface ay8910_interface_2 = | |
| 894 | 894 | { |
| 895 | 895 | 0, |
| 896 | 896 | 0, |
| r1404 | r1405 | |
| 898 | 898 | ay8910_portB_1_w /* write port B */ |
| 899 | 899 | }; |
| 900 | 900 | |
| 901 | static struct AY8910interface ay8910_interface_3 = | |
| 901 | static const struct AY8910interface ay8910_interface_3 = | |
| 902 | 902 | { |
| 903 | 903 | 0, |
| 904 | 904 | 0, |
| r1404 | r1405 | |
| 906 | 906 | ay8910_portB_2_w /* write port B */ |
| 907 | 907 | }; |
| 908 | 908 | |
| 909 | static struct MSM5205interface msm5205_interface = | |
| 909 | static const struct MSM5205interface msm5205_interface = | |
| 910 | 910 | { |
| 911 | 911 | rjammer_adpcm_vck, /* VCK function */ |
| 912 | 912 | MSM5205_S48_4B /* 8 KHz (changes at run time) */ |
| r1404 | r1405 | |
|---|---|---|
| 1299 | 1299 | /**************************************************************************/ |
| 1300 | 1300 | |
| 1301 | 1301 | |
| 1302 | static struct YM2203interface ym2203_interface = | |
| 1302 | static const struct YM2203interface ym2203_interface = | |
| 1303 | 1303 | { |
| 1304 | 1304 | input_port_3_r, |
| 1305 | 1305 | input_port_4_r |
| r1404 | r1405 | |
|---|---|---|
| 811 | 811 | }; |
| 812 | 812 | |
| 813 | 813 | |
| 814 | static struct CustomSound_interface exidy_custom_interface = | |
| 814 | static const struct CustomSound_interface exidy_custom_interface = | |
| 815 | 815 | { |
| 816 | 816 | exidy_sh_start |
| 817 | 817 | }; |
| r1404 | r1405 | |
|---|---|---|
| 269 | 269 | |
| 270 | 270 | /****************************************************************************/ |
| 271 | 271 | |
| 272 | static struct YM2203interface ym2203_interface_1 = | |
| 272 | static const struct YM2203interface ym2203_interface_1 = | |
| 273 | 273 | { |
| 274 | 274 | input_port_2_r, |
| 275 | 275 | input_port_3_r |
| 276 | 276 | }; |
| 277 | 277 | |
| 278 | static struct YM2203interface ym2203_interface_2 = | |
| 278 | static const struct YM2203interface ym2203_interface_2 = | |
| 279 | 279 | { |
| 280 | 280 | 0, |
| 281 | 281 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 421 | 421 | cpunum_set_input_line( 1, 0 , irq ? ASSERT_LINE : CLEAR_LINE ); |
| 422 | 422 | } |
| 423 | 423 | |
| 424 | static struct YM2151interface ym2151_interface = | |
| 424 | static const struct YM2151interface ym2151_interface = | |
| 425 | 425 | { |
| 426 | 426 | irq_handler |
| 427 | 427 | }; |
| r1404 | r1405 | |
|---|---|---|
| 225 | 225 | |
| 226 | 226 | /***************************************************************************/ |
| 227 | 227 | |
| 228 | static struct MSM5205interface msm5205_interface = | |
| 228 | static const struct MSM5205interface msm5205_interface = | |
| 229 | 229 | { |
| 230 | 230 | pcktgal_adpcm_int, /* interrupt function */ |
| 231 | 231 | MSM5205_S48_4B /* 8KHz */ |
| r1404 | r1405 | |
|---|---|---|
| 255 | 255 | INPUT_PORTS_END |
| 256 | 256 | |
| 257 | 257 | |
| 258 | static struct AY8910interface ay8910_interface = | |
| 258 | static const struct AY8910interface ay8910_interface = | |
| 259 | 259 | { |
| 260 | 260 | input_port_0_r, // DIPSW-A read |
| 261 | 261 | input_port_1_r // DIPSW-B read |
| r1404 | r1405 | |
|---|---|---|
| 1421 | 1421 | |
| 1422 | 1422 | |
| 1423 | 1423 | /* ?? */ |
| 1424 | static struct mips3_config config = | |
| 1424 | static const struct mips3_config config = | |
| 1425 | 1425 | { |
| 1426 | 1426 | 16384, /* code cache size */ |
| 1427 | 1427 | 16384 /* data cache size */ |
| r1404 | r1405 | |
|---|---|---|
| 519 | 519 | // cpunum_set_input_line(1,1,irq ? ASSERT_LINE : CLEAR_LINE); |
| 520 | 520 | } |
| 521 | 521 | |
| 522 | static struct ES5506interface es5506_interface = | |
| 522 | static const struct ES5506interface es5506_interface = | |
| 523 | 523 | { |
| 524 | 524 | REGION_SOUND1, |
| 525 | 525 | REGION_SOUND2, |
| r1404 | r1405 | |
|---|---|---|
| 256 | 256 | return 0; |
| 257 | 257 | } |
| 258 | 258 | |
| 259 | static struct TAITO8741interface gsword_8741interface= | |
| 259 | static const struct TAITO8741interface gsword_8741interface= | |
| 260 | 260 | { |
| 261 | 261 | 4, /* 4 chips */ |
| 262 | 262 | {TAITO8741_MASTER,TAITO8741_SLAVE,TAITO8741_PORT,TAITO8741_PORT},/* program mode */ |
| r1404 | r1405 | |
| 653 | 653 | return mame_rand(Machine); |
| 654 | 654 | } |
| 655 | 655 | |
| 656 | static struct YM2203interface ppking_ym2203_interface = | |
| 656 | static const struct YM2203interface ppking_ym2203_interface = | |
| 657 | 657 | { |
| 658 | 658 | f1_r, |
| 659 | 659 | f1_r |
| 660 | 660 | }; |
| 661 | 661 | |
| 662 | static struct YM2203interface gladiatr_ym2203_interface = | |
| 662 | static const struct YM2203interface gladiatr_ym2203_interface = | |
| 663 | 663 | { |
| 664 | 664 | 0, |
| 665 | 665 | gladiator_dsw3_r, /* port B read */ |
| r1404 | r1405 | |
| 668 | 668 | gladiator_ym_irq /* NMI request for 2nd cpu */ |
| 669 | 669 | }; |
| 670 | 670 | |
| 671 | static struct MSM5205interface msm5205_interface = | |
| 671 | static const struct MSM5205interface msm5205_interface = | |
| 672 | 672 | { |
| 673 | 673 | 0, /* interrupt function */ |
| 674 | 674 | MSM5205_SEX_4B /* vclk input mode */ |
| r1404 | r1405 | |
|---|---|---|
| 148 | 148 | ADDRESS_MAP_END |
| 149 | 149 | |
| 150 | 150 | |
| 151 | static struct YM3438interface ym3438_intf = | |
| 151 | static const struct YM3438interface ym3438_intf = | |
| 152 | 152 | { |
| 153 | 153 | genesis_irq2_interrupt /* IRQ handler */ |
| 154 | 154 | }; |
| r1404 | r1405 | |
|---|---|---|
| 203 | 203 | |
| 204 | 204 | INPUT_PORTS_END |
| 205 | 205 | |
| 206 | static struct CustomSound_interface snes_sound_interface = | |
| 206 | static const struct CustomSound_interface snes_sound_interface = | |
| 207 | 207 | { snes_sh_start }; |
| 208 | 208 | |
| 209 | 209 | static GFXDECODE_START( kinstb ) |
| r1404 | r1405 | |
|---|---|---|
| 606 | 606 | INPUT_PORTS_END |
| 607 | 607 | |
| 608 | 608 | |
| 609 | static struct K054539interface k054539_interface = | |
| 609 | static const struct K054539interface k054539_interface = | |
| 610 | 610 | { |
| 611 | 611 | REGION_SOUND1 |
| 612 | 612 | }; |
| r1404 | r1405 | |
|---|---|---|
| 77 | 77 | |
| 78 | 78 | |
| 79 | 79 | |
| 80 | static void (*rambank_modify_notifiers[12])(int) = | |
| 80 | static void (*const rambank_modify_notifiers[12])(int) = | |
| 81 | 81 | { |
| 82 | 82 | taitol_chardef14_m, // 14 |
| 83 | 83 | taitol_chardef15_m, // 15 |
| r1404 | r1405 | |
| 2244 | 2244 | } |
| 2245 | 2245 | } |
| 2246 | 2246 | |
| 2247 | static struct YM2203interface ym2203_interface_triple = | |
| 2247 | static const struct YM2203interface ym2203_interface_triple = | |
| 2248 | 2248 | { |
| 2249 | 2249 | 0, |
| 2250 | 2250 | 0, |
| r1404 | r1405 | |
| 2253 | 2253 | irqhandler |
| 2254 | 2254 | }; |
| 2255 | 2255 | |
| 2256 | static struct YM2203interface ym2203_interface_champwr = | |
| 2256 | static const struct YM2203interface ym2203_interface_champwr = | |
| 2257 | 2257 | { |
| 2258 | 2258 | 0, |
| 2259 | 2259 | 0, |
| r1404 | r1405 | |
| 2263 | 2263 | }; |
| 2264 | 2264 | |
| 2265 | 2265 | |
| 2266 | static struct MSM5205interface msm5205_interface = | |
| 2266 | static const struct MSM5205interface msm5205_interface = | |
| 2267 | 2267 | { |
| 2268 | 2268 | champwr_msm5205_vck,/* VCK function */ |
| 2269 | 2269 | MSM5205_S48_4B /* 8 kHz */ |
| 2270 | 2270 | }; |
| 2271 | 2271 | |
| 2272 | static struct YM2610interface ym2610_interface = | |
| 2272 | static const struct YM2610interface ym2610_interface = | |
| 2273 | 2273 | { |
| 2274 | 2274 | irqhandler, |
| 2275 | 2275 | REGION_SOUND1, |
| 2276 | 2276 | REGION_SOUND1 |
| 2277 | 2277 | }; |
| 2278 | 2278 | |
| 2279 | static struct YM2203interface ym2203_interface_single = | |
| 2279 | static const struct YM2203interface ym2203_interface_single = | |
| 2280 | 2280 | { |
| 2281 | 2281 | portA_r, |
| 2282 | 2282 | portB_r |
| r1404 | r1405 | |
|---|---|---|
| 338 | 338 | |
| 339 | 339 | |
| 340 | 340 | |
| 341 | static struct AY8910interface ay8910_interface_1 = | |
| 341 | static const struct AY8910interface ay8910_interface_1 = | |
| 342 | 342 | { |
| 343 | 343 | 0, |
| 344 | 344 | 0, |
| r1404 | r1405 | |
| 346 | 346 | gyruss_filter0_w |
| 347 | 347 | }; |
| 348 | 348 | |
| 349 | static struct AY8910interface ay8910_interface_2 = | |
| 349 | static const struct AY8910interface ay8910_interface_2 = | |
| 350 | 350 | { |
| 351 | 351 | 0, |
| 352 | 352 | 0, |
| r1404 | r1405 | |
| 354 | 354 | gyruss_filter1_w |
| 355 | 355 | }; |
| 356 | 356 | |
| 357 | static struct AY8910interface ay8910_interface_3 = | |
| 357 | static const struct AY8910interface ay8910_interface_3 = | |
| 358 | 358 | { |
| 359 | 359 | gyruss_portA_r |
| 360 | 360 | }; |
| r1404 | r1405 | |
|---|---|---|
| 127 | 127 | 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff |
| 128 | 128 | }; |
| 129 | 129 | |
| 130 | static struct EEPROM_interface groundfx_eeprom_interface = | |
| 130 | static const struct EEPROM_interface groundfx_eeprom_interface = | |
| 131 | 131 | { |
| 132 | 132 | 6, /* address bits */ |
| 133 | 133 | 16, /* data bits */ |
| r1404 | r1405 | |
|---|---|---|
| 261 | 261 | K007232_set_volume(1,1,0,(v & 0x0f) * 0x11); |
| 262 | 262 | } |
| 263 | 263 | |
| 264 | static struct K007232_interface k007232_interface_1 = | |
| 264 | static const struct K007232_interface k007232_interface_1 = | |
| 265 | 265 | { |
| 266 | 266 | REGION_SOUND1, |
| 267 | 267 | volume_callback0 |
| 268 | 268 | }; |
| 269 | 269 | |
| 270 | static struct K007232_interface k007232_interface_2 = | |
| 270 | static const struct K007232_interface k007232_interface_2 = | |
| 271 | 271 | { |
| 272 | 272 | REGION_SOUND2, |
| 273 | 273 | volume_callback1 |
| r1404 | r1405 | |
|---|---|---|
| 474 | 474 | |
| 475 | 475 | MACHINE_DRIVER_END |
| 476 | 476 | |
| 477 | static struct pci_device_info intel82439tx = | |
| 477 | static const struct pci_device_info intel82439tx = | |
| 478 | 478 | { |
| 479 | 479 | intel82439tx_pci_r, |
| 480 | 480 | intel82439tx_pci_w |
| 481 | 481 | }; |
| 482 | 482 | |
| 483 | static struct pci_device_info intel82371ab = | |
| 483 | static const struct pci_device_info intel82371ab = | |
| 484 | 484 | { |
| 485 | 485 | intel82371ab_pci_r, |
| 486 | 486 | intel82371ab_pci_w |
| r1404 | r1405 | |
| 501 | 501 | pic8259_set_irq_line(1, 6, state); |
| 502 | 502 | } |
| 503 | 503 | |
| 504 | static struct kbdc8042_interface at8042 = | |
| 504 | static const struct kbdc8042_interface at8042 = | |
| 505 | 505 | { |
| 506 | 506 | KBDC8042_AT386, set_gate_a20, keyboard_interrupt |
| 507 | 507 | }; |
| 508 | 508 | |
| 509 | static struct ide_interface ide_intf = | |
| 509 | static const struct ide_interface ide_intf = | |
| 510 | 510 | { |
| 511 | 511 | ide_interrupt |
| 512 | 512 | }; |
| r1404 | r1405 | |
|---|---|---|
| 513 | 513 | GFXDECODE_END |
| 514 | 514 | |
| 515 | 515 | |
| 516 | static struct YM2151interface ym2151_interface = | |
| 516 | static const struct YM2151interface ym2151_interface = | |
| 517 | 517 | { |
| 518 | 518 | seibu_ym3812_irqhandler |
| 519 | 519 | }; |
| r1404 | r1405 | |
| 523 | 523 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 524 | 524 | } |
| 525 | 525 | |
| 526 | static struct YM2151interface cabalbl_ym2151_interface = | |
| 526 | static const struct YM2151interface cabalbl_ym2151_interface = | |
| 527 | 527 | { |
| 528 | 528 | irqhandler |
| 529 | 529 | }; |
| 530 | 530 | |
| 531 | 531 | SEIBU_SOUND_SYSTEM_ADPCM_HARDWARE |
| 532 | 532 | |
| 533 | static struct MSM5205interface msm5205_interface_1 = | |
| 533 | static const struct MSM5205interface msm5205_interface_1 = | |
| 534 | 534 | { |
| 535 | 535 | 0, |
| 536 | 536 | MSM5205_SEX_4B |
| 537 | 537 | }; |
| 538 | 538 | |
| 539 | static struct MSM5205interface msm5205_interface_2 = | |
| 539 | static const struct MSM5205interface msm5205_interface_2 = | |
| 540 | 540 | { |
| 541 | 541 | 0, |
| 542 | 542 | MSM5205_SEX_4B |
| r1404 | r1405 | |
|---|---|---|
| 47 | 47 | return (cdp1869_prd & 0x01) + (readinputportbytag("EF") & 0xfe); |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | static CDP1802_CONFIG cidelsa_cdp1802_config = | |
| 50 | static const CDP1802_CONFIG cidelsa_cdp1802_config = | |
| 51 | 51 | { |
| 52 | 52 | cidelsa_mode_r, |
| 53 | 53 | cidelsa_ef_r, |
| r1404 | r1405 | |
| 148 | 148 | */ |
| 149 | 149 | } |
| 150 | 150 | |
| 151 | static struct AY8910interface ay8910_interface = | |
| 151 | static const struct AY8910interface ay8910_interface = | |
| 152 | 152 | { |
| 153 | 153 | 0, |
| 154 | 154 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 261 | 261 | * |
| 262 | 262 | *************************************/ |
| 263 | 263 | |
| 264 | static struct AY8910interface ay8910_interface_1 = | |
| 264 | static const struct AY8910interface ay8910_interface_1 = | |
| 265 | 265 | { |
| 266 | 266 | input_port_0_r, |
| 267 | 267 | input_port_2_r |
| 268 | 268 | }; |
| 269 | 269 | |
| 270 | static struct AY8910interface ay8910_interface_2 = | |
| 270 | static const struct AY8910interface ay8910_interface_2 = | |
| 271 | 271 | { |
| 272 | 272 | port1_r, |
| 273 | 273 | port2_r |
| r1404 | r1405 | |
| 281 | 281 | * |
| 282 | 282 | *************************************/ |
| 283 | 283 | |
| 284 | static tms34010_config tms_config = | |
| 284 | static const tms34010_config tms_config = | |
| 285 | 285 | { |
| 286 | 286 | FALSE, /* halt on reset */ |
| 287 | 287 | 0, /* the screen operated on */ |
| r1404 | r1405 | |
|---|---|---|
| 176 | 176 | cpunum_set_input_line(0, INPUT_LINE_NMI, PULSE_LINE); |
| 177 | 177 | } |
| 178 | 178 | |
| 179 | static struct AY8910interface ay8910_interface = | |
| 179 | static const struct AY8910interface ay8910_interface = | |
| 180 | 180 | { |
| 181 | 181 | input_port_0_r, |
| 182 | 182 | input_port_1_r, |
| r1404 | r1405 | |
|---|---|---|
| 213 | 213 | ADDRESS_MAP_END |
| 214 | 214 | |
| 215 | 215 | |
| 216 | static struct r3000_config config = | |
| 216 | static const struct r3000_config config = | |
| 217 | 217 | { |
| 218 | 218 | 1, /* 1 if we have an FPU, 0 otherwise */ |
| 219 | 219 | 4096, /* code cache size */ |
| r1404 | r1405 | |
| 615 | 615 | PORT_DIPSETTING( 0x00000000, DEF_STR( On ) ) |
| 616 | 616 | INPUT_PORTS_END |
| 617 | 617 | |
| 618 | static struct ST0016interface st0016_interface = | |
| 618 | static const struct ST0016interface st0016_interface = | |
| 619 | 619 | { |
| 620 | 620 | &st0016_charram |
| 621 | 621 | }; |
| r1404 | r1405 | |
|---|---|---|
| 933 | 933 | timer_call_after_resynch(NULL, YM2151_CLEAR, setvector_callback); |
| 934 | 934 | } |
| 935 | 935 | |
| 936 | static struct YM2151interface ym2151_interface = | |
| 936 | static const struct YM2151interface ym2151_interface = | |
| 937 | 937 | { |
| 938 | 938 | sound_irq |
| 939 | 939 | }; |
| 940 | 940 | |
| 941 | static struct IremGA20_interface iremGA20_interface = | |
| 941 | static const struct IremGA20_interface iremGA20_interface = | |
| 942 | 942 | { |
| 943 | 943 | REGION_SOUND1 |
| 944 | 944 | }; |
| r1404 | r1405 | |
|---|---|---|
| 566 | 566 | |
| 567 | 567 | ***************************************************************************/ |
| 568 | 568 | |
| 569 | static struct K053260_interface k053260_interface = | |
| 569 | static const struct K053260_interface k053260_interface = | |
| 570 | 570 | { |
| 571 | 571 | REGION_SOUND1 /* memory region */ |
| 572 | 572 | }; |
| r1404 | r1405 | |
|---|---|---|
| 978 | 978 | { 0 } |
| 979 | 979 | }; |
| 980 | 980 | |
| 981 | static const struct segaic16_memory_map_entry *region_info_list[] = | |
| 981 | static const struct segaic16_memory_map_entry *const region_info_list[] = | |
| 982 | 982 | { |
| 983 | 983 | &rom_171_5358_info_small[0], |
| 984 | 984 | &rom_171_5358_info[0], |
| r1404 | r1405 | |
| 1575 | 1575 | |
| 1576 | 1576 | static WRITE16_HANDLER( hwchamp_custom_io_w ) |
| 1577 | 1577 | { |
| 1578 | static const char *portname[4] = { "MONITOR", "LEFT", "RIGHT", "DUMMY" }; | |
| 1578 | static const char *const portname[4] = { "MONITOR", "LEFT", "RIGHT", "DUMMY" }; | |
| 1579 | 1579 | |
| 1580 | 1580 | switch (offset & (0x3000/2)) |
| 1581 | 1581 | { |
| r1404 | r1405 | |
| 1660 | 1660 | |
| 1661 | 1661 | static READ16_HANDLER( sjryuko_custom_io_r ) |
| 1662 | 1662 | { |
| 1663 | static const char *portname[] = { "MJ0", "MJ1", "MJ2", "MJ3", "MJ4", "MJ5" }; | |
| 1663 | static const char *const portname[] = { "MJ0", "MJ1", "MJ2", "MJ3", "MJ4", "MJ5" }; | |
| 1664 | 1664 | |
| 1665 | 1665 | switch (offset & (0x3000/2)) |
| 1666 | 1666 | { |
| r1404 | r1405 | |
| 3095 | 3095 | * |
| 3096 | 3096 | *************************************/ |
| 3097 | 3097 | |
| 3098 | static struct upd7759_interface upd7759_interface = | |
| 3098 | static const struct upd7759_interface upd7759_interface = | |
| 3099 | 3099 | { |
| 3100 | 3100 | 0, |
| 3101 | 3101 | upd7759_generate_nmi |
| r1404 | r1405 | |
|---|---|---|
| 385 | 385 | cpunum_set_input_line( 1, 0 , irq ? ASSERT_LINE : CLEAR_LINE ); |
| 386 | 386 | } |
| 387 | 387 | |
| 388 | static struct YM2151interface ym2151_interface = | |
| 388 | static const struct YM2151interface ym2151_interface = | |
| 389 | 389 | { |
| 390 | 390 | dd3_ymirq_handler |
| 391 | 391 | }; |
| r1404 | r1405 | |
|---|---|---|
| 206 | 206 | PORT_DIPSETTING( 0x06, "10 min" ) |
| 207 | 207 | INPUT_PORTS_END |
| 208 | 208 | |
| 209 | static struct NESinterface multigam_interface_1 = | |
| 209 | static const struct NESinterface multigam_interface_1 = | |
| 210 | 210 | { |
| 211 | 211 | REGION_CPU1 |
| 212 | 212 | }; |
| r1404 | r1405 | |
|---|---|---|
| 504 | 504 | cpunum_set_input_line(1, 0, state); |
| 505 | 505 | } |
| 506 | 506 | |
| 507 | static struct YM3812interface fuuki16_ym3812_intf = | |
| 507 | static const struct YM3812interface fuuki16_ym3812_intf = | |
| 508 | 508 | { |
| 509 | 509 | soundirq /* IRQ Line */ |
| 510 | 510 | }; |
| r1404 | r1405 | |
|---|---|---|
| 74 | 74 | #define K001604_NUM_TILES_LAYER0 16384 |
| 75 | 75 | #define K001604_NUM_TILES_LAYER1 4096 |
| 76 | 76 | |
| 77 | static gfx_layout K001604_char_layout_layer_8x8 = | |
| 77 | static const gfx_layout K001604_char_layout_layer_8x8 = | |
| 78 | 78 | { |
| 79 | 79 | 8, 8, |
| 80 | 80 | K001604_NUM_TILES_LAYER0, |
| r1404 | r1405 | |
| 85 | 85 | 8*128 |
| 86 | 86 | }; |
| 87 | 87 | |
| 88 | static gfx_layout K001604_char_layout_layer_16x16 = | |
| 88 | static const gfx_layout K001604_char_layout_layer_16x16 = | |
| 89 | 89 | { |
| 90 | 90 | 16, 16, |
| 91 | 91 | K001604_NUM_TILES_LAYER1, |
| r1404 | r1405 | |
| 885 | 885 | |
| 886 | 886 | INPUT_PORTS_END |
| 887 | 887 | |
| 888 | static struct RF5C400interface rf5c400_interface = | |
| 888 | static const struct RF5C400interface rf5c400_interface = | |
| 889 | 889 | { |
| 890 | 890 | REGION_SOUND1 |
| 891 | 891 | }; |
| 892 | 892 | |
| 893 | static ppc_config nwktr_ppc_cfg = | |
| 893 | static const ppc_config nwktr_ppc_cfg = | |
| 894 | 894 | { |
| 895 | 895 | PPC_MODEL_403GA |
| 896 | 896 | }; |
| 897 | 897 | |
| 898 | static sharc_config sharc_cfg = | |
| 898 | static const sharc_config sharc_cfg = | |
| 899 | 899 | { |
| 900 | 900 | BOOT_MODE_EPROM |
| 901 | 901 | }; |
| r1404 | r1405 | |
|---|---|---|
| 53 | 53 | static READ16_HANDLER( shangha3_prot_r ) |
| 54 | 54 | { |
| 55 | 55 | 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}; | |
| 57 | 57 | |
| 58 | 58 | logerror("PC %04x: read 20004e\n",activecpu_get_pc()); |
| 59 | 59 | |
| r1404 | r1405 | |
| 476 | 476 | |
| 477 | 477 | |
| 478 | 478 | |
| 479 | static struct AY8910interface ay8910_interface = | |
| 479 | static const struct AY8910interface ay8910_interface = | |
| 480 | 480 | { |
| 481 | 481 | input_port_3_r, |
| 482 | 482 | input_port_2_r |
| r1404 | r1405 | |
| 487 | 487 | cpunum_set_input_line(1, INPUT_LINE_NMI, linestate); |
| 488 | 488 | } |
| 489 | 489 | |
| 490 | static struct YM3438interface ym3438_interface = | |
| 490 | static const struct YM3438interface ym3438_interface = | |
| 491 | 491 | { |
| 492 | 492 | irqhandler |
| 493 | 493 | }; |
| r1404 | r1405 | |
|---|---|---|
| 264 | 264 | cpunum_set_input_line(0,2,irq ? ASSERT_LINE : CLEAR_LINE); |
| 265 | 265 | } |
| 266 | 266 | |
| 267 | static struct YM2203interface ym2203_interface = | |
| 267 | static const struct YM2203interface ym2203_interface = | |
| 268 | 268 | { |
| 269 | 269 | 0,0,0,0, |
| 270 | 270 | irqhandler |
| r1404 | r1405 | |
|---|---|---|
| 312 | 312 | |
| 313 | 313 | |
| 314 | 314 | |
| 315 | static struct AY8910interface ay8910_interface = | |
| 315 | static const struct AY8910interface ay8910_interface = | |
| 316 | 316 | { |
| 317 | 317 | input_port_3_r, |
| 318 | 318 | input_port_4_r |
| r1404 | r1405 | |
|---|---|---|
| 349 | 349 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 350 | 350 | } |
| 351 | 351 | |
| 352 | static struct YM2610interface ym2610_interface = | |
| 352 | static const struct YM2610interface ym2610_interface = | |
| 353 | 353 | { |
| 354 | 354 | irqhandler, |
| 355 | 355 | REGION_SOUND1, |
| r1404 | r1405 | |
|---|---|---|
| 183 | 183 | PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 184 | 184 | INPUT_PORTS_END |
| 185 | 185 | |
| 186 | static struct gaelcosnd_interface maniacsq_snd_interface = | |
| 186 | static const struct gaelcosnd_interface maniacsq_snd_interface = | |
| 187 | 187 | { |
| 188 | 188 | REGION_GFX1, /* memory region */ |
| 189 | 189 | { 0*0x0080000, 1*0x0080000, 0, 0 }, /* start of each ROM bank */ |
| r1404 | r1405 | |
| 334 | 334 | 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) |
| 335 | 335 | INPUT_PORTS_END |
| 336 | 336 | |
| 337 | static struct gaelcosnd_interface bang_snd_interface = | |
| 337 | static const struct gaelcosnd_interface bang_snd_interface = | |
| 338 | 338 | { |
| 339 | 339 | REGION_GFX1, /* memory region */ |
| 340 | 340 | { 0*0x0200000, 1*0x0200000, 2*0x0200000, 3*0x0200000 } /* start of each ROM bank */ |
| r1404 | r1405 | |
| 537 | 537 | PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 538 | 538 | INPUT_PORTS_END |
| 539 | 539 | |
| 540 | static struct gaelcosnd_interface alighunt_snd_interface = | |
| 540 | static const struct gaelcosnd_interface alighunt_snd_interface = | |
| 541 | 541 | { |
| 542 | 542 | REGION_GFX1, /* memory region */ |
| 543 | 543 | { 0*0x0400000, 1*0x0400000, 2*0x0400000, 3*0x0400000 } /* start of each ROM bank */ |
| r1404 | r1405 | |
| 798 | 798 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_SERVICE4 ) PORT_TOGGLE |
| 799 | 799 | INPUT_PORTS_END |
| 800 | 800 | |
| 801 | static struct gaelcosnd_interface touchgo_snd_interface = | |
| 801 | static const struct gaelcosnd_interface touchgo_snd_interface = | |
| 802 | 802 | { |
| 803 | 803 | REGION_GFX1, /* memory region */ |
| 804 | 804 | { 0*0x0400000, 1*0x0400000, 0, 0 } /* start of each ROM bank */ |
| r1404 | r1405 | |
| 1001 | 1001 | /* bits 6 & 7 are used for accessing the NVRAM */ |
| 1002 | 1002 | INPUT_PORTS_END |
| 1003 | 1003 | |
| 1004 | static struct gaelcosnd_interface snowboar_snd_interface = | |
| 1004 | static const struct gaelcosnd_interface snowboar_snd_interface = | |
| 1005 | 1005 | { |
| 1006 | 1006 | REGION_GFX1, /* memory region */ |
| 1007 | 1007 | { 0*0x0400000, 1*0x0400000, 0, 0 } /* start of each ROM bank */ |
| r1404 | r1405 | |
| 1244 | 1244 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_SERVICE4 ) PORT_TOGGLE |
| 1245 | 1245 | INPUT_PORTS_END |
| 1246 | 1246 | |
| 1247 | static struct gaelcosnd_interface wrally2_snd_interface = | |
| 1247 | static const struct gaelcosnd_interface wrally2_snd_interface = | |
| 1248 | 1248 | { |
| 1249 | 1249 | REGION_GFX1, /* memory region */ |
| 1250 | 1250 | { 0*0x0200000, 1*0x0200000, 0, 0 } /* start of each ROM bank */ |
| r1404 | r1405 | |
|---|---|---|
| 109 | 109 | AM_RANGE(0x71, 0x71) AM_READWRITE(YM2203_read_port_0_r, YM2203_write_port_0_w) |
| 110 | 110 | ADDRESS_MAP_END |
| 111 | 111 | |
| 112 | static struct YM2203interface ym2203_interface = | |
| 112 | static const struct YM2203interface ym2203_interface = | |
| 113 | 113 | { |
| 114 | 114 | input_port_3_r, |
| 115 | 115 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 252 | 252 | |
| 253 | 253 | |
| 254 | 254 | |
| 255 | static struct AY8910interface ay8910_interface = | |
| 255 | static const struct AY8910interface ay8910_interface = | |
| 256 | 256 | { |
| 257 | 257 | input_port_0_r, |
| 258 | 258 | input_port_1_r |
| r1404 | r1405 | |
|---|---|---|
| 423 | 423 | |
| 424 | 424 | |
| 425 | 425 | |
| 426 | static struct namco_interface namco_interface = | |
| 426 | static const struct namco_interface namco_interface = | |
| 427 | 427 | { |
| 428 | 428 | 8, /* number of voices */ |
| 429 | 429 | -1, /* memory region */ |
| r1404 | r1405 | |
|---|---|---|
| 462 | 462 | timer_call_after_resynch(NULL, YM2151_CLEAR,setvector_callback); |
| 463 | 463 | } |
| 464 | 464 | |
| 465 | static struct YM2151interface ym2151_interface = | |
| 465 | static const struct YM2151interface ym2151_interface = | |
| 466 | 466 | { |
| 467 | 467 | sound_irq |
| 468 | 468 | }; |
| 469 | 469 | |
| 470 | static struct IremGA20_interface iremGA20_interface = | |
| 470 | static const struct IremGA20_interface iremGA20_interface = | |
| 471 | 471 | { |
| 472 | 472 | REGION_SOUND1 |
| 473 | 473 | }; |
| r1404 | r1405 | |
|---|---|---|
| 595 | 595 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 596 | 596 | } |
| 597 | 597 | |
| 598 | static struct YM2610interface ym2610_interface = | |
| 598 | static const struct YM2610interface ym2610_interface = | |
| 599 | 599 | { |
| 600 | 600 | irqhandler, |
| 601 | 601 | REGION_SOUND2, /* Delta-T */ |
| r1404 | r1405 | |
| 622 | 622 | return 0; |
| 623 | 623 | } |
| 624 | 624 | |
| 625 | static struct CustomSound_interface subwoofer_interface = | |
| 625 | static const struct CustomSound_interface subwoofer_interface = | |
| 626 | 626 | { |
| 627 | 627 | subwoofer_sh_start, |
| 628 | 628 | 0, /* none */ |
| r1404 | r1405 | |
|---|---|---|
| 383 | 383 | cpunum_set_input_line(1,1,linestate); |
| 384 | 384 | } |
| 385 | 385 | |
| 386 | static struct YM3526interface ym3526_interface = | |
| 386 | static const struct YM3526interface ym3526_interface = | |
| 387 | 387 | { |
| 388 | 388 | irqhandler |
| 389 | 389 | }; |
| r1404 | r1405 | |
|---|---|---|
| 753 | 753 | |
| 754 | 754 | /* Sound Interfaces */ |
| 755 | 755 | |
| 756 | static struct AY8910interface ay8910_interface = | |
| 756 | static const struct AY8910interface ay8910_interface = | |
| 757 | 757 | { |
| 758 | 758 | input_port_5_r, |
| 759 | 759 | input_port_4_r |
| r1404 | r1405 | |
|---|---|---|
| 933 | 933 | K007232_set_volume(0,1,0,(v & 0x0f) * 0x11); |
| 934 | 934 | } |
| 935 | 935 | |
| 936 | static struct K007232_interface k007232_interface = | |
| 936 | static const struct K007232_interface k007232_interface = | |
| 937 | 937 | { |
| 938 | 938 | REGION_SOUND1, /* memory regions */ |
| 939 | 939 | volume_callback /* external port callback */ |
| 940 | 940 | }; |
| 941 | 941 | |
| 942 | static struct upd7759_interface upd7759_interface = | |
| 942 | static const struct upd7759_interface upd7759_interface = | |
| 943 | 943 | { |
| 944 | 944 | REGION_SOUND2 /* memory region */ |
| 945 | 945 | }; |
| r1404 | r1405 | |
|---|---|---|
| 641 | 641 | |
| 642 | 642 | /* Provided by Jim Hernandez: 3.5MHz for FM, 30KHz (!) for ADPCM */ |
| 643 | 643 | |
| 644 | static struct YM2151interface ym2151_interface = | |
| 644 | static const struct YM2151interface ym2151_interface = | |
| 645 | 645 | { |
| 646 | 646 | megasys1_sound_irq |
| 647 | 647 | }; |
| r1404 | r1405 | |
| 814 | 814 | } |
| 815 | 815 | |
| 816 | 816 | |
| 817 | static struct YM2203interface ym2203_interface = | |
| 817 | static const struct YM2203interface ym2203_interface = | |
| 818 | 818 | { |
| 819 | 819 | 0, |
| 820 | 820 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 610 | 610 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 611 | 611 | } |
| 612 | 612 | |
| 613 | static struct YM2610interface ym2610_interface = | |
| 613 | static const struct YM2610interface ym2610_interface = | |
| 614 | 614 | { |
| 615 | 615 | irqhandler, |
| 616 | 616 | REGION_SOUND1, |
| r1404 | r1405 | |
|---|---|---|
| 557 | 557 | |
| 558 | 558 | /* Sound Interfaces */ |
| 559 | 559 | |
| 560 | static struct YM2203interface ym2203_interface = | |
| 560 | static const struct YM2203interface ym2203_interface = | |
| 561 | 561 | { |
| 562 | 562 | input_port_3_r, // DSW-1 connected to port A |
| 563 | 563 | input_port_4_r // DSW-2 connected to port B |
| r1404 | r1405 | |
|---|---|---|
| 294 | 294 | |
| 295 | 295 | |
| 296 | 296 | |
| 297 | static struct CustomSound_interface custom_interface = | |
| 297 | static const struct CustomSound_interface custom_interface = | |
| 298 | 298 | { |
| 299 | 299 | wiping_sh_start |
| 300 | 300 | }; |
| r1404 | r1405 | |
|---|---|---|
| 3048 | 3048 | * |
| 3049 | 3049 | *************************************/ |
| 3050 | 3050 | |
| 3051 | static struct namco_interface namco_interface = | |
| 3051 | static const struct namco_interface namco_interface = | |
| 3052 | 3052 | { |
| 3053 | 3053 | 3, /* number of voices */ |
| 3054 | 3054 | REGION_SOUND1 /* memory region */ |
| r1404 | r1405 | |
| 3314 | 3314 | MDRV_GFXDECODE(crush4) |
| 3315 | 3315 | MACHINE_DRIVER_END |
| 3316 | 3316 | |
| 3317 | static struct AY8910interface crushs_ay8910_interface = | |
| 3317 | static const struct AY8910interface crushs_ay8910_interface = | |
| 3318 | 3318 | { |
| 3319 | 3319 | NULL |
| 3320 | 3320 | }; |
| r1404 | r1405 | |
|---|---|---|
| 330 | 330 | } |
| 331 | 331 | |
| 332 | 332 | |
| 333 | static struct YM2151interface ym2151_interface = | |
| 333 | static const struct YM2151interface ym2151_interface = | |
| 334 | 334 | { |
| 335 | 335 | chqflag_ym2151_irq_w |
| 336 | 336 | }; |
| r1404 | r1405 | |
| 351 | 351 | K007232_set_volume(1,0,(v & 0x0f)*0x11/2,(v >> 4)*0x11/2); |
| 352 | 352 | } |
| 353 | 353 | |
| 354 | static struct K007232_interface k007232_interface_1 = | |
| 354 | static const struct K007232_interface k007232_interface_1 = | |
| 355 | 355 | { |
| 356 | 356 | REGION_SOUND1, |
| 357 | 357 | volume_callback0 |
| 358 | 358 | }; |
| 359 | 359 | |
| 360 | static struct K007232_interface k007232_interface_2 = | |
| 360 | static const struct K007232_interface k007232_interface_2 = | |
| 361 | 361 | { |
| 362 | 362 | REGION_SOUND2, |
| 363 | 363 | volume_callback1 |
| r1404 | r1405 | |
|---|---|---|
| 35 | 35 | //**************************************************************************** |
| 36 | 36 | // Imports |
| 37 | 37 | |
| 38 | extern gfx_layout bwing_tilelayout; | |
| 38 | extern const gfx_layout bwing_tilelayout; | |
| 39 | 39 | |
| 40 | 40 | extern WRITE8_HANDLER( bwing_paletteram_w ); |
| 41 | 41 | extern WRITE8_HANDLER( bwing_videoram_w ); |
| r1404 | r1405 | |
|---|---|---|
| 69 | 69 | |
| 70 | 70 | static WRITE16_HANDLER( protection_w ) |
| 71 | 71 | { |
| 72 | static int maplist[4][10] = { | |
| 72 | static const int maplist[4][10] = { | |
| 73 | 73 | { 1, 0, 3, 2, 4, 5, 6, 7, 8, 9 }, |
| 74 | 74 | { 4, 5, 6, 7, 1, 0, 3, 2, 8, 9 }, |
| 75 | 75 | { 3, 2, 1, 0, 6, 7, 4, 5, 8, 9 }, |
| r1404 | r1405 | |
| 107 | 107 | } |
| 108 | 108 | case 2: |
| 109 | 109 | { |
| 110 | static int delta1[10] = { | |
| 110 | static const int delta1[10] = { | |
| 111 | 111 | 0x1f80, 0x1c80, 0x2700, 0x2400, 0x2b80, 0x2e80, 0x3300, 0x3600, 0x3a80, 0x3d80 |
| 112 | 112 | }; |
| 113 | static int delta2[10] = { | |
| 113 | static const int delta2[10] = { | |
| 114 | 114 | 0x2180, 0x1800, 0x3480, 0x2b00, 0x3e00, 0x4780, 0x5100, 0x5a80, 0x6400, 0x6d80 |
| 115 | 115 | }; |
| 116 | 116 | |
| r1404 | r1405 | |
| 161 | 161 | /* We simulate them with 3 buttons the same way the other versions |
| 162 | 162 | internally do */ |
| 163 | 163 | |
| 164 | static int scale[8] = { 0x00, 0x40, 0xe0, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe }; | |
| 164 | static const int scale[8] = { 0x00, 0x40, 0xe0, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe }; | |
| 165 | 165 | |
| 166 | 166 | static READ16_HANDLER( button1_r ) |
| 167 | 167 | { |
| r1404 | r1405 | |
| 803 | 803 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 804 | 804 | } |
| 805 | 805 | |
| 806 | static struct YM2151interface ym2151_interface = | |
| 806 | static const struct YM2151interface ym2151_interface = | |
| 807 | 807 | { |
| 808 | 808 | irq_handler |
| 809 | 809 | }; |
| 810 | 810 | |
| 811 | static struct MSM5205interface msm5205_interface = | |
| 811 | static const struct MSM5205interface msm5205_interface = | |
| 812 | 812 | { |
| 813 | 813 | 0, /* interrupt function */ |
| 814 | 814 | MSM5205_SEX_4B /* 8KHz playback ? */ |
| r1404 | r1405 | |
|---|---|---|
| 575 | 575 | } |
| 576 | 576 | |
| 577 | 577 | |
| 578 | static struct YM2203interface ym2203_interface = | |
| 578 | static const struct YM2203interface ym2203_interface = | |
| 579 | 579 | { |
| 580 | 580 | 0, |
| 581 | 581 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 1019 | 1019 | INPUT_PORTS_END |
| 1020 | 1020 | |
| 1021 | 1021 | |
| 1022 | static ppc_config ppc602_config = | |
| 1022 | static const ppc_config ppc602_config = | |
| 1023 | 1023 | { |
| 1024 | 1024 | PPC_MODEL_602, |
| 1025 | 1025 | 0x20, /* Multiplier 2, Bus = 33MHz, Core = 66MHz */ |
| r1404 | r1405 | |
|---|---|---|
| 189 | 189 | |
| 190 | 190 | INPUT_PORTS_END |
| 191 | 191 | |
| 192 | static struct NESinterface cham24_interface_1 = | |
| 192 | static const struct NESinterface cham24_interface_1 = | |
| 193 | 193 | { |
| 194 | 194 | REGION_CPU1 |
| 195 | 195 | }; |
| r1404 | r1405 | |
|---|---|---|
| 443 | 443 | } |
| 444 | 444 | } |
| 445 | 445 | |
| 446 | static struct EEPROM_interface eeprom_interface_93C46_8bit = | |
| 446 | static const struct EEPROM_interface eeprom_interface_93C46_8bit = | |
| 447 | 447 | { |
| 448 | 448 | 7, // address bits 7 |
| 449 | 449 | 8, // data bits 8 |
| r1404 | r1405 | |
| 2098 | 2098 | EEPROM_get_data_pointer(0)[cave_region_byte] = readinputport(2); |
| 2099 | 2099 | } |
| 2100 | 2100 | |
| 2101 | static struct YMZ280Binterface ymz280b_intf = | |
| 2101 | static const struct YMZ280Binterface ymz280b_intf = | |
| 2102 | 2102 | { |
| 2103 | 2103 | REGION_SOUND1, |
| 2104 | 2104 | sound_irq_gen |
| r1404 | r1405 | |
| 2109 | 2109 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 2110 | 2110 | } |
| 2111 | 2111 | |
| 2112 | static struct YM2151interface ym2151_interface = | |
| 2112 | static const struct YM2151interface ym2151_interface = | |
| 2113 | 2113 | { |
| 2114 | 2114 | irqhandler |
| 2115 | 2115 | }; |
| 2116 | 2116 | |
| 2117 | static struct YM2203interface ym2203_interface = | |
| 2117 | static const struct YM2203interface ym2203_interface = | |
| 2118 | 2118 | { |
| 2119 | 2119 | 0,0,0,0,irqhandler |
| 2120 | 2120 | }; |
| r1404 | r1405 | |
|---|---|---|
| 907 | 907 | return 0; |
| 908 | 908 | } |
| 909 | 909 | |
| 910 | static struct YM2203interface ym2203_interface_1 = | |
| 910 | static const struct YM2203interface ym2203_interface_1 = | |
| 911 | 911 | { |
| 912 | 912 | unk_r, |
| 913 | 913 | 0, |
| r1404 | r1405 | |
| 916 | 916 | irqhandler |
| 917 | 917 | }; |
| 918 | 918 | |
| 919 | static struct YM2203interface ym2203_interface_2 = | |
| 919 | static const struct YM2203interface ym2203_interface_2 = | |
| 920 | 920 | { |
| 921 | 921 | unk_r |
| 922 | 922 | }; |
| 923 | 923 | |
| 924 | static struct YM2151interface ym2151_interface = | |
| 924 | static const struct YM2151interface ym2151_interface = | |
| 925 | 925 | { |
| 926 | 926 | irqhandler |
| 927 | 927 | }; |
| r1404 | r1405 | |
|---|---|---|
| 405 | 405 | cpunum_set_input_line(1,M6809_IRQ_LINE,linestate); |
| 406 | 406 | } |
| 407 | 407 | |
| 408 | static struct YM3526interface ym3526_interface = | |
| 408 | static const struct YM3526interface ym3526_interface = | |
| 409 | 409 | { |
| 410 | 410 | irqhandler |
| 411 | 411 | }; |
| r1404 | r1405 | |
|---|---|---|
| 577 | 577 | cpunum_set_input_line(1, 0, irq ? ASSERT_LINE : CLEAR_LINE); |
| 578 | 578 | } |
| 579 | 579 | |
| 580 | static struct YMF278B_interface ymf278b_interface = | |
| 580 | static const struct YMF278B_interface ymf278b_interface = | |
| 581 | 581 | { |
| 582 | 582 | REGION_SOUND1 |
| 583 | 583 | }; |
| 584 | 584 | |
| 585 | static struct YMF262interface ymf262_interface = | |
| 585 | static const struct YMF262interface ymf262_interface = | |
| 586 | 586 | { |
| 587 | 587 | irqhandler /* irq */ |
| 588 | 588 | }; |
| r1404 | r1405 | |
|---|---|---|
| 2019 | 2019 | cpunum_set_input_line(2,0,linestate); /* M6502_IRQ_LINE */ |
| 2020 | 2020 | } |
| 2021 | 2021 | |
| 2022 | static struct YM3526interface ym3526_interface = | |
| 2022 | static const struct YM3526interface ym3526_interface = | |
| 2023 | 2023 | { |
| 2024 | 2024 | irqhandler |
| 2025 | 2025 | }; |
| 2026 | 2026 | |
| 2027 | static struct YM3526interface oscar_ym3526_interface = | |
| 2027 | static const struct YM3526interface oscar_ym3526_interface = | |
| 2028 | 2028 | { |
| 2029 | 2029 | oscar_irqhandler |
| 2030 | 2030 | }; |
| 2031 | 2031 | |
| 2032 | static struct YM3812interface ym3812_interface = | |
| 2032 | static const struct YM3812interface ym3812_interface = | |
| 2033 | 2033 | { |
| 2034 | 2034 | irqhandler |
| 2035 | 2035 | }; |
| 2036 | 2036 | |
| 2037 | static struct MSM5205interface msm5205_interface = | |
| 2037 | static const struct MSM5205interface msm5205_interface = | |
| 2038 | 2038 | { |
| 2039 | 2039 | csilver_adpcm_int, /* interrupt function */ |
| 2040 | 2040 | MSM5205_S48_4B /* 8KHz */ |
| r1404 | r1405 | |
|---|---|---|
| 151 | 151 | |
| 152 | 152 | |
| 153 | 153 | |
| 154 | static struct AY8910interface ay8910_interface_1 = { | |
| 154 | static const struct AY8910interface ay8910_interface_1 = { | |
| 155 | 155 | input_port_0_r, |
| 156 | 156 | input_port_1_r |
| 157 | 157 | }; |
| 158 | 158 | |
| 159 | static struct AY8910interface ay8910_interface_2 = { | |
| 159 | static const struct AY8910interface ay8910_interface_2 = { | |
| 160 | 160 | input_port_2_r, |
| 161 | 161 | input_port_3_r |
| 162 | 162 | }; |
| r1404 | r1405 | |
|---|---|---|
| 560 | 560 | cpunum_set_input_line(2,0,linestate); |
| 561 | 561 | } |
| 562 | 562 | |
| 563 | static struct YM3526interface ym3812_interface = | |
| 563 | static const struct YM3526interface ym3812_interface = | |
| 564 | 564 | { |
| 565 | 565 | irqhandler |
| 566 | 566 | }; |
| 567 | 567 | |
| 568 | static struct MSM5205interface msm5205_interface = | |
| 568 | static const struct MSM5205interface msm5205_interface = | |
| 569 | 569 | { |
| 570 | 570 | tbowl_adpcm_int, /* interrupt function */ |
| 571 | 571 | MSM5205_S48_4B /* 8KHz */ |
| r1404 | r1405 | |
|---|---|---|
| 246 | 246 | cpunum_set_input_line(0, M6809_FIRQ_LINE, irq ? ASSERT_LINE : CLEAR_LINE); |
| 247 | 247 | } |
| 248 | 248 | |
| 249 | static struct YM3526interface ym3526_interface = | |
| 249 | static const struct YM3526interface ym3526_interface = | |
| 250 | 250 | { |
| 251 | 251 | irqhandler |
| 252 | 252 | }; |
| r1404 | r1405 | |
|---|---|---|
| 340 | 340 | GFXDECODE_END |
| 341 | 341 | |
| 342 | 342 | |
| 343 | static struct AY8910interface ay8910_interface = | |
| 343 | static const struct AY8910interface ay8910_interface = | |
| 344 | 344 | { |
| 345 | 345 | input_port_6_r, // |
| 346 | 346 | input_port_7_r, // |
| r1404 | r1405 | |
|---|---|---|
| 53 | 53 | amidar_soundram[offset & 0x03ff] = data; |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | static struct AY8910interface amidar_ay8910_interface_2 = | |
| 56 | static const struct AY8910interface amidar_ay8910_interface_2 = | |
| 57 | 57 | { |
| 58 | 58 | soundlatch_r, |
| 59 | 59 | scramble_portB_r |
| r1404 | r1405 | |
|---|---|---|
| 633 | 633 | GFXDECODE_END |
| 634 | 634 | |
| 635 | 635 | |
| 636 | static struct AY8910interface ay8910_interface = | |
| 636 | static const struct AY8910interface ay8910_interface = | |
| 637 | 637 | { |
| 638 | 638 | soundlatch_r |
| 639 | 639 | }; |
| r1404 | r1405 | |
|---|---|---|
| 440 | 440 | * |
| 441 | 441 | *************************************/ |
| 442 | 442 | |
| 443 | static struct POKEYinterface pokey_interface = | |
| 443 | static const struct POKEYinterface pokey_interface = | |
| 444 | 444 | { |
| 445 | 445 | { 0 }, |
| 446 | 446 | input_port_2_r |
| r1404 | r1405 | |
|---|---|---|
| 594 | 594 | * |
| 595 | 595 | *************************************/ |
| 596 | 596 | |
| 597 | static struct YM2151interface ym2151_interface = | |
| 597 | static const struct YM2151interface ym2151_interface = | |
| 598 | 598 | { |
| 599 | 599 | ym2151_irq_gen |
| 600 | 600 | }; |
| 601 | 601 | |
| 602 | 602 | |
| 603 | static struct upd7759_interface upd7759_interface = | |
| 603 | static const struct upd7759_interface upd7759_interface = | |
| 604 | 604 | { |
| 605 | 605 | REGION_SOUND1 |
| 606 | 606 | }; |
| r1404 | r1405 | |
|---|---|---|
| 448 | 448 | INPUT_PORTS_END |
| 449 | 449 | |
| 450 | 450 | |
| 451 | static struct AY8910interface ay8910_interface_1 = { | |
| 451 | static const struct AY8910interface ay8910_interface_1 = { | |
| 452 | 452 | input_port_0_r, |
| 453 | 453 | input_port_1_r |
| 454 | 454 | }; |
| 455 | 455 | |
| 456 | static struct AY8910interface ay8910_interface_2 = { | |
| 456 | static const struct AY8910interface ay8910_interface_2 = { | |
| 457 | 457 | input_port_2_r, |
| 458 | 458 | input_port_3_r |
| 459 | 459 | }; |
| r1404 | r1405 | |
|---|---|---|
| 341 | 341 | |
| 342 | 342 | ***************************************************************************/ |
| 343 | 343 | |
| 344 | static struct YM2151interface ym2151_interface = | |
| 344 | static const struct YM2151interface ym2151_interface = | |
| 345 | 345 | { |
| 346 | 346 | 0, |
| 347 | 347 | crimfght_snd_bankswitch_w |
| r1404 | r1405 | |
| 353 | 353 | K007232_set_volume(0,1,0,(v >> 4) * 0x11); |
| 354 | 354 | } |
| 355 | 355 | |
| 356 | static struct K007232_interface k007232_interface = | |
| 356 | static const struct K007232_interface k007232_interface = | |
| 357 | 357 | { |
| 358 | 358 | REGION_SOUND1, /* memory regions */ |
| 359 | 359 | volume_callback /* external port callback */ |
| r1404 | r1405 | |
|---|---|---|
| 815 | 815 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 816 | 816 | } |
| 817 | 817 | |
| 818 | static struct YM2610interface ym2610_interface = | |
| 818 | static const struct YM2610interface ym2610_interface = | |
| 819 | 819 | { |
| 820 | 820 | irq_handler, |
| 821 | 821 | REGION_SOUND1, /* Delta-T */ |
| r1404 | r1405 | |
| 823 | 823 | }; |
| 824 | 824 | |
| 825 | 825 | |
| 826 | static struct YM2151interface ym2151_interface = | |
| 826 | static const struct YM2151interface ym2151_interface = | |
| 827 | 827 | { |
| 828 | 828 | irq_handler, |
| 829 | 829 | sound_bankswitch_w |
| 830 | 830 | }; |
| 831 | 831 | |
| 832 | static struct MSM5205interface msm5205_interface = | |
| 832 | static const struct MSM5205interface msm5205_interface = | |
| 833 | 833 | { |
| 834 | 834 | asuka_msm5205_vck, /* VCK function */ |
| 835 | 835 | MSM5205_S48_4B /* 8 kHz */ |
| r1404 | r1405 | |
|---|---|---|
| 470 | 470 | logerror("sound irq\n"); |
| 471 | 471 | } |
| 472 | 472 | |
| 473 | static struct YMZ280Binterface ymz280b_intf = | |
| 473 | static const struct YMZ280Binterface ymz280b_intf = | |
| 474 | 474 | { |
| 475 | 475 | REGION_SOUND1, |
| 476 | 476 | sound_irq_gen |
| r1404 | r1405 | |
|---|---|---|
| 236 | 236 | |
| 237 | 237 | ***************************************************************************/ |
| 238 | 238 | |
| 239 | static struct K053260_interface k053260_interface = | |
| 239 | static const struct K053260_interface k053260_interface = | |
| 240 | 240 | { |
| 241 | 241 | REGION_SOUND1 /* memory region */ |
| 242 | 242 | }; |
| r1404 | r1405 | |
|---|---|---|
| 282 | 282 | cpunum_set_input_line(1,0,linestate); |
| 283 | 283 | } |
| 284 | 284 | |
| 285 | static struct YM3526interface ym3526_interface = | |
| 285 | static const struct YM3526interface ym3526_interface = | |
| 286 | 286 | { |
| 287 | 287 | irqhandler |
| 288 | 288 | }; |
| r1404 | r1405 | |
|---|---|---|
| 63 | 63 | starwars_out_w(4, 0); |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | /* reset the mathbox */ | |
| 67 | swmathbox_reset(); | |
| 66 | /* reset the matrix processor */ | |
| 67 | starwars_mproc_reset(); | |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | |
| r1404 | r1405 | |
| 178 | 178 | AM_RANGE(0x46a0, 0x46bf) AM_WRITE(starwars_nstore_w) |
| 179 | 179 | AM_RANGE(0x46c0, 0x46c2) AM_WRITE(starwars_adc_select_w) |
| 180 | 180 | 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 */ | |
| 185 | 185 | AM_RANGE(0x4800, 0x4fff) AM_RAM /* CPU and Math RAM */ |
| 186 | 186 | AM_RANGE(0x5000, 0x5fff) AM_RAM AM_BASE(&starwars_mathram) /* CPU and Math RAM */ |
| 187 | 187 | AM_RANGE(0x6000, 0x7fff) AM_ROMBANK(1) /* banked ROM */ |
| r1404 | r1405 | |
| 563 | 563 | |
| 564 | 564 | /* prepare the mathbox */ |
| 565 | 565 | starwars_is_esb = 0; |
| 566 | sw | |
| 566 | starw | |
| 567 | 567 | |
| 568 | 568 | /* initialize banking */ |
| 569 | 569 | memory_configure_bank(1, 0, 2, memory_region(REGION_CPU1) + 0x6000, 0x10000 - 0x6000); |
| r1404 | r1405 | |
| 591 | 591 | /* install additional banking */ |
| 592 | 592 | memory_install_read8_handler(0, ADDRESS_SPACE_PROGRAM, 0xa000, 0xffff, 0, 0, MRA8_BANK2); |
| 593 | 593 | |
| 594 | /* prepare the mat | |
| 594 | /* prepare the matri | |
| 595 | 595 | starwars_is_esb = 1; |
| 596 | sw | |
| 596 | starw | |
| 597 | 597 | |
| 598 | 598 | /* initialize banking */ |
| 599 | 599 | memory_configure_bank(1, 0, 2, memory_region(REGION_CPU1) + 0x6000, 0x10000 - 0x6000); |
| r1404 | r1405 | |
|---|---|---|
| 7 | 7 | #include "driver.h" |
| 8 | 8 | #include "sound/s14001a.h" |
| 9 | 9 | |
| 10 | static struct S14001A_interface wolfpack_s14001a_interface = | |
| 10 | static const struct S14001A_interface wolfpack_s14001a_interface = | |
| 11 | 11 | { |
| 12 | 12 | REGION_SOUND1 /* voice data region */ |
| 13 | 13 | }; |
| r1404 | r1405 | |
|---|---|---|
| 363 | 363 | GFXDECODE_ENTRY( REGION_GFX2, 0x0020, spritelayout, 0, 16 ) |
| 364 | 364 | GFXDECODE_END |
| 365 | 365 | |
| 366 | static struct AY8910interface ay8910_interface = | |
| 366 | static const struct AY8910interface ay8910_interface = | |
| 367 | 367 | { |
| 368 | 368 | input_port_6_r, // |
| 369 | 369 | input_port_7_r, // |
| r1404 | r1405 | |
|---|---|---|
| 261 | 261 | * |
| 262 | 262 | *************************************/ |
| 263 | 263 | |
| 264 | static struct AY8910interface ay8910_interface = | |
| 264 | static const struct AY8910interface ay8910_interface = | |
| 265 | 265 | { |
| 266 | 266 | exerion_porta_r, |
| 267 | 267 | 0, |
| r1404 | r1405 | |
|---|---|---|
| 32 | 32 | } |
| 33 | 33 | else |
| 34 | 34 | { |
| 35 | static int jumptable[] = | |
| 35 | static const int jumptable[] = | |
| 36 | 36 | { |
| 37 | 37 | 0x02be, 0x0314, 0x0475, 0x0662, 0x0694, 0x08f3, 0x0959, 0x096f, |
| 38 | 38 | 0x0992, 0x09a4, 0x0a50, 0x0d69, 0x0eee, 0x0f98, 0x1040, 0x1075, |
| r1404 | r1405 | |
| 274 | 274 | |
| 275 | 275 | |
| 276 | 276 | |
| 277 | static struct YM2203interface ym2203_interface = | |
| 277 | static const struct YM2203interface ym2203_interface = | |
| 278 | 278 | { |
| 279 | 279 | input_port_2_r |
| 280 | 280 | }; |
| r1404 | r1405 | |
|---|---|---|
| 74 | 74 | static READ16_HANDLER( alpha_mcu_r ) |
| 75 | 75 | { |
| 76 | 76 | 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}}; | |
| 79 | 79 | |
| 80 | 80 | static int latch; |
| 81 | 81 | int source=shared_ram[offset]; |
| r1404 | r1405 | |
| 288 | 288 | cpunum_set_input_line(0, 2, HOLD_LINE); |
| 289 | 289 | } |
| 290 | 290 | |
| 291 | static struct AY8910interface ay8910_interface = | |
| 291 | static const struct AY8910interface ay8910_interface = | |
| 292 | 292 | { |
| 293 | 293 | soundlatch_r |
| 294 | 294 | }; |
| r1404 | r1405 | |
|---|---|---|
| 395 | 395 | cpunum_set_input_line(1,0,linestate); |
| 396 | 396 | } |
| 397 | 397 | |
| 398 | static struct YM3812interface ym3812_interface = | |
| 398 | static const struct YM3812interface ym3812_interface = | |
| 399 | 399 | { |
| 400 | 400 | irqhandler /* IRQ Line */ |
| 401 | 401 | }; |
| r1404 | r1405 | |
|---|---|---|
| 3302 | 3302 | INPUT_PORTS_END |
| 3303 | 3303 | |
| 3304 | 3304 | |
| 3305 | static struct AY8910interface ay8910_interface = | |
| 3305 | static const struct AY8910interface ay8910_interface = | |
| 3306 | 3306 | { |
| 3307 | 3307 | royalmah_player_1_port_r, |
| 3308 | 3308 | royalmah_player_2_port_r |
| r1404 | r1405 | |
|---|---|---|
| 252 | 252 | K007232_set_volume(1,1,(v & 0x0f) * 0x11/2,(v >> 4) * 0x11/2); |
| 253 | 253 | } |
| 254 | 254 | |
| 255 | static struct K007232_interface k007232_interface_1 = | |
| 255 | static const struct K007232_interface k007232_interface_1 = | |
| 256 | 256 | { |
| 257 | 257 | REGION_SOUND1, |
| 258 | 258 | volume_callback0 |
| 259 | 259 | }; |
| 260 | 260 | |
| 261 | static struct K007232_interface k007232_interface_2 = | |
| 261 | static const struct K007232_interface k007232_interface_2 = | |
| 262 | 262 | { |
| 263 | 263 | REGION_SOUND2, |
| 264 | 264 | volume_callback1 |
| r1404 | r1405 | |
|---|---|---|
| 319 | 319 | * |
| 320 | 320 | *************************************/ |
| 321 | 321 | |
| 322 | static struct CustomSound_interface amiga_custom_interface = | |
| 322 | static const struct CustomSound_interface amiga_custom_interface = | |
| 323 | 323 | { |
| 324 | 324 | amiga_sh_start |
| 325 | 325 | }; |
| 326 | 326 | |
| 327 | 327 | |
| 328 | static struct ES5503interface es5503_intf = | |
| 328 | static const struct ES5503interface es5503_intf = | |
| 329 | 329 | { |
| 330 | 330 | NULL, |
| 331 | 331 | NULL, |
| r1404 | r1405 | |
|---|---|---|
| 103 | 103 | ADDRESS_MAP_END |
| 104 | 104 | |
| 105 | 105 | |
| 106 | ||
| 107 | 106 | static INPUT_PORTS_START( shisen ) |
| 108 | 107 | PORT_START_TAG("IN0") |
| 109 | 108 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| r1404 | r1405 | |
| 136 | 135 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 137 | 136 | |
| 138 | 137 | 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 ) ) | |
| 141 | 140 | 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") | |
| 145 | 144 | PORT_DIPSETTING( 0x0c, DEF_STR( Easy ) ) |
| 146 | 145 | PORT_DIPSETTING( 0x08, DEF_STR( Normal ) ) |
| 147 | 146 | PORT_DIPSETTING( 0x04, DEF_STR( Hard ) ) |
| 148 | 147 | 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 ) ) | |
| 150 | 175 | |
| 151 | 176 | 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") | |
| 153 | 178 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 154 | 179 | 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") | |
| 156 | 181 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 157 | 182 | 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") | |
| 162 | 187 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 163 | 188 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 164 | PORT_DIPNAME( 0x10, 0x10, "Women Select" ) | |
| 189 | PORT_DIPNAME( 0x10, 0x10, "Women Select" ) PORT_DIPLOCATION("SW2:5") | |
| 165 | 190 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 166 | 191 | PORT_DIPSETTING( 0x10, DEF_STR( Yes ) ) |
| 167 | 192 | /* 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") | |
| 169 | 194 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 170 | 195 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 171 | PORT_DIPNAME( 0x40, 0x40, "Play Mode" ) | |
| 196 | PORT_DIPNAME( 0x40, 0x40, "Play Mode" ) PORT_DIPLOCATION("SW2:7") | |
| 172 | 197 | PORT_DIPSETTING( 0x00, "1 Player" ) |
| 173 | 198 | PORT_DIPSETTING( 0x40, "2 Player" ) |
| 174 | PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) | |
| 199 | PORT_SERVICE_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW2:8" ) | |
| 200 | INPUT_PORTS_END | |
| 175 | 201 | |
| 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 ) ) | |
| 202 | static 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 ) ) | |
| 205 | 212 | INPUT_PORTS_END |
| 206 | 213 | |
| 207 | 214 | |
| 208 | ||
| 209 | 215 | static const gfx_layout charlayout = |
| 210 | 216 | { |
| 211 | 217 | 8,8, |
| r1404 | r1405 | |
| 224 | 230 | |
| 225 | 231 | |
| 226 | 232 | |
| 227 | static struct YM2151interface ym2151_interface = | |
| 233 | static const struct YM2151interface ym2151_interface = | |
| 228 | 234 | { |
| 229 | 235 | m72_ym2151_irq_handler |
| 230 | 236 | }; |
| r1404 | r1405 | |
| 414 | 420 | /* no samples on this board */ |
| 415 | 421 | ROM_END |
| 416 | 422 | |
| 417 | GAME( 1989, sichuan2, 0, shisen, shisen, 0, ROT0, "Tamtex", "Sichuan II (hack?) (set 1)", 0 ) | |
| 418 | GAME( 1989, sichuana, sichuan2, shisen, shisen, 0, ROT0, "Tamtex", "Sichuan II (hack?) (set 2)", 0 ) | |
| 419 | GAME( 1989, shisen, sichuan2, shisen, shisen, 0, ROT0, "Tamtex", "Shisensho - Joshiryo-Hen (Japan)", 0 ) | |
| 420 | GAME( 1989, matchit, sichuan2, shisen, shisen, 0, ROT0, "Tamtex", "Match It", 0 ) | |
| 423 | GAME( 1989, matchit, 0, shisen, matchit, 0, ROT0, "Tamtex", "Match It", 0 ) | |
| 424 | GAME( 1989, shisen, matchit, shisen, shisen, 0, ROT0, "Tamtex", "Shisensho - Joshiryo-Hen (Japan)", 0 ) | |
| 425 | GAME( 1989, sichuan2, matchit, shisen, shisen, 0, ROT0, "hack", "Sichuan II (hack set 1)", 0 ) | |
| 426 | GAME( 1989, sichuana, matchit, shisen, shisen, 0, ROT0, "hack", "Sichuan II (hack set 2)", 0 ) |
| r1404 | r1405 | |
|---|---|---|
| 244 | 244 | all word accesses are to the input port */ |
| 245 | 245 | if (ACCESSING_MSB && !ACCESSING_LSB) |
| 246 | 246 | { |
| 247 | static UINT8 to_main[] = | |
| 247 | static const UINT8 to_main[] = | |
| 248 | 248 | { |
| 249 | 249 | 0x82,0xc7,0x00,0x2c,0x6c,0x00,0x9f,0xc7,0x00,0x29,0x69,0x00,0x8b,0xc7,0x00 |
| 250 | 250 | }; |
| r1404 | r1405 | |
| 2878 | 2878 | |
| 2879 | 2879 | |
| 2880 | 2880 | |
| 2881 | static struct YM2203interface ym2203_nmk004_interface = | |
| 2881 | static const struct YM2203interface ym2203_nmk004_interface = | |
| 2882 | 2882 | { |
| 2883 | 2883 | 0,0,0,0,NMK004_irq |
| 2884 | 2884 | }; |
| r1404 | r1405 | |
| 2888 | 2888 | cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE); |
| 2889 | 2889 | } |
| 2890 | 2890 | |
| 2891 | static struct YM2203interface ym2203_interface = | |
| 2891 | static const struct YM2203interface ym2203_interface = | |
| 2892 | 2892 | { |
| 2893 | 2893 | 0,0,0,0,ym2203_irqhandler |
| 2894 | 2894 | }; |
| r1404 | r1405 | |
| 4850 | 4850 | |
| 4851 | 4851 | |
| 4852 | 4852 | |
| 4853 | static UINT8 decode_byte(UINT8 src, UINT8 *bitp) | |
| 4853 | static UINT8 decode_byte(UINT8 src, const UINT8 *bitp) | |
| 4854 | 4854 | { |
| 4855 | 4855 | UINT8 ret, i; |
| 4856 | 4856 | |
| r1404 | r1405 | |
| 4867 | 4867 | } |
| 4868 | 4868 | |
| 4869 | 4869 | |
| 4870 | static UINT16 decode_word(UINT16 src, UINT8 *bitp) | |
| 4870 | static UINT16 decode_word(UINT16 src, const UINT8 *bitp) | |
| 4871 | 4871 | { |
| 4872 | 4872 | UINT16 ret, i; |
| 4873 | 4873 | |
| r1404 | r1405 | |
| 4891 | 4891 | UINT8 *rom; |
| 4892 | 4892 | int A; |
| 4893 | 4893 | |
| 4894 | static UINT8 decode_data_bg[8][8] = | |
| 4894 | static const UINT8 decode_data_bg[8][8] = | |
| 4895 | 4895 | { |
| 4896 | 4896 | {0x3,0x0,0x7,0x2,0x5,0x1,0x4,0x6}, |
| 4897 | 4897 | {0x1,0x2,0x6,0x5,0x4,0x0,0x3,0x7}, |
| r1404 | r1405 | |
| 4903 | 4903 | {0x3,0x4,0x7,0x6,0x2,0x0,0x5,0x1}, |
| 4904 | 4904 | }; |
| 4905 | 4905 | |
| 4906 | static UINT8 decode_data_sprite[8][16] = | |
| 4906 | static const UINT8 decode_data_sprite[8][16] = | |
| 4907 | 4907 | { |
| 4908 | 4908 | {0x9,0x3,0x4,0x5,0x7,0x1,0xb,0x8,0x0,0xd,0x2,0xc,0xe,0x6,0xf,0xa}, |
| 4909 | 4909 | {0x1,0x3,0xc,0x4,0x0,0xf,0xb,0xa,0x8,0x5,0xe,0x6,0xd,0x2,0x7,0x9}, |
| r1404 | r1405 | |
| 4943 | 4943 | int A; |
| 4944 | 4944 | |
| 4945 | 4945 | /* 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] = | |
| 4947 | 4947 | { |
| 4948 | 4948 | {0xe,0xc,0xa,0x8,0x7,0x5,0x3,0x1,0xf,0xd,0xb,0x9,0x6,0x4,0x2,0x0}, |
| 4949 | 4949 | }; |
| 4950 | 4950 | |
| 4951 | 4951 | /* 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] = | |
| 4953 | 4953 | { |
| 4954 | 4954 | {0x7,0x6,0x5,0x3,0x4,0x2,0x1,0x0}, |
| 4955 | 4955 | }; |
| r1404 | r1405 | |
| 4988 | 4988 | int A; |
| 4989 | 4989 | |
| 4990 | 4990 | /* 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] = | |
| 4992 | 4992 | { |
| 4993 | 4993 | {0x7,0x6,0x5,0x3,0x4,0x2,0x1,0x0}, |
| 4994 | 4994 | }; |
| r1404 | r1405 | |
|---|---|---|
| 231 | 231 | } |
| 232 | 232 | |
| 233 | 233 | |
| 234 | static d3d_interface d3d8_interface = | |
| 234 | static const d3d_interface d3d8_interface = | |
| 235 | 235 | { |
| 236 | 236 | d3d_check_device_format, |
| 237 | 237 | d3d_check_device_type, |
| r1404 | r1405 | |
| 406 | 406 | } |
| 407 | 407 | |
| 408 | 408 | |
| 409 | static d3d_device_interface d3d8_device_interface = | |
| 409 | static const d3d_device_interface d3d8_device_interface = | |
| 410 | 410 | { |
| 411 | 411 | device_begin_scene, |
| 412 | 412 | device_clear, |
| r1404 | r1405 | |
| 458 | 458 | } |
| 459 | 459 | |
| 460 | 460 | |
| 461 | static d3d_surface_interface d3d8_surface_interface = | |
| 461 | static const d3d_surface_interface d3d8_surface_interface = | |
| 462 | 462 | { |
| 463 | 463 | surface_lock_rect, |
| 464 | 464 | surface_release, |
| r1404 | r1405 | |
| 499 | 499 | } |
| 500 | 500 | |
| 501 | 501 | |
| 502 | static d3d_texture_interface d3d8_texture_interface = | |
| 502 | static const d3d_texture_interface d3d8_texture_interface = | |
| 503 | 503 | { |
| 504 | 504 | texture_get_surface_level, |
| 505 | 505 | texture_lock_rect, |
| r1404 | r1405 | |
| 534 | 534 | } |
| 535 | 535 | |
| 536 | 536 | |
| 537 | static d3d_vertex_buffer_interface d3d8_vertex_buffer_interface = | |
| 537 | static const d3d_vertex_buffer_interface d3d8_vertex_buffer_interface = | |
| 538 | 538 | { |
| 539 | 539 | vertex_buffer_lock, |
| 540 | 540 | vertex_buffer_release, |
| r1404 | r1405 | |
|---|---|---|
| 229 | 229 | } |
| 230 | 230 | |
| 231 | 231 | |
| 232 | static d3d_interface d3d9_interface = | |
| 232 | static const d3d_interface d3d9_interface = | |
| 233 | 233 | { |
| 234 | 234 | d3d_check_device_format, |
| 235 | 235 | d3d_check_device_type, |
| r1404 | r1405 | |
| 439 | 439 | } |
| 440 | 440 | |
| 441 | 441 | |
| 442 | static d3d_device_interface d3d9_device_interface = | |
| 442 | static const d3d_device_interface d3d9_device_interface = | |
| 443 | 443 | { |
| 444 | 444 | device_begin_scene, |
| 445 | 445 | device_clear, |
| r1404 | r1405 | |
| 491 | 491 | } |
| 492 | 492 | |
| 493 | 493 | |
| 494 | static d3d_surface_interface d3d9_surface_interface = | |
| 494 | static const d3d_surface_interface d3d9_surface_interface = | |
| 495 | 495 | { |
| 496 | 496 | surface_lock_rect, |
| 497 | 497 | surface_release, |
| r1404 | r1405 | |
| 532 | 532 | } |
| 533 | 533 | |
| 534 | 534 | |
| 535 | static d3d_texture_interface d3d9_texture_interface = | |
| 535 | static const d3d_texture_interface d3d9_texture_interface = | |
| 536 | 536 | { |
| 537 | 537 | texture_get_surface_level, |
| 538 | 538 | texture_lock_rect, |
| r1404 | r1405 | |
| 567 | 567 | } |
| 568 | 568 | |
| 569 | 569 | |
| 570 | static d3d_vertex_buffer_interface d3d9_vertex_buffer_interface = | |
| 570 | static const d3d_vertex_buffer_interface d3d9_vertex_buffer_interface = | |
| 571 | 571 | { |
| 572 | 572 | vertex_buffer_lock, |
| 573 | 573 | vertex_buffer_release, |
| r1404 | r1405 | |
|---|---|---|
| 212 | 212 | static device_info * joystick_list; |
| 213 | 213 | |
| 214 | 214 | // default axis names |
| 215 | static const TCHAR *default_axis_name[] = | |
| 215 | static const TCHAR *const default_axis_name[] = | |
| 216 | 216 | { |
| 217 | 217 | TEXT("X"), TEXT("Y"), TEXT("Z"), TEXT("RX"), |
| 218 | 218 | TEXT("RY"), TEXT("RZ"), TEXT("SL1"), TEXT("SL2") |
| r1404 | r1405 | |
| 914 | 914 | // allocate two lightgun devices |
| 915 | 915 | for (gunnum = 0; gunnum < 2; gunnum++) |
| 916 | 916 | { |
| 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") }; | |
| 918 | 918 | device_info *devinfo; |
| 919 | 919 | int axisnum, butnum; |
| 920 | 920 | |
| r1404 | r1405 | |
| 1735 | 1735 | |
| 1736 | 1736 | static TCHAR *rawinput_device_improve_name(TCHAR *name) |
| 1737 | 1737 | { |
| 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\\"); | |
| 1740 | 1740 | TCHAR *regstring = NULL; |
| 1741 | 1741 | TCHAR *parentid = NULL; |
| 1742 | 1742 | TCHAR *regpath = NULL; |
| r1404 | r1405 | |
|---|---|---|
| 733 | 733 | d3d->presentation.MultiSampleType = D3DMULTISAMPLE_NONE; |
| 734 | 734 | d3d->presentation.SwapEffect = D3DSWAPEFFECT_DISCARD; |
| 735 | 735 | d3d->presentation.hDeviceWindow = window->hwnd; |
| 736 | d3d->presentation.Windowed = | |
| 736 | d3d->presentation.Windowed = | |
| 737 | 737 | d3d->presentation.EnableAutoDepthStencil = FALSE; |
| 738 | 738 | d3d->presentation.AutoDepthStencilFormat = D3DFMT_D16; |
| 739 | 739 | d3d->presentation.Flags = 0; |
| r1404 | r1405 | |
|---|---|---|
| 42 | 42 | FILE *debug_source_file; |
| 43 | 43 | symbol_table *global_symtable; |
| 44 | 44 | |
| 45 | static const char *address_space_name[] = { "program", "data", "I/O" }; | |
| 45 | static const char *const address_space_name[] = { "program", "data", "I/O" }; | |
| 46 | 46 | |
| 47 | 47 | static UINT64 wpdata; |
| 48 | 48 | static UINT64 wpaddr; |
| r1404 | r1405 | |
| 1317 | 1317 | /* if we do, evaluate the condition */ |
| 1318 | 1318 | if (wp->condition == NULL || (expression_execute(wp->condition, &result) == EXPRERR_NONE && result)) |
| 1319 | 1319 | { |
| 1320 | static const char *sizes[] = | |
| 1320 | static const char *const sizes[] = | |
| 1321 | 1321 | { |
| 1322 | 1322 | "0bytes", "byte", "word", "3bytes", "dword", "5bytes", "6bytes", "7bytes", "qword" |
| 1323 | 1323 | }; |
| r1404 | r1405 | |
|---|---|---|
| 1275 | 1275 | |
| 1276 | 1276 | static void execute_wplist(int ref, int params, const char *param[]) |
| 1277 | 1277 | { |
| 1278 | static const char *spacenames[ADDRESS_SPACES] = { "program", "data", "I/O" }; | |
| 1278 | static const char *const spacenames[ADDRESS_SPACES] = { "program", "data", "I/O" }; | |
| 1279 | 1279 | int cpunum, printed = 0; |
| 1280 | 1280 | char buffer[256]; |
| 1281 | 1281 | |
| r1404 | r1405 | |
| 1292 | 1292 | { |
| 1293 | 1293 | if (cpuinfo->space[spacenum].first_wp) |
| 1294 | 1294 | { |
| 1295 | static const char *types[] = { "unkn ", "read ", "write", "r/w " }; | |
| 1295 | static const char *const types[] = { "unkn ", "read ", "write", "r/w " }; | |
| 1296 | 1296 | debug_cpu_watchpoint *wp; |
| 1297 | 1297 | |
| 1298 | 1298 | debug_console_printf("CPU %d %s space watchpoints:\n", cpunum, spacenames[spacenum]); |
| r1404 | r1405 | |
|---|---|---|
| 1158 | 1158 | /* reset the token stack */ |
| 1159 | 1159 | init_token_stack(expr); |
| 1160 | 1160 | |
| 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 | ||
| 1161 | 1167 | /* create a temporary token for holding intermediate number and memory values */ |
| 1162 | 1168 | tempnum.type = TOK_NUMBER; |
| 1163 | 1169 | tempnum.offset = 0; |
| r1404 | r1405 | |
|---|---|---|
| 53 | 53 | TABLE OF HELP |
| 54 | 54 | ***************************************************************************/ |
| 55 | 55 | |
| 56 | static help_item static_help_list[] = | |
| 56 | static const help_item static_help_list[] = | |
| 57 | 57 | { |
| 58 | 58 | { |
| 59 | 59 | "", |
| r1404 | r1405 | |
| 1035 | 1035 | const char *debug_get_help(const char *tag) |
| 1036 | 1036 | { |
| 1037 | 1037 | static char ambig_message[1024]; |
| 1038 | help_item *found = NULL; | |
| 1038 | const help_item *found = NULL; | |
| 1039 | 1039 | int i, msglen, foundcount = 0; |
| 1040 | 1040 | int taglen = (int)strlen(tag); |
| 1041 | 1041 | char tagcopy[256]; |
| r1404 | r1405 | |
|---|---|---|
| 199 | 199 | #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; } } } |
| 200 | 200 | |
| 201 | 201 | /* what they say it is ... */ |
| 202 | static unsigned char cycles1[] = | |
| 202 | static const unsigned char cycles1[] = | |
| 203 | 203 | { |
| 204 | 204 | /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ |
| 205 | 205 | /*0*/ 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, |
| r1404 | r1405 | |
|---|---|---|
| 30 | 30 | static unsigned EA_206(void) { E16=FETCH; E16+=FETCH<<8; EO=I.regs.w[BP]+(INT16)E16; EA=DefaultBase(SS)+EO; return EA; } |
| 31 | 31 | static unsigned EA_207(void) { E16=FETCH; E16+=FETCH<<8; EO=I.regs.w[BW]+(INT16)E16; EA=DefaultBase(DS)+EO; return EA; } |
| 32 | 32 | |
| 33 | static unsigned (*GetEA[192])(void)={ | |
| 33 | static unsigned (*const GetEA[192])(void)={ | |
| 34 | 34 | EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007, |
| 35 | 35 | EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007, |
| 36 | 36 | EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007, |
| r1404 | r1405 | |
|---|---|---|
| 246 | 246 | |
| 247 | 247 | static void i_wait(void); |
| 248 | 248 | |
| 249 | static void (*nec_instruction[256])(void) = | |
| 249 | static void (*const nec_instruction[256])(void) = | |
| 250 | 250 | { |
| 251 | 251 | i_add_br8, /* 0x00 */ |
| 252 | 252 | i_add_wr16, /* 0x01 */ |
| r1404 | r1405 | |
|---|---|---|
| 279 | 279 | INLINE void pref11(void); |
| 280 | 280 | |
| 281 | 281 | #if (BIG_SWITCH==0) |
| 282 | static void (*m6809_main[0x100])(void) = { | |
| 282 | static void (*const m6809_main[0x100])(void) = { | |
| 283 | 283 | neg_di, neg_di, illegal,com_di, lsr_di, illegal,ror_di, asr_di, /* 00 */ |
| 284 | 284 | asl_di, rol_di, dec_di, illegal,inc_di, tst_di, jmp_di, clr_di, |
| 285 | 285 | pref10, pref11, nop, sync, illegal,illegal,lbra, lbsr, /* 10 */ |
| r1404 | r1405 | |
|---|---|---|
| 342 | 342 | { 0xBC, 4, "CMPS", EXT } |
| 343 | 343 | }; |
| 344 | 344 | |
| 345 | static const opcodeinfo *m6809_pgpointers[3] = | |
| 345 | static const opcodeinfo *const m6809_pgpointers[3] = | |
| 346 | 346 | { |
| 347 | 347 | m6809_pg0opcodes, m6809_pg1opcodes, m6809_pg2opcodes |
| 348 | 348 | }; |
| r1404 | r1405 | |
|---|---|---|
| 178 | 178 | }; |
| 179 | 179 | |
| 180 | 180 | |
| 181 | /* global access */ | |
| 182 | struct m68k_memory_interface m68k_memory_intf; | |
| 183 | ||
| 184 | ||
| 185 | 181 | static void set_irq_line(int irqline, int state) |
| 186 | 182 | { |
| 187 | 183 | if (irqline == INPUT_LINE_NMI) |
| r1404 | r1405 | |
| 298 | 294 | } |
| 299 | 295 | #endif /* MAME_DEBUG */ |
| 300 | 296 | |
| 301 | #endif | |
| 297 | #endif /* HAS_M68008 */ | |
| 302 | 298 | |
| 303 | 299 | /**************************************************************************** |
| 304 | 300 | * M68010 section |
| r1404 | r1405 | |
| 814 | 810 | } |
| 815 | 811 | } |
| 816 | 812 | |
| 817 | #endif | |
| 813 | #endif /* HAS_M68008 */ | |
| 818 | 814 | |
| 819 | 815 | /************************************************************************** |
| 820 | 816 | * CPU-specific set_info |
| r1404 | r1405 | |
| 859 | 855 | } |
| 860 | 856 | } |
| 861 | 857 | |
| 862 | #endif | |
| 858 | #endif /* HAS_M68010 */ | |
| 863 | 859 | |
| 864 | 860 | /************************************************************************** |
| 865 | 861 | * CPU-specific set_info |
| r1404 | r1405 | |
| 1099 | 1095 | } |
| 1100 | 1096 | } |
| 1101 | 1097 | |
| 1102 | #endif | |
| 1098 | #endif /* HAS_M68EC020 */ | |
| 1103 | 1099 | |
| 1104 | 1100 | /************************************************************************** |
| 1105 | 1101 | * CPU-specific set_info |
| r1404 | r1405 | |
| 1301 | 1297 | } |
| 1302 | 1298 | } |
| 1303 | 1299 | |
| 1304 | #endif | |
| 1300 | #endif /* HAS_M68040 */ | |
| 1305 | 1301 |
| r1404 | r1405 | |
|---|---|---|
| 995 | 995 | |
| 996 | 996 | void m68k_state_register(const char *type, int index) |
| 997 | 997 | { |
| 998 | /* Note, D covers A because the dar array is common, REG_A=REG_D+8 */ | |
| 998 | 999 | state_save_register_item_array(type, index, REG_D); |
| 999 | state_save_register_item_array(type, index, REG_A); | |
| 1000 | 1000 | state_save_register_item(type, index, REG_PPC); |
| 1001 | 1001 | state_save_register_item(type, index, REG_PC); |
| 1002 | 1002 | state_save_register_item(type, index, REG_USP); |
| r1404 | r1405 | |
|---|---|---|
| 98 | 98 | static UINT8 executing_cpu = 0xff; |
| 99 | 99 | |
| 100 | 100 | /* default configuration */ |
| 101 | static tms34010_config default_config = | |
| 101 | static const tms34010_config default_config = | |
| 102 | 102 | { |
| 103 | 103 | 0 |
| 104 | 104 | }; |
| r1404 | r1405 | |
|---|---|---|
| 426 | 426 | switch (m37710i_cpu.m37710_regs[0x56+timer] & 0x3) |
| 427 | 427 | { |
| 428 | 428 | case 0: // timer mode |
| 429 | time = attotime_mul(ATTOTIME_IN_HZ( | |
| 429 | time = attotime_mul(ATTOTIME_IN_HZ(cpunum_get_clock(cpu_getactivecpu())), tscales[m37710i_cpu.m37710_regs[tcr[timer]]>>6]); | |
| 430 | 430 | time = attotime_mul(time, tval + 1); |
| 431 | 431 | |
| 432 | 432 | #if M37710_DEBUG |
| r1404 | r1405 | |
| 461 | 461 | switch (m37710i_cpu.m37710_regs[0x56+timer] & 0x3) |
| 462 | 462 | { |
| 463 | 463 | case 0: // timer mode |
| 464 | time = attotime_mul(ATTOTIME_IN_HZ( | |
| 464 | time = attotime_mul(ATTOTIME_IN_HZ(cpunum_get_clock(cpu_getactivecpu())), tscales[m37710i_cpu.m37710_regs[tcr[timer]]>>6]); | |
| 465 | 465 | time = attotime_mul(time, tval + 1); |
| 466 | 466 | |
| 467 | 467 | #if M37710_DEBUG |
| r1404 | r1405 | |
|---|---|---|
| 1052 | 1052 | return 0; |
| 1053 | 1053 | } |
| 1054 | 1054 | |
| 1055 | static SHARC_DASM_OP sharc_dasm_ops[] = | |
| 1055 | static const SHARC_DASM_OP sharc_dasm_ops[] = | |
| 1056 | 1056 | { |
| 1057 | 1057 | // |0 0 1| |
| 1058 | 1058 | { 0xe000, 0x2000, dasm_compute_dreg_dmpm }, |
| r1404 | r1405 | |
|---|---|---|
| 5 | 5 | void (* handler)(void); |
| 6 | 6 | } SHARC_OP; |
| 7 | 7 | |
| 8 | static SHARC_OP sharc_opcode_table[] = | |
| 8 | static const SHARC_OP sharc_opcode_table[] = | |
| 9 | 9 | { |
| 10 | 10 | // |0 0 1| |
| 11 | 11 | { 0xe000, 0x2000, sharcop_compute_dreg_dm_dreg_pm }, |
| r1404 | r1405 | |
|---|---|---|
| 28 | 28 | static unsigned EA_206(void) { i8086_ICount-=9; EO=FETCHOP; EO+=FETCHOP<<8; EO+=I.regs.w[BP]; EA=DefaultBase(SS)+(WORD)EO; return EA; } |
| 29 | 29 | static unsigned EA_207(void) { i8086_ICount-=9; EO=FETCHOP; EO+=FETCHOP<<8; EO+=I.regs.w[BX]; EA=DefaultBase(DS)+(WORD)EO; return EA; } |
| 30 | 30 | |
| 31 | static unsigned (*GetEA[192])(void)={ | |
| 31 | static unsigned (*const GetEA[192])(void)={ | |
| 32 | 32 | EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007, |
| 33 | 33 | EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007, |
| 34 | 34 | EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007, |
| r1404 | r1405 | |
|---|---|---|
| 337 | 337 | /* Structures pointing to various I/O functions */ |
| 338 | 338 | /************************************************/ |
| 339 | 339 | |
| 340 | static struct cpu_info v60_i = | |
| 340 | static const struct cpu_info v60_i = | |
| 341 | 341 | { |
| 342 | 342 | MemRead8_16, MemWrite8_16, MemRead16_16, MemWrite16_16, MemRead32_16, MemWrite32_16, |
| 343 | 343 | PortRead8_16, PortWrite8_16, PortRead16_16, PortWrite16_16, PortRead32_16, PortWrite32_16, |
| r1404 | r1405 | |
| 346 | 346 | 0xfffff0 |
| 347 | 347 | }; |
| 348 | 348 | |
| 349 | static struct cpu_info v70_i = | |
| 349 | static const struct cpu_info v70_i = | |
| 350 | 350 | { |
| 351 | 351 | MemRead8_32, MemWrite8_32, MemRead16_32, MemWrite16_32, MemRead32_32, MemWrite32_32, |
| 352 | 352 | PortRead8_32, PortWrite8_32, PortRead16_32, PortWrite16_32, PortRead32_32, PortWrite32_32, |
| r1404 | r1405 | |
|---|---|---|
| 1344 | 1344 | #define decodePB_dst(n) (((n) >> 0) & 0x07) |
| 1345 | 1345 | |
| 1346 | 1346 | static UINT8 dummy_byte; |
| 1347 | static unsigned char *regTable[4] = { &(CC), &(A), &(B), &dummy_byte }; | |
| 1347 | static unsigned char *const regTable[4] = { &(CC), &(A), &(B), &dummy_byte }; | |
| 1348 | 1348 | |
| 1349 | 1349 | static const UINT8 bitTable[] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 }; |
| 1350 | 1350 |
| r1404 | r1405 | |
|---|---|---|
| 574 | 574 | { 0xFB, 4, "ADDF", EXT } |
| 575 | 575 | }; |
| 576 | 576 | |
| 577 | static const opcodeinfo *hd6309_pgpointers[3] = | |
| 577 | static const opcodeinfo *const hd6309_pgpointers[3] = | |
| 578 | 578 | { |
| 579 | 579 | hd6309_pg0opcodes, hd6309_pg1opcodes, hd6309_pg2opcodes |
| 580 | 580 | }; |
| r1404 | r1405 | |
|---|---|---|
| 420 | 420 | |
| 421 | 421 | #define WRITE_REG(grp,reg,val) ((*wr_reg[grp][reg])(val)) |
| 422 | 422 | |
| 423 | static void (*wr_reg[4][16])(INT32) = | |
| 423 | static void (*const wr_reg[4][16])(INT32) = | |
| 424 | 424 | { |
| 425 | 425 | { |
| 426 | 426 | wr_ax0, wr_ax1, wr_mx0, wr_mx1, wr_ay0, wr_ay1, wr_my0, wr_my1, |
| r1404 | r1405 | |
| 681 | 681 | #define ALU_GETYREG_UNSIGNED(y) (*(UINT16 *)alu_yregs[y]) |
| 682 | 682 | #define ALU_GETYREG_SIGNED(y) (*( INT16 *)alu_yregs[y]) |
| 683 | 683 | |
| 684 | static const void *alu_xregs[8] = | |
| 684 | static const void *const alu_xregs[8] = | |
| 685 | 685 | { |
| 686 | 686 | &adsp2100.core.ax0, |
| 687 | 687 | &adsp2100.core.ax1, |
| r1404 | r1405 | |
| 693 | 693 | &adsp2100.core.sr.srx.sr1 |
| 694 | 694 | }; |
| 695 | 695 | |
| 696 | static const void *alu_yregs[4] = | |
| 696 | static const void *const alu_yregs[4] = | |
| 697 | 697 | { |
| 698 | 698 | &adsp2100.core.ay0, |
| 699 | 699 | &adsp2100.core.ay1, |
| r1404 | r1405 | |
| 712 | 712 | #define MAC_GETYREG_UNSIGNED(y) (*(UINT16 *)mac_yregs[y]) |
| 713 | 713 | #define MAC_GETYREG_SIGNED(y) (*( INT16 *)mac_yregs[y]) |
| 714 | 714 | |
| 715 | static const void *mac_xregs[8] = | |
| 715 | static const void *const mac_xregs[8] = | |
| 716 | 716 | { |
| 717 | 717 | &adsp2100.core.mx0, |
| 718 | 718 | &adsp2100.core.mx1, |
| r1404 | r1405 | |
| 724 | 724 | &adsp2100.core.sr.srx.sr1 |
| 725 | 725 | }; |
| 726 | 726 | |
| 727 | static const void *mac_yregs[4] = | |
| 727 | static const void *const mac_yregs[4] = | |
| 728 | 728 | { |
| 729 | 729 | &adsp2100.core.my0, |
| 730 | 730 | &adsp2100.core.my1, |
| r1404 | r1405 | |
| 741 | 741 | #define SHIFT_GETXREG_UNSIGNED(x) (*(UINT16 *)shift_xregs[x]) |
| 742 | 742 | #define SHIFT_GETXREG_SIGNED(x) (*( INT16 *)shift_xregs[x]) |
| 743 | 743 | |
| 744 | static const void *shift_xregs[8] = | |
| 744 | static const void *const shift_xregs[8] = | |
| 745 | 745 | { |
| 746 | 746 | &adsp2100.core.si, |
| 747 | 747 | &adsp2100.core.si, |
| r1404 | r1405 | |
|---|---|---|
| 371 | 371 | OP(de_wdc) { int tmp; RD_ABX_P; RD_EA; DEC; WB_EA; } /* 6 DEC ABX page penalty */ |
| 372 | 372 | OP(fe_wdc) { int tmp; RD_ABX_P; RD_EA; INC; WB_EA; } /* 6 INC ABX page penalty */ |
| 373 | 373 | |
| 374 | static void (*insnwdc65c02[0x100])(void) = { | |
| 374 | static void (*const insnwdc65c02[0x100])(void) = { | |
| 375 | 375 | m65c02_00,m65c02_01,m65c02_02,m65c02_03,m65c02_04,m65c02_05,m65c02_06,m65c02_07, |
| 376 | 376 | m65c02_08,m65c02_09,m65c02_0a,m65c02_0b,m65c02_0c,m65c02_0d,m65c02_0e,m65c02_0f, |
| 377 | 377 | m65c02_10,m65c02_11,m65c02_12,m65c02_13,m65c02_14,m65c02_15,m65c02_16,m65c02_17, |
| r1404 | r1405 | |
|---|---|---|
| 125 | 125 | **************************************************************************/ |
| 126 | 126 | #ifdef LSB_FIRST |
| 127 | 127 | /* pointers to byte (8bit) registers */ |
| 128 | static UINT8 *pRB[16] = | |
| 128 | static UINT8 *const pRB[16] = | |
| 129 | 129 | { |
| 130 | 130 | &Z.regs.B[ 7],&Z.regs.B[ 5],&Z.regs.B[ 3],&Z.regs.B[ 1], |
| 131 | 131 | &Z.regs.B[15],&Z.regs.B[13],&Z.regs.B[11],&Z.regs.B[ 9], |
| r1404 | r1405 | |
| 133 | 133 | &Z.regs.B[14],&Z.regs.B[12],&Z.regs.B[10],&Z.regs.B[ 8] |
| 134 | 134 | }; |
| 135 | 135 | |
| 136 | static UINT16 *pRW[16] = | |
| 136 | static UINT16 *const pRW[16] = | |
| 137 | 137 | { |
| 138 | 138 | &Z.regs.W[ 3],&Z.regs.W[ 2],&Z.regs.W[ 1],&Z.regs.W[ 0], |
| 139 | 139 | &Z.regs.W[ 7],&Z.regs.W[ 6],&Z.regs.W[ 5],&Z.regs.W[ 4], |
| r1404 | r1405 | |
| 142 | 142 | }; |
| 143 | 143 | |
| 144 | 144 | /* pointers to long (32bit) registers */ |
| 145 | static UINT32 *pRL[16] = | |
| 145 | static UINT32 *const pRL[16] = | |
| 146 | 146 | { |
| 147 | 147 | &Z.regs.L[ 1],&Z.regs.L[ 1],&Z.regs.L[ 0],&Z.regs.L[ 0], |
| 148 | 148 | &Z.regs.L[ 3],&Z.regs.L[ 3],&Z.regs.L[ 2],&Z.regs.L[ 2], |
| r1404 | r1405 | |
| 153 | 153 | #else /* MSB_FIRST */ |
| 154 | 154 | |
| 155 | 155 | /* pointers to byte (8bit) registers */ |
| 156 | static UINT8 *pRB[16] = | |
| 156 | static UINT8 *const pRB[16] = | |
| 157 | 157 | { |
| 158 | 158 | &Z.regs.B[ 0],&Z.regs.B[ 2],&Z.regs.B[ 4],&Z.regs.B[ 6], |
| 159 | 159 | &Z.regs.B[ 8],&Z.regs.B[10],&Z.regs.B[12],&Z.regs.B[14], |
| r1404 | r1405 | |
| 162 | 162 | }; |
| 163 | 163 | |
| 164 | 164 | /* pointers to word (16bit) registers */ |
| 165 | static UINT16 *pRW[16] = | |
| 165 | static UINT16 *const pRW[16] = | |
| 166 | 166 | { |
| 167 | 167 | &Z.regs.W[ 0],&Z.regs.W[ 1],&Z.regs.W[ 2],&Z.regs.W[ 3], |
| 168 | 168 | &Z.regs.W[ 4],&Z.regs.W[ 5],&Z.regs.W[ 6],&Z.regs.W[ 7], |
| r1404 | r1405 | |
| 171 | 171 | }; |
| 172 | 172 | |
| 173 | 173 | /* pointers to long (32bit) registers */ |
| 174 | static UINT32 *pRL[16] = | |
| 174 | static UINT32 *const pRL[16] = | |
| 175 | 175 | { |
| 176 | 176 | &Z.regs.L[ 0],&Z.regs.L[ 0],&Z.regs.L[ 1],&Z.regs.L[ 1], |
| 177 | 177 | &Z.regs.L[ 2],&Z.regs.L[ 2],&Z.regs.L[ 3],&Z.regs.L[ 3], |
| r1404 | r1405 | |
| 182 | 182 | #endif |
| 183 | 183 | |
| 184 | 184 | /* pointers to quad word (64bit) registers */ |
| 185 | static UINT64 *pRQ[16] = { | |
| 185 | static UINT64 *const pRQ[16] = { | |
| 186 | 186 | &Z.regs.Q[ 0],&Z.regs.Q[ 0],&Z.regs.Q[ 0],&Z.regs.Q[ 0], |
| 187 | 187 | &Z.regs.Q[ 1],&Z.regs.Q[ 1],&Z.regs.Q[ 1],&Z.regs.Q[ 1], |
| 188 | 188 | &Z.regs.Q[ 2],&Z.regs.Q[ 2],&Z.regs.Q[ 2],&Z.regs.Q[ 2], |
| r1404 | r1405 | |
|---|---|---|
| 634 | 634 | * Cycle Timings |
| 635 | 635 | ***********************************************************************/ |
| 636 | 636 | |
| 637 | static unsigned cycles_main[256]= | |
| 637 | static const unsigned cycles_main[256]= | |
| 638 | 638 | { |
| 639 | 639 | /*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, |
| 640 | 640 | /*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, |
| r1404 | r1405 | |
| 654 | 654 | /*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 |
| 655 | 655 | }; |
| 656 | 656 | |
| 657 | static unsigned cycles_7F_other[32]= | |
| 657 | static const unsigned cycles_7F_other[32]= | |
| 658 | 658 | { |
| 659 | 659 | /*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, |
| 660 | 660 | /*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 |
| r1404 | r1405 | |
|---|---|---|
| 30 | 30 | static unsigned EA_206(void) { E16=FETCH; E16+=FETCH<<8; EO=I.regs.w[BP]+(INT16)E16; EA=DefaultBase(SS)+EO; return EA; } |
| 31 | 31 | static unsigned EA_207(void) { E16=FETCH; E16+=FETCH<<8; EO=I.regs.w[BW]+(INT16)E16; EA=DefaultBase(DS0)+EO; return EA; } |
| 32 | 32 | |
| 33 | static unsigned (*GetEA[192])(void)={ | |
| 33 | static unsigned (*const GetEA[192])(void)={ | |
| 34 | 34 | EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007, |
| 35 | 35 | EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007, |
| 36 | 36 | EA_000, EA_001, EA_002, EA_003, EA_004, EA_005, EA_006, EA_007, |
| r1404 | r1405 | |
|---|---|---|
| 246 | 246 | |
| 247 | 247 | static void i_wait(void); |
| 248 | 248 | |
| 249 | static void (*nec_instruction[256])(void) = | |
| 249 | static void (*const nec_instruction[256])(void) = | |
| 250 | 250 | { |
| 251 | 251 | i_add_br8, /* 0x00 */ |
| 252 | 252 | i_add_wr16, /* 0x01 */ |
| r1404 | r1405 | |
|---|---|---|
| 2524 | 2524 | static const UINT16 *const p_n_lm[] = { &L11, &L12, &L13, &L21, &L22, &L23, &L31, &L32, &L33 }; |
| 2525 | 2525 | static const UINT16 *const p_n_cm[] = { &LR1, &LR2, &LR3, &LG1, &LG2, &LG3, &LB1, &LB2, &LB3 }; |
| 2526 | 2526 | 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 }; | |
| 2528 | 2528 | static const UINT32 *const p_n_tr[] = { &TRX, &TRY, &TRZ }; |
| 2529 | 2529 | static const UINT32 *const p_n_bk[] = { &RBK, &GBK, &BBK }; |
| 2530 | 2530 | static const UINT32 *const p_n_fc[] = { &RFC, &GFC, &BFC }; |
| 2531 | 2531 | 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 }; | |
| 2533 | 2533 | |
| 2534 | 2534 | switch( GTE_FUNCT( gteop ) ) |
| 2535 | 2535 | { |
| r1404 | r1405 | |
| 2788 | 2788 | } |
| 2789 | 2789 | break; |
| 2790 | 2790 | case 0x1b: |
| 2791 | if( gteop == 0x108041b ) | |
| 2791 | if( gteop == 0x108041b || gteop == 0x118041b ) | |
| 2792 | 2792 | { |
| 2793 | 2793 | GTELOG( "NCCS" ); |
| 2794 | 2794 | FLAG = 0; |
| r1404 | r1405 | |
|---|---|---|
| 17 | 17 | * |
| 18 | 18 | *****************************************************************************/ |
| 19 | 19 | |
| 20 | static void (*opfn[0x100])(void) = { | |
| 20 | static void (*const opfn[0x100])(void) = { | |
| 21 | 21 | /* 0xX0, 0xX1, 0xX2, 0xX3, 0xX4, 0xX5, 0xX6, 0xX7, |
| 22 | 22 | 0xX8, 0xX9, 0xXA, 0xXB, 0xXC, 0xXD, 0xXE, 0xXF */ |
| 23 | 23 | |
| r1404 | r1405 | |
| 70 | 70 | trap_7, trap_6, trap_5, trap_4, trap_3, trap_2, trap_1, trap_0 |
| 71 | 71 | }; |
| 72 | 72 | |
| 73 | static void (*opfn_exl[0x100])(void) = { | |
| 73 | static void (*const opfn_exl[0x100])(void) = { | |
| 74 | 74 | /* 0xX0, 0xX1, 0xX2, 0xX3, 0xX4, 0xX5, 0xX6, 0xX7, |
| 75 | 75 | 0xX8, 0xX9, 0xXA, 0xXB, 0xXC, 0xXD, 0xXE, 0xXF */ |
| 76 | 76 |
| r1404 | r1405 | |
|---|---|---|
| 217 | 217 | static void jsr_c0(void); |
| 218 | 218 | static void trapf(void); |
| 219 | 219 | |
| 220 | static void (*opcodetable[32][4])(void) = | |
| 220 | static void (*const opcodetable[32][4])(void) = | |
| 221 | 221 | { |
| 222 | 222 | { trap0, trap0, trap0, trap0 }, |
| 223 | 223 | { NULL, NULL, NULL, NULL }, |
| r1404 | r1405 | |
| 253 | 253 | { trapf, trapf, trapf, trapf } |
| 254 | 254 | }; |
| 255 | 255 | |
| 256 | static void (*conditiontable[16])(void) = | |
| 256 | static void (*const conditiontable[16])(void) = | |
| 257 | 257 | { |
| 258 | 258 | bsp, bmz, bgt, ble, bge, blt, bhi, bls, |
| 259 | 259 | bcc, bcs, bpl, bmi, bne, beq, bvc, bvs |
| r1404 | r1405 | |
|---|---|---|
| 1561 | 1561 | * Cycle Timings |
| 1562 | 1562 | ***********************************************************************/ |
| 1563 | 1563 | |
| 1564 | static unsigned cycles_main[256]= | |
| 1564 | static const unsigned cycles_main[256]= | |
| 1565 | 1565 | { |
| 1566 | 1566 | /*00*/ 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, |
| 1567 | 1567 | /*08*/ 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, |
| r1404 | r1405 | |
| 1597 | 1597 | /*F8*/ 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK |
| 1598 | 1598 | }; |
| 1599 | 1599 | |
| 1600 | static unsigned cycles_DX_subset[8]= | |
| 1600 | static const unsigned cycles_DX_subset[8]= | |
| 1601 | 1601 | { |
| 1602 | 1602 | /*00*/ 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 2*CLK, 0 |
| 1603 | 1603 | }; |
| 1604 | 1604 | |
| 1605 | static unsigned cycles_CE_subset[256]= | |
| 1605 | static const unsigned cycles_CE_subset[256]= | |
| 1606 | 1606 | { |
| 1607 | 1607 | /*00*/ 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, |
| 1608 | 1608 | /*08*/ 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, 1*CLK, |
| r1404 | r1405 | |
|---|---|---|
| 107 | 107 | static int pic16C5x_reset_vector; |
| 108 | 108 | static int pic16C5x_icount; |
| 109 | 109 | typedef void (*opcode_fn) (void); |
| 110 | static unsigned cycles_000_other[16]; | |
| 110 | static const unsigned cycles_000_other[16]; | |
| 111 | 111 | |
| 112 | 112 | |
| 113 | 113 | #define TMR0 internalram[1] |
| r1404 | r1405 | |
| 174 | 174 | |
| 175 | 175 | /* Easy bit position selectors */ |
| 176 | 176 | #define POS ((R.opcode.b.l >> 5) & 7) |
| 177 | static unsigned int bit_clr[8] = { 0xfe, 0xfd, 0xfb, 0xf7, 0xef, 0xdf, 0xbf, 0x7f }; | |
| 178 | static unsigned int bit_set[8] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 }; | |
| 177 | static const unsigned int bit_clr[8] = { 0xfe, 0xfd, 0xfb, 0xf7, 0xef, 0xdf, 0xbf, 0x7f }; | |
| 178 | static const unsigned int bit_set[8] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 }; | |
| 179 | 179 | |
| 180 | 180 | |
| 181 | 181 | INLINE void CLR(UINT16 flag) { R.STATUS &= ~flag; } |
| r1404 | r1405 | |
| 615 | 615 | * Cycle Timings |
| 616 | 616 | ***********************************************************************/ |
| 617 | 617 | |
| 618 | static unsigned cycles_main[256]= | |
| 618 | static const unsigned cycles_main[256]= | |
| 619 | 619 | { |
| 620 | 620 | /*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, |
| 621 | 621 | /*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, |
| r1404 | r1405 | |
| 635 | 635 | /*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 |
| 636 | 636 | }; |
| 637 | 637 | |
| 638 | static opcode_fn opcode_main[256]= | |
| 638 | static const opcode_fn opcode_main[256]= | |
| 639 | 639 | { |
| 640 | 640 | /*00*/ nop, illegal,movwf, movwf, clrw, illegal,clrf, clrf, |
| 641 | 641 | /*08*/ subwf, subwf, subwf, subwf, decf, decf, decf, decf, |
| r1404 | r1405 | |
| 672 | 672 | }; |
| 673 | 673 | |
| 674 | 674 | |
| 675 | static unsigned cycles_000_other[16]= | |
| 675 | static const unsigned cycles_000_other[16]= | |
| 676 | 676 | { |
| 677 | 677 | /*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 |
| 678 | 678 | }; |
| 679 | 679 | |
| 680 | static opcode_fn opcode_000_other[16]= | |
| 680 | static const opcode_fn opcode_000_other[16]= | |
| 681 | 681 | { |
| 682 | 682 | /*00*/ nop, illegal,option, sleepic,clrwdt, tris, tris, tris, |
| 683 | 683 | /*08*/ illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal |
| r1404 | r1405 | |
|---|---|---|
| 308 | 308 | OP(_0df) { int tmp; H6280_CYCLES(4); RD_ZPG; BBS(5); } // 6/8 BBS5 ZPG,REL |
| 309 | 309 | OP(_0ff) { int tmp; H6280_CYCLES(4); RD_ZPG; BBS(7); } // 6/8 BBS7 ZPG,REL |
| 310 | 310 | |
| 311 | static void (*insnh6280[0x100])(void) = { | |
| 311 | static void (*const insnh6280[0x100])(void) = { | |
| 312 | 312 | h6280_000,h6280_001,h6280_002,h6280_003,h6280_004,h6280_005,h6280_006,h6280_007, |
| 313 | 313 | h6280_008,h6280_009,h6280_00a,h6280_00b,h6280_00c,h6280_00d,h6280_00e,h6280_00f, |
| 314 | 314 | h6280_010,h6280_011,h6280_012,h6280_013,h6280_014,h6280_015,h6280_016,h6280_017, |
| r1404 | r1405 | |
|---|---|---|
| 191 | 191 | |
| 192 | 192 | } MNEMONICS; |
| 193 | 193 | |
| 194 | static struct { | |
| 194 | static const struct { | |
| 195 | 195 | const char *name[2]; |
| 196 | 196 | } mnemonics[]={ |
| 197 | 197 | { { "rtn", "RET" } }, |
| r1404 | r1405 | |
|---|---|---|
| 350 | 350 | |
| 351 | 351 | INLINE void opcode2( void ); |
| 352 | 352 | |
| 353 | static void (*konami_main[0x100])(void) = { | |
| 353 | static void (*const konami_main[0x100])(void) = { | |
| 354 | 354 | illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal, /* 00 */ |
| 355 | 355 | opcode2,opcode2,opcode2,opcode2,pshs ,pshu ,puls ,pulu , |
| 356 | 356 | lda_im ,ldb_im ,opcode2,opcode2,adda_im,addb_im,opcode2,opcode2, /* 10 */ |
| r1404 | r1405 | |
| 385 | 385 | illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal |
| 386 | 386 | }; |
| 387 | 387 | |
| 388 | static void (*konami_indexed[0x100])(void) = { | |
| 388 | static void (*const konami_indexed[0x100])(void) = { | |
| 389 | 389 | illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal, /* 00 */ |
| 390 | 390 | leax ,leay ,leau ,leas ,illegal,illegal,illegal,illegal, |
| 391 | 391 | illegal,illegal,lda_ix ,ldb_ix ,illegal,illegal,adda_ix,addb_ix, /* 10 */ |
| r1404 | r1405 | |
| 420 | 420 | illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal |
| 421 | 421 | }; |
| 422 | 422 | |
| 423 | static void (*konami_direct[0x100])(void) = { | |
| 423 | static void (*const konami_direct[0x100])(void) = { | |
| 424 | 424 | illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal, /* 00 */ |
| 425 | 425 | illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal, |
| 426 | 426 | illegal,illegal,lda_di ,ldb_di ,illegal,illegal,adda_di,addb_di, /* 10 */ |
| r1404 | r1405 | |
| 455 | 455 | illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal |
| 456 | 456 | }; |
| 457 | 457 | |
| 458 | static void (*konami_extended[0x100])(void) = { | |
| 458 | static void (*const konami_extended[0x100])(void) = { | |
| 459 | 459 | illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal, /* 00 */ |
| 460 | 460 | illegal,illegal,illegal,illegal,illegal,illegal,illegal,illegal, |
| 461 | 461 | illegal,illegal,lda_ex ,ldb_ex ,illegal,illegal,adda_ex,addb_ex, /* 10 */ |
| r1404 | r1405 | |
|---|---|---|
| 21 | 21 | static lang_struct lang; |
| 22 | 22 | |
| 23 | 23 | /* All entries in this table must match the enum ordering in "uitext.h" */ |
| 24 | static const char *mame_default_text[] = | |
| 24 | static const char *const mame_default_text[] = | |
| 25 | 25 | { |
| 26 | 26 | APPNAME, |
| 27 | 27 | /* copyright stuff */ |
| r1404 | r1405 | |
| 215 | 215 | |
| 216 | 216 | |
| 217 | 217 | |
| 218 | static const char **default_text[] = | |
| 218 | static const char *const *const default_text[] = | |
| 219 | 219 | { |
| 220 | 220 | mame_default_text, |
| 221 | 221 | #ifdef MESS |
| r1404 | r1405 | |
|---|---|---|
| 185 | 185 | }, |
| 186 | 186 | }; |
| 187 | 187 | |
| 188 | static const char* info_strings[] = | |
| 188 | static const char *const info_strings[] = | |
| 189 | 189 | { |
| 190 | 190 | "$ND$", // No dump |
| 191 | 191 | "$BD$" // Bad dump |
| r1404 | r1405 | |
|---|---|---|
| 110 | 110 | static void draw_sprites (running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect); |
| 111 | 111 | static void change_register (int reg, UINT8 data); |
| 112 | 112 | |
| 113 | static void (*ModeHandlers[])(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) = { | |
| 113 | static void (*const ModeHandlers[])(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) = { | |
| 114 | 114 | draw_mode0, draw_mode1, draw_mode2, draw_mode12, |
| 115 | 115 | draw_mode3, draw_modebogus, draw_mode23, |
| 116 | 116 | draw_modebogus }; |
| r1404 | r1405 | |
| 305 | 305 | static void change_register (int reg, UINT8 val) { |
| 306 | 306 | static const UINT8 Mask[8] = |
| 307 | 307 | { 0x03, 0xfb, 0x0f, 0xff, 0x07, 0x7f, 0x07, 0xff }; |
| 308 | static const char *modes[] = { | |
| 308 | static const char *const modes[] = { | |
| 309 | 309 | "Mode 0 (GRAPHIC 1)", "Mode 1 (TEXT 1)", "Mode 2 (GRAPHIC 2)", |
| 310 | 310 | "Mode 1+2 (TEXT 1 variation)", "Mode 3 (MULTICOLOR)", |
| 311 | 311 | "Mode 1+3 (BOGUS)", "Mode 2+3 (MULTICOLOR variation)", |
| r1404 | r1405 | |
|---|---|---|
| 47 | 47 | |
| 48 | 48 | static struct tms34061_data tms34061; |
| 49 | 49 | |
| 50 | static const char *regnames[] = | |
| 50 | static const char *const regnames[] = | |
| 51 | 51 | { |
| 52 | 52 | "HORENDSYNC", "HORENDBLNK", "HORSTARTBLNK", "HORTOTAL", |
| 53 | 53 | "VERENDSYNC", "VERENDBLNK", "VERSTARTBLNK", "VERTOTAL", |
| r1404 | r1405 | |
| 74 | 74 | * |
| 75 | 75 | *************************************/ |
| 76 | 76 | |
| 77 | void tms34061_start(struct tms34061_interface *interface) | |
| 77 | void tms34061_start(const struct tms34061_interface *interface) | |
| 78 | 78 | { |
| 79 | 79 | /* reset the data */ |
| 80 | 80 | memset(&tms34061, 0, sizeof(tms34061)); |
| r1404 | r1405 | |
|---|---|---|
| 62 | 62 | #define V9938_MODE_UNKNOWN (10) |
| 63 | 63 | |
| 64 | 64 | |
| 65 | static const char *v9938_modes[] = { | |
| 65 | static const char *const v9938_modes[] = { | |
| 66 | 66 | "TEXT 1", "MULTICOLOR", "GRAPHIC 1", "GRAPHIC 2", "GRAPHIC 3", |
| 67 | 67 | "GRAPHIC 4", "GRAPHIC 5", "GRAPHIC 6", "GRAPHIC 7", "TEXT 2", |
| 68 | 68 | "UNKNOWN" }; |
| r1404 | r1405 | |
| 1504 | 1504 | register int DX, register int DY, |
| 1505 | 1505 | register UINT8 CL, register UINT8 OP); |
| 1506 | 1506 | |
| 1507 | static int GetVdpTimingValue(register int *); | |
| 1507 | static int GetVdpTimingValue(register const int *); | |
| 1508 | 1508 | |
| 1509 | 1509 | static void SrchEngine(void); |
| 1510 | 1510 | static void LineEngine(void); |
| r1404 | r1405 | |
| 1522 | 1522 | /*************************************************************/ |
| 1523 | 1523 | /** Variables visible only in this module **/ |
| 1524 | 1524 | /*************************************************************/ |
| 1525 | static UINT8 Mask[4] = { 0x0F,0x03,0x0F,0xFF }; | |
| 1526 | static int PPB[4] = { 2,4,2,1 }; | |
| 1527 | static int PPL[4] = { 256,512,512,256 }; | |
| 1525 | static const UINT8 Mask[4] = { 0x0F,0x03,0x0F,0xFF }; | |
| 1526 | static const int PPB[4] = { 2,4,2,1 }; | |
| 1527 | static const int PPL[4] = { 256,512,512,256 }; | |
| 1528 | 1528 | static int VdpOpsCnt=1; |
| 1529 | 1529 | static void (*VdpEngine)(void)=0; |
| 1530 | 1530 | |
| 1531 | 1531 | /* SprOn SprOn SprOf SprOf */ |
| 1532 | 1532 | /* ScrOf ScrOn ScrOf ScrOn */ |
| 1533 | static int srch_timing[8]={ 818, 1025, 818, 830, /* ntsc */ | |
| 1533 | static const int srch_timing[8]={ 818, 1025, 818, 830, /* ntsc */ | |
| 1534 | 1534 | 696, 854, 696, 684 }; /* pal */ |
| 1535 | static int line_timing[8]={ 1063, 1259, 1063, 1161, | |
| 1535 | static const int line_timing[8]={ 1063, 1259, 1063, 1161, | |
| 1536 | 1536 | 904, 1026, 904, 953 }; |
| 1537 | static int hmmv_timing[8]={ 439, 549, 439, 531, | |
| 1537 | static const int hmmv_timing[8]={ 439, 549, 439, 531, | |
| 1538 | 1538 | 366, 439, 366, 427 }; |
| 1539 | static int lmmv_timing[8]={ 873, 1135, 873, 1056, | |
| 1539 | static const int lmmv_timing[8]={ 873, 1135, 873, 1056, | |
| 1540 | 1540 | 732, 909, 732, 854 }; |
| 1541 | static int ymmm_timing[8]={ 586, 952, 586, 610, | |
| 1541 | static const int ymmm_timing[8]={ 586, 952, 586, 610, | |
| 1542 | 1542 | 488, 720, 488, 500 }; |
| 1543 | static int hmmm_timing[8]={ 818, 1111, 818, 854, | |
| 1543 | static const int hmmm_timing[8]={ 818, 1111, 818, 854, | |
| 1544 | 1544 | 684, 879, 684, 708 }; |
| 1545 | static int lmmm_timing[8]={ 1160, 1599, 1160, 1172, | |
| 1545 | static const int lmmm_timing[8]={ 1160, 1599, 1160, 1172, | |
| 1546 | 1546 | 964, 1257, 964, 977 }; |
| 1547 | 1547 | |
| 1548 | 1548 | |
| r1404 | r1405 | |
| 1695 | 1695 | /** GetVdpTimingValue() **************************************/ |
| 1696 | 1696 | /** Get timing value for a certain VDP command **/ |
| 1697 | 1697 | /*************************************************************/ |
| 1698 | static int GetVdpTimingValue(register int *timing_values) | |
| 1698 | static int GetVdpTimingValue(register const int *timing_values) | |
| 1699 | 1699 | { |
| 1700 | 1700 | return(timing_values[((VDP[1]>>6)&1)|(VDP[8]&2)|((VDP[9]<<1)&4)]); |
| 1701 | 1701 | } |
| r1404 | r1405 | |
| 2249 | 2249 | /*************************************************************/ |
| 2250 | 2250 | static void ReportVdpCommand(register UINT8 Op) |
| 2251 | 2251 | { |
| 2252 | static const char *Ops[16] = | |
| 2252 | static const char *const Ops[16] = | |
| 2253 | 2253 | { |
| 2254 | 2254 | "SET ","AND ","OR ","XOR ","NOT ","NOP ","NOP ","NOP ", |
| 2255 | 2255 | "TSET","TAND","TOR ","TXOR","TNOT","NOP ","NOP ","NOP " |
| 2256 | 2256 | }; |
| 2257 | static const char *Commands[16] = | |
| 2257 | static const char *const Commands[16] = | |
| 2258 | 2258 | { |
| 2259 | 2259 | " ABRT"," ????"," ????"," ????","POINT"," PSET"," SRCH"," LINE", |
| 2260 | 2260 | " LMMV"," LMMM"," LMCM"," LMMC"," HMMV"," HMMM"," YMMM"," HMMC" |
| r1404 | r1405 | |
|---|---|---|
| 56 | 56 | |
| 57 | 57 | |
| 58 | 58 | /* starts/stops the emulator */ |
| 59 | void tms34061_start(struct tms34061_interface *interface); | |
| 59 | void tms34061_start(const struct tms34061_interface *interface); | |
| 60 | 60 | |
| 61 | 61 | /* reads/writes to the 34061 */ |
| 62 | 62 | UINT8 tms34061_r(int col, int row, int func); |
| r1404 | r1405 | |
|---|---|---|
| 14 | 14 | #define __RGBUTIL__ |
| 15 | 15 | |
| 16 | 16 | /* use SSE on 64-bit implementations, where it can be assumed */ |
| 17 | #if defined(__SSE2__) | |
| 17 | #if (defined(__SSE2__) && | |
| 18 | 18 | #include "rgbsse.h" |
| 19 | 19 | #elif defined(__ALTIVEC__) |
| 20 | 20 | #include "rgbvmx.h" |
| r1404 | r1405 | |
|---|---|---|
| 604 | 604 | * |
| 605 | 605 | *************************************/ |
| 606 | 606 | |
| 607 | static const char *voodoo_reg_name[] = | |
| 607 | static const char *const voodoo_reg_name[] = | |
| 608 | 608 | { |
| 609 | 609 | /* 0x000 */ |
| 610 | 610 | "status", "{intrCtrl}", "vertexAx", "vertexAy", |
| r1404 | r1405 | |
| 681 | 681 | }; |
| 682 | 682 | |
| 683 | 683 | |
| 684 | static const char *banshee_reg_name[] = | |
| 684 | static const char *const banshee_reg_name[] = | |
| 685 | 685 | { |
| 686 | 686 | /* 0x000 */ |
| 687 | 687 | "status", "intrCtrl", "vertexAx", "vertexAy", |
| r1404 | r1405 | |
| 843 | 843 | * |
| 844 | 844 | *************************************/ |
| 845 | 845 | |
| 846 | static const char *banshee_io_reg_name[] = | |
| 846 | static const char *const banshee_io_reg_name[] = | |
| 847 | 847 | { |
| 848 | 848 | /* 0x000 */ |
| 849 | 849 | "status", "pciInit0", "sipMonitor", "lfbMemoryConfig", |
| r1404 | r1405 | |
| 924 | 924 | * |
| 925 | 925 | *************************************/ |
| 926 | 926 | |
| 927 | static const char *banshee_agp_reg_name[] = | |
| 927 | static const char *const banshee_agp_reg_name[] = | |
| 928 | 928 | { |
| 929 | 929 | /* 0x000 */ |
| 930 | 930 | "agpReqSize", "agpHostAddressLow","agpHostAddressHigh","agpGraphicsAddress", |
| r1404 | r1405 | |
| 1681 | 1681 | |
| 1682 | 1682 | voodoo_reg reg[0x400]; /* raw registers */ |
| 1683 | 1683 | const UINT8 *regaccess; /* register access array */ |
| 1684 | const char **regnames; /* register names array */ | |
| 1684 | const char *const *regnames; /* register names array */ | |
| 1685 | 1685 | UINT8 alt_regmap; /* enable alternate register map? */ |
| 1686 | 1686 | |
| 1687 | 1687 | pci_state pci; /* PCI state */ |
| r1404 | r1405 | |
|---|---|---|
| 76 | 76 | #include "driver.h" |
| 77 | 77 | #include "s2636.h" |
| 78 | 78 | |
| 79 | static int SpriteOffset[4] = {0,0x10,0x20,0x40}; | |
| 79 | static const int SpriteOffset[4] = {0,0x10,0x20,0x40}; | |
| 80 | 80 | |
| 81 | 81 | /* To adjust sprites against bitmap */ |
| 82 | 82 |
| r1404 | r1405 | |
|---|---|---|
| 143 | 143 | { NULL, NULL, OPTION_HEADER, "CORE DEBUGGING OPTIONS" }, |
| 144 | 144 | { "log", "0", OPTION_BOOLEAN, "generate an error.log file" }, |
| 145 | 145 | { "verbose;v", "0", OPTION_BOOLEAN, "display additional diagnostic information" }, |
| 146 | { "update_in_pause", "0", OPTION_BOOLEAN, "keep calling video updates while in pause" }, | |
| 146 | 147 | #ifdef MAME_DEBUG |
| 147 | 148 | { "debug;d", "1", OPTION_BOOLEAN, "enable/disable debugger" }, |
| 148 | 149 | { "debugscript", NULL, 0, "script for debugger" }, |
| r1404 | r1405 | |
|---|---|---|
| 133 | 133 | #define OPTION_LOG "log" |
| 134 | 134 | #define OPTION_DEBUG "debug" |
| 135 | 135 | #define OPTION_DEBUGSCRIPT "debugscript" |
| 136 | #define OPTION_UPDATEINPAUSE "update_in_pause" | |
| 136 | 137 | |
| 137 | 138 | /* core misc options */ |
| 138 | 139 | #define OPTION_BIOS "bios" |
| r1404 | r1405 | |
|---|---|---|
| 130 | 130 | |
| 131 | 131 | static render_texture *arrow_texture; |
| 132 | 132 | |
| 133 | static const char *input_format[] = | |
| 133 | static const char *const input_format[] = | |
| 134 | 134 | { |
| 135 | 135 | "%s", |
| 136 | 136 | "%s Analog", |
| r1404 | r1405 | |
| 1891 | 1891 | ((in->type == IPT_OTHER && in->name != IP_NAME_DEFAULT) || port_type_to_group(in->type, in->player) != IPG_INVALID)) |
| 1892 | 1892 | { |
| 1893 | 1893 | UINT16 sortorder; |
| 1894 | input_seq *curseq, *defseq; | |
| 1894 | const input_seq *curseq, *defseq; | |
| 1895 | 1895 | |
| 1896 | 1896 | /* determine the sorting order */ |
| 1897 | 1897 | if (in->type >= IPT_START1 && in->type <= __ipt_analog_end) |
| r1404 | r1405 | |
|---|---|---|
| 122 | 122 | UINT32 speed; /* overall speed (*100) */ |
| 123 | 123 | UINT32 original_speed; /* originally-specified speed */ |
| 124 | 124 | 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 */ | |
| 125 | 126 | |
| 126 | 127 | /* frameskipping */ |
| 127 | 128 | UINT8 empty_skip_count; /* number of empty frames we have skipped */ |
| r1404 | r1405 | |
| 285 | 286 | global.seconds_to_run = options_get_int(mame_options(), OPTION_SECONDS_TO_RUN); |
| 286 | 287 | global.original_speed = global.speed = (options_get_float(mame_options(), OPTION_SPEED) * 100.0 + 0.5); |
| 287 | 288 | global.refresh_speed = options_get_bool(mame_options(), OPTION_REFRESHSPEED); |
| 289 | global.update_in_pause = options_get_bool(mame_options(), OPTION_UPDATEINPAUSE); | |
| 288 | 290 | |
| 289 | 291 | /* allocate memory for our private data */ |
| 290 | 292 | viddata = machine->video_data = auto_malloc(sizeof(*viddata)); |
| r1404 | r1405 | |
| 1024 | 1026 | int phase = mame_get_phase(Machine); |
| 1025 | 1027 | |
| 1026 | 1028 | /* 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)) | |
| 1032 | 1030 | { |
| 1033 | 1031 | int anything_changed = finish_screen_updates(Machine); |
| 1034 | 1032 | |
| r1404 | r1405 | |
| 1523 | 1521 | } |
| 1524 | 1522 | current_ticks = new_ticks; |
| 1525 | 1523 | } |
| 1524 | profiler_mark(PROFILER_END); | |
| 1526 | 1525 | |
| 1527 | 1526 | return current_ticks; |
| 1528 | 1527 | } |
| r1404 | r1405 | |
| 1865 | 1864 | { |
| 1866 | 1865 | video_private *viddata = machine->video_data; |
| 1867 | 1866 | internal_screen_info *info = &viddata->scrinfo[scrnum]; |
| 1867 | const rgb_t *palette; | |
| 1868 | 1868 | |
| 1869 | 1869 | /* only record if we have a file */ |
| 1870 | 1870 | if (info->movie_file != NULL) |
| r1404 | r1405 | |
| 1902 | 1902 | } |
| 1903 | 1903 | |
| 1904 | 1904 | /* 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); | |
| 1906 | 1907 | png_free(&pnginfo); |
| 1907 | 1908 | if (error != PNGERR_NONE) |
| 1908 | 1909 | { |
| r1404 | r1405 | |
|---|---|---|
| 243 | 243 | UINT64 unmap; /* unmapped value */ |
| 244 | 244 | table_data read; /* memory read lookup table */ |
| 245 | 245 | 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 */ | |
| 247 | 247 | address_map * map; /* original memory map */ |
| 248 | 248 | address_map * adjmap; /* adjusted memory map */ |
| 249 | 249 | }; |
| r1404 | r1405 | |
| 300 | 300 | static debug_hook_write_ptr debug_hook_write; /* pointer to debugger callback for memory writes */ |
| 301 | 301 | #endif |
| 302 | 302 | |
| 303 | static data_accessors memory_accessors[ADDRESS_SPACES][4][2] = | |
| 303 | static const data_accessors memory_accessors[ADDRESS_SPACES][4][2] = | |
| 304 | 304 | { |
| 305 | 305 | /* program accessors */ |
| 306 | 306 | { |
| r1404 | r1405 | |
| 363 | 363 | }, |
| 364 | 364 | }; |
| 365 | 365 | |
| 366 | const char *address_space_names[ADDRESS_SPACES] = { "program", "data", "I/O" }; | |
| 366 | const char *const address_space_names[ADDRESS_SPACES] = { "program", "data", "I/O" }; | |
| 367 | 367 | |
| 368 | 368 | |
| 369 | 369 | /*------------------------------------------------- |
| r1404 | r1405 | |
| 3254 | 3254 | |
| 3255 | 3255 | static const char *handler_to_string(const table_data *table, UINT8 entry) |
| 3256 | 3256 | { |
| 3257 | static const char *strings[] = | |
| 3257 | static const char *const strings[] = | |
| 3258 | 3258 | { |
| 3259 | 3259 | "invalid", "bank 1", "bank 2", "bank 3", |
| 3260 | 3260 | "bank 4", "bank 5", "bank 6", "bank 7", |
| r1404 | r1405 | |
|---|---|---|
| 591 | 591 | UINT8 * writelookup; /* write table lookup */ |
| 592 | 592 | handler_data * readhandlers; /* read handlers */ |
| 593 | 593 | 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 */ | |
| 595 | 595 | }; |
| 596 | 596 | |
| 597 | 597 | |
| r1404 | r1405 | |
| 728 | 728 | ADDRESS_SPACES /* maximum number of address spaces */ |
| 729 | 729 | }; |
| 730 | 730 | |
| 731 | extern const char *address_space_names[ADDRESS_SPACES]; | |
| 731 | extern const char *const address_space_names[ADDRESS_SPACES]; | |
| 732 | 732 | |
| 733 | 733 | /* ----- address map lookup table definitions ----- */ |
| 734 | 734 | #define SUBTABLE_COUNT 64 /* number of slots reserved for subtables */ |
| r1404 | r1405 | |
|---|---|---|
| 190 | 190 | static void *output_cb_param[OUTPUT_CHANNEL_COUNT]; |
| 191 | 191 | |
| 192 | 192 | /* the "disclaimer" that should be printed when run with no parameters */ |
| 193 | const char | |
| 193 | const char | |
| 194 | 194 | "MAME is an emulator: it reproduces, more or less faithfully, the behaviour of\n" |
| 195 | 195 | "several arcade machines. But hardware is useless without software, so an image\n" |
| 196 | 196 | "of the ROMs which run on that hardware is required. Such ROMs, like any other\n" |
| r1404 | r1405 | |
| 200 | 200 | "images is a violation of copyright law and should be promptly reported to the\n" |
| 201 | 201 | "authors so that appropriate legal action can be taken.\n"; |
| 202 | 202 | |
| 203 | const char *memory_region_names[REGION_MAX] = | |
| 203 | const char *const memory_region_names[REGION_MAX] = | |
| 204 | 204 | { |
| 205 | 205 | "REGION_INVALID", |
| 206 | 206 | "REGION_CPU1", |
| r1404 | r1405 | |
|---|---|---|
| 264 | 264 | static UINT8 ui_memory[__ipt_max]; |
| 265 | 265 | |
| 266 | 266 | /* XML attributes for the different types */ |
| 267 | static const char *seqtypestrings[] = { "standard", "decrement", "increment" }; | |
| 267 | static const char *const seqtypestrings[] = { "standard", "decrement", "increment" }; | |
| 268 | 268 | |
| 269 | 269 | /* original input_ports without modifications */ |
| 270 | 270 | static input_port_entry *input_ports_default; |
| r1404 | r1405 | |
| 2598 | 2598 | } |
| 2599 | 2599 | |
| 2600 | 2600 | |
| 2601 | input_seq *input_port_seq(input_port_entry *port, int seqtype) | |
| 2601 | const input_seq *input_port_seq(input_port_entry *port, int seqtype) | |
| 2602 | 2602 | { |
| 2603 | static input_seq ip_none = SEQ_DEF_0; | |
| 2603 | static const input_seq ip_none = SEQ_DEF_0; | |
| 2604 | 2604 | input_seq *portseq; |
| 2605 | 2605 | |
| 2606 | 2606 | /* if port is disabled, return no key */ |
| r1404 | r1405 | |
| 2639 | 2639 | } |
| 2640 | 2640 | |
| 2641 | 2641 | |
| 2642 | input_seq *input_port_default_seq(int type, int player, int seqtype) | |
| 2642 | const input_seq *input_port_default_seq(int type, int player, int seqtype) | |
| 2643 | 2643 | { |
| 2644 | static input_seq ip_none = SEQ_DEF_0; | |
| 2644 | static const input_seq ip_none = SEQ_DEF_0; | |
| 2645 | 2645 | |
| 2646 | 2646 | /* find the default setting */ |
| 2647 | 2647 | int defindex = default_ports_lookup[type][player]; |
| r1404 | r1405 | |
|---|---|---|
| 14 | 14 | } SCSICr589; |
| 15 | 15 | |
| 16 | 16 | static const int identity_offset = 0x3ab; |
| 17 | static const char | |
| 17 | static const char | |
| 18 | 18 | |
| 19 | 19 | static int cr589_exec_command( SCSIInstance *scsiInstance, UINT8 *statusCode ) |
| 20 | 20 | { |
| r1404 | r1405 | |
| 144 | 144 | return SCSIBase( &SCSIClassCr589, operation, file, intparm, ptrparm ); |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | SCSIClass SCSIClassCr589 = | |
| 147 | const SCSIClass SCSIClassCr589 = | |
| 148 | 148 | { |
| 149 | 149 | &SCSIClassCDROM, |
| 150 | 150 | cr589_dispatch, |
| r1404 | r1405 | |
|---|---|---|
| 303 | 303 | return SCSIBase( &SCSIClassHARDDISK, operation, file, intparm, ptrparm ); |
| 304 | 304 | } |
| 305 | 305 | |
| 306 | SCSIClass SCSIClassHARDDISK = | |
| 306 | const SCSIClass SCSIClassHARDDISK = | |
| 307 | 307 | { |
| 308 | 308 | &SCSIClassDevice, |
| 309 | 309 | scsihd_dispatch, |
| r1404 | r1405 | |
|---|---|---|
| 1 | 1 | #include "scsi.h" |
| 2 | 2 | |
| 3 | extern SCSIClass SCSIClassCr589; | |
| 3 | extern const SCSIClass SCSIClassCr589; |
| r1404 | r1405 | |
|---|---|---|
| 10 | 10 | #include "machine/scsi.h" |
| 11 | 11 | |
| 12 | 12 | // CD-ROM handler |
| 13 | extern SCSIClass SCSIClassHARDDISK; | |
| 13 | extern const SCSIClass SCSIClassHARDDISK; | |
| 14 | 14 | #define SCSI_DEVICE_HARDDISK &SCSIClassHARDDISK |
| 15 | 15 | |
| 16 | 16 | #endif |
| r1404 | r1405 | |
|---|---|---|
| 7 | 7 | #define DASM_OPCODES 0 |
| 8 | 8 | |
| 9 | 9 | static SCSIInstance *devices[8]; /* SCSI IDs 0-7 */ |
| 10 | static struct LSI53C810interface *intf; | |
| 10 | static const struct LSI53C810interface *intf; | |
| 11 | 11 | static UINT8 last_id; |
| 12 | 12 | |
| 13 | 13 | static struct { |
| r1404 | r1405 | |
| 659 | 659 | } |
| 660 | 660 | } |
| 661 | 661 | |
| 662 | extern void lsi53c810_init(struct LSI53C810interface *interface) | |
| 662 | extern void lsi53c810_init(const struct LSI53C810interface *interface) | |
| 663 | 663 | { |
| 664 | 664 | int i; |
| 665 | 665 | |
| r1404 | r1405 | |
| 756 | 756 | UINT32 dest; |
| 757 | 757 | int i; |
| 758 | 758 | |
| 759 | static const char *phases[] = | |
| 759 | static const char *const phases[] = | |
| 760 | 760 | { |
| 761 | 761 | "DATA_OUT", "DATA_IN", "CMD", "STATUS", |
| 762 | 762 | "RESERVED_OUT??", "RESERVED_IN??", "MSG_OUT", "MSG_IN" |
| r1404 | r1405 | |
| 777 | 777 | else if (((op & 0xF8000000) == 0x58000000) |
| 778 | 778 | | ((op & 0xF8000000) == 0x60000000)) |
| 779 | 779 | { |
| 780 | static struct | |
| 780 | static const struct | |
| 781 | 781 | { |
| 782 | 782 | UINT32 flag; |
| 783 | 783 | const char *text; |
| r1404 | r1405 | |
|---|---|---|
| 157 | 157 | UINT8 config_register[IDE_CONFIG_REGISTERS]; |
| 158 | 158 | UINT8 config_register_num; |
| 159 | 159 | |
| 160 | struct ide_interface *intf; | |
| 160 | const struct ide_interface *intf; | |
| 161 | 161 | hard_disk_file * disk; |
| 162 | 162 | emu_timer * last_status_timer; |
| 163 | 163 | emu_timer * reset_timer; |
| 164 | 164 | |
| 165 | 165 | UINT8 master_password_enable; |
| 166 | 166 | UINT8 user_password_enable; |
| 167 | UINT8 * master_password; | |
| 168 | UINT8 * user_password; | |
| 167 | const UINT8 * master_password; | |
| 168 | const UINT8 * user_password; | |
| 169 | 169 | }; |
| 170 | 170 | |
| 171 | 171 | |
| r1404 | r1405 | |
| 289 | 289 | } |
| 290 | 290 | |
| 291 | 291 | |
| 292 | int ide_controller_init_custom(int which, struct ide_interface *intf, chd_file *diskhandle) | |
| 292 | int ide_controller_init_custom(int which, const struct ide_interface *intf, chd_file *diskhandle) | |
| 293 | 293 | { |
| 294 | 294 | struct ide_state *ide = &idestate[which]; |
| 295 | 295 | const hard_disk_info *hdinfo; |
| r1404 | r1405 | |
| 380 | 380 | return 0; |
| 381 | 381 | } |
| 382 | 382 | |
| 383 | int ide_controller_init(int which, struct ide_interface *intf) | |
| 383 | int ide_controller_init(int which, const struct ide_interface *intf) | |
| 384 | 384 | { |
| 385 | 385 | /* we only support one hard disk right now; get a handle to it */ |
| 386 | 386 | return ide_controller_init_custom(which, intf, get_disk_handle(0)); |
| r1404 | r1405 | |
| 414 | 414 | } |
| 415 | 415 | |
| 416 | 416 | |
| 417 | void ide_set_master_password(int which, UINT8 *password) | |
| 417 | void ide_set_master_password(int which, const UINT8 *password) | |
| 418 | 418 | { |
| 419 | 419 | struct ide_state *ide = &idestate[which]; |
| 420 | 420 | |
| r1404 | r1405 | |
| 423 | 423 | } |
| 424 | 424 | |
| 425 | 425 | |
| 426 | void ide_set_user_password(int which, UINT8 *password) | |
| 426 | void ide_set_user_password(int which, const UINT8 *password) | |
| 427 | 427 | { |
| 428 | 428 | struct ide_state *ide = &idestate[which]; |
| 429 | 429 |
| r1404 | r1405 | |
|---|---|---|
| 65 | 65 | This means our segment maths needs to be more than 16-bit to work! |
| 66 | 66 | */ |
| 67 | 67 | |
| 68 | static UINT32 roc10937charset[]= | |
| 68 | static const UINT32 roc10937charset[]= | |
| 69 | 69 | { // 11 10 FEDC BA98 7654 3210 |
| 70 | 70 | 0x0507F, // 0 0 0101 0000 0111 1111 @. |
| 71 | 71 | 0x044CF, // 0 0 0100 0100 1100 1111 A. |
| r1404 | r1405 | |
|---|---|---|
| 5 | 5 | |
| 6 | 6 | struct LSI53C810interface |
| 7 | 7 | { |
| 8 | SCSIConfigTable *scsidevs; /* SCSI devices */ | |
| 8 | const SCSIConfigTable *scsidevs; /* SCSI devices */ | |
| 9 | 9 | void (*irq_callback)(void); /* IRQ callback */ |
| 10 | 10 | void (*dma_callback)(UINT32, UINT32, int, int); /* DMA callback */ |
| 11 | 11 | UINT32 (*fetch)(UINT32 dsp); |
| 12 | 12 | }; |
| 13 | 13 | |
| 14 | extern void lsi53c810_init(struct LSI53C810interface *interface); | |
| 14 | extern void lsi53c810_init(const struct LSI53C810interface *interface); | |
| 15 | 15 | |
| 16 | 16 | extern void lsi53c810_read_data(int bytes, UINT8 *pData); |
| 17 | 17 | extern void lsi53c810_write_data(int bytes, UINT8 *pData); |
| r1404 | r1405 | |
|---|---|---|
| 14 | 14 | void (*interrupt)(int state); |
| 15 | 15 | }; |
| 16 | 16 | |
| 17 | int ide_controller_init(int which, struct ide_interface *intf); | |
| 18 | int ide_controller_init_custom(int which, struct ide_interface *intf, chd_file *diskhandle); | |
| 17 | int ide_controller_init(int which, const struct ide_interface *intf); | |
| 18 | int ide_controller_init_custom(int which, const struct ide_interface *intf, chd_file *diskhandle); | |
| 19 | 19 | void ide_controller_reset(int which); |
| 20 | 20 | UINT8 *ide_get_features(int which); |
| 21 | 21 | |
| 22 | void ide_set_master_password(int which, UINT8 *password); | |
| 23 | void ide_set_user_password(int which, UINT8 *password); | |
| 22 | void ide_set_master_password(int which, const UINT8 *password); | |
| 23 | void ide_set_user_password(int which, const UINT8 *password); | |
| 24 | 24 | |
| 25 | 25 | int ide_bus_0_r(int select, int offset); |
| 26 | 26 | void ide_bus_0_w(int select, int offset, int data); |
| r1404 | r1405 | |
|---|---|---|
| 18 | 18 | #define VERBOSE 0 |
| 19 | 19 | |
| 20 | 20 | static SCSIInstance *devices[8]; // SCSI IDs 0-7 |
| 21 | static struct WD33C93interface *intf; | |
| 21 | static const struct WD33C93interface *intf; | |
| 22 | 22 | |
| 23 | 23 | /* wd register names */ |
| 24 | 24 | #define WD_OWN_ID 0x00 |
| r1404 | r1405 | |
| 457 | 457 | } |
| 458 | 458 | |
| 459 | 459 | /* Command handlers */ |
| 460 | static cmd_handler wd33c93_cmds[0x22] = | |
| 460 | static const cmd_handler wd33c93_cmds[0x22] = | |
| 461 | 461 | { |
| 462 | 462 | &wd33c93_reset_cmd, /* 0x00 - WD_CMD_RESET */ |
| 463 | 463 | &wd33c93_abort_cmd, /* 0x01 - WD_CMD_ABORT */ |
| r1404 | r1405 | |
| 785 | 785 | return 0; |
| 786 | 786 | } |
| 787 | 787 | |
| 788 | extern void wd33c93_init( struct WD33C93interface *interface ) | |
| 788 | extern void wd33c93_init( const struct WD33C93interface *interface ) | |
| 789 | 789 | { |
| 790 | 790 | int i; |
| 791 | 791 |
| r1404 | r1405 | |
|---|---|---|
| 363 | 363 | GLOBAL VARIABLES |
| 364 | 364 | ***************************************************************************/ |
| 365 | 365 | |
| 366 | struct CustomSound_interface laserdisc_custom_interface = | |
| 366 | const struct CustomSound_interface laserdisc_custom_interface = | |
| 367 | 367 | { |
| 368 | 368 | custom_start |
| 369 | 369 | }; |
| r1404 | r1405 | |
|---|---|---|
| 147 | 147 | return 0; |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | SCSIClass SCSIClassDevice = | |
| 150 | const SCSIClass SCSIClassDevice = | |
| 151 | 151 | { |
| 152 | 152 | NULL, |
| 153 | 153 | scsidev_dispatch, |
| r1404 | r1405 | |
|---|---|---|
| 10 | 10 | |
| 11 | 11 | struct WD33C93interface |
| 12 | 12 | { |
| 13 | SCSIConfigTable *scsidevs; /* SCSI devices */ | |
| 13 | const SCSIConfigTable *scsidevs; /* SCSI devices */ | |
| 14 | 14 | void (*irq_callback)(int state); /* irq callback */ |
| 15 | 15 | }; |
| 16 | 16 | |
| 17 | extern void wd33c93_init( struct WD33C93interface *interface ); | |
| 17 | extern void wd33c93_init( const struct WD33C93interface *interface ); | |
| 18 | 18 | extern void wd33c93_get_dma_data(int bytes, UINT8 *pData); |
| 19 | 19 | extern void wd33c93_write_data(int bytes, UINT8 *pData); |
| 20 | 20 | extern void *wd33c93_get_device(int id); |
| r1404 | r1405 | |
|---|---|---|
| 60 | 60 | GLOBAL VARIABLES |
| 61 | 61 | ***************************************************************************/ |
| 62 | 62 | |
| 63 | extern struct CustomSound_interface laserdisc_custom_interface; | |
| 63 | extern const struct CustomSound_interface laserdisc_custom_interface; | |
| 64 | 64 | |
| 65 | 65 | |
| 66 | 66 |
| r1404 | r1405 | |
|---|---|---|
| 10 | 10 | #include "machine/scsi.h" |
| 11 | 11 | |
| 12 | 12 | // base handler |
| 13 | extern SCSIClass SCSIClassDevice; | |
| 13 | extern const SCSIClass SCSIClassDevice; | |
| 14 | 14 | |
| 15 | 15 | #endif |
| r1404 | r1405 | |
|---|---|---|
| 760 | 760 | return SCSIBase( &SCSIClassCDROM, operation, file, intparm, ptrparm ); |
| 761 | 761 | } |
| 762 | 762 | |
| 763 | SCSIClass SCSIClassCDROM = | |
| 763 | const SCSIClass SCSIClassCDROM = | |
| 764 | 764 | { |
| 765 | 765 | &SCSIClassDevice, |
| 766 | 766 | scsicd_dispatch, |
| r1404 | r1405 | |
|---|---|---|
| 41 | 41 | int shift; |
| 42 | 42 | int rx; |
| 43 | 43 | int tx; |
| 44 | UINT8 *data; | |
| 44 | const UINT8 *data; | |
| 45 | 45 | emu_timer *timer; |
| 46 | 46 | emu_timer *reset_timer; |
| 47 | 47 | attotime t_samp; |
| r1404 | r1405 | |
| 138 | 138 | } |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | void ds2401_init( int which, UINT8 *data ) | |
| 141 | void ds2401_init( int which, const UINT8 *data ) | |
| 142 | 142 | { |
| 143 | 143 | struct ds2401_chip *c = &ds2401[ which ]; |
| 144 | 144 | |
| 145 | if( data == NULL ) | |
| 146 | { | |
| 147 | data = auto_malloc( SIZE_DATA ); | |
| 148 | } | |
| 149 | ||
| 150 | 145 | c->state = STATE_IDLE; |
| 151 | 146 | c->bit = 0; |
| 152 | 147 | c->byte = 0; |
| r1404 | r1405 | |
| 166 | 161 | state_save_register_item( "ds2401", which, c->shift ); |
| 167 | 162 | state_save_register_item( "ds2401", which, c->rx ); |
| 168 | 163 | state_save_register_item( "ds2401", which, c->tx ); |
| 169 | state_save_register_ | |
| 164 | state_save_register_g | |
| 170 | 165 | |
| 171 | 166 | c->timer = timer_alloc( ds2401_tick , NULL); |
| 172 | 167 | c->reset_timer = timer_alloc( ds2401_reset , NULL); |
| r1404 | r1405 | |
|---|---|---|
| 10 | 10 | #include "machine/scsi.h" |
| 11 | 11 | |
| 12 | 12 | // CD-ROM handler |
| 13 | extern SCSIClass SCSIClassCDROM; | |
| 13 | extern const SCSIClass SCSIClassCDROM; | |
| 14 | 14 | #define SCSI_DEVICE_CDROM &SCSIClassCDROM |
| 15 | 15 | |
| 16 | 16 | #endif |
| r1404 | r1405 | |
|---|---|---|
| 11 | 11 | |
| 12 | 12 | #define DS2401_MAXCHIP ( 3 ) |
| 13 | 13 | |
| 14 | extern void ds2401_init( int which, UINT8 *data ); | |
| 14 | extern void ds2401_init( int which, const UINT8 *data ); | |
| 15 | 15 | extern void ds2401_write( int which, int data ); |
| 16 | 16 | extern int ds2401_read( int which ); |
| 17 | 17 |
| r1404 | r1405 | |
|---|---|---|
| 97 | 97 | static ptm6840 ptm[PTM_6840_MAX]; |
| 98 | 98 | |
| 99 | 99 | #if PTMVERBOSE |
| 100 | static const char *opmode[] = | |
| 100 | static const char *const opmode[] = | |
| 101 | 101 | { |
| 102 | 102 | "000 continous mode", |
| 103 | 103 | "001 freq comparison mode", |
| r1404 | r1405 | |
|---|---|---|
| 13 | 13 | #include "am53cf96.h" |
| 14 | 14 | |
| 15 | 15 | static UINT8 scsi_regs[32], fifo[16], fptr = 0, xfer_state, last_id; |
| 16 | static struct AM53CF96interface *intf; | |
| 16 | static const struct AM53CF96interface *intf; | |
| 17 | 17 | |
| 18 | 18 | static SCSIInstance *devices[8]; // SCSI IDs 0-7 |
| 19 | 19 | |
| r1404 | r1405 | |
| 208 | 208 | } |
| 209 | 209 | } |
| 210 | 210 | |
| 211 | void am53cf96_init( struct AM53CF96interface *interface ) | |
| 211 | void am53cf96_init( const struct AM53CF96interface *interface ) | |
| 212 | 212 | { |
| 213 | 213 | int i; |
| 214 | 214 |
| r1404 | r1405 | |
|---|---|---|
| 1 | 1 | #include "scsi.h" |
| 2 | 2 | |
| 3 | void SCSIAllocInstance( SCSIClass *scsiClass, SCSIInstance **instance, int diskId ) | |
| 3 | void SCSIAllocInstance( const SCSIClass *scsiClass, SCSIInstance **instance, int diskId ) | |
| 4 | 4 | { |
| 5 | scsiClass->dispatch( SCSIOP_ALLOC_INSTANCE, scsiClass, diskId, instance ); | |
| 5 | scsiClass->dispatch( SCSIOP_ALLOC_INSTANCE, (void *)scsiClass, diskId, instance ); | |
| 6 | 6 | } |
| 7 | 7 | |
| 8 | 8 | void SCSIDeleteInstance( SCSIInstance *instance ) |
| r1404 | r1405 | |
| 60 | 60 | *phase = instance->scsiClass->dispatch( SCSIOP_GET_PHASE, instance, 0, NULL ); |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | int SCSIBase( SCSIClass *scsiClass, int operation, void *file, INT64 intparm, UINT8 *ptrparm ) | |
| 63 | int SCSIBase( const SCSIClass *scsiClass, int operation, void *file, INT64 intparm, UINT8 *ptrparm ) | |
| 64 | 64 | { |
| 65 | 65 | return scsiClass->baseClass->dispatch( operation, file, intparm, ptrparm ); |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | SCSIInstance *SCSIMalloc( SCSIClass *scsiClass ) | |
| 68 | SCSIInstance *SCSIMalloc( const SCSIClass *scsiClass ) | |
| 69 | 69 | { |
| 70 | 70 | SCSIInstance *scsiInstance = (SCSIInstance *) malloc_or_die( SCSISizeof( scsiClass ) ); |
| 71 | 71 | scsiInstance->scsiClass = scsiClass; |
| 72 | 72 | return scsiInstance; |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | void *SCSIThis( SCSIClass *scsiClass, SCSIInstance *instance ) | |
| 75 | void *SCSIThis( const SCSIClass *scsiClass, SCSIInstance *instance ) | |
| 76 | 76 | { |
| 77 | 77 | if( instance != NULL ) |
| 78 | 78 | { |
| r1404 | r1405 | |
| 90 | 90 | return NULL; |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | int SCSISizeof( SCSIClass *scsiClass ) | |
| 93 | int SCSISizeof( const SCSIClass *scsiClass ) | |
| 94 | 94 | { |
| 95 | 95 | int sizeofData = sizeof( SCSIInstance ); |
| 96 | 96 |
| r1404 | r1405 | |
|---|---|---|
| 10 | 10 | |
| 11 | 11 | struct AM53CF96interface |
| 12 | 12 | { |
| 13 | SCSIConfigTable *scsidevs; /* SCSI devices */ | |
| 13 | const SCSIConfigTable *scsidevs; /* SCSI devices */ | |
| 14 | 14 | void (*irq_callback)(void); /* irq callback */ |
| 15 | 15 | }; |
| 16 | 16 | |
| 17 | extern void am53cf96_init( struct AM53CF96interface *interface ); | |
| 17 | extern void am53cf96_init( const struct AM53CF96interface *interface ); | |
| 18 | 18 | extern void am53cf96_read_data(int bytes, UINT8 *pData); |
| 19 | 19 | void am53cf96_write_data(int bytes, UINT8 *pData); |
| 20 | 20 | void *am53cf96_get_device(int id); |
| r1404 | r1405 | |
|---|---|---|
| 14 | 14 | |
| 15 | 15 | typedef struct _SCSIClass |
| 16 | 16 | { |
| 17 | struct _SCSIClass *baseClass; | |
| 17 | const struct _SCSIClass *baseClass; | |
| 18 | 18 | pSCSIDispatch dispatch; |
| 19 | 19 | int sizeofData; |
| 20 | 20 | } SCSIClass; |
| 21 | 21 | |
| 22 | 22 | typedef struct |
| 23 | 23 | { |
| 24 | SCSIClass *scsiClass; | |
| 24 | const SCSIClass *scsiClass; | |
| 25 | 25 | } SCSIInstance; |
| 26 | 26 | |
| 27 | 27 | // commands accepted by a SCSI device's dispatch handler |
| r1404 | r1405 | |
| 45 | 45 | { |
| 46 | 46 | int scsiID; |
| 47 | 47 | int diskID; |
| 48 | SCSIClass *scsiClass; | |
| 48 | const SCSIClass *scsiClass; | |
| 49 | 49 | } SCSIConfigItem; |
| 50 | 50 | |
| 51 | 51 | #define SCSI_MAX_DEVICES (16) |
| r1404 | r1405 | |
| 53 | 53 | typedef struct scsiconfigtable |
| 54 | 54 | { |
| 55 | 55 | int devs_present; |
| 56 | SCSIConfigItem devices[SCSI_MAX_DEVICES]; | |
| 56 | const SCSIConfigItem devices[SCSI_MAX_DEVICES]; | |
| 57 | 57 | } SCSIConfigTable; |
| 58 | 58 | |
| 59 | 59 | // SCSI IDs |
| r1404 | r1405 | |
| 77 | 77 | #define SCSI_PHASE_MESSAGE_OUT ( 6 ) |
| 78 | 78 | #define SCSI_PHASE_MESSAGE_IN ( 7 ) |
| 79 | 79 | |
| 80 | extern void SCSIAllocInstance( SCSIClass *scsiClass, SCSIInstance **instance, int diskId ); | |
| 80 | extern void SCSIAllocInstance( const SCSIClass *scsiClass, SCSIInstance **instance, int diskId ); | |
| 81 | 81 | extern void SCSIDeleteInstance( SCSIInstance *instance ); |
| 82 | 82 | extern void SCSISetDevice( SCSIInstance *instance, void *device ); |
| 83 | 83 | extern void SCSIGetDevice( SCSIInstance *instance, void **device ); |
| r1404 | r1405 | |
| 90 | 90 | extern void SCSISetPhase( SCSIInstance *instance, int phase ); |
| 91 | 91 | extern void SCSIGetPhase( SCSIInstance *instance, int *phase ); |
| 92 | 92 | |
| 93 | extern SCSIInstance *SCSIMalloc( SCSIClass *scsiClass ); | |
| 94 | extern int SCSIBase( SCSIClass *scsiClass, int operation, void *file, INT64 intparm, UINT8 *ptrparm ); | |
| 95 | extern void *SCSIThis( SCSIClass *scsiClass, SCSIInstance *instance ); | |
| 96 | extern int SCSISizeof( SCSIClass *scsiClass ); | |
| 93 | extern SCSIInstance *SCSIMalloc( const SCSIClass *scsiClass ); | |
| 94 | extern int SCSIBase( const SCSIClass *scsiClass, int operation, void *file, INT64 intparm, UINT8 *ptrparm ); | |
| 95 | extern void *SCSIThis( const SCSIClass *scsiClass, SCSIInstance *instance ); | |
| 96 | extern int SCSISizeof( const SCSIClass *scsiClass ); | |
| 97 | 97 | extern int SCSILengthFromUINT8( UINT8 *length ); |
| 98 | 98 | extern int SCSILengthFromUINT16( UINT8 *length ); |
| 99 | 99 |
| r1404 | r1405 | |
|---|---|---|
| 4 | 4 | /****************************************************************************/ |
| 5 | 5 | |
| 6 | 6 | /* local copy of the interface pointer */ |
| 7 | static struct RP5H01_interface *intf; | |
| 7 | static const struct RP5H01_interface *intf; | |
| 8 | 8 | |
| 9 | 9 | /* these also work as the address masks */ |
| 10 | 10 | enum { |
| r1404 | r1405 | |
| 25 | 25 | |
| 26 | 26 | /****************************************************************************/ |
| 27 | 27 | |
| 28 | int RP5H01_init( struct RP5H01_interface *interface ) { | |
| 28 | int RP5H01_init( const struct RP5H01_interface *interface ) { | |
| 29 | 29 | int i; |
| 30 | 30 | |
| 31 | 31 | /* setup our local copy of the interface */ |
| r1404 | r1405 | |
|---|---|---|
| 92 | 92 | #define EINT_ERCV 0x40 |
| 93 | 93 | |
| 94 | 94 | /* Ethernet register names */ |
| 95 | static const char *ethernet_regname[64] = | |
| 95 | static const char *const ethernet_regname[64] = | |
| 96 | 96 | { |
| 97 | 97 | "TCR", "EPH STATUS", "RCR", "COUNTER", "MIR", "MCR", "(0.6)", "BANK", |
| 98 | 98 | "CONFIG", "BASE", "IA0-1", "IA2-3", "IA4-5", "GENERAL PURPOSE", "CONTROL", "BANK", |
| r1404 | r1405 | |
| 164 | 164 | * |
| 165 | 165 | *************************************/ |
| 166 | 166 | |
| 167 | void smc91c94_init(struct smc91c9x_interface *config) | |
| 167 | void smc91c94_init(const struct smc91c9x_interface *config) | |
| 168 | 168 | { |
| 169 | 169 | ethernet.irq_handler = config->irq_handler; |
| 170 | 170 | } |
| r1404 | r1405 | |
|---|---|---|
| 10 | 10 | int offset[MAX_RP5H01]; /* memory offset within the above region where data resides */ |
| 11 | 11 | }; |
| 12 | 12 | |
| 13 | int RP5H01_init( struct RP5H01_interface *interface ); | |
| 13 | int RP5H01_init( const struct RP5H01_interface *interface ); | |
| 14 | 14 | void RP5H01_enable_w( int which, int data ); /* /CE */ |
| 15 | 15 | void RP5H01_reset_w( int which, int data ); /* RESET */ |
| 16 | 16 | void RP5H01_clock_w( int which, int data ); /* DATA CLOCK (active low) */ |
| r1404 | r1405 | |
|---|---|---|
| 14 | 14 | void (*irq_handler)(int state); |
| 15 | 15 | }; |
| 16 | 16 | |
| 17 | void smc91c94_init(struct smc91c9x_interface *config); | |
| 17 | void smc91c94_init(const struct smc91c9x_interface *config); | |
| 18 | 18 | void smc91c94_reset(void); |
| 19 | 19 | READ16_HANDLER( smc91c94_r ); |
| 20 | 20 | WRITE16_HANDLER( smc91c94_w ); |
| r1404 | r1405 | |
|---|---|---|
| 167 | 167 | INITIALIZATION/CONFIGURATION |
| 168 | 168 | ***************************************************************************/ |
| 169 | 169 | |
| 170 | void z80pio_init(int which, z80pio_interface *intf) | |
| 170 | void z80pio_init(int which, const z80pio_interface *intf) | |
| 171 | 171 | { |
| 172 | 172 | z80pio *pio = pios + which; |
| 173 | 173 |
| r1404 | r1405 | |
|---|---|---|
| 33 | 33 | INITIALIZATION/CONFIGURATION |
| 34 | 34 | ***************************************************************************/ |
| 35 | 35 | |
| 36 | void z80pio_init(int which, z80pio_interface *intf); | |
| 36 | void z80pio_init(int which, const z80pio_interface *intf); | |
| 37 | 37 | void z80pio_reset(int which); |
| 38 | 38 | |
| 39 | 39 |
| r1404 | r1405 | |
|---|---|---|
| 19 | 19 | |
| 20 | 20 | static struct MB87078 chip[MAX_MB87078]; |
| 21 | 21 | |
| 22 | static float MB87078_gain_decibel[66]={ | |
| 22 | static const float MB87078_gain_decibel[66]={ | |
| 23 | 23 | 0.0, -0.5, -1.0, -1.5, -2.0, -2.5, -3.0, -3.5, |
| 24 | 24 | -4.0, -4.5, -5.0, -5.5, -6.0, -6.5, -7.0, -7.5, |
| 25 | 25 | -8.0, -8.5, -9.0, -9.5,-10.0,-10.5,-11.0,-11.5, |
| r1404 | r1405 | |
| 31 | 31 | -32.0, -256.0 |
| 32 | 32 | }; |
| 33 | 33 | |
| 34 | static int MB87078_gain_percent[66]={ | |
| 34 | static const int MB87078_gain_percent[66]={ | |
| 35 | 35 | 100,94,89,84,79,74,70,66, |
| 36 | 36 | 63,59,56,53,50,47,44,42, |
| 37 | 37 | 39,37,35,33,31,29,28,26, |
| r1404 | r1405 | |
|---|---|---|
| 148 | 148 | REGION_MAX |
| 149 | 149 | }; |
| 150 | 150 | |
| 151 | extern const char *memory_region_names[REGION_MAX]; | |
| 151 | extern const char *const memory_region_names[REGION_MAX]; | |
| 152 | 152 | |
| 153 | 153 | |
| 154 | 154 | |
| r1404 | r1405 | |
| 249 | 249 | ***************************************************************************/ |
| 250 | 250 | |
| 251 | 251 | extern running_machine *Machine; |
| 252 | extern const char | |
| 252 | extern const char | |
| 253 | 253 | extern char giant_string_buffer[]; |
| 254 | 254 | |
| 255 | 255 | extern char build_version[]; |
| r1404 | r1405 | |
|---|---|---|
| 876 | 876 | read32_handler port_tag_to_handler32(const char *tag); |
| 877 | 877 | read64_handler port_tag_to_handler64(const char *tag); |
| 878 | 878 | const char *input_port_name(const input_port_entry *in); |
| 879 | input_seq *input_port_seq(input_port_entry *in, int seqtype); | |
| 880 | input_seq *input_port_default_seq(int type, int player, int seqtype); | |
| 879 | const input_seq *input_port_seq(input_port_entry *in, int seqtype); | |
| 880 | const input_seq *input_port_default_seq(int type, int player, int seqtype); | |
| 881 | 881 | int input_port_condition(const input_port_entry *in); |
| 882 | 882 | void input_port_set_changed_callback(int port, UINT32 mask, void (*callback)(void *, UINT32, UINT32), void *param); |
| 883 | 883 |
| r1404 | r1405 | |
|---|---|---|
| 1772 | 1772 | /* loop over all the layer types we support */ |
| 1773 | 1773 | for (layer = 0; layer < ITEM_LAYER_MAX; layer++) |
| 1774 | 1774 | { |
| 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" }; | |
| 1776 | 1776 | xml_data_node *itemnode; |
| 1777 | 1777 | |
| 1778 | 1778 | /* initialize the list */ |
| r1404 | r1405 | |
|---|---|---|
| 227 | 227 | int vblank_interrupts_per_frame;/* usually 1 */ |
| 228 | 228 | void (*timed_interrupt)(void); /* for interrupts not tied to VBLANK */ |
| 229 | 229 | attoseconds_t timed_interrupt_period; /* period for periodic interrupts */ |
| 230 | void * | |
| 230 | const void * | |
| 231 | 231 | const char *tag; |
| 232 | 232 | }; |
| 233 | 233 |
| r1404 | r1405 | |
|---|---|---|
| 283 | 283 | return i; |
| 284 | 284 | } |
| 285 | 285 | |
| 286 | static int stage_map[6] = { 0, 1, 2, 3, 4, 5 }; | |
| 286 | static const int stage_map[6] = { 0, 1, 2, 3, 4, 5 }; | |
| 287 | 287 | |
| 288 | 288 | /* ======================================================================== */ |
| 289 | 289 | /* LPC12_REGDEC -- Decode the register set in the filter bank. */ |
| r1404 | r1405 | |
|---|---|---|
| 557 | 557 | - waveform DC and DM select are 100% correct |
| 558 | 558 | */ |
| 559 | 559 | |
| 560 | static unsigned char table[19][8] = { | |
| 560 | static const unsigned char table[19][8] = { | |
| 561 | 561 | /* MULT MULT modTL DcDmFb AR/DR AR/DR SL/RR SL/RR */ |
| 562 | 562 | /* 0 1 2 3 4 5 6 7 */ |
| 563 | 563 | {0x49, 0x4c, 0x4c, 0x12, 0x00, 0x00, 0x00, 0x00 }, //0 |
| r1404 | r1405 | |
|---|---|---|
| 709 | 709 | |
| 710 | 710 | #if 0 |
| 711 | 711 | /*This is an example word TEN taken from the TMS5110A datasheet*/ |
| 712 | static unsigned int example_word_TEN[619]={ | |
| 712 | static const unsigned int example_word_TEN[619]={ | |
| 713 | 713 | /* 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, |
| 714 | 714 | /* 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, |
| 715 | 715 | /* 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, |
| r1404 | r1405 | |
|---|---|---|
| 123 | 123 | struct k054539_info *info = param; |
| 124 | 124 | #define VOL_CAP 1.80 |
| 125 | 125 | |
| 126 | static INT16 dpcm[16] = { | |
| 126 | static const INT16 dpcm[16] = { | |
| 127 | 127 | 0<<8, 1<<8, 4<<8, 9<<8, 16<<8, 25<<8, 36<<8, 49<<8, |
| 128 | 128 | -64<<8, -49<<8, -36<<8, -25<<8, -16<<8, -9<<8, -4<<8, -1<<8 |
| 129 | 129 | }; |
| r1404 | r1405 | |
| 368 | 368 | |
| 369 | 369 | #if CHANNEL_DEBUG |
| 370 | 370 | { |
| 371 | static char gc_msg[32] = "chip : "; | |
| 371 | static const char gc_msg[32] = "chip : "; | |
| 372 | 372 | static int gc_active=0, gc_chip=0, gc_pos[2]={0,0}; |
| 373 | 373 | double *gc_fptr; |
| 374 | 374 | char *gc_cptr; |
| r1404 | r1405 | |
|---|---|---|
| 138 | 138 | { |
| 139 | 139 | long newadr = 0; |
| 140 | 140 | |
| 141 | static INT16 asic219banks[4] = { 0x1f7, 0x1f1, 0x1f3, 0x1f5 }; | |
| 141 | static const INT16 asic219banks[4] = { 0x1f7, 0x1f1, 0x1f3, 0x1f5 }; | |
| 142 | 142 | |
| 143 | 143 | adrs=(bank<<16)+adrs; |
| 144 | 144 |
| r1404 | r1405 | |
|---|---|---|
| 28 | 28 | |
| 29 | 29 | static int PLFO_TRI[256],PLFO_SQR[256],PLFO_SAW[256],PLFO_NOI[256]; |
| 30 | 30 | static int ALFO_TRI[256],ALFO_SQR[256],ALFO_SAW[256],ALFO_NOI[256]; |
| 31 | static float LFOFreq[32]={0.17,0.19,0.23,0.27,0.34,0.39,0.45,0.55,0.68,0.78,0.92,1.10,1.39,1.60,1.87,2.27, | |
| 31 | static const float LFOFreq[32]={0.17,0.19,0.23,0.27,0.34,0.39,0.45,0.55,0.68,0.78,0.92,1.10,1.39,1.60,1.87,2.27, | |
| 32 | 32 | 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}; |
| 33 | static float ASCALE[8]={0.0,0.4,0.8,1.5,3.0,6.0,12.0,24.0}; | |
| 34 | static float PSCALE[8]={0.0,7.0,13.5,27.0,55.0,112.0,230.0,494}; | |
| 33 | static const float ASCALE[8]={0.0,0.4,0.8,1.5,3.0,6.0,12.0,24.0}; | |
| 34 | static const float PSCALE[8]={0.0,7.0,13.5,27.0,55.0,112.0,230.0,494}; | |
| 35 | 35 | static int PSCALES[8][256]; |
| 36 | 36 | static int ASCALES[8][256]; |
| 37 | 37 | |
| r1404 | r1405 | |
| 47 | 47 | if(i<128) |
| 48 | 48 | p=i; |
| 49 | 49 | else |
| 50 | p=25 | |
| 50 | p=i-256 | |
| 51 | 51 | ALFO_SAW[i]=a; |
| 52 | 52 | PLFO_SAW[i]=p; |
| 53 | 53 |
| r1404 | r1405 | |
|---|---|---|
| 117 | 117 | static TIMER_CALLBACK( update_irq_state_timer_6 ); |
| 118 | 118 | static TIMER_CALLBACK( update_irq_state_timer_7 ); |
| 119 | 119 | |
| 120 | static timer_callback update_irq_state_cb[] = | |
| 120 | static const timer_callback update_irq_state_cb[] = | |
| 121 | 121 | { |
| 122 | 122 | update_irq_state_timer_0, |
| 123 | 123 | update_irq_state_timer_1, |
| r1404 | r1405 | |
|---|---|---|
| 6 | 6 | |
| 7 | 7 | static UINT16 PACK(INT32 val) |
| 8 | 8 | { |
| 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; | |
| 12 | 31 | } |
| 13 | 32 | |
| 14 | 33 | static INT32 UNPACK(UINT16 val) |
| 15 | 34 | { |
| 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; | |
| 22 | 52 | } |
| 23 | 53 | |
| 24 | 54 | void SCSPDSP_Init(struct _SCSPDSP *DSP) |
| r1404 | r1405 | |
| 125 | 155 | if(IRA<=0x1f) |
| 126 | 156 | INPUTS=DSP->MEMS[IRA]; |
| 127 | 157 | else if(IRA<=0x2F) |
| 128 | INPUTS=DSP->MIXS[IRA-0x20]<< | |
| 158 | INPUTS=DSP->MIXS[IRA-0x20]<<4; //MIXS is 20 bit | |
| 129 | 159 | else if(IRA<=0x31) |
| 130 | 160 | INPUTS=0; |
| 131 | 161 | |
| r1404 | r1405 | |
| 298 | 328 | void SCSPDSP_SetSample(struct _SCSPDSP *DSP,INT32 sample,int SEL,int MXL) |
| 299 | 329 | { |
| 300 | 330 | //DSP->MIXS[SEL]+=sample<<(MXL+1)/*7*/; |
| 301 | DSP->MIXS[SEL]+=sample | |
| 331 | DSP->MIXS[SEL]+=sample | |
| 302 | 332 | // if(MXL) |
| 303 | 333 | // int a=1; |
| 304 | 334 | } |
| r1404 | r1405 | |
|---|---|---|
| 11 | 11 | #include "streams.h" |
| 12 | 12 | #include "speaker.h" |
| 13 | 13 | |
| 14 | static INT16 default_levels[2] = {0,32767}; | |
| 14 | static const INT16 default_levels[2] = {0,32767}; | |
| 15 | 15 | |
| 16 | 16 | struct speaker |
| 17 | 17 | { |
| 18 | 18 | sound_stream *channel; |
| 19 | INT16 *levels; | |
| 19 | const INT16 *levels; | |
| 20 | 20 | int num_levels; |
| 21 | 21 | int level; |
| 22 | 22 | }; |
| r1404 | r1405 | |
|---|---|---|
| 301 | 301 | B(1), B(2), Dx(3), B(3), Dx(4), B(4) |
| 302 | 302 | }; |
| 303 | 303 | |
| 304 | static const int *tunes[] = {NULL,tune1,tune2,tune3,tune4}; | |
| 304 | static const int *const tunes[] = {NULL,tune1,tune2,tune3,tune4}; | |
| 305 | 305 | |
| 306 | 306 | #define DECAY(voice) \ |
| 307 | 307 | if( tms->vol[voice] > VMIN ) \ |
| r1404 | r1405 | |
|---|---|---|
| 83 | 83 | |
| 84 | 84 | /* chirp table */ |
| 85 | 85 | |
| 86 | static char chirptable[51]={ | |
| 86 | static const char chirptable[51]={ | |
| 87 | 87 | 0x00, 0x2a, (char)0xd4, 0x32, |
| 88 | 88 | (char)0xb2, 0x12, 0x25, 0x14, |
| 89 | 89 | 0x02, (char)0xe1, (char)0xc5, 0x02, |
| r1404 | r1405 | |
| 101 | 101 | |
| 102 | 102 | /* interpolation coefficients (in rightshifts, as in actual chip) */ |
| 103 | 103 | |
| 104 | static char interp_coeff[8] = { | |
| 104 | static const char interp_coeff[8] = { | |
| 105 | 105 | 3, 3, 3, 2, 2, 1, 1, 0 |
| 106 | 106 | }; |
| 107 | 107 |
| r1404 | r1405 | |
|---|---|---|
| 229 | 229 | |
| 230 | 230 | |
| 231 | 231 | #define RATE_STEPS (8) |
| 232 | static UINT8 eg_inc[19*RATE_STEPS]={ | |
| 232 | static const UINT8 eg_inc[19*RATE_STEPS]={ | |
| 233 | 233 | |
| 234 | 234 | /*cycle:0 1 2 3 4 5 6 7*/ |
| 235 | 235 | |
| r1404 | r1405 | |
| 262 | 262 | #define O(a) (a*RATE_STEPS) |
| 263 | 263 | |
| 264 | 264 | /*note that there is no O(17) in this table - it's directly in the code */ |
| 265 | static UINT8 eg_rate_select[32+64+32]={ /* Envelope Generator rates (32 + 64 rates + 32 RKS) */ | |
| 265 | static const UINT8 eg_rate_select[32+64+32]={ /* Envelope Generator rates (32 + 64 rates + 32 RKS) */ | |
| 266 | 266 | /* 32 dummy (infinite time) rates */ |
| 267 | 267 | O(18),O(18),O(18),O(18),O(18),O(18),O(18),O(18), |
| 268 | 268 | O(18),O(18),O(18),O(18),O(18),O(18),O(18),O(18), |
| r1404 | r1405 | |
| 309 | 309 | /*mask 2047, 1023, 511, 255, 127, 63, 31, 15, 7, 3, 1, 0, 0, 0, 0, 0 */ |
| 310 | 310 | |
| 311 | 311 | #define O(a) (a*1) |
| 312 | static UINT8 eg_rate_shift[32+64+32]={ /* Envelope Generator counter shifts (32 + 64 rates + 32 RKS) */ | |
| 312 | static const UINT8 eg_rate_shift[32+64+32]={ /* Envelope Generator counter shifts (32 + 64 rates + 32 RKS) */ | |
| 313 | 313 | /* 32 infinite time rates */ |
| 314 | 314 | O(0),O(0),O(0),O(0),O(0),O(0),O(0),O(0), |
| 315 | 315 | O(0),O(0),O(0),O(0),O(0),O(0),O(0),O(0), |
| r1404 | r1405 | |
| 362 | 362 | * DT2=0 DT2=1 DT2=2 DT2=3 |
| 363 | 363 | * 0 600 781 950 |
| 364 | 364 | */ |
| 365 | static UINT32 dt2_tab[4] = { 0, 384, 500, 608 }; | |
| 365 | static const UINT32 dt2_tab[4] = { 0, 384, 500, 608 }; | |
| 366 | 366 | |
| 367 | 367 | /* DT1 defines offset in Hertz from base note |
| 368 | 368 | * This table is converted while initialization... |
| 369 | 369 | * Detune table shown in YM2151 User's Manual is wrong (verified on the real chip) |
| 370 | 370 | */ |
| 371 | 371 | |
| 372 | static UINT8 dt1_tab[4*32] = { /* 4*32 DT1 values */ | |
| 372 | static const UINT8 dt1_tab[4*32] = { /* 4*32 DT1 values */ | |
| 373 | 373 | /* DT1=0 */ |
| 374 | 374 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 375 | 375 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| r1404 | r1405 | |
| 387 | 387 | 8, 8, 9,10,11,12,13,14,16,17,19,20,22,22,22,22 |
| 388 | 388 | }; |
| 389 | 389 | |
| 390 | static UINT16 phaseinc_rom[768]={ | |
| 390 | static const UINT16 phaseinc_rom[768]={ | |
| 391 | 391 | 1299,1300,1301,1302,1303,1304,1305,1306,1308,1309,1310,1311,1313,1314,1315,1316, |
| 392 | 392 | 1318,1319,1320,1321,1322,1323,1324,1325,1327,1328,1329,1330,1332,1333,1334,1335, |
| 393 | 393 | 1337,1338,1339,1340,1341,1342,1343,1344,1346,1347,1348,1349,1351,1352,1353,1354, |
| r1404 | r1405 | |
| 457 | 457 | some 0x80 could be 0x81 as well as some 0x00 could be 0x01. |
| 458 | 458 | */ |
| 459 | 459 | |
| 460 | static UINT8 lfo_noise_waveform[256] = { | |
| 460 | static const UINT8 lfo_noise_waveform[256] = { | |
| 461 | 461 | 0xFF,0xEE,0xD3,0x80,0x58,0xDA,0x7F,0x94,0x9E,0xE3,0xFA,0x00,0x4D,0xFA,0xFF,0x6A, |
| 462 | 462 | 0x7A,0xDE,0x49,0xF6,0x00,0x33,0xBB,0x63,0x91,0x60,0x51,0xFF,0x00,0xD8,0x7F,0xDE, |
| 463 | 463 | 0xDC,0x73,0x21,0x85,0xB2,0x9C,0x5D,0x24,0xCD,0x91,0x9E,0x76,0x7F,0x20,0xFB,0xF3, |
| r1404 | r1405 | |
|---|---|---|
| 214 | 214 | |
| 215 | 215 | static void c6280_update(void *param, stream_sample_t **inputs, stream_sample_t **buffer, int length) |
| 216 | 216 | { |
| 217 | static int scale_tab[] = { | |
| 217 | static const int scale_tab[] = { | |
| 218 | 218 | 0x00, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, |
| 219 | 219 | 0x10, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F |
| 220 | 220 | }; |
| r1404 | r1405 | |
|---|---|---|
| 162 | 162 | * |
| 163 | 163 | *************************************/ |
| 164 | 164 | |
| 165 | static discrete_module module_list[] = | |
| 165 | static const discrete_module module_list[] = | |
| 166 | 166 | { |
| 167 | 167 | { DSO_OUTPUT ,"DSO_OUTPUT" ,0 ,NULL ,NULL }, |
| 168 | 168 | { DSO_CSVLOG ,"DSO_CSVLOG" ,0 ,NULL ,NULL }, |
| r1404 | r1405 | |
|---|---|---|
| 411 | 411 | break; |
| 412 | 412 | case DECAY1: |
| 413 | 413 | slot->EG.volume-=slot->EG.D1R; |
| 414 | if(slot->EG.volume<=0) | |
| 415 | slot->EG.volume=0; | |
| 414 | 416 | if(slot->EG.volume>>(EG_SHIFT+5)<slot->EG.DL) |
| 415 | 417 | slot->EG.state=DECAY2; |
| 416 | 418 | break; |
| r1404 | r1405 | |
| 1063 | 1065 | |
| 1064 | 1066 | typedef void (*_SCSPUpdateModes)(struct _SCSP *,struct _SLOT *,unsigned int,unsigned int); |
| 1065 | 1067 | |
| 1066 | static _SCSPUpdateModes SCSPUpdateModes[]= | |
| 1068 | static const _SCSPUpdateModes SCSPUpdateModes[]= | |
| 1067 | 1069 | { |
| 1068 | 1070 | SCSPTMPL(0,0,0,0) |
| 1069 | 1071 | SCSPTMPL(0,0,0,1) |
| r1404 | r1405 | |
| 1225 | 1227 | switch(LPCTL(slot)) |
| 1226 | 1228 | { |
| 1227 | 1229 | case 0: //no loop |
| 1228 | if(addr>LEA(slot)) | |
| 1230 | if(addr>=LEA(slot)) | |
| 1229 | 1231 | { |
| 1230 | 1232 | //slot->active=0; |
| 1231 | 1233 | SCSP_StopSlot(slot,0); |
| 1232 | 1234 | } |
| 1233 | 1235 | break; |
| 1234 | 1236 | case 1: //normal loop |
| 1235 | if(addr>LEA(slot)) | |
| 1237 | if(addr>=LEA(slot)) | |
| 1236 | 1238 | slot->cur_addr=LSA(slot)<<SHIFT; |
| 1237 | 1239 | break; |
| 1238 | 1240 | case 2: //reverse loop |
| 1239 | if(addr>LEA(slot)) | |
| 1241 | if(addr>=LEA(slot)) | |
| 1240 | 1242 | { |
| 1241 | 1243 | slot->cur_addr=LEA(slot)<<SHIFT; |
| 1242 | 1244 | slot->Backwards=1; |
| r1404 | r1405 | |
| 1245 | 1247 | slot->cur_addr=LEA(slot)<<SHIFT; |
| 1246 | 1248 | break; |
| 1247 | 1249 | case 3: //ping-pong |
| 1248 | if(addr>LEA(slot)) //reached end, reverse till start | |
| 1250 | if(addr>=LEA(slot)) //reached end, reverse till start | |
| 1249 | 1251 | { |
| 1250 | 1252 | slot->cur_addr=LEA(slot)<<SHIFT; |
| 1251 | 1253 | slot->Backwards=1; |
| r1404 | r1405 | |
| 1302 | 1304 | ++SCSP->BUFPTR; |
| 1303 | 1305 | SCSP->BUFPTR&=63; |
| 1304 | 1306 | #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)); | |
| 1306 | 1309 | #endif |
| 1307 | 1310 | Enc=((TL(slot))<<0x0)|((DIPAN(slot))<<0x8)|((DISDL(slot))<<0xd); |
| 1308 | 1311 | { |
| 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; | |
| 1311 | 1314 | } |
| 1312 | 1315 | } |
| 1313 | 1316 | |
| r1404 | r1405 | |
| 1320 | 1323 | struct _SLOT *slot=SCSP->Slots+i; |
| 1321 | 1324 | if(EFSDL(slot)) |
| 1322 | 1325 | { |
| 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; | |
| 1326 | 1329 | } |
| 1327 | 1330 | } |
| 1328 | 1331 | |
| 1329 | *bufl++ = ICLIP16(smpl>>4); | |
| 1330 | *bufr++ = ICLIP16(smpr>>4); | |
| 1332 | *bufl++ = ICLIP16(smpl>>2); | |
| 1333 | *bufr++ = ICLIP16(smpr>>2); | |
| 1331 | 1334 | } |
| 1332 | 1335 | } |
| 1333 | 1336 | #endif |
| r1404 | r1405 | |
|---|---|---|
| 179 | 179 | #if 0 |
| 180 | 180 | { |
| 181 | 181 | /* 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, | |
| 184 | 184 | 333,500,1000,2000, 4000,8000, 4000,8000}; |
| 185 | 185 | for (i=0; i<8; i++) |
| 186 | 186 | { |
| r1404 | r1405 | |
|---|---|---|
| 11 | 11 | int type; |
| 12 | 12 | }; |
| 13 | 13 | |
| 14 | flt_rc_config flt_rc_ac_default = {FLT_RC_AC, 10000, 0, 0, CAP_U(1)}; | |
| 14 | const flt_rc_config flt_rc_ac_default = {FLT_RC_AC, 10000, 0, 0, CAP_U(1)}; | |
| 15 | 15 | |
| 16 | 16 | |
| 17 | 17 | static void filter_rc_update(void *param, stream_sample_t **inputs, stream_sample_t **outputs, int samples) |
| r1404 | r1405 | |
|---|---|---|
| 52 | 52 | double C; |
| 53 | 53 | }; |
| 54 | 54 | |
| 55 | extern flt_rc_config flt_rc_ac_default; | |
| 55 | extern const flt_rc_config flt_rc_ac_default; | |
| 56 | 56 | |
| 57 | 57 | void filter_rc_set_RC(int num, int type, double R1, double R2, double R3, double C); |
| 58 | 58 |
| r1404 | r1405 | |
|---|---|---|
| 7 | 7 | |
| 8 | 8 | #define TONES 13 |
| 9 | 9 | |
| 10 | static int divisor[TONES] = { 478, 451, 426, 402, 379, 358, 338, 319, 301, 284, 268, 253, 239 }; | |
| 10 | static const int divisor[TONES] = { 478, 451, 426, 402, 379, 358, 338, 319, 301, 284, 268, 253, 239 }; | |
| 11 | 11 | |
| 12 | 12 | struct TMS3615 { |
| 13 | 13 | sound_stream *channel; /* returned by stream_create() */ |
| r1404 | r1405 | |
|---|---|---|
| 172 | 172 | #define REPEATCOUNT ((chip->PlayParams<<1)&0x6) // remember: its 3 bits and the bottom bit is always zero! |
| 173 | 173 | #define LOCALSILENCESTATE ((chip->OutputCounter & 0x2) && (MIRRORMODE)) // 1 when silent output, 0 when DAC output. |
| 174 | 174 | |
| 175 | static INT8 DeltaTable[4][4] = | |
| 175 | static const INT8 DeltaTable[4][4] = | |
| 176 | 176 | { |
| 177 | 177 | { 0xCD, 0xCD, 0xEF, 0xEF, }, |
| 178 | 178 | { 0xEF, 0xEF, 0x00, 0x00, }, |
| r1404 | r1405 | |
|---|---|---|
| 2333 | 2333 | UINT8 addr_A1; /* address line A1 */ |
| 2334 | 2334 | |
| 2335 | 2335 | /* ADPCM-A unit */ |
| 2336 | UINT8 | |
| 2336 | const UINT8 | |
| 2337 | 2337 | UINT32 pcm_size; /* size of pcm rom */ |
| 2338 | 2338 | UINT8 adpcmTL; /* adpcmA total level */ |
| 2339 | 2339 | ADPCM_CH adpcm[6]; /* adpcm channels */ |
| r1404 | r1405 | |
| 2353 | 2353 | #define ADPCM_SHIFT (16) /* frequency step rate */ |
| 2354 | 2354 | #define ADPCMA_ADDRESS_SHIFT 8 /* adpcm A address shift */ |
| 2355 | 2355 | |
| 2356 | static UINT8 *pcmbufA; | |
| 2356 | static const UINT8 *pcmbufA; | |
| 2357 | 2357 | static UINT32 pcmsizeA; |
| 2358 | 2358 | |
| 2359 | 2359 | |
| 2360 | 2360 | /* Algorithm and tables verified on real YM2608 and YM2610 */ |
| 2361 | 2361 | |
| 2362 | 2362 | /* usual ADPCM table (16 * 1.1^N) */ |
| 2363 | static int steps[49] = | |
| 2363 | static const int steps[49] = | |
| 2364 | 2364 | { |
| 2365 | 2365 | 16, 17, 19, 21, 23, 25, 28, |
| 2366 | 2366 | 31, 34, 37, 41, 45, 50, 55, |
| r1404 | r1405 | |
| 2372 | 2372 | }; |
| 2373 | 2373 | |
| 2374 | 2374 | /* different from the usual ADPCM table */ |
| 2375 | static int step_inc[8] = { -1*16, -1*16, -1*16, -1*16, 2*16, 5*16, 7*16, 9*16 }; | |
| 2375 | static const int step_inc[8] = { -1*16, -1*16, -1*16, -1*16, 2*16, 5*16, 7*16, 9*16 }; | |
| 2376 | 2376 | |
| 2377 | 2377 | /* speedup purposes only */ |
| 2378 | 2378 | static int jedi_table[ 49*16 ]; |
| r1404 | r1405 | |
| 2599 | 2599 | |
| 2600 | 2600 | |
| 2601 | 2601 | |
| 2602 | static unsigned int YM2608_ADPCM_ROM_addr[2*6] = { | |
| 2602 | static const unsigned int YM2608_ADPCM_ROM_addr[2*6] = { | |
| 2603 | 2603 | 0x0000, 0x01bf, /* bass drum */ |
| 2604 | 2604 | 0x01c0, 0x043f, /* snare drum */ |
| 2605 | 2605 | 0x0440, 0x1b7f, /* top cymbal */ |
| r1404 | r1405 | |
| 2614 | 2614 | It was verified, using real YM2608, that this ADPCM stream produces 100% correct output signal. |
| 2615 | 2615 | */ |
| 2616 | 2616 | |
| 2617 | static unsigned char YM2608_ADPCM_ROM[0x2000] = { | |
| 2617 | static const unsigned char YM2608_ADPCM_ROM[0x2000] = { | |
| 2618 | 2618 | |
| 2619 | 2619 | /* Source: 01BD.ROM */ |
| 2620 | 2620 | /* Length: 448 / 0x000001C0 */ |
| r1404 | r1405 | |
| 4119 | 4119 | F2610->OPN.ST.IRQ_Handler = IRQHandler; |
| 4120 | 4120 | F2610->OPN.ST.SSG = ssg; |
| 4121 | 4121 | /* ADPCM */ |
| 4122 | F2610->pcmbuf = (UINT8 *)pcmroma; | |
| 4122 | F2610->pcmbuf = (const UINT8 *)pcmroma; | |
| 4123 | 4123 | F2610->pcm_size = pcmsizea; |
| 4124 | 4124 | /* DELTA-T */ |
| 4125 | 4125 | F2610->deltaT.memory = (UINT8 *)pcmromb; |
| r1404 | r1405 | |
|---|---|---|
| 86 | 86 | static void compute_tables(void) |
| 87 | 87 | { |
| 88 | 88 | /* nibble to bit map */ |
| 89 | static int nbl2bit[16][4] = | |
| 89 | static const int nbl2bit[16][4] = | |
| 90 | 90 | { |
| 91 | 91 | { 1, 0, 0, 0}, { 1, 0, 0, 1}, { 1, 0, 1, 0}, { 1, 0, 1, 1}, |
| 92 | 92 | { 1, 1, 0, 0}, { 1, 1, 0, 1}, { 1, 1, 1, 0}, { 1, 1, 1, 1}, |
| r1404 | r1405 | |
|---|---|---|
| 95 | 95 | #define MINOUT -0x8000 |
| 96 | 96 | |
| 97 | 97 | static 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}; | |
| 99 | 99 | |
| 100 | 100 | int i, j, lvol[4], rvol[4], play[4], loop[4], ppcm_data[4], ppcm[4]; |
| 101 | 101 | unsigned char *rom[4]; |
| r1404 | r1405 | |
|---|---|---|
| 35 | 35 | #define MULTIPCM_CLOCKDIV (360.0) |
| 36 | 36 | #define MULTIPCM_ONE (18) |
| 37 | 37 | |
| 38 | static int ctbl[] = | |
| 38 | static const int ctbl[] = | |
| 39 | 39 | { |
| 40 | 40 | 0, 1, 2, 3, 4, 5, 6 , -1, // voice number mapping |
| 41 | 41 | 7, 8, 9, 10,11,12,13, -1, |
| r1404 | r1405 | |
| 43 | 43 | 21,22,23,24,25,26,27, -1, |
| 44 | 44 | }; |
| 45 | 45 | |
| 46 | static int decaytbl[16] = // decay times | |
| 46 | static const int decaytbl[16] = // decay times | |
| 47 | 47 | { |
| 48 | 48 | 0, 300, 800, 1400, |
| 49 | 49 | 2100, 3000, 4000, 5200, |
| r1404 | r1405 | |
|---|---|---|
| 643 | 643 | static void log_enable_line(struct SN76477 *sn) |
| 644 | 644 | { |
| 645 | 645 | #if VERBOSE |
| 646 | static const char *desc[] = | |
| 646 | static const char *const desc[] = | |
| 647 | 647 | { |
| 648 | 648 | "Enabled", "Inhibited" |
| 649 | 649 | }; |
| r1404 | r1405 | |
|---|---|---|
| 174 | 174 | /* This is the energy lookup table */ |
| 175 | 175 | |
| 176 | 176 | /* sampled from real chip */ |
| 177 | static unsigned short energytable[0x20] = | |
| 177 | static const unsigned short energytable[0x20] = | |
| 178 | 178 | { |
| 179 | 179 | 0, 2, 4, 6, 10, 12, 14, 18, /* 0-7 */ |
| 180 | 180 | 22, 26, 30, 34, 38, 44, 48, 54, /* 8-15 */ |
| r1404 | r1405 | |
|---|---|---|
| 58 | 58 | |
| 59 | 59 | |
| 60 | 60 | #if 0 |
| 61 | static int kdac_note[] = { | |
| 61 | static const int kdac_note[] = { | |
| 62 | 62 | 261.63/8, 277.18/8, |
| 63 | 63 | 293.67/8, 311.13/8, |
| 64 | 64 | 329.63/8, |
| r1404 | r1405 | |
| 70 | 70 | 523.25/8, |
| 71 | 71 | }; |
| 72 | 72 | |
| 73 | static float kdaca_fn[][2] = { | |
| 73 | static const float kdaca_fn[][2] = { | |
| 74 | 74 | /* B */ |
| 75 | 75 | { 0x03f, 493.88/8 }, /* ?? */ |
| 76 | 76 | { 0x11f, 493.88/4 }, /* ?? */ |
| r1404 | r1405 | |
|---|---|---|
| 46 | 46 | |
| 47 | 47 | static UINT16 masterAmplModTable[16*256]; |
| 48 | 48 | |
| 49 | static float attackTimes[16] = | |
| 49 | static const float attackTimes[16] = | |
| 50 | 50 | { |
| 51 | 51 | /* milliseconds */ |
| 52 | 52 | #if defined(SID_REFTIMES) |
| r1404 | r1405 | |
| 60 | 60 | #endif |
| 61 | 61 | }; |
| 62 | 62 | |
| 63 | static float decayReleaseTimes[16] = | |
| 63 | static const float decayReleaseTimes[16] = | |
| 64 | 64 | { |
| 65 | 65 | /* milliseconds */ |
| 66 | 66 | #if defined(SID_REFTIMES) |
| r1404 | r1405 | |
|---|---|---|
| 11 | 11 | // C64 C PAL, MOS 6581R4 1686 S |
| 12 | 12 | // |
| 13 | 13 | |
| 14 | static UINT8 releaseTab[] = | |
| 14 | static const UINT8 releaseTab[] = | |
| 15 | 15 | { |
| 16 | 16 | 255, 255, 254, 254, 253, 253, 252, 252, 251, 251, 250, 250, 249, 249, 248, |
| 17 | 17 | 248, 247, 247, 246, 246, 245, 245, 244, 244, 243, 243, 242, 242, 241, 241, |
| r1404 | r1405 | |
|---|---|---|
| 151 | 151 | |
| 152 | 152 | |
| 153 | 153 | /* 0-DRAM x1, 1-ROM, 2-DRAM x8, 3-ROM (3 is bad setting - not allowed by the manual) */ |
| 154 | static UINT8 dram_rightshift[4]={3,0,0,0}; | |
| 154 | static const UINT8 dram_rightshift[4]={3,0,0,0}; | |
| 155 | 155 | |
| 156 | 156 | /* DELTA-T ADPCM write register */ |
| 157 | 157 | void YM_DELTAT_ADPCM_Write(YM_DELTAT *DELTAT,int r,int v) |
| r1404 | r1405 | |
|---|---|---|
| 79 | 79 | UINT32 output_rate; |
| 80 | 80 | } ES5503Chip; |
| 81 | 81 | |
| 82 | static UINT16 wavesizes[8] = { 256, 512, 1024, 2048, 4096, 8192, 16384, 32768 }; | |
| 83 | static UINT32 wavemasks[8] = { 0x1ff00, 0x1fe00, 0x1fc00, 0x1f800, 0x1f000, 0x1e000, 0x1c000, 0x18000 }; | |
| 84 | static UINT32 accmasks[8] = { 0xff, 0x1ff, 0x3ff, 0x7ff, 0xfff, 0x1fff, 0x3fff, 0x7fff }; | |
| 85 | static int resshifts[8] = { 9, 10, 11, 12, 13, 14, 15, 16 }; | |
| 82 | static const UINT16 wavesizes[8] = { 256, 512, 1024, 2048, 4096, 8192, 16384, 32768 }; | |
| 83 | static const UINT32 wavemasks[8] = { 0x1ff00, 0x1fe00, 0x1fc00, 0x1f800, 0x1f000, 0x1e000, 0x1c000, 0x18000 }; | |
| 84 | static const UINT32 accmasks[8] = { 0xff, 0x1ff, 0x3ff, 0x7ff, 0xfff, 0x1fff, 0x3fff, 0x7fff }; | |
| 85 | static const int resshifts[8] = { 9, 10, 11, 12, 13, 14, 15, 16 }; | |
| 86 | 86 | |
| 87 | 87 | enum |
| 88 | 88 | { |
| r1404 | r1405 | |
|---|---|---|
| 1141 | 1141 | bufptr += sprintf(bufptr, "\n%s\n", ui_getstring(UI_vectorgame)); |
| 1142 | 1142 | |
| 1143 | 1143 | /* display screen resolution and refresh rate info for raster games */ |
| 1144 | else | |
| 1144 | else if (Machine->drv->video_attributes & VIDEO_TYPE_RASTER) | |
| 1145 | 1145 | bufptr += sprintf(bufptr,"\n%s:\n%d " UTF8_MULTIPLY " %d (%s) %f" UTF8_NBSP "Hz\n", |
| 1146 | 1146 | ui_getstring(UI_screenres), |
| 1147 | 1147 | Machine->screen[0].visarea.max_x - Machine->screen[0].visarea.min_x + 1, |
| 1148 | 1148 | Machine->screen[0].visarea.max_y - Machine->screen[0].visarea.min_y + 1, |
| 1149 | 1149 | (Machine->gamedrv->flags & ORIENTATION_SWAP_XY) ? "V" : "H", |
| 1150 | 1150 | ATTOSECONDS_TO_HZ(Machine->screen[0].refresh)); |
| 1151 | else | |
| 1152 | *bufptr++ = '\0'; | |
| 1153 | ||
| 1151 | 1154 | return bufptr - buffer; |
| 1152 | 1155 | } |
| 1153 | 1156 |
| r1404 | r1405 | |
|---|---|---|
| 102 | 102 | int i,j; |
| 103 | 103 | UINT64 total,normalize; |
| 104 | 104 | UINT64 computed; |
| 105 | static const char *names[PROFILER_TOTAL] = | |
| 105 | static const char *const names[PROFILER_TOTAL] = | |
| 106 | 106 | { |
| 107 | 107 | "CPU 1 ", |
| 108 | 108 | "CPU 2 ", |
| r1404 | r1405 | |
|---|---|---|
| 337 | 337 | static INT32 joystick_saturation; |
| 338 | 338 | |
| 339 | 339 | /* standard joystick mappings */ |
| 340 | const char * joystick_map_8way = "7778...4445"; | |
| 341 | const char * joystick_map_4way_sticky = "s8.4s8.44s8.4445"; | |
| 342 | const char * joystick_map_4way_diagonal = "4444s8888..444458888.444555888.ss5.222555666.222256666.2222s6666.2222s6666"; | |
| 340 | const char joystick_map_8way[] = "7778...4445"; | |
| 341 | const char joystick_map_4way_sticky[] = "s8.4s8.44s8.4445"; | |
| 342 | const char joystick_map_4way_diagonal[] = "4444s8888..444458888.444555888.ss5.222555666.222256666.2222s6666.2222s6666"; | |
| 343 | 343 | |
| 344 | 344 | |
| 345 | 345 | |
| r1404 | r1405 | |
| 1549 | 1549 | JOYSTICK_MAP_DOWN | JOYSTICK_MAP_RIGHT, |
| 1550 | 1550 | JOYSTICK_MAP_STICKY |
| 1551 | 1551 | }; |
| 1552 | static const char | |
| 1552 | static const char | |
| 1553 | 1553 | const char *ptr = strchr(validchars, *mapstring++); |
| 1554 | 1554 | |
| 1555 | 1555 | /* invalid characters exit immediately */ |
| r1404 | r1405 | |
|---|---|---|
| 119 | 119 | |
| 120 | 120 | /* ----- flags for video_attributes ----- */ |
| 121 | 121 | |
| 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 | |
| 125 | 126 | |
| 126 | 127 | /* should VIDEO_UPDATE by called at the start of VBLANK or at the end? */ |
| 127 | 128 | #define VIDEO_UPDATE_BEFORE_VBLANK 0x0000 |
| 128 | #define VIDEO_UPDATE_AFTER_VBLANK 0x000 | |
| 129 | #define VIDEO_UPDATE_AFTER_VBLANK 0x0004 | |
| 129 | 130 | |
| 130 | 131 | /* indicates VIDEO_UPDATE will add container bits its */ |
| 131 | #define VIDEO_SELF_RENDER 0x000 | |
| 132 | #define VIDEO_SELF_RENDER 0x0008 | |
| 132 | 133 | |
| 133 | 134 | /* automatically extend the palette creating a darker copy for shadows */ |
| 134 | 135 | #define VIDEO_HAS_SHADOWS 0x0010 |
| r1404 | r1405 | |
|---|---|---|
| 83 | 83 | static int cpu_6_irq_callback(int line); |
| 84 | 84 | static int cpu_7_irq_callback(int line); |
| 85 | 85 | |
| 86 | int (*cpu_irq_callbacks[MAX_CPU])(int) = | |
| 86 | int (*const cpu_irq_callbacks[MAX_CPU])(int) = | |
| 87 | 87 | { |
| 88 | 88 | cpu_0_irq_callback, |
| 89 | 89 | cpu_1_irq_callback, |
| r1404 | r1405 | |
|---|---|---|
| 82 | 82 | offset |
| 83 | 83 | -------------------------------------------------*/ |
| 84 | 84 | |
| 85 | INLINE int readbit(const UINT8 *src, int bitnum) | |
| 85 | INLINE int readbit(const UINT8 *src, unsigned int bitnum) | |
| 86 | 86 | { |
| 87 | 87 | return src[bitnum / 8] & (0x80 >> (bitnum % 8)); |
| 88 | 88 | } |
| r1404 | r1405 | |
|---|---|---|
| 485 | 485 | ***************************************************************************/ |
| 486 | 486 | |
| 487 | 487 | /* joystick maps */ |
| 488 | extern const char * joystick_map_8way; | |
| 489 | extern const char * joystick_map_4way_sticky; | |
| 490 | extern const char * joystick_map_4way_diagonal; | |
| 488 | extern const char joystick_map_8way[]; | |
| 489 | extern const char joystick_map_4way_sticky[]; | |
| 490 | extern const char joystick_map_4way_diagonal[]; | |
| 491 | 491 | |
| 492 | 492 | |
| 493 | 493 |
| r1404 | r1405 | |
|---|---|---|
| 30 | 30 | |
| 31 | 31 | void cpuint_reset(void); |
| 32 | 32 | |
| 33 | extern int (*cpu_irq_callbacks[])(int); | |
| 33 | extern int (*const cpu_irq_callbacks[])(int); | |
| 34 | 34 | |
| 35 | 35 | |
| 36 | 36 |
| r1404 | r1405 | |
|---|---|---|
| 135 | 135 | static void ss_c4(UINT8 *, UINT32); |
| 136 | 136 | static void ss_c8(UINT8 *, UINT32); |
| 137 | 137 | |
| 138 | static void (*ss_conv[])(UINT8 *, UINT32) = { 0, 0, ss_c2, 0, ss_c4, 0, 0, 0, ss_c8 }; | |
| 138 | static void (*const ss_conv[])(UINT8 *, UINT32) = { 0, 0, ss_c2, 0, ss_c4, 0, 0, 0, ss_c8 }; | |
| 139 | 139 | |
| 140 | 140 | |
| 141 | 141 |
| r1404 | r1405 | |
|---|---|---|
| 563 | 563 | |
| 564 | 564 | static UINT32 cheatOptions = 2; |
| 565 | 565 | |
| 566 | static const char * | |
| 566 | static const char *const kCheatNameTemplates[] = | |
| 567 | 567 | { |
| 568 | 568 | "Infinite Credits", |
| 569 | 569 | "Infinite Time", |
| r1404 | r1405 | |
| 724 | 724 | 0x01 |
| 725 | 725 | }; |
| 726 | 726 | |
| 727 | static const char * kWatchLabelStringList[] = | |
| 727 | static const char *const kWatchLabelStringList[] = | |
| 728 | 728 | { |
| 729 | 729 | "None", |
| 730 | 730 | "Address", |
| 731 | 731 | "String" |
| 732 | 732 | }; |
| 733 | 733 | |
| 734 | static const char * kWatchDisplayTypeStringList[] = | |
| 734 | static const char *const kWatchDisplayTypeStringList[] = | |
| 735 | 735 | { |
| 736 | 736 | "Hex", |
| 737 | 737 | "Decimal", |
| r1404 | r1405 | |
| 2827 | 2827 | |
| 2828 | 2828 | static int EditCheatMenu(CheatEntry * entry, int index, int selection) |
| 2829 | 2829 | { |
| 2830 | static const char * | |
| 2830 | static const char *const kTypeNames[] = | |
| 2831 | 2831 | { |
| 2832 | 2832 | "Normal/Delay", |
| 2833 | 2833 | "Wait", |
| r1404 | r1405 | |
| 2837 | 2837 | "Select" |
| 2838 | 2838 | }; |
| 2839 | 2839 | |
| 2840 | static const char * | |
| 2840 | static const char *const kNumbersTable[] = | |
| 2841 | 2841 | { |
| 2842 | 2842 | "0", "1", "2", "3", "4", "5", "6", "7", |
| 2843 | 2843 | "8", "9", "10", "11", "12", "13", "14", "15", |
| r1404 | r1405 | |
| 2845 | 2845 | "24", "25", "26", "27", "28", "29", "30", "31" |
| 2846 | 2846 | }; |
| 2847 | 2847 | |
| 2848 | static const char * | |
| 2848 | static const char *const kOperationNames[] = | |
| 2849 | 2849 | { |
| 2850 | 2850 | "Write", |
| 2851 | 2851 | "Add/Subtract", |
| r1404 | r1405 | |
| 2857 | 2857 | "Null" |
| 2858 | 2858 | }; |
| 2859 | 2859 | |
| 2860 | static const char * | |
| 2860 | static const char *const kAddSubtractNames[] = | |
| 2861 | 2861 | { |
| 2862 | 2862 | "Add", |
| 2863 | 2863 | "Subtract" |
| 2864 | 2864 | }; |
| 2865 | 2865 | |
| 2866 | static const char * | |
| 2866 | static const char *const kSetClearNames[] = | |
| 2867 | 2867 | { |
| 2868 | 2868 | "Set", |
| 2869 | 2869 | "Clear" |
| 2870 | 2870 | }; |
| 2871 | 2871 | |
| 2872 | static const char * | |
| 2872 | static const char *const kPrefillNames[] = | |
| 2873 | 2873 | { |
| 2874 | 2874 | "None", |
| 2875 | 2875 | "FF", |
| r1404 | r1405 | |
| 2877 | 2877 | "01" |
| 2878 | 2878 | }; |
| 2879 | 2879 | |
| 2880 | static const char * | |
| 2880 | static const char *const kEndiannessNames[] = | |
| 2881 | 2881 | { |
| 2882 | 2882 | "Normal", |
| 2883 | 2883 | "Swap" |
| 2884 | 2884 | }; |
| 2885 | 2885 | |
| 2886 | static const char * | |
| 2886 | static const char *const kRegionNames[] = | |
| 2887 | 2887 | { |
| 2888 | 2888 | "CPU1", "CPU2", "CPU3", "CPU4", "CPU5", "CPU6", "CPU7", "CPU8", |
| 2889 | 2889 | "GFX1", "GFX2", "GFX3", "GFX4", "GFX5", "GFX6", "GFX7", "GFX8", |
| r1404 | r1405 | |
| 2892 | 2892 | "USER1", "USER2", "USER3", "USER4", "USER5", "USER6", "USER7", "USER8" |
| 2893 | 2893 | }; |
| 2894 | 2894 | |
| 2895 | static const char * | |
| 2895 | static const char *const kLocationNames[] = | |
| 2896 | 2896 | { |
| 2897 | 2897 | "Normal", |
| 2898 | 2898 | "Region", |
| r1404 | r1405 | |
| 2904 | 2904 | "Unused (7)" |
| 2905 | 2905 | }; |
| 2906 | 2906 | |
| 2907 | static const char * | |
| 2907 | static const char *const kCustomLocationNames[] = | |
| 2908 | 2908 | { |
| 2909 | 2909 | "Comment", |
| 2910 | 2910 | "EEPROM", |
| r1404 | r1405 | |
| 2917 | 2917 | "Unused (28)", "Unused (29)", "Unused (30)", "Unused (31)" |
| 2918 | 2918 | }; |
| 2919 | 2919 | |
| 2920 | static const char * | |
| 2920 | static const char *const kSizeNames[] = | |
| 2921 | 2921 | { |
| 2922 | 2922 | "8 Bit", |
| 2923 | 2923 | "16 Bit", |
| r1404 | r1405 | |
| 5270 | 5270 | |
| 5271 | 5271 | static int DoSearchMenuClassic(int selection) |
| 5272 | 5272 | { |
| 5273 | static const char * energyStrings[] = | |
| 5273 | static const char *const energyStrings[] = | |
| 5274 | 5274 | { |
| 5275 | 5275 | "Less", |
| 5276 | 5276 | "Greater", |
| r1404 | r1405 | |
| 5278 | 5278 | "Greater or Equal", |
| 5279 | 5279 | }; |
| 5280 | 5280 | |
| 5281 | static const char * equalOrNotStrings[] = | |
| 5281 | static const char *const equalOrNotStrings[] = | |
| 5282 | 5282 | { |
| 5283 | 5283 | "Equal", |
| 5284 | 5284 | "Not Equal", |
| 5285 | 5285 | }; |
| 5286 | 5286 | |
| 5287 | static const char * operandStrings[] = | |
| 5287 | static const char *const operandStrings[] = | |
| 5288 | 5288 | { |
| 5289 | 5289 | "Previous Data", |
| 5290 | 5290 | "First Data", |
| r1404 | r1405 | |
| 5800 | 5800 | static int DoSearchMenu(int selection) |
| 5801 | 5801 | { |
| 5802 | 5802 | /* menu stirngs */ |
| 5803 | static const char * kOperandNameTable[] = | |
| 5803 | static const char *const kOperandNameTable[] = | |
| 5804 | 5804 | { |
| 5805 | 5805 | "Current Data", |
| 5806 | 5806 | "Previous Data", |
| r1404 | r1405 | |
| 5808 | 5808 | "Value" |
| 5809 | 5809 | }; |
| 5810 | 5810 | |
| 5811 | static const char * kComparisonNameTable[] = | |
| 5811 | static const char *const kComparisonNameTable[] = | |
| 5812 | 5812 | { |
| 5813 | 5813 | "Less", |
| 5814 | 5814 | "Greater", |
| r1404 | r1405 | |
| 5820 | 5820 | "Near To" |
| 5821 | 5821 | }; |
| 5822 | 5822 | |
| 5823 | static const char * kSearchByteNameTable[] = | |
| 5823 | static const char *const kSearchByteNameTable[] = | |
| 5824 | 5824 | { |
| 5825 | 5825 | "1", |
| 5826 | 5826 | "2", |
| r1404 | r1405 | |
| 6289 | 6289 | |
| 6290 | 6290 | static int SelectSearchRegions(int selection, SearchInfo * search) |
| 6291 | 6291 | { |
| 6292 | static const char | |
| 6292 | static const char *const kSearchSpeedList[] = | |
| 6293 | 6293 | { |
| 6294 | 6294 | "Fast", |
| 6295 | 6295 | "Medium", |
| r1404 | r1405 | |
| 7066 | 7066 | kMenu_Return |
| 7067 | 7067 | }; |
| 7068 | 7068 | |
| 7069 | static const char * kWatchSizeStringList[] = | |
| 7069 | static const char *const kWatchSizeStringList[] = | |
| 7070 | 7070 | { |
| 7071 | 7071 | "8 Bit", |
| 7072 | 7072 | "16 Bit", |
| r1404 | r1405 | |
| 9246 | 9246 | UINT8 customField; |
| 9247 | 9247 | }; |
| 9248 | 9248 | |
| 9249 | static struct ConversionTable kConversionTable[] = | |
| 9249 | static const struct ConversionTable kConversionTable[] = | |
| 9250 | 9250 | { |
| 9251 | 9251 | { 0, 0x00000000, kCustomField_None }, |
| 9252 | 9252 | { 1, 0x00000001, kCustomField_None }, |
| r1404 | r1405 | |
| 9313 | 9313 | { -1, 0x00000000, kCustomField_End } |
| 9314 | 9314 | }; |
| 9315 | 9315 | |
| 9316 | struct ConversionTable * traverse = kConversionTable; | |
| 9316 | const struct ConversionTable * traverse = kConversionTable; | |
| 9317 | 9317 | UINT32 newCode; |
| 9318 | 9318 | UINT8 linkCheat = 0; |
| 9319 | 9319 |
| r1404 | r1405 | |
|---|---|---|
| 654 | 654 | { |
| 655 | 655 | #define SPACE_SHIFT(a) ((addr_shift < 0) ? ((a) << -addr_shift) : ((a) >> addr_shift)) |
| 656 | 656 | #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" }; | |
| 658 | 658 | int databus_width = cputype_databus_width(cpu->type, spacenum); |
| 659 | 659 | int addr_shift = cputype_addrbus_shift(cpu->type, spacenum); |
| 660 | 660 | int alignunit = databus_width/8; |
| r1404 | r1405 | |
|---|---|---|
| 87 | 87 | GLOBAL VARIABLES |
| 88 | 88 | ***************************************************************************/ |
| 89 | 89 | |
| 90 | extern const char *option_unadorned[MAX_UNADORNED_OPTIONS]; | |
| 90 | extern const char *const option_unadorned[MAX_UNADORNED_OPTIONS]; | |
| 91 | 91 | |
| 92 | 92 | |
| 93 | 93 |
| r1404 | r1405 | |
|---|---|---|
| 110 | 110 | GLOBAL VARIABLES |
| 111 | 111 | ***************************************************************************/ |
| 112 | 112 | |
| 113 | const char *option_unadorned[MAX_UNADORNED_OPTIONS] = | |
| 113 | const char *const option_unadorned[MAX_UNADORNED_OPTIONS] = | |
| 114 | 114 | { |
| 115 | 115 | "<UNADORNED0>", |
| 116 | 116 | "<UNADORNED1>", |
| r1404 | r1405 | |
|---|---|---|
| 21 | 21 | // dma for ecp |
| 22 | 22 | } PC_LPT_CONFIG; |
| 23 | 23 | |
| 24 | void pc_lpt_config(int nr, PC_LPT_CONFIG *config); | |
| 24 | void pc_lpt_config(int nr, const PC_LPT_CONFIG *config); | |
| 25 | 25 | |
| 26 | 26 | void pc_lpt_set_device(int nr, CENTRONICS_DEVICE *device); |
| 27 | 27 |
| r1404 | r1405 | |
|---|---|---|
| 44 | 44 | void (*handshake_out)(int n, int data, int mask); |
| 45 | 45 | } CENTRONICS_CONFIG; |
| 46 | 46 | |
| 47 | void centronics_config(int nr, CENTRONICS_CONFIG *config); | |
| 47 | void centronics_config(int nr, const CENTRONICS_CONFIG *config); | |
| 48 | 48 | |
| 49 | 49 | void centronics_write_data(int nr, UINT8 data); |
| 50 | 50 | void centronics_write_handshake(int nr, int data, int mask); |
| r1404 | r1405 | |
|---|---|---|
| 1208 | 1208 | } |
| 1209 | 1209 | |
| 1210 | 1210 | //============================================================ |
| 1211 | // input_port_mutable_seq | |
| 1212 | //============================================================ | |
| 1213 | ||
| 1214 | static 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 | //============================================================ | |
| 1211 | 1232 | // dialog_add_single_seqselect |
| 1212 | 1233 | //============================================================ |
| 1213 | 1234 | |
| r1404 | r1405 | |
| 1217 | 1238 | seqselect_info *stuff; |
| 1218 | 1239 | input_seq *code; |
| 1219 | 1240 | |
| 1220 | code = input_port_seq(port, seq); | |
| 1241 | code = input_port_mutable_seq(port, seq); | |
| 1221 | 1242 | |
| 1222 | 1243 | if (dialog_write_item(di, WS_CHILD | WS_VISIBLE | SS_ENDELLIPSIS | ES_CENTER | SS_SUNKEN, |
| 1223 | 1244 | x, y, cx, cy, NULL, DLGITEM_EDIT, NULL)) |
| r1404 | r1405 | |
|---|---|---|
| 35 | 35 | |
| 36 | 36 | typedef struct { |
| 37 | 37 | CENTRONICS_DEVICE *device; |
| 38 | PC_LPT_CONFIG *config; | |
| 38 | const PC_LPT_CONFIG *config; | |
| 39 | 39 | int on; |
| 40 | 40 | UINT8 data; |
| 41 | 41 | UINT8 status; |
| r1404 | r1405 | |
| 45 | 45 | { 0 } |
| 46 | 46 | }; |
| 47 | 47 | |
| 48 | void pc_lpt_config(int nr, PC_LPT_CONFIG *config) | |
| 48 | void pc_lpt_config(int nr, const PC_LPT_CONFIG *config) | |
| 49 | 49 | { |
| 50 | 50 | PC_LPT *This=LPT+nr; |
| 51 | 51 | This->config=config; |
| r1404 | r1405 | |
|---|---|---|
| 7 | 7 | #include "devices/printer.h" |
| 8 | 8 | |
| 9 | 9 | typedef struct { |
| 10 | CENTRONICS_CONFIG *config; | |
| 10 | const CENTRONICS_CONFIG *config; | |
| 11 | 11 | UINT8 data; |
| 12 | 12 | UINT8 control; |
| 13 | 13 | double time_; |
| r1404 | r1405 | |
| 33 | 33 | |
| 34 | 34 | static TIMER_CALLBACK(centronics_timer_callback); |
| 35 | 35 | |
| 36 | void centronics_config(int nr, CENTRONICS_CONFIG *config) | |
| 36 | void centronics_config(int nr, const CENTRONICS_CONFIG *config) | |
| 37 | 37 | { |
| 38 | 38 | CENTRONICS *This=cent+nr; |
| 39 | 39 | This->config=config; |
| r1404 | r1405 | |
|---|---|---|
| 14 | 14 | |
| 15 | 15 | - [QL] Added sound. [Curt Coder] |
| 16 | 16 | |
| 17 | - [SG1000] Fixed keyboard/joystick detection. (bug #1444) [Curt Coder] | |
| 18 | ||
| 17 | 19 | - [SYM1] Fixed bug #1442. [Dirk Best] |
| 18 | 20 | |
| 19 | 21 | - [TI99] Fixed fatal regressions introduced a few releases ago. [Michael Zapf] |
| 20 | 22 | |
| 21 | 23 | - [X68000] Improved video timing. [Barry Rodewald] |
| 22 | 24 | |
| 23 | - [SG1000] Fixed keyboard/joystick detection. (bug #1444) [Curt Coder] | |
| 24 | 25 | |
| 25 | 26 | |
| 26 | ||
| 27 | 27 | User Interface Changes: |
| 28 | 28 | ----------------------- |
| 29 | 29 | - [Windows] Fixed occasional crash in menu bar when multithreading is on. |
| r1404 | r1405 | |
| 39 | 39 | |
| 40 | 40 | Source Changes: |
| 41 | 41 | ---------------- |
| 42 | - The core is based on MAME 0.121u | |
| 42 | - The core is based on MAME 0.121u4. This incorporates all features of the | |
| 43 | 43 | update to this core. [MAME team] |
| 44 | 44 | |
| 45 | 45 | - Changed spacing between natural keyboard key names. [Nate Woods] |
| r1404 | r1405 | |
|---|---|---|
| 495 | 495 | # executable targets and dependencies |
| 496 | 496 | #------------------------------------------------- |
| 497 | 497 | |
| 498 | ifndef EXECUTABLE_DEFINED | |
| 499 | ||
| 498 | 500 | $(EMULATOR): $(VERSIONOBJ) $(DRVLIBS) $(LIBOSD) $(LIBEMU) $(LIBCPU) $(LIBSOUND) $(LIBUTIL) $(EXPAT) $(ZLIB) $(LIBOCORE) $(RESFILE) |
| 499 | 501 | # always recompile the version string |
| 500 | 502 | $(CC) $(CDEFS) $(CFLAGS) -c $(SRC)/version.c -o $(VERSIONOBJ) |
| 501 | 503 | @echo Linking $@... |
| 502 | 504 | $(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $^ $(LIBS) -o $@ |
| 503 | 505 | |
| 506 | endif | |
| 504 | 507 | |
| 505 | 508 | |
| 509 | ||
| 506 | 510 | #------------------------------------------------- |
| 507 | 511 | # generic rules |
| 508 | 512 | #------------------------------------------------- |
| Previous | 15994 Revisions | Next |