| Previous | 15994 Revisions | Next |
| r2455 Thursday 24th April, 2008 at 12:00:53 UTC by Nathan Woods |
|---|
| Updated to MAME 0.124u4 core |
| [docs] | messnew.txt |
| [src/emu] | devconv.h emu.mak emuopts.c emupal.c memory.c memory.h romload.c sound.c ui.c validity.c video.c |
| [src/emu/cpu/adsp2100] | adsp2100.c |
| [src/emu/cpu/alph8201] | 8201dasm.c alph8201.c |
| [src/emu/cpu/apexc] | apexc.c |
| [src/emu/cpu/arm] | arm.c |
| [src/emu/cpu/arm7] | arm7.c |
| [src/emu/cpu/asap] | asap.c |
| [src/emu/cpu/ccpu] | ccpu.c |
| [src/emu/cpu/cop400] | cop410.c cop420.c |
| [src/emu/cpu/dsp32] | dsp32.c |
| [src/emu/cpu/dsp56k] | dsp56k.c |
| [src/emu/cpu/e132xs] | e132xs.c |
| [src/emu/cpu/f8] | f8.c |
| [src/emu/cpu/g65816] | g65816cm.h |
| [src/emu/cpu/h6280] | h6280.c |
| [src/emu/cpu/h83002] | h83002.c |
| [src/emu/cpu/i8039] | i8039.c |
| [src/emu/cpu/i8051] | i8051.c |
| [src/emu/cpu/i8085] | i8085.c |
| [src/emu/cpu/i86] | i286.c i86.c |
| [src/emu/cpu/i8x41] | i8x41.c |
| [src/emu/cpu/i960] | i960.c |
| [src/emu/cpu/konami] | konami.c |
| [src/emu/cpu/lh5801] | lh5801.c |
| [src/emu/cpu/m37710] | m37710.c m37710cm.h |
| [src/emu/cpu/m6502] | 6502dasm.c m4510.c m6502.c m6509.c m65ce02.c |
| [src/emu/cpu/m6800] | m6800.c |
| [src/emu/cpu/m68000] | m68kmame.h |
| [src/emu/cpu/m6805] | m6805.c |
| [src/emu/cpu/m6809] | m6809.c |
| [src/emu/cpu/mb86233] | mb86233.c |
| [src/emu/cpu/mb88xx] | mb88xx.c |
| [src/emu/cpu/mc68hc11] | mc68hc11.c |
| [src/emu/cpu/minx] | minx.c |
| [src/emu/cpu/mips] | mdrc64.c mdrcold.c mips3.c mips3com.c psx.c r3000.c |
| [src/emu/cpu/nec] | nec.c |
| [src/emu/cpu/pdp1] | pdp1.c tx0.c |
| [src/emu/cpu/pic16c5x] | pic16c5x.c |
| [src/emu/cpu/powerpc] | ppc.c ppcdrc.c |
| [src/emu/cpu/s2650] | s2650.c |
| [src/emu/cpu/saturn] | saturn.c |
| [src/emu/cpu/sc61860] | sc61860.c |
| [src/emu/cpu/se3208] | se3208.c |
| [src/emu/cpu/sh2] | sh2.c |
| [src/emu/cpu/sh4] | sh4.c |
| [src/emu/cpu/sharc] | sharc.c |
| [src/emu/cpu/sm8500] | sm8500.c |
| [src/emu/cpu/spc700] | spc700.c |
| [src/emu/cpu/ssp1601] | ssp1601.c |
| [src/emu/cpu/t11] | t11.c t11ops.c t11table.c |
| [src/emu/cpu/tlcs90] | tlcs90.c |
| [src/emu/cpu/tms32010] | tms32010.c |
| [src/emu/cpu/tms32025] | tms32025.c |
| [src/emu/cpu/tms32031] | tms32031.c |
| [src/emu/cpu/tms32051] | tms32051.c |
| [src/emu/cpu/tms34010] | tms34010.c |
| [src/emu/cpu/upd7810] | upd7810.c |
| [src/emu/cpu/v30mz] | v30mz.c |
| [src/emu/cpu/v60] | v60.c |
| [src/emu/cpu/v810] | v810.c |
| [src/emu/cpu/z180] | z180.c |
| [src/emu/cpu/z80] | z80.c |
| [src/emu/cpu/z8000] | z8000.c |
| [src/emu/cpu/z80gb] | z80gb.c |
| [src/emu/debug] | debugcpu.c |
| [src/emu/machine] | 6522via.c 68681.c* 68681.h* 8042kbdc.c am53cf96.c idectrl.c microtch.c* microtch.h* msm6242.c smc91c9x.c z80dma.c |
| [src/emu/sound] | 2203intf.c 2203intf.h 2608intf.c 2608intf.h 2610intf.c ay8910.c ay8910.h c352.c disc_flt.c es5503.c es5506.c fm.c scsp.c |
| [src/emu/video] | generic.c voodoo.c |
| [src/lib/util] | sha1.c |
| [src/mame] | mame.mak mamedriv.c |
| [src/mame/audio] | amiga.c aztarac.c cage.c carnival.c cchasm.c cclimber.c cinemat.c cps3.c cyberbal.c dcs.c exidy.c harddriv.c irem.c jedi.c leland.c mario.c mcr.c redalert.c scramble.c segag80r.c seibu.c spacefb.c starwars.c system16.c taito_en.c taitosnd.c timeplt.c trackfld.c |
| [src/mame/drivers] | 1942.c 40love.c 88games.c acommand.c aeroboto.c aerofgt.c airbustr.c aliens.c alpha68k.c ambush.c ampoker2.c angelkds.c aquarium.c arabian.c argus.c arkanoid.c armedf.c ashnojoe.c asterix.c astinvad.c astrocde.c atarigt.c atarigx2.c atarisy2.c atetris.c aztarac.c badlands.c bagman.c baraduke.c battlane.c battlnts.c bbusters.c beathead.c bfcobra.c bfm_sc2.c bigevglf.c bigfghtr.c bishjan.c bking.c bladestl.c blktiger.c blockhl.c blueprnt.c bmcbowl.c bottom9.c boxer.c btoads.c bublbobl.c buggychl.c bwidow.c bwing.c cabal.c capbowl.c carrera.c cave.c cbuster.c ccastles.c cclimber.c centiped.c chaknpop.c champbas.c changela.c cherrym.c cherrym2.c chinagat.c chinsan.c chqflag.c cidelsa.c circusc.c cischeat.c citycon.c clayshoo.c cliffhgr.c cloak.c cloud9.c cninja.c cntsteer.c coinmstr.c cojag.c combatsc.c compgolf.c contra.c coolpool.c cop01.c couple.c cowrace.c cps1.c cps2.c crgolf.c crystal.c cshooter.c cvs.c cybertnk.c dacholer.c darius.c darkseal.c dassault.c dblewing.c dbz.c dcheese.c ddayjlc.c ddenlovr.c ddrible.c dec8.c deco156.c deco32.c deco_mlc.c destroyr.c dgpix.c discoboy.c diverboy.c djboy.c djmain.c dlair.c dogfgt.c dominob.c dooyong.c dreamwld.c dribling.c dunhuang.c dwarfd.c dynax.c egghunt.c enigma2.c epos.c equites.c esh.c ettrivia.c exctsccr.c exerion.c exidy440.c expro02.c exterm.c exzisus.c f-32.c fcombat.c fcrash.c fgoal.c filetto.c finalizr.c findout.c firebeat.c firetrap.c flkatck.c flower.c flstory.c foodf.c freekick.c fromanc2.c funkybee.c funworld.c funybubl.c fuukifg3.c gaelco.c gaelco3d.c gaiden.c galaxian.c galaxold.c galdrvr.c gameplan.c gaplus.c gbusters.c gcpinbal.c genesis.c getrivia.c gijoe.c ginganin.c gladiatr.c glass.c gng.c goal92.c goldstar.c gottlieb.c gpworld.c gradius3.c grchamp.c groundfx.c gstream.c gsword.c gticlub.c guab.c gunbustr.c gyruss.c hal21.c halleys.c hanaawas.c hanaroku.c hcastle.c hexa.c hnayayoi.c hng64.c holeland.c homedata.c homerun.c hornet.c hotblock.c hyhoo.c hyprduel.c igs_180.c igs_blit.c imolagp.c iqblock.c irobot.c ironhors.c istellar.c itech32.c itech8.c jack.c jalmah.c jchan.c jcross.c jedi.c jongkyo.c jrpacman.c junofrst.c kaneko16.c karnov.c kchamp.c kingobox.c kinst.c kncljoe.c koikoi.c konamigq.c konamigv.c konamigx.c konamim2.c ksayakyu.c ksys573.c kyugo.c labyrunr.c ladyfrog.c laserbas.c laserbat.c lasso.c lastduel.c lastfght.c legionna.c leland.c lemmings.c lethal.c limenko.c lkage.c lockon.c looping.c lordgun.c lsasquad.c lucky8.c lvcards.c m107.c m62.c m92.c macrossp.c madalien.c magic10.c magmax.c mainevt.c mainsnk.c mappy.c maxaflex.c mayumi.c mazerbla.c mcr68.c megadriv.c megaplay.c megasys1.c megatech.c megazone.c meijinsn.c merit.c meritm.c metlclsh.c metro.c mexico86.c micro3d.c midvunit.c mikie.c missile.c mjsister.c mjsiyoub.c mlanding.c model1.c model2.c model3.c momoko.c moo.c mosaic.c mouser.c mpu4drvr.c mquake.c mrflea.c ms32.c msisaac.c munchmo.c mw8080bw.c mwarr.c namcona1.c namconb1.c namcos1.c namcos12.c namcos21.c namcos22.c namcos23.c namcos86.c nbmj8688.c nbmj8891.c nbmj8991.c nemesis.c neogeo.c ninjakd2.c nmk16.c nova2001.c nycaptor.c nyny.c ojankohs.c omegrace.c othldrby.c overdriv.c pacland.c pacman.c pandoras.c parodius.c pasha2.c pastelg.c peplus.c pgm.c phoenix.c pipedrm.c pipeline.c pirates.c pitnrun.c pkscram.c pktgaldx.c plygonet.c pntnpuzl.c polepos.c policetr.c poolshrk.c pooyan.c popeye.c popper.c powerins.c prehisle.c psikyo.c psikyo4.c psikyosh.c psychic5.c punchout.c pushman.c qdrmfgp.c quasar.c quizdna.c r2dtank.c rabbit.c raiden.c raiden2.c rainbow.c rallyx.c rbmk.c rcasino.c realbrk.c redalert.c redclash.c retofinv.c rmhaihai.c rockrage.c rollerg.c route16.c royalmah.c rpunch.c runaway.c rungun.c sandscrp.c sbasketb.c sbrkout.c scobra.c scotrsht.c scramble.c seattle.c segac2.c segag80r.c segahang.c segald.c segaorun.c segas16a.c segas16b.c segas18.c segas32.c segaxbd.c segaybd.c seibuspi.c seicross.c senjyo.c seta.c sf.c sgladiat.c shangha3.c shanghai.c shangkid.c shisen.c shootout.c shougi.c sidearms.c sidepckt.c silkroad.c simpl156.c simpsons.c skykid.c skylncr.c slapfght.c slapshot.c smstrv.c snk.c snookr10.c* sonson.c spaceg.c spcforce.c speedspn.c spiders.c splash.c sprint8.c spy.c srmp2.c srmp6.c ssfindo.c sshangha.c sslam.c sspeedr.c ssrj.c stv.c stvinit.c suna16.c suna8.c superchs.c superdq.c superqix.c supertnk.c suprgolf.c suprridr.c system16.c tail2nos.c taito_b.c taito_f2.c taito_f3.c taito_l.c taito_z.c taitoair.c taitojc.c taitosj.c tankbatt.c tankbust.c taxidrvr.c tbowl.c tcl.c tecmo.c tehkanwc.c tempest.c tetrisp2.c thayers.c thedeep.c thepit.c thunderj.c thunderx.c tickee.c tigeroad.c timelimt.c tmaster.c tmnt.c tnzs.c toaplan2.c toratora.c toypop.c tp84.c tryout.c ttchamp.c tubep.c tumbleb.c turbo.c turbosub.c tutankhm.c twin16.c twins.c tx1.c uapce.c ultraman.c ultrsprt.c undrfire.c unico.c vamphalf.c vastar.c vegaeo.c vegas.c vendetta.c vicdual.c vigilant.c volfied.c vroulet.c wardner.c warpwarp.c wc90.c wc90b.c wecleman.c wilytowr.c wink.c wiping.c witch.c wwfsstar.c wwfwfest.c xain.c xexex.c xmen.c xxmissio.c xyonix.c zaccaria.c zaxxon.c zerozone.c zn.c zr107.c |
| [src/mame/includes] | cps1.h galaxold.h m62.h tx1.h |
| [src/mame/machine] | amiga.c arkanoid.c asic65.c atarifb.c atarigen.c balsente.c beezer.c bigevglf.c bsktball.c buggychl.c cubocd32.c dc.c dec0.c decocass.c decoprot.c docastle.c flstory.c galaxold.c harddriv.c irem_cpu.c konamigx.c konppc.c leland.c lkage.c lsasquad.c mhavoc.c midwayic.c midwunit.c midyunit.c n64.c namcond1.c namcos1.c namcos2.c neoprot.c nitedrvr.c nycaptor.c pitnrun.c playch10.c psx.c retofinv.c scramble.c segaic16.c segas32.c seicop.c simpsons.c slapfght.c snes.c stvcd.c stvprot.c subs.c tait8741.c taitosj.c tatsumi.c toaplan1.c twincobr.c tx1.c vertigo.c vsnes.c williams.c |
| [src/mame/video] | 1942.c aerofgt.c alpha68k.c amiga.c angelkds.c arkanoid.c armedf.c atarisy1.c atarisy2.c balsente.c battlane.c battlera.c battlex.c beathead.c beezer.c bfm_adr2.c bigevglf.c bionicc.c blktiger.c blmbycar.c blstroid.c btime.c bwing.c carjmbre.c cave.c ccastles.c cchasm.c centiped.c changela.c cidelsa.c cischeat.c cloud9.c combatsc.c commando.c cps1.c crshrace.c csk.c dc.c dcheese.c dec0.c dec8.c deco16ic.c deco32.c decocass.c deniam.c djboy.c dooyong.c dynduke.c eolith.c exidy.c exidy440.c fastfred.c foodf.c fromanc2.c fromance.c funworld.c funybubl.c gaelco2.c galpani2.c galpanic.c gameplan.c genesis.c ginganin.c gladiatr.c gottlieb.c grchamp.c groundfx.c gticlub.c gundealr.c harddriv.c homerun.c hyprduel.c irobot.c itech32.c itech8.c jaguar.c jedi.c jpmimpct.c kangaroo.c konamigx.c konamiic.c kyugo.c lastduel.c lethalj.c liberate.c lockon.c lordgun.c m10.c m58.c m62.c m72.c m92.c matmania.c mcr3.c mcr68.c megasys1.c metro.c midtunit.c midvunit.c namcos1.c namcos22.c nbmj8891.c nbmj8991.c nbmj9195.c nemesis.c neogeo.c niyanpai.c ojankohs.c pacman.c paradise.c playch10.c playmark.c policetr.c popeye.c popper.c powerins.c psikyosh.c psx.c quizdna.c rastan.c rockola.c rpunch.c runaway.c segag80r.c segaic16.c segaic24.c shangha3.c shisen.c sidearms.c snk68.c snookr10.c* sshangha.c ssozumo.c ssv.c st0016.c stactics.c starshp1.c stvvdp1.c stvvdp2.c subs.c suna16.c suna8.c suprnova.c system1.c system16.c taito_b.c taito_f3.c taito_z.c taitoic.c tatsumi.c tetrisp2.c thepit.c thief.c tiamc1.c tigeroad.c tmnt.c toaplan1.c toaplan2.c toki.c tryout.c tubep.c turbo.c twin16.c twincobr.c tx1.c undrfire.c unico.c usgames.c vigilant.c volfied.c wecleman.c williams.c ygv608.c yunsung8.c |
| [src/mess/drivers] | amstrad.c apple2.c atarist.c cgenie.c coco.c cpschngr.c einstein.c intv.c microtan.c msx.c oric.c orion.c pc8801.c spectrum.c svi318.c vectrex.c |
| [src/osd/windows] | winmain.c winmain.h |
| r2454 | r2455 | |
|---|---|---|
| 22 | 22 | switch (offset & 0x61 ) |
| 23 | 23 | { |
| 24 | 24 | case 0x00: |
| 25 | coin = (input_port_ | |
| 25 | coin = (input_port_ | |
| 26 | 26 | if (coin != 0x7) coin |= 0x8; |
| 27 | 27 | return sound_flags | coin; |
| 28 | 28 | |
| r2454 | r2455 | |
| 119 | 119 | sound_flags &= ~0x40; |
| 120 | 120 | return soundlatch4_r (machine,offset) << 8; |
| 121 | 121 | case 0x2: |
| 122 | return (sound_flags| (input_port_ | |
| 122 | return (sound_flags| (input_port_ | |
| 123 | 123 | case 0x5: |
| 124 | return input_port_ | |
| 124 | return input_port_ | |
| 125 | 125 | case 0x8: |
| 126 | return input_port_ | |
| 126 | return input_port_ | |
| 127 | 127 | default: |
| 128 | 128 | return 0xff << 8; |
| 129 | 129 | } |
| r2454 | r2455 | |
| 169 | 169 | |
| 170 | 170 | static TIMER_CALLBACK( cchasm_sh_update ) |
| 171 | 171 | { |
| 172 | if ((input_port_ | |
| 172 | if ((input_port_ | |
| 173 | 173 | z80ctc_0_trg0_w (machine, 0, 1); |
| 174 | 174 | } |
| 175 | 175 |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ****************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "cpu/i8039/i8039.h" |
| 10 | 9 | #include "sound/dac.h" |
| 11 | 10 | #include "sound/samples.h" |
| r2454 | r2455 | |
| 37 | 36 | |
| 38 | 37 | WRITE8_HANDLER( spacefb_port_1_w ) |
| 39 | 38 | { |
| 40 | cpunum_set_input_line( | |
| 39 | cpunum_set_input_line(machine, 1, 0, (data & 0x02) ? CLEAR_LINE : ASSERT_LINE); | |
| 41 | 40 | |
| 42 | 41 | /* enemy killed */ |
| 43 | 42 | if (!(data & 0x01) && (spacefb_sound_latch & 0x01)) sample_start(0,0,0); |
| r2454 | r2455 | |
|---|---|---|
| 142 | 142 | |
| 143 | 143 | if (offset < 0x80) |
| 144 | 144 | { |
| 145 | return chip.voice[offset / 8].regs[offset & 7] & | |
| 145 | return chip.voice[offset / 8].regs[offset & 7] & | |
| 146 | 146 | } |
| 147 | 147 | else if (offset == 0x80) |
| 148 | 148 | { |
| r2454 | r2455 | |
|---|---|---|
| 83 | 83 | |
| 84 | 84 | static TIMER_CALLBACK( signal_irq ) |
| 85 | 85 | { |
| 86 | amiga_custom_w(machine, REG_INTREQ, 0x8000 | (0x80 << param), 0); | |
| 86 | amiga_custom_w(machine, REG_INTREQ, 0x8000 | (0x80 << param), 0xffff); | |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 |
| r2454 | r2455 | |
|---|---|---|
| 11 | 11 | ***************************************************************************/ |
| 12 | 12 | |
| 13 | 13 | #include "driver.h" |
| 14 | #include "deprecat.h" | |
| 15 | 14 | #include "sound/ay8910.h" |
| 16 | 15 | #include "sound/flt_rc.h" |
| 17 | 16 | #include "timeplt.h" |
| r2454 | r2455 | |
| 110 | 109 | if (timeplt_last_irq_state == 0 && data) |
| 111 | 110 | { |
| 112 | 111 | /* setting bit 0 low then high triggers IRQ on the sound CPU */ |
| 113 | cpunum_set_input_line_and_vector( | |
| 112 | cpunum_set_input_line_and_vector(machine, 1,0,HOLD_LINE,0xff); | |
| 114 | 113 | } |
| 115 | 114 | |
| 116 | 115 | timeplt_last_irq_state = data; |
| r2454 | r2455 | |
| 155 | 154 | |
| 156 | 155 | static const struct AY8910interface timeplt_ay8910_interface = |
| 157 | 156 | { |
| 157 | AY8910_LEGACY_OUTPUT, | |
| 158 | AY8910_DEFAULT_LOADS, | |
| 158 | 159 | soundlatch_r, |
| 159 | timeplt_portB_r | |
| 160 | timeplt_portB_r, | |
| 161 | NULL, | |
| 162 | NULL | |
| 160 | 163 | }; |
| 161 | 164 | |
| 162 | 165 |
| r2454 | r2455 | |
|---|---|---|
| 1471 | 1471 | |
| 1472 | 1472 | static const struct AY8910interface demon_ay8910_interface_1 = |
| 1473 | 1473 | { |
| 1474 | AY8910_LEGACY_OUTPUT, | |
| 1475 | AY8910_DEFAULT_LOADS, | |
| 1474 | 1476 | sound_porta_r, |
| 1475 | 1477 | sound_portb_r, |
| 1476 | 1478 | 0, |
| r2454 | r2455 | |
| 1479 | 1481 | |
| 1480 | 1482 | static const struct AY8910interface demon_ay8910_interface_3 = |
| 1481 | 1483 | { |
| 1484 | AY8910_LEGACY_OUTPUT, | |
| 1485 | AY8910_DEFAULT_LOADS, | |
| 1482 | 1486 | 0, |
| 1483 | 1487 | 0, |
| 1484 | 1488 | 0, |
| r2454 | r2455 | |
|---|---|---|
| 63 | 63 | memory_set_bankptr(8, &bank_base[0x1000 * ((data >> 6) & 3)]); |
| 64 | 64 | coin_counter_w(1, (data >> 5) & 1); |
| 65 | 65 | coin_counter_w(0, (data >> 4) & 1); |
| 66 | cpunum_set_input_line( | |
| 66 | cpunum_set_input_line(machine, 3, INPUT_LINE_RESET, (data & 0x08) ? CLEAR_LINE : ASSERT_LINE); | |
| 67 | 67 | if (!(data & 0x01)) sndti_reset(SOUND_YM2151, 0); |
| 68 | 68 | |
| 69 | 69 | } |
| r2454 | r2455 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | #include "deprecat.h" | |
| 3 | 2 | #include "sound/vlm5030.h" |
| 4 | 3 | #include "sound/msm5205.h" |
| 5 | 4 | #include "sound/sn76496.h" |
| r2454 | r2455 | |
| 90 | 89 | if (last == 0 && data) |
| 91 | 90 | { |
| 92 | 91 | /* setting bit 0 low then high triggers IRQ on the sound CPU */ |
| 93 | cpunum_set_input_line_and_vector( | |
| 92 | cpunum_set_input_line_and_vector(machine, 1,0,HOLD_LINE,0xff); | |
| 94 | 93 | } |
| 95 | 94 | |
| 96 | 95 | last = data; |
| r2454 | r2455 | |
|---|---|---|
| 467 | 467 | logerror("%06X:CAGE read command = %04X\n", activecpu_get_pc(), cage_from_main); |
| 468 | 468 | cpu_to_cage_ready = 0; |
| 469 | 469 | update_control_lines(); |
| 470 | cpunum_set_input_line( | |
| 470 | cpunum_set_input_line(machine, cage_cpu, TMS32031_IRQ0, CLEAR_LINE); | |
| 471 | 471 | return cage_from_main; |
| 472 | 472 | } |
| 473 | 473 | |
| r2454 | r2455 | |
| 506 | 506 | logerror("%06X:main read data = %04X\n", activecpu_get_pc(), soundlatch_word_r(Machine, 0, 0)); |
| 507 | 507 | cage_to_cpu_ready = 0; |
| 508 | 508 | update_control_lines(); |
| 509 | return soundlatch_word_r(Machine, 0, 0); | |
| 509 | return soundlatch_word_r(Machine, 0, 0xffff); | |
| 510 | 510 | } |
| 511 | 511 | |
| 512 | 512 |
| r2454 | r2455 | |
|---|---|---|
| 77 | 77 | |
| 78 | 78 | const struct AY8910interface cclimber_ay8910_interface = |
| 79 | 79 | { |
| 80 | 0, | |
| 81 | 0, | |
| 80 | AY8910_LEGACY_OUTPUT, | |
| 81 | AY8910_DEFAULT_LOADS, | |
| 82 | NULL, | |
| 83 | NULL, | |
| 82 | 84 | cclimber_sample_select_w, |
| 83 | | |
| 85 | NULL | |
| 84 | 86 | }; |
| 85 | 87 | |
| 86 | 88 | const struct Samplesinterface cclimber_samples_interface = |
| r2454 | r2455 | |
|---|---|---|
| 322 | 322 | { |
| 323 | 323 | /* a read here asynchronously resets the 14024 count, clearing /SINT */ |
| 324 | 324 | ssio_14024_count = 0; |
| 325 | cpunum_set_input_line( | |
| 325 | cpunum_set_input_line(machine, ssio_sound_cpu, 0, CLEAR_LINE); | |
| 326 | 326 | return 0xff; |
| 327 | 327 | } |
| 328 | 328 | |
| r2454 | r2455 | |
| 446 | 446 | /********* sound interfaces ***********/ |
| 447 | 447 | static const struct AY8910interface ssio_ay8910_interface_1 = |
| 448 | 448 | { |
| 449 | 0, | |
| 450 | 0, | |
| 449 | AY8910_LEGACY_OUTPUT, | |
| 450 | AY8910_DEFAULT_LOADS, | |
| 451 | NULL, | |
| 452 | NULL, | |
| 451 | 453 | ssio_porta0_w, |
| 452 | 454 | ssio_portb0_w |
| 453 | 455 | }; |
| 454 | 456 | |
| 455 | 457 | static const struct AY8910interface ssio_ay8910_interface_2 = |
| 456 | 458 | { |
| 457 | 0, | |
| 458 | 0, | |
| 459 | AY8910_LEGACY_OUTPUT, | |
| 460 | AY8910_DEFAULT_LOADS, | |
| 461 | NULL, | |
| 462 | NULL, | |
| 459 | 463 | ssio_porta1_w, |
| 460 | 464 | ssio_portb1_w |
| 461 | 465 | }; |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "cpu/z80/z80.h" |
| 10 | 9 | #include "aztarac.h" |
| 11 | 10 |
| r2454 | r2455 | |
|---|---|---|
| 99 | 99 | //#endif |
| 100 | 100 | /* this does a hi-lo transition to reset the sound cpu */ |
| 101 | 101 | if (data) |
| 102 | cpunum_set_input_line( | |
| 102 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, ASSERT_LINE); | |
| 103 | 103 | else |
| 104 | 104 | { |
| 105 | cpunum_set_input_line( | |
| 105 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, CLEAR_LINE); | |
| 106 | 106 | cpu_spin(); /* otherwise no sound in driftout */ |
| 107 | 107 | } |
| 108 | 108 | break; |
| r2454 | r2455 | |
|---|---|---|
| 145 | 145 | |
| 146 | 146 | static WRITE8_HANDLER( sound_irq_ack_w ) |
| 147 | 147 | { |
| 148 | cpunum_set_input_line( | |
| 148 | cpunum_set_input_line(machine, 1, 0, CLEAR_LINE); | |
| 149 | 149 | } |
| 150 | 150 | |
| 151 | 151 | |
| r2454 | r2455 | |
| 190 | 190 | |
| 191 | 191 | static const struct AY8910interface irem_ay8910_interface_1 = |
| 192 | 192 | { |
| 193 | AY8910_LEGACY_OUTPUT, | |
| 194 | AY8910_DEFAULT_LOADS, | |
| 193 | 195 | soundlatch_r, |
| 194 | 0, | |
| 195 | 0, | |
| 196 | NULL, | |
| 197 | NULL, | |
| 196 | 198 | ay8910_0_portb_w |
| 197 | 199 | }; |
| 198 | 200 | |
| 199 | 201 | static const struct AY8910interface irem_ay8910_interface_2 = |
| 200 | 202 | { |
| 201 | 0, | |
| 202 | 0, | |
| 203 | AY8910_LEGACY_OUTPUT, | |
| 204 | AY8910_DEFAULT_LOADS, | |
| 205 | NULL, | |
| 206 | NULL, | |
| 203 | 207 | ay8910_1_porta_w, |
| 204 | | |
| 208 | NULL | |
| 205 | 209 | }; |
| 206 | 210 | |
| 207 | 211 | static const struct MSM5205interface irem_msm5205_interface_1 = |
| r2454 | r2455 | |
|---|---|---|
| 1270 | 1270 | |
| 1271 | 1271 | /* handle partials */ |
| 1272 | 1272 | if (!ACCESSING_BITS_8_15) |
| 1273 | data = (i80186_internal_port_r(machine, offset, 0) & 0xff00) | (data & 0x00ff); | |
| 1273 | data = (i80186_internal_port_r(machine, offset, 0xff00) & 0xff00) | (data & 0x00ff); | |
| 1274 | 1274 | else if (!ACCESSING_BITS_0_7) |
| 1275 | data = (i80186_internal_port_r(machine, offset, 0) & 0x00ff) | (data & 0xff00); | |
| 1275 | data = (i80186_internal_port_r(machine, offset, 0x00ff) & 0x00ff) | (data & 0xff00); | |
| 1276 | 1276 | |
| 1277 | 1277 | switch (offset) |
| 1278 | 1278 | { |
| 1279 | 1279 | case 0x22/2: |
| 1280 | if (LOG_PORTS) logerror("%05X:80186 EOI = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1280 | if (LOG_PORTS) logerror("%05X:80186 EOI = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1281 | 1281 | handle_eoi(0x8000); |
| 1282 | 1282 | update_interrupt_state(); |
| 1283 | 1283 | break; |
| 1284 | 1284 | |
| 1285 | 1285 | case 0x24/2: |
| 1286 | logerror("%05X:ERROR - write to 80186 interrupt poll = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1286 | logerror("%05X:ERROR - write to 80186 interrupt poll = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1287 | 1287 | break; |
| 1288 | 1288 | |
| 1289 | 1289 | case 0x26/2: |
| 1290 | logerror("%05X:ERROR - write to 80186 interrupt poll status = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1290 | logerror("%05X:ERROR - write to 80186 interrupt poll status = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1291 | 1291 | break; |
| 1292 | 1292 | |
| 1293 | 1293 | case 0x28/2: |
| 1294 | if (LOG_PORTS) logerror("%05X:80186 interrupt mask = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1294 | if (LOG_PORTS) logerror("%05X:80186 interrupt mask = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1295 | 1295 | i80186.intr.timer = (i80186.intr.timer & ~0x08) | ((data << 3) & 0x08); |
| 1296 | 1296 | i80186.intr.dma[0] = (i80186.intr.dma[0] & ~0x08) | ((data << 1) & 0x08); |
| 1297 | 1297 | i80186.intr.dma[1] = (i80186.intr.dma[1] & ~0x08) | ((data << 0) & 0x08); |
| r2454 | r2455 | |
| 1303 | 1303 | break; |
| 1304 | 1304 | |
| 1305 | 1305 | case 0x2a/2: |
| 1306 | if (LOG_PORTS) logerror("%05X:80186 interrupt priority mask = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1306 | if (LOG_PORTS) logerror("%05X:80186 interrupt priority mask = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1307 | 1307 | i80186.intr.priority_mask = data & 0x0007; |
| 1308 | 1308 | update_interrupt_state(); |
| 1309 | 1309 | break; |
| 1310 | 1310 | |
| 1311 | 1311 | case 0x2c/2: |
| 1312 | if (LOG_PORTS) logerror("%05X:80186 interrupt in-service = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1312 | if (LOG_PORTS) logerror("%05X:80186 interrupt in-service = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1313 | 1313 | i80186.intr.in_service = data & 0x00ff; |
| 1314 | 1314 | update_interrupt_state(); |
| 1315 | 1315 | break; |
| 1316 | 1316 | |
| 1317 | 1317 | case 0x2e/2: |
| 1318 | if (LOG_PORTS) logerror("%05X:80186 interrupt request = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1318 | if (LOG_PORTS) logerror("%05X:80186 interrupt request = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1319 | 1319 | i80186.intr.request = (i80186.intr.request & ~0x00c0) | (data & 0x00c0); |
| 1320 | 1320 | update_interrupt_state(); |
| 1321 | 1321 | break; |
| 1322 | 1322 | |
| 1323 | 1323 | case 0x30/2: |
| 1324 | if (LOG_PORTS) logerror("%05X:WARNING - wrote to 80186 interrupt status = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1324 | if (LOG_PORTS) logerror("%05X:WARNING - wrote to 80186 interrupt status = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1325 | 1325 | i80186.intr.status = (i80186.intr.status & ~0x8000) | (data & 0x8000); |
| 1326 | 1326 | i80186.intr.status = (i80186.intr.status & ~0x0007) | (data & 0x0007); |
| 1327 | 1327 | update_interrupt_state(); |
| 1328 | 1328 | break; |
| 1329 | 1329 | |
| 1330 | 1330 | case 0x32/2: |
| 1331 | if (LOG_PORTS) logerror("%05X:80186 timer interrupt contol = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1331 | if (LOG_PORTS) logerror("%05X:80186 timer interrupt contol = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1332 | 1332 | i80186.intr.timer = data & 0x000f; |
| 1333 | 1333 | break; |
| 1334 | 1334 | |
| 1335 | 1335 | case 0x34/2: |
| 1336 | if (LOG_PORTS) logerror("%05X:80186 DMA 0 interrupt control = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1336 | if (LOG_PORTS) logerror("%05X:80186 DMA 0 interrupt control = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1337 | 1337 | i80186.intr.dma[0] = data & 0x000f; |
| 1338 | 1338 | break; |
| 1339 | 1339 | |
| 1340 | 1340 | case 0x36/2: |
| 1341 | if (LOG_PORTS) logerror("%05X:80186 DMA 1 interrupt control = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1341 | if (LOG_PORTS) logerror("%05X:80186 DMA 1 interrupt control = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1342 | 1342 | i80186.intr.dma[1] = data & 0x000f; |
| 1343 | 1343 | break; |
| 1344 | 1344 | |
| 1345 | 1345 | case 0x38/2: |
| 1346 | if (LOG_PORTS) logerror("%05X:80186 INT 0 interrupt control = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1346 | if (LOG_PORTS) logerror("%05X:80186 INT 0 interrupt control = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1347 | 1347 | i80186.intr.ext[0] = data & 0x007f; |
| 1348 | 1348 | break; |
| 1349 | 1349 | |
| 1350 | 1350 | case 0x3a/2: |
| 1351 | if (LOG_PORTS) logerror("%05X:80186 INT 1 interrupt control = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1351 | if (LOG_PORTS) logerror("%05X:80186 INT 1 interrupt control = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1352 | 1352 | i80186.intr.ext[1] = data & 0x007f; |
| 1353 | 1353 | break; |
| 1354 | 1354 | |
| 1355 | 1355 | case 0x3c/2: |
| 1356 | if (LOG_PORTS) logerror("%05X:80186 INT 2 interrupt control = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1356 | if (LOG_PORTS) logerror("%05X:80186 INT 2 interrupt control = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1357 | 1357 | i80186.intr.ext[2] = data & 0x001f; |
| 1358 | 1358 | break; |
| 1359 | 1359 | |
| 1360 | 1360 | case 0x3e/2: |
| 1361 | if (LOG_PORTS) logerror("%05X:80186 INT 3 interrupt control = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1361 | if (LOG_PORTS) logerror("%05X:80186 INT 3 interrupt control = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1362 | 1362 | i80186.intr.ext[3] = data & 0x001f; |
| 1363 | 1363 | break; |
| 1364 | 1364 | |
| 1365 | 1365 | case 0x50/2: |
| 1366 | 1366 | case 0x58/2: |
| 1367 | 1367 | case 0x60/2: |
| 1368 | if (LOG_PORTS) logerror("%05X:80186 Timer %d count = %04X & %04X\n", activecpu_get_pc(), (offset - 0x50/2) / 4, data, mem_mask | |
| 1368 | if (LOG_PORTS) logerror("%05X:80186 Timer %d count = %04X & %04X\n", activecpu_get_pc(), (offset - 0x50/2) / 4, data, mem_mask | |
| 1369 | 1369 | which = (offset - 0x50/2) / 4; |
| 1370 | 1370 | internal_timer_update(which, data, -1, -1, -1); |
| 1371 | 1371 | break; |
| r2454 | r2455 | |
| 1373 | 1373 | case 0x52/2: |
| 1374 | 1374 | case 0x5a/2: |
| 1375 | 1375 | case 0x62/2: |
| 1376 | if (LOG_PORTS) logerror("%05X:80186 Timer %d max A = %04X & %04X\n", activecpu_get_pc(), (offset - 0x50/2) / 4, data, mem_mask | |
| 1376 | if (LOG_PORTS) logerror("%05X:80186 Timer %d max A = %04X & %04X\n", activecpu_get_pc(), (offset - 0x50/2) / 4, data, mem_mask | |
| 1377 | 1377 | which = (offset - 0x50/2) / 4; |
| 1378 | 1378 | internal_timer_update(which, -1, data, -1, -1); |
| 1379 | 1379 | break; |
| 1380 | 1380 | |
| 1381 | 1381 | case 0x54/2: |
| 1382 | 1382 | case 0x5c/2: |
| 1383 | if (LOG_PORTS) logerror("%05X:80186 Timer %d max B = %04X & %04X\n", activecpu_get_pc(), (offset - 0x50/2) / 4, data, mem_mask | |
| 1383 | if (LOG_PORTS) logerror("%05X:80186 Timer %d max B = %04X & %04X\n", activecpu_get_pc(), (offset - 0x50/2) / 4, data, mem_mask | |
| 1384 | 1384 | which = (offset - 0x50/2) / 4; |
| 1385 | 1385 | internal_timer_update(which, -1, -1, data, -1); |
| 1386 | 1386 | break; |
| r2454 | r2455 | |
| 1388 | 1388 | case 0x56/2: |
| 1389 | 1389 | case 0x5e/2: |
| 1390 | 1390 | case 0x66/2: |
| 1391 | if (LOG_PORTS) logerror("%05X:80186 Timer %d control = %04X & %04X\n", activecpu_get_pc(), (offset - 0x50/2) / 4, data, mem_mask | |
| 1391 | if (LOG_PORTS) logerror("%05X:80186 Timer %d control = %04X & %04X\n", activecpu_get_pc(), (offset - 0x50/2) / 4, data, mem_mask | |
| 1392 | 1392 | which = (offset - 0x50/2) / 4; |
| 1393 | 1393 | internal_timer_update(which, -1, -1, -1, data); |
| 1394 | 1394 | break; |
| 1395 | 1395 | |
| 1396 | 1396 | case 0xa0/2: |
| 1397 | if (LOG_PORTS) logerror("%05X:80186 upper chip select = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1397 | if (LOG_PORTS) logerror("%05X:80186 upper chip select = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1398 | 1398 | i80186.mem.upper = data | 0xc038; |
| 1399 | 1399 | break; |
| 1400 | 1400 | |
| 1401 | 1401 | case 0xa2/2: |
| 1402 | if (LOG_PORTS) logerror("%05X:80186 lower chip select = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1402 | if (LOG_PORTS) logerror("%05X:80186 lower chip select = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1403 | 1403 | i80186.mem.lower = (data & 0x3fff) | 0x0038; |
| 1404 | 1404 | break; |
| 1405 | 1405 | |
| 1406 | 1406 | case 0xa4/2: |
| 1407 | if (LOG_PORTS) logerror("%05X:80186 peripheral chip select = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1407 | if (LOG_PORTS) logerror("%05X:80186 peripheral chip select = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1408 | 1408 | i80186.mem.peripheral = data | 0x0038; |
| 1409 | 1409 | break; |
| 1410 | 1410 | |
| 1411 | 1411 | case 0xa6/2: |
| 1412 | if (LOG_PORTS) logerror("%05X:80186 middle chip select = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1412 | if (LOG_PORTS) logerror("%05X:80186 middle chip select = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1413 | 1413 | i80186.mem.middle = data | 0x01f8; |
| 1414 | 1414 | break; |
| 1415 | 1415 | |
| 1416 | 1416 | case 0xa8/2: |
| 1417 | if (LOG_PORTS) logerror("%05X:80186 middle P chip select = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1417 | if (LOG_PORTS) logerror("%05X:80186 middle P chip select = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1418 | 1418 | i80186.mem.middle_size = data | 0x8038; |
| 1419 | 1419 | |
| 1420 | 1420 | temp = (i80186.mem.peripheral & 0xffc0) << 4; |
| r2454 | r2455 | |
| 1434 | 1434 | |
| 1435 | 1435 | case 0xc0/2: |
| 1436 | 1436 | case 0xd0/2: |
| 1437 | if (LOG_PORTS) logerror("%05X:80186 DMA%d lower source address = %04X & %04X\n", activecpu_get_pc(), (offset - 0xc0/2) / 8, data, mem_mask | |
| 1437 | if (LOG_PORTS) logerror("%05X:80186 DMA%d lower source address = %04X & %04X\n", activecpu_get_pc(), (offset - 0xc0/2) / 8, data, mem_mask | |
| 1438 | 1438 | which = (offset - 0xc0/2) / 8; |
| 1439 | 1439 | stream_update(dma_stream); |
| 1440 | 1440 | i80186.dma[which].source = (i80186.dma[which].source & ~0x0ffff) | (data & 0x0ffff); |
| r2454 | r2455 | |
| 1442 | 1442 | |
| 1443 | 1443 | case 0xc2/2: |
| 1444 | 1444 | case 0xd2/2: |
| 1445 | if (LOG_PORTS) logerror("%05X:80186 DMA%d upper source address = %04X & %04X\n", activecpu_get_pc(), (offset - 0xc0/2) / 8, data, mem_mask | |
| 1445 | if (LOG_PORTS) logerror("%05X:80186 DMA%d upper source address = %04X & %04X\n", activecpu_get_pc(), (offset - 0xc0/2) / 8, data, mem_mask | |
| 1446 | 1446 | which = (offset - 0xc0/2) / 8; |
| 1447 | 1447 | stream_update(dma_stream); |
| 1448 | 1448 | i80186.dma[which].source = (i80186.dma[which].source & ~0xf0000) | ((data << 16) & 0xf0000); |
| r2454 | r2455 | |
| 1450 | 1450 | |
| 1451 | 1451 | case 0xc4/2: |
| 1452 | 1452 | case 0xd4/2: |
| 1453 | if (LOG_PORTS) logerror("%05X:80186 DMA%d lower dest address = %04X & %04X\n", activecpu_get_pc(), (offset - 0xc0/2) / 8, data, mem_mask | |
| 1453 | if (LOG_PORTS) logerror("%05X:80186 DMA%d lower dest address = %04X & %04X\n", activecpu_get_pc(), (offset - 0xc0/2) / 8, data, mem_mask | |
| 1454 | 1454 | which = (offset - 0xc0/2) / 8; |
| 1455 | 1455 | stream_update(dma_stream); |
| 1456 | 1456 | i80186.dma[which].dest = (i80186.dma[which].dest & ~0x0ffff) | (data & 0x0ffff); |
| r2454 | r2455 | |
| 1458 | 1458 | |
| 1459 | 1459 | case 0xc6/2: |
| 1460 | 1460 | case 0xd6/2: |
| 1461 | if (LOG_PORTS) logerror("%05X:80186 DMA%d upper dest address = %04X & %04X\n", activecpu_get_pc(), (offset - 0xc0/2) / 8, data, mem_mask | |
| 1461 | if (LOG_PORTS) logerror("%05X:80186 DMA%d upper dest address = %04X & %04X\n", activecpu_get_pc(), (offset - 0xc0/2) / 8, data, mem_mask | |
| 1462 | 1462 | which = (offset - 0xc0/2) / 8; |
| 1463 | 1463 | stream_update(dma_stream); |
| 1464 | 1464 | i80186.dma[which].dest = (i80186.dma[which].dest & ~0xf0000) | ((data << 16) & 0xf0000); |
| r2454 | r2455 | |
| 1466 | 1466 | |
| 1467 | 1467 | case 0xc8/2: |
| 1468 | 1468 | case 0xd8/2: |
| 1469 | if (LOG_PORTS) logerror("%05X:80186 DMA%d transfer count = %04X & %04X\n", activecpu_get_pc(), (offset - 0xc0/2) / 8, data, mem_mask | |
| 1469 | if (LOG_PORTS) logerror("%05X:80186 DMA%d transfer count = %04X & %04X\n", activecpu_get_pc(), (offset - 0xc0/2) / 8, data, mem_mask | |
| 1470 | 1470 | which = (offset - 0xc0/2) / 8; |
| 1471 | 1471 | stream_update(dma_stream); |
| 1472 | 1472 | i80186.dma[which].count = data; |
| r2454 | r2455 | |
| 1474 | 1474 | |
| 1475 | 1475 | case 0xca/2: |
| 1476 | 1476 | case 0xda/2: |
| 1477 | if (LOG_PORTS) logerror("%05X:80186 DMA%d control = %04X & %04X\n", activecpu_get_pc(), (offset - 0xc0/2) / 8, data, mem_mask | |
| 1477 | if (LOG_PORTS) logerror("%05X:80186 DMA%d control = %04X & %04X\n", activecpu_get_pc(), (offset - 0xc0/2) / 8, data, mem_mask | |
| 1478 | 1478 | which = (offset - 0xc0/2) / 8; |
| 1479 | 1479 | stream_update(dma_stream); |
| 1480 | 1480 | update_dma_control(which, data); |
| 1481 | 1481 | break; |
| 1482 | 1482 | |
| 1483 | 1483 | case 0xfe/2: |
| 1484 | if (LOG_PORTS) logerror("%05X:80186 relocation register = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1484 | if (LOG_PORTS) logerror("%05X:80186 relocation register = %04X & %04X\n", activecpu_get_pc(), data, mem_mask | |
| 1485 | 1485 | |
| 1486 | 1486 | /* we assume here there that this doesn't happen too often */ |
| 1487 | 1487 | /* plus, we can't really remove the old memory range, so we also assume that it's */ |
| r2454 | r2455 | |
| 1498 | 1498 | break; |
| 1499 | 1499 | |
| 1500 | 1500 | default: |
| 1501 | logerror("%05X:80186 port %02X = %04X & %04X\n", activecpu_get_pc(), offset*2, data, mem_mask | |
| 1501 | logerror("%05X:80186 port %02X = %04X & %04X\n", activecpu_get_pc(), offset*2, data, mem_mask | |
| 1502 | 1502 | break; |
| 1503 | 1503 | } |
| 1504 | 1504 | } |
| r2454 | r2455 | |
| 1660 | 1660 | } |
| 1661 | 1661 | |
| 1662 | 1662 | /* /RESET */ |
| 1663 | cpunum_set_input_line( | |
| 1663 | cpunum_set_input_line(machine, 2, INPUT_LINE_RESET, data & 0x80 ? CLEAR_LINE : ASSERT_LINE); | |
| 1664 | 1664 | |
| 1665 | 1665 | /* /NMI */ |
| 1666 | 1666 | /* If the master CPU doesn't get a response by the time it's ready to send |
| 1667 | 1667 | the next command, it uses an NMI to force the issue; unfortunately, this |
| 1668 | 1668 | seems to really screw up the sound system. It turns out it's better to |
| 1669 | 1669 | just wait for the original interrupt to occur naturally */ |
| 1670 | /* cpunum_set_input_line( | |
| 1670 | /* cpunum_set_input_line(machine, 2, INPUT_LINE_NMI, data & 0x40 ? CLEAR_LINE : ASSERT_LINE);*/ | |
| 1671 | 1671 | |
| 1672 | 1672 | /* INT0 */ |
| 1673 | 1673 | if (data & 0x20) |
| r2454 | r2455 | |
| 1923 | 1923 | case 0x01: |
| 1924 | 1924 | case 0x02: |
| 1925 | 1925 | if (ACCESSING_BITS_0_7) |
| 1926 | dac_w(machine, offset, data, 0x | |
| 1926 | dac_w(machine, offset, data, 0x | |
| 1927 | 1927 | return; |
| 1928 | 1928 | |
| 1929 | 1929 | case 0x03: |
| 1930 | dac_w(machine, 0, ((data << 13) & 0xe000) | ((data << 10) & 0x1c00) | ((data << 7) & 0x0300), 0x00ff); | |
| 1931 | dac_w(machine, 2, ((data << 10) & 0xe000) | ((data << 7) & 0x1c00) | ((data << 4) & 0x0300), 0x00ff); | |
| 1932 | dac_w(machine, 4, ((data << 8) & 0xc000) | ((data << 6) & 0x3000) | ((data << 4) & 0x0c00) | ((data << 2) & 0x0300), 0x00ff); | |
| 1930 | dac_w(machine, 0, ((data << 13) & 0xe000) | ((data << 10) & 0x1c00) | ((data << 7) & 0x0300), 0xff00); | |
| 1931 | dac_w(machine, 2, ((data << 10) & 0xe000) | ((data << 7) & 0x1c00) | ((data << 4) & 0x0300), 0xff00); | |
| 1932 | dac_w(machine, 4, ((data << 8) & 0xc000) | ((data << 6) & 0x3000) | ((data << 4) & 0x0c00) | ((data << 2) & 0x0300), 0xff00); | |
| 1933 | 1933 | return; |
| 1934 | 1934 | } |
| 1935 | 1935 |
| r2454 | r2455 | |
|---|---|---|
| 37 | 37 | /*****************************************************************************/ |
| 38 | 38 | |
| 39 | 39 | #include "driver.h" |
| 40 | #include "deprecat.h" | |
| 41 | 40 | #include "cpu/i8039/i8039.h" |
| 42 | 41 | #include "sound/ay8910.h" |
| 43 | 42 | #include "sound/samples.h" |
| r2454 | r2455 | |
| 236 | 235 | |
| 237 | 236 | if ( bitsGoneHigh & OUT_PORT_2_MUSIC_RESET ) |
| 238 | 237 | /* reset output is no longer asserted active low */ |
| 239 | cpunum_set_input_line( | |
| 238 | cpunum_set_input_line(machine, CPU_MUSIC_ID, INPUT_LINE_RESET, PULSE_LINE ); | |
| 240 | 239 | } |
| 241 | 240 | |
| 242 | 241 |
| r2454 | r2455 | |
|---|---|---|
| 97 | 97 | |
| 98 | 98 | /* IRQ ack */ |
| 99 | 99 | if (offset==0xf) { |
| 100 | cpunum_set_input_line( | |
| 100 | cpunum_set_input_line(machine, 1, 6, CLEAR_LINE); | |
| 101 | 101 | return 0; |
| 102 | 102 | } |
| 103 | 103 |
| r2454 | r2455 | |
|---|---|---|
| 118 | 118 | |
| 119 | 119 | WRITE16_HANDLER( hd68k_snd_reset_w ) |
| 120 | 120 | { |
| 121 | cpunum_set_input_line(Machine, hdcpu_sound, INPUT_LINE_RESET, ASSERT_LINE); | |
| 122 | cpunum_set_input_line(Machine, hdcpu_sound, INPUT_LINE_RESET, CLEAR_LINE); | |
| 121 | cpunum_set_input_line(machine, hdcpu_sound, INPUT_LINE_RESET, ASSERT_LINE); | |
| 122 | cpunum_set_input_line(machine, hdcpu_sound, INPUT_LINE_RESET, CLEAR_LINE); | |
| 123 | 123 | mainflag = soundflag = 0; |
| 124 | 124 | update_68k_interrupts(Machine); |
| 125 | 125 | logerror("%06X:Reset sound\n", activecpu_get_previouspc()); |
| r2454 | r2455 | |
| 222 | 222 | case 4: /* RES320 */ |
| 223 | 223 | logerror("%06X:RES320=%d\n", activecpu_get_previouspc(), data); |
| 224 | 224 | if (hdcpu_sounddsp != -1) |
| 225 | cpunum_set_input_line( | |
| 225 | cpunum_set_input_line(machine, hdcpu_sounddsp, INPUT_LINE_HALT, data ? CLEAR_LINE : ASSERT_LINE); | |
| 226 | 226 | break; |
| 227 | 227 | |
| 228 | 228 | case 7: /* LED */ |
| r2454 | r2455 | |
|---|---|---|
| 323 | 323 | |
| 324 | 324 | WRITE8_HANDLER( seibu_irq_clear_w ) |
| 325 | 325 | { |
| 326 | update_irq_lines( | |
| 326 | update_irq_lines(machine, VECTOR_INIT); | |
| 327 | 327 | } |
| 328 | 328 | |
| 329 | 329 | WRITE8_HANDLER( seibu_rst10_ack_w ) |
| r2454 | r2455 | |
| 333 | 333 | |
| 334 | 334 | WRITE8_HANDLER( seibu_rst18_ack_w ) |
| 335 | 335 | { |
| 336 | update_irq_lines( | |
| 336 | update_irq_lines(machine, RST18_CLEAR); | |
| 337 | 337 | } |
| 338 | 338 | |
| 339 | 339 | void seibu_ym3812_irqhandler(int linestate) |
| r2454 | r2455 | |
| 443 | 443 | main2sub[offset] = data; |
| 444 | 444 | break; |
| 445 | 445 | case 4: |
| 446 | update_irq_lines( | |
| 446 | update_irq_lines(machine, RST18_ASSERT); | |
| 447 | 447 | break; |
| 448 | 448 | case 6: |
| 449 | 449 | /* just a guess */ |
| r2454 | r2455 | |
| 459 | 459 | |
| 460 | 460 | READ8_HANDLER( seibu_main_v30_r ) |
| 461 | 461 | { |
| 462 | return seibu_main_word_r(machine,offset/2,0) >> (8 * (offset & 1)); | |
| 462 | return seibu_main_word_r(machine,offset/2,0xffff) >> (8 * (offset & 1)); | |
| 463 | 463 | } |
| 464 | 464 | |
| 465 | 465 | WRITE8_HANDLER( seibu_main_v30_w ) |
| 466 | 466 | { |
| 467 | seibu_main_word_w(machine,offset/2,data << (8 * (offset & 1)),0x | |
| 467 | seibu_main_word_w(machine,offset/2,data << (8 * (offset & 1)),0x | |
| 468 | 468 | } |
| 469 | 469 | |
| 470 | 470 | WRITE16_HANDLER( seibu_main_mustb_w ) |
| r2454 | r2455 | |
| 474 | 474 | |
| 475 | 475 | // logerror("seibu_main_mustb_w: %x -> %x %x\n", data, main2sub[0], main2sub[1]); |
| 476 | 476 | |
| 477 | update_irq_lines( | |
| 477 | update_irq_lines(machine, RST18_ASSERT); | |
| 478 | 478 | } |
| 479 | 479 | |
| 480 | 480 | /***************************************************************************/ |
| r2454 | r2455 | |
| 497 | 497 | |
| 498 | 498 | const struct YM2203interface seibu_ym2203_interface = |
| 499 | 499 | { |
| 500 | 0,0,0,0,seibu_ym2203_irqhandler | |
| 500 | { | |
| 501 | AY8910_LEGACY_OUTPUT, | |
| 502 | AY8910_DEFAULT_LOADS, | |
| 503 | NULL, NULL, NULL, NULL | |
| 504 | }, | |
| 505 | seibu_ym2203_irqhandler | |
| 501 | 506 | }; |
| 502 | 507 | |
| 503 | 508 | /***************************************************************************/ |
| r2454 | r2455 | |
|---|---|---|
| 9 | 9 | |
| 10 | 10 | #include "driver.h" |
| 11 | 11 | #include "streams.h" |
| 12 | #include "deprecat.h" | |
| 13 | 12 | #include "cpu/i8039/i8039.h" |
| 14 | 13 | #include "segag80r.h" |
| 15 | 14 | #include "machine/8255ppi.h" |
| r2454 | r2455 | |
| 425 | 424 | }; |
| 426 | 425 | |
| 427 | 426 | |
| 427 | static const ppi8255_interface ppi8255_005_intf = | |
| 428 | { | |
| 429 | NULL, | |
| 430 | NULL, | |
| 431 | NULL, | |
| 432 | sega005_sound_a_w, | |
| 433 | sega005_sound_b_w, | |
| 434 | NULL | |
| 435 | }; | |
| 436 | ||
| 437 | ||
| 428 | 438 | MACHINE_DRIVER_START( 005_sound_board ) |
| 429 | 439 | |
| 440 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 441 | MDRV_DEVICE_CONFIG( ppi8255_005_intf ) | |
| 442 | ||
| 430 | 443 | /* sound hardware */ |
| 431 | 444 | MDRV_SOUND_START(005) |
| 432 | 445 | |
| r2454 | r2455 | |
| 449 | 462 | |
| 450 | 463 | static SOUND_START( 005 ) |
| 451 | 464 | { |
| 452 | static const ppi8255_interface ppi_intf = | |
| 453 | { | |
| 454 | 1, | |
| 455 | { 0 }, | |
| 456 | { 0 }, | |
| 457 | { 0 }, | |
| 458 | { sega005_sound_a_w }, | |
| 459 | { sega005_sound_b_w }, | |
| 460 | { 0 } | |
| 461 | }; | |
| 462 | ppi8255_init(&ppi_intf); | |
| 463 | ||
| 464 | 465 | state_save_register_global_array(sound_state); |
| 465 | 466 | state_save_register_global(sound_addr); |
| 466 | 467 | state_save_register_global(sound_data); |
| r2454 | r2455 | |
| 819 | 820 | * |
| 820 | 821 | *************************************/ |
| 821 | 822 | |
| 823 | static const ppi8255_interface monsterb_ppi_intf = | |
| 824 | { | |
| 825 | NULL, | |
| 826 | NULL, | |
| 827 | n7751_status_r, | |
| 828 | monsterb_sound_a_w, | |
| 829 | monsterb_sound_b_w, | |
| 830 | n7751_command_w | |
| 831 | }; | |
| 832 | ||
| 833 | ||
| 822 | 834 | MACHINE_DRIVER_START( monsterb_sound_board ) |
| 823 | 835 | |
| 836 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 837 | MDRV_DEVICE_CONFIG( monsterb_ppi_intf ) | |
| 838 | ||
| 824 | 839 | /* basic machine hardware */ |
| 825 | 840 | MDRV_CPU_ADD(N7751, 6000000) |
| 826 | 841 | MDRV_CPU_PROGRAM_MAP(monsterb_7751_map,0) |
| r2454 | r2455 | |
| 851 | 866 | |
| 852 | 867 | static SOUND_START( monsterb ) |
| 853 | 868 | { |
| 854 | static const ppi8255_interface ppi_intf = | |
| 855 | { | |
| 856 | 1, | |
| 857 | { 0 }, | |
| 858 | { 0 }, | |
| 859 | { n7751_status_r }, | |
| 860 | { monsterb_sound_a_w }, | |
| 861 | { monsterb_sound_b_w }, | |
| 862 | { n7751_command_w } | |
| 863 | }; | |
| 864 | ppi8255_init(&ppi_intf); | |
| 865 | ||
| 866 | 869 | state_save_register_global_array(sound_state); |
| 867 | 870 | state_save_register_global(sound_addr); |
| 868 | 871 | state_save_register_global(n7751_command); |
| r2454 | r2455 | |
| 934 | 937 | D3 = /INT line |
| 935 | 938 | */ |
| 936 | 939 | n7751_command = data & 0x07; |
| 937 | cpunum_set_input_line( | |
| 940 | cpunum_set_input_line(machine, 1, 0, ((data & 0x08) == 0) ? ASSERT_LINE : CLEAR_LINE); | |
| 938 | 941 | cpu_boost_interleave(attotime_zero, ATTOTIME_IN_USEC(100)); |
| 939 | 942 | } |
| 940 | 943 |
| r2454 | r2455 | |
|---|---|---|
| 377 | 377 | |
| 378 | 378 | static const struct AY8910interface ad2083_ay8910_interface_1 = |
| 379 | 379 | { |
| 380 | scramble_portB_r | |
| 380 | AY8910_LEGACY_OUTPUT, | |
| 381 | AY8910_DEFAULT_LOADS, | |
| 382 | scramble_portB_r, | |
| 383 | NULL, | |
| 384 | NULL, | |
| 385 | NULL | |
| 381 | 386 | }; |
| 382 | 387 | |
| 383 | 388 | static const struct AY8910interface ad2083_ay8910_interface_2 = |
| 384 | 389 | { |
| 385 | hotshock_soundlatch_r | |
| 390 | AY8910_LEGACY_OUTPUT, | |
| 391 | AY8910_DEFAULT_LOADS, | |
| 392 | hotshock_soundlatch_r, | |
| 393 | NULL, | |
| 394 | NULL, | |
| 395 | NULL | |
| 386 | 396 | }; |
| 387 | 397 | |
| 388 | 398 | static ADDRESS_MAP_START( ad2083_sound_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| r2454 | r2455 | |
|---|---|---|
| 1 | 1 | // system 16 - 7751 emulation, based on monster bash code. |
| 2 | 2 | #include "driver.h" |
| 3 | #include "deprecat.h" | |
| 4 | 3 | #include "cpu/i8039/i8039.h" |
| 5 | 4 | #include "sound/dac.h" |
| 6 | 5 | |
| r2454 | r2455 | |
| 39 | 38 | |
| 40 | 39 | if ((data & 0x0f) != 8) |
| 41 | 40 | { |
| 42 | cpunum_set_input_line( | |
| 41 | cpunum_set_input_line(machine, 2, INPUT_LINE_RESET, PULSE_LINE); | |
| 43 | 42 | timer_set(ATTOTIME_IN_USEC(300), NULL, data, trigger_7751_sound); |
| 44 | 43 | } |
| 45 | 44 | } |
| r2454 | r2455 | |
|---|---|---|
| 9 | 9 | |
| 10 | 10 | #include "driver.h" |
| 11 | 11 | #include "rescap.h" |
| 12 | #include "deprecat.h" | |
| 13 | 12 | #include "cpu/i8085/i8085.h" |
| 14 | 13 | #include "machine/6821pia.h" |
| 15 | 14 | #include "sound/ay8910.h" |
| r2454 | r2455 | |
| 128 | 127 | |
| 129 | 128 | static const struct AY8910interface redalert_ay8910_interface = |
| 130 | 129 | { |
| 131 | soundlatch_r, 0, /* port A/B read */ | |
| 132 | 0, redalert_analog_w /* port A/B write */ | |
| 130 | AY8910_LEGACY_OUTPUT, | |
| 131 | AY8910_DEFAULT_LOADS, | |
| 132 | soundlatch_r, NULL, /* port A/B read */ | |
| 133 | NULL, redalert_analog_w /* port A/B write */ | |
| 133 | 134 | }; |
| 134 | 135 | |
| 135 | 136 | |
| r2454 | r2455 | |
| 312 | 313 | |
| 313 | 314 | static const struct AY8910interface demoneye_ay8910_interface = |
| 314 | 315 | { |
| 315 | soundlatch_r, 0, /* port A/B read */ | |
| 316 | 0, 0 /* port A/B write */ | |
| 316 | AY8910_LEGACY_OUTPUT, | |
| 317 | AY8910_DEFAULT_LOADS, | |
| 318 | soundlatch_r, NULL, /* port A/B read */ | |
| 319 | NULL, NULL /* port A/B write */ | |
| 317 | 320 | }; |
| 318 | 321 | |
| 319 | 322 |
| r2454 | r2455 | |
|---|---|---|
| 8 | 8 | ***************************************************************************/ |
| 9 | 9 | |
| 10 | 10 | #include "driver.h" |
| 11 | #include "deprecat.h" | |
| 12 | 11 | #include "cpu/m6809/m6809.h" |
| 13 | 12 | #include "sound/5220intf.h" |
| 14 | 13 | #include "includes/starwars.h" |
| r2454 | r2455 | |
| 88 | 87 | |
| 89 | 88 | case 5: /* 0x85 - Read Interrupt Flag Register */ |
| 90 | 89 | if (irq_flag) |
| 91 | cpunum_set_input_line( | |
| 90 | cpunum_set_input_line(machine, 1, M6809_IRQ_LINE, CLEAR_LINE); | |
| 92 | 91 | temp = irq_flag; |
| 93 | 92 | irq_flag = 0; /* Clear int flags */ |
| 94 | 93 | return temp; |
| r2454 | r2455 | |
| 186 | 185 | { |
| 187 | 186 | port_A &= 0x7f; /* ready to receive new commands from main */ |
| 188 | 187 | if (PA7_irq) |
| 189 | cpunum_set_input_line( | |
| 188 | cpunum_set_input_line(machine, 1, M6809_IRQ_LINE, CLEAR_LINE); | |
| 190 | 189 | return sound_data; |
| 191 | 190 | } |
| 192 | 191 | |
| r2454 | r2455 | |
| 240 | 239 | port_A &= 0x3f; |
| 241 | 240 | |
| 242 | 241 | /* reset sound CPU here */ |
| 243 | cpunum_set_input_line( | |
| 242 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, PULSE_LINE); | |
| 244 | 243 | } |
| 245 | 244 |
| r2454 | r2455 | |
|---|---|---|
| 430 | 430 | |
| 431 | 431 | static const struct AY8910interface ay8910_interface = |
| 432 | 432 | { |
| 433 | soundlatch_r | |
| 433 | AY8910_LEGACY_OUTPUT, | |
| 434 | AY8910_DEFAULT_LOADS, | |
| 435 | soundlatch_r, | |
| 436 | NULL, | |
| 437 | NULL, | |
| 438 | NULL | |
| 434 | 439 | }; |
| 435 | 440 | |
| 436 | 441 |
| r2454 | r2455 | |
|---|---|---|
| 1417 | 1417 | if (dsio.start_on_next_write && --dsio.start_on_next_write == 0) |
| 1418 | 1418 | { |
| 1419 | 1419 | logerror("Starting DSIO CPU\n"); |
| 1420 | cpunum_set_input_line( | |
| 1420 | cpunum_set_input_line(machine, dcs.cpunum, INPUT_LINE_HALT, CLEAR_LINE); | |
| 1421 | 1421 | } |
| 1422 | 1422 | } |
| 1423 | 1423 | |
| r2454 | r2455 | |
| 1555 | 1555 | if (!dcs.last_input_empty && dcs.input_empty_cb) |
| 1556 | 1556 | (*dcs.input_empty_cb)(dcs.last_input_empty = 1); |
| 1557 | 1557 | SET_INPUT_EMPTY(); |
| 1558 | cpunum_set_input_line( | |
| 1558 | cpunum_set_input_line(machine, dcs.cpunum, ADSP2105_IRQ2, CLEAR_LINE); | |
| 1559 | 1559 | } |
| 1560 | 1560 | |
| 1561 | 1561 | |
| 1562 | 1562 | static READ16_HANDLER( input_latch_r ) |
| 1563 | 1563 | { |
| 1564 | 1564 | if (dcs.auto_ack) |
| 1565 | input_latch_ack_w(machine,0,0,0); | |
| 1565 | input_latch_ack_w(machine,0,0,0xffff); | |
| 1566 | 1566 | if (LOG_DCS_IO) |
| 1567 | 1567 | logerror("%08X:input_latch_r(%04X)\n", activecpu_get_pc(), dcs.input_data); |
| 1568 | 1568 | return dcs.input_data; |
| r2454 | r2455 | |
| 1827 | 1827 | if (data & 0x0200) |
| 1828 | 1828 | { |
| 1829 | 1829 | logerror("%04X:Rebooting DCS due to SYSCONTROL write\n", activecpu_get_pc()); |
| 1830 | cpunum_set_input_line( | |
| 1830 | cpunum_set_input_line(machine, dcs.cpunum, INPUT_LINE_RESET, PULSE_LINE); | |
| 1831 | 1831 | dcs_boot(); |
| 1832 | 1832 | dcs.control_regs[SYSCONTROL_REG] = 0; |
| 1833 | 1833 | } |
| r2454 | r2455 | |
| 2070 | 2070 | timer_set(ATTOTIME_IN_USEC(1), NULL, param, s1_ack_callback2); |
| 2071 | 2071 | return; |
| 2072 | 2072 | } |
| 2073 | output_latch_w(machine, 0, 0x000a, 0); | |
| 2073 | output_latch_w(machine, 0, 0x000a, 0xffff); | |
| 2074 | 2074 | } |
| 2075 | 2075 | |
| 2076 | 2076 | |
| r2454 | r2455 | |
| 2082 | 2082 | timer_set(ATTOTIME_IN_USEC(1), NULL, param, s1_ack_callback1); |
| 2083 | 2083 | return; |
| 2084 | 2084 | } |
| 2085 | output_latch_w(machine, 0, param, 0); | |
| 2085 | output_latch_w(machine, 0, param, 0xffff); | |
| 2086 | 2086 | |
| 2087 | 2087 | /* chain to the next word we need to write back */ |
| 2088 | 2088 | timer_set(ATTOTIME_IN_USEC(1), NULL, 0, s1_ack_callback2); |
| r2454 | r2455 | |
| 2220 | 2220 | timer_set(ATTOTIME_IN_USEC(1), NULL, param, s2_ack_callback); |
| 2221 | 2221 | return; |
| 2222 | 2222 | } |
| 2223 | output_latch_w(machine, 0, param, 0); | |
| 2224 | output_control_w(machine, 0, (dcs.output_control & ~0xff00) | 0x0300, 0); | |
| 2223 | output_latch_w(machine, 0, param, 0xffff); | |
| 2224 | output_control_w(machine, 0, (dcs.output_control & ~0xff00) | 0x0300, 0xffff); | |
| 2225 | 2225 | } |
| 2226 | 2226 | |
| 2227 | 2227 |
| r2454 | r2455 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "deprecat.h" | |
| 11 | 10 | #include "cpu/m6502/m6502.h" |
| 12 | 11 | #include "sound/5220intf.h" |
| 13 | 12 | #include "sound/pokey.h" |
| r2454 | r2455 | |
| 61 | 60 | |
| 62 | 61 | static WRITE8_HANDLER( irq_ack_w ) |
| 63 | 62 | { |
| 64 | cpunum_set_input_line( | |
| 63 | cpunum_set_input_line(machine, 1, M6502_IRQ_LINE, CLEAR_LINE); | |
| 65 | 64 | } |
| 66 | 65 | |
| 67 | 66 | |
| r2454 | r2455 | |
| 74 | 73 | |
| 75 | 74 | WRITE8_HANDLER( jedi_audio_reset_w ) |
| 76 | 75 | { |
| 77 | cpunum_set_input_line( | |
| 76 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE); | |
| 78 | 77 | } |
| 79 | 78 | |
| 80 | 79 |
| r2454 | r2455 | |
|---|---|---|
| 447 | 447 | { |
| 448 | 448 | case 0: /* port A */ |
| 449 | 449 | if (has_mc3417) |
| 450 | cpunum_set_input_line( | |
| 450 | cpunum_set_input_line(machine, 2, INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE); | |
| 451 | 451 | riot_porta_data = (riot_porta_data & ~riot_porta_ddr) | (data & riot_porta_ddr); |
| 452 | 452 | break; |
| 453 | 453 |
| r2454 | r2455 | |
|---|---|---|
| 8 | 8 | ***************************************************************************/ |
| 9 | 9 | |
| 10 | 10 | #include "driver.h" |
| 11 | #include "deprecat.h" | |
| 12 | 11 | |
| 13 | 12 | static UINT8 from_main,from_mcu; |
| 14 | 13 | static int mcu_sent = 0,main_sent = 0; |
| r2454 | r2455 | |
| 56 | 55 | if ((ddrB & 0x02) && (~data & 0x02) && (portB_out & 0x02)) |
| 57 | 56 | { |
| 58 | 57 | portA_in = from_main; |
| 59 | if (main_sent) cpunum_set_input_line( | |
| 58 | if (main_sent) cpunum_set_input_line(machine, 3,0,CLEAR_LINE); | |
| 60 | 59 | main_sent = 0; |
| 61 | 60 | |
| 62 | 61 | } |
| r2454 | r2455 | |
| 103 | 102 | |
| 104 | 103 | from_main = data; |
| 105 | 104 | main_sent = 1; |
| 106 | cpunum_set_input_line( | |
| 105 | cpunum_set_input_line(machine, 3,0,ASSERT_LINE); | |
| 107 | 106 | } |
| 108 | 107 | |
| 109 | 108 | READ8_HANDLER( nycaptor_mcu_r ) |
| r2454 | r2455 | |
|---|---|---|
| 108 | 108 | |
| 109 | 109 | |
| 110 | 110 | const UINT8 lethalth_decryption_table[256] = { |
| 111 | 0x7d,0x26,0x5d,xxxx,0xba,xxxx,0x1e,0x5e, 0xb8,xxxx,0xbc,0xe8,0x01,xxxx,0x4a,0x25, /* 00 */ | |
| 112 | // ???? !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! | |
| 111 | 0x7f,0x26,0x5d,xxxx,0xba,xxxx,0x1e,0x5e, 0xb8,xxxx,0xbc,0xe8,0x01,xxxx,0x4a,0x25, /* 00 */ | |
| 112 | // ssss !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! | |
| 113 | 113 | xxxx,0xbd,xxxx,0x22,0x10,xxxx,0x02,0x57, 0x70,xxxx,0x7e,xxxx,0xe7,0x52,xxxx,0xa9, /* 10 */ |
| 114 | 114 | // !!!! !!!! !!!! ???? !!!! !!!! gggg |
| 115 | 115 | xxxx,xxxx,0xc6,0x06,0xa0,0xfe,0xcf,0x8e, 0x43,0x8f,0x2d,xxxx,0xd4,0x85,0x75,0xa2, /* 20 */ |
| 116 | 116 | // !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! |
| 117 | 0x3d,xxxx,xxxx,0x38,0x78,0x89,0xd1,0x80, 0x3b,0x72,0x07,xxxx,0x42,0x37,0x0a,0x18, /* 30 */ | |
| 118 | // gggg !!!! ???? !!!! !!!! !!!! !!!! !!!! !!!! !!!! | |
| 117 | 0x3d,xxxx,xxxx,0x38,0x7c,0x89,0xd1,0x80, 0x3b,0x72,0x07,xxxx,0x42,0x37,0x0a,0x18, /* 30 */ | |
| 118 | // gggg !!!! ???? !!!! !!!! !!!! !!!! !!!! !!!! ssss !!!! | |
| 119 | 119 | 0x88,0xb4,0x98,0x8b,0xb9,0x9c,0xad,0x0e, 0x2b,xxxx,0xbf,xxxx,0x55,xxxx,0x56,0xb0, /* 40 */ |
| 120 | // !!!! | |
| 120 | // !!!! pppp !!!! !!!! !!!! !!!! gggg !!!! !!!! !!!! !!!! | |
| 121 | 121 | 0x93,0x91,xxxx,0xeb,xxxx,0x50,0x41,0x29, 0x47,xxxx,xxxx,0x60,xxxx,0xab,xxxx,xxxx, /* 50 */ |
| 122 | // | |
| 122 | // pppp !!!! !!!! !!!! !!!! !!!! !!!! !!!! | |
| 123 | 123 | 0xc3,0xe2,0xd0,0xb2,0x11,0x79,xxxx,0x08, xxxx,0xfb,xxxx,0x2c,0x23,xxxx,0x28,0x0d, /* 60 */ |
| 124 | 124 | // !!!! !!!! !!!! !!!! ???? !!!! !!!! |
| 125 | xxxx,xxxx,xxxx,0x83,0x3c,xxxx,0x1b,0x34, 0x5b,xxxx,0x40,xxxx,xxxx,0x04,0xfc,0x30, /* 70 */ | |
| 126 | // !!!! !!!! !!!! !!!! !!!! ???? | |
| 125 | xxxx,xxxx,xxxx,0x83,0x3c,xxxx,0x1b,0x34, 0x5b,xxxx,0x40,xxxx,xxxx,0x04,0xfc,0xcd, /* 70 */ | |
| 126 | // !!!! !!!! !!!! !!!! !!!! ssss | |
| 127 | 127 | 0xb1,0xf3,0x8a,xxxx,xxxx,0x87,xxxx,xxxx, xxxx,xxxx,xxxx,xxxx,0xbe,0x84,0x1f,0xe6, /* 80 */ |
| 128 | 128 | // !!!! !!!! !!!! !!!! !!!! |
| 129 | 129 | 0xff,xxxx,0x12,xxxx,0xb5,0x36,xxxx,0xb3, xxxx,xxxx,xxxx,0xd2,0x4e,xxxx,xxxx,xxxx, /* 90 */ |
| 130 | 130 | // !!!! !!!! !!!! |
| 131 | 0xa5,xxxx,xxxx,0xc7,xxxx,0x27,0x0b,xxxx, 0x20,xxxx,xxxx,xxxx,xxxx,xxxx,0x61,0x7 | |
| 131 | 0xa5,xxxx,xxxx,0xc7,xxxx,0x27,0x0b,xxxx, 0x20,xxxx,xxxx,xxxx,xxxx,xxxx,0x61,0x7d, /* A0 */ | |
| 132 | 132 | // !!!! !!!! !!!! !!!! ???? |
| 133 | 133 | xxxx,xxxx,0x86,0x0f,xxxx,0xb7,xxxx,0x4f, xxxx,xxxx,0xc0,0xfd,xxxx,0x39,xxxx,0x77, /* B0 */ |
| 134 | 134 | // !!!! !!!! !!!! !!!! !!!! |
| r2454 | r2455 | |
| 147 | 147 | "!!!!" -> checked against gussun |
| 148 | 148 | "gggg" -> very probably |
| 149 | 149 | "pppp" -> probably |
| 150 | "ssss" -> sure | |
| 150 | 151 | "????" -> missing |
| 151 | 152 | |
| 152 | ||
| 153 | ||
| 153 | 154 | 1a -> (78,7c,7e) -> |
| 154 | 155 | 34 -> (78,7c,7e) -> 78 |
| 155 | 156 | |
| 156 | 157 | 65 -> (79, |
| 157 | af -> (79,7d | |
| 158 | af -> (79,7d | |
| 158 | 159 | d9 -> (11e07 from 11de6) (70,78 -> to handle a01ce=000-7d0 -> 0x78 |
| 159 | 160 | ed -> (p76,78,7c,7e) -> |
| 160 | 161 | fb -> |
| 161 | 162 | |
| 162 | 163 | probably: |
| 163 | 7f -> 30 (little machine in the game) | |
| 164 | 42 -> 0x98 (083a3) | |
| 165 | 50 -> 0x93 (083a7) | |
| 164 | 166 | c5 -> (18d56 - from 1844f) (71,73,76,79,7a,7d,7e) -> to handle level number (a008d=00-0f) -> 0x76 |
| 165 | 167 | |
| 166 | 168 | very probably: |
| 167 | 169 | 48 -> 0x2b |
| 168 | 170 | e5 -> 0x73 |
| 171 | ||
| 172 | sure: | |
| 173 | 00 -> 0x7f | |
| 174 | 3d -> 0x37 | |
| 175 | 7f -> 0xcd (little machine in the game - 16058) | |
| 176 | ||
| 169 | 177 | */ |
| 170 | 178 | // 0x2c (0xd4) complete guess |
| 171 | 179 | // 0x2d (0x85) complete guess |
| r2454 | r2455 | |
|---|---|---|
| 361 | 361 | #if LOG_AKIKO_CD |
| 362 | 362 | logerror( "Akiko CD IRQ\n" ); |
| 363 | 363 | #endif |
| 364 | amiga_custom_w(Machine, REG_INTREQ, 0x8000 | INTENA_PORTS, 0); | |
| 364 | amiga_custom_w(Machine, REG_INTREQ, 0x8000 | INTENA_PORTS, 0xffff); | |
| 365 | 365 | } |
| 366 | 366 | } |
| 367 | 367 |
| r2454 | r2455 | |
|---|---|---|
| 102 | 102 | |
| 103 | 103 | WRITE8_HANDLER( pc10_GAMERES_w ) |
| 104 | 104 | { |
| 105 | cpunum_set_input_line( | |
| 105 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, ( data & 1 ) ? CLEAR_LINE : ASSERT_LINE ); | |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | WRITE8_HANDLER( pc10_GAMESTOP_w ) |
| 109 | 109 | { |
| 110 | cpunum_set_input_line( | |
| 110 | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, ( data & 1 ) ? CLEAR_LINE : ASSERT_LINE ); | |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | WRITE8_HANDLER( pc10_PPURES_w ) |
| r2454 | r2455 | |
|---|---|---|
| 356 | 356 | |
| 357 | 357 | static WRITE32_HANDLER( decathlt_prot_w ) |
| 358 | 358 | { |
| 359 | decathlt_protregs[offset] = (data& | |
| 359 | decathlt_protregs[offset] = (data& | |
| 360 | 360 | // decathlt_protregs[0] = 0x0c00000/4; |
| 361 | 361 | |
| 362 | 362 | if (offset==0) // seems to set a (scrambled?) source address |
| r2454 | r2455 | |
| 370 | 370 | |
| 371 | 371 | if (offset==1) // uploads 2 tables... |
| 372 | 372 | { |
| 373 | if (mem_mask==0x | |
| 373 | if (mem_mask==0x | |
| 374 | 374 | { |
| 375 | 375 | if (data == 0x80000000) |
| 376 | 376 | { |
| r2454 | r2455 | |
| 393 | 393 | |
| 394 | 394 | // mame_printf_info("ARGH! %08x %08x\n",mem_mask,data); |
| 395 | 395 | } |
| 396 | else if (mem_mask==0x | |
| 396 | else if (mem_mask==0x | |
| 397 | 397 | { |
| 398 | 398 | if (decathlt_prot_uploadmode==1) |
| 399 | 399 | { |
| r2454 | r2455 | |
|---|---|---|
| 158 | 158 | else if (!state && asic65_reset_state) |
| 159 | 159 | { |
| 160 | 160 | if (asic65_command != -1) |
| 161 | asic65_data_w(Machine, 1, asic65_command, 0); | |
| 161 | asic65_data_w(Machine, 1, asic65_command, 0xffff); | |
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | /* update the state */ |
| r2454 | r2455 | |
| 480 | 480 | static READ16_HANDLER( asic65_68k_r ) |
| 481 | 481 | { |
| 482 | 482 | asic65_tfull = 0; |
| 483 | cpunum_set_input_line( | |
| 483 | cpunum_set_input_line(machine, asic65_cpunum, 0, CLEAR_LINE); | |
| 484 | 484 | return asic65_tdata; |
| 485 | 485 | } |
| 486 | 486 |
| r2454 | r2455 | |
|---|---|---|
| 8 | 8 | ***************************************************************************/ |
| 9 | 9 | |
| 10 | 10 | #include "driver.h" |
| 11 | #include "deprecat.h" | |
| 12 | 11 | #include "cpu/z80/z80.h" |
| 13 | 12 | #include "includes/docastle.h" |
| 14 | 13 | |
| r2454 | r2455 | |
| 57 | 56 | |
| 58 | 57 | if (offset == 8) |
| 59 | 58 | /* awake the master CPU */ |
| 60 | cpu_trigger( | |
| 59 | cpu_trigger(machine, 500); | |
| 61 | 60 | } |
| 62 | 61 | |
| 63 | 62 | |
| r2454 | r2455 | |
| 79 | 78 | |
| 80 | 79 | WRITE8_HANDLER( docastle_nmitrigger_w ) |
| 81 | 80 | { |
| 82 | cpunum_set_input_line( | |
| 81 | cpunum_set_input_line(machine, 1,INPUT_LINE_NMI,PULSE_LINE); | |
| 83 | 82 | } |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | **************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "cpu/tms34010/tms34010.h" |
| 10 | 9 | #include "cpu/m6809/m6809.h" |
| 11 | 10 | #include "machine/6821pia.h" |
| r2454 | r2455 | |
| 580 | 579 | |
| 581 | 580 | case SOUND_YAWDIM: |
| 582 | 581 | soundlatch_w(machine, 0, data); |
| 583 | cpunum_set_input_line( | |
| 582 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, PULSE_LINE); | |
| 584 | 583 | break; |
| 585 | 584 | } |
| 586 | 585 | } |
| r2454 | r2455 | |
|---|---|---|
| 8 | 8 | ***************************************************************************/ |
| 9 | 9 | |
| 10 | 10 | #include "driver.h" |
| 11 | #include "deprecat.h" | |
| 12 | 11 | |
| 13 | 12 | extern UINT8 *onna34ro_workram; |
| 14 | 13 | extern UINT8 *victnine_workram; |
| r2454 | r2455 | |
| 71 | 70 | if ((ddrB & 0x02) && (~data & 0x02) && (portB_out & 0x02)) |
| 72 | 71 | { |
| 73 | 72 | portA_in = from_main; |
| 74 | if (main_sent) cpunum_set_input_line( | |
| 73 | if (main_sent) cpunum_set_input_line(machine, 2,0,CLEAR_LINE); | |
| 75 | 74 | main_sent = 0; |
| 76 | 75 | logerror("read command %02x from main cpu\n",portA_in); |
| 77 | 76 | } |
| r2454 | r2455 | |
| 118 | 117 | logerror("%04x: mcu_w %02x\n",activecpu_get_pc(),data); |
| 119 | 118 | from_main = data; |
| 120 | 119 | main_sent = 1; |
| 121 | cpunum_set_input_line( | |
| 120 | cpunum_set_input_line(machine, 2,0,ASSERT_LINE); | |
| 122 | 121 | } |
| 123 | 122 | |
| 124 | 123 | READ8_HANDLER( flstory_mcu_r ) |
| r2454 | r2455 | |
|---|---|---|
| 124 | 124 | { |
| 125 | 125 | UINT16 level; |
| 126 | 126 | //Perform write |
| 127 | system32_workram[CLEARED_LEVELS / 2] = (data & | |
| 127 | system32_workram[CLEARED_LEVELS / 2] = (data & | |
| 128 | 128 | |
| 129 | 129 | //Refresh current level |
| 130 | 130 | if (system32_workram[CLEARED_LEVELS / 2] == 0) |
| r2454 | r2455 | |
| 155 | 155 | // and can write things into work RAM. we simulate that here for burning rival. |
| 156 | 156 | READ16_HANDLER(brival_protection_r) |
| 157 | 157 | { |
| 158 | if ( | |
| 158 | if ( | |
| 159 | 159 | { |
| 160 | 160 | switch (offset) |
| 161 | 161 | { |
| r2454 | r2455 | |
| 244 | 244 | WRITE16_HANDLER( darkedge_protection_w ) |
| 245 | 245 | { |
| 246 | 246 | logerror("%06x:darkedge_prot_w(%06X) = %04X & %04X\n", |
| 247 | activecpu_get_pc(), 0xa00000 + 2*offset, data, mem_mask | |
| 247 | activecpu_get_pc(), 0xa00000 + 2*offset, data, mem_mask | |
| 248 | 248 | } |
| 249 | 249 | |
| 250 | 250 | |
| 251 | 251 | READ16_HANDLER( darkedge_protection_r ) |
| 252 | 252 | { |
| 253 | 253 | logerror("%06x:darkedge_prot_r(%06X) & %04X\n", |
| 254 | activecpu_get_pc(), 0xa00000 + 2*offset, mem_mask | |
| 254 | activecpu_get_pc(), 0xa00000 + 2*offset, mem_mask | |
| 255 | 255 | return 0xffff; |
| 256 | 256 | } |
| 257 | 257 |
| r2454 | r2455 | |
|---|---|---|
| 8 | 8 | ***************************************************************************/ |
| 9 | 9 | |
| 10 | 10 | #include "driver.h" |
| 11 | #include "deprecat.h" | |
| 12 | 11 | |
| 13 | 12 | |
| 14 | 13 | UINT8 *slapfight_dpram; |
| r2454 | r2455 | |
| 64 | 63 | /* Reset and hold sound CPU */ |
| 65 | 64 | WRITE8_HANDLER( slapfight_port_00_w ) |
| 66 | 65 | { |
| 67 | cpunum_set_input_line( | |
| 66 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, ASSERT_LINE); | |
| 68 | 67 | getstar_sh_intenabled = 0; |
| 69 | 68 | } |
| 70 | 69 | |
| 71 | 70 | /* Release reset on sound CPU */ |
| 72 | 71 | WRITE8_HANDLER( slapfight_port_01_w ) |
| 73 | 72 | { |
| 74 | cpunum_set_input_line( | |
| 73 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, CLEAR_LINE); | |
| 75 | 74 | } |
| 76 | 75 | |
| 77 | 76 | /* Disable and clear hardware interrupt */ |
| r2454 | r2455 | |
| 192 | 191 | if ((ddrB & 0x02) && (~data & 0x02) && (portB_out & 0x02)) |
| 193 | 192 | { |
| 194 | 193 | portA_in = from_main; |
| 195 | if (main_sent) cpunum_set_input_line( | |
| 194 | if (main_sent) cpunum_set_input_line(machine, 2,0,CLEAR_LINE); | |
| 196 | 195 | main_sent = 0; |
| 197 | 196 | } |
| 198 | 197 | if ((ddrB & 0x04) && (data & 0x04) && (~portB_out & 0x04)) |
| r2454 | r2455 | |
| 233 | 232 | from_main = data; |
| 234 | 233 | main_sent = 1; |
| 235 | 234 | mcu_sent=0; |
| 236 | cpunum_set_input_line( | |
| 235 | cpunum_set_input_line(machine, 2,0,ASSERT_LINE); | |
| 237 | 236 | } |
| 238 | 237 | |
| 239 | 238 | READ8_HANDLER( tigerh_mcu_r ) |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "video/avgdvg.h" |
| 10 | 9 | #include "sound/5220intf.h" |
| 11 | 10 | #include "cpu/m6502/m6502.h" |
| r2454 | r2455 | |
| 62 | 61 | WRITE8_HANDLER( mhavoc_alpha_irq_ack_w ) |
| 63 | 62 | { |
| 64 | 63 | /* clear the line and reset the clock */ |
| 65 | cpunum_set_input_line( | |
| 64 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 66 | 65 | alpha_irq_clock = 0; |
| 67 | 66 | alpha_irq_clock_enable = 1; |
| 68 | 67 | } |
| r2454 | r2455 | |
| 71 | 70 | WRITE8_HANDLER( mhavoc_gamma_irq_ack_w ) |
| 72 | 71 | { |
| 73 | 72 | /* clear the line and reset the clock */ |
| 74 | cpunum_set_input_line( | |
| 73 | cpunum_set_input_line(machine, 1, 0, CLEAR_LINE); | |
| 75 | 74 | gamma_irq_clock = 0; |
| 76 | 75 | } |
| 77 | 76 | |
| r2454 | r2455 | |
| 320 | 319 | player_1 = (data >> 5) & 1; |
| 321 | 320 | |
| 322 | 321 | /* Bit 3 = Gamma reset */ |
| 323 | cpunum_set_input_line( | |
| 322 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, (data & 0x08) ? CLEAR_LINE : ASSERT_LINE); | |
| 324 | 323 | if (!(data & 0x08)) |
| 325 | 324 | { |
| 326 | 325 | logerror("\t\t\t\t*** resetting gamma processor. ***\n"); |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ***********************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "cpu/m6502/m6502.h" |
| 10 | 9 | #include "cpu/i8x41/i8x41.h" |
| 11 | 10 | #include "machine/decocass.h" |
| r2454 | r2455 | |
| 136 | 135 | { |
| 137 | 136 | UINT8 data = soundlatch_r(machine, 0); |
| 138 | 137 | LOG(4,("CPU #%d sound command <- $%02x\n", cpu_getactivecpu(), data)); |
| 139 | cpunum_set_input_line( | |
| 138 | cpunum_set_input_line(machine, 1, M6502_IRQ_LINE, CLEAR_LINE); | |
| 140 | 139 | decocass_sound_ack &= ~0x80; |
| 141 | 140 | return data; |
| 142 | 141 | } |
| r2454 | r2455 | |
| 182 | 181 | WRITE8_HANDLER( decocass_quadrature_decoder_reset_w ) |
| 183 | 182 | { |
| 184 | 183 | /* just latch the analog controls here */ |
| 185 | decocass_quadrature_decoder[0] = input_port_3_r(machine, 0); | |
| 186 | decocass_quadrature_decoder[1] = input_port_4_r(machine, 0); | |
| 187 | decocass_quadrature_decoder[2] = input_port_5_r(machine, 0); | |
| 188 | decocass_quadrature_decoder[3] = input_port_6_r(machine, 0); | |
| 184 | decocass_quadrature_decoder[0] = input_port_read_indexed(machine,3); | |
| 185 | decocass_quadrature_decoder[1] = input_port_read_indexed(machine,4); | |
| 186 | decocass_quadrature_decoder[2] = input_port_read_indexed(machine,5); | |
| 187 | decocass_quadrature_decoder[3] = input_port_read_indexed(machine,6); | |
| 189 | 188 | } |
| 190 | 189 | |
| 191 | 190 | WRITE8_HANDLER( decocass_adc_w ) |
| r2454 | r2455 | |
| 282 | 281 | decocass_reset = data; |
| 283 | 282 | |
| 284 | 283 | /* CPU #1 active hight reset */ |
| 285 | cpunum_set_input_line( | |
| 284 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, data & 0x01 ); | |
| 286 | 285 | |
| 287 | 286 | /* on reset also remove the sound timer */ |
| 288 | 287 | if (data & 1) |
| 289 | 288 | timer_adjust_oneshot(decocass_sound_timer, attotime_never, 0); |
| 290 | 289 | |
| 291 | 290 | /* 8041 active low reset */ |
| 292 | cpunum_set_input_line( | |
| 291 | cpunum_set_input_line(machine, 2, INPUT_LINE_RESET, (data & 0x08) ^ 0x08 ); | |
| 293 | 292 | } |
| 294 | 293 | |
| 295 | 294 | static const char *dirnm(int speed) |
| r2454 | r2455 | |
|---|---|---|
| 159 | 159 | if (data == 0) { |
| 160 | 160 | if (dsp_execute) { |
| 161 | 161 | LOG(("Turning the main CPU on\n")); |
| 162 | cpunum_set_input_line( | |
| 162 | cpunum_set_input_line(machine, 0, INPUT_LINE_HALT, CLEAR_LINE); | |
| 163 | 163 | dsp_execute = 0; |
| 164 | 164 | } |
| 165 | 165 | twincobr_dsp_BIO = ASSERT_LINE; |
| r2454 | r2455 | |
|---|---|---|
| 147 | 147 | pci_bridge_enable[cgboard_id] = (data & 0x20000000) ? 1 : 0; |
| 148 | 148 | |
| 149 | 149 | if (data & 0x10000000) |
| 150 | cpunum_set_input_line( | |
| 150 | cpunum_set_input_line(machine, dsp, INPUT_LINE_RESET, CLEAR_LINE); | |
| 151 | 151 | else |
| 152 | cpunum_set_input_line( | |
| 152 | cpunum_set_input_line(machine, dsp, INPUT_LINE_RESET, ASSERT_LINE); | |
| 153 | 153 | |
| 154 | 154 | if (data & 0x02000000) |
| 155 | cpunum_set_input_line( | |
| 155 | cpunum_set_input_line(machine, dsp, INPUT_LINE_IRQ0, ASSERT_LINE); | |
| 156 | 156 | |
| 157 | 157 | if (data & 0x04000000) |
| 158 | cpunum_set_input_line( | |
| 158 | cpunum_set_input_line(machine, dsp, INPUT_LINE_IRQ1, ASSERT_LINE); | |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | if (ACCESSING_BITS_0_7) |
| r2454 | r2455 | |
| 184 | 184 | { |
| 185 | 185 | if (cgboard_id < MAX_CG_BOARDS) |
| 186 | 186 | { |
| 187 | cpu_trigger( | |
| 187 | cpu_trigger(machine, 10000); // Remove the timeout (a part of the GTI Club FIFO test workaround) | |
| 188 | 188 | COMBINE_DATA(dsp_shared_ram[cgboard_id] + (offset + (dsp_shared_ram_bank[cgboard_id] * DSP_BANK_SIZE_WORD))); |
| 189 | 189 | } |
| 190 | 190 | } |
| r2454 | r2455 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "deprecat.h" | |
| 11 | 10 | #include "machine/eeprom.h" |
| 12 | 11 | #include "cpu/z80/z80.h" |
| 13 | 12 | #include "leland.h" |
| r2454 | r2455 | |
|---|---|---|
| 853 | 853 | { |
| 854 | 854 | UINT32 result = 0; |
| 855 | 855 | if (ACCESSING_BITS_0_15) |
| 856 | result |= midway_ioasic_r(machine, offset*2, 0x | |
| 856 | result |= midway_ioasic_r(machine, offset*2, 0x | |
| 857 | 857 | if (ACCESSING_BITS_16_31) |
| 858 | result |= (midway_ioasic_r(machine, offset*2+1, 0x | |
| 858 | result |= (midway_ioasic_r(machine, offset*2+1, 0x | |
| 859 | 859 | return result; |
| 860 | 860 | } |
| 861 | 861 | |
| r2454 | r2455 | |
| 949 | 949 | WRITE32_HANDLER( midway_ioasic_packed_w ) |
| 950 | 950 | { |
| 951 | 951 | if (ACCESSING_BITS_0_15) |
| 952 | midway_ioasic_w(machine, offset*2, data & 0xffff, 0x | |
| 952 | midway_ioasic_w(machine, offset*2, data & 0xffff, 0x | |
| 953 | 953 | if (ACCESSING_BITS_16_31) |
| 954 | midway_ioasic_w(machine, offset*2+1, data >> 16, 0x | |
| 954 | midway_ioasic_w(machine, offset*2+1, data >> 16, 0x | |
| 955 | 955 | } |
| 956 | 956 | |
| 957 | 957 | |
| r2454 | r2455 | |
| 1075 | 1075 | |
| 1076 | 1076 | /* offset 0 is a special case */ |
| 1077 | 1077 | if (offset == 0) |
| 1078 | result = ide_controller32_r(device, ideoffs, 0x | |
| 1078 | result = ide_controller32_r(device, ideoffs, 0x | |
| 1079 | 1079 | |
| 1080 | 1080 | /* everything else is byte-sized */ |
| 1081 | 1081 | else |
| 1082 | result = ide_controller32_r(device, ideoffs, | |
| 1082 | result = ide_controller32_r(device, ideoffs, | |
| 1083 | 1083 | return result; |
| 1084 | 1084 | } |
| 1085 | 1085 | |
| r2454 | r2455 | |
| 1092 | 1092 | |
| 1093 | 1093 | /* offset 0 is a special case */ |
| 1094 | 1094 | if (offset == 0) |
| 1095 | ide_controller32_w(device, ideoffs, data, 0x | |
| 1095 | ide_controller32_w(device, ideoffs, data, 0x | |
| 1096 | 1096 | |
| 1097 | 1097 | /* everything else is byte-sized */ |
| 1098 | 1098 | else |
| 1099 | ide_controller32_w(device, ideoffs, data << shift, | |
| 1099 | ide_controller32_w(device, ideoffs, data << shift, | |
| 1100 | 1100 | } |
| r2454 | r2455 | |
|---|---|---|
| 536 | 536 | |
| 537 | 537 | // cull off-screen objects |
| 538 | 538 | if (dst_x > dst_maxx || dst_y > dst_maxy) return; |
| 539 | if ((nozoom = (scalex == 0x10000 && scaley == 0x10000))) | |
| 539 | nozoom = (scalex == 0x10000 && scaley == 0x10000); | |
| 540 | if (nozoom) | |
| 540 | 541 | { |
| 541 | 542 | dst_h = dst_w = 16; |
| 542 | 543 | src_fdy = src_fdx = 1; |
| r2454 | r2455 | |
| 1246 | 1247 | |
| 1247 | 1248 | |
| 1248 | 1249 | // abort if object database failed to initialize |
| 1249 | if (!(objpool = gx_objpool)) return; | |
| 1250 | objpool = gx_objpool; | |
| 1251 | if (!objpool) return; | |
| 1250 | 1252 | |
| 1251 | 1253 | // clear screen with backcolor and update flicker pulse |
| 1252 | 1254 | K054338_fill_backcolor(machine, bitmap, konamigx_wrport1_0 & 0x20); |
| 1253 | 1255 | parity ^= 1; |
| 1254 | 1256 | |
| 1255 | 1257 | // abort if video has been disabled |
| 1256 | if (!(disp = K055555_read_register(K55_INPUT_ENABLES))) return; | |
| 1258 | disp = K055555_read_register(K55_INPUT_ENABLES); | |
| 1259 | if (!disp) return; | |
| 1257 | 1260 | cltc_shdpri = K054338_read_register(K338_REG_CONTROL); |
| 1258 | 1261 | if (!(cltc_shdpri & K338_CTL_KILL)) return; |
| 1259 | 1262 | |
| r2454 | r2455 | |
| 1437 | 1440 | } |
| 1438 | 1441 | else |
| 1439 | 1442 | { |
| 1440 | if ((shadow = k>>10 & 3)) // object has shadow? | |
| 1443 | shadow = k>>10 & 3; | |
| 1444 | if (shadow) // object has shadow? | |
| 1441 | 1445 | { |
| 1442 | 1446 | if (shadow != 1 || K053246_objset1 & 0x20) |
| 1443 | 1447 | { |
| r2454 | r2455 | |
| 1670 | 1674 | alpha = 255; |
| 1671 | 1675 | if (drawmode & 2) |
| 1672 | 1676 | { |
| 1673 | if ((alpha = color>>K055555_MIXSHIFT & 3)) alpha = K054338_set_alpha_level(alpha); | |
| 1677 | alpha = color>>K055555_MIXSHIFT & 3; | |
| 1678 | if (alpha) alpha = K054338_set_alpha_level(alpha); | |
| 1674 | 1679 | if (alpha <= 0) continue; |
| 1675 | 1680 | } |
| 1676 | 1681 | color &= K055555_COLORMASK; |
| r2454 | r2455 | |
| 2219 | 2224 | srcend = src + count * 0x30; |
| 2220 | 2225 | do |
| 2221 | 2226 | { |
| 2222 | if (!src[0] || !(i = src[7] & 0xf)) continue; // reject retired or zero-element groups | |
| 2227 | if (!src[0]) continue; | |
| 2228 | i = src[7] & 0xf; | |
| 2229 | if (!i) continue; // reject retired or zero-element groups | |
| 2223 | 2230 | i <<= 2; |
| 2224 | 2231 | hoffs = src[5]>>16; |
| 2225 | 2232 | voffs = src[6]>>16; |
| r2454 | r2455 | |
|---|---|---|
| 160 | 160 | { |
| 161 | 161 | /* Bit 0x80 is secondary CPU (HD647180) ready signal */ |
| 162 | 162 | logerror("PC:%04x Warning !!! IO reading from $14000a\n",activecpu_get_previouspc()); |
| 163 | return (0x80 | input_port_ | |
| 163 | return (0x80 | input_port_ | |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | READ16_HANDLER( vimana_input_port_5_word_r ) |
| 167 | 167 | { |
| 168 | 168 | int data, p; |
| 169 | 169 | |
| 170 | p = input_port_ | |
| 170 | p = input_port_ | |
| 171 | 171 | vimana_latch ^= p; |
| 172 | 172 | data = (vimana_latch & p ); |
| 173 | 173 |
| r2454 | r2455 | |
|---|---|---|
| 1351 | 1351 | |
| 1352 | 1352 | case 0x98000: |
| 1353 | 1353 | case 0x18000: |
| 1354 | if (mem_mask == 0) | |
| 1354 | if (mem_mask == 0xffffffff) | |
| 1355 | 1355 | { |
| 1356 | 1356 | rv = cd_readLong(offset); |
| 1357 | 1357 | } |
| 1358 | else if (mem_mask == 0x | |
| 1358 | else if (mem_mask == 0x | |
| 1359 | 1359 | { |
| 1360 | 1360 | rv = cd_readWord(offset)<<16; |
| 1361 | 1361 | } |
| 1362 | else if (mem_mask == 0x | |
| 1362 | else if (mem_mask == 0x | |
| 1363 | 1363 | { |
| 1364 | 1364 | rv = cd_readWord(offset); |
| 1365 | 1365 | } |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "debugger.h" |
| 10 | 9 | #include "dc.h" |
| 11 | 10 | #include "cpu/sh4/sh4.h" |
| r2454 | r2455 | |
| 142 | 141 | *shift = 0; |
| 143 | 142 | |
| 144 | 143 | // non 32-bit accesses have not yet been seen here, we need to know when they are |
| 145 | if ((mem_mask != U64(0x | |
| 144 | if ((mem_mask != U64(0x | |
| 146 | 145 | { |
| 147 | 146 | mame_printf_verbose("Wrong mask! (PC=%x)\n", activecpu_get_pc()); |
| 148 | 147 | #ifdef ENABLE_DEBUGGER |
| r2454 | r2455 | |
| 150 | 149 | #endif |
| 151 | 150 | } |
| 152 | 151 | |
| 153 | if (mem_mask == U64(0x | |
| 152 | if (mem_mask == U64(0x | |
| 154 | 153 | { |
| 155 | 154 | reg++; |
| 156 | 155 | *shift = 32; |
| r2454 | r2455 | |
| 633 | 632 | { |
| 634 | 633 | UINT32 off; |
| 635 | 634 | |
| 636 | if ((int)mem_mask & 1) | |
| 635 | if ((int)~mem_mask & 1) | |
| 637 | 636 | { |
| 638 | 637 | off=(offset << 1) | 1; |
| 639 | 638 | } |
| r2454 | r2455 | |
| 654 | 653 | { |
| 655 | 654 | UINT32 dat,off; |
| 656 | 655 | |
| 657 | if ((int)mem_mask & 1) | |
| 656 | if ((int)~mem_mask & 1) | |
| 658 | 657 | { |
| 659 | 658 | dat=(UINT32)(data >> 32); |
| 660 | 659 | off=(offset << 1) | 1; |
| r2454 | r2455 | |
| 748 | 747 | |
| 749 | 748 | // from ElSemi: this makes Atomiswave do it's "verbose boot" with a Sammy logo and diagnostics instead of just running the cart. |
| 750 | 749 | // our PVR emulation is apparently not good enough for that to work yet though. |
| 751 | if ((reg == 0x280/4) && (mem_mask == U64(0x | |
| 750 | if ((reg == 0x280/4) && (mem_mask == U64(0x | |
| 752 | 751 | { |
| 753 | 752 | return 1; |
| 754 | 753 | } |
| r2454 | r2455 | |
| 850 | 849 | |
| 851 | 850 | // mame_printf_verbose("AICA REG: [%08x] read %llx, mask %llx\n", 0x700000+reg*4, (UINT64)offset, mem_mask); |
| 852 | 851 | |
| 853 | return (UINT64) AICA_0_r(machine, offset*2, 0x | |
| 852 | return (UINT64) AICA_0_r(machine, offset*2, 0xffff)<<shift; | |
| 854 | 853 | } |
| 855 | 854 | |
| 856 | 855 | WRITE64_HANDLER( dc_aica_reg_w ) |
| r2454 | r2455 | |
| 867 | 866 | if (dat & 1) |
| 868 | 867 | { |
| 869 | 868 | /* halt the ARM7 */ |
| 870 | cpunum_set_input_line( | |
| 869 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, ASSERT_LINE); | |
| 871 | 870 | } |
| 872 | 871 | else |
| 873 | 872 | { |
| 874 | 873 | /* it's alive ! */ |
| 875 | cpunum_set_input_line( | |
| 874 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, CLEAR_LINE); | |
| 876 | 875 | } |
| 877 | 876 | } |
| 878 | 877 | |
| r2454 | r2455 | |
| 883 | 882 | |
| 884 | 883 | READ32_HANDLER( dc_arm_aica_r ) |
| 885 | 884 | { |
| 886 | return AICA_0_r(machine, offset*2, 0x | |
| 885 | return AICA_0_r(machine, offset*2, 0xffff); | |
| 887 | 886 | } |
| 888 | 887 | |
| 889 | 888 | WRITE32_HANDLER( dc_arm_aica_w ) |
| r2454 | r2455 | |
|---|---|---|
| 64 | 64 | MACHINE_RESET_CALL(galaxold); |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | static READ8_HANDLER( scrambls_input_port_2_r ) | |
| 68 | { | |
| 69 | static const UINT8 mask[] = { 0x20, 0x20, 0x80, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0 }; | |
| 70 | 67 | |
| 71 | UINT8 res; | |
| 72 | ||
| 73 | res = input_port_read_indexed(machine, 2); | |
| 74 | ||
| 75 | /*logerror("%04x: read IN2\n",activecpu_get_pc());*/ | |
| 76 | ||
| 77 | /* | |
| 78 | p_security_2B : process(security_count) | |
| 79 | begin | |
| 80 | -- I am not sure what this chip does yet, but this gets us past the initial check for now. | |
| 81 | case security_count is | |
| 82 | when "000" => net_1e10_i <= '0'; net_1e12_i <= '1'; | |
| 83 | when "001" => net_1e10_i <= '0'; net_1e12_i <= '1'; | |
| 84 | when "010" => net_1e10_i <= '1'; net_1e12_i <= '0'; | |
| 85 | when "011" => net_1e10_i <= '1'; net_1e12_i <= '1'; | |
| 86 | when "100" => net_1e10_i <= '1'; net_1e12_i <= '1'; | |
| 87 | when "101" => net_1e10_i <= '1'; net_1e12_i <= '1'; | |
| 88 | when "110" => net_1e10_i <= '1'; net_1e12_i <= '1'; | |
| 89 | when "111" => net_1e10_i <= '1'; net_1e12_i <= '1'; | |
| 90 | when others => null; | |
| 91 | end case; | |
| 92 | end process; | |
| 93 | */ | |
| 94 | res = (res & ~((1<<7)|(1<<5))) | mask[security_2B_counter]; | |
| 95 | security_2B_counter = (security_2B_counter + 1) & 0x07; | |
| 96 | ||
| 97 | return res; | |
| 98 | } | |
| 99 | ||
| 100 | 68 | static READ8_HANDLER( ckongs_input_port_1_r ) |
| 101 | 69 | { |
| 102 | 70 | return (input_port_read_indexed(machine, 1) & 0xfc) | ((input_port_read_indexed(machine, 2) & 0x06) >> 1); |
| r2454 | r2455 | |
| 182 | 150 | } |
| 183 | 151 | } |
| 184 | 152 | |
| 185 | static READ8_HANDLER( scrambls_protection_r ) | |
| 186 | { | |
| 187 | /*logerror("%04x: read protection\n",activecpu_get_pc());*/ | |
| 188 | 153 | |
| 189 | /* | |
| 190 | p_security_6J : process(xb) | |
| 191 | begin | |
| 192 | -- chip K10A PAL16L8 | |
| 193 | -- equations from Mark @ http://www.leopardcats.com/ | |
| 194 | xbo(3 downto 0) <= xb(3 downto 0); | |
| 195 | xbo(4) <= not(xb(0) or xb(1) or xb(2) or xb(3)); | |
| 196 | xbo(5) <= not((not xb(2) and not xb(0)) or (not xb(2) and not xb(1)) or (not xb(3) and not xb(0)) or (not xb(3) and not xb(1))); | |
| 197 | ||
| 198 | xbo(6) <= not(not xb(0) and not xb(3)); | |
| 199 | xbo(7) <= not((not xb(1)) or xb(2)); | |
| 200 | end process; | |
| 201 | */ | |
| 202 | UINT8 xbo = xb & 0x0f; | |
| 203 | ||
| 204 | xbo |= ( ~(xb | (xb>>1) | (xb>>2) | (xb>>3)) & 0x01) << 4; | |
| 205 | xbo |= ( ~( (~(xb>>2)&~xb) | (~(xb>>2)&~(xb>>1)) | (~(xb>>3)&~xb) | (~(xb>>3)&~(xb>>1)) ) & 0x01) << 5; | |
| 206 | xbo |= ( ~(~xb&~(xb>>3)) & 0x01) << 6; | |
| 207 | xbo |= ( ~(~(xb>>1)|(xb>>2)) & 0x01) << 7; | |
| 208 | ||
| 209 | return (xbo); | |
| 210 | } | |
| 211 | ||
| 212 | ||
| 213 | static WRITE8_HANDLER( theend_coin_counter_w ) | |
| 214 | { | |
| 215 | coin_counter_w(0, data & 0x80); | |
| 216 | } | |
| 217 | ||
| 218 | ||
| 219 | 154 | static READ8_HANDLER( mariner_protection_1_r ) |
| 220 | 155 | { |
| 221 | 156 | return 7; |
| r2454 | r2455 | |
| 259 | 194 | cavelon_banksw(); |
| 260 | 195 | |
| 261 | 196 | if ((offset >= 0x0100) && (offset <= 0x0103)) |
| 262 | return ppi8255_ | |
| 197 | return ppi8255_ | |
| 263 | 198 | else if ((offset >= 0x0200) && (offset <= 0x0203)) |
| 264 | return ppi8255_ | |
| 199 | return ppi8255_ | |
| 265 | 200 | |
| 266 | 201 | return 0xff; |
| 267 | 202 | } |
| r2454 | r2455 | |
| 271 | 206 | cavelon_banksw(); |
| 272 | 207 | |
| 273 | 208 | if ((offset >= 0x0100) && (offset <= 0x0103)) |
| 274 | ppi8255_ | |
| 209 | ppi8255_ | |
| 275 | 210 | else if ((offset >= 0x0200) && (offset <= 0x0203)) |
| 276 | ppi8255_ | |
| 211 | ppi8255_ | |
| 277 | 212 | } |
| 278 | 213 | |
| 279 | 214 | |
| r2454 | r2455 | |
| 288 | 223 | } |
| 289 | 224 | |
| 290 | 225 | |
| 291 | ||
| 226 | ||
| 292 | 227 | { |
| 293 | 2, /* 2 chips */ | |
| 294 | {input_port_0_r, 0}, /* Port A read */ | |
| 295 | {input_port_1_r, 0}, /* Port B read */ | |
| 296 | {input_port_2_r, 0}, /* Port C read */ | |
| 297 | {0, soundlatch_w}, /* Port A write */ | |
| 298 | {0, scramble_sh_irqtrigger_w}, /* Port B write */ | |
| 299 | {0, 0}, /* Port C write */ | |
| 228 | { | |
| 229 | input_port_0_r, /* Port A read */ | |
| 230 | input_port_1_r, /* Port B read */ | |
| 231 | input_port_2_r, /* Port C read */ | |
| 232 | NULL, /* Port A write */ | |
| 233 | NULL, /* Port B write */ | |
| 234 | NULL /* Port C write */ | |
| 235 | }, | |
| 236 | { | |
| 237 | NULL, /* Port A read */ | |
| 238 | NULL, /* Port B read */ | |
| 239 | NULL, /* Port C read */ | |
| 240 | soundlatch_w, /* Port A write */ | |
| 241 | scramble_sh_irqtrigger_w, /* Port B write */ | |
| 242 | NULL /* Port C write */ | |
| 243 | } | |
| 300 | 244 | }; |
| 301 | 245 | |
| 302 | /* extra chip for sample latch */ | |
| 303 | static const ppi8255_interface sfx_ppi8255_intf = | |
| 246 | ||
| 247 | const ppi8255_interface stratgyx_ppi8255_intf[2] = | |
| 304 | 248 | { |
| 305 | 3, /* 3 chips */ | |
| 306 | {input_port_0_r, 0, soundlatch2_r}, /* Port A read */ | |
| 307 | {input_port_1_r, 0, 0}, /* Port B read */ | |
| 308 | {input_port_2_r, 0, 0}, /* Port C read */ | |
| 309 | {0, soundlatch_w, 0}, /* Port A write */ | |
| 310 | {0, scramble_sh_irqtrigger_w, 0}, /* Port B write */ | |
| 311 | {0, 0, 0}, /* Port C write */ | |
| 249 | { | |
| 250 | input_port_0_r, /* Port A read */ | |
| 251 | input_port_1_r, /* Port B read */ | |
| 252 | stratgyx_input_port_2_r, /* Port C read */ | |
| 253 | NULL, /* Port A write */ | |
| 254 | NULL, /* Port B write */ | |
| 255 | NULL /* Port C write */ | |
| 256 | }, | |
| 257 | { | |
| 258 | NULL, /* Port A read */ | |
| 259 | NULL, /* Port B read */ | |
| 260 | stratgyx_input_port_3_r, /* Port C read */ | |
| 261 | soundlatch_w, /* Port A write */ | |
| 262 | scramble_sh_irqtrigger_w, /* Port B write */ | |
| 263 | NULL /* Port C write */ | |
| 264 | } | |
| 312 | 265 | }; |
| 313 | 266 | |
| 314 | /* extra chip for sample latch */ | |
| 315 | static const ppi8255_interface monsterz_ppi8255_intf = | |
| 267 | ||
| 268 | const ppi8255_interface moonwar_ppi8255_intf[2] = | |
| 316 | 269 | { |
| 317 | 3, /* 3 chips */ | |
| 318 | {input_port_0_r, 0, 0}, /* Port A read */ | |
| 319 | {input_port_1_r, 0, 0}, /* Port B read */ | |
| 320 | {input_port_2_r, 0, 0}, /* Port C read */ | |
| 321 | {0, soundlatch_w, 0}, /* Port A write */ | |
| 322 | {0, scramble_sh_irqtrigger_w, 0}, /* Port B write */ | |
| 323 | {0, 0, 0}, /* Port C write */ | |
| 270 | { | |
| 271 | moonwar_input_port_0_r, /* Port A read */ | |
| 272 | input_port_1_r, /* Port B read */ | |
| 273 | input_port_2_r, /* Port C read */ | |
| 274 | NULL, /* Port A write */ | |
| 275 | NULL, /* Port B write */ | |
| 276 | moonwar_port_select_w /* Port C write */ | |
| 277 | }, | |
| 278 | { | |
| 279 | NULL, /* Port A read */ | |
| 280 | NULL, /* Port B read */ | |
| 281 | NULL, /* Port C read */ | |
| 282 | soundlatch_w, /* Port A write */ | |
| 283 | scramble_sh_irqtrigger_w, /* Port B write */ | |
| 284 | NULL /* Port C write */ | |
| 285 | } | |
| 324 | 286 | }; |
| 325 | 287 | |
| 326 | 288 | |
| 327 | ||
| 289 | ||
| 328 | 290 | { |
| 329 | ppi8255_init(&ppi8255_intf); | |
| 330 | } | |
| 291 | { | |
| 292 | input_port_0_r, /* Port A read */ | |
| 293 | darkplnt_input_port_1_r, /* Port B read */ | |
| 294 | input_port_2_r, /* Port C read */ | |
| 295 | NULL, /* Port A write */ | |
| 296 | NULL, /* Port B write */ | |
| 297 | NULL /* Port C write */ | |
| 298 | }, | |
| 299 | { | |
| 300 | NULL, /* Port A read */ | |
| 301 | NULL, /* Port B read */ | |
| 302 | NULL, /* Port C read */ | |
| 303 | soundlatch_w, /* Port A write */ | |
| 304 | scramble_sh_irqtrigger_w, /* Port B write */ | |
| 305 | NULL /* Port C write */ | |
| 306 | } | |
| 307 | }; | |
| 331 | 308 | |
| 332 | DRIVER_INIT( scobra ) | |
| 309 | ||
| 310 | const ppi8255_interface scramble_ppi8255_intf[2] = | |
| 333 | 311 | { |
| 334 | DRIVER_INIT_CALL(scramble_ppi); | |
| 312 | { | |
| 313 | input_port_0_r, /* Port A read */ | |
| 314 | input_port_1_r, /* Port B read */ | |
| 315 | input_port_2_r, /* Port C read */ | |
| 316 | NULL, /* Port A write */ | |
| 317 | NULL, /* Port B write */ | |
| 318 | NULL /* Port C write */ | |
| 319 | }, | |
| 320 | { | |
| 321 | NULL, /* Port A read */ | |
| 322 | NULL, /* Port B read */ | |
| 323 | scramble_protection_r, /* Port C read */ | |
| 324 | soundlatch_w, /* Port A write */ | |
| 325 | scramble_sh_irqtrigger_w, /* Port B write */ | |
| 326 | scramble_protection_w /* Port C write */ | |
| 327 | } | |
| 328 | }; | |
| 335 | 329 | |
| 336 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xa803, 0xa803, 0, 0, scrambold_background_enable_w); | |
| 337 | } | |
| 338 | 330 | |
| 339 | ||
| 331 | const | |
| 340 | 332 | { |
| 341 | DRIVER_INIT_CALL(scramble_ppi); | |
| 333 | { | |
| 334 | input_port_0_r, /* Port A read */ | |
| 335 | ckongs_input_port_1_r, /* Port B read */ | |
| 336 | ckongs_input_port_2_r, /* Port C read */ | |
| 337 | NULL, /* Port A write */ | |
| 338 | NULL, /* Port B write */ | |
| 339 | NULL /* Port C write */ | |
| 340 | }, | |
| 341 | { | |
| 342 | NULL, /* Port A read */ | |
| 343 | NULL, /* Port B read */ | |
| 344 | NULL, /* Port C read */ | |
| 345 | soundlatch_w, /* Port A write */ | |
| 346 | scramble_sh_irqtrigger_w, /* Port B write */ | |
| 347 | NULL /* Port C write */ | |
| 348 | } | |
| 349 | }; | |
| 342 | 350 | |
| 343 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x6803, 0x6803, 0, 0, scrambold_background_enable_w); | |
| 344 | } | |
| 345 | 351 | |
| 346 | ||
| 352 | ||
| 347 | 353 | { |
| 348 | DRIVER_INIT_CALL(atlantis); | |
| 354 | { | |
| 355 | input_port_0_r, /* Port A read */ | |
| 356 | input_port_1_r, /* Port B read */ | |
| 357 | input_port_2_r, /* Port C read */ | |
| 358 | NULL, /* Port A write */ | |
| 359 | NULL, /* Port B write */ | |
| 360 | NULL /* Port C write */ | |
| 361 | }, | |
| 362 | { | |
| 363 | NULL, /* Port A read */ | |
| 364 | NULL, /* Port B read */ | |
| 365 | input_port_3_r, /* Port C read */ | |
| 366 | soundlatch_w, /* Port A write */ | |
| 367 | scramble_sh_irqtrigger_w, /* Port B write */ | |
| 368 | NULL /* Port C write */ | |
| 369 | } | |
| 370 | }; | |
| 349 | 371 | |
| 350 | ppi8255_set_portCread (1, scramble_protection_r); | |
| 351 | ppi8255_set_portCwrite(1, scramble_protection_w); | |
| 352 | } | |
| 353 | 372 | |
| 354 | ||
| 373 | ||
| 355 | 374 | { |
| 356 | DRIVER_INIT_CALL(atlantis); | |
| 375 | { | |
| 376 | input_port_0_r, /* Port A read */ | |
| 377 | input_port_1_r, /* Port B read */ | |
| 378 | input_port_2_r, /* Port C read */ | |
| 379 | NULL, /* Port A write */ | |
| 380 | NULL, /* Port B write */ | |
| 381 | NULL /* Port C write */ | |
| 382 | }, | |
| 383 | { | |
| 384 | NULL, /* Port A read */ | |
| 385 | NULL, /* Port B read */ | |
| 386 | NULL, /* Port C read */ | |
| 387 | soundlatch_w, /* Port A write */ | |
| 388 | mrkougar_sh_irqtrigger_w, /* Port B write */ | |
| 389 | NULL /* Port C write */ | |
| 390 | } | |
| 391 | }; | |
| 357 | 392 | |
| 358 | ppi8255_set_portCread(0, scrambls_input_port_2_r); | |
| 359 | ppi8255_set_portCread(1, scrambls_protection_r); | |
| 360 | ppi8255_set_portCwrite(1, scramble_protection_w); | |
| 393 | ||
| 394 | DRIVER_INIT( scramble_ppi ) | |
| 395 | { | |
| 361 | 396 | } |
| 362 | 397 | |
| 363 | DRIVER_INIT( | |
| 398 | DRIVER_INIT( scobra ) | |
| 364 | 399 | { |
| 365 | DRIVER_INIT_CALL(scramble_ppi); | |
| 400 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xa803, 0xa803, 0, 0, scrambold_background_enable_w); | |
| 401 | } | |
| 366 | 402 | |
| 367 | ppi8255_set_portCwrite(0, theend_coin_counter_w); | |
| 403 | DRIVER_INIT( atlantis ) | |
| 404 | { | |
| 405 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x6803, 0x6803, 0, 0, scrambold_background_enable_w); | |
| 368 | 406 | } |
| 369 | 407 | |
| 370 | DRIVER_INIT( s | |
| 408 | DRIVER_INIT( scramble ) | |
| 371 | 409 | { |
| 372 | DRIVER_INIT_CALL(scramble_ppi); | |
| 410 | DRIVER_INIT_CALL(atlantis); | |
| 411 | } | |
| 373 | 412 | |
| 413 | DRIVER_INIT( stratgyx ) | |
| 414 | { | |
| 374 | 415 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xb000, 0xb000, 0, 0, scrambold_background_green_w); |
| 375 | 416 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xb002, 0xb002, 0, 0, scrambold_background_blue_w); |
| 376 | 417 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xb00a, 0xb00a, 0, 0, scrambold_background_red_w); |
| 377 | ||
| 378 | ppi8255_set_portCread(0, stratgyx_input_port_2_r); | |
| 379 | ppi8255_set_portCread(1, stratgyx_input_port_3_r); | |
| 380 | 418 | } |
| 381 | 419 | |
| 382 | 420 | DRIVER_INIT( tazmani2 ) |
| 383 | 421 | { |
| 384 | DRIVER_INIT_CALL(scramble_ppi); | |
| 385 | ||
| 386 | 422 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xb002, 0xb002, 0, 0, scrambold_background_enable_w); |
| 387 | 423 | } |
| 388 | 424 | |
| 389 | DRIVER_INIT( amidar ) | |
| 390 | { | |
| 391 | DRIVER_INIT_CALL(scramble_ppi); | |
| 392 | ||
| 393 | /* Amidar has a the DIP switches connected to port C of the 2nd 8255 */ | |
| 394 | ppi8255_set_portCread(1, input_port_3_r); | |
| 395 | } | |
| 396 | ||
| 397 | 425 | DRIVER_INIT( ckongs ) |
| 398 | 426 | { |
| 399 | DRIVER_INIT_CALL(scramble_ppi); | |
| 400 | ||
| 401 | ppi8255_set_portBread(0, ckongs_input_port_1_r); | |
| 402 | ppi8255_set_portCread(0, ckongs_input_port_2_r); | |
| 403 | 427 | } |
| 404 | 428 | |
| 405 | 429 | DRIVER_INIT( mariner ) |
| 406 | 430 | { |
| 407 | DRIVER_INIT_CALL(scramble_ppi); | |
| 408 | ||
| 409 | 431 | /* extra ROM */ |
| 410 | 432 | memory_install_readwrite8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x5800, 0x67ff, 0, 0, SMH_BANK1, SMH_UNMAP); |
| 411 | 433 | memory_set_bankptr(1, memory_region(REGION_CPU1) + 0x5800); |
| r2454 | r2455 | |
| 422 | 444 | offs_t A; |
| 423 | 445 | UINT8 *ROM; |
| 424 | 446 | |
| 425 | ||
| 426 | DRIVER_INIT_CALL(scramble_ppi); | |
| 427 | ||
| 428 | ||
| 429 | 447 | /* the first ROM of the second CPU has data lines D0 and D1 swapped. Decode it. */ |
| 430 | 448 | ROM = memory_region(REGION_CPU2); |
| 431 | 449 | for (A = 0;A < 0x0800;A++) |
| r2454 | r2455 | |
| 442 | 460 | offs_t A; |
| 443 | 461 | UINT8 *ROM; |
| 444 | 462 | |
| 445 | ||
| 446 | DRIVER_INIT_CALL(scramble_ppi); | |
| 447 | ||
| 448 | 463 | /* the first ROM of the second CPU has data lines D0 and D1 swapped. Decode it. */ |
| 449 | 464 | ROM = memory_region(REGION_CPU2); |
| 450 | 465 | for (A = 0;A < 0x0800;A++) |
| r2454 | r2455 | |
| 456 | 471 | offs_t i; |
| 457 | 472 | UINT8 *RAM; |
| 458 | 473 | |
| 459 | ||
| 460 | DRIVER_INIT_CALL(scramble_ppi); | |
| 461 | ||
| 462 | ||
| 463 | 474 | /* Address lines are scrambled on the main CPU */ |
| 464 | 475 | |
| 465 | 476 | /* A0 -> A2 */ |
| r2454 | r2455 | |
| 487 | 498 | DRIVER_INIT( mars ) |
| 488 | 499 | { |
| 489 | 500 | DRIVER_INIT_CALL(devilfsh); |
| 490 | ||
| 491 | /* extra port */ | |
| 492 | ppi8255_set_portCread(1, input_port_3_r); | |
| 493 | 501 | } |
| 494 | 502 | |
| 495 | 503 | DRIVER_INIT( hotshock ) |
| r2454 | r2455 | |
| 503 | 511 | { |
| 504 | 512 | UINT8 *ROM = memory_region(REGION_CPU1); |
| 505 | 513 | |
| 506 | DRIVER_INIT_CALL(scramble_ppi); | |
| 507 | ||
| 508 | 514 | /* banked ROM */ |
| 509 | 515 | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x0000, 0x3fff, 0, 0, SMH_BANK1); |
| 510 | 516 | memory_configure_bank(1, 0, 2, &ROM[0x00000], 0x10000); |
| r2454 | r2455 | |
| 521 | 527 | |
| 522 | 528 | DRIVER_INIT( moonwar ) |
| 523 | 529 | { |
| 524 | DRIVER_INIT_CALL(scramble_ppi); | |
| 525 | ||
| 526 | /* special handler for the spinner */ | |
| 527 | ppi8255_set_portAread (0, moonwar_input_port_0_r); | |
| 528 | ppi8255_set_portCwrite(0, moonwar_port_select_w); | |
| 529 | ||
| 530 | 530 | state_save_register_global(moonwar_port_select); |
| 531 | 531 | } |
| 532 | 532 | |
| 533 | 533 | DRIVER_INIT( darkplnt ) |
| 534 | 534 | { |
| 535 | DRIVER_INIT_CALL(scramble_ppi); | |
| 536 | ||
| 537 | /* special handler for the spinner */ | |
| 538 | ppi8255_set_portBread(0, darkplnt_input_port_1_r); | |
| 539 | ||
| 540 | 535 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xb00a, 0xb00a, 0, 0, darkplnt_bullet_color_w); |
| 541 | 536 | } |
| 542 | 537 | |
| r2454 | r2455 | |
| 573 | 568 | ctr++; |
| 574 | 569 | } |
| 575 | 570 | |
| 576 | DRIVER_INIT_CALL(scramble_ppi); | |
| 577 | ||
| 578 | 571 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xa804, 0xa804, 0, 0, scrambold_background_enable_w); |
| 579 | 572 | } |
| 580 | 573 | |
| 581 | 574 | DRIVER_INIT( mimonsco ) |
| 582 | 575 | { |
| 583 | DRIVER_INIT_CALL(scramble_ppi); | |
| 584 | ||
| 585 | 576 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xa804, 0xa804, 0, 0, scrambold_background_enable_w); |
| 586 | 577 | } |
| 587 | 578 | |
| 588 | 579 | DRIVER_INIT( mimonscr ) |
| 589 | 580 | { |
| 590 | DRIVER_INIT_CALL(scramble_ppi); | |
| 591 | ||
| 592 | 581 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x6804, 0x6804, 0, 0, scrambold_background_enable_w); |
| 593 | 582 | } |
| 594 | 583 | |
| r2454 | r2455 | |
| 782 | 771 | offs_t A; |
| 783 | 772 | |
| 784 | 773 | |
| 785 | DRIVER_INIT_CALL(scramble_ppi); | |
| 786 | ||
| 787 | ||
| 788 | 774 | for (A = 0;A < 0x4000;A++) |
| 789 | 775 | { |
| 790 | 776 | UINT8 xormask; |
| r2454 | r2455 | |
| 824 | 810 | offs_t A; |
| 825 | 811 | |
| 826 | 812 | |
| 827 | DRIVER_INIT_CALL(scramble_ppi); | |
| 828 | ||
| 829 | ||
| 830 | 813 | for (A = 0;A < 0x4000;A++) |
| 831 | 814 | { |
| 832 | 815 | UINT8 xormask; |
| r2454 | r2455 | |
| 874 | 857 | DRIVER_INIT( mrkougar ) |
| 875 | 858 | { |
| 876 | 859 | DRIVER_INIT_CALL(devilfsh); |
| 877 | ||
| 878 | /* no sound enabled bit */ | |
| 879 | ppi8255_set_portBwrite(1, mrkougar_sh_irqtrigger_w); | |
| 880 | 860 | } |
| 881 | 861 | |
| 882 | 862 | DRIVER_INIT( mrkougb ) |
| 883 | 863 | { |
| 884 | DRIVER_INIT_CALL(scramble_ppi); | |
| 885 | ||
| 886 | /* no sound enabled bit */ | |
| 887 | ppi8255_set_portBwrite(1, mrkougar_sh_irqtrigger_w); | |
| 888 | 864 | } |
| 889 | 865 | |
| 890 | DRIVER_INIT( sfx ) | |
| 891 | { | |
| 892 | ppi8255_init(&sfx_ppi8255_intf); | |
| 893 | } | |
| 894 | ||
| 895 | DRIVER_INIT( monsterz ) | |
| 896 | { | |
| 897 | ppi8255_init(&monsterz_ppi8255_intf); | |
| 898 | ||
| 899 | /* extra ROM */ | |
| 900 | memory_install_read8_handler(machine, 1, ADDRESS_SPACE_PROGRAM, 0x3000, 0x3fff, 0, 0, SMH_BANK1); | |
| 901 | memory_set_bankptr(1, memory_region(REGION_CPU2) + 0x3000); | |
| 902 | } | |
| 903 | ||
| 904 | static READ8_HANDLER( scorpion_prot_r ) | |
| 905 | { | |
| 906 | /* HACK! return register C */ | |
| 907 | return activecpu_get_reg(Z80_C) & 0xff; | |
| 908 | } | |
| 909 | ||
| 910 | static READ8_HANDLER( scorpion_sound_status_r ) | |
| 911 | { | |
| 912 | return 1; | |
| 913 | } | |
| 914 | ||
| 915 | DRIVER_INIT( scorpion ) | |
| 916 | { | |
| 917 | ppi8255_init(&ppi8255_intf); | |
| 918 | ||
| 919 | ppi8255_set_portCread(1, scorpion_prot_r); | |
| 920 | ||
| 921 | /* extra ROM */ | |
| 922 | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x5800, 0x67ff, 0, 0, SMH_BANK1); | |
| 923 | memory_set_bankptr(1, memory_region(REGION_CPU1) + 0x5800); | |
| 924 | ||
| 925 | /* no background related */ | |
| 926 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x6803, 0x6803, 0, 0, SMH_NOP); | |
| 927 | ||
| 928 | memory_install_read8_handler(machine, 1, ADDRESS_SPACE_PROGRAM, 0x3000, 0x3000, 0, 0, scorpion_sound_status_r); | |
| 929 | } | |
| 930 | ||
| 931 | 866 | DRIVER_INIT( ad2083 ) |
| 932 | 867 | { |
| 933 | 868 | UINT8 c; |
| r2454 | r2455 | |
|---|---|---|
| 8 | 8 | ***************************************************************************/ |
| 9 | 9 | |
| 10 | 10 | #include "driver.h" |
| 11 | #include "deprecat.h" | |
| 12 | 11 | #include "cpu/m6805/m6805.h" |
| 13 | 12 | |
| 14 | 13 | |
| r2454 | r2455 | |
| 110 | 109 | { |
| 111 | 110 | /* 68705 is going to read data from the Z80 */ |
| 112 | 111 | timer_call_after_resynch(NULL, 0,pitnrun_mcu_data_real_r); |
| 113 | cpunum_set_input_line( | |
| 112 | cpunum_set_input_line(machine, 2,0,CLEAR_LINE); | |
| 114 | 113 | portA_in = fromz80; |
| 115 | 114 | } |
| 116 | 115 | if (~data & 0x04) |
| r2454 | r2455 | |
|---|---|---|
| 586 | 586 | namcos1_reset = data & 1; |
| 587 | 587 | } |
| 588 | 588 | |
| 589 | cpunum_set_input_line(Machine, 1, INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE); | |
| 590 | cpunum_set_input_line(Machine, 2, INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE); | |
| 591 | cpunum_set_input_line(Machine, 3, INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE); | |
| 589 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE); | |
| 590 | cpunum_set_input_line(machine, 2, INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE); | |
| 591 | cpunum_set_input_line(machine, 3, INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE); | |
| 592 | 592 | } |
| 593 | 593 | |
| 594 | 594 |
| r2454 | r2455 | |
|---|---|---|
| 410 | 410 | |
| 411 | 411 | READ16_HANDLER( segaic16_memory_mapper_lsb_r ) |
| 412 | 412 | { |
| 413 | return memory_mapper_r(&memory_mapper, offset, segaic16_open_bus_r(machine,0,0)); | |
| 413 | return memory_mapper_r(&memory_mapper, offset, segaic16_open_bus_r(machine,0,0xffff)); | |
| 414 | 414 | } |
| 415 | 415 | |
| 416 | 416 |
| r2454 | r2455 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | #include "deprecat.h" | |
| 3 | 2 | #include "cpu/z80/z80.h" |
| 4 | 3 | |
| 5 | 4 | |
| r2454 | r2455 | |
| 75 | 74 | if ((ddrB & 0x02) && (~data & 0x02) && (portB_out & 0x02)) |
| 76 | 75 | { |
| 77 | 76 | portA_in = from_main; |
| 78 | if (main_sent) cpunum_set_input_line( | |
| 77 | if (main_sent) cpunum_set_input_line(machine, 2,0,CLEAR_LINE); | |
| 79 | 78 | main_sent = 0; |
| 80 | 79 | logerror("read command %02x from main cpu\n",portA_in); |
| 81 | 80 | } |
| r2454 | r2455 | |
| 132 | 131 | logerror("%04x: mcu_w %02x\n",activecpu_get_pc(),data); |
| 133 | 132 | from_main = data; |
| 134 | 133 | main_sent = 1; |
| 135 | cpunum_set_input_line( | |
| 134 | cpunum_set_input_line(machine, 2,0,ASSERT_LINE); | |
| 136 | 135 | } |
| 137 | 136 | |
| 138 | 137 | READ8_HANDLER( buggychl_mcu_r ) |
| r2454 | r2455 | |
|---|---|---|
| 314 | 314 | // cpu_spinuntil_trigger(6789); |
| 315 | 315 | |
| 316 | 316 | // printf( "Clearing RSP_STATUS_HALT\n" ); |
| 317 | cpunum_set_input_line( | |
| 317 | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, CLEAR_LINE); | |
| 318 | 318 | cpunum_set_info_int(1, CPUINFO_INT_REGISTER + RSP_SR, cpunum_get_info_int(1, CPUINFO_INT_REGISTER + RSP_SR) & ~RSP_STATUS_HALT ); |
| 319 | 319 | // RSP_STATUS &= ~RSP_STATUS_HALT; |
| 320 | 320 | //} |
| r2454 | r2455 | |
| 326 | 326 | if (data & 0x00000002) // set halt |
| 327 | 327 | { |
| 328 | 328 | // printf( "Setting RSP_STATUS_HALT\n" ); |
| 329 | cpunum_set_input_line( | |
| 329 | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, ASSERT_LINE); | |
| 330 | 330 | cpunum_set_info_int(1, CPUINFO_INT_REGISTER + RSP_SR, cpunum_get_info_int(1, CPUINFO_INT_REGISTER + RSP_SR) | RSP_STATUS_HALT ); |
| 331 | 331 | // RSP_STATUS |= RSP_STATUS_HALT; |
| 332 | 332 | } |
| r2454 | r2455 | |
| 1534 | 1534 | |
| 1535 | 1535 | READ32_HANDLER( n64_pif_ram_r ) |
| 1536 | 1536 | { |
| 1537 | /*mame_printf_debug( "pif_ram_r: %08X, %08X = %08X\n", offset << 2, mem_mask, ( ( pif_ram[offset*4+0] << 24 ) | ( pif_ram[offset*4+1] << 16 ) | ( pif_ram[offset*4+2] << 8 ) | ( pif_ram[offset*4+3] << 0 ) ) & | |
| 1537 | /*mame_printf_debug( "pif_ram_r: %08X, %08X = %08X\n", offset << 2, mem_mask, ( ( pif_ram[offset*4+0] << 24 ) | ( pif_ram[offset*4+1] << 16 ) | ( pif_ram[offset*4+2] << 8 ) | ( pif_ram[offset*4+3] << 0 ) ) & | |
| 1538 | 1538 | if( offset == ( 0x24 / 4 ) ) |
| 1539 | 1539 | { |
| 1540 | 1540 | cic_status = 0x00000080; |
| r2454 | r2455 | |
| 1543 | 1543 | { |
| 1544 | 1544 | return cic_status; |
| 1545 | 1545 | } |
| 1546 | return ( ( pif_ram[offset*4+0] << 24 ) | ( pif_ram[offset*4+1] << 16 ) | ( pif_ram[offset*4+2] << 8 ) | ( pif_ram[offset*4+3] << 0 ) ) & | |
| 1546 | return ( ( pif_ram[offset*4+0] << 24 ) | ( pif_ram[offset*4+1] << 16 ) | ( pif_ram[offset*4+2] << 8 ) | ( pif_ram[offset*4+3] << 0 ) ) & | |
| 1547 | 1547 | } |
| 1548 | 1548 | |
| 1549 | 1549 | WRITE32_HANDLER( n64_pif_ram_w ) |
| 1550 | 1550 | { |
| 1551 | 1551 | /*mame_printf_debug("pif_ram_w: %08X, %08X, %08X\n", data, offset << 4, mem_mask);*/ |
| 1552 | 1552 | /* |
| 1553 | if( | |
| 1553 | if( | |
| 1554 | 1554 | { |
| 1555 | 1555 | pif_ram[offset*4+0] = ( data >> 24 ) & 0x000000ff; |
| 1556 | 1556 | } |
| 1557 | if( | |
| 1557 | if( | |
| 1558 | 1558 | { |
| 1559 | 1559 | pif_ram[offset*4+1] = ( data >> 16 ) & 0x000000ff; |
| 1560 | 1560 | } |
| 1561 | if( | |
| 1561 | if( | |
| 1562 | 1562 | { |
| 1563 | 1563 | pif_ram[offset*4+2] = ( data >> 8 ) & 0x000000ff; |
| 1564 | 1564 | } |
| 1565 | if( | |
| 1565 | if( | |
| 1566 | 1566 | { |
| 1567 | 1567 | pif_ram[offset*4+3] = ( data >> 0 ) & 0x000000ff; |
| 1568 | 1568 | } |
| r2454 | r2455 | |
|---|---|---|
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | 10 | #include "driver.h" |
| 11 | #include "deprecat.h" | |
| 12 | 11 | #include "tait8741.h" |
| 13 | 12 | |
| 14 | 13 | #define VERBOSE 0 |
| r2454 | r2455 | |
|---|---|---|
| 1014 | 1014 | counter_set_gate(0, (data >> 1) & 1); |
| 1015 | 1015 | |
| 1016 | 1016 | /* bits D2 and D4 control the clear/reset flags on the flip-flop that feeds counter 0 */ |
| 1017 | if (!(data & 0x04)) set_counter_0_ff(Machine, 1); | |
| 1018 | if (!(data & 0x10)) set_counter_0_ff(Machine, 0); | |
| 1017 | if (!(data & 0x04)) set_counter_0_ff(machine, 1); | |
| 1018 | if (!(data & 0x10)) set_counter_0_ff(machine, 0); | |
| 1019 | 1019 | |
| 1020 | 1020 | /* bit 5 clears the NMI interrupt; recompute the I/O state now */ |
| 1021 | 1021 | m6850_update_io(); |
| r2454 | r2455 | |
| 1219 | 1219 | |
| 1220 | 1220 | READ8_HANDLER( shrike_shared_6809_r ) |
| 1221 | 1221 | { |
| 1222 | UINT16 mem_mask = offset & 1 ? 0xff : 0x | |
| 1222 | UINT16 mem_mask = offset & 1 ? 0xff00 : 0x | |
| 1223 | 1223 | |
| 1224 | 1224 | switch( offset ) |
| 1225 | 1225 | { |
| 1226 | 1226 | case 6: // return OK for 68k status register until motors hooked up |
| 1227 | 1227 | return 0; |
| 1228 | 1228 | default: |
| 1229 | return ( shrike_shared[offset >> 1] & mem_mask ) >> ( | |
| 1229 | return ( shrike_shared[offset >> 1] & ~mem_mask ) >> ( | |
| 1230 | 1230 | } |
| 1231 | 1231 | } |
| 1232 | 1232 | |
| 1233 | 1233 | |
| 1234 | 1234 | WRITE8_HANDLER( shrike_shared_6809_w ) |
| 1235 | 1235 | { |
| 1236 | UINT16 mem_mask = offset & 1 ? 0xff : 0xff00; | |
| 1237 | shrike_shared[offset >> 1] = ( shrike_shared[offset >> 1] & ~mem_mask ) | ( data << ( ~mem_mask & 0x8 ) ); | |
| 1236 | UINT16 mem_mask = offset & 1 ? 0xff00 : 0x00ff; | |
| 1237 | shrike_shared[offset >> 1] = ( shrike_shared[offset >> 1] & mem_mask ) | ( data << ( mem_mask & 0x8 ) ); | |
| 1238 | 1238 | } |
| 1239 | 1239 | |
| 1240 | 1240 | // uses movep, so writes even 8 bit addresses to odd 16 bit addresses, reads as 16 bit from odd addresses |
| r2454 | r2455 | |
| 1246 | 1246 | |
| 1247 | 1247 | READ16_HANDLER( shrike_io_68k_r ) |
| 1248 | 1248 | { |
| 1249 | return ( shrike_io[offset] & | |
| 1249 | return ( shrike_io[offset] & | |
| 1250 | 1250 | } |
| 1251 | 1251 |
| r2454 | r2455 | |
|---|---|---|
| 1171 | 1171 | static WRITE8_HANDLER ( set_bnglngby_irq_w ) |
| 1172 | 1172 | { |
| 1173 | 1173 | ret = data; |
| 1174 | cpunum_set_input_line( | |
| 1174 | cpunum_set_input_line(machine, 0, 0, ( data & 2 ) ? ASSERT_LINE : CLEAR_LINE ); | |
| 1175 | 1175 | /* other values ??? */ |
| 1176 | 1176 | /* 0, 4, 84 */ |
| 1177 | 1177 | } |
| r2454 | r2455 | |
| 1257 | 1257 | ppu2c0x_set_videorom_bank( cpu_getactivecpu(), 0, 8, ( data & 4 ) ? 1 : 0, 512 ); |
| 1258 | 1258 | |
| 1259 | 1259 | /* bit 1 ( data & 2 ) triggers irq on the other cpu */ |
| 1260 | cpunum_set_input_line( | |
| 1260 | cpunum_set_input_line(machine, other_cpu, 0, ( data & 2 ) ? CLEAR_LINE : ASSERT_LINE ); | |
| 1261 | 1261 | |
| 1262 | 1262 | /* move along */ |
| 1263 | 1263 | if ( cpu_getactivecpu() == 0 ) |
| r2454 | r2455 | |
|---|---|---|
| 1431 | 1431 | case MEMSEL: /* Access cycle designation in memory (2) area */ |
| 1432 | 1432 | /* FIXME: Need to adjust the speed only during access of banks 0x80+ |
| 1433 | 1433 | * Currently we are just increasing it no matter what */ |
| 1434 | // cpunum_set_clockscale( | |
| 1434 | // cpunum_set_clockscale(machine, 0, (data & 0x1) ? 1.335820896 : 1.0 ); | |
| 1435 | 1435 | #ifdef SNES_DBG_REG_W |
| 1436 | 1436 | if( (data & 0x1) != (snes_ram[MEMSEL] & 0x1) ) |
| 1437 | 1437 | mame_printf_debug( "CPU speed: %f Mhz\n", (data & 0x1) ? 3.58 : 2.68 ); |
| r2454 | r2455 | |
|---|---|---|
| 8 | 8 | ***************************************************************************/ |
| 9 | 9 | |
| 10 | 10 | #include "driver.h" |
| 11 | #include "deprecat.h" | |
| 12 | 11 | #include "cpu/m6805/m6805.h" |
| 13 | 12 | |
| 14 | 13 | |
| r2454 | r2455 | |
| 203 | 202 | { |
| 204 | 203 | /* 68705 is going to read data from the Z80 */ |
| 205 | 204 | timer_call_after_resynch(NULL, 0,taitosj_mcu_data_real_r); |
| 206 | cpunum_set_input_line( | |
| 205 | cpunum_set_input_line(machine, 2,0,CLEAR_LINE); | |
| 207 | 206 | portA_in = fromz80; |
| 208 | 207 | LOG(("%04x: 68705 <- Z80 %02x\n",activecpu_get_pc(),portA_in)); |
| 209 | 208 | } |
| r2454 | r2455 | |
| 317 | 316 | |
| 318 | 317 | READ8_HANDLER( alpine_port_2_r ) |
| 319 | 318 | { |
| 320 | return input_port_ | |
| 319 | return input_port_ | |
| 321 | 320 | } |
| r2454 | r2455 | |
|---|---|---|
| 320 | 320 | } |
| 321 | 321 | else |
| 322 | 322 | { |
| 323 | amiga_cia_w(Machine, 0x1001/2, 1, 0); | |
| 323 | amiga_cia_w(Machine, 0x1001/2, 1, 0xffff); | |
| 324 | 324 | } |
| 325 | 325 | |
| 326 | 326 | if (activecpu_get_pc() < 0x80000) |
| r2454 | r2455 | |
| 345 | 345 | } |
| 346 | 346 | else |
| 347 | 347 | { |
| 348 | amiga_cia_w(machine, 0x1001/2, 1, 0); | |
| 348 | amiga_cia_w(machine, 0x1001/2, 1, 0xffff); | |
| 349 | 349 | } |
| 350 | 350 | |
| 351 | 351 | /* call the system-specific callback */ |
| r2454 | r2455 | |
| 372 | 372 | if (scanline == 0) |
| 373 | 373 | { |
| 374 | 374 | /* signal VBLANK IRQ */ |
| 375 | amiga_custom_w(machine, REG_INTREQ, 0x8000 | INTENA_VERTB, 0); | |
| 375 | amiga_custom_w(machine, REG_INTREQ, 0x8000 | INTENA_VERTB, 0xffff); | |
| 376 | 376 | |
| 377 | 377 | /* clock the first CIA TOD */ |
| 378 | 378 | cia_clock_tod(0); |
| r2454 | r2455 | |
| 982 | 982 | CUSTOM_REG(REG_DMACON) &= ~0x4000; |
| 983 | 983 | |
| 984 | 984 | /* signal an interrupt */ |
| 985 | amiga_custom_w(machine, REG_INTREQ, 0x8000 | INTENA_BLIT, 0); | |
| 985 | amiga_custom_w(machine, REG_INTREQ, 0x8000 | INTENA_BLIT, 0xffff); | |
| 986 | 986 | |
| 987 | 987 | /* reset the blitter timer */ |
| 988 | 988 | timer_reset( amiga_blitter_timer, attotime_never); |
| r2454 | r2455 | |
| 1083 | 1083 | data = cia_read(which, offset >> 7); |
| 1084 | 1084 | |
| 1085 | 1085 | if (LOG_CIA) |
| 1086 | logerror("%06x:cia_%c_read(%03x) = %04x & %04x\n", safe_activecpu_get_pc(), 'A' + ((~offset & 0x0800) >> 11), offset * 2, data << shift, mem_mask | |
| 1086 | logerror("%06x:cia_%c_read(%03x) = %04x & %04x\n", safe_activecpu_get_pc(), 'A' + ((~offset & 0x0800) >> 11), offset * 2, data << shift, mem_mask | |
| 1087 | 1087 | |
| 1088 | 1088 | return data << shift; |
| 1089 | 1089 | } |
| r2454 | r2455 | |
| 1101 | 1101 | int which; |
| 1102 | 1102 | |
| 1103 | 1103 | if (LOG_CIA) |
| 1104 | logerror("%06x:cia_%c_write(%03x) = %04x & %04x\n", safe_activecpu_get_pc(), 'A' + ((~offset & 0x0800) >> 11), offset * 2, data, mem_mask | |
| 1104 | logerror("%06x:cia_%c_write(%03x) = %04x & %04x\n", safe_activecpu_get_pc(), 'A' + ((~offset & 0x0800) >> 11), offset * 2, data, mem_mask | |
| 1105 | 1105 | |
| 1106 | 1106 | /* offsets 0000-07ff reference CIA B, and are accessed via the MSB */ |
| 1107 | 1107 | if ((offset & 0x0800) == 0) |
| r2454 | r2455 | |
| 1135 | 1135 | |
| 1136 | 1136 | static void amiga_cia_0_irq(int state) |
| 1137 | 1137 | { |
| 1138 | amiga_custom_w(Machine, REG_INTREQ, (state ? 0x8000 : 0x0000) | INTENA_PORTS, 0); | |
| 1138 | amiga_custom_w(Machine, REG_INTREQ, (state ? 0x8000 : 0x0000) | INTENA_PORTS, 0xffff); | |
| 1139 | 1139 | } |
| 1140 | 1140 | |
| 1141 | 1141 | |
| 1142 | 1142 | static void amiga_cia_1_irq(int state) |
| 1143 | 1143 | { |
| 1144 | amiga_custom_w(Machine, REG_INTREQ, (state ? 0x8000 : 0x0000) | INTENA_EXTER, 0); | |
| 1144 | amiga_custom_w(Machine, REG_INTREQ, (state ? 0x8000 : 0x0000) | INTENA_EXTER, 0xffff); | |
| 1145 | 1145 | } |
| 1146 | 1146 | |
| 1147 | 1147 | |
| r2454 | r2455 | |
| 1286 | 1286 | CUSTOM_REG(REG_SERDATR) |= 0x3000; |
| 1287 | 1287 | |
| 1288 | 1288 | /* signal an interrupt */ |
| 1289 | amiga_custom_w(machine, REG_INTREQ, 0x8000 | INTENA_TBE, 0); | |
| 1289 | amiga_custom_w(machine, REG_INTREQ, 0x8000 | INTENA_TBE, 0xffff); | |
| 1290 | 1290 | } |
| 1291 | 1291 | |
| 1292 | 1292 | |
| r2454 | r2455 | |
| 1522 | 1522 | } |
| 1523 | 1523 | |
| 1524 | 1524 | /* signal an interrupt */ |
| 1525 | amiga_custom_w(Machine, REG_INTREQ, 0x8000 | INTENA_RBF, 0); | |
| 1525 | amiga_custom_w(Machine, REG_INTREQ, 0x8000 | INTENA_RBF, 0xffff); | |
| 1526 | 1526 | } |
| 1527 | 1527 | |
| 1528 | 1528 | |
| r2454 | r2455 | |
| 1734 | 1734 | { |
| 1735 | 1735 | int move_to_next = FALSE; |
| 1736 | 1736 | |
| 1737 | logerror("autoconfig_w(%02X) = %04X & %04X\n", offset, data, mem_mask | |
| 1737 | logerror("autoconfig_w(%02X) = %04X & %04X\n", offset, data, mem_mask | |
| 1738 | 1738 | |
| 1739 | 1739 | /* if no current device, bail */ |
| 1740 | 1740 | if (!cur_autoconfig || !ACCESSING_BITS_8_15) |
| r2454 | r2455 | |
|---|---|---|
| 166 | 166 | { |
| 167 | 167 | /* Reset sound cpu */ |
| 168 | 168 | if ((data & 2) == 0) |
| 169 | cpunum_set_input_line( | |
| 169 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, ASSERT_LINE); | |
| 170 | 170 | else |
| 171 | cpunum_set_input_line( | |
| 171 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, CLEAR_LINE); | |
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 |
| r2454 | r2455 | |
|---|---|---|
| 8 | 8 | ***************************************************************************/ |
| 9 | 9 | |
| 10 | 10 | #include "driver.h" |
| 11 | #include "deprecat.h" | |
| 12 | 11 | |
| 13 | 12 | |
| 14 | 13 | static UINT8 from_main,from_mcu; |
| r2454 | r2455 | |
| 68 | 67 | if ((ddrB & 0x02) && (~data & 0x02) && (portB_out & 0x02)) |
| 69 | 68 | { |
| 70 | 69 | portA_in = from_main; |
| 71 | if (main_sent) cpunum_set_input_line( | |
| 70 | if (main_sent) cpunum_set_input_line(machine, 2,0,CLEAR_LINE); | |
| 72 | 71 | main_sent = 0; |
| 73 | 72 | logerror("read command %02x from main cpu\n",portA_in); |
| 74 | 73 | } |
| r2454 | r2455 | |
| 116 | 115 | logerror("%04x: mcu_w %02x\n",activecpu_get_pc(),data); |
| 117 | 116 | from_main = data; |
| 118 | 117 | main_sent = 1; |
| 119 | cpunum_set_input_line( | |
| 118 | cpunum_set_input_line(machine, 2,0,ASSERT_LINE); | |
| 120 | 119 | } |
| 121 | 120 | |
| 122 | 121 | READ8_HANDLER( lkage_mcu_r ) |
| r2454 | r2455 | |
|---|---|---|
| 400 | 400 | state_save_register_global(neogeo_rng); |
| 401 | 401 | |
| 402 | 402 | memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, addr1, addr1 + 1, 0, 0, sma_random_r); |
| 403 | memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, addr2, addr2 + | |
| 403 | memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, addr2, addr2 + 1, 0, 0, sma_random_r); | |
| 404 | 404 | } |
| 405 | 405 | |
| 406 | 406 |
| r2454 | r2455 | |
|---|---|---|
| 521 | 521 | { |
| 522 | 522 | atarigen_slapstic_last_pc = pc; |
| 523 | 523 | atarigen_slapstic_last_address = address; |
| 524 | atarigen_slapstic_r(machine, (address >> 1) & 0x3fff, 0); | |
| 524 | atarigen_slapstic_r(machine, (address >> 1) & 0x3fff, 0xffff); | |
| 525 | 525 | } |
| 526 | 526 | return ~0; |
| 527 | 527 | } |
| r2454 | r2455 | |
| 733 | 733 | READ16_HANDLER( atarigen_sound_r ) |
| 734 | 734 | { |
| 735 | 735 | atarigen_sound_to_cpu_ready = 0; |
| 736 | atarigen_sound_int_ack_w(machine, 0, 0, 0); | |
| 736 | atarigen_sound_int_ack_w(machine, 0, 0, 0xffff); | |
| 737 | 737 | return atarigen_sound_to_cpu | 0xff00; |
| 738 | 738 | } |
| 739 | 739 | |
| 740 | 740 | READ16_HANDLER( atarigen_sound_upper_r ) |
| 741 | 741 | { |
| 742 | 742 | atarigen_sound_to_cpu_ready = 0; |
| 743 | atarigen_sound_int_ack_w(machine, 0, 0, 0); | |
| 743 | atarigen_sound_int_ack_w(machine, 0, 0, 0xffff); | |
| 744 | 744 | return (atarigen_sound_to_cpu << 8) | 0x00ff; |
| 745 | 745 | } |
| 746 | 746 | |
| 747 | 747 | READ32_HANDLER( atarigen_sound_upper32_r ) |
| 748 | 748 | { |
| 749 | 749 | atarigen_sound_to_cpu_ready = 0; |
| 750 | atarigen_sound_int_ack32_w(machine, 0, 0, 0); | |
| 750 | atarigen_sound_int_ack32_w(machine, 0, 0, 0xffff); | |
| 751 | 751 | return (atarigen_sound_to_cpu << 24) | 0x00ffffff; |
| 752 | 752 | } |
| 753 | 753 | |
| r2454 | r2455 | |
| 808 | 808 | |
| 809 | 809 | /* reset the sound write state */ |
| 810 | 810 | atarigen_sound_to_cpu_ready = 0; |
| 811 | atarigen_sound_int_ack_w(machine, 0, 0, 0); | |
| 811 | atarigen_sound_int_ack_w(machine, 0, 0, 0xffff); | |
| 812 | 812 | |
| 813 | 813 | /* allocate a high frequency timer until a response is generated */ |
| 814 | 814 | /* the main CPU is *very* sensistive to the timing of the response */ |
| r2454 | r2455 | |
| 1237 | 1237 | |
| 1238 | 1238 | /* scanline IRQ ack here */ |
| 1239 | 1239 | case 0x1e: |
| 1240 | atarigen_scanline_int_ack_w(screen->machine, 0, 0, 0); | |
| 1240 | atarigen_scanline_int_ack_w(screen->machine, 0, 0, 0xffff); | |
| 1241 | 1241 | break; |
| 1242 | 1242 | |
| 1243 | 1243 | /* log anything else */ |
| r2454 | r2455 | |
|---|---|---|
| 191 | 191 | return input_port_read_indexed(machine, offset); |
| 192 | 192 | |
| 193 | 193 | case 4: |
| 194 | return (midway_serial_pic_status_r() << 12) | midwunit_sound_state_r(machine,0,0); | |
| 194 | return (midway_serial_pic_status_r() << 12) | midwunit_sound_state_r(machine,0,0xffff); | |
| 195 | 195 | |
| 196 | 196 | default: |
| 197 | 197 | logerror("%08X:Unknown I/O read from %d\n", activecpu_get_pc(), offset); |
| r2454 | r2455 | |
| 281 | 281 | /* non-loopback case: bit 0 means data ready, bit 2 means ok to send */ |
| 282 | 282 | else |
| 283 | 283 | { |
| 284 | int temp = midwunit_sound_state_r(machine, 0, 0); | |
| 284 | int temp = midwunit_sound_state_r(machine, 0, 0xffff); | |
| 285 | 285 | result |= (temp & 0x800) >> 9; |
| 286 | 286 | result |= (~temp & 0x400) >> 10; |
| 287 | 287 | timer_call_after_resynch(NULL, 0, 0); |
| r2454 | r2455 | |
| 296 | 296 | |
| 297 | 297 | /* non-loopback case: read from the DCS system */ |
| 298 | 298 | else |
| 299 | result = midwunit_sound_r(machine, 0, 0); | |
| 299 | result = midwunit_sound_r(machine, 0, 0xffff); | |
| 300 | 300 | break; |
| 301 | 301 | |
| 302 | 302 | case 5: /* register 5 seems to be like 3, but with in/out swapped */ |
| r2454 | r2455 | |
| 308 | 308 | /* non-loopback case: bit 0 means data ready, bit 2 means ok to send */ |
| 309 | 309 | else |
| 310 | 310 | { |
| 311 | int temp = midwunit_sound_state_r(machine, 0, 0); | |
| 311 | int temp = midwunit_sound_state_r(machine, 0, 0xffff); | |
| 312 | 312 | result |= (temp & 0x800) >> 11; |
| 313 | 313 | result |= (~temp & 0x400) >> 8; |
| 314 | 314 | timer_call_after_resynch(NULL, 0, 0); |
| r2454 | r2455 | |
|---|---|---|
| 779 | 779 | /* If the interrupt enable bit is set trigger an A/D IRQ */ |
| 780 | 780 | if(data&0x20) |
| 781 | 781 | { |
| 782 | cpunum_set_input_line( | |
| 782 | cpunum_set_input_line(machine, CPU_MCU, HD63705_INT_ADCONV , PULSE_LINE); | |
| 783 | 783 | } |
| 784 | 784 | } |
| 785 | 785 | } |
| r2454 | r2455 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | #include "driver.h" |
| 7 | #include "deprecat.h" | |
| 8 | 7 | #include "debugger.h" |
| 9 | 8 | #include "machine/8255ppi.h" |
| 10 | 9 | #include "tx1.h" |
| r2454 | r2455 | |
| 1473 | 1472 | *************************************/ |
| 1474 | 1473 | MACHINE_START( tx1 ) |
| 1475 | 1474 | { |
| 1476 | ppi8255_init(&tx1_ppi8255_intf); | |
| 1477 | ||
| 1478 | 1475 | /* Initialise for each game */ |
| 1479 | 1476 | prom = (UINT16*)memory_region(REGION_USER1) + (0x8000 >> 1); |
| 1480 | 1477 | |
| r2454 | r2455 | |
| 1487 | 1484 | |
| 1488 | 1485 | MACHINE_START( buggyboy ) |
| 1489 | 1486 | { |
| 1490 | ppi8255_init(&buggyboy_ppi8255_intf); | |
| 1491 | ||
| 1492 | 1487 | /* Initialise for each game */ |
| 1493 | 1488 | prom = (UINT16*)memory_region(REGION_USER1) + (0x8000 >> 1); |
| 1494 | 1489 |
| r2454 | r2455 | |
|---|---|---|
| 71 | 71 | ***************************************************************************/ |
| 72 | 72 | |
| 73 | 73 | #include "driver.h" |
| 74 | #include "deprecat.h" | |
| 75 | 74 | #include "machine/eeprom.h" |
| 76 | 75 | #include "decoprot.h" |
| 77 | 76 | |
| r2454 | r2455 | |
| 1729 | 1728 | { |
| 1730 | 1729 | switch (offset * 2) |
| 1731 | 1730 | { |
| 1732 | case 0x298: return input_port_0_word_r(machine, 0, 0); | |
| 1733 | case 0x342: return input_port_1_word_r(machine, 0, 0); | |
| 1734 | case 0x506: return input_port_2_word_r(machine, 0, 0); | |
| 1731 | case 0x298: return input_port_read_indexed(machine,0); | |
| 1732 | case 0x342: return input_port_read_indexed(machine,1); | |
| 1733 | case 0x506: return input_port_read_indexed(machine,2); | |
| 1735 | 1734 | } |
| 1736 | 1735 | |
| 1737 | 1736 | logerror("Protection PC %06x: warning - read unmapped memory address %04x\n",activecpu_get_pc(),offset<<1); |
| r2454 | r2455 | |
| 1756 | 1755 | const UINT16* prot_ram=deco16_prot_ram; |
| 1757 | 1756 | switch (offset * 2) |
| 1758 | 1757 | { |
| 1759 | case 0x5b2: return input_port_0_word_r(machine, 0, 0); | |
| 1760 | case 0x44c: return input_port_1_word_r(machine, 0, 0); | |
| 1761 | case 0x042: return input_port_2_word_r(machine, 0, 0); | |
| 1758 | case 0x5b2: return input_port_read_indexed(machine,0); | |
| 1759 | case 0x44c: return input_port_read_indexed(machine,1); | |
| 1760 | case 0x042: return input_port_read_indexed(machine,2); | |
| 1762 | 1761 | |
| 1763 | 1762 | case 0x510: return DECO_PORT(0); |
| 1764 | 1763 | case 0x51a: return DECO_PORT(2); |
| r2454 | r2455 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | #include "deprecat.h" | |
| 3 | 2 | #include "tatsumi.h" |
| 4 | 3 | #include "sound/2151intf.h" |
| 5 | 4 | #include "sound/okim6295.h" |
| r2454 | r2455 | |
| 49 | 48 | if (tatsumi_control_word&0x7f00) |
| 50 | 49 | { |
| 51 | 50 | logerror("Unknown control Word: %04x\n",tatsumi_control_word); |
| 52 | cpunum_set_input_line( | |
| 51 | cpunum_set_input_line(machine, 3, INPUT_LINE_HALT, CLEAR_LINE); // ? | |
| 53 | 52 | } |
| 54 | 53 | if ((tatsumi_control_word&0x8)==0 && !(tatsumi_last_control&0x8)) |
| 55 | cpunum_set_input_line( | |
| 54 | cpunum_set_input_line(machine, 1, INPUT_LINE_IRQ4, ASSERT_LINE); | |
| 56 | 55 | |
| 57 | 56 | if (tatsumi_control_word&0x10) |
| 58 | cpunum_set_input_line( | |
| 57 | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, ASSERT_LINE); | |
| 59 | 58 | else |
| 60 | cpunum_set_input_line( | |
| 59 | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, CLEAR_LINE); | |
| 61 | 60 | |
| 62 | 61 | if (tatsumi_control_word&0x80) |
| 63 | cpunum_set_input_line( | |
| 62 | cpunum_set_input_line(machine, 2, INPUT_LINE_HALT, ASSERT_LINE); | |
| 64 | 63 | else |
| 65 | cpunum_set_input_line( | |
| 64 | cpunum_set_input_line(machine, 2, INPUT_LINE_HALT, CLEAR_LINE); | |
| 66 | 65 | |
| 67 | 66 | tatsumi_last_control=tatsumi_control_word; |
| 68 | 67 | } |
| 69 | 68 | |
| 70 | 69 | WRITE16_HANDLER( apache3_irq_ack_w ) |
| 71 | 70 | { |
| 72 | cpunum_set_input_line( | |
| 71 | cpunum_set_input_line(machine, 1, INPUT_LINE_IRQ4, CLEAR_LINE); | |
| 73 | 72 | |
| 74 | 73 | if ((data&2) && (tatsumi_last_irq&2)==0) |
| 75 | 74 | { |
| 76 | cpunum_set_input_line( | |
| 75 | cpunum_set_input_line(machine, 3, INPUT_LINE_HALT, ASSERT_LINE); | |
| 77 | 76 | } |
| 78 | 77 | |
| 79 | 78 | if ((tatsumi_last_irq&2) && (data&2)==0) |
| 80 | 79 | { |
| 81 | cpunum_set_input_line(Machine, 3, INPUT_LINE_HALT, CLEAR_LINE); | |
| 82 | cpunum_set_input_line_and_vector(Machine, 3, 0, HOLD_LINE, 0xc7 | 0x10); | |
| 80 | cpunum_set_input_line(machine, 3, INPUT_LINE_HALT, CLEAR_LINE); | |
| 81 | cpunum_set_input_line_and_vector(machine, 3, 0, HOLD_LINE, 0xc7 | 0x10); | |
| 83 | 82 | } |
| 84 | 83 | |
| 85 | 84 | tatsumi_last_irq=data; |
| r2454 | r2455 | |
| 187 | 186 | COMBINE_DATA(&tatsumi_control_word); |
| 188 | 187 | |
| 189 | 188 | if (tatsumi_control_word&0x10) |
| 190 | cpunum_set_input_line( | |
| 189 | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, ASSERT_LINE); | |
| 191 | 190 | else |
| 192 | cpunum_set_input_line( | |
| 191 | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, CLEAR_LINE); | |
| 193 | 192 | |
| 194 | 193 | if (tatsumi_control_word&0x4) |
| 195 | cpunum_set_input_line( | |
| 194 | cpunum_set_input_line(machine, 2, INPUT_LINE_HALT, ASSERT_LINE); | |
| 196 | 195 | else |
| 197 | cpunum_set_input_line( | |
| 196 | cpunum_set_input_line(machine, 2, INPUT_LINE_HALT, CLEAR_LINE); | |
| 198 | 197 | |
| 199 | 198 | // if (offset==1 && (tatsumi_control_w&0xfeff)!=(last_bank&0xfeff)) |
| 200 | 199 | // logerror("%08x: Changed bank to %04x (%d)\n",activecpu_get_pc(),tatsumi_control_w,offset); |
| r2454 | r2455 | |
| 220 | 219 | */ |
| 221 | 220 | |
| 222 | 221 | if ((tatsumi_control_word&0x8)==0 && !(tatsumi_last_control&0x8)) |
| 223 | cpunum_set_input_line( | |
| 222 | cpunum_set_input_line(machine, 1, INPUT_LINE_IRQ4, ASSERT_LINE); | |
| 224 | 223 | // if (tatsumi_control_w&0x200) |
| 225 | 224 | // cpu_set_reset_line(1, CLEAR_LINE); |
| 226 | 225 | // else |
| r2454 | r2455 | |
| 253 | 252 | */ |
| 254 | 253 | |
| 255 | 254 | COMBINE_DATA(&roundup5_e0000_ram[offset]); |
| 256 | cpunum_set_input_line( | |
| 255 | cpunum_set_input_line(machine, 1, INPUT_LINE_IRQ4, CLEAR_LINE); // guess, probably wrong | |
| 257 | 256 | |
| 258 | 257 | // logerror("d_68k_e0000_w %06x %04x\n",activecpu_get_pc(),data); |
| 259 | 258 | } |
| r2454 | r2455 | |
| 284 | 283 | |
| 285 | 284 | if ((tatsumi_control_word&4)==4 && (tatsumi_last_control&4)==0) { |
| 286 | 285 | // logerror("68k 2 halt\n"); |
| 287 | cpunum_set_input_line( | |
| 286 | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, ASSERT_LINE); | |
| 288 | 287 | } |
| 289 | 288 | |
| 290 | 289 | if ((tatsumi_control_word&4)==0 && (tatsumi_last_control&4)==4) { |
| 291 | 290 | // logerror("68k 2 irq go\n"); |
| 292 | cpunum_set_input_line( | |
| 291 | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, CLEAR_LINE); | |
| 293 | 292 | } |
| 294 | 293 | |
| 295 | 294 |
| r2454 | r2455 | |
|---|---|---|
| 121 | 121 | |
| 122 | 122 | READ8_HANDLER( arkanoid_68705_input_0_r ) |
| 123 | 123 | { |
| 124 | int res = input_port_ | |
| 124 | int res = input_port_ | |
| 125 | 125 | |
| 126 | 126 | /* bit 0x40 comes from the sticky bit */ |
| 127 | 127 | if (!z80write) res |= 0x40; |
| r2454 | r2455 | |
| 136 | 136 | { |
| 137 | 137 | if (arkanoid_paddle_select) |
| 138 | 138 | { |
| 139 | arkanoid_paddle_value = input_port_ | |
| 139 | arkanoid_paddle_value = input_port_ | |
| 140 | 140 | } |
| 141 | 141 | else |
| 142 | 142 | { |
| 143 | arkanoid_paddle_value = input_port_ | |
| 143 | arkanoid_paddle_value = input_port_ | |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | return arkanoid_paddle_value; |
| r2454 | r2455 | |
|---|---|---|
| 517 | 517 | |
| 518 | 518 | state_save_register_global(gmgalax_selected_game); |
| 519 | 519 | |
| 520 | gmgalax_select_game(input_port_ | |
| 520 | gmgalax_select_game(input_port_ | |
| 521 | 521 | } |
| 522 | 522 | |
| 523 | 523 | INTERRUPT_GEN( gmgalax_vh_interrupt ) |
| 524 | 524 | { |
| 525 | 525 | // reset the cpu if the selected game changed |
| 526 | int new_game = input_port_ | |
| 526 | int new_game = input_port_ | |
| 527 | 527 | |
| 528 | 528 | if (gmgalax_selected_game != new_game) |
| 529 | 529 | { |
| r2454 | r2455 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | #include "deprecat.h" | |
| 3 | 2 | #include "cpu/z80/z80.h" |
| 4 | 3 | |
| 5 | 4 | |
| r2454 | r2455 | |
| 57 | 56 | if ((ddrB & 0x02) && (~data & 0x02) && (portB_out & 0x02)) |
| 58 | 57 | { |
| 59 | 58 | portA_in = from_main; |
| 60 | if (main_sent) cpunum_set_input_line( | |
| 59 | if (main_sent) cpunum_set_input_line(machine, 3,0,CLEAR_LINE); | |
| 61 | 60 | main_sent = 0; |
| 62 | 61 | //logerror("read command %02x from main cpu\n",portA_in); |
| 63 | 62 | } |
| r2454 | r2455 | |
| 114 | 113 | logerror("%04x: mcu_w %02x\n",activecpu_get_pc(),data); |
| 115 | 114 | from_main = data; |
| 116 | 115 | main_sent = 1; |
| 117 | cpunum_set_input_line( | |
| 116 | cpunum_set_input_line(machine, 3,0,ASSERT_LINE); | |
| 118 | 117 | } |
| 119 | 118 | |
| 120 | 119 | READ8_HANDLER( retofinv_mcu_r ) |
| r2454 | r2455 | |
|---|---|---|
| 73 | 73 | int p2_vert; |
| 74 | 74 | int temp; |
| 75 | 75 | |
| 76 | p1_horiz = input_port_0_r(machine, offset); | |
| 77 | p1_vert = input_port_1_r(machine, offset); | |
| 78 | p2_horiz = input_port_2_r(machine, offset); | |
| 79 | p2_vert = input_port_3_r(machine, offset); | |
| 76 | p1_horiz = input_port_read_indexed(machine,0); | |
| 77 | p1_vert = input_port_read_indexed(machine,1); | |
| 78 | p2_horiz = input_port_read_indexed(machine,2); | |
| 79 | p2_vert = input_port_read_indexed(machine,3); | |
| 80 | 80 | |
| 81 | 81 | /* Set direction bits */ |
| 82 | 82 | |
| r2454 | r2455 | |
| 146 | 146 | } |
| 147 | 147 | else |
| 148 | 148 | { |
| 149 | temp = input_port_ | |
| 149 | temp = input_port_ | |
| 150 | 150 | /* Remap button 1 back to the Start button */ |
| 151 | 151 | /* NOTE: This is an ADDED feature, not a part of the original hardware! */ |
| 152 | 152 | temp = (temp) & (temp>>2); |
| r2454 | r2455 | |
|---|---|---|
| 737 | 737 | } |
| 738 | 738 | |
| 739 | 739 | /* detect changes to HEBLNK and HSBLNK and force an update before they change */ |
| 740 | if ((offset == REG_HEBLNK || offset == REG_HSBLNK) && data != tms34010_io_register_r(machine, offset, 0)) | |
| 740 | if ((offset == REG_HEBLNK || offset == REG_HSBLNK) && data != tms34010_io_register_r(machine, offset, 0xffff)) | |
| 741 | 741 | video_screen_update_partial(machine->primary_screen, video_screen_get_vpos(machine->primary_screen) - 1); |
| 742 | 742 | |
| 743 | 743 | tms34010_io_register_w(machine, offset, data, mem_mask); |
| r2454 | r2455 | |
|---|---|---|
| 86 | 86 | switch( offset ) |
| 87 | 87 | { |
| 88 | 88 | case 0x00: |
| 89 | verboselog( 2, "psx irq data ( %08x, %08x ) %08x -> %08x\n", data, mem_mask, m_n_irqdata, ( m_n_irqdata & mem_mask ) | ( m_n_irqdata & m_n_irqmask & data ) ); | |
| 90 | m_n_irqdata = ( m_n_irqdata & mem_mask ) | ( m_n_irqdata & m_n_irqmask & data ); | |
| 89 | verboselog( 2, "psx irq data ( %08x, %08x ) %08x -> %08x\n", data, mem_mask, m_n_irqdata, ( m_n_irqdata & ~mem_mask ) | ( m_n_irqdata & m_n_irqmask & data ) ); | |
| 90 | m_n_irqdata = ( m_n_irqdata & ~mem_mask ) | ( m_n_irqdata & m_n_irqmask & data ); | |
| 91 | 91 | psx_irq_update(); |
| 92 | 92 | break; |
| 93 | 93 | case 0x01: |
| 94 | verboselog( 2, "psx irq mask ( %08x, %08x ) %08x -> %08x\n", data, mem_mask, m_n_irqmask, ( m_n_irqmask & mem_mask ) | data ); | |
| 95 | m_n_irqmask = ( m_n_irqmask & mem_mask ) | data; | |
| 94 | verboselog( 2, "psx irq mask ( %08x, %08x ) %08x -> %08x\n", data, mem_mask, m_n_irqmask, ( m_n_irqmask & ~mem_mask ) | data ); | |
| 95 | m_n_irqmask = ( m_n_irqmask & ~mem_mask ) | data; | |
| 96 | 96 | if( ( m_n_irqmask & ~( 0x1 | 0x08 | 0x10 | 0x20 | 0x40 | 0x80 | 0x100 | 0x200 | 0x400 ) ) != 0 ) |
| 97 | 97 | { |
| 98 | 98 | verboselog( 0, "psx_irq_w( %08x, %08x, %08x ) unknown irq\n", offset, data, mem_mask ); |
| r2454 | r2455 | |
| 403 | 403 | { |
| 404 | 404 | case 0x0: |
| 405 | 405 | verboselog( 1, "psx_dma_w( %04x, %08x, %08x ) dpcp\n", offset, data, mem_mask ); |
| 406 | m_n_dpcp = ( m_n_dpcp & mem_mask ) | data; | |
| 406 | m_n_dpcp = ( m_n_dpcp & ~mem_mask ) | data; | |
| 407 | 407 | break; |
| 408 | 408 | case 0x1: |
| 409 | m_n_dicr = ( m_n_dicr & mem_mask ) | | |
| 410 | ( ~mem_mask & 0x80000000 & m_n_dicr ) | | |
| 411 | ( ~data & ~mem_mask & 0x7f000000 & m_n_dicr ) | | |
| 412 | ( data & ~mem_mask & 0x00ffffff ); | |
| 409 | m_n_dicr = ( m_n_dicr & ~mem_mask ) | | |
| 410 | ( mem_mask & 0x80000000 & m_n_dicr ) | | |
| 411 | ( ~data & mem_mask & 0x7f000000 & m_n_dicr ) | | |
| 412 | ( data & mem_mask & 0x00ffffff ); | |
| 413 | 413 | /* todo: find out whether to do this instead of dma_interrupt_update() |
| 414 | 414 | |
| 415 | 415 | if( ( m_n_dicr & 0x7f000000 ) != 0 ) |
| r2454 | r2455 | |
|---|---|---|
| 527 | 527 | robocop_shared_ram[offset]=data&0xff; |
| 528 | 528 | |
| 529 | 529 | if (offset==0x7ff) /* A control address - not standard ram */ |
| 530 | cpunum_set_input_line( | |
| 530 | cpunum_set_input_line(machine, 2,0,HOLD_LINE); | |
| 531 | 531 | } |
| 532 | 532 | |
| 533 | 533 | /******************************************************************************/ |
| r2454 | r2455 | |
|---|---|---|
| 61 | 61 | static WRITE8_HANDLER( b_via_0_pa_w ) |
| 62 | 62 | { |
| 63 | 63 | if ((data & 0x08) == 0) |
| 64 | cpunum_set_input_line( | |
| 64 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, ASSERT_LINE); | |
| 65 | 65 | else |
| 66 | cpunum_set_input_line( | |
| 66 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, CLEAR_LINE); | |
| 67 | 67 | |
| 68 | 68 | if ((data & 0x04) == 0) |
| 69 | 69 | { |
| r2454 | r2455 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | #include "deprecat.h" | |
| 3 | 2 | #include "cpu/z80/z80.h" |
| 4 | 3 | |
| 5 | 4 | |
| r2454 | r2455 | |
| 32 | 31 | sound_nmi_enable = 1; |
| 33 | 32 | if (pending_nmi) |
| 34 | 33 | { |
| 35 | cpunum_set_input_line( | |
| 34 | cpunum_set_input_line(machine, 1,INPUT_LINE_NMI,PULSE_LINE); | |
| 36 | 35 | pending_nmi = 0; |
| 37 | 36 | } |
| 38 | 37 | } |
| r2454 | r2455 | |
| 145 | 144 | if ((ddrB & 0x02) && (~data & 0x02) && (portB_out & 0x02)) |
| 146 | 145 | { |
| 147 | 146 | portA_in = from_main; |
| 148 | if (main_sent) cpunum_set_input_line( | |
| 147 | if (main_sent) cpunum_set_input_line(machine, 2,0,CLEAR_LINE); | |
| 149 | 148 | main_sent = 0; |
| 150 | 149 | //logerror("read command %02x from main cpu\n",portA_in); |
| 151 | 150 | } |
| r2454 | r2455 | |
| 169 | 168 | //logerror("%04x: mcu_w %02x\n",activecpu_get_pc(),data); |
| 170 | 169 | from_main = data; |
| 171 | 170 | main_sent = 1; |
| 172 | cpunum_set_input_line( | |
| 171 | cpunum_set_input_line(machine, 2,0,ASSERT_LINE); | |
| 173 | 172 | } |
| 174 | 173 | |
| 175 | 174 | READ8_HANDLER( lsasquad_mcu_r ) |
| r2454 | r2455 | |
|---|---|---|
| 863 | 863 | static READ8_HANDLER( lottofun_input_port_0_r ) |
| 864 | 864 | { |
| 865 | 865 | /* merge in the ticket dispenser status */ |
| 866 | return input_port_ | |
| 866 | return input_port_ | |
| 867 | 867 | } |
| 868 | 868 | |
| 869 | 869 |
| r2454 | r2455 | |
|---|---|---|
| 10 | 10 | ***************************************************************************/ |
| 11 | 11 | |
| 12 | 12 | #include "driver.h" |
| 13 | #include "deprecat.h" | |
| 14 | 13 | #include "cpu/m6809/m6809.h" |
| 15 | 14 | #include "namcond1.h" |
| 16 | 15 | |
| r2454 | r2455 | |
| 98 | 97 | // this is a kludge until we emulate the h8 |
| 99 | 98 | if ((namcond1_h8_irq5_enabled == 0) && (data != 0x0000)) |
| 100 | 99 | { |
| 101 | cpunum_set_input_line( | |
| 100 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, CLEAR_LINE); | |
| 102 | 101 | } |
| 103 | 102 | namcond1_h8_irq5_enabled = ( data != 0x0000 ); |
| 104 | 103 | break; |
| r2454 | r2455 | |
|---|---|---|
| 152 | 152 | (sign_x_2 >> 6) | |
| 153 | 153 | (sign_y_1 >> 5) | |
| 154 | 154 | (sign_x_1 >> 4) | |
| 155 | input_port_ | |
| 155 | input_port_ | |
| 156 | 156 | return val; |
| 157 | 157 | } |
| 158 | 158 | else |
| r2454 | r2455 | |
| 184 | 184 | { |
| 185 | 185 | if ((CTRLD & 0x20)==0x00) |
| 186 | 186 | { |
| 187 | return input_port_ | |
| 187 | return input_port_ | |
| 188 | 188 | } |
| 189 | 189 | else |
| 190 | 190 | { |
| r2454 | r2455 | |
| 282 | 282 | { |
| 283 | 283 | if ((CTRLD & 0x40)==0x00) |
| 284 | 284 | { |
| 285 | return input_port_ | |
| 285 | return input_port_ | |
| 286 | 286 | } |
| 287 | 287 | else if ((CTRLD & 0x60) == 0x60) |
| 288 | 288 | /* LD1 and LD2 both high, return Team 2 right player (player 3) */ |
| r2454 | r2455 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | #include "deprecat.h" | |
| 3 | 2 | #include "video/konamiic.h" |
| 4 | 3 | #include "cpu/konami/konami.h" |
| 5 | 4 | #include "machine/eeprom.h" |
| r2454 | r2455 | |
|---|---|---|
| 29 | 29 | INTERRUPT_GEN( subs_interrupt ) |
| 30 | 30 | { |
| 31 | 31 | /* only do NMI interrupt if not in TEST mode */ |
| 32 | if ((input_port_ | |
| 32 | if ((input_port_ | |
| 33 | 33 | cpunum_set_input_line(machine, 0,INPUT_LINE_NMI,PULSE_LINE); |
| 34 | 34 | } |
| 35 | 35 | |
| r2454 | r2455 | |
| 46 | 46 | int this_val; |
| 47 | 47 | int delta; |
| 48 | 48 | |
| 49 | this_val=input_port_ | |
| 49 | this_val=input_port_ | |
| 50 | 50 | |
| 51 | 51 | delta=this_val-last_val; |
| 52 | 52 | last_val=this_val; |
| r2454 | r2455 | |
| 112 | 112 | ***************************************************************************/ |
| 113 | 113 | READ8_HANDLER( subs_control_r ) |
| 114 | 114 | { |
| 115 | int inport = input_port_ | |
| 115 | int inport = input_port_ | |
| 116 | 116 | |
| 117 | 117 | switch (offset & 0x07) |
| 118 | 118 | { |
| r2454 | r2455 | |
| 134 | 134 | ***************************************************************************/ |
| 135 | 135 | READ8_HANDLER( subs_coin_r ) |
| 136 | 136 | { |
| 137 | int inport = input_port_ | |
| 137 | int inport = input_port_ | |
| 138 | 138 | |
| 139 | 139 | switch (offset & 0x07) |
| 140 | 140 | { |
| r2454 | r2455 | |
| 156 | 156 | ***************************************************************************/ |
| 157 | 157 | READ8_HANDLER( subs_options_r ) |
| 158 | 158 | { |
| 159 | int opts = input_port_ | |
| 159 | int opts = input_port_ | |
| 160 | 160 | |
| 161 | 161 | switch (offset & 0x03) |
| 162 | 162 | { |
| r2454 | r2455 | |
|---|---|---|
| 768 | 768 | //case (0x5b4/2): |
| 769 | 769 | // return cop_mcu_ram[offset]; |
| 770 | 770 | |
| 771 | case (0x700/2): return input_port_1_word_r(machine,0,0); | |
| 772 | case (0x704/2): return input_port_2_word_r(machine,0,0); | |
| 773 | case (0x708/2): return input_port_4_word_r(machine,0,0); | |
| 774 | case (0x70c/2): return input_port_3_word_r(machine,0,0); | |
| 775 | case (0x71c/2): return input_port_5_word_r(machine,0,0); | |
| 771 | case (0x700/2): return input_port_read_indexed(machine,1); | |
| 772 | case (0x704/2): return input_port_read_indexed(machine,2); | |
| 773 | case (0x708/2): return input_port_read_indexed(machine,4); | |
| 774 | case (0x70c/2): return input_port_read_indexed(machine,3); | |
| 775 | case (0x71c/2): return input_port_read_indexed(machine,5); | |
| 776 | 776 | } |
| 777 | 777 | } |
| 778 | 778 | |
| r2454 | r2455 | |
| 892 | 892 | /*case (0x740/2): |
| 893 | 893 | { |
| 894 | 894 | soundlatch_w(1,data&0x00ff); |
| 895 | cpunum_set_input_line( | |
| 895 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, PULSE_LINE ); | |
| 896 | 896 | break; |
| 897 | 897 | }*/ |
| 898 | 898 | } |
| r2454 | r2455 | |
| 1313 | 1313 | *********************************************************************/ |
| 1314 | 1314 | |
| 1315 | 1315 | /* Seibu Sound System */ |
| 1316 | case (0x3c8/2): return seibu_main_word_r(machine,2,0); | |
| 1317 | case (0x3cc/2): return seibu_main_word_r(machine,3,0); | |
| 1318 | case (0x3d4/2): return seibu_main_word_r(machine,5,0); | |
| 1316 | case (0x3c8/2): return seibu_main_word_r(machine,2,0xffff); | |
| 1317 | case (0x3cc/2): return seibu_main_word_r(machine,3,0xffff); | |
| 1318 | case (0x3d4/2): return seibu_main_word_r(machine,5,0xffff); | |
| 1319 | 1319 | |
| 1320 | 1320 | /* Inputs */ |
| 1321 | case (0x340/2): return input_port_1_word_r(machine,0,0); | |
| 1322 | case (0x344/2): return input_port_2_word_r(machine,0,0); | |
| 1323 | case (0x348/2): return input_port_4_word_r(machine,0,0); | |
| 1324 | case (0x34c/2): return input_port_3_word_r(machine,0,0); | |
| 1321 | case (0x340/2): return input_port_read_indexed(machine,1); | |
| 1322 | case (0x344/2): return input_port_read_indexed(machine,2); | |
| 1323 | case (0x348/2): return input_port_read_indexed(machine,4); | |
| 1324 | case (0x34c/2): return input_port_read_indexed(machine,3); | |
| 1325 | 1325 | |
| 1326 | 1326 | } |
| 1327 | 1327 | } |
| r2454 | r2455 | |
| 1397 | 1397 | 700-7ff - Output (Seibu Sound System) |
| 1398 | 1398 | *********************************************************************/ |
| 1399 | 1399 | |
| 1400 | case (0x3c0/2): { seibu_main_word_w(machine,0,cop_mcu_ram[offset],0xff00); break; } | |
| 1401 | case (0x3c4/2): { seibu_main_word_w(machine,1,cop_mcu_ram[offset],0xff00); break; } | |
| 1402 | case (0x3d0/2): { seibu_main_word_w(machine,4,cop_mcu_ram[offset],0xff00); break; } | |
| 1403 | case (0x3d8/2): { seibu_main_word_w(machine,6,cop_mcu_ram[offset],0xff00); break; } | |
| 1400 | case (0x3c0/2): { seibu_main_word_w(machine,0,cop_mcu_ram[offset],0x00ff); break; } | |
| 1401 | case (0x3c4/2): { seibu_main_word_w(machine,1,cop_mcu_ram[offset],0x00ff); break; } | |
| 1402 | case (0x3d0/2): { seibu_main_word_w(machine,4,cop_mcu_ram[offset],0x00ff); break; } | |
| 1403 | case (0x3d8/2): { seibu_main_word_w(machine,6,cop_mcu_ram[offset],0x00ff); break; } | |
| 1404 | 1404 | } |
| 1405 | 1405 | } |
| 1406 | 1406 | |
| r2454 | r2455 | |
| 1424 | 1424 | |
| 1425 | 1425 | /* returning 0xffff for some inputs for now, breaks coinage but |
| 1426 | 1426 | allows cupsoc to boot */ |
| 1427 | case (0x300/2): return input_port_1_word_r(machine,0,0); | |
| 1428 | case (0x304/2): return input_port_2_word_r(machine,0,0); | |
| 1429 | case (0x308/2): return input_port_4_word_r(machine,0,0); | |
| 1430 | case (0x30c/2): return input_port_3_word_r(machine,0,0); | |
| 1427 | case (0x300/2): return input_port_read_indexed(machine,1); | |
| 1428 | case (0x304/2): return input_port_read_indexed(machine,2); | |
| 1429 | case (0x308/2): return input_port_read_indexed(machine,4); | |
| 1430 | case (0x30c/2): return input_port_read_indexed(machine,3); | |
| 1431 | 1431 | case (0x314/2): return 0xffff; |
| 1432 | case (0x31c/2): return input_port_ | |
| 1432 | case (0x31c/2): return input_port_ | |
| 1433 | 1433 | |
| 1434 | 1434 | case (0x340/2): return 0xffff; |
| 1435 | 1435 | case (0x344/2): return 0xffff; |
| 1436 | case (0x348/2): return 0xffff;//seibu_main_word_r(machine,2,0); | |
| 1437 | case (0x34c/2): return 0xffff;//seibu_main_word_r(machine,3,0); | |
| 1438 | case (0x354/2): return 0xffff;//seibu_main_word_r(machine,5,0); | |
| 1436 | case (0x348/2): return 0xffff;//seibu_main_word_r(machine,2,0xffff); | |
| 1437 | case (0x34c/2): return 0xffff;//seibu_main_word_r(machine,3,0xffff); | |
| 1438 | case (0x354/2): return 0xffff;//seibu_main_word_r(machine,5,0xffff); | |
| 1439 | 1439 | case (0x35c/2): return 0xffff; |
| 1440 | 1440 | } |
| 1441 | 1441 | } |
| r2454 | r2455 | |
| 1551 | 1551 | case (0x238/2): { legionna_scrollram16[6] = cop_mcu_ram[offset]; break; } |
| 1552 | 1552 | case (0x23a/2): { legionna_scrollram16[7] = cop_mcu_ram[offset]; break; } |
| 1553 | 1553 | |
| 1554 | case (0x340/2): { seibu_main_word_w(machine,0,cop_mcu_ram[offset],0xff00); break; } | |
| 1555 | case (0x344/2): { seibu_main_word_w(machine,1,cop_mcu_ram[offset],0xff00); break; } | |
| 1556 | case (0x350/2): { seibu_main_word_w(machine,4,cop_mcu_ram[offset],0xff00); break; } | |
| 1557 | case (0x358/2): { seibu_main_word_w(machine,6,cop_mcu_ram[offset],0xff00); break; } | |
| 1554 | case (0x340/2): { seibu_main_word_w(machine,0,cop_mcu_ram[offset],0x00ff); break; } | |
| 1555 | case (0x344/2): { seibu_main_word_w(machine,1,cop_mcu_ram[offset],0x00ff); break; } | |
| 1556 | case (0x350/2): { seibu_main_word_w(machine,4,cop_mcu_ram[offset],0x00ff); break; } | |
| 1557 | case (0x358/2): { seibu_main_word_w(machine,6,cop_mcu_ram[offset],0x00ff); break; } | |
| 1558 | 1558 | } |
| 1559 | 1559 | } |
| 1560 | 1560 | |
| r2454 | r2455 | |
| 1571 | 1571 | break; |
| 1572 | 1572 | |
| 1573 | 1573 | /* Non-protection reads */ |
| 1574 | case (0x308/2): return seibu_main_word_r(machine,2,0); | |
| 1575 | case (0x30c/2): return seibu_main_word_r(machine,3,0); | |
| 1576 | case (0x314/2): return seibu_main_word_r(machine,5,0); | |
| 1574 | case (0x308/2): return seibu_main_word_r(machine,2,0xffff); | |
| 1575 | case (0x30c/2): return seibu_main_word_r(machine,3,0xffff); | |
| 1576 | case (0x314/2): return seibu_main_word_r(machine,5,0xffff); | |
| 1577 | 1577 | |
| 1578 | 1578 | /* Inputs */ |
| 1579 | case (0x340/2): return input_port_1_word_r(machine,0,0); | |
| 1580 | case (0x344/2): return input_port_2_word_r(machine,0,0); | |
| 1581 | case (0x348/2): return input_port_4_word_r(machine,0,0); | |
| 1582 | case (0x34c/2): return input_port_3_word_r(machine,0,0); | |
| 1579 | case (0x340/2): return input_port_read_indexed(machine,1); | |
| 1580 | case (0x344/2): return input_port_read_indexed(machine,2); | |
| 1581 | case (0x348/2): return input_port_read_indexed(machine,4); | |
| 1582 | case (0x34c/2): return input_port_read_indexed(machine,3); | |
| 1583 | 1583 | } |
| 1584 | 1584 | } |
| 1585 | 1585 | |
| r2454 | r2455 | |
| 1601 | 1601 | case (0x228/2): { legionna_scrollram16[4] = cop_mcu_ram[offset]; break; } |
| 1602 | 1602 | case (0x22a/2): { legionna_scrollram16[5] = cop_mcu_ram[offset]; break; } |
| 1603 | 1603 | |
| 1604 | case (0x300/2): { seibu_main_word_w(machine,0,cop_mcu_ram[offset],0xff00); break; } | |
| 1605 | case (0x304/2): { seibu_main_word_w(machine,1,cop_mcu_ram[offset],0xff00); break; } | |
| 1606 | case (0x310/2): { seibu_main_word_w(machine,4,cop_mcu_ram[offset],0xff00); break; } | |
| 1607 | case (0x318/2): { seibu_main_word_w(machine,6,cop_mcu_ram[offset],0xff00); break; } | |
| 1604 | case (0x300/2): { seibu_main_word_w(machine,0,cop_mcu_ram[offset],0x00ff); break; } | |
| 1605 | case (0x304/2): { seibu_main_word_w(machine,1,cop_mcu_ram[offset],0x00ff); break; } | |
| 1606 | case (0x310/2): { seibu_main_word_w(machine,4,cop_mcu_ram[offset],0x00ff); break; } | |
| 1607 | case (0x318/2): { seibu_main_word_w(machine,6,cop_mcu_ram[offset],0x00ff); break; } | |
| 1608 | 1608 | } |
| 1609 | 1609 | } |
| 1610 | 1610 | |
| r2454 | r2455 | |
| 1622 | 1622 | |
| 1623 | 1623 | /* Non-protection reads */ |
| 1624 | 1624 | |
| 1625 | case (0x308/2): return seibu_main_word_r(machine,2,0); | |
| 1626 | case (0x30c/2): return seibu_main_word_r(machine,3,0); | |
| 1627 | case (0x314/2): return seibu_main_word_r(machine,5,0); | |
| 1625 | case (0x308/2): return seibu_main_word_r(machine,2,0xffff); | |
| 1626 | case (0x30c/2): return seibu_main_word_r(machine,3,0xffff); | |
| 1627 | case (0x314/2): return seibu_main_word_r(machine,5,0xffff); | |
| 1628 | 1628 | |
| 1629 | 1629 | /* Inputs */ |
| 1630 | case (0x340/2): return input_port_1_word_r(machine,0,0); | |
| 1631 | case (0x344/2): return input_port_2_word_r(machine,0,0); | |
| 1632 | case (0x348/2): return input_port_4_word_r(machine,0,0); | |
| 1633 | case (0x34c/2): return input_port_3_word_r(machine,0,0); | |
| 1634 | case (0x35c/2): return input_port_5_word_r(machine,0,0); | |
| 1630 | case (0x340/2): return input_port_read_indexed(machine,1); | |
| 1631 | case (0x344/2): return input_port_read_indexed(machine,2); | |
| 1632 | case (0x348/2): return input_port_read_indexed(machine,4); | |
| 1633 | case (0x34c/2): return input_port_read_indexed(machine,3); | |
| 1634 | case (0x35c/2): return input_port_read_indexed(machine,5); | |
| 1635 | 1635 | } |
| 1636 | 1636 | } |
| 1637 | 1637 | |
| r2454 | r2455 | |
| 1654 | 1654 | case (0x228/2): { legionna_scrollram16[4] = cop_mcu_ram[offset]; break; } |
| 1655 | 1655 | case (0x22a/2): { legionna_scrollram16[5] = cop_mcu_ram[offset]; break; } |
| 1656 | 1656 | |
| 1657 | case (0x300/2): { seibu_main_word_w(machine,0,cop_mcu_ram[offset],0xff00); break; } | |
| 1658 | case (0x304/2): { seibu_main_word_w(machine,1,cop_mcu_ram[offset],0xff00); break; } | |
| 1659 | case (0x310/2): { seibu_main_word_w(machine,4,cop_mcu_ram[offset],0xff00); break; } | |
| 1660 | case (0x318/2): { seibu_main_word_w(machine,6,cop_mcu_ram[offset],0xff00); break; } | |
| 1657 | case (0x300/2): { seibu_main_word_w(machine,0,cop_mcu_ram[offset],0x00ff); break; } | |
| 1658 | case (0x304/2): { seibu_main_word_w(machine,1,cop_mcu_ram[offset],0x00ff); break; } | |
| 1659 | case (0x310/2): { seibu_main_word_w(machine,4,cop_mcu_ram[offset],0x00ff); break; } | |
| 1660 | case (0x318/2): { seibu_main_word_w(machine,6,cop_mcu_ram[offset],0x00ff); break; } | |
| 1661 | 1661 | |
| 1662 | 1662 | } |
| 1663 | 1663 | } |
| r2454 | r2455 | |
| 1688 | 1688 | return cop_mcu_ram[offset]; |
| 1689 | 1689 | |
| 1690 | 1690 | /* Non-protection reads */ |
| 1691 | case (0x308/2): return seibu_main_word_r(machine,2,0); | |
| 1692 | case (0x30c/2): return seibu_main_word_r(machine,3,0); | |
| 1693 | case (0x314/2): return seibu_main_word_r(machine,5,0); | |
| 1691 | case (0x308/2): return seibu_main_word_r(machine,2,0xffff); | |
| 1692 | case (0x30c/2): return seibu_main_word_r(machine,3,0xffff); | |
| 1693 | case (0x314/2): return seibu_main_word_r(machine,5,0xffff); | |
| 1694 | 1694 | |
| 1695 | 1695 | /* Inputs */ |
| 1696 | case (0x340/2): return input_port_1_word_r(machine,0,0); | |
| 1697 | case (0x344/2): return input_port_2_word_r(machine,0,0); | |
| 1698 | case (0x348/2): return input_port_4_word_r(machine,0,0); | |
| 1699 | case (0x34c/2): return input_port_3_word_r(machine,0,0); | |
| 1700 | case (0x35c/2): return input_port_5_word_r(machine,0,0); | |
| 1696 | case (0x340/2): return input_port_read_indexed(machine,1); | |
| 1697 | case (0x344/2): return input_port_read_indexed(machine,2); | |
| 1698 | case (0x348/2): return input_port_read_indexed(machine,4); | |
| 1699 | case (0x34c/2): return input_port_read_indexed(machine,3); | |
| 1700 | case (0x35c/2): return input_port_read_indexed(machine,5); | |
| 1701 | 1701 | } |
| 1702 | 1702 | } |
| 1703 | 1703 | |
| r2454 | r2455 | |
| 1861 | 1861 | //case (0x280/2): break; |
| 1862 | 1862 | //case (0x6fc/2): break; |
| 1863 | 1863 | |
| 1864 | case (0x300/2): { seibu_main_word_w(machine,0,cop_mcu_ram[offset],0xff00); break; } | |
| 1865 | case (0x304/2): { seibu_main_word_w(machine,1,cop_mcu_ram[offset],0xff00); break; } | |
| 1866 | case (0x310/2): { seibu_main_word_w(machine,4,cop_mcu_ram[offset],0xff00); break; } | |
| 1867 | case (0x318/2): { seibu_main_word_w(machine,6,cop_mcu_ram[offset],0xff00); break; } | |
| 1864 | case (0x300/2): { seibu_main_word_w(machine,0,cop_mcu_ram[offset],0x00ff); break; } | |
| 1865 | case (0x304/2): { seibu_main_word_w(machine,1,cop_mcu_ram[offset],0x00ff); break; } | |
| 1866 | case (0x310/2): { seibu_main_word_w(machine,4,cop_mcu_ram[offset],0x00ff); break; } | |
| 1867 | case (0x318/2): { seibu_main_word_w(machine,6,cop_mcu_ram[offset],0x00ff); break; } | |
| 1868 | 1868 | } |
| 1869 | 1869 | } |
| 1870 | 1870 | |
| r2454 | r2455 | |
| 1899 | 1899 | *********************************************************************/ |
| 1900 | 1900 | |
| 1901 | 1901 | /* Seibu Sound System */ |
| 1902 | case (0x308/2): return seibu_main_word_r(machine,2,0); | |
| 1903 | case (0x30c/2): return seibu_main_word_r(machine,3,0); | |
| 1904 | case (0x314/2): return seibu_main_word_r(machine,5,0); | |
| 1902 | case (0x308/2): return seibu_main_word_r(machine,2,0xffff); | |
| 1903 | case (0x30c/2): return seibu_main_word_r(machine,3,0xffff); | |
| 1904 | case (0x314/2): return seibu_main_word_r(machine,5,0xffff); | |
| 1905 | 1905 | |
| 1906 | 1906 | /* Inputs */ |
| 1907 | case (0x340/2): return input_port_1_word_r(machine,0,0); | |
| 1908 | case (0x344/2): return input_port_2_word_r(machine,0,0); | |
| 1909 | case (0x348/2): return input_port_0_word_r(machine,0,0); | |
| 1910 | case (0x34c/2): return input_port_3_word_r(machine,0,0); | |
| 1907 | case (0x340/2): return input_port_read_indexed(machine,1); | |
| 1908 | case (0x344/2): return input_port_read_indexed(machine,2); | |
| 1909 | case (0x348/2): return input_port_read_indexed(machine,0); | |
| 1910 | case (0x34c/2): return input_port_read_indexed(machine,3); | |
| 1911 | 1911 | |
| 1912 | 1912 | } |
| 1913 | 1913 | } |
| r2454 | r2455 | |
| 1963 | 1963 | 700-7ff - Output (Seibu Sound System) |
| 1964 | 1964 | *********************************************************************/ |
| 1965 | 1965 | |
| 1966 | case (0x300/2): { seibu_main_word_w(machine,0,cop_mcu_ram[offset],0xff00); break; } | |
| 1967 | case (0x304/2): { seibu_main_word_w(machine,1,cop_mcu_ram[offset],0xff00); break; } | |
| 1968 | case (0x310/2): { seibu_main_word_w(machine,4,cop_mcu_ram[offset],0xff00); break; } | |
| 1969 | case (0x318/2): { seibu_main_word_w(machine,6,cop_mcu_ram[offset],0xff00); break; } | |
| 1966 | case (0x300/2): { seibu_main_word_w(machine,0,cop_mcu_ram[offset],0x00ff); break; } | |
| 1967 | case (0x304/2): { seibu_main_word_w(machine,1,cop_mcu_ram[offset],0x00ff); break; } | |
| 1968 | case (0x310/2): { seibu_main_word_w(machine,4,cop_mcu_ram[offset],0x00ff); break; } | |
| 1969 | case (0x318/2): { seibu_main_word_w(machine,6,cop_mcu_ram[offset],0x00ff); break; } | |
| 1970 | 1970 | } |
| 1971 | 1971 | } |
| 1972 | 1972 | |
| r2454 | r2455 | |
| 1988 | 1988 | case (0x34c/2): return input_port_read_indexed(machine, 5) | 0xff00; |
| 1989 | 1989 | |
| 1990 | 1990 | /* Inputs */ |
| 1991 | case (0x308/2): return seibu_main_word_r(machine,2,0); | |
| 1992 | case (0x30c/2): return seibu_main_word_r(machine,3,0); | |
| 1993 | case (0x314/2): return seibu_main_word_r(machine,5,0); | |
| 1991 | case (0x308/2): return seibu_main_word_r(machine,2,0xffff); | |
| 1992 | case (0x30c/2): return seibu_main_word_r(machine,3,0xffff); | |
| 1993 | case (0x314/2): return seibu_main_word_r(machine,5,0xffff); | |
| 1994 | 1994 | |
| 1995 | 1995 | } |
| 1996 | 1996 | } |
| r2454 | r2455 | |
| 2033 | 2033 | case (0x2be/2): sprcpt_adr_w(machine,offset,data,mem_mask); break; |
| 2034 | 2034 | case (0x2ce/2): sprcpt_flags_2_w(machine,offset,data,mem_mask); break; |
| 2035 | 2035 | |
| 2036 | case (0x300/2): { seibu_main_word_w(machine,0,cop_mcu_ram[offset],0xff00); break; } | |
| 2037 | case (0x304/2): { seibu_main_word_w(machine,1,cop_mcu_ram[offset],0xff00); break; } | |
| 2038 | case (0x310/2): { seibu_main_word_w(machine,4,cop_mcu_ram[offset],0xff00); break; } | |
| 2039 | case (0x318/2): { seibu_main_word_w(machine,6,cop_mcu_ram[offset],0xff00); break; } | |
| 2036 | case (0x300/2): { seibu_main_word_w(machine,0,cop_mcu_ram[offset],0x00ff); break; } | |
| 2037 | case (0x304/2): { seibu_main_word_w(machine,1,cop_mcu_ram[offset],0x00ff); break; } | |
| 2038 | case (0x310/2): { seibu_main_word_w(machine,4,cop_mcu_ram[offset],0x00ff); break; } | |
| 2039 | case (0x318/2): { seibu_main_word_w(machine,6,cop_mcu_ram[offset],0x00ff); break; } | |
| 2040 | 2040 | |
| 2041 | 2041 | |
| 2042 | 2042 | } |
| r2454 | r2455 | |
|---|---|---|
| 8 | 8 | ***************************************************************************/ |
| 9 | 9 | |
| 10 | 10 | #include "driver.h" |
| 11 | #include "deprecat.h" | |
| 12 | 11 | |
| 13 | 12 | |
| 14 | 13 | static UINT8 from_mcu; |
| r2454 | r2455 | |
| 45 | 44 | |
| 46 | 45 | if ((ddrB & 0x02) && (~portB_out & 0x02) && (data & 0x02)) /* positive going transition of the clock */ |
| 47 | 46 | { |
| 48 | cpunum_set_input_line( | |
| 47 | cpunum_set_input_line(machine, 3,0,CLEAR_LINE); | |
| 49 | 48 | main_sent = 0; |
| 50 | 49 | |
| 51 | 50 | } |
| r2454 | r2455 | |
| 86 | 85 | { |
| 87 | 86 | portA_in = data; |
| 88 | 87 | main_sent = 1; |
| 89 | cpunum_set_input_line( | |
| 88 | cpunum_set_input_line(machine, 3,0,ASSERT_LINE); | |
| 90 | 89 | } |
| 91 | 90 | |
| 92 | 91 |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "nitedrvr.h" |
| 10 | 9 | #include "sound/discrete.h" |
| 11 | 10 |
| r2454 | r2455 | |
|---|---|---|
| 1735 | 1735 | |
| 1736 | 1736 | /* Taito "tnzs" (Seta) hardware */ |
| 1737 | 1737 | DRIVER( plumppop ) /* A98 (c) 1987 Taito Corporation (Japan) */ |
| 1738 | DRIVER( jpopnics ) /* (c)1992 NICs, based on Plump Pop code */ | |
| 1738 | 1739 | DRIVER( extrmatn ) /* B06 (c) 1987 World Games */ |
| 1739 | 1740 | DRIVER( extrmatj ) /* B06 (c) 1987 Taito Corporation (Japan)*/ |
| 1740 | 1741 | DRIVER( arknoid2 ) /* B08 (c) 1987 Taito Corporation Japan (World) */ |
| r2454 | r2455 | |
| 2277 | 2278 | DRIVER( 1942 ) /* 12/1984 (c) 1984 */ |
| 2278 | 2279 | DRIVER( 1942a ) /* 12/1984 (c) 1984 */ |
| 2279 | 2280 | DRIVER( 1942b ) /* 12/1984 (c) 1984 */ |
| 2281 | DRIVER( 1942w ) /* 12/1984 (c) 1984 + Williams Electronics license (c) 1985 */ | |
| 2280 | 2282 | DRIVER( exedexes ) /* 2/1985 (c) 1985 */ |
| 2281 | 2283 | DRIVER( savgbees ) /* 2/1985 (c) 1985 + Memetron license */ |
| 2282 | 2284 | DRIVER( commando ) /* 5/1985 (c) 1985 (World) */ |
| r2454 | r2455 | |
| 2288 | 2290 | DRIVER( gng ) /* 9/1985 (c) 1985 */ |
| 2289 | 2291 | DRIVER( gnga ) /* 9/1985 (c) 1985 */ |
| 2290 | 2292 | DRIVER( gngbl ) /* bootleg */ |
| 2293 | DRIVER( gngblita ) /* bootleg */ | |
| 2291 | 2294 | DRIVER( gngt ) /* 9/1985 (c) 1985 */ |
| 2292 | 2295 | DRIVER( makaimur ) /* 9/1985 (c) 1985 */ |
| 2293 | 2296 | DRIVER( makaimuc ) /* 9/1985 (c) 1985 */ |
| r2454 | r2455 | |
| 4394 | 4397 | DRIVER( solomonj ) /* (c) 1986 Tecmo */ |
| 4395 | 4398 | DRIVER( rygar ) /* 6002 - (c) 1986 Tecmo */ |
| 4396 | 4399 | DRIVER( rygar2 ) /* 6002 - (c) 1986 Tecmo */ |
| 4400 | DRIVER( rygar3 ) /* 6002 - (c) 1986 Tecmo */ | |
| 4397 | 4401 | DRIVER( rygarj ) /* 6002 - (c) 1986 Tecmo */ |
| 4398 | 4402 | DRIVER( gemini ) /* (c) 1987 Tecmo */ |
| 4399 | 4403 | DRIVER( silkworm ) /* 6217 - (c) 1988 Tecmo */ |
| r2454 | r2455 | |
| 7867 | 7871 | DRIVER( jokercrd ) /* (c) 1993 Vesely Svet */ |
| 7868 | 7872 | DRIVER( mongolnw ) /* 199? bootleg */ |
| 7869 | 7873 | DRIVER( soccernw ) /* 199? bootleg */ |
| 7870 | DRIVER( snookr10 ) /* (c) 1998 Sandiy */ | |
| 7871 | 7874 | DRIVER( saloon ) /* 199? unknown */ |
| 7872 | 7875 | |
| 7876 | /* Sandii' */ | |
| 7877 | DRIVER( snookr10 ) /* (c) 1998 Sandii' */ | |
| 7878 | DRIVER( apple10 ) /* (c) 1998 Sandii' */ | |
| 7879 | DRIVER( tenballs ) /* 1997 unknown */ | |
| 7880 | ||
| 7873 | 7881 | DRIVER( vroulet ) /* (c) 1989 World Game */ |
| 7874 | 7882 | DRIVER( rcasino ) /* (c) 1984 Dyna Electronics */ |
| 7875 | 7883 | DRIVER( cmv801 ) /* (c) 198? Corsica */ |
| r2454 | r2455 | |
|---|---|---|
| 15 | 15 | |
| 16 | 16 | extern const struct QSound_interface qsound_interface; |
| 17 | 17 | |
| 18 | READ16_HANDLER( cps1_ | |
| 18 | READ16_HANDLER( cps1_dsw | |
| 19 | 19 | READ16_HANDLER( cps1_in1_r ); |
| 20 | 20 | READ16_HANDLER( cps1_in2_r ); |
| 21 | 21 | READ16_HANDLER( cps1_in3_r ); |
| r2454 | r2455 | |
| 45 | 45 | extern int cps1_scancalls; |
| 46 | 46 | |
| 47 | 47 | extern UINT16 *cps1_gfxram; /* Video RAM */ |
| 48 | extern UINT16 *cps1_output; /* Output ports */ | |
| 48 | extern UINT16 *cps1_cps_a_regs; | |
| 49 | extern UINT16 *cps1_cps_b_regs; | |
| 49 | 50 | extern size_t cps1_gfxram_size; |
| 50 | extern size_t cps1_output_size; | |
| 51 | 51 | |
| 52 | 52 | extern UINT16 *cps1_other; |
| 53 | 53 | extern tilemap *cps1_bg_tilemap[3]; |
| r2454 | r2455 | |
| 60 | 60 | extern UINT16 *cps2_output; |
| 61 | 61 | extern size_t cps2_output_size; |
| 62 | 62 | |
| 63 | int cps1_port(int offset); | |
| 64 | READ16_HANDLER( cps1_output_r ); | |
| 65 | WRITE16_HANDLER( cps1_output_w ); | |
| 63 | WRITE16_HANDLER( cps1_cps_a_w ); | |
| 64 | WRITE16_HANDLER( cps1_cps_b_w ); | |
| 65 | READ16_HANDLER( cps1_cps_b_r ); | |
| 66 | 66 | |
| 67 | 67 | DRIVER_INIT( cps1 ); |
| 68 | 68 | DRIVER_INIT( cps2_video ); |
| r2454 | r2455 | |
|---|---|---|
| 18 | 18 | WRITE8_HANDLER( m62_hscroll_high_w ); |
| 19 | 19 | WRITE8_HANDLER( m62_vscroll_low_w ); |
| 20 | 20 | WRITE8_HANDLER( m62_vscroll_high_w ); |
| 21 | WRITE8_HANDLER( ldrun3_topbottom_mask_w ); | |
| 21 | 22 | extern UINT8 *m62_tileram; |
| 22 | 23 | extern UINT8 *m62_textram; |
| 23 | 24 | |
| r2454 | r2455 | |
| 30 | 31 | |
| 31 | 32 | VIDEO_START( ldrun2 ); |
| 32 | 33 | |
| 34 | VIDEO_UPDATE( ldrun3 ); | |
| 35 | ||
| 33 | 36 | VIDEO_START( battroad ); |
| 34 | 37 | VIDEO_UPDATE( battroad ); |
| 35 | 38 |
| r2454 | r2455 | |
|---|---|---|
| 29 | 29 | |
| 30 | 30 | /*----------- defined in drivers/tx1.c -----------*/ |
| 31 | 31 | extern UINT16 *tx1_math_ram; |
| 32 | extern const ppi8255_interface tx1_ppi8255_intf; | |
| 33 | extern const ppi8255_interface buggyboy_ppi8255_intf; | |
| 34 | 32 | |
| 35 | 33 | /*----------- defined in machine/tx1.c -----------*/ |
| 36 | 34 | READ16_HANDLER( tx1_spcs_rom_r ); |
| r2454 | r2455 | |
|---|---|---|
| 11 | 11 | |
| 12 | 12 | ***************************************************************************/ |
| 13 | 13 | |
| 14 | #include "machine/8255ppi.h" | |
| 15 | ||
| 14 | 16 | /*----------- defined in video/galaxian.c -----------*/ |
| 15 | 17 | |
| 16 | 18 | extern UINT8 *galaxold_videoram; |
| r2454 | r2455 | |
| 152 | 154 | |
| 153 | 155 | /*----------- defined in machine/scramble.c -----------*/ |
| 154 | 156 | |
| 157 | extern const ppi8255_interface scramble_ppi_ppi8255_intf[2]; | |
| 158 | extern const ppi8255_interface stratgyx_ppi8255_intf[2]; | |
| 159 | extern const ppi8255_interface moonwar_ppi8255_intf[2]; | |
| 160 | extern const ppi8255_interface darkplnt_ppi8255_intf[2]; | |
| 161 | extern const ppi8255_interface scramble_ppi8255_intf[2]; | |
| 162 | extern const ppi8255_interface ckongs_ppi8255_intf[2]; | |
| 163 | extern const ppi8255_interface mars_ppi8255_intf[2]; | |
| 164 | extern const ppi8255_interface mrkougar_ppi8255_intf[2]; | |
| 165 | ||
| 166 | ||
| 155 | 167 | DRIVER_INIT( scramble_ppi ); |
| 156 | DRIVER_INIT( amidar ); | |
| 168 | DRIVER_INIT( scobra ); | |
| 169 | DRIVER_INIT( atlantis ); | |
| 170 | DRIVER_INIT( scramble ); | |
| 171 | DRIVER_INIT( stratgyx ); | |
| 172 | DRIVER_INIT( tazmani2 ); | |
| 173 | DRIVER_INIT( ckongs ); | |
| 174 | DRIVER_INIT( mariner ); | |
| 157 | 175 | DRIVER_INIT( frogger ); |
| 158 | 176 | DRIVER_INIT( froggers ); |
| 159 | DRIVER_INIT( scobra ); | |
| 160 | DRIVER_INIT( stratgyx ); | |
| 177 | DRIVER_INIT( devilfsh ); | |
| 178 | DRIVER_INIT( mars ); | |
| 179 | DRIVER_INIT( hotshock ); | |
| 180 | DRIVER_INIT( cavelon ); | |
| 161 | 181 | DRIVER_INIT( moonwar ); |
| 162 | 182 | DRIVER_INIT( darkplnt ); |
| 163 | DRIVER_INIT( tazmani2 ); | |
| 183 | DRIVER_INIT( mimonkey ); | |
| 184 | DRIVER_INIT( mimonsco ); | |
| 185 | DRIVER_INIT( mimonscr ); | |
| 164 | 186 | DRIVER_INIT( anteater ); |
| 165 | 187 | DRIVER_INIT( rescue ); |
| 166 | 188 | DRIVER_INIT( minefld ); |
| r2454 | r2455 | |
| 168 | 190 | DRIVER_INIT( superbon ); |
| 169 | 191 | DRIVER_INIT( hustler ); |
| 170 | 192 | DRIVER_INIT( billiard ); |
| 171 | DRIVER_INIT( mimonkey ); | |
| 172 | DRIVER_INIT( mimonsco ); | |
| 173 | DRIVER_INIT( atlantis ); | |
| 174 | DRIVER_INIT( scramble ); | |
| 175 | DRIVER_INIT( scrambls ); | |
| 176 | DRIVER_INIT( theend ); | |
| 177 | DRIVER_INIT( ckongs ); | |
| 178 | DRIVER_INIT( mariner ); | |
| 179 | DRIVER_INIT( mars ); | |
| 180 | DRIVER_INIT( devilfsh ); | |
| 181 | DRIVER_INIT( hotshock ); | |
| 182 | DRIVER_INIT( cavelon ); | |
| 183 | 193 | DRIVER_INIT( mrkougar ); |
| 184 | 194 | DRIVER_INIT( mrkougb ); |
| 185 | DRIVER_INIT( mimonscr ); | |
| 186 | DRIVER_INIT( sfx ); | |
| 187 | DRIVER_INIT( monsterz ); | |
| 188 | DRIVER_INIT( scorpion ); | |
| 189 | 195 | DRIVER_INIT( ad2083 ); |
| 190 | 196 | |
| 191 | 197 | MACHINE_RESET( scramble ); |
| r2454 | r2455 | |
|---|---|---|
| 847 | 847 | $(DRIVERS)/gijoe.o $(VIDEO)/gijoe.o \ |
| 848 | 848 | $(DRIVERS)/gradius3.o $(VIDEO)/gradius3.o \ |
| 849 | 849 | $(DRIVERS)/gticlub.o $(VIDEO)/gticlub.o \ |
| 850 | $(DRIVERS)/gyruss.o $( | |
| 850 | $(DRIVERS)/gyruss.o $( | |
| 851 | 851 | $(DRIVERS)/hcastle.o $(VIDEO)/hcastle.o \ |
| 852 | 852 | $(DRIVERS)/hexion.o $(VIDEO)/hexion.o \ |
| 853 | 853 | $(DRIVERS)/hornet.o $(MACHINE)/konppc.o \ |
| r2454 | r2455 | |
| 1603 | 1603 | $(DRIVERS)/skylncr.o \ |
| 1604 | 1604 | $(DRIVERS)/sliver.o \ |
| 1605 | 1605 | $(DRIVERS)/smstrv.o \ |
| 1606 | $(DRIVERS)/snookr10.o $(VIDEO)/snookr10.o \ | |
| 1606 | 1607 | $(DRIVERS)/sprcros2.o $(VIDEO)/sprcros2.o \ |
| 1607 | 1608 | $(DRIVERS)/ssfindo.o \ |
| 1608 | 1609 | $(DRIVERS)/ssingles.o \ |
| r2454 | r2455 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | #include "deprecat.h" | |
| 3 | 2 | |
| 4 | 3 | UINT8 *blktiger_txvideoram; |
| 5 | 4 | |
| r2454 | r2455 | |
| 161 | 160 | coin_counter_w(1,data & 2); |
| 162 | 161 | |
| 163 | 162 | /* bit 5 resets the sound CPU */ |
| 164 | cpunum_set_input_line( | |
| 163 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, (data & 0x20) ? ASSERT_LINE : CLEAR_LINE); | |
| 165 | 164 | |
| 166 | 165 | /* bit 6 flips screen */ |
| 167 | 166 | flip_screen_set(data & 0x40); |
| r2454 | r2455 | |
|---|---|---|
| 1 | 1 | |
| 2 | 2 | #include "driver.h" |
| 3 | #include "deprecat.h" | |
| 4 | 3 | |
| 5 | 4 | static tilemap *bg_layer,*fg_layer,*tx_layer; |
| 6 | 5 | UINT16 *dynduke_back_data,*dynduke_fore_data,*dynduke_scroll_ram; |
| r2454 | r2455 | |
| 16 | 15 | |
| 17 | 16 | COMBINE_DATA(&paletteram16[offset]); |
| 18 | 17 | color=paletteram16[offset]; |
| 19 | palette_set_color_rgb( | |
| 18 | palette_set_color_rgb(machine,offset,pal4bit(color >> 0),pal4bit(color >> 4),pal4bit(color >> 8)); | |
| 20 | 19 | } |
| 21 | 20 | |
| 22 | 21 | WRITE16_HANDLER( dynduke_background_w ) |
| r2454 | r2455 | |
| 245 | 244 | |
| 246 | 245 | VIDEO_EOF( dynduke ) |
| 247 | 246 | { |
| 248 | buffer_spriteram16_w(machine,0,0,0); // Could be a memory location instead | |
| 247 | buffer_spriteram16_w(machine,0,0,0xffff); // Could be a memory location instead | |
| 249 | 248 | } |
| r2454 | r2455 | |
|---|---|---|
| 6 | 6 | ****************************************************************/ |
| 7 | 7 | |
| 8 | 8 | #include "driver.h" |
| 9 | #include "deprecat.h" | |
| 10 | 9 | |
| 11 | 10 | static tilemap *fg_tilemap, *bg_tilemap; |
| 12 | 11 | static UINT8 vram_bank; |
| r2454 | r2455 | |
| 141 | 140 | break; |
| 142 | 141 | } |
| 143 | 142 | |
| 144 | decodechar( | |
| 143 | decodechar(machine->gfx[2],(offset-0x400/64)&0x7f,tryout_vram_gfx); | |
| 145 | 144 | tilemap_mark_all_tiles_dirty(bg_tilemap); |
| 146 | 145 | } |
| 147 | 146 |
| r2454 | r2455 | |
|---|---|---|
| 447 | 447 | } |
| 448 | 448 | } |
| 449 | 449 | |
| 450 | static void aerfboo2_draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect,int chip,int chip_disabled_pri) | |
| 451 | { | |
| 452 | int attr_start,base,first; | |
| 453 | ||
| 454 | base = chip * 0x0200; | |
| 455 | // first = 4 * aerofgt_spriteram3[0x1fe + base]; | |
| 456 | first = 0; | |
| 457 | ||
| 458 | for (attr_start = base + 0x0200-4;attr_start >= first + base;attr_start -= 4) | |
| 459 | { | |
| 460 | int map_start; | |
| 461 | int ox,oy,x,y,xsize,ysize,zoomx,zoomy,flipx,flipy,color,pri; | |
| 462 | // some other drivers still use this wrong table, they have to be upgraded | |
| 463 | // int zoomtable[16] = { 0,7,14,20,25,30,34,38,42,46,49,52,54,57,59,61 }; | |
| 464 | ||
| 465 | if (!(aerofgt_spriteram3[attr_start + 2] & 0x0080)) continue; | |
| 466 | pri = aerofgt_spriteram3[attr_start + 2] & 0x0010; | |
| 467 | if ( chip_disabled_pri & !pri) continue; | |
| 468 | if (!chip_disabled_pri & (pri>>4)) continue; | |
| 469 | ox = aerofgt_spriteram3[attr_start + 1] & 0x01ff; | |
| 470 | xsize = (aerofgt_spriteram3[attr_start + 2] & 0x0700) >> 8; | |
| 471 | zoomx = (aerofgt_spriteram3[attr_start + 1] & 0xf000) >> 12; | |
| 472 | oy = aerofgt_spriteram3[attr_start + 0] & 0x01ff; | |
| 473 | ysize = (aerofgt_spriteram3[attr_start + 2] & 0x7000) >> 12; | |
| 474 | zoomy = (aerofgt_spriteram3[attr_start + 0] & 0xf000) >> 12; | |
| 475 | flipx = aerofgt_spriteram3[attr_start + 2] & 0x0800; | |
| 476 | flipy = aerofgt_spriteram3[attr_start + 2] & 0x8000; | |
| 477 | color = (aerofgt_spriteram3[attr_start + 2] & 0x000f) + 16 * spritepalettebank; | |
| 478 | ||
| 479 | map_start = aerofgt_spriteram3[attr_start + 3]; | |
| 480 | ||
| 481 | // aerofgt has this adjustment, but doing it here would break turbo force title screen | |
| 482 | // ox += (xsize*zoomx+2)/4; | |
| 483 | // oy += (ysize*zoomy+2)/4; | |
| 484 | ||
| 485 | zoomx = 32 - zoomx; | |
| 486 | zoomy = 32 - zoomy; | |
| 487 | ||
| 488 | for (y = 0;y <= ysize;y++) | |
| 489 | { | |
| 490 | int sx,sy; | |
| 491 | ||
| 492 | if (flipy) sy = ((oy + zoomy * (ysize - y)/2 + 16) & 0x1ff) - 16; | |
| 493 | else sy = ((oy + zoomy * y / 2 + 16) & 0x1ff) - 16; | |
| 494 | ||
| 495 | for (x = 0;x <= xsize;x++) | |
| 496 | { | |
| 497 | int code; | |
| 498 | ||
| 499 | if (flipx) sx = ((ox + zoomx * (xsize - x) / 2 + 16) & 0x1ff) - 16; | |
| 500 | else sx = ((ox + zoomx * x / 2 + 16) & 0x1ff) - 16; | |
| 501 | ||
| 502 | if (chip == 0) | |
| 503 | code = aerofgt_spriteram1[map_start % (aerofgt_spriteram1_size/2)]; | |
| 504 | else | |
| 505 | code = aerofgt_spriteram2[map_start % (aerofgt_spriteram2_size/2)]; | |
| 506 | ||
| 507 | pdrawgfxzoom(bitmap,machine->gfx[sprite_gfx + chip], | |
| 508 | code, | |
| 509 | color, | |
| 510 | flipx,flipy, | |
| 511 | sx,sy, | |
| 512 | cliprect,TRANSPARENCY_PEN,15, | |
| 513 | zoomx << 11, zoomy << 11, | |
| 514 | pri ? 0 : 2); | |
| 515 | map_start++; | |
| 516 | } | |
| 517 | ||
| 518 | if (xsize == 2) map_start += 1; | |
| 519 | if (xsize == 4) map_start += 3; | |
| 520 | if (xsize == 5) map_start += 2; | |
| 521 | if (xsize == 6) map_start += 1; | |
| 522 | } | |
| 523 | } | |
| 524 | } | |
| 525 | ||
| 450 | 526 | static void pspikesb_draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect) |
| 451 | 527 | { |
| 452 | 528 | int i; |
| r2454 | r2455 | |
| 789 | 865 | return 0; |
| 790 | 866 | } |
| 791 | 867 | |
| 868 | VIDEO_UPDATE( aerfboo2 ) | |
| 869 | { | |
| 870 | int i,scrolly; | |
| 871 | ||
| 872 | tilemap_set_scroll_rows(bg1_tilemap,512); | |
| 873 | scrolly = bg1scrolly+2; | |
| 874 | for (i = 0;i < 256;i++) | |
| 875 | // tilemap_set_scrollx(bg1_tilemap,(i + scrolly) & 0x1ff,aerofgt_rasterram[i]-11); | |
| 876 | tilemap_set_scrollx(bg1_tilemap,(i + scrolly) & 0x1ff,aerofgt_rasterram[7]-11); | |
| 877 | tilemap_set_scrolly(bg1_tilemap,0,scrolly); | |
| 878 | tilemap_set_scrollx(bg2_tilemap,0,bg2scrollx-7); | |
| 879 | tilemap_set_scrolly(bg2_tilemap,0,bg2scrolly+2); | |
| 880 | ||
| 881 | fillbitmap(priority_bitmap,0,cliprect); | |
| 882 | ||
| 883 | tilemap_draw(bitmap,cliprect,bg1_tilemap,0,0); | |
| 884 | tilemap_draw(bitmap,cliprect,bg2_tilemap,0,1); | |
| 885 | ||
| 886 | /* we use the priority buffer so sprites are drawn front to back */ | |
| 887 | aerfboo2_draw_sprites(screen->machine,bitmap,cliprect,1,-1); //ship | |
| 888 | aerfboo2_draw_sprites(screen->machine,bitmap,cliprect,1, 0); //intro | |
| 889 | aerfboo2_draw_sprites(screen->machine,bitmap,cliprect,0,-1); //enemy | |
| 890 | aerfboo2_draw_sprites(screen->machine,bitmap,cliprect,0, 0); //enemy | |
| 891 | return 0; | |
| 892 | } | |
| 893 | ||
| 792 | 894 | VIDEO_UPDATE( wbbc97 ) |
| 793 | 895 | { |
| 794 | 896 | int i,scrolly; |
| r2454 | r2455 | |
|---|---|---|
| 1221 | 1221 | if (++p3_state == 3) |
| 1222 | 1222 | { |
| 1223 | 1223 | p3_state = 0; |
| 1224 | palette_set_color_rgb( | |
| 1224 | palette_set_color_rgb(machine,ygv608.regs.s.cc, | |
| 1225 | 1225 | pal6bit(ygv608.colour_palette[ygv608.regs.s.cc][0]), |
| 1226 | 1226 | pal6bit(ygv608.colour_palette[ygv608.regs.s.cc][1]), |
| 1227 | 1227 | pal6bit(ygv608.colour_palette[ygv608.regs.s.cc][2]) ); |
| r2454 | r2455 | |
|---|---|---|
| 301 | 301 | } |
| 302 | 302 | |
| 303 | 303 | /* needed by pblbeach, it doesn't clear local coordinates in its sprite list...*/ |
| 304 | if ( !strcmp( | |
| 304 | if ( !strcmp(machine->gamedrv->name, "pblbeach") ) | |
| 305 | 305 | { |
| 306 | 306 | stvvdp1_local_x = stvvdp1_local_y = 0; |
| 307 | 307 | } |
| r2454 | r2455 | |
| 319 | 319 | if(!(stv_scu[40] & 0x2000)) /*Sprite draw end irq*/ |
| 320 | 320 | { |
| 321 | 321 | logerror( "Interrupt: Sprite draw end, Vector 0x4d, Level 0x02\n" ); |
| 322 | cpunum_set_input_line_and_vector( | |
| 322 | cpunum_set_input_line_and_vector(machine, 0, 2, HOLD_LINE , 0x4d); | |
| 323 | 323 | } |
| 324 | 324 | } |
| 325 | 325 | } |
| r2454 | r2455 | |
| 356 | 356 | |
| 357 | 357 | // if (((offset * 4) > 0xdf) && ((offset * 4) < 0x140)) |
| 358 | 358 | // { |
| 359 | // logerror("cpu #%d (PC=%08X): VRAM dword write to %08X = %08X & %08X\n", cpu_getactivecpu(), activecpu_get_pc(), offset*4, data, mem_mask | |
| 359 | // logerror("cpu #%d (PC=%08X): VRAM dword write to %08X = %08X & %08X\n", cpu_getactivecpu(), activecpu_get_pc(), offset*4, data, mem_mask | |
| 360 | 360 | // } |
| 361 | 361 | |
| 362 | 362 | data = stv_vdp1_vram[offset]; |
| r2454 | r2455 | |
|---|---|---|
| 69 | 69 | g = ((nbmj9195_palette[offset + 0] & 0xf0) >> 4); |
| 70 | 70 | b = ((nbmj9195_palette[offset + 1] & 0x0f) >> 0); |
| 71 | 71 | |
| 72 | palette_set_color_rgb( | |
| 72 | palette_set_color_rgb(machine, (offset >> 1), pal4bit(r), pal4bit(g), pal4bit(b)); | |
| 73 | 73 | } |
| 74 | 74 | } |
| 75 | 75 | |
| r2454 | r2455 | |
| 92 | 92 | g = nbmj9195_nb22090_palette[(0x100 + (offs_h * 0x300) + offs_l)]; |
| 93 | 93 | b = nbmj9195_nb22090_palette[(0x200 + (offs_h * 0x300) + offs_l)]; |
| 94 | 94 | |
| 95 | palette_set_color( | |
| 95 | palette_set_color(machine, ((offs_h * 0x100) + offs_l), MAKE_RGB(r, g, b)); | |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | /****************************************************************************** |
| r2454 | r2455 | |
|---|---|---|
| 290 | 290 | WRITE8_HANDLER( wardner_txlayer_w ) |
| 291 | 291 | { |
| 292 | 292 | int shift = 8 * (offset & 1); |
| 293 | twincobr_txoffs_w(machine, offset / 2, data << shift, 0xff | |
| 293 | twincobr_txoffs_w(machine, offset / 2, data << shift, 0xff | |
| 294 | 294 | } |
| 295 | 295 | |
| 296 | 296 | WRITE8_HANDLER( wardner_bglayer_w ) |
| 297 | 297 | { |
| 298 | 298 | int shift = 8 * (offset & 1); |
| 299 | twincobr_bgoffs_w(machine, offset / 2, data << shift, 0xff | |
| 299 | twincobr_bgoffs_w(machine, offset / 2, data << shift, 0xff | |
| 300 | 300 | } |
| 301 | 301 | |
| 302 | 302 | WRITE8_HANDLER( wardner_fglayer_w ) |
| 303 | 303 | { |
| 304 | 304 | int shift = 8 * (offset & 1); |
| 305 | twincobr_fgoffs_w(machine, offset / 2, data << shift, 0xff | |
| 305 | twincobr_fgoffs_w(machine, offset / 2, data << shift, 0xff | |
| 306 | 306 | } |
| 307 | 307 | |
| 308 | 308 | WRITE8_HANDLER( wardner_txscroll_w ) |
| 309 | 309 | { |
| 310 | 310 | int shift = 8 * (offset & 1); |
| 311 | twincobr_txscroll_w(machine, offset / 2, data << shift, 0xff | |
| 311 | twincobr_txscroll_w(machine, offset / 2, data << shift, 0xff | |
| 312 | 312 | } |
| 313 | 313 | |
| 314 | 314 | WRITE8_HANDLER( wardner_bgscroll_w ) |
| 315 | 315 | { |
| 316 | 316 | int shift = 8 * (offset & 1); |
| 317 | twincobr_bgscroll_w(machine, offset / 2, data << shift, 0xff | |
| 317 | twincobr_bgscroll_w(machine, offset / 2, data << shift, 0xff | |
| 318 | 318 | } |
| 319 | 319 | |
| 320 | 320 | WRITE8_HANDLER( wardner_fgscroll_w ) |
| 321 | 321 | { |
| 322 | 322 | int shift = 8 * (offset & 1); |
| 323 | twincobr_fgscroll_w(machine, offset / 2, data << shift, 0xff | |
| 323 | twincobr_fgscroll_w(machine, offset / 2, data << shift, 0xff | |
| 324 | 324 | } |
| 325 | 325 | |
| 326 | 326 | WRITE8_HANDLER( wardner_exscroll_w ) /* Extra unused video layer */ |
| r2454 | r2455 | |
| 338 | 338 | { |
| 339 | 339 | int shift = 8 * (offset & 1); |
| 340 | 340 | switch (offset/2) { |
| 341 | case 0: return twincobr_txram_r(machine,0,0) >> shift; break; | |
| 342 | case 1: return twincobr_bgram_r(machine,0,0) >> shift; break; | |
| 343 | case 2: return twincobr_fgram_r(machine,0,0) >> shift; break; | |
| 341 | case 0: return twincobr_txram_r(machine,0,0xffff) >> shift; break; | |
| 342 | case 1: return twincobr_bgram_r(machine,0,0xffff) >> shift; break; | |
| 343 | case 2: return twincobr_fgram_r(machine,0,0xffff) >> shift; break; | |
| 344 | 344 | } |
| 345 | 345 | return 0; |
| 346 | 346 | } |
| r2454 | r2455 | |
| 349 | 349 | { |
| 350 | 350 | int shift = 8 * (offset & 1); |
| 351 | 351 | switch (offset/2) { |
| 352 | case 0: twincobr_txram_w(machine,0,data << shift, 0xff00 >> shift); break; | |
| 353 | case 1: twincobr_bgram_w(machine,0,data << shift, 0xff00 >> shift); break; | |
| 354 | case 2: twincobr_fgram_w(machine,0,data << shift, 0xff00 >> shift); break; | |
| 352 | case 0: twincobr_txram_w(machine,0,data << shift, 0xff << shift); break; | |
| 353 | case 1: twincobr_bgram_w(machine,0,data << shift, 0xff << shift); break; | |
| 354 | case 2: twincobr_fgram_w(machine,0,data << shift, 0xff << shift); break; | |
| 355 | 355 | } |
| 356 | 356 | } |
| 357 | 357 | |
| r2454 | r2455 | |
| 517 | 517 | /* Spriteram is always 1 frame ahead, suggesting spriteram buffering. |
| 518 | 518 | There are no CPU output registers that control this so we |
| 519 | 519 | assume it happens automatically every frame, at the end of vblank */ |
| 520 | buffer_spriteram16_w(machine,0,0,0); | |
| 520 | buffer_spriteram16_w(machine,0,0,0xffff); | |
| 521 | 521 | } |
| r2454 | r2455 | |
|---|---|---|
| 72 | 72 | WRITE16_HANDLER( galpani2_palette_##_n_##_w ) \ |
| 73 | 73 | { \ |
| 74 | 74 | UINT16 newword = COMBINE_DATA(&galpani2_palette_##_n_[offset]); \ |
| 75 | palette_set_color_rgb( | |
| 75 | palette_set_color_rgb( machine, offset + 0x4000 + _n_ * 0x100, pal5bit(newword >> 5), pal5bit(newword >> 10), pal5bit(newword >> 0) ); \ | |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | galpani2_BG8_REGS_R( 0 ) |
| r2454 | r2455 | |
|---|---|---|
| 3 | 3 | */ |
| 4 | 4 | |
| 5 | 5 | #include "driver.h" |
| 6 | #include "deprecat.h" | |
| 7 | 6 | |
| 8 | 7 | static UINT8 thief_read_mask, thief_write_mask; |
| 9 | 8 | static UINT8 thief_video_control; |
| r2454 | r2455 | |
| 68 | 67 | int r = intensity[(data & 0x03) >> 0]; |
| 69 | 68 | int g = intensity[(data & 0x0C) >> 2]; |
| 70 | 69 | int b = intensity[(data & 0x30) >> 4]; |
| 71 | palette_set_color( | |
| 70 | palette_set_color( machine,offset,MAKE_RGB(r,g,b) ); | |
| 72 | 71 | } |
| 73 | 72 | |
| 74 | 73 | /***************************************************************************/ |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "ccastles.h" |
| 10 | 9 | #include "video/resnet.h" |
| 11 | 10 | |
| r2454 | r2455 | |
| 125 | 124 | bit2 = (~b >> 2) & 0x01; |
| 126 | 125 | b = combine_3_weights(bweights, bit0, bit1, bit2); |
| 127 | 126 | |
| 128 | palette_set_color( | |
| 127 | palette_set_color(machine, offset & 0x1f, MAKE_RGB(r, g, b)); | |
| 129 | 128 | } |
| 130 | 129 | |
| 131 | 130 |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "cpu/mips/r3000.h" |
| 10 | 9 | #include "policetr.h" |
| 11 | 10 | |
| r2454 | r2455 | |
| 159 | 158 | { |
| 160 | 159 | /* we assume 4-byte accesses */ |
| 161 | 160 | if (mem_mask) |
| 162 | logerror("%08X: policetr_video_w access with mask %08X\n", activecpu_get_previouspc(), | |
| 161 | logerror("%08X: policetr_video_w access with mask %08X\n", activecpu_get_previouspc(), | |
| 163 | 162 | |
| 164 | 163 | /* 4 offsets */ |
| 165 | 164 | switch (offset) |
| r2454 | r2455 | |
| 209 | 208 | |
| 210 | 209 | /* log anything else */ |
| 211 | 210 | default: |
| 212 | logerror("%08X: policetr_video_w(2) = %08X & %08X with latch %02X\n", activecpu_get_previouspc(), data, | |
| 211 | logerror("%08X: policetr_video_w(2) = %08X & %08X with latch %02X\n", activecpu_get_previouspc(), data, | |
| 213 | 212 | break; |
| 214 | 213 | } |
| 215 | 214 | break; |
| r2454 | r2455 | |
| 223 | 222 | /* latch 0x00 is unknown; 0, 1, and 2 get written into the upper 12 bits before rendering */ |
| 224 | 223 | case 0x00: |
| 225 | 224 | if (data != (0 << 20) && data != (1 << 20) && data != (2 << 20)) |
| 226 | logerror("%08X: policetr_video_w(3) = %08X & %08X with latch %02X\n", activecpu_get_previouspc(), data, | |
| 225 | logerror("%08X: policetr_video_w(3) = %08X & %08X with latch %02X\n", activecpu_get_previouspc(), data, | |
| 227 | 226 | break; |
| 228 | 227 | |
| 229 | 228 | /* latch 0x10 specifies destination bitmap X and Y offsets */ |
| r2454 | r2455 | |
| 235 | 234 | /* latch 0x20 is unknown; either 0xef or 0x100 is written every IRQ4 */ |
| 236 | 235 | case 0x20: |
| 237 | 236 | if (data != (0x100 << 12) && data != (0xef << 12)) |
| 238 | logerror("%08X: policetr_video_w(3) = %08X & %08X with latch %02X\n", activecpu_get_previouspc(), data, | |
| 237 | logerror("%08X: policetr_video_w(3) = %08X & %08X with latch %02X\n", activecpu_get_previouspc(), data, | |
| 239 | 238 | break; |
| 240 | 239 | |
| 241 | 240 | /* latch 0x40 is unknown; a 0 is written every IRQ4 */ |
| 242 | 241 | case 0x40: |
| 243 | 242 | if (data != 0) |
| 244 | logerror("%08X: policetr_video_w(3) = %08X & %08X with latch %02X\n", activecpu_get_previouspc(), data, | |
| 243 | logerror("%08X: policetr_video_w(3) = %08X & %08X with latch %02X\n", activecpu_get_previouspc(), data, | |
| 245 | 244 | break; |
| 246 | 245 | |
| 247 | 246 | /* latch 0x50 clears IRQ4 */ |
| 248 | 247 | case 0x50: |
| 249 | cpunum_set_input_line( | |
| 248 | cpunum_set_input_line(machine, 0, R3000_IRQ4, CLEAR_LINE); | |
| 250 | 249 | break; |
| 251 | 250 | |
| 252 | 251 | /* latch 0x60 clears IRQ5 */ |
| 253 | 252 | case 0x60: |
| 254 | cpunum_set_input_line( | |
| 253 | cpunum_set_input_line(machine, 0, R3000_IRQ5, CLEAR_LINE); | |
| 255 | 254 | break; |
| 256 | 255 | |
| 257 | 256 | /* log anything else */ |
| 258 | 257 | default: |
| 259 | logerror("%08X: policetr_video_w(3) = %08X & %08X with latch %02X\n", activecpu_get_previouspc(), data, | |
| 258 | logerror("%08X: policetr_video_w(3) = %08X & %08X with latch %02X\n", activecpu_get_previouspc(), data, | |
| 260 | 259 | break; |
| 261 | 260 | } |
| 262 | 261 | break; |
| r2454 | r2455 | |
| 346 | 345 | palette_data[palette_index] = (data >> 16) & 0xff; |
| 347 | 346 | if (++palette_index == 3) |
| 348 | 347 | { |
| 349 | palette_set_color( | |
| 348 | palette_set_color(machine, palette_offset, MAKE_RGB(palette_data[0], palette_data[1], palette_data[2])); | |
| 350 | 349 | palette_index = 0; |
| 351 | 350 | } |
| 352 | 351 | } |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | **************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "profiler.h" |
| 10 | 9 | #include "cpu/tms34010/tms34010.h" |
| 11 | 10 | #include "cpu/tms34010/34010ops.h" |
| r2454 | r2455 | |
| 299 | 298 | |
| 300 | 299 | COMBINE_DATA(&paletteram16[offset]); |
| 301 | 300 | newword = paletteram16[offset]; |
| 302 | palette_set_color_rgb( | |
| 301 | palette_set_color_rgb(machine, offset, pal5bit(data >> 10), pal5bit(data >> 5), pal5bit(data >> 0)); | |
| 303 | 302 | } |
| 304 | 303 | |
| 305 | 304 | |
| r2454 | r2455 | |
| 685 | 684 | |
| 686 | 685 | /* high bit triggers action */ |
| 687 | 686 | command = dma_register[DMA_COMMAND]; |
| 688 | cpunum_set_input_line( | |
| 687 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 689 | 688 | if (!(command & 0x8000)) |
| 690 | 689 | return; |
| 691 | 690 |
| r2454 | r2455 | |
|---|---|---|
| 8 | 8 | *************************************************************************/ |
| 9 | 9 | |
| 10 | 10 | #include "driver.h" |
| 11 | #include "deprecat.h" | |
| 12 | 11 | #include "system1.h" |
| 13 | 12 | |
| 14 | 13 | UINT8 *system1_scroll_y; |
| r2454 | r2455 | |
| 105 | 104 | b = pal2bit(data >> 6); |
| 106 | 105 | } |
| 107 | 106 | |
| 108 | palette_set_color( | |
| 107 | palette_set_color(machine,offset,MAKE_RGB(r,g,b)); | |
| 109 | 108 | } |
| 110 | 109 | |
| 111 | 110 | static STATE_POSTLOAD( system1_postload ) |
| r2454 | r2455 | |
|---|---|---|
| 38 | 38 | **************************************************************************/ |
| 39 | 39 | |
| 40 | 40 | #include "driver.h" |
| 41 | #include "deprecat.h" | |
| 42 | 41 | |
| 43 | 42 | /* Variables that driver has access to: */ |
| 44 | 43 | UINT16 *powerins_vram_0, *powerins_vctrl_0; |
| r2454 | r2455 | |
| 96 | 95 | int g = ((newword >> 7) & 0x1E ) | ((newword >> 2) & 0x01); |
| 97 | 96 | int b = ((newword >> 3) & 0x1E ) | ((newword >> 1) & 0x01); |
| 98 | 97 | |
| 99 | palette_set_color_rgb( | |
| 98 | palette_set_color_rgb( machine,offset, pal5bit(r),pal5bit(g),pal5bit(b) ); | |
| 100 | 99 | } |
| 101 | 100 | |
| 102 | 101 |
| r2454 | r2455 | |
|---|---|---|
| 68 | 68 | g = ((niyanpai_palette[(0x080 + (offs_h * 0x180) + offs_l)] & 0xff00) >> 8); |
| 69 | 69 | b = ((niyanpai_palette[(0x100 + (offs_h * 0x180) + offs_l)] & 0xff00) >> 8); |
| 70 | 70 | |
| 71 | palette_set_color( | |
| 71 | palette_set_color(machine, ((offs_h << 8) + (offs_l << 1) + 0), MAKE_RGB(r, g, b)); | |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | if (ACCESSING_BITS_0_7) |
| r2454 | r2455 | |
| 77 | 77 | g = ((niyanpai_palette[(0x080 + (offs_h * 0x180) + offs_l)] & 0x00ff) >> 0); |
| 78 | 78 | b = ((niyanpai_palette[(0x100 + (offs_h * 0x180) + offs_l)] & 0x00ff) >> 0); |
| 79 | 79 | |
| 80 | palette_set_color( | |
| 80 | palette_set_color(machine, ((offs_h << 8) + (offs_l << 1) + 1), MAKE_RGB(r, g, b)); | |
| 81 | 81 | } |
| 82 | 82 | } |
| 83 | 83 | } |
| r2454 | r2455 | |
|---|---|---|
| 5109 | 5109 | b = ((stv_vdp2_cram[offset] & 0x00ff0000) >> 16); |
| 5110 | 5110 | g = ((stv_vdp2_cram[offset] & 0x0000ff00) >> 8); |
| 5111 | 5111 | r = ((stv_vdp2_cram[offset] & 0x000000ff) >> 0); |
| 5112 | palette_set_color( | |
| 5112 | palette_set_color(machine,offset,MAKE_RGB(r,g,b)); | |
| 5113 | 5113 | } |
| 5114 | 5114 | break; |
| 5115 | 5115 | /*Mode 0*/ |
| r2454 | r2455 | |
| 5120 | 5120 | b = ((stv_vdp2_cram[offset] & 0x00007c00) >> 10); |
| 5121 | 5121 | g = ((stv_vdp2_cram[offset] & 0x000003e0) >> 5); |
| 5122 | 5122 | r = ((stv_vdp2_cram[offset] & 0x0000001f) >> 0); |
| 5123 | palette_set_color_rgb( | |
| 5123 | palette_set_color_rgb(machine,(offset*2)+1,pal5bit(r),pal5bit(g),pal5bit(b)); | |
| 5124 | 5124 | b = ((stv_vdp2_cram[offset] & 0x7c000000) >> 26); |
| 5125 | 5125 | g = ((stv_vdp2_cram[offset] & 0x03e00000) >> 21); |
| 5126 | 5126 | r = ((stv_vdp2_cram[offset] & 0x001f0000) >> 16); |
| 5127 | palette_set_color_rgb( | |
| 5127 | palette_set_color_rgb(machine,offset*2,pal5bit(r),pal5bit(g),pal5bit(b)); | |
| 5128 | 5128 | } |
| 5129 | 5129 | break; |
| 5130 | 5130 | /*Mode 1*/ |
| r2454 | r2455 | |
| 5135 | 5135 | b = ((stv_vdp2_cram[offset] & 0x00007c00) >> 10); |
| 5136 | 5136 | g = ((stv_vdp2_cram[offset] & 0x000003e0) >> 5); |
| 5137 | 5137 | r = ((stv_vdp2_cram[offset] & 0x0000001f) >> 0); |
| 5138 | palette_set_color_rgb( | |
| 5138 | palette_set_color_rgb(machine,(offset*2)+1,pal5bit(r),pal5bit(g),pal5bit(b)); | |
| 5139 | 5139 | b = ((stv_vdp2_cram[offset] & 0x7c000000) >> 26); |
| 5140 | 5140 | g = ((stv_vdp2_cram[offset] & 0x03e00000) >> 21); |
| 5141 | 5141 | r = ((stv_vdp2_cram[offset] & 0x001f0000) >> 16); |
| 5142 | palette_set_color_rgb( | |
| 5142 | palette_set_color_rgb(machine,offset*2,pal5bit(r),pal5bit(g),pal5bit(b)); | |
| 5143 | 5143 | } |
| 5144 | 5144 | break; |
| 5145 | 5145 | } |
| r2454 | r2455 | |
|---|---|---|
| 15 | 15 | ***************************************************************************/ |
| 16 | 16 | |
| 17 | 17 | #include "driver.h" |
| 18 | #include "deprecat.h" | |
| 19 | 18 | #include "jedi.h" |
| 20 | 19 | |
| 21 | 20 |
| r2454 | r2455 | |
|---|---|---|
| 15 | 15 | */ |
| 16 | 16 | |
| 17 | 17 | #include "driver.h" |
| 18 | #include "deprecat.h" | |
| 19 | 18 | |
| 20 | 19 | #define SUPRNOVA_DECODE_BUFFER_SIZE 0x2000 |
| 21 | 20 | |
| r2454 | r2455 | |
| 138 | 137 | r <<= 3; |
| 139 | 138 | } |
| 140 | 139 | |
| 141 | palette_set_color( | |
| 140 | palette_set_color(machine,offset,MAKE_RGB(r,g,b)); | |
| 142 | 141 | } |
| 143 | 142 | |
| 144 | 143 | |
| r2454 | r2455 | |
| 970 | 969 | |
| 971 | 970 | VIDEO_EOF(skns) |
| 972 | 971 | { |
| 973 | buffer_spriteram32_w(machine,0,0,0); | |
| 972 | buffer_spriteram32_w(machine,0,0,0xffffffff); | |
| 974 | 973 | } |
| r2454 | r2455 | |
|---|---|---|
| 26 | 26 | ***************************************************************************/ |
| 27 | 27 | |
| 28 | 28 | #include "driver.h" |
| 29 | #include "deprecat.h" | |
| 30 | 29 | #include "paradise.h" |
| 31 | 30 | |
| 32 | 31 | /* Variables that driver has access to: */ |
| r2454 | r2455 | |
| 54 | 53 | { |
| 55 | 54 | paletteram[offset] = data; |
| 56 | 55 | offset %= 0x800; |
| 57 | palette_set_color_rgb( | |
| 56 | palette_set_color_rgb(machine,offset, paletteram[offset + 0x800 * 0], | |
| 58 | 57 | paletteram[offset + 0x800 * 1], |
| 59 | 58 | paletteram[offset + 0x800 * 2] ); |
| 60 | 59 | } |
| r2454 | r2455 | |
| 87 | 86 | int bank2 = (data & 0xf0); |
| 88 | 87 | |
| 89 | 88 | for (i = 0; i < 15; i++) |
| 90 | palette_set_color_rgb( | |
| 89 | palette_set_color_rgb(machine,0x800+i, paletteram[0x200 + bank2 + i + 0x800 * 0], | |
| 91 | 90 | paletteram[0x200 + bank2 + i + 0x800 * 1], |
| 92 | 91 | paletteram[0x200 + bank2 + i + 0x800 * 2] ); |
| 93 | 92 | if (paradise_palbank != bank1) |
| r2454 | r2455 | |
|---|---|---|
| 34 | 34 | |
| 35 | 35 | WRITE16_HANDLER( volfied_video_ram_w ) |
| 36 | 36 | { |
| 37 | mem_mask | |
| 37 | mem_mask &= | |
| 38 | 38 | |
| 39 | 39 | COMBINE_DATA(&video_ram[offset]); |
| 40 | 40 | } |
| r2454 | r2455 | |
|---|---|---|
| 7 | 7 | ****************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "deprecat.h" | |
| 11 | 10 | #include "balsente.h" |
| 12 | 11 | |
| 13 | 12 | |
| r2454 | r2455 | |
| 107 | 106 | g = paletteram[(offset & ~3) + 1]; |
| 108 | 107 | b = paletteram[(offset & ~3) + 2]; |
| 109 | 108 | |
| 110 | palette_set_color_rgb( | |
| 109 | palette_set_color_rgb(machine, offset / 4, pal4bit(r), pal4bit(g), pal4bit(b)); | |
| 111 | 110 | } |
| 112 | 111 | |
| 113 | 112 |
| r2454 | r2455 | |
|---|---|---|
| 6 | 6 | ***************************************************************************/ |
| 7 | 7 | |
| 8 | 8 | #include "driver.h" |
| 9 | #include "deprecat.h" | |
| 10 | 9 | #include "profiler.h" |
| 11 | 10 | #include "cpu/m68000/m68000.h" |
| 12 | 11 | #include "itech32.h" |
| r2454 | r2455 | |
| 272 | 271 | double intensity = (double)(data & 0xff) / (double)0x60; |
| 273 | 272 | int i; |
| 274 | 273 | for (i = 0; i < 8192; i++) |
| 275 | palette_set_brightness( | |
| 274 | palette_set_brightness(machine, i, intensity); | |
| 276 | 275 | } |
| 277 | 276 | } |
| 278 | 277 | |
| r2454 | r2455 | |
| 350 | 349 | g = paletteram16[offset & ~1] >> 8; |
| 351 | 350 | b = paletteram16[offset | 1] >> 8; |
| 352 | 351 | |
| 353 | palette_set_color( | |
| 352 | palette_set_color(machine, offset / 2, MAKE_RGB(r, g, b)); | |
| 354 | 353 | } |
| 355 | 354 | |
| 356 | 355 | |
| r2454 | r2455 | |
| 367 | 366 | g = paletteram16[offset & ~1] >> 8; |
| 368 | 367 | b = paletteram16[offset | 1] & 0xff; |
| 369 | 368 | |
| 370 | palette_set_color( | |
| 369 | palette_set_color(machine, offset / 2, MAKE_RGB(r, g, b)); | |
| 371 | 370 | } |
| 372 | 371 | |
| 373 | 372 | |
| r2454 | r2455 | |
| 381 | 380 | g = (paletteram32[offset] >> 8) & 0xff; |
| 382 | 381 | b = (paletteram32[offset] >> 16) & 0xff; |
| 383 | 382 | |
| 384 | palette_set_color( | |
| 383 | palette_set_color(machine, offset, MAKE_RGB(r, g, b)); | |
| 385 | 384 | } |
| 386 | 385 | |
| 387 | 386 | |
| r2454 | r2455 | |
| 395 | 394 | g = (paletteram32[offset] >> 8) & 0xff; |
| 396 | 395 | b = paletteram32[offset] & 0xff; |
| 397 | 396 | |
| 398 | palette_set_color( | |
| 397 | palette_set_color(machine, offset, MAKE_RGB(r, g, b)); | |
| 399 | 398 | } |
| 400 | 399 | |
| 401 | 400 | |
| r2454 | r2455 | |
| 1416 | 1415 | |
| 1417 | 1416 | READ16_HANDLER( bloodstm_video_r ) |
| 1418 | 1417 | { |
| 1419 | return itech32_video_r(machine, offset / 2, | |
| 1418 | return itech32_video_r(machine, offset / 2, mem_mask); | |
| 1420 | 1419 | } |
| 1421 | 1420 | |
| 1422 | 1421 | |
| r2454 | r2455 | |
| 1438 | 1437 | |
| 1439 | 1438 | READ32_HANDLER( itech020_video_r ) |
| 1440 | 1439 | { |
| 1441 | int result = itech32_video_r(machine,offset, | |
| 1440 | int result = itech32_video_r(machine, offset, mem_mask); | |
| 1442 | 1441 | return (result << 16) | result; |
| 1443 | 1442 | } |
| 1444 | 1443 |
| r2454 | r2455 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "deprecat.h" | |
| 11 | 10 | #include "includes/amiga.h" |
| 12 | 11 | |
| 13 | 12 | |
| r2454 | r2455 | |
| 225 | 224 | if (LOG_COPPER) |
| 226 | 225 | logerror("%02X.%02X: Write to %s = %04x\n", last_scanline, xpos / 2, amiga_custom_names[copper_pending_offset & 0xff], copper_pending_data); |
| 227 | 226 | |
| 228 | amiga_custom_w(machine, copper_pending_offset, copper_pending_data, 0); | |
| 227 | amiga_custom_w(machine, copper_pending_offset, copper_pending_data, 0xffff); | |
| 229 | 228 | copper_pending_offset = 0; |
| 230 | 229 | } |
| 231 | 230 |
| r2454 | r2455 | |
|---|---|---|
| 495 | 495 | /* See if we should draw artificial gun targets */ |
| 496 | 496 | /* (not yet implemented...) */ |
| 497 | 497 | |
| 498 | if (input_port_ | |
| 498 | if (input_port_ | |
| 499 | 499 | { |
| 500 | 500 | popmessage("Gunsights on"); |
| 501 | 501 | } |
| r2454 | r2455 | |
| 639 | 639 | /* See if we should draw artificial gun targets */ |
| 640 | 640 | /* (not yet implemented...) */ |
| 641 | 641 | |
| 642 | if (input_port_ | |
| 642 | if (input_port_ | |
| 643 | 643 | { |
| 644 | 644 | popmessage("Gunsights on"); |
| 645 | 645 | } |
| r2454 | r2455 | |
|---|---|---|
| 157 | 157 | g = (paletteram32[offset] >> 8) & 0xff; |
| 158 | 158 | r = (paletteram32[offset] >> 0) & 0xff; |
| 159 | 159 | |
| 160 | palette_set_color( | |
| 160 | palette_set_color(machine,offset,MAKE_RGB(r,g,b)); | |
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | WRITE32_HANDLER( deco32_buffered_palette_w ) |
| r2454 | r2455 | |
| 168 | 168 | |
| 169 | 169 | WRITE32_HANDLER( deco32_palette_dma_w ) |
| 170 | 170 | { |
| 171 | const int m= | |
| 171 | const int m=machine->config->total_colors; | |
| 172 | 172 | int r,g,b,i; |
| 173 | 173 | |
| 174 | 174 | for (i=0; i<m; i++) { |
| r2454 | r2455 | |
| 185 | 185 | g = (paletteram32[i] >> 8) & 0xff; |
| 186 | 186 | r = (paletteram32[i] >> 0) & 0xff; |
| 187 | 187 | |
| 188 | palette_set_color( | |
| 188 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 189 | 189 | } |
| 190 | 190 | } |
| 191 | 191 | } |
| r2454 | r2455 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | /* updated by Hans Andersson, dec 2005 */ |
| 4 | 4 | #include "driver.h" |
| 5 | #include "deprecat.h" | |
| 6 | 5 | #include "video/resnet.h" |
| 7 | 6 | #include "includes/grchamp.h" |
| 8 | 7 | |
| r2454 | r2455 | |
| 55 | 54 | |
| 56 | 55 | WRITE8_HANDLER( grchamp_left_w ) |
| 57 | 56 | { |
| 58 | grchamp_state *state = | |
| 57 | grchamp_state *state = machine->driver_data; | |
| 59 | 58 | state->leftram[offset] = data; |
| 60 | 59 | tilemap_mark_tile_dirty(state->left_tilemap, offset); |
| 61 | 60 | } |
| 62 | 61 | |
| 63 | 62 | WRITE8_HANDLER( grchamp_center_w ) |
| 64 | 63 | { |
| 65 | grchamp_state *state = | |
| 64 | grchamp_state *state = machine->driver_data; | |
| 66 | 65 | state->centerram[offset] = data; |
| 67 | 66 | tilemap_mark_tile_dirty(state->center_tilemap, offset); |
| 68 | 67 | } |
| 69 | 68 | |
| 70 | 69 | WRITE8_HANDLER( grchamp_right_w ) |
| 71 | 70 | { |
| 72 | grchamp_state *state = | |
| 71 | grchamp_state *state = machine->driver_data; | |
| 73 | 72 | state->rightram[offset] = data; |
| 74 | 73 | tilemap_mark_tile_dirty(state->right_tilemap, offset); |
| 75 | 74 | } |
| r2454 | r2455 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "deprecat.h" | |
| 11 | 10 | #include "video/resnet.h" |
| 12 | 11 | #include "fastfred.h" |
| 13 | 12 |
| r2454 | r2455 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | #include "deprecat.h" | |
| 3 | 2 | #include "kan_pand.h" |
| 4 | 3 | |
| 5 | 4 | UINT16 *galpanic_bgvideoram,*galpanic_fgvideoram; |
| r2454 | r2455 | |
| 45 | 44 | { |
| 46 | 45 | data = COMBINE_DATA(&paletteram16[offset]); |
| 47 | 46 | /* bit 0 seems to be a transparency flag for the front bitmap */ |
| 48 | palette_set_color_rgb( | |
| 47 | palette_set_color_rgb(machine,offset,pal5bit(data >> 6),pal5bit(data >> 11),pal5bit(data >> 1)); | |
| 49 | 48 | } |
| 50 | 49 | |
| 51 | 50 |
| r2454 | r2455 | |
|---|---|---|
| 287 | 287 | { |
| 288 | 288 | if (K001005_fifo_read_ptr < 0x3ff) |
| 289 | 289 | { |
| 290 | //cpunum_set_input_line( | |
| 290 | //cpunum_set_input_line(machine, 2, SHARC_INPUT_FLAG1, CLEAR_LINE); | |
| 291 | 291 | cpuintrf_push_context(2); |
| 292 | 292 | sharc_set_flag_input(1, CLEAR_LINE); |
| 293 | 293 | cpuintrf_pop_context(); |
| 294 | 294 | } |
| 295 | 295 | else |
| 296 | 296 | { |
| 297 | //cpunum_set_input_line( | |
| 297 | //cpunum_set_input_line(machine, 2, SHARC_INPUT_FLAG1, ASSERT_LINE); | |
| 298 | 298 | cpuintrf_push_context(2); |
| 299 | 299 | sharc_set_flag_input(1, ASSERT_LINE); |
| 300 | 300 | cpuintrf_pop_context(); |
| r2454 | r2455 | |
| 302 | 302 | } |
| 303 | 303 | else |
| 304 | 304 | { |
| 305 | //cpunum_set_input_line( | |
| 305 | //cpunum_set_input_line(machine, 2, SHARC_INPUT_FLAG1, ASSERT_LINE); | |
| 306 | 306 | cpuintrf_push_context(2); |
| 307 | 307 | sharc_set_flag_input(1, ASSERT_LINE); |
| 308 | 308 | cpuintrf_pop_context(); |
| r2454 | r2455 | |
| 346 | 346 | { |
| 347 | 347 | if (K001005_fifo_write_ptr < 0x400) |
| 348 | 348 | { |
| 349 | //cpunum_set_input_line( | |
| 349 | //cpunum_set_input_line(machine, 2, SHARC_INPUT_FLAG1, ASSERT_LINE); | |
| 350 | 350 | cpuintrf_push_context(2); |
| 351 | 351 | sharc_set_flag_input(1, ASSERT_LINE); |
| 352 | 352 | cpuintrf_pop_context(); |
| 353 | 353 | } |
| 354 | 354 | else |
| 355 | 355 | { |
| 356 | //cpunum_set_input_line( | |
| 356 | //cpunum_set_input_line(machine, 2, SHARC_INPUT_FLAG1, CLEAR_LINE); | |
| 357 | 357 | cpuintrf_push_context(2); |
| 358 | 358 | sharc_set_flag_input(1, CLEAR_LINE); |
| 359 | 359 | cpuintrf_pop_context(); |
| r2454 | r2455 | |
| 361 | 361 | } |
| 362 | 362 | else |
| 363 | 363 | { |
| 364 | //cpunum_set_input_line( | |
| 364 | //cpunum_set_input_line(machine, 2, SHARC_INPUT_FLAG1, ASSERT_LINE); | |
| 365 | 365 | cpuintrf_push_context(2); |
| 366 | 366 | sharc_set_flag_input(1, ASSERT_LINE); |
| 367 | 367 | cpuintrf_pop_context(); |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ****************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "machine/atarigen.h" |
| 10 | 9 | #include "foodf.h" |
| 11 | 10 | #include "video/resnet.h" |
| r2454 | r2455 | |
| 108 | 107 | bit1 = (newword >> 7) & 0x01; |
| 109 | 108 | b = combine_2_weights(bweights, bit0, bit1); |
| 110 | 109 | |
| 111 | palette_set_color( | |
| 110 | palette_set_color(machine, offset, MAKE_RGB(r, g, b)); | |
| 112 | 111 | } |
| 113 | 112 | |
| 114 | 113 |
| r2454 | r2455 | |
|---|---|---|
| 351 | 351 | |
| 352 | 352 | VIDEO_EOF( armedf ) |
| 353 | 353 | { |
| 354 | buffer_spriteram16_w(machine,0,0,0); | |
| 354 | buffer_spriteram16_w(machine,0,0,0xffff); | |
| 355 | 355 | } |
| r2454 | r2455 | |
|---|---|---|
| 614 | 614 | visarea.min_x = visarea.min_y = 0; |
| 615 | 615 | visarea.max_x = m_n_screenwidth - 1; |
| 616 | 616 | visarea.max_y = m_n_screenheight - 1; |
| 617 | video_screen_configure( | |
| 617 | video_screen_configure(machine->primary_screen, m_n_screenwidth, m_n_screenheight, &visarea, HZ_TO_ATTOSECONDS(refresh)); | |
| 618 | 618 | } |
| 619 | 619 | |
| 620 | 620 | static void psx_gpu_init( running_machine *machine ) |
| r2454 | r2455 | |
| 3907 | 3907 | |
| 3908 | 3908 | void psx_gpu_reset( void ) |
| 3909 | 3909 | { |
| 3910 | psx_gpu_w( Machine, 1, 0, 0 ); | |
| 3910 | psx_gpu_w( Machine, 1, 0, 0xffffffff ); | |
| 3911 | 3911 | } |
| 3912 | 3912 | |
| 3913 | 3913 | void psx_lightgun_set( int n_x, int n_y ) |
| r2454 | r2455 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | #include "deprecat.h" | |
| 3 | 2 | #include "cpu/m6809/m6809.h" |
| 4 | 3 | #include "machine/6522via.h" |
| 5 | 4 | |
| r2454 | r2455 | |
| 59 | 58 | bit1 = (data >> 7) & 0x01; |
| 60 | 59 | b = 0x5f * bit0 + 0xa0 * bit1; |
| 61 | 60 | |
| 62 | palette_set_color( | |
| 61 | palette_set_color(machine, offset, MAKE_RGB(r, g, b)); | |
| 63 | 62 | } |
| 64 | 63 | |
| 65 | 64 | READ8_HANDLER( beezer_line_r ) |
| r2454 | r2455 | |
|---|---|---|
| 89 | 89 | |
| 90 | 90 | ***************************************************************************/ |
| 91 | 91 | #include "driver.h" |
| 92 | #include "deprecat.h" | |
| 93 | 92 | #include "system16.h" |
| 94 | 93 | #include "video/resnet.h" |
| 95 | 94 | |
| r2454 | r2455 | |
| 524 | 523 | gh = combine_6_weights(weights[1][1], g0, g1, g2, g3, g4, 1); |
| 525 | 524 | bh = combine_6_weights(weights[1][2], b0, b1, b2, b3, b4, 1); |
| 526 | 525 | |
| 527 | palette_set_color( | |
| 526 | palette_set_color( machine, offset, MAKE_RGB(r, g, b) ); | |
| 528 | 527 | |
| 529 | palette_set_color( | |
| 528 | palette_set_color( machine, offset+machine->config->total_colors/2,MAKE_RGB(rs,gs,bs)); | |
| 530 | 529 | } |
| 531 | 530 | } |
| 532 | 531 |
| r2454 | r2455 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | #include "deprecat.h" | |
| 3 | 2 | |
| 4 | 3 | |
| 5 | 4 | UINT16 *deniam_videoram,*deniam_textram; |
| r2454 | r2455 | |
| 146 | 145 | r = ((data << 1) & 0x1e) | ((data >> 12) & 0x01); |
| 147 | 146 | g = ((data >> 3) & 0x1e) | ((data >> 13) & 0x01); |
| 148 | 147 | b = ((data >> 7) & 0x1e) | ((data >> 14) & 0x01); |
| 149 | palette_set_color_rgb( | |
| 148 | palette_set_color_rgb(machine,offset,pal5bit(r),pal5bit(g),pal5bit(b)); | |
| 150 | 149 | } |
| 151 | 150 | |
| 152 | 151 |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "mcr.h" |
| 10 | 9 | |
| 11 | 10 | |
| r2454 | r2455 | |
| 150 | 149 | offset &= 0x7f; |
| 151 | 150 | |
| 152 | 151 | /* high bit of red comes from low bit of address */ |
| 153 | palette_set_color_rgb( | |
| 152 | palette_set_color_rgb(machine, offset / 2, pal3bit(((offset & 1) << 2) + (data >> 6)), pal3bit(data >> 0), pal3bit(data >> 3)); | |
| 154 | 153 | } |
| 155 | 154 | |
| 156 | 155 |
| r2454 | r2455 | |
|---|---|---|
| 162 | 162 | int i; |
| 163 | 163 | |
| 164 | 164 | for (i = 0;i < 0x40000;i++) |
| 165 | hitice_pixelram_w(machine,i,0,0); | |
| 165 | hitice_pixelram_w(machine,i,0,0xffff); | |
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | static TILE_GET_INFO( get_bg_tile_info ) |
| r2454 | r2455 | |
|---|---|---|
| 533 | 533 | ***************************************************************************/ |
| 534 | 534 | |
| 535 | 535 | #include "driver.h" |
| 536 | #include "deprecat.h" | |
| 537 | 536 | #include "taitoic.h" |
| 538 | 537 | |
| 539 | 538 | #define TOPSPEED_ROAD_COLORS |
| r2454 | r2455 | |
| 2612 | 2611 | |
| 2613 | 2612 | READ32_HANDLER( TC0100SCN_ctrl_long_r ) |
| 2614 | 2613 | { |
| 2615 | return (TC0100SCN_ctrl_word_0_r(machine,offset*2,0)<<16)|TC0100SCN_ctrl_word_0_r(machine,offset*2+1,0); | |
| 2614 | return (TC0100SCN_ctrl_word_0_r(machine,offset*2,0xffff)<<16)|TC0100SCN_ctrl_word_0_r(machine,offset*2+1,0xffff); | |
| 2616 | 2615 | } |
| 2617 | 2616 | |
| 2618 | 2617 | WRITE32_HANDLER( TC0100SCN_ctrl_long_w ) |
| r2454 | r2455 | |
| 2623 | 2622 | |
| 2624 | 2623 | READ32_HANDLER( TC0100SCN_long_r ) |
| 2625 | 2624 | { |
| 2626 | return (TC0100SCN_word_0_r(machine,offset*2,0)<<16)|TC0100SCN_word_0_r(machine,offset*2+1,0); | |
| 2625 | return (TC0100SCN_word_0_r(machine,offset*2,0xffff)<<16)|TC0100SCN_word_0_r(machine,offset*2+1,0xffff); | |
| 2627 | 2626 | } |
| 2628 | 2627 | |
| 2629 | 2628 | WRITE32_HANDLER( TC0100SCN_long_w ) |
| 2630 | 2629 | { |
| 2631 | 2630 | if (ACCESSING_BITS_16_31) |
| 2632 | 2631 | { |
| 2633 | int oldword = TC0100SCN_word_0_r(machine,offset*2,0); | |
| 2632 | int oldword = TC0100SCN_word_0_r(machine,offset*2,0xffff); | |
| 2634 | 2633 | int newword = data>>16; |
| 2635 | 2634 | if (!ACCESSING_BITS_16_23) |
| 2636 | 2635 | newword |= (oldword &0x00ff); |
| 2637 | 2636 | if (!ACCESSING_BITS_24_31) |
| 2638 | 2637 | newword |= (oldword &0xff00); |
| 2639 | TC0100SCN_word_0_w(machine,offset*2,newword,0); | |
| 2638 | TC0100SCN_word_0_w(machine,offset*2,newword,0xffff); | |
| 2640 | 2639 | } |
| 2641 | 2640 | if (ACCESSING_BITS_0_15) |
| 2642 | 2641 | { |
| 2643 | int oldword = TC0100SCN_word_0_r(machine,(offset*2)+1,0); | |
| 2642 | int oldword = TC0100SCN_word_0_r(machine,(offset*2)+1,0xffff); | |
| 2644 | 2643 | int newword = data&0xffff; |
| 2645 | 2644 | if (!ACCESSING_BITS_0_7) |
| 2646 | 2645 | newword |= (oldword &0x00ff); |
| 2647 | 2646 | if (!ACCESSING_BITS_8_15) |
| 2648 | 2647 | newword |= (oldword &0xff00); |
| 2649 | TC0100SCN_word_0_w(machine,(offset*2)+1,newword,0); | |
| 2648 | TC0100SCN_word_0_w(machine,(offset*2)+1,newword,0xffff); | |
| 2650 | 2649 | } |
| 2651 | 2650 | } |
| 2652 | 2651 | |
| r2454 | r2455 | |
| 3281 | 3280 | |
| 3282 | 3281 | READ32_HANDLER( TC0480SCP_ctrl_long_r ) |
| 3283 | 3282 | { |
| 3284 | return (TC0480SCP_ctrl_word_r(machine,offset*2,0)<<16)|TC0480SCP_ctrl_word_r(machine,offset*2+1,0); | |
| 3283 | return (TC0480SCP_ctrl_word_r(machine,offset*2,0xffff)<<16)|TC0480SCP_ctrl_word_r(machine,offset*2+1,0xffff); | |
| 3285 | 3284 | } |
| 3286 | 3285 | |
| 3287 | 3286 | /* TODO: byte access ? */ |
| r2454 | r2455 | |
| 3294 | 3293 | |
| 3295 | 3294 | READ32_HANDLER( TC0480SCP_long_r ) |
| 3296 | 3295 | { |
| 3297 | return (TC0480SCP_word_r(machine,offset*2,0)<<16)|TC0480SCP_word_r(machine,offset*2+1,0); | |
| 3296 | return (TC0480SCP_word_r(machine,offset*2,0xffff)<<16)|TC0480SCP_word_r(machine,offset*2+1,0xffff); | |
| 3298 | 3297 | } |
| 3299 | 3298 | |
| 3300 | 3299 | WRITE32_HANDLER( TC0480SCP_long_w ) |
| 3301 | 3300 | { |
| 3302 | 3301 | if (ACCESSING_BITS_16_31) |
| 3303 | 3302 | { |
| 3304 | int oldword = TC0480SCP_word_r(machine,offset*2,0); | |
| 3303 | int oldword = TC0480SCP_word_r(machine,offset*2,0xffff); | |
| 3305 | 3304 | int newword = data>>16; |
| 3306 | 3305 | if (!ACCESSING_BITS_16_23) |
| 3307 | 3306 | newword |= (oldword &0x00ff); |
| 3308 | 3307 | if (!ACCESSING_BITS_24_31) |
| 3309 | 3308 | newword |= (oldword &0xff00); |
| 3310 | TC0480SCP_word_w(machine,offset*2,newword,0); | |
| 3309 | TC0480SCP_word_w(machine,offset*2,newword,0xffff); | |
| 3311 | 3310 | } |
| 3312 | 3311 | if (ACCESSING_BITS_0_15) |
| 3313 | 3312 | { |
| 3314 | int oldword = TC0480SCP_word_r(machine,(offset*2)+1,0); | |
| 3313 | int oldword = TC0480SCP_word_r(machine,(offset*2)+1,0xffff); | |
| 3315 | 3314 | int newword = data&0xffff; |
| 3316 | 3315 | if (!ACCESSING_BITS_0_7) |
| 3317 | 3316 | newword |= (oldword &0x00ff); |
| 3318 | 3317 | if (!ACCESSING_BITS_8_15) |
| 3319 | 3318 | newword |= (oldword &0xff00); |
| 3320 | TC0480SCP_word_w(machine,(offset*2)+1,newword,0); | |
| 3319 | TC0480SCP_word_w(machine,(offset*2)+1,newword,0xffff); | |
| 3321 | 3320 | } |
| 3322 | 3321 | } |
| 3323 | 3322 | |
| r2454 | r2455 | |
| 4732 | 4731 | } |
| 4733 | 4732 | } |
| 4734 | 4733 | |
| 4735 | palette_set_color( | |
| 4734 | palette_set_color(machine, i + (chip << 12),MAKE_RGB(r,g,b)); | |
| 4736 | 4735 | } |
| 4737 | 4736 | } |
| 4738 | 4737 | |
| r2454 | r2455 | |
| 4815 | 4814 | case 1: |
| 4816 | 4815 | { |
| 4817 | 4816 | TC0110PCR_ram[0][(TC0110PCR_addr[0])] = data & 0xffff; |
| 4818 | palette_set_color_rgb( | |
| 4817 | palette_set_color_rgb(machine,TC0110PCR_addr[0],pal5bit(data >> 0),pal5bit(data >> 5),pal5bit(data >> 10)); | |
| 4819 | 4818 | break; |
| 4820 | 4819 | } |
| 4821 | 4820 | |
| r2454 | r2455 | |
| 4837 | 4836 | case 1: |
| 4838 | 4837 | { |
| 4839 | 4838 | TC0110PCR_ram[0][(TC0110PCR_addr[0])] = data & 0xffff; |
| 4840 | palette_set_color_rgb( | |
| 4839 | palette_set_color_rgb(machine,TC0110PCR_addr[0],pal5bit(data >> 0),pal5bit(data >> 5),pal5bit(data >> 10)); | |
| 4841 | 4840 | break; |
| 4842 | 4841 | } |
| 4843 | 4842 | |
| r2454 | r2455 | |
| 4860 | 4859 | { |
| 4861 | 4860 | TC0110PCR_ram[1][(TC0110PCR_addr[1])] = data & 0xffff; |
| 4862 | 4861 | /* change a color in the second color area (4096-8191) */ |
| 4863 | palette_set_color_rgb( | |
| 4862 | palette_set_color_rgb(machine,TC0110PCR_addr[1] + 4096,pal5bit(data >> 0),pal5bit(data >> 5),pal5bit(data >> 10)); | |
| 4864 | 4863 | break; |
| 4865 | 4864 | } |
| 4866 | 4865 | |
| r2454 | r2455 | |
| 4883 | 4882 | { |
| 4884 | 4883 | TC0110PCR_ram[2][(TC0110PCR_addr[2])] = data & 0xffff; |
| 4885 | 4884 | /* change a color in the second color area (8192-12288) */ |
| 4886 | palette_set_color_rgb( | |
| 4885 | palette_set_color_rgb(machine,TC0110PCR_addr[2] + 8192,pal5bit(data >> 0),pal5bit(data >> 5),pal5bit(data >> 10)); | |
| 4887 | 4886 | break; |
| 4888 | 4887 | } |
| 4889 | 4888 | |
| r2454 | r2455 | |
| 4907 | 4906 | case 1: |
| 4908 | 4907 | { |
| 4909 | 4908 | TC0110PCR_ram[0][(TC0110PCR_addr[0])] = data & 0xffff; |
| 4910 | palette_set_color_rgb( | |
| 4909 | palette_set_color_rgb(machine,TC0110PCR_addr[0],pal5bit(data >> 10),pal5bit(data >> 5),pal5bit(data >> 0)); | |
| 4911 | 4910 | break; |
| 4912 | 4911 | } |
| 4913 | 4912 | |
| r2454 | r2455 | |
| 4931 | 4930 | case 1: |
| 4932 | 4931 | { |
| 4933 | 4932 | TC0110PCR_ram[0][(TC0110PCR_addr[0])] = data & 0xffff; |
| 4934 | palette_set_color_rgb( | |
| 4933 | palette_set_color_rgb(machine,TC0110PCR_addr[0],pal4bit(data >> 0),pal4bit(data >> 4),pal4bit(data >> 8)); | |
| 4935 | 4934 | break; |
| 4936 | 4935 | } |
| 4937 | 4936 |
| r2454 | r2455 | |
|---|---|---|
| 70 | 70 | ***************************************************************************/ |
| 71 | 71 | |
| 72 | 72 | #include "driver.h" |
| 73 | #include "deprecat.h" | |
| 74 | 73 | |
| 75 | 74 | #define TILEMAPS 0 |
| 76 | 75 | |
| r2454 | r2455 | |
| 166 | 165 | (((rgb & (1<<0x6))?1:0)<<2) | |
| 167 | 166 | (((rgb & (1<<0x7))?1:0)<<3); |
| 168 | 167 | |
| 169 | palette_set_color_rgb( | |
| 168 | palette_set_color_rgb(machine,offset/2,pal4bit(r),pal4bit(g),pal4bit(b)); | |
| 170 | 169 | } |
| 171 | 170 | |
| 172 | 171 |
| r2454 | r2455 | |
|---|---|---|
| 292 | 292 | /* For now we just check 0x40 in DSW1, and ignore the write if we */ |
| 293 | 293 | /* are in upright controls mode. */ |
| 294 | 294 | |
| 295 | if (input_port_ | |
| 295 | if (input_port_ | |
| 296 | 296 | btime_video_control_w(machine, offset, data); |
| 297 | 297 | } |
| 298 | 298 |
| r2454 | r2455 | |
|---|---|---|
| 25 | 25 | Ghouls 'n Ghosts (World / US) 1988 88620B-2 DM620 LWIO None CPS-B-01 DL-0411-10001 None |
| 26 | 26 | (alt B-board revision - Japan) 88622B-2 DM22A LWIO 88622-C-1 CPS-B-01 DL-0411-10001 None |
| 27 | 27 | Strider 1989 89624B-2 ST24M1 LWIO 88622-C-1 CPS-B-01 DL-0411-10001 None |
| 28 | (alt B-board revision) 89624B-3 ST24B2 LWIO | |
| 28 | (alt B-board revision) 89624B-2 ST24M2 LWIO 88622-C-2 CPS-B-01 DL-0411-10001 None | |
| 29 | (alt B-board revision) 89624B-3 ST24B2 LWIO 88622-C-2 CPS-B-01 DL-0411-10001 None | |
| 29 | 30 | (alt B-board revision) ? ST22B ? |
| 30 | Dynasty Wars 1989 88622B-3 TK22B IOB1 88622-C-2 CPS-B-02 DL-0411-10002 | |
| 31 | Dynasty Wars 1989 88624B-3 TK24B? ? 88622-C-2 CPS-B-02 DL-0411-10002 | |
| 32 | (alt B-board revision - Japan) 88622B-3 TK22B IOB1 | |
| 31 | 33 | Willow 1989 89624B-3 WL24B LWIO 88622-C-4 CPS-B-03 DL-0411-10003 None |
| 32 | 34 | (alt C-board revision) 88622-C-2 |
| 33 | 35 | UN Squadron / Area 88 1989 89624B-3 AR24B LWIO 88622-C-4 CPS-B-11 DL-0411-10004 None |
| 34 | 36 | (alt B-board revision - Japan) 88622B-2 AR22B LWIO |
| 35 | 37 | Final Fight (first rev) 1989 89624B-3 S224B IOB1 88622-C-5 CPS-B-04 DL-0411-10005 None |
| 36 | 38 | Final Fight (US 900112) ? CPS-B-04@ DL-0411-10001 None |
| 37 | Final Fight (US 900613) ? CPS-B-05 DL-0411-10006 | |
| 38 | Final Fight (Japan 900305) (alt B-board revision) ? ? ? CPS-B-02 DL-0411-10002 | |
| 39 | Final Fight (US 900613) 88622-C-5 CPS-B-05 DL-0411-10006 | |
| 40 | Final Fight (Japan 900305) (alt B-board revision) 88622B-2 S222B? LWIO 88622-C-5 CPS-B-02 DL-0411-10002 | |
| 39 | 41 | 1941 1990 ? YI24B ? 88622-C-5 CPS-B-05 DL-0411-10006 ? |
| 40 | 42 | Mercs 1990 89624B-3 0224B IOB1 90628-C-1 CPS-B-12 DL-0411-10007 C628 |
| 41 | 43 | (alt C-board revision) 90628-C-2 |
| r2454 | r2455 | |
| 44 | 46 | Nemo 1990 89624B-3 NM24B IOB1 88622-C-5 CPS-B-15 DL-0411-10010 None |
| 45 | 47 | Carrier Air Wing / U.S. Navy 1990 89624B-3 CA24B IOB1 88622-C-5 CPS-B-16 DL-0411-10011 None |
| 46 | 48 | (alt B-board revision - Japan) 89625B-1 CA22B |
| 47 | Street Fighter II (910214) 1991 | |
| 49 | Street Fighter II (910214) 1991 | |
| 48 | 50 | Street Fighter II (US 910206) CPS-B-17 DL-0411-10012 |
| 49 | Street Fighter II (US 910228) | |
| 51 | Street Fighter II (US 910228) | |
| 50 | 52 | Street Fighter II (Japan 910306) CPS-B-12 DL-0411-10007 |
| 51 | 53 | Street Fighter II (US 910318) CPS-B-05 DL-0411-10006 |
| 52 | 54 | Street Fighter II (US 910411) CPS-B-15 DL-0411-10010 |
| r2454 | r2455 | |
| 56 | 58 | Street Fighter II (Japan 911210) CPS-B-13 DL-0411-10008 |
| 57 | 59 | Three Wonders* 1991 89624B-3 RT24B IOB1 90630C-4 CPS-B-21 DL-0921-10014 IOC1 |
| 58 | 60 | (alt B-board revision - Japan) 89625B-1 RT22B IOB1 |
| 61 | (alt B-board revision) 91634B-2 ? ? | |
| 59 | 62 | King of Dragons* 1991 90629B-3 KD29B IOB1 90631C-5 CPS-B-21 DL-0921-10014 C632 IOC1 |
| 60 | 63 | Captain Commando* 1991 91635B-2 CC63B CCPRG IOB1 90631C-5 CPS-B-21 DL-0921-10014 C632 IOC1 |
| 61 | 64 | Knights of the Round* 1991 91635B-2 KR63B BPRG1 IOB1 90631C-5 CPS-B-21 DL-0921-10014 C632 IOC1 |
| r2454 | r2455 | |
| 87 | 90 | |
| 88 | 91 | |
| 89 | 92 | |
| 90 | OUTPUT PORTS | |
| 93 | CPS-A Registers | |
| 94 | --------------- | |
| 91 | 95 | 0x00-0x01 OBJ RAM base (/256) |
| 92 | 96 | 0x02-0x03 Scroll1 (8x8) RAM base (/256) |
| 93 | 97 | 0x04-0x05 Scroll2 (16x16) RAM base (/256) |
| r2454 | r2455 | |
| 125 | 129 | Mega Twins (underwater, cave) |
| 126 | 130 | Carrier Air Wing (hazy background at beginning of mission 8, put 07 at ff8501 to jump there) |
| 127 | 131 | Magic Sword (fire on floor 3; screen distort after continue) |
| 128 | Varth (title screen) | |
| 132 | Varth (title screen, end of stage 4) | |
| 129 | 133 | Captain Commando (end game sequence) |
| 130 | 134 | |
| 131 | 135 | Tests done on msword at the beginning of gameplay (many thanks to Corrado Tomaselli for these): |
| r2454 | r2455 | |
| 141 | 145 | TODO: |
| 142 | 146 | the scroll2/scroll3 disable bits are supported by the emulation, |
| 143 | 147 | while the scroll1 weird effect is not (it doesn't seem to make a |
| 144 | difference | |
| 148 | difference in any game). | |
| 145 | 149 | |
| 146 | 150 | |
| 147 | Some registers move from game to game.. following example strider | |
| 151 | CPS-B Registers | |
| 152 | --------------- | |
| 153 | Unlike CPS-A registers, which are at fixed addresses, CPS-B registers move from game to game. | |
| 154 | Following example strider | |
| 155 | ||
| 148 | 156 | 0x66-0x67 Layer control register |
| 149 | 157 | bits 14-15 seem to be unused |
| 150 | 158 | ghouls sets bits 15 in service mode when you press button 2 in |
| r2454 | r2455 | |
| 197 | 205 | bits 0-3 have been verified on a msword pcb, while bits 4-5 are only |
| 198 | 206 | supposed. |
| 199 | 207 | |
| 200 | Fixed registers | |
| 201 | 0x80-0x81 Sound command | |
| 202 | 0x88-0x89 Sound fade | |
| 203 | 208 | |
| 204 | ||
| 205 | 209 | A special note has to be made about tile/sprite codes. Even if all graphics are |
| 206 | 210 | stored together in the same ROMs, the hardware knows which part of the ROM space |
| 207 | 211 | is 8x8 tiles, 16x16 tiles, 16x16 spites, 32x32 tiles, and all games tested only |
| r2454 | r2455 | |
| 269 | 273 | IRQ4 is some sort of scanline interrupt used for that purpose. |
| 270 | 274 | |
| 271 | 275 | * Its unknown what CPS2_OBJ_BASE register (0x400000) does but it is not a object base |
| 272 | register. All games use 0x7000 even if 0x7080 is used at this register (checked on | |
| 273 | real HW). Maybe it sets the object bank used when cps2_objram_bank is set. | |
| 276 | register. The base is 0x7000 for all games even if 0x7080 is written to this register | |
| 277 | (checked on real HW). Maybe it sets the object bank used when cps2_objram_bank is set. | |
| 274 | 278 | |
| 275 | 279 | * Sprites are currently lagged by one frame to keep sync with backgrounds. This causes |
| 276 | sprites to stay on screen one frame longer (vis | |
| 280 | sprites to stay on screen one frame longer (visible in VSAV attract mode). | |
| 277 | 281 | |
| 278 | 282 | Marvel Vs. Capcom |
| 279 | * Sometimes c | |
| 283 | * Sometimes corrupt gfx are displayed on the 32x32 layer as the screen flashes at the | |
| 280 | 284 | start of super combo moves. The problem seems to be due to tiles being fetched before |
| 281 | 285 | the first 32x32 tile offset and results in data coming from 16x16 or 8x8 tiles instead. |
| 282 | 286 | |
| 283 | 287 | CPS1: |
| 284 | 288 | SF2 |
| 285 | 289 | * Missing chain in the foreground in Ken's level, and sign in Chun Li's level. |
| 286 | Those graphics are in the backmost layer. | |
| 290 | Those graphics are in the backmost layer. Probably they are leftover from game | |
| 291 | development and aren't supposed to be visible. | |
| 287 | 292 | |
| 288 | King of Dragons (World). | |
| 289 | * Distortion effect missing on character description screen during attract | |
| 290 | mode. The game rapidly toggles on and off the layer enable bit. | |
| 291 | I think this IS the correct behaviour. The Japanese version does the | |
| 292 | distortion as expected. | |
| 293 | ||
| 294 | 293 | 3wonders |
| 295 | 294 | * writes to output ports 42, 44, 46. |
| 296 | 295 | |
| r2454 | r2455 | |
| 302 | 301 | ============== |
| 303 | 302 | |
| 304 | 303 | There are often some redundant high bits in the scroll layer's attributes. |
| 305 | I think that these are spare bits that the game uses | |
| 304 | I think that these are spare bits that the game uses | |
| 306 | 305 | information, not used by the hardware. |
| 307 | 306 | The games seem to use them to mark platforms, kill zones and no-go areas. |
| 308 | 307 | |
| r2454 | r2455 | |
| 358 | 357 | int mult_result_lo; |
| 359 | 358 | int mult_result_hi; |
| 360 | 359 | |
| 360 | /* unknown registers which might be related to the multiply protection */ | |
| 361 | int unknown1; | |
| 362 | int unknown2; | |
| 363 | int unknown3; | |
| 364 | ||
| 361 | 365 | int layer_control; |
| 362 | 366 | int priority[4]; |
| 363 | int palette_control; | |
| 367 | int palette_control; | |
| 364 | 368 | |
| 365 | 369 | /* ideally, the layer enable masks should consist of only one bit, */ |
| 366 | 370 | /* but in many cases it is unknown which bit is which. */ |
| 367 | 371 | int layer_enable_mask[5]; |
| 368 | 372 | |
| 373 | /* these depend on the B-board model and PAL */ | |
| 369 | 374 | int bank_sizes[4]; |
| 370 | 375 | const struct gfx_range *bank_mapper; |
| 371 | 376 | |
| 372 | int bank_scroll1; | |
| 373 | int bank_scroll2; | |
| 374 | int bank_scroll3; | |
| 377 | /* some C-boards have additional I/O for extra buttons/extra players */ | |
| 378 | int in2_addr; | |
| 379 | int in3_addr; | |
| 380 | int out2_addr; | |
| 375 | 381 | |
| 376 | /* Some characters aren't visible */ | |
| 377 | const int start_scroll2; | |
| 378 | const int end_scroll2; | |
| 379 | const int start_scroll3; | |
| 380 | const int end_scroll3; | |
| 381 | ||
| 382 | 382 | int bootleg_kludge; |
| 383 | 383 | }; |
| 384 | 384 | |
| 385 | 385 | static const struct CPS1config *cps1_game_config; |
| 386 | 386 | |
| 387 | 387 | |
| 388 | /* CPSB ID multiply protection ctrl priority masks palctrl layer enable masks */ | |
| 389 | #define CPS_B_01 0x00,0x0000, 0,0,0,0, /* n/a */ 0x66,{0x68,0x6a,0x6c,0x6e},0x70, {0x02,0x04,0x08,0x30,0x30} | |
| 390 | #define CPS_B_02 0x60,0x0002, 0,0,0,0, /* n/a */ 0x6c,{0x6a,0x68,0x66,0x64},0x62, {0x02,0x04,0x08,0x00,0x00} | |
| 391 | #define CPS_B_03 0x00,0x0000, 0,0,0,0, /* n/a */ 0x70,{0x6e,0x6c,0x6a,0x68},0x66, {0x20,0x10,0x08,0x00,0x00} | |
| 392 | #define CPS_B_04 0x60,0x0004, 0,0,0,0, /* n/a */ 0x6e,{0x66,0x70,0x68,0x72},0x6a, {0x02,0x0c,0x0c,0x00,0x00} | |
| 393 | #define CPS_B_05 0x60,0x0005, 0,0,0,0, /* n/a */ 0x68,{0x6a,0x6c,0x6e,0x70},0x72, {0x02,0x08,0x20,0x14,0x14} | |
| 394 | #define CPS_B_11 0x72,0x0401, 0,0,0,0, /* n/a */ 0x66,{0x68,0x6a,0x6c,0x6e},0x70, {0x08,0x10,0x20,0x00,0x00} | |
| 395 | #define CPS_B_12 0x60,0x0402, 0,0,0,0, /* n/a */ 0x6c,{0x6a,0x68,0x66,0x64},0x62, {0x02,0x04,0x08,0x00,0x00} | |
| 396 | #define CPS_B_13 0x6e,0x0403, 0,0,0,0, /* n/a */ 0x62,{0x64,0x66,0x68,0x6a},0x6c, {0x20,0x02,0x04,0x00,0x00} | |
| 397 | #define CPS_B_14 0x5e,0x0404, 0,0,0,0, /* n/a */ 0x52,{0x54,0x56,0x58,0x5a},0x5c, {0x08,0x20,0x10,0x00,0x00} | |
| 398 | #define CPS_B_15 0x4e,0x0405, 0,0,0,0, /* n/a */ 0x42,{0x44,0x46,0x48,0x4a},0x4c, {0x04,0x02,0x20,0x00,0x00} | |
| 399 | #define CPS_B_16 0x40,0x0406, 0,0,0,0, /* n/a */ 0x4c,{0x4a,0x48,0x46,0x44},0x42, {0x10,0x0a,0x0a,0x00,0x00} | |
| 400 | #define CPS_B_17 0x48,0x0407, 0,0,0,0, /* n/a */ 0x54,{0x52,0x50,0x4e,0x4c},0x4a, {0x08,0x10,0x02,0x00,0x00} | |
| 401 | #define CPS_B_18 0xd0,0x0408, 0,0,0,0, /* n/a */ 0xdc,{0xda,0xd8,0xd6,0xd4},0xd2, {0x10,0x08,0x02,0x00,0x00} | |
| 402 | #define NOBATTRY 0x00,0x0000, 0x40,0x42,0x44,0x46, 0x66,{0x68,0x6a,0x6c,0x6e},0x70, {0x02,0x04,0x08,0x30,0x30} // pang3 sets layer enable to 0x26 on startup | |
| 403 | #define BATTRY_1 0x72,0x0800, 0x4e,0x4c,0x4a,0x48, 0x68,{0x66,0x64,0x62,0x60},0x70, {0x20,0x04,0x08,0x12,0x12} | |
| 404 | #define BATTRY_2 0x00,0x0000, 0x5e,0x5c,0x5a,0x58, 0x60,{0x6e,0x6c,0x6a,0x68},0x70, {0x30,0x08,0x30,0x00,0x00} | |
| 405 | #define BATTRY_3 0x00,0x0000, 0x46,0x44,0x42,0x40, 0x60,{0x6e,0x6c,0x6a,0x68},0x70, {0x20,0x12,0x12,0x00,0x00} | |
| 406 | #define BATTRY_4 0x00,0x0000, 0x46,0x44,0x42,0x40, 0x68,{0x66,0x64,0x62,0x60},0x70, {0x20,0x10,0x02,0x00,0x00} | |
| 407 | #define BATTRY_5 0x00,0x0000, 0x4e,0x4c,0x4a,0x48, 0x60,{0x6e,0x6c,0x6a,0x68},0x70, {0x20,0x06,0x06,0x00,0x00} | |
| 408 | #define BATTRY_6 0x00,0x0000, 0x00,0x00,0x00,0x00, 0x60,{0x6e,0x6c,0x6a,0x68},0x70, {0x20,0x14,0x14,0x00,0x00} | |
| 409 | #define BATTRY_7 0x00,0x0000, 0x00,0x00,0x00,0x00, 0x6c,{0x00,0x00,0x00,0x00},0x52, {0x14,0x02,0x14,0x00,0x00} | |
| 410 | #define QSOUND_1 0x00,0x0000, 0x00,0x00,0x00,0x00, 0x62,{0x64,0x66,0x68,0x6a},0x6c, {0x10,0x08,0x04,0x00,0x00} | |
| 411 | #define QSOUND_2 0x00,0x0000, 0x00,0x00,0x00,0x00, 0x4a,{0x4c,0x4e,0x40,0x42},0x44, {0x16,0x16,0x16,0x00,0x00} | |
| 412 | #define QSOUND_3 0x4e,0x0c00, 0x00,0x00,0x00,0x00, 0x52,{0x54,0x56,0x48,0x4a},0x4c, {0x04,0x02,0x20,0x00,0x00} | |
| 413 | #define QSOUND_4 0x6e,0x0c01, 0x00,0x00,0x00,0x00, 0x56,{0x40,0x42,0x68,0x6a},0x6c, {0x04,0x08,0x10,0x00,0x00} | |
| 414 | #define QSOUND_5 0x5e,0x0c02, 0x00,0x00,0x00,0x00, 0x6a,{0x6c,0x6e,0x70,0x72},0x5c, {0x04,0x08,0x10,0x00,0x00} | |
| 415 | #define HACK_B_1 0x00,0x0000, 0x00,0x00,0x00,0x00, 0x54,{0x52,0x50,0x4e,0x4c},0x5c, {0xff,0xff,0xff,0x00,0x00} | |
| 388 | #define __not_applicable__ -1,-1,-1,-1,-1,-1,-1 | |
| 416 | 389 | |
| 390 | /* CPSB ID multiply protection unknown ctrl priority masks palctrl layer enable masks */ | |
| 391 | #define CPS_B_01 -1, 0x0000, __not_applicable__, 0x26,{0x28,0x2a,0x2c,0x2e},0x30, {0x02,0x04,0x08,0x30,0x30} | |
| 392 | #define CPS_B_02 0x20,0x0002, __not_applicable__, 0x2c,{0x2a,0x28,0x26,0x24},0x22, {0x02,0x04,0x08,0x00,0x00} | |
| 393 | #define CPS_B_03 -1, 0x0000, __not_applicable__, 0x30,{0x2e,0x2c,0x2a,0x28},0x26, {0x20,0x10,0x08,0x00,0x00} | |
| 394 | #define CPS_B_04 0x20,0x0004, __not_applicable__, 0x2e,{0x26,0x30,0x28,0x32},0x2a, {0x02,0x04,0x08,0x00,0x00} | |
| 395 | #define CPS_B_05 0x20,0x0005, __not_applicable__, 0x28,{0x2a,0x2c,0x2e,0x30},0x32, {0x02,0x08,0x20,0x14,0x14} | |
| 396 | #define CPS_B_11 0x32,0x0401, __not_applicable__, 0x26,{0x28,0x2a,0x2c,0x2e},0x30, {0x08,0x10,0x20,0x00,0x00} | |
| 397 | #define CPS_B_12 0x20,0x0402, __not_applicable__, 0x2c,{0x2a,0x28,0x26,0x24},0x22, {0x02,0x04,0x08,0x00,0x00} | |
| 398 | #define CPS_B_13 0x2e,0x0403, __not_applicable__, 0x22,{0x24,0x26,0x28,0x2a},0x2c, {0x20,0x02,0x04,0x00,0x00} | |
| 399 | #define CPS_B_14 0x1e,0x0404, __not_applicable__, 0x12,{0x14,0x16,0x18,0x1a},0x1c, {0x08,0x20,0x10,0x00,0x00} | |
| 400 | #define CPS_B_15 0x0e,0x0405, __not_applicable__, 0x02,{0x04,0x06,0x08,0x0a},0x0c, {0x04,0x02,0x20,0x00,0x00} | |
| 401 | #define CPS_B_16 0x00,0x0406, __not_applicable__, 0x0c,{0x0a,0x08,0x06,0x04},0x02, {0x10,0x0a,0x0a,0x00,0x00} | |
| 402 | #define CPS_B_17 0x08,0x0407, __not_applicable__, 0x14,{0x12,0x10,0x0e,0x0c},0x0a, {0x08,0x10,0x02,0x00,0x00} | |
| 403 | #define CPS_B_18 0x10,0x0408, __not_applicable__, 0x1c,{0x1a,0x18,0x16,0x14},0x12, {0x10,0x08,0x02,0x00,0x00} | |
| 404 | #define CPS_B_21_DEF 0x32, -1, 0x00,0x02,0x04,0x06, 0x08, -1, -1, 0x26,{0x28,0x2a,0x2c,0x2e},0x30, {0x02,0x04,0x08,0x30,0x30} // pang3 sets layer enable to 0x26 on startup | |
| 405 | #define CPS_B_21_BT1 0x32,0x0800, 0x0e,0x0c,0x0a,0x08, 0x06,0x04,0x02, 0x28,{0x26,0x24,0x22,0x20},0x30, {0x20,0x04,0x08,0x12,0x12} | |
| 406 | #define CPS_B_21_BT2 -1, -1, 0x1e,0x1c,0x1a,0x18, -1, 0x0c,0x0a, 0x20,{0x2e,0x2c,0x2a,0x28},0x30, {0x30,0x08,0x30,0x00,0x00} | |
| 407 | #define CPS_B_21_BT3 -1, -1, 0x06,0x04,0x02,0x00, 0x0e,0x0c,0x0a, 0x20,{0x2e,0x2c,0x2a,0x28},0x30, {0x20,0x12,0x12,0x00,0x00} | |
| 408 | #define CPS_B_21_BT4 -1, -1, 0x06,0x04,0x02,0x00, 0x1e,0x1c,0x0a, 0x28,{0x26,0x24,0x22,0x20},0x30, {0x20,0x10,0x02,0x00,0x00} | |
| 409 | #define CPS_B_21_BT5 0x32, -1, 0x0e,0x0c,0x0a,0x08, 0x1e,0x1c,0x1a, 0x20,{0x2e,0x2c,0x2a,0x28},0x30, {0x20,0x04,0x02,0x00,0x00} | |
| 410 | #define CPS_B_21_BT6 -1, -1, -1, -1, -1, -1, -1, -1, -1, 0x20,{0x2e,0x2c,0x2a,0x28},0x30, {0x20,0x14,0x14,0x00,0x00} | |
| 411 | #define CPS_B_21_BT7 -1, -1, -1, -1, -1, -1, -1, -1, -1, 0x2c,{ -1, -1, -1, -1 },0x12, {0x14,0x02,0x14,0x00,0x00} | |
| 412 | #define CPS_B_21_QS1 -1, -1, -1, -1, -1, -1, -1, -1, -1, 0x22,{0x24,0x26,0x28,0x2a},0x2c, {0x10,0x08,0x04,0x00,0x00} | |
| 413 | #define CPS_B_21_QS2 -1, -1, -1, -1, -1, -1, -1, 0x2e,0x20, 0x0a,{0x0c,0x0e,0x00,0x02},0x04, {0x16,0x16,0x16,0x00,0x00} | |
| 414 | #define CPS_B_21_QS3 0x0e,0x0c00, -1, -1, -1, -1, 0x2c, -1, -1, 0x12,{0x14,0x16,0x08,0x0a},0x0c, {0x04,0x02,0x20,0x00,0x00} | |
| 415 | #define CPS_B_21_QS4 0x2e,0x0c01, -1, -1, -1, -1, 0x1c,0x1e,0x08, 0x16,{0x00,0x02,0x28,0x2a},0x2c, {0x04,0x08,0x10,0x00,0x00} | |
| 416 | #define CPS_B_21_QS5 0x1e,0x0c02, -1, -1, -1, -1, 0x0c, -1, -1, 0x2a,{0x2c,0x2e,0x30,0x32},0x1c, {0x04,0x08,0x10,0x00,0x00} | |
| 417 | #define HACK_B_1 -1, -1, -1, -1, -1, -1, -1, -1, -1, 0x14,{0x12,0x10,0x0e,0x0c},0x1c, {0xff,0xff,0xff,0x00,0x00} | |
| 417 | 418 | |
| 419 | /* | |
| 420 | CPS_B_21_DEF is CPS-B-21 at default settings (no battery) | |
| 421 | CPS_B_21_BTx are various battery configurations | |
| 422 | CPS_B_21_QSx are various battery configurations in Q-Sound games | |
| 423 | */ | |
| 418 | 424 | |
| 425 | ||
| 419 | 426 | #define mapper_LWCHR { 0x8000, 0x8000, 0, 0 }, mapper_LWCHR_table |
| 420 | 427 | static const struct gfx_range mapper_LWCHR_table[] = |
| 421 | 428 | { |
| r2454 | r2455 | |
| 482 | 489 | }; |
| 483 | 490 | |
| 484 | 491 | |
| 485 | #define mapper_TK22B { 0x8000, 0x8000, 0, 0 }, mapper_TK22B_table | |
| 486 | static const struct gfx_range mapper_TK22B_table[] = // unknown PAL | |
| 492 | #define mapper_TK22B { 0x4000, 0x4000, 0x4000, 0x4000 }, mapper_TK22B_table | |
| 493 | static const struct gfx_range mapper_TK22B_table[] = | |
| 487 | 494 | { |
| 495 | // verified from PAL dump: | |
| 496 | // bank 0 = pin 19 (ROMs 1,5, 9,13,17,24,32,38) | |
| 497 | // bank 1 = pin 16 (ROMs 2,6,10,14,18,25,33,39) | |
| 498 | // bank 2 = pin 14 (ROMs 3,7,11,15,19,21,26,28) | |
| 499 | // bank 3 = pin 12 (ROMS 4,8,12,16,20,22,27,29) | |
| 500 | ||
| 488 | 501 | /* type start end bank */ |
| 489 | { GFXTYPE_SPRITES, 0x0000, 0x5fff, 0 }, | |
| 490 | { GFXTYPE_SCROLL1, 0x6000, 0x7fff, 0 }, | |
| 502 | { GFXTYPE_SPRITES, 0x0000, 0x3fff, 0 }, | |
| 491 | 503 | |
| 492 | { GFXTYPE_SCROLL3, 0x0000, 0x3fff, 1 }, // 8000-bfff physical | |
| 493 | { GFXTYPE_SCROLL2, 0x4000, 0x7fff, 1 }, // c000-ffff physical | |
| 504 | { GFXTYPE_SPRITES, 0x4000, 0x5fff, 1 }, | |
| 505 | { GFXTYPE_SCROLL1, 0x6000, 0x7fff, 1 }, | |
| 506 | ||
| 507 | { GFXTYPE_SCROLL3, 0x0000, 0x3fff, 2 }, | |
| 508 | ||
| 509 | { GFXTYPE_SCROLL2, 0x4000, 0x7fff, 3 }, | |
| 494 | 510 | { 0 } |
| 495 | 511 | }; |
| 496 | 512 | |
| r2454 | r2455 | |
| 703 | 719 | }; |
| 704 | 720 | |
| 705 | 721 | |
| 706 | #define mapper_STF29 { 0x | |
| 722 | #define mapper_STF29 { 0x8000 | |
| 707 | 723 | static const struct gfx_range mapper_STF29_table[] = |
| 708 | 724 | { |
| 725 | // verified from PAL dump: | |
| 726 | // bank 0 = pin 19 (ROMs 5,6,7,8) | |
| 727 | // bank 1 = pin 14 (ROMs 14,15,16,17) | |
| 728 | // bank 2 = pin 12 (ROMS 24,25,26,27) | |
| 729 | ||
| 709 | 730 | /* type start end bank */ |
| 710 | { GFXTYPE_SPRITES, 0x00000, 0x0 | |
| 731 | { GFXTYPE_SPRITES, 0x00000, 0x07fff, 0 }, | |
| 711 | 732 | |
| 712 | { GFXTYPE_SPRITES, 0x10000, 0x11fff, 1 }, | |
| 713 | { GFXTYPE_SCROLL3, 0x02000, 0x03fff, 1 }, // 12000-13fff physical | |
| 714 | { GFXTYPE_SCROLL1, 0x04000, 0x04fff, 1 }, // 14000-14fff physical | |
| 715 | { GFXTYPE_SCROLL2, 0x05000, 0x07fff, 1 }, // 15000-17fff physical | |
| 733 | { GFXTYPE_SPRITES, 0x08000, 0x0ffff, 1 }, | |
| 734 | ||
| 735 | { GFXTYPE_SPRITES, 0x10000, 0x11fff, 2 }, | |
| 736 | { GFXTYPE_SCROLL3, 0x02000, 0x03fff, 2 }, | |
| 737 | { GFXTYPE_SCROLL1, 0x04000, 0x04fff, 2 }, | |
| 738 | { GFXTYPE_SCROLL2, 0x05000, 0x07fff, 2 }, | |
| 716 | 739 | { 0 } |
| 717 | 740 | }; |
| 718 | 741 | |
| 719 | 742 | |
| 743 | ||
| 744 | // RT24B and RT22B are equivalent, but since we could dump both PALs we are | |
| 745 | // documenting both. | |
| 746 | ||
| 747 | #define mapper_RT24B { 0x8000, 0x8000, 0, 0 }, mapper_RT24B_table | |
| 748 | static const struct gfx_range mapper_RT24B_table[] = | |
| 749 | { | |
| 750 | // verified from PAL dump: | |
| 751 | // bank 0 = pin 16 (ROMs 1,3,5,7) | |
| 752 | // bank 1 = pin 19 (ROMs 2,4,6,8) | |
| 753 | // pin 12 & pin 14 are never enabled | |
| 754 | ||
| 755 | /* type start end bank */ | |
| 756 | { GFXTYPE_SPRITES, 0x0000, 0x53ff, 0 }, | |
| 757 | { GFXTYPE_SCROLL1, 0x5400, 0x6fff, 0 }, | |
| 758 | { GFXTYPE_SCROLL3, 0x7000, 0x7fff, 0 }, | |
| 759 | ||
| 760 | { GFXTYPE_SCROLL3, 0x0000, 0x3fff, 1 }, | |
| 761 | { GFXTYPE_SCROLL2, 0x2800, 0x7fff, 1 }, | |
| 762 | { GFXTYPE_SPRITES, 0x5400, 0x7fff, 1 }, | |
| 763 | { 0 } | |
| 764 | }; | |
| 765 | ||
| 720 | 766 | #define mapper_RT22B { 0x4000, 0x4000, 0x4000, 0x4000 }, mapper_RT22B_table |
| 721 | 767 | static const struct gfx_range mapper_RT22B_table[] = |
| 722 | 768 | { |
| r2454 | r2455 | |
| 784 | 830 | }; |
| 785 | 831 | |
| 786 | 832 | |
| 787 | #define mapper_S9263B { 0x | |
| 833 | #define mapper_S9263B { 0x8000 | |
| 788 | 834 | static const struct gfx_range mapper_S9263B_table[] = |
| 789 | 835 | { |
| 790 | 836 | /* type start end bank */ |
| 791 | { GFXTYPE_SPRITES, 0x00000, 0x0 | |
| 837 | { GFXTYPE_SPRITES, 0x00000, 0x07fff, 0 }, | |
| 792 | 838 | |
| 793 | { GFXTYPE_SPRITES, 0x10000, 0x11fff, 1 }, | |
| 794 | { GFXTYPE_SCROLL3, 0x02000, 0x03fff, 1 }, // 12000-13fff physical | |
| 795 | { GFXTYPE_SCROLL1, 0x04000, 0x04fff, 1 }, // 14000-14fff physical | |
| 796 | { GFXTYPE_SCROLL2, 0x05000, 0x07fff, 1 }, // 15000-17fff physical | |
| 839 | { GFXTYPE_SPRITES, 0x08000, 0x0ffff, 1 }, | |
| 840 | ||
| 841 | { GFXTYPE_SPRITES, 0x10000, 0x11fff, 2 }, | |
| 842 | { GFXTYPE_SCROLL3, 0x02000, 0x03fff, 2 }, // 12000-13fff physical | |
| 843 | { GFXTYPE_SCROLL1, 0x04000, 0x04fff, 2 }, // 14000-14fff physical | |
| 844 | { GFXTYPE_SCROLL2, 0x05000, 0x07fff, 2 }, // 15000-17fff physical | |
| 797 | 845 | { 0 } |
| 798 | 846 | }; |
| 799 | 847 | |
| r2454 | r2455 | |
| 859 | 907 | }; |
| 860 | 908 | |
| 861 | 909 | |
| 862 | #define mapper_MB63B { 0x | |
| 910 | #define mapper_MB63B { 0x8000 | |
| 863 | 911 | static const struct gfx_range mapper_MB63B_table[] = |
| 864 | 912 | { |
| 865 | 913 | /* type start end bank */ |
| 866 | 914 | { GFXTYPE_SCROLL1, 0x00000, 0x00fff, 0 }, |
| 867 | { GFXTYPE_SPRITES | GFXTYPE_SCROLL2, 0x01000, 0x0 | |
| 915 | { GFXTYPE_SPRITES | GFXTYPE_SCROLL2, 0x01000, 0x07fff, 0 }, | |
| 868 | 916 | |
| 869 | { GFXTYPE_SPRITES | GFXTYPE_SCROLL2, 0x10000, 0x167ff, 1 }, | |
| 870 | { GFXTYPE_SCROLL3, 0x16800, 0x17fff, 1 }, | |
| 917 | { GFXTYPE_SPRITES | GFXTYPE_SCROLL2, 0x08000, 0x0ffff, 1 }, | |
| 918 | ||
| 919 | { GFXTYPE_SPRITES | GFXTYPE_SCROLL2, 0x10000, 0x167ff, 2 }, | |
| 920 | { GFXTYPE_SCROLL3, 0x16800, 0x17fff, 2 }, | |
| 871 | 921 | { 0 } |
| 872 | 922 | }; |
| 873 | 923 | |
| r2454 | r2455 | |
| 971 | 1021 | |
| 972 | 1022 | static const struct CPS1config cps1_config_table[]= |
| 973 | 1023 | { |
| 974 | /* name CPSB gfx mapper kludge */ | |
| 975 | {"forgottn", CPS_B_01, mapper_LWCHR }, | |
| 976 | {"lostwrld", CPS_B_01, mapper_LWCHR }, | |
| 977 | {"ghouls", CPS_B_01, mapper_DM620 }, | |
| 978 | {"ghoulsu", CPS_B_01, mapper_DM620 }, | |
| 979 | {"daimakai", CPS_B_01, mapper_DM620 }, | |
| 980 | {"strider", CPS_B_01, mapper_ST22B }, | |
| 981 | {"stridrua", CPS_B_01, mapper_ST22B }, | |
| 982 | {"striderj", CPS_B_01, mapper_ST22B }, | |
| 983 | {"stridrja", CPS_B_01, mapper_ST22B }, | |
| 984 | {"dynwar", CPS_B_02, mapper_TK22B }, | |
| 985 | {"dynwarj", CPS_B_02, mapper_TK22B }, | |
| 986 | {"willow", CPS_B_03, mapper_WL24B }, | |
| 987 | {"willowj", CPS_B_03, mapper_WL24B }, | |
| 988 | {"willowje", CPS_B_03, mapper_WL24B }, | |
| 989 | {"ffight", CPS_B_04, mapper_S224B }, | |
| 990 | {"ffightu", CPS_B_04, mapper_S224B }, | |
| 991 | {"ffightua", CPS_B_01, mapper_S224B }, | |
| 992 | {"ffightub", CPS_B_05, mapper_S224B }, | |
| 993 | {"ffightj", CPS_B_04, mapper_S224B }, | |
| 994 | {"ffightj1", CPS_B_02, mapper_S224B }, | |
| 995 | {"1941", CPS_B_05, mapper_YI24B }, | |
| 996 | {"1941j", CPS_B_05, mapper_YI24B }, | |
| 997 | {"unsquad", CPS_B_11, mapper_AR24B }, /* CPSB ID not checked, but it's the same as sf2eg */ | |
| 998 | {"area88", CPS_B_11, mapper_AR24B }, /* CPSB ID not checked, but it's the same as sf2eg */ | |
| 999 | {"mercs", CPS_B_12, mapper_0224B }, /* (uses port 74) */ | |
| 1000 | {"mercsu", CPS_B_12, mapper_0224B }, /* (uses port 74) */ | |
| 1001 | {"mercsua", CPS_B_12, mapper_0224B }, /* (uses port 74) */ | |
| 1002 | {"mercsj", CPS_B_12, mapper_0224B }, /* (uses port 74) */ | |
| 1003 | {"msword", CPS_B_13, mapper_MS24B }, /* CPSB ID not checked, but it's the same as sf2j */ | |
| 1004 | {"mswordr1", CPS_B_13, mapper_MS24B }, /* CPSB ID not checked, but it's the same as sf2j */ | |
| 1005 | {"mswordu", CPS_B_13, mapper_MS24B }, /* CPSB ID not checked, but it's the same as sf2j */ | |
| 1006 | {"mswordj", CPS_B_13, mapper_MS24B }, /* CPSB ID not checked, but it's the same as sf2j */ | |
| 1007 | {"mtwins", CPS_B_14, mapper_CK24B }, | |
| 1008 | {"chikij", CPS_B_14, mapper_CK24B }, | |
| 1009 | {"nemo", CPS_B_15, mapper_NM24B }, | |
| 1010 | {"nemoj", CPS_B_15, mapper_NM24B }, | |
| 1011 | {"cawing", CPS_B_16, mapper_CA24B }, | |
| 1012 | {"cawingr1", CPS_B_16, mapper_CA24B }, | |
| 1013 | {"cawingu", CPS_B_16, mapper_CA24B }, | |
| 1014 | {"cawingj", CPS_B_16, mapper_CA24B }, | |
| 1015 | {"sf2", CPS_B_11, mapper_STF29 }, | |
| 1016 | {"sf2eb", CPS_B_17, mapper_STF29 }, | |
| 1017 | {"sf2ua", CPS_B_17, mapper_STF29 }, | |
| 1018 | {"sf2ub", CPS_B_17, mapper_STF29 }, | |
| 1019 | {"sf2ud", CPS_B_05, mapper_STF29 }, | |
| 1020 | {"sf2ue", CPS_B_18, mapper_STF29 }, | |
| 1021 | {"sf2uf", CPS_B_15, mapper_STF29 }, | |
| 1022 | {"sf2ui", CPS_B_14, mapper_STF29 }, | |
| 1023 | {"sf2uk", CPS_B_17, mapper_STF29 }, // check CPS_B | |
| 1024 | {"sf2j", CPS_B_13, mapper_STF29 }, | |
| 1025 | {"sf2ja", CPS_B_17, mapper_STF29 }, | |
| 1026 | {"sf2jc", CPS_B_12, mapper_STF29 }, | |
| 1024 | /* name CPSB gfx mapper in2 in3 out2 kludge */ | |
| 1025 | {"forgottn", CPS_B_01, mapper_LWCHR }, | |
| 1026 | {"lostwrld", CPS_B_01, mapper_LWCHR }, | |
| 1027 | {"ghouls", CPS_B_01, mapper_DM620 }, | |
| 1028 | {"ghoulsu", CPS_B_01, mapper_DM620 }, | |
| 1029 | {"daimakai", CPS_B_01, mapper_DM620 }, | |
| 1030 | {"strider", CPS_B_01, mapper_ST22B }, | |
| 1031 | {"stridrua", CPS_B_01, mapper_ST22B }, | |
| 1032 | {"striderj", CPS_B_01, mapper_ST22B }, | |
| 1033 | {"stridrja", CPS_B_01, mapper_ST22B }, | |
| 1034 | {"dynwar", CPS_B_02, mapper_TK22B }, | |
| 1035 | {"dynwarj", CPS_B_02, mapper_TK22B }, | |
| 1036 | {"willow", CPS_B_03, mapper_WL24B }, | |
| 1037 | {"willowj", CPS_B_03, mapper_WL24B }, | |
| 1038 | {"willowje", CPS_B_03, mapper_WL24B }, | |
| 1039 | {"ffight", CPS_B_04, mapper_S224B }, | |
| 1040 | {"ffightu", CPS_B_04, mapper_S224B }, | |
| 1041 | {"ffightua", CPS_B_01, mapper_S224B }, | |
| 1042 | {"ffightub", CPS_B_05, mapper_S224B }, | |
| 1043 | {"ffightj", CPS_B_04, mapper_S224B }, | |
| 1044 | {"ffightj1", CPS_B_02, mapper_S224B }, | |
| 1045 | {"1941", CPS_B_05, mapper_YI24B }, | |
| 1046 | {"1941j", CPS_B_05, mapper_YI24B }, | |
| 1047 | {"unsquad", CPS_B_11, mapper_AR24B }, /* CPSB ID not checked, but it's the same as sf2eg */ | |
| 1048 | {"area88", CPS_B_11, mapper_AR24B }, /* CPSB ID not checked, but it's the same as sf2eg */ | |
| 1049 | {"mercs", CPS_B_12, mapper_0224B, 0x36, 0, 0x34 }, | |
| 1050 | {"mercsu", CPS_B_12, mapper_0224B, 0x36, 0, 0x34 }, | |
| 1051 | {"mercsua", CPS_B_12, mapper_0224B, 0x36, 0, 0x34 }, | |
| 1052 | {"mercsj", CPS_B_12, mapper_0224B, 0x36, 0, 0x34 }, | |
| 1053 | {"msword", CPS_B_13, mapper_MS24B }, /* CPSB ID not checked, but it's the same as sf2j */ | |
| 1054 | {"mswordr1", CPS_B_13, mapper_MS24B }, /* CPSB ID not checked, but it's the same as sf2j */ | |
| 1055 | {"mswordu", CPS_B_13, mapper_MS24B }, /* CPSB ID not checked, but it's the same as sf2j */ | |
| 1056 | {"mswordj", CPS_B_13, mapper_MS24B }, /* CPSB ID not checked, but it's the same as sf2j */ | |
| 1057 | {"mtwins", CPS_B_14, mapper_CK24B }, | |
| 1058 | {"chikij", CPS_B_14, mapper_CK24B }, | |
| 1059 | {"nemo", CPS_B_15, mapper_NM24B }, | |
| 1060 | {"nemoj", CPS_B_15, mapper_NM24B }, | |
| 1061 | {"cawing", CPS_B_16, mapper_CA24B }, | |
| 1062 | {"cawingr1", CPS_B_16, mapper_CA24B }, | |
| 1063 | {"cawingu", CPS_B_16, mapper_CA24B }, | |
| 1064 | {"cawingj", CPS_B_16, mapper_CA24B }, | |
| 1065 | {"sf2", CPS_B_11, mapper_STF29, 0x36 }, | |
| 1066 | {"sf2eb", CPS_B_17, mapper_STF29, 0x36 }, | |
| 1067 | {"sf2ua", CPS_B_17, mapper_STF29, 0x36 }, | |
| 1068 | {"sf2ub", CPS_B_17, mapper_STF29, 0x36 }, | |
| 1069 | {"sf2ud", CPS_B_05, mapper_STF29, 0x36 }, | |
| 1070 | {"sf2ue", CPS_B_18, mapper_STF29, 0x3c }, | |
| 1071 | {"sf2uf", CPS_B_15, mapper_STF29, 0x36 }, | |
| 1072 | {"sf2ui", CPS_B_14, mapper_STF29, 0x36 }, | |
| 1073 | {"sf2uk", CPS_B_17, mapper_STF29, 0x36 }, // check CPS_B | |
| 1074 | {"sf2j", CPS_B_13, mapper_STF29, 0x36 }, | |
| 1075 | {"sf2ja", CPS_B_17, mapper_STF29, 0x36 }, | |
| 1076 | {"sf2jc", CPS_B_12, mapper_STF29, 0x36 }, | |
| 1027 | 1077 | /* from here onwards the CPS-B board has suicide battery and multiply protection */ |
| 1028 | {"3wonders", BATTRY_1, mapper_RT22B }, | |
| 1029 | {"3wonderu", BATTRY_1, mapper_RT22B }, | |
| 1030 | {"wonder3", BATTRY_1, mapper_RT22B }, | |
| 1031 | {"kod", BATTRY_2, mapper_KD29B }, | |
| 1032 | {"kodu", BATTRY_2, mapper_KD29B }, | |
| 1033 | {"kodj", BATTRY_2, mapper_KD29B }, | |
| 1034 | {"kodb", BATTRY_2, mapper_KD29B }, /* bootleg, doesn't use multiply protection */ | |
| 1035 | {"captcomm", BATTRY_3, mapper_CC63B }, | |
| 1036 | {"captcomu", BATTRY_3, mapper_CC63B }, | |
| 1037 | {"captcomj", BATTRY_3, mapper_CC63B }, | |
| 1038 | {"knights", BATTRY_4, mapper_KR63B }, | |
| 1039 | {"knightsu", BATTRY_4, mapper_KR63B }, | |
| 1040 | {"knightsj", BATTRY_4, mapper_KR63B }, | |
| 1041 | {"sf2ce", NOBATTRY, mapper_S9263B }, | |
| 1042 | {"sf2ceua", NOBATTRY, mapper_S9263B }, | |
| 1043 | {"sf2ceub", NOBATTRY, mapper_S9263B }, | |
| 1044 | {"sf2ceuc", NOBATTRY, mapper_S9263B }, | |
| 1045 | {"sf2cej", NOBATTRY, mapper_S9263B }, | |
| 1046 | {"sf2rb", NOBATTRY, mapper_S9263B }, | |
| 1047 | {"sf2rb2", NOBATTRY, mapper_S9263B }, | |
| 1048 | {"sf2red", NOBATTRY, mapper_S9263B }, | |
| 1049 | {"sf2v004", NOBATTRY, mapper_S9263B }, | |
| 1050 | {"sf2accp2", NOBATTRY, mapper_S9263B }, | |
| 1051 | {"sf2m1", NOBATTRY, mapper_S9263B }, | |
| 1052 | {"sf2m2", NOBATTRY, mapper_S9263B }, | |
| 1053 | {"sf2m3", NOBATTRY, mapper_S9263B }, | |
| 1054 | {"sf2m4", HACK_B_1, mapper_S9263B, 1 }, | |
| 1055 | {"sf2m5", NOBATTRY, mapper_S9263B, 1 }, | |
| 1056 | {"sf2m6", NOBATTRY, mapper_S9263B, 1 }, | |
| 1057 | {"sf2m7", NOBATTRY, mapper_S9263B, 1 }, | |
| 1058 | {"sf2yyc", NOBATTRY, mapper_S9263B, 1 }, | |
| 1059 | {"sf2koryu", NOBATTRY, mapper_S9263B, 1 }, | |
| 1060 | {"varth", CPS_B_04, mapper_VA24B }, /* CPSB test has been patched out (60=0008) */ | |
| 1061 | {"varthr1", CPS_B_04, mapper_VA24B }, /* CPSB test has been patched out (60=0008) */ | |
| 1062 | {"varthu", CPS_B_04, mapper_VA24B }, /* CPSB test has been patched out (60=0008) */ | |
| 1063 | {"varthj", BATTRY_5, mapper_VA24B }, /* CPSB test has been patched out (72=0001) */ | |
| 1064 | {"cworld2j", BATTRY_6, mapper_Q522B }, /* The 0x76 priority values are incorrect values */ | |
| 1065 | {"wof", NOBATTRY, mapper_TK263B }, /* bootleg? */ | |
| 1066 | {"wofa", NOBATTRY, mapper_TK263B }, /* bootleg? */ | |
| 1067 | {"wofu", QSOUND_1, mapper_TK263B }, | |
| 1068 | {"wofj", QSOUND_1, mapper_TK263B }, | |
| 1069 | {"dino", QSOUND_2, mapper_CD63B }, /* layer enable never used */ | |
| 1070 | {"dinou", QSOUND_2, mapper_CD63B }, /* layer enable never used */ | |
| 1071 | {"dinoj", QSOUND_2, mapper_CD63B }, /* layer enable never used */ | |
| 1072 | {"punisher", QSOUND_3, mapper_PS63B }, | |
| 1073 | {"punishru", QSOUND_3, mapper_PS63B }, | |
| 1074 | {"punishrj", QSOUND_3, mapper_PS63B }, | |
| 1075 | {"slammast", QSOUND_4, mapper_MB63B }, | |
| 1076 | {"slammasu", QSOUND_4, mapper_MB63B }, | |
| 1077 | {"mbomberj", QSOUND_4, mapper_MB63B }, | |
| 1078 | {"mbombrd", QSOUND_5, mapper_MB63B }, | |
| 1079 | {"mbombrdj", QSOUND_5, mapper_MB63B }, | |
| 1080 | {"sf2hf", NOBATTRY, mapper_S9263B }, | |
| 1081 | {"sf2t", NOBATTRY, mapper_S9263B }, | |
| 1082 | {"sf2tj", NOBATTRY, mapper_S9263B }, | |
| 1083 | {"qad", BATTRY_7, mapper_QD22B }, /* TODO: layer enable */ | |
| 1084 | {"qadj", NOBATTRY, mapper_qadj }, | |
| 1085 | {"qtono2", NOBATTRY, mapper_qtono2 }, | |
| 1086 | {"megaman", NOBATTRY, mapper_RCM63B }, | |
| 1087 | {"rockmanj", NOBATTRY, mapper_RCM63B }, | |
| 1088 | {"pnickj", NOBATTRY, mapper_pnickj }, | |
| 1089 | {"pang3", NOBATTRY, mapper_pang3 }, /* EEPROM port is among the CPS registers (handled by DRIVER_INIT) */ | |
| 1090 | {"pang3j", NOBATTRY, mapper_pang3 }, /* EEPROM port is among the CPS registers (handled by DRIVER_INIT) */ | |
| 1078 | {"3wonders", CPS_B_21_BT1, mapper_RT24B }, | |
| 1079 | {"3wonderu", CPS_B_21_BT1, mapper_RT24B }, | |
| 1080 | {"wonder3", CPS_B_21_BT1, mapper_RT22B }, // equivalent to RT24B | |
| 1081 | {"kod", CPS_B_21_BT2, mapper_KD29B, 0x36, 0, 0x34 }, | |
| 1082 | {"kodu", CPS_B_21_BT2, mapper_KD29B, 0x36, 0, 0x34 }, | |
| 1083 | {"kodj", CPS_B_21_BT2, mapper_KD29B, 0x36, 0, 0x34 }, | |
| 1084 | {"kodb", CPS_B_21_BT2, mapper_KD29B, 0x36, 0, 0x34 }, /* bootleg, doesn't use multiply protection */ | |
| 1085 | {"captcomm", CPS_B_21_BT3, mapper_CC63B, 0x36, 0x38, 0x34 }, | |
| 1086 | {"captcomu", CPS_B_21_BT3, mapper_CC63B, 0x36, 0x38, 0x34 }, | |
| 1087 | {"captcomj", CPS_B_21_BT3, mapper_CC63B, 0x36, 0x38, 0x34 }, | |
| 1088 | {"knights", CPS_B_21_BT4, mapper_KR63B, 0x36, 0, 0x34 }, | |
| 1089 | {"knightsu", CPS_B_21_BT4, mapper_KR63B, 0x36, 0, 0x34 }, | |
| 1090 | {"knightsj", CPS_B_21_BT4, mapper_KR63B, 0x36, 0, 0x34 }, | |
| 1091 | {"sf2ce", CPS_B_21_DEF, mapper_S9263B, 0x36 }, | |
| 1092 | {"sf2ceua", CPS_B_21_DEF, mapper_S9263B, 0x36 }, | |
| 1093 | {"sf2ceub", CPS_B_21_DEF, mapper_S9263B, 0x36 }, | |
| 1094 | {"sf2ceuc", CPS_B_21_DEF, mapper_S9263B, 0x36 }, | |
| 1095 | {"sf2cej", CPS_B_21_DEF, mapper_S9263B, 0x36 }, | |
| 1096 | {"sf2rb", CPS_B_21_DEF, mapper_S9263B, 0x36 }, | |
| 1097 | {"sf2rb2", CPS_B_21_DEF, mapper_S9263B, 0x36 }, | |
| 1098 | {"sf2red", CPS_B_21_DEF, mapper_S9263B, 0x36 }, | |
| 1099 | {"sf2v004", CPS_B_21_DEF, mapper_S9263B, 0x36 }, | |
| 1100 | {"sf2accp2", CPS_B_21_DEF, mapper_S9263B, 0x36 }, | |
| 1101 | {"sf2m1", CPS_B_21_DEF, mapper_S9263B, 0x36 }, | |
| 1102 | {"sf2m2", CPS_B_21_DEF, mapper_S9263B, 0x36 }, | |
| 1103 | {"sf2m3", CPS_B_21_DEF, mapper_S9263B, 0x36 }, | |
| 1104 | {"sf2m4", HACK_B_1, mapper_S9263B, 0x36, 0, 0, 1 }, | |
| 1105 | {"sf2m5", CPS_B_21_DEF, mapper_S9263B, 0x36, 0, 0, 1 }, | |
| 1106 | {"sf2m6", CPS_B_21_DEF, mapper_S9263B, 0x36, 0, 0, 1 }, | |
| 1107 | {"sf2m7", CPS_B_21_DEF, mapper_S9263B, 0x36, 0, 0, 1 }, | |
| 1108 | {"sf2yyc", CPS_B_21_DEF, mapper_S9263B, 0x36, 0, 0, 1 }, | |
| 1109 | {"sf2koryu", CPS_B_21_DEF, mapper_S9263B, 0x36, 0, 0, 1 }, | |
| 1110 | {"varth", CPS_B_04, mapper_VA24B }, /* CPSB test has been patched out (60=0008) register is also written to, possibly leftover from development */ | |
| 1111 | {"varthr1", CPS_B_04, mapper_VA24B }, /* CPSB test has been patched out (60=0008) register is also written to, possibly leftover from development */ | |
| 1112 | {"varthu", CPS_B_04, mapper_VA24B }, /* CPSB test has been patched out (60=0008) register is also written to, possibly leftover from development */ | |
| 1113 | {"varthj", CPS_B_21_BT5, mapper_VA24B }, /* CPSB test has been patched out (72=0001) register is also written to, possibly leftover from development */ | |
| 1114 | {"cworld2j", CPS_B_21_BT6, mapper_Q522B, 0x36, 0, 0x34 }, /* (ports 36, 34 probably leftover input code from another game) */ | |
| 1115 | {"wof", CPS_B_21_DEF, mapper_TK263B }, /* bootleg? */ | |
| 1116 | {"wofa", CPS_B_21_DEF, mapper_TK263B }, /* bootleg? */ | |
| 1117 | {"wofu", CPS_B_21_QS1, mapper_TK263B }, | |
| 1118 | {"wofj", CPS_B_21_QS1, mapper_TK263B }, | |
| 1119 | {"dino", CPS_B_21_QS2, mapper_CD63B }, /* layer enable never used */ | |
| 1120 | {"dinou", CPS_B_21_QS2, mapper_CD63B }, /* layer enable never used */ | |
| 1121 | {"dinoj", CPS_B_21_QS2, mapper_CD63B }, /* layer enable never used */ | |
| 1122 | {"punisher", CPS_B_21_QS3, mapper_PS63B }, | |
| 1123 | {"punishru", CPS_B_21_QS3, mapper_PS63B }, | |
| 1124 | {"punishrj", CPS_B_21_QS3, mapper_PS63B }, | |
| 1125 | {"slammast", CPS_B_21_QS4, mapper_MB63B }, | |
| 1126 | {"slammasu", CPS_B_21_QS4, mapper_MB63B }, | |
| 1127 | {"mbomberj", CPS_B_21_QS4, mapper_MB63B }, | |
| 1128 | {"mbombrd", CPS_B_21_QS5, mapper_MB63B }, | |
| 1129 | {"mbombrdj", CPS_B_21_QS5, mapper_MB63B }, | |
| 1130 | {"sf2hf", CPS_B_21_DEF, mapper_S9263B, 0x36 }, | |
| 1131 | {"sf2t", CPS_B_21_DEF, mapper_S9263B, 0x36 }, | |
| 1132 | {"sf2tj", CPS_B_21_DEF, mapper_S9263B, 0x36 }, | |
| 1133 | {"qad", CPS_B_21_BT7, mapper_QD22B, 0x36 }, /* TODO: layer enable (port 36 probably leftover input code from another game) */ | |
| 1134 | {"qadj", CPS_B_21_DEF, mapper_qadj, 0x36, 0x38, 0x34 }, /* (ports 36, 38, 34 probably leftover input code from another game) */ | |
| 1135 | {"qtono2", CPS_B_21_DEF, mapper_qtono2, 0x36, 0x38, 0x34 }, /* (ports 36, 38, 34 probably leftover input code from another game) */ | |
| 1136 | {"megaman", CPS_B_21_DEF, mapper_RCM63B }, | |
| 1137 | {"rockmanj", CPS_B_21_DEF, mapper_RCM63B }, | |
| 1138 | {"pnickj", CPS_B_21_DEF, mapper_pnickj }, | |
| 1139 | {"pang3", CPS_B_21_DEF, mapper_pang3 }, /* EEPROM port is among the CPS registers (handled by DRIVER_INIT) */ | |
| 1140 | {"pang3j", CPS_B_21_DEF, mapper_pang3 }, /* EEPROM port is among the CPS registers (handled by DRIVER_INIT) */ | |
| 1091 | 1141 | #ifdef MESS |
| 1092 | {"sfzch", | |
| 1142 | {"sfzch", CPS_B_21_DEF, mapper_cps2 }, | |
| 1093 | 1143 | #endif |
| 1094 | 1144 | |
| 1095 | 1145 | /* CPS2 games */ |
| 1096 | {"cps2", | |
| 1146 | {"cps2", CPS_B_21_DEF, mapper_cps2 }, | |
| 1097 | 1147 | |
| 1098 | 1148 | {0} /* End of table */ |
| 1099 | 1149 | }; |
| r2454 | r2455 | |
| 1102 | 1152 | |
| 1103 | 1153 | /* Public variables */ |
| 1104 | 1154 | UINT16 *cps1_gfxram; |
| 1105 | UINT16 *cps1_output; | |
| 1155 | UINT16 *cps1_cps_a_regs; | |
| 1156 | UINT16 *cps1_cps_b_regs; | |
| 1106 | 1157 | |
| 1107 | 1158 | size_t cps1_gfxram_size; |
| 1108 | size_t cps1_output_size; | |
| 1109 | 1159 | |
| 1110 | 1160 | /* Offset of each palette entry */ |
| 1111 | 1161 | #define cps1_palette_entries (32*6) /* Number colour schemes in palette */ |
| r2454 | r2455 | |
| 1136 | 1186 | static int stars1x, stars1y, stars2x, stars2y; |
| 1137 | 1187 | |
| 1138 | 1188 | |
| 1139 | /* Output ports */ | |
| 1140 | #define CPS1_OBJ_BASE 0x00 /* Base address of objects */ | |
| 1141 | #define CPS1_SCROLL1_BASE 0x02 /* Base address of scroll 1 */ | |
| 1142 | #define CPS1_SCROLL2_BASE 0x04 /* Base address of scroll 2 */ | |
| 1143 | #define CPS1_SCROLL3_BASE 0x06 /* Base address of scroll 3 */ | |
| 1144 | #define CPS1_OTHER_BASE 0x08 /* Base address of other video */ | |
| 1145 | #define CPS1_PALETTE_BASE 0x0a /* Base address of palette */ | |
| 1146 | #define CPS1_SCROLL1_SCROLLX 0x0c /* Scroll 1 X */ | |
| 1147 | #define CPS1_SCROLL1_SCROLLY 0x0e /* Scroll 1 Y */ | |
| 1148 | #define CPS1_SCROLL2_SCROLLX 0x10 /* Scroll 2 X */ | |
| 1149 | #define CPS1_SCROLL2_SCROLLY 0x12 /* Scroll 2 Y */ | |
| 1150 | #define CPS1_SCROLL3_SCROLLX 0x14 /* Scroll 3 X */ | |
| 1151 | #define CPS1_SCROLL3_SCROLLY 0x16 /* Scroll 3 Y */ | |
| 1152 | #define CPS1_STARS1_SCROLLX 0x18 /* Stars 1 X */ | |
| 1153 | #define CPS1_STARS1_SCROLLY 0x1a /* Stars 1 Y */ | |
| 1154 | #define CPS1_STARS2_SCROLLX 0x1c /* Stars 2 X */ | |
| 1155 | #define CPS1_STARS2_SCROLLY 0x1e /* Stars 2 Y */ | |
| 1156 | #define CPS1_ROWSCROLL_OFFS 0x20 /* base of row scroll offsets in other RAM */ | |
| 1157 | #define CPS1_VIDEOCONTROL 0x22 /* flip screen, rowscroll enable */ | |
| 1189 | /* CPS-A registers */ | |
| 1190 | #define CPS1_OBJ_BASE (0x00/2) /* Base address of objects */ | |
| 1191 | #define CPS1_SCROLL1_BASE (0x02/2) /* Base address of scroll 1 */ | |
| 1192 | #define CPS1_SCROLL2_BASE (0x04/2) /* Base address of scroll 2 */ | |
| 1193 | #define CPS1_SCROLL3_BASE (0x06/2) /* Base address of scroll 3 */ | |
| 1194 | #define CPS1_OTHER_BASE (0x08/2) /* Base address of other video */ | |
| 1195 | #define CPS1_PALETTE_BASE (0x0a/2) /* Base address of palette */ | |
| 1196 | #define CPS1_SCROLL1_SCROLLX (0x0c/2) /* Scroll 1 X */ | |
| 1197 | #define CPS1_SCROLL1_SCROLLY (0x0e/2) /* Scroll 1 Y */ | |
| 1198 | #define CPS1_SCROLL2_SCROLLX (0x10/2) /* Scroll 2 X */ | |
| 1199 | #define CPS1_SCROLL2_SCROLLY (0x12/2) /* Scroll 2 Y */ | |
| 1200 | #define CPS1_SCROLL3_SCROLLX (0x14/2) /* Scroll 3 X */ | |
| 1201 | #define CPS1_SCROLL3_SCROLLY (0x16/2) /* Scroll 3 Y */ | |
| 1202 | #define CPS1_STARS1_SCROLLX (0x18/2) /* Stars 1 X */ | |
| 1203 | #define CPS1_STARS1_SCROLLY (0x1a/2) /* Stars 1 Y */ | |
| 1204 | #define CPS1_STARS2_SCROLLX (0x1c/2) /* Stars 2 X */ | |
| 1205 | #define CPS1_STARS2_SCROLLY (0x1e/2) /* Stars 2 Y */ | |
| 1206 | #define CPS1_ROWSCROLL_OFFS (0x20/2) /* base of row scroll offsets in other RAM */ | |
| 1207 | #define CPS1_VIDEOCONTROL (0x22/2) /* flip screen, rowscroll enable */ | |
| 1158 | 1208 | |
| 1159 | #define CPS1_SCROLL2_WIDTH 0x40 | |
| 1160 | #define CPS1_SCROLL2_HEIGHT 0x40 | |
| 1161 | 1209 | |
| 1162 | ||
| 1163 | 1210 | /* |
| 1164 | 1211 | CPS1 VIDEO RENDERER |
| 1165 | 1212 | |
| r2454 | r2455 | |
| 1260 | 1307 | } |
| 1261 | 1308 | |
| 1262 | 1309 | |
| 1263 | ||
| 1310 | INLINE UINT16 *cps1_base(int offset,int boundary) | |
| 1264 | 1311 | { |
| 1265 | return cps1_output[offset/2]; | |
| 1266 | } | |
| 1312 | int base = cps1_cps_a_regs[offset]*256; | |
| 1267 | 1313 | |
| 1268 | INLINE UINT16 *cps1_base(int offset,int boundary) | |
| 1269 | { | |
| 1270 | int base=cps1_port(offset)*256; | |
| 1271 | 1314 | /* |
| 1272 | 1315 | The scroll RAM must start on a 0x4000 boundary. |
| 1273 | 1316 | Some games do not do this. |
| r2454 | r2455 | |
| 1282 | 1325 | |
| 1283 | 1326 | |
| 1284 | 1327 | |
| 1285 | RE | |
| 1328 | WRITE | |
| 1286 | 1329 | { |
| 1287 | | |
| 1330 | da | |
| 1288 | 1331 | |
| 1332 | /* | |
| 1333 | The main CPU writes the palette to gfxram, and the CPS-B custom copies it | |
| 1334 | to the real palette RAM, which is separated from gfxram. | |
| 1335 | This is done ONLY after the palette base register is written to. It is not | |
| 1336 | known what the exact timing should be, how long it should take and when it | |
| 1337 | should happen. We are assuming that the copy happens immediately, since it | |
| 1338 | fixes glitches in the ghouls intro, but it might happen at next vblank. | |
| 1339 | */ | |
| 1340 | if (offset == CPS1_PALETTE_BASE) | |
| 1341 | cps1_build_palette(machine, cps1_base(CPS1_PALETTE_BASE,cps1_palette_align)); | |
| 1342 | ||
| 1343 | if (offset > CPS1_VIDEOCONTROL) | |
| 1344 | popmessage("write to CPS-A register %02x contact MAMEDEV", offset*2); | |
| 1345 | } | |
| 1346 | ||
| 1347 | ||
| 1348 | READ16_HANDLER( cps1_cps_b_r ) | |
| 1349 | { | |
| 1289 | 1350 | /* Some games interrogate a couple of registers on bootup. */ |
| 1290 | 1351 | /* These are CPS1 board B self test checks. They wander from game to */ |
| 1291 | 1352 | /* game. */ |
| 1292 | if (offset | |
| 1353 | if (offset | |
| 1293 | 1354 | return cps1_game_config->cpsb_value; |
| 1294 | 1355 | |
| 1295 | /* some games use as a protection check the ability to do 16-bit multipli | |
| 1356 | /* some games use as a protection check the ability to do 16-bit multiplications */ | |
| 1296 | 1357 | /* with a 32-bit result, by writing the factors to two ports and reading the */ |
| 1297 | 1358 | /* result from two other ports. */ |
| 1298 | if (offset && offset == cps1_game_config->mult_result_lo/2) | |
| 1299 | return (cps1_output[cps1_game_config->mult_factor1/2] * | |
| 1300 | cps1_output[cps1_game_config->mult_factor2/2]) & 0xffff; | |
| 1301 | if (offset && offset == cps1_game_config->mult_result_hi/2) | |
| 1302 | return (cps1_output[cps1_game_config->mult_factor1/2] * | |
| 1303 | cps1_output[cps1_game_config->mult_factor2/2]) >> 16; | |
| 1359 | if (offset == cps1_game_config->mult_result_lo/2) | |
| 1360 | return (cps1_cps_b_regs[cps1_game_config->mult_factor1/2] * | |
| 1361 | cps1_cps_b_regs[cps1_game_config->mult_factor2/2]) & 0xffff; | |
| 1362 | if (offset == cps1_game_config->mult_result_hi/2) | |
| 1363 | return (cps1_cps_b_regs[cps1_game_config->mult_factor1/2] * | |
| 1364 | cps1_cps_b_regs[cps1_game_config->mult_factor2/2]) >> 16; | |
| 1304 | 1365 | |
| 1305 | return cps1_output[offset]; | |
| 1366 | if (offset == cps1_game_config->in2_addr/2) /* Extra input ports (on C-board) */ | |
| 1367 | return input_port_read(machine, "IN2"); | |
| 1368 | ||
| 1369 | if (offset == cps1_game_config->in3_addr/2) /* Player 4 controls (on C-board) ("Captain Commando") */ | |
| 1370 | return input_port_read(machine, "IN3"); | |
| 1371 | ||
| 1372 | if (cps_version == 2) | |
| 1373 | { | |
| 1374 | if (offset == 0x12/2) | |
| 1375 | { | |
| 1376 | return cps1_cps_b_regs[0x12/2]; | |
| 1377 | } | |
| 1378 | } | |
| 1379 | ||
| 1380 | popmessage("CPS-B read port %02x contact MAMEDEV", offset*2); | |
| 1381 | ||
| 1382 | return 0xffff; | |
| 1306 | 1383 | } |
| 1307 | 1384 | |
| 1308 | 1385 | |
| 1309 | WRITE16_HANDLER( cps1_ | |
| 1386 | WRITE16_HANDLER( cps1_c | |
| 1310 | 1387 | { |
| 1311 | data = COMBINE_DATA(&cps1_ | |
| 1388 | data = COMBINE_DATA(&cps1_c | |
| 1312 | 1389 | |
| 1313 | /* To mark scanlines for raster effects */ | |
| 1314 | if(offset == 0x52/2) | |
| 1390 | if (cps_version == 2) | |
| 1315 | 1391 | { |
| 1316 | cps1_scanline2 = (data & 0x1ff); | |
| 1392 | /* To mark scanlines for raster effects */ | |
| 1393 | if (offset == 0x0e/2) | |
| 1394 | { | |
| 1395 | // UNKNOWN | |
| 1396 | return; | |
| 1397 | } | |
| 1398 | if (offset == 0x10/2) | |
| 1399 | { | |
| 1400 | cps1_scanline1 = (data & 0x1ff); | |
| 1401 | return; | |
| 1402 | } | |
| 1403 | if (offset == 0x12/2) | |
| 1404 | { | |
| 1405 | cps1_scanline2 = (data & 0x1ff); | |
| 1406 | return; | |
| 1407 | } | |
| 1317 | 1408 | } |
| 1318 | if(offset == 0x50/2) | |
| 1409 | ||
| 1410 | ||
| 1411 | // additional outputs on C-board | |
| 1412 | if (offset == cps1_game_config->out2_addr/2) | |
| 1319 | 1413 | { |
| 1320 | cps1_scanline1 = (data & 0x1ff); | |
| 1414 | if (ACCESSING_BITS_0_7) | |
| 1415 | { | |
| 1416 | if (cps1_game_config->cpsb_value == 0x0402) // Mercs (CN2 connector) | |
| 1417 | { | |
| 1418 | coin_lockout_w(2,~data & 0x01); | |
| 1419 | set_led_status(0,data & 0x02); | |
| 1420 | set_led_status(1,data & 0x04); | |
| 1421 | set_led_status(2,data & 0x08); | |
| 1422 | } | |
| 1423 | else // kod, captcomm, knights | |
| 1424 | { | |
| 1425 | coin_lockout_w(2,~data & 0x02); | |
| 1426 | coin_lockout_w(3,~data & 0x08); | |
| 1427 | } | |
| 1428 | } | |
| 1321 | 1429 | } |
| 1322 | 1430 | |
| 1323 | 1431 | |
| 1324 | #ifdef MAME_DEBUG | |
| 1325 | if (cps1_game_config->palette_control && offset == cps1_game_config->palette_control/2 && data != 0x3f) | |
| 1326 | logerror("palette_control = %04x",data); | |
| 1327 | #endif | |
| 1328 | if (VERBOSE) | |
| 1329 | { | |
| 1330 | if (offset > 0x22/2 && | |
| 1331 | offset != cps1_game_config->layer_control/2 && | |
| 1332 | offset != cps1_game_config->priority[0]/2 && | |
| 1333 | offset != cps1_game_config->priority[1]/2 && | |
| 1334 | offset != cps1_game_config->priority[2]/2 && | |
| 1335 | offset != cps1_game_config->priority[3]/2 && | |
| 1336 | offset != cps1_game_config->palette_control/2) | |
| 1337 | logerror("PC %06x: write %02x to output port %02x\n",activecpu_get_pc(),data,offset*2); | |
| 1338 | ||
| 1339 | #ifdef MAME_DEBUG | |
| 1340 | if (cps1_game_config->priority[0] && offset == cps1_game_config->priority[0]/2 && data != 0x00) | |
| 1341 | popmessage("priority0 %04x",data); | |
| 1342 | #endif | |
| 1432 | if (offset != cps1_game_config->cpsb_addr/2 && // only varth writes here | |
| 1433 | offset != cps1_game_config->mult_factor1/2 && | |
| 1434 | offset != cps1_game_config->mult_factor2/2 && | |
| 1435 | offset != cps1_game_config->layer_control/2 && | |
| 1436 | offset != cps1_game_config->unknown1/2 && | |
| 1437 | offset != cps1_game_config->unknown2/2 && | |
| 1438 | offset != cps1_game_config->unknown3/2 && | |
| 1439 | offset != cps1_game_config->priority[0]/2 && | |
| 1440 | offset != cps1_game_config->priority[1]/2 && | |
| 1441 | offset != cps1_game_config->priority[2]/2 && | |
| 1442 | offset != cps1_game_config->priority[3]/2 && | |
| 1443 | offset != cps1_game_config->palette_control/2 && | |
| 1444 | offset != cps1_game_config->out2_addr/2) | |
| 1445 | popmessage("CPS-B write %04x to port %02x contact MAMEDEV", data, offset*2); | |
| 1343 | 1446 | } |
| 1344 | 1447 | |
| 1345 | /* | |
| 1346 | The main CPU writes the palette to gfxram, and the CPS-B custom copies it | |
| 1347 | to the real palette RAM, which is separated from gfxram. | |
| 1348 | This is done ONLY after the palette base register is written to. It is not | |
| 1349 | known what the exact timing should be, how long it should take and when it | |
| 1350 | should happen. We are assuming that the copy happens immediately, since it | |
| 1351 | fixes glitches in the ghouls intro, but it might happen at next vblank. | |
| 1352 | */ | |
| 1353 | if (offset == CPS1_PALETTE_BASE/2) | |
| 1354 | cps1_build_palette(machine, cps1_base(CPS1_PALETTE_BASE,cps1_palette_align)); | |
| 1355 | } | |
| 1356 | 1448 | |
| 1357 | 1449 | |
| 1358 | ||
| 1359 | 1450 | INLINE int cps2_port(int offset) |
| 1360 | 1451 | { |
| 1361 | 1452 | return cps2_output[offset/2]; |
| r2454 | r2455 | |
| 1473 | 1564 | /* Some of the sf2 hacks use only sprite port 0x9100 and the scroll layers are offset */ |
| 1474 | 1565 | if (cps1_game_config->bootleg_kludge == 1) |
| 1475 | 1566 | { |
| 1476 | cps1_output[CPS1_OBJ_BASE/2] = 0x9100; | |
| 1477 | cps1_obj=cps1_base(CPS1_OBJ_BASE, cps1_obj_size); | |
| 1567 | cps1_cps_a_regs[CPS1_OBJ_BASE] = 0x9100; | |
| 1568 | cps1_obj = cps1_base(CPS1_OBJ_BASE, cps1_obj_size); | |
| 1478 | 1569 | scroll1xoff = -0x0c; |
| 1479 | 1570 | scroll2xoff = -0x0e; |
| 1480 | 1571 | scroll3xoff = -0x10; |
| 1481 | 1572 | } |
| 1482 | 1573 | else |
| 1483 | 1574 | { |
| 1484 | cps1_obj=cps1_base(CPS1_OBJ_BASE, cps1_obj_size); | |
| 1575 | cps1_obj = cps1_base(CPS1_OBJ_BASE, cps1_obj_size); | |
| 1485 | 1576 | scroll1xoff = 0; |
| 1486 | 1577 | scroll2xoff = 0; |
| 1487 | 1578 | scroll3xoff = 0; |
| 1488 | 1579 | } |
| 1489 | cps1_other=cps1_base(CPS1_OTHER_BASE,cps1_other_size); | |
| 1580 | cps1_other = cps1_base(CPS1_OTHER_BASE,cps1_other_size); | |
| 1490 | 1581 | |
| 1491 | 1582 | /* Get scroll values */ |
| 1492 | cps1_scroll1x=cps1_port(CPS1_SCROLL1_SCROLLX) + scroll1xoff; | |
| 1493 | cps1_scroll1y=cps1_port(CPS1_SCROLL1_SCROLLY); | |
| 1494 | cps1_scroll2x=cps1_port(CPS1_SCROLL2_SCROLLX) + scroll2xoff; | |
| 1495 | cps1_scroll2y=cps1_port(CPS1_SCROLL2_SCROLLY); | |
| 1496 | cps1_scroll3x=cps1_port(CPS1_SCROLL3_SCROLLX) + scroll3xoff; | |
| 1497 | cps1_scroll3y=cps1_port(CPS1_SCROLL3_SCROLLY); | |
| 1498 | stars1x =cps1_port(CPS1_STARS1_SCROLLX); | |
| 1499 | stars1y =cps1_port(CPS1_STARS1_SCROLLY); | |
| 1500 | stars2x =cps1_port(CPS1_STARS2_SCROLLX); | |
| 1501 | stars2y =cps1_port(CPS1_STARS2_SCROLLY); | |
| 1583 | cps1_scroll1x = cps1_cps_a_regs[CPS1_SCROLL1_SCROLLX] + scroll1xoff; | |
| 1584 | cps1_scroll1y = cps1_cps_a_regs[CPS1_SCROLL1_SCROLLY]; | |
| 1585 | cps1_scroll2x = cps1_cps_a_regs[CPS1_SCROLL2_SCROLLX] + scroll2xoff; | |
| 1586 | cps1_scroll2y = cps1_cps_a_regs[CPS1_SCROLL2_SCROLLY]; | |
| 1587 | cps1_scroll3x = cps1_cps_a_regs[CPS1_SCROLL3_SCROLLX] + scroll3xoff; | |
| 1588 | cps1_scroll3y = cps1_cps_a_regs[CPS1_SCROLL3_SCROLLY]; | |
| 1589 | stars1x = cps1_cps_a_regs[CPS1_STARS1_SCROLLX]; | |
| 1590 | stars1y = cps1_cps_a_regs[CPS1_STARS1_SCROLLY]; | |
| 1591 | stars2x = cps1_cps_a_regs[CPS1_STARS2_SCROLLX]; | |
| 1592 | stars2y = cps1_cps_a_regs[CPS1_STARS2_SCROLLY]; | |
| 1502 | 1593 | |
| 1503 | 1594 | /* Get layer enable bits */ |
| 1504 | layercontrol=cps1_port(cps1_game_config->layer_control); | |
| 1505 | videocontrol=cps1_port(CPS1_VIDEOCONTROL); | |
| 1595 | layercontrol = cps1_cps_b_regs[cps1_game_config->layer_control/2]; | |
| 1596 | videocontrol = cps1_cps_a_regs[CPS1_VIDEOCONTROL]; | |
| 1506 | 1597 | tilemap_set_enable(cps1_bg_tilemap[0],layercontrol & cps1_game_config->layer_enable_mask[0]); |
| 1507 | 1598 | tilemap_set_enable(cps1_bg_tilemap[1],(layercontrol & cps1_game_config->layer_enable_mask[1]) && (videocontrol & 4)); |
| 1508 | 1599 | tilemap_set_enable(cps1_bg_tilemap[2],(layercontrol & cps1_game_config->layer_enable_mask[2]) && (videocontrol & 8)); |
| r2454 | r2455 | |
| 1510 | 1601 | cps1_stars_enabled[1] = layercontrol & cps1_game_config->layer_enable_mask[4]; |
| 1511 | 1602 | |
| 1512 | 1603 | |
| 1513 | #ifdef MAME_DEBUG | |
| 1514 | 1604 | { |
| 1515 | 1605 | int enablemask; |
| 1516 | 1606 | |
| 1517 | #if 0 | |
| 1518 | if (input_code_pressed(KEYCODE_Z)) | |
| 1519 | { | |
| 1520 | if (input_code_pressed(KEYCODE_Q)) cps1_layer_enabled[3]=0; | |
| 1521 | if (input_code_pressed(KEYCODE_W)) cps1_layer_enabled[2]=0; | |
| 1522 | if (input_code_pressed(KEYCODE_E)) cps1_layer_enabled[1]=0; | |
| 1523 | if (input_code_pressed(KEYCODE_R)) cps1_layer_enabled[0]=0; | |
| 1524 | if (input_code_pressed(KEYCODE_T)) | |
| 1525 | { | |
| 1526 | popmessage("%d %d %d %d layer %02x", | |
| 1527 | (layercontrol>>0x06)&03, | |
| 1528 | (layercontrol>>0x08)&03, | |
| 1529 | (layercontrol>>0x0a)&03, | |
| 1530 | (layercontrol>>0x0c)&03, | |
| 1531 | layercontrol&0xc03f | |
| 1532 | ); | |
| 1533 | } | |
| 1534 | ||
| 1535 | } | |
| 1536 | #endif | |
| 1537 | ||
| 1538 | 1607 | enablemask = 0; |
| 1539 | 1608 | if (cps1_game_config->layer_enable_mask[0] == cps1_game_config->layer_enable_mask[1]) |
| 1540 | 1609 | enablemask = cps1_game_config->layer_enable_mask[0]; |
| r2454 | r2455 | |
| 1545 | 1614 | if (enablemask) |
| 1546 | 1615 | { |
| 1547 | 1616 | if (((layercontrol & enablemask) && (layercontrol & enablemask) != enablemask)) |
| 1548 | popmessage("layer %02x",layercontrol&0xc03f); | |
| 1617 | popmessage("layer %02x contact MAMEDEV",layercontrol&0xc03f); | |
| 1549 | 1618 | } |
| 1550 | } | |
| 1551 | #endif | |
| 1552 | 1619 | |
| 1553 | { | |
| 1554 | int enablemask; | |
| 1555 | 1620 | enablemask = cps1_game_config->layer_enable_mask[0] | cps1_game_config->layer_enable_mask[1] |
| 1556 | 1621 | | cps1_game_config->layer_enable_mask[2] |
| 1557 | 1622 | | cps1_game_config->layer_enable_mask[3] | cps1_game_config->layer_enable_mask[4]; |
| r2454 | r2455 | |
| 1567 | 1632 | int page = (offset >> 7) & 0x3c0; |
| 1568 | 1633 | COMBINE_DATA(&cps1_gfxram[offset]); |
| 1569 | 1634 | |
| 1570 | if (page == (cps1_p | |
| 1635 | if (page == (cps1_cps_a_regs[CPS1_SCROLL1_BASE] & 0x3c0)) | |
| 1571 | 1636 | tilemap_mark_tile_dirty(cps1_bg_tilemap[0],offset/2 & 0x0fff); |
| 1572 | if (page == (cps1_p | |
| 1637 | if (page == (cps1_cps_a_regs[CPS1_SCROLL2_BASE] & 0x3c0)) | |
| 1573 | 1638 | tilemap_mark_tile_dirty(cps1_bg_tilemap[1],offset/2 & 0x0fff); |
| 1574 | if (page == (cps1_p | |
| 1639 | if (page == (cps1_cps_a_regs[CPS1_SCROLL3_BASE] & 0x3c0)) | |
| 1575 | 1640 | tilemap_mark_tile_dirty(cps1_bg_tilemap[2],offset/2 & 0x0fff); |
| 1576 | 1641 | } |
| 1577 | 1642 | |
| r2454 | r2455 | |
| 1723 | 1788 | int mask; |
| 1724 | 1789 | |
| 1725 | 1790 | /* Get transparency registers */ |
| 1726 | if (cps1_game_config->priority[i]) | |
| 1727 | mask = cps1_port(cps1_game_config->priority[i]) ^ 0xffff; | |
| 1728 | else mask = 0xffff; /* completely transparent if priority masks not defined (mercs, qad) */ | |
| 1791 | if (cps1_game_config->priority[i] != -1) | |
| 1792 | mask = cps1_cps_b_regs[cps1_game_config->priority[i]/2] ^ 0xffff; | |
| 1793 | else mask = 0xffff; /* completely transparent if priority masks not defined (qad) */ | |
| 1729 | 1794 | |
| 1730 | 1795 | tilemap_set_transmask(cps1_bg_tilemap[0],i,mask,0x8000); |
| 1731 | 1796 | tilemap_set_transmask(cps1_bg_tilemap[1],i,mask,0x8000); |
| r2454 | r2455 | |
| 1763 | 1828 | } |
| 1764 | 1829 | |
| 1765 | 1830 | memset(cps1_gfxram, 0, cps1_gfxram_size); /* Clear GFX RAM */ |
| 1766 | memset(cps1_output, 0, cps1_output_size); /* Clear output ports */ | |
| 1831 | memset(cps1_cps_a_regs, 0, 0x40); /* Clear CPS-A registers */ | |
| 1832 | memset(cps1_cps_b_regs, 0, 0x40); /* Clear CPS-B registers */ | |
| 1767 | 1833 | |
| 1768 | 1834 | if (cps_version == 2) |
| 1769 | 1835 | { |
| r2454 | r2455 | |
| 1772 | 1838 | } |
| 1773 | 1839 | |
| 1774 | 1840 | /* Put in some defaults */ |
| 1775 | cps1_output[CPS1_OBJ_BASE/2] = 0x9200; | |
| 1776 | cps1_output[CPS1_SCROLL1_BASE/2] = 0x9000; | |
| 1777 | cps1_output[CPS1_SCROLL2_BASE/2] = 0x9040; | |
| 1778 | cps1_output[CPS1_SCROLL3_BASE/2] = 0x9080; | |
| 1779 | cps1_output[CPS1_OTHER_BASE/2] = 0x9100; | |
| 1841 | cps1_cps_a_regs[CPS1_OBJ_BASE] = 0x9200; | |
| 1842 | cps1_cps_a_regs[CPS1_SCROLL1_BASE] = 0x9000; | |
| 1843 | cps1_cps_a_regs[CPS1_SCROLL2_BASE] = 0x9040; | |
| 1844 | cps1_cps_a_regs[CPS1_SCROLL3_BASE] = 0x9080; | |
| 1845 | cps1_cps_a_regs[CPS1_OTHER_BASE] = 0x9100; | |
| 1780 | 1846 | |
| 1781 | 1847 | assert_always(cps1_game_config, "cps1_game_config hasn't been set up yet"); |
| 1782 | 1848 | |
| r2454 | r2455 | |
| 1810 | 1876 | int offset, page; |
| 1811 | 1877 | const UINT16 *palette_ram = palette_base; |
| 1812 | 1878 | |
| 1813 | int ctrl = cps1_p | |
| 1879 | int ctrl = cps1_cps_b_regs[cps1_game_config->palette_control/2]; | |
| 1814 | 1880 | |
| 1815 | 1881 | /* |
| 1816 | 1882 | The palette is copied only for pages that are enabled in the ctrl |
| r2454 | r2455 | |
| 2393 | 2459 | VIDEO_UPDATE( cps1 ) |
| 2394 | 2460 | { |
| 2395 | 2461 | int layercontrol,l0,l1,l2,l3; |
| 2396 | int videocontrol=cps1_p | |
| 2462 | int videocontrol = cps1_cps_a_regs[CPS1_VIDEOCONTROL]; | |
| 2397 | 2463 | |
| 2398 | 2464 | |
| 2399 | 2465 | flip_screen_set(videocontrol & 0x8000); |
| 2400 | 2466 | |
| 2401 | layercontrol = cps1_ | |
| 2467 | layercontrol = cps1_c | |
| 2402 | 2468 | |
| 2403 | 2469 | /* Get video memory base registers */ |
| 2404 | 2470 | cps1_get_video_base(); |
| r2454 | r2455 | |
| 2422 | 2488 | |
| 2423 | 2489 | tilemap_set_scroll_rows(cps1_bg_tilemap[1],1024); |
| 2424 | 2490 | |
| 2425 | otheroffs = cps1_p | |
| 2491 | otheroffs = cps1_cps_a_regs[CPS1_ROWSCROLL_OFFS]; | |
| 2426 | 2492 | |
| 2427 | 2493 | for (i = 0;i < 256;i++) |
| 2428 | 2494 | tilemap_set_scrollx(cps1_bg_tilemap[1],(i - scrly) & 0x3ff,cps1_scroll2x + cps1_other[(i + otheroffs) & 0x3ff]); |
| r2454 | r2455 | |
|---|---|---|
| 47 | 47 | ***************************************************************************/ |
| 48 | 48 | |
| 49 | 49 | #include "driver.h" |
| 50 | #include "deprecat.h" | |
| 51 | 50 | #include "stactics.h" |
| 52 | 51 | |
| 53 | 52 | |
| r2454 | r2455 | |
| 92 | 91 | |
| 93 | 92 | WRITE8_HANDLER( stactics_scroll_ram_w ) |
| 94 | 93 | { |
| 95 | stactics_state *state = | |
| 94 | stactics_state *state = machine->driver_data; | |
| 96 | 95 | |
| 97 | 96 | if (data & 0x01) |
| 98 | 97 | { |
| r2454 | r2455 | |
| 130 | 129 | |
| 131 | 130 | WRITE8_HANDLER( stactics_speed_latch_w ) |
| 132 | 131 | { |
| 133 | stactics_state *state = | |
| 132 | stactics_state *state = machine->driver_data; | |
| 134 | 133 | |
| 135 | 134 | /* This writes to a shift register which is clocked by */ |
| 136 | 135 | /* a 555 oscillator. This value determines the speed of */ |
| r2454 | r2455 | |
| 157 | 156 | |
| 158 | 157 | WRITE8_HANDLER( stactics_shot_trigger_w ) |
| 159 | 158 | { |
| 160 | stactics_state *state = | |
| 159 | stactics_state *state = machine->driver_data; | |
| 161 | 160 | |
| 162 | 161 | state->shot_standby = 0; |
| 163 | 162 | } |
| r2454 | r2455 | |
| 165 | 164 | |
| 166 | 165 | WRITE8_HANDLER( stactics_shot_flag_clear_w ) |
| 167 | 166 | { |
| 168 | stactics_state *state = | |
| 167 | stactics_state *state = machine->driver_data; | |
| 169 | 168 | |
| 170 | 169 | state->shot_arrive = 0; |
| 171 | 170 | } |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "cpu/tms34010/tms34010.h" |
| 10 | 9 | #include "lethalj.h" |
| 11 | 10 | |
| r2454 | r2455 | |
| 62 | 61 | case 4: |
| 63 | 62 | case 5: |
| 64 | 63 | /* latch the crosshair position */ |
| 65 | get_crosshair_xy( | |
| 64 | get_crosshair_xy(machine, offset - 4, &beamx, &beamy); | |
| 66 | 65 | gunx = beamx; |
| 67 | 66 | guny = beamy; |
| 68 | 67 | blank_palette = 1; |
| r2454 | r2455 | |
| 170 | 169 | |
| 171 | 170 | /* clear the IRQ on offset 0 */ |
| 172 | 171 | else if (offset == 0) |
| 173 | cpunum_set_input_line( | |
| 172 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 174 | 173 | } |
| 175 | 174 | |
| 176 | 175 |
| r2454 | r2455 | |
|---|---|---|
| 88 | 88 | ***************************************************************************/ |
| 89 | 89 | |
| 90 | 90 | #include "driver.h" |
| 91 | #include "deprecat.h" | |
| 92 | 91 | #include "video/tms34061.h" |
| 93 | 92 | #include "video/tlc34076.h" |
| 94 | 93 | #include "cpu/m6809/m6809.h" |
| r2454 | r2455 | |
| 470 | 469 | /* a read from offset 3 clears the interrupt and returns the status */ |
| 471 | 470 | if (offset == 3) |
| 472 | 471 | { |
| 473 | itech8_update_interrupts( | |
| 472 | itech8_update_interrupts(machine, -1, -1, 0); | |
| 474 | 473 | if (blit_in_progress) |
| 475 | 474 | result |= 0x80; |
| 476 | 475 | else |
| r2454 | r2455 | |
|---|---|---|
| 55 | 55 | ***************************************************************************/ |
| 56 | 56 | |
| 57 | 57 | #include "driver.h" |
| 58 | #include "deprecat.h" | |
| 59 | 58 | |
| 60 | 59 | #define RASTER_LINES 262 |
| 61 | 60 | #define FIRST_VISIBLE_LINE 0 |
| r2454 | r2455 | |
| 85 | 84 | { |
| 86 | 85 | data = COMBINE_DATA(&paletteram16[offset]); |
| 87 | 86 | /* We need the ^0xff because we had to invert the pens in the gfx */ |
| 88 | palette_set_color_rgb( | |
| 87 | palette_set_color_rgb(machine,offset^0xff,pal5bit(data >> 6),pal5bit(data >> 11),pal5bit(data >> 1)); | |
| 89 | 88 | } |
| 90 | 89 | |
| 91 | 90 |
| r2454 | r2455 | |
|---|---|---|
| 6 | 6 | ***************************************************************************/ |
| 7 | 7 | |
| 8 | 8 | #include "driver.h" |
| 9 | #include "deprecat.h" | |
| 10 | 9 | |
| 11 | 10 | UINT16 *sshangha_pf2_data,*sshangha_pf1_data; |
| 12 | 11 | UINT16 *sshangha_pf1_rowscroll,*sshangha_pf2_rowscroll; |
| r2454 | r2455 | |
| 27 | 26 | g = (paletteram16[offset+1] >> 8) & 0xff; |
| 28 | 27 | r = (paletteram16[offset+1] >> 0) & 0xff; |
| 29 | 28 | |
| 30 | palette_set_color( | |
| 29 | palette_set_color(machine,offset/2,MAKE_RGB(r,g,b)); | |
| 31 | 30 | } |
| 32 | 31 | |
| 33 | 32 | static void sshangha_tilemap_draw(bitmap_t *bitmap, const rectangle *cliprect) |
| r2454 | r2455 | |
|---|---|---|
| 181 | 181 | sx = spriteram_area3[offs+1] + 256 * (spriteram_area2[offs+1] & 1); |
| 182 | 182 | if (sx > 320) sx -= 512; |
| 183 | 183 | |
| 184 | sy = 255 - spriteram_area1[offs]; | |
| 184 | sy = 255 - spriteram_area1[offs] + 2; | |
| 185 | if (sy > 0xf0) sy -= 256; | |
| 186 | ||
| 185 | 187 | if (flipscreen) sy = 240 - sy; |
| 186 | 188 | |
| 187 | 189 | color = spriteram_area1[offs+1] & 0x1f; |
| r2454 | r2455 | |
|---|---|---|
| 23 | 23 | */ |
| 24 | 24 | |
| 25 | 25 | #include "driver.h" |
| 26 | #include "deprecat.h" | |
| 27 | 26 | #include "segaic24.h" |
| 28 | 27 | |
| 29 | 28 | |
| r2454 | r2455 | |
| 65 | 64 | r |= r >> 5; |
| 66 | 65 | g |= g >> 5; |
| 67 | 66 | b |= b >> 5; |
| 68 | set_color( | |
| 67 | set_color(machine, offset, r, g, b, data & 0x8000); | |
| 69 | 68 | } |
| 70 | 69 | |
| 71 | 70 | // - System 24 |
| r2454 | r2455 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "deprecat.h" | |
| 11 | 10 | |
| 12 | 11 | UINT8 *popeye_background_pos; |
| 13 | 12 | UINT8 *popeye_palettebank; |
| r2454 | r2455 | |
|---|---|---|
| 36 | 36 | ***************************************************************************/ |
| 37 | 37 | |
| 38 | 38 | #include "driver.h" |
| 39 | #include "deprecat.h" | |
| 40 | 39 | |
| 41 | 40 | // Variables needed by driver: |
| 42 | 41 |
| r2454 | r2455 | |
|---|---|---|
| 8 | 8 | ***************************************************************************/ |
| 9 | 9 | |
| 10 | 10 | #include "driver.h" |
| 11 | #include "deprecat.h" | |
| 12 | 11 | |
| 13 | 12 | |
| 14 | 13 | UINT8 *tiamc1_tileram; |
| r2454 | r2455 | |
| 84 | 83 | |
| 85 | 84 | WRITE8_HANDLER( tiamc1_palette_w ) |
| 86 | 85 | { |
| 87 | palette_set_color( | |
| 86 | palette_set_color(machine, offset, palette[data]); | |
| 88 | 87 | } |
| 89 | 88 | |
| 90 | 89 | PALETTE_INIT( tiamc1 ) |
| r2454 | r2455 | |
|---|---|---|
| 119 | 119 | |
| 120 | 120 | |
| 121 | 121 | #include "driver.h" |
| 122 | #include "deprecat.h" | |
| 123 | 122 | #include "toaplan1.h" |
| 124 | 123 | #include "cpu/m68000/m68000.h" |
| 125 | 124 | |
| r2454 | r2455 | |
| 319 | 318 | |
| 320 | 319 | static STATE_POSTLOAD( rallybik_flipscreen ) |
| 321 | 320 | { |
| 322 | rallybik_bcu_flipscreen_w( | |
| 321 | rallybik_bcu_flipscreen_w(machine, 0, bcu_flipscreen, 0xffff); | |
| 323 | 322 | } |
| 324 | 323 | |
| 325 | 324 | static STATE_POSTLOAD( toaplan1_flipscreen ) |
| 326 | 325 | { |
| 327 | toaplan1_bcu_flipscreen_w( | |
| 326 | toaplan1_bcu_flipscreen_w(machine, 0, bcu_flipscreen, 0xffff); | |
| 328 | 327 | } |
| 329 | 328 | |
| 330 | 329 | |
| r2454 | r2455 | |
| 1230 | 1229 | |
| 1231 | 1230 | VIDEO_EOF( rallybik ) |
| 1232 | 1231 | { |
| 1233 | buffer_spriteram16_w(machine, 0, 0, 0); | |
| 1232 | buffer_spriteram16_w(machine, 0, 0, 0xffff); | |
| 1234 | 1233 | } |
| 1235 | 1234 | |
| 1236 | 1235 | VIDEO_EOF( toaplan1 ) |
| 1237 | 1236 | { |
| 1238 | buffer_spriteram16_w(machine, 0, 0, 0); | |
| 1237 | buffer_spriteram16_w(machine, 0, 0, 0xffff); | |
| 1239 | 1238 | memcpy(toaplan1_buffered_spritesizeram16, toaplan1_spritesizeram16, TOAPLAN1_SPRITESIZERAM_SIZE); |
| 1240 | 1239 | } |
| 1241 | 1240 | |
| 1242 | 1241 | VIDEO_EOF( samesame ) |
| 1243 | 1242 | { |
| 1244 | buffer_spriteram16_w(machine, 0, 0, 0); | |
| 1243 | buffer_spriteram16_w(machine, 0, 0, 0xffff); | |
| 1245 | 1244 | memcpy(toaplan1_buffered_spritesizeram16, toaplan1_spritesizeram16, TOAPLAN1_SPRITESIZERAM_SIZE); |
| 1246 | 1245 | cpunum_set_input_line(machine, 0, MC68000_IRQ_2, HOLD_LINE); /* Frame done */ |
| 1247 | 1246 | } |
| r2454 | r2455 | |
|---|---|---|
| 612 | 612 | { |
| 613 | 613 | /* port 0: irq ack */ |
| 614 | 614 | case 0: |
| 615 | cpunum_set_input_line( | |
| 615 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 616 | 616 | break; |
| 617 | 617 | |
| 618 | 618 | /* port 1: background control |
| r2454 | r2455 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | #include "deprecat.h" | |
| 3 | 2 | #include "machine/eeprom.h" |
| 4 | 3 | #include "video/konamiic.h" |
| 5 | 4 | |
| r2454 | r2455 | |
| 323 | 322 | offset &= ~1; |
| 324 | 323 | |
| 325 | 324 | data = (paletteram16[offset] << 8) | paletteram16[offset+1]; |
| 326 | palette_set_color_rgb( | |
| 325 | palette_set_color_rgb(machine,offset / 2,pal5bit(data >> 0),pal5bit(data >> 5),pal5bit(data >> 10)); | |
| 327 | 326 | } |
| 328 | 327 | |
| 329 | 328 | |
| r2454 | r2455 | |
| 340 | 339 | |
| 341 | 340 | /* bit 3 high then low triggers irq on sound CPU */ |
| 342 | 341 | if (last == 0x08 && (data & 0x08) == 0) |
| 343 | cpunum_set_input_line_and_vector( | |
| 342 | cpunum_set_input_line_and_vector(machine, 1,0,HOLD_LINE,0xff); | |
| 344 | 343 | |
| 345 | 344 | last = data & 0x08; |
| 346 | 345 | |
| r2454 | r2455 | |
| 366 | 365 | |
| 367 | 366 | /* bit 2 = trigger irq on sound CPU */ |
| 368 | 367 | if (last == 0x04 && (data & 0x04) == 0) |
| 369 | cpunum_set_input_line_and_vector( | |
| 368 | cpunum_set_input_line_and_vector(machine, 1,0,HOLD_LINE,0xff); | |
| 370 | 369 | |
| 371 | 370 | last = data & 0x04; |
| 372 | 371 | |
| r2454 | r2455 | |
| 388 | 387 | |
| 389 | 388 | /* bit 2 = trigger irq on sound CPU */ |
| 390 | 389 | if (last == 0x00 && (data & 0x04) == 0x04) |
| 391 | cpunum_set_input_line_and_vector( | |
| 390 | cpunum_set_input_line_and_vector(machine, 1,0,HOLD_LINE,0xff); | |
| 392 | 391 | |
| 393 | 392 | last = data & 0x04; |
| 394 | 393 |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ****************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "cpu/tms34010/tms34010.h" |
| 10 | 9 | #include "jpmimpct.h" |
| 11 | 10 | |
| r2454 | r2455 | |
| 61 | 60 | |
| 62 | 61 | if (++*addr_cnt == 3) |
| 63 | 62 | { |
| 64 | palette_set_color( | |
| 63 | palette_set_color(machine, bt477.address, MAKE_RGB(color[0], color[1], color[2])); | |
| 65 | 64 | *addr_cnt = 0; |
| 66 | 65 | |
| 67 | 66 | /* Address register increments */ |
| r2454 | r2455 | |
|---|---|---|
| 52 | 52 | *shift = 0; |
| 53 | 53 | |
| 54 | 54 | // non 32-bit accesses have not yet been seen here, we need to know when they are |
| 55 | if ((mem_mask != U64(0x | |
| 55 | if ((mem_mask != U64(0x | |
| 56 | 56 | { |
| 57 | 57 | assert_always(0, "Wrong mask!\n"); |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | if (mem_mask == U64(0x | |
| 60 | if (mem_mask == U64(0x | |
| 61 | 61 | { |
| 62 | 62 | reg++; |
| 63 | 63 | *shift = 32; |
| r2454 | r2455 | |
| 199 | 199 | static UINT32 ignoretexalpha,flipuv,clampuv,filtermode,sstexture,mmdadjust,tsinstruction; |
| 200 | 200 | static UINT32 depthcomparemode,cullingmode,zwritedisable,cachebypass,dcalcctrl,volumeinstruction,mipmapped,vqcompressed,strideselect; |
| 201 | 201 | |
| 202 | if ( | |
| 202 | if ( | |
| 203 | 203 | { |
| 204 | 204 | tafifo_buff[tafifo_pos]=(UINT32)data; |
| 205 | 205 | tafifo_buff[tafifo_pos+1]=(UINT32)(data >> 32); |
| r2454 | r2455 | |
|---|---|---|
| 591 | 591 | b = ((newval >> 14) & 0x01) | ((newval >> 7) & 0x1e); |
| 592 | 592 | |
| 593 | 593 | /* normal colors */ |
| 594 | palette_set_color_rgb(Machine, offset + 0 * palette.entries, palette.normal[r], palette.normal[g], palette.normal[b]); | |
| 595 | palette_set_color_rgb(Machine, offset + 1 * palette.entries, palette.shadow[r], palette.shadow[g], palette.shadow[b]); | |
| 596 | palette_set_color_rgb(Machine, offset + 2 * palette.entries, palette.hilight[r], palette.hilight[g], palette.hilight[b]); | |
| 594 | palette_set_color_rgb(machine, offset + 0 * palette.entries, palette.normal[r], palette.normal[g], palette.normal[b]); | |
| 595 | palette_set_color_rgb(machine, offset + 1 * palette.entries, palette.shadow[r], palette.shadow[g], palette.shadow[b]); | |
| 596 | palette_set_color_rgb(machine, offset + 2 * palette.entries, palette.hilight[r], palette.hilight[g], palette.hilight[b]); | |
| 597 | 597 | } |
| 598 | 598 | |
| 599 | 599 |
| r2454 | r2455 | |
|---|---|---|
| 243 | 243 | |
| 244 | 244 | VIDEO_EOF( bionicc ) |
| 245 | 245 | { |
| 246 | buffer_spriteram16_w(machine,0,0,0); | |
| 246 | buffer_spriteram16_w(machine,0,0,0xffff); | |
| 247 | 247 | } |
| r2454 | r2455 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | #include "deprecat.h" | |
| 3 | 2 | |
| 4 | 3 | UINT16 *bigtwin_bgvideoram; |
| 5 | 4 | UINT16 *wbeachvl_videoram1,*wbeachvl_videoram2,*wbeachvl_videoram3; |
| r2454 | r2455 | |
| 251 | 250 | g |= ((val & 0x04) >> 2); |
| 252 | 251 | b |= ((val & 0x02) >> 1); |
| 253 | 252 | |
| 254 | palette_set_color_rgb( | |
| 253 | palette_set_color_rgb(machine,offset,pal5bit(r),pal5bit(g),pal5bit(b)); | |
| 255 | 254 | } |
| 256 | 255 | |
| 257 | 256 | WRITE16_HANDLER( bigtwin_scroll_w ) |
| r2454 | r2455 | |
|---|---|---|
| 119 | 119 | |
| 120 | 120 | static WRITE8_HANDLER( video_data_w ) |
| 121 | 121 | { |
| 122 | gameplan_state *state = | |
| 122 | gameplan_state *state = machine->driver_data; | |
| 123 | 123 | |
| 124 | 124 | state->video_data = data; |
| 125 | 125 | } |
| r2454 | r2455 | |
| 127 | 127 | |
| 128 | 128 | static WRITE8_HANDLER( gameplan_video_command_w ) |
| 129 | 129 | { |
| 130 | gameplan_state *state = | |
| 130 | gameplan_state *state = machine->driver_data; | |
| 131 | 131 | |
| 132 | 132 | state->video_command = data & 0x07; |
| 133 | 133 | } |
| r2454 | r2455 | |
| 135 | 135 | |
| 136 | 136 | static WRITE8_HANDLER( leprechn_video_command_w ) |
| 137 | 137 | { |
| 138 | gameplan_state *state = | |
| 138 | gameplan_state *state = machine->driver_data; | |
| 139 | 139 | |
| 140 | 140 | state->video_command = (data >> 3) & 0x07; |
| 141 | 141 | } |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ****************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "beathead.h" |
| 10 | 9 | |
| 11 | 10 | |
| r2454 | r2455 | |
| 58 | 57 | WRITE32_HANDLER( beathead_vram_transparent_w ) |
| 59 | 58 | { |
| 60 | 59 | /* writes to this area appear to handle transparency */ |
| 61 | if (!(data & 0x000000ff)) mem_mask |= 0x000000ff; | |
| 62 | if (!(data & 0x0000ff00)) mem_mask |= 0x0000ff00; | |
| 63 | if (!(data & 0x00ff0000)) mem_mask |= 0x00ff0000; | |
| 64 | if (!(data & 0xff000000)) mem_mask |= 0xff000000; | |
| 60 | if (!(data & 0x000000ff)) mem_mask &= ~0x000000ff; | |
| 61 | if (!(data & 0x0000ff00)) mem_mask &= ~0x0000ff00; | |
| 62 | if (!(data & 0x00ff0000)) mem_mask &= ~0x00ff0000; | |
| 63 | if (!(data & 0xff000000)) mem_mask &= ~0xff000000; | |
| 65 | 64 | COMBINE_DATA(&videoram32[offset]); |
| 66 | 65 | } |
| 67 | 66 | |
| r2454 | r2455 | |
| 71 | 70 | /* it appears that writes to this area pass in a mask for 4 words in VRAM */ |
| 72 | 71 | /* allowing them to be filled from a preset latch */ |
| 73 | 72 | offset &= ~3; |
| 74 | data = data & | |
| 73 | data = data & | |
| 75 | 74 | |
| 76 | 75 | /* for now, just handle the bulk fill case; the others we'll catch later */ |
| 77 | 76 | if (data == 0x0f0f0f0f) |
| r2454 | r2455 | |
| 115 | 114 | if ((oldword & 8) && !(newword & 8) && video_screen_get_vpos(machine->primary_screen) != 261) |
| 116 | 115 | { |
| 117 | 116 | logerror("Suspending time! (scanline = %d)\n", video_screen_get_vpos(machine->primary_screen)); |
| 118 | cpunum_set_input_line( | |
| 117 | cpunum_set_input_line(machine, 0, INPUT_LINE_HALT, ASSERT_LINE); | |
| 119 | 118 | } |
| 120 | 119 | } |
| 121 | 120 | |
| r2454 | r2455 | |
| 133 | 132 | int r = ((newword >> 9) & 0x3e) | ((newword >> 15) & 0x01); |
| 134 | 133 | int g = ((newword >> 4) & 0x3e) | ((newword >> 15) & 0x01); |
| 135 | 134 | int b = ((newword << 1) & 0x3e) | ((newword >> 15) & 0x01); |
| 136 | palette_set_color_rgb( | |
| 135 | palette_set_color_rgb(machine, offset, pal6bit(r), pal6bit(g), pal6bit(b)); | |
| 137 | 136 | } |
| 138 | 137 | |
| 139 | 138 |
| r2454 | r2455 | |
|---|---|---|
| 105 | 105 | st0016_paletteram[ST0016_PAL_BANK_SIZE*st0016_pal_bank+offset]=data; |
| 106 | 106 | val=st0016_paletteram[color*2]+(st0016_paletteram[color*2+1]<<8); |
| 107 | 107 | if(!color) |
| 108 | palette_set_color_rgb(Machine,UNUSED_PEN,pal5bit(val >> 0),pal5bit(val >> 5),pal5bit(val >> 10)); /* same as color 0 - bg ? */ | |
| 109 | palette_set_color_rgb(Machine,color,pal5bit(val >> 0),pal5bit(val >> 5),pal5bit(val >> 10)); | |
| 108 | palette_set_color_rgb(machine,UNUSED_PEN,pal5bit(val >> 0),pal5bit(val >> 5),pal5bit(val >> 10)); /* same as color 0 - bg ? */ | |
| 109 | palette_set_color_rgb(machine,color,pal5bit(val >> 0),pal5bit(val >> 5),pal5bit(val >> 10)); | |
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | READ8_HANDLER(st0016_character_ram_r) |
| r2454 | r2455 | |
| 117 | 117 | WRITE8_HANDLER(st0016_character_ram_w) |
| 118 | 118 | { |
| 119 | 119 | st0016_charram[ST0016_CHAR_BANK_SIZE*st0016_char_bank+offset]=data; |
| 120 | decodechar( | |
| 120 | decodechar(machine->gfx[st0016_ramgfx], st0016_char_bank,(UINT8 *) st0016_charram); | |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | READ8_HANDLER(st0016_vregs_r) |
| r2454 | r2455 | |
| 421 | 421 | static STATE_POSTLOAD( st0016_postload ) |
| 422 | 422 | { |
| 423 | 423 | int i; |
| 424 | st0016_rom_bank_w( | |
| 424 | st0016_rom_bank_w(machine,0,st0016_rom_bank); | |
| 425 | 425 | for(i=0;i<ST0016_MAX_CHAR_BANK;i++) |
| 426 | decodechar( | |
| 426 | decodechar(machine->gfx[st0016_ramgfx], i,(UINT8 *) st0016_charram); | |
| 427 | 427 | } |
| 428 | 428 | |
| 429 | 429 |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "video/vector.h" |
| 10 | 9 | #include "cchasm.h" |
| 11 | 10 | |
| r2454 | r2455 | |
| 115 | 114 | cchasm_refresh(); |
| 116 | 115 | break; |
| 117 | 116 | case 0xf7: |
| 118 | cpunum_set_input_line ( | |
| 117 | cpunum_set_input_line (machine, 0, 2, CLEAR_LINE); | |
| 119 | 118 | break; |
| 120 | 119 | } |
| 121 | 120 | } |
| r2454 | r2455 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | #include "deprecat.h" | |
| 3 | 2 | |
| 4 | 3 | static int battlex_scroll_lsb; |
| 5 | 4 | static int battlex_scroll_msb; |
| r2454 | r2455 | |
| 36 | 35 | |
| 37 | 36 | WRITE8_HANDLER( battlex_palette_w ) |
| 38 | 37 | { |
| 39 | palette_set_color_rgb( | |
| 38 | palette_set_color_rgb(machine,16*8 + offset,pal1bit(data >> 2),pal1bit(data >> 0),pal1bit(data >> 1)); | |
| 40 | 39 | } |
| 41 | 40 | |
| 42 | 41 | WRITE8_HANDLER( battlex_scroll_x_lsb_w ) |
| r2454 | r2455 | |
|---|---|---|
| 656 | 656 | { |
| 657 | 657 | int code = offset/32; |
| 658 | 658 | COMBINE_DATA(&toaplan2_tx_gfxram16[offset]); |
| 659 | decodechar( | |
| 659 | decodechar(machine->gfx[2], code, toaplan2_tx_gfxram); | |
| 660 | 660 | |
| 661 | 661 | tilemap_mark_all_tiles_dirty(tx_tilemap); |
| 662 | 662 | } |
| r2454 | r2455 | |
| 699 | 699 | |
| 700 | 700 | /* Decode text characters */ |
| 701 | 701 | for (code = 0; code < 1024; code++) |
| 702 | decodechar ( | |
| 702 | decodechar (machine->gfx[2], code, raizing_tx_gfxram); | |
| 703 | 703 | tilemap_mark_all_tiles_dirty(tx_tilemap); |
| 704 | 704 | } |
| 705 | 705 | |
| r2454 | r2455 | |
| 1067 | 1067 | |
| 1068 | 1068 | READ16_HANDLER( pipibibi_videoram16_r ) |
| 1069 | 1069 | { |
| 1070 | toaplan2_voffs_w(0, offset, 0, 0); | |
| 1070 | toaplan2_voffs_w(0, offset, 0xffff, 0); | |
| 1071 | 1071 | return toaplan2_videoram16_r(0, 0); |
| 1072 | 1072 | } |
| 1073 | 1073 | |
| 1074 | 1074 | WRITE16_HANDLER( pipibibi_videoram16_w) |
| 1075 | 1075 | { |
| 1076 | toaplan2_voffs_w(0, offset, 0, 0); | |
| 1076 | toaplan2_voffs_w(0, offset, 0xffff, 0); | |
| 1077 | 1077 | toaplan2_videoram16_w(0, data, mem_mask, 0); |
| 1078 | 1078 | } |
| 1079 | 1079 |
| r2454 | r2455 | |
|---|---|---|
| 8 | 8 | ***************************************************************************/ |
| 9 | 9 | |
| 10 | 10 | #include "driver.h" |
| 11 | #include "deprecat.h" | |
| 12 | 11 | #include "video/konamiic.h" |
| 13 | 12 | |
| 14 | 13 | #define BMP_PAD 8 |
| r2454 | r2455 | |
| 880 | 879 | g = ((newword >> 3) & 0x1E ) | ((newword >> 13) & 0x01); |
| 881 | 880 | b = ((newword >> 7) & 0x1E ) | ((newword >> 14) & 0x01); |
| 882 | 881 | |
| 883 | palette_set_color_rgb( | |
| 882 | palette_set_color_rgb(machine, offset, pal5bit(r), pal5bit(g), pal5bit(b)); | |
| 884 | 883 | r>>=1; g>>=1; b>>=1; |
| 885 | palette_set_color_rgb( | |
| 884 | palette_set_color_rgb(machine, offset+0x800, pal5bit(r)/2, pal5bit(g)/2, pal5bit(b)/2); | |
| 886 | 885 | } |
| 887 | 886 | |
| 888 | 887 | WRITE16_HANDLER( wecleman_paletteram16_SSSSBBBBGGGGRRRR_word_w ) |
| r2454 | r2455 | |
| 891 | 890 | |
| 892 | 891 | // the highest nibble has some unknown functions |
| 893 | 892 | // if (newword & 0xf000) logerror("MSN set on color %03x: %1x\n", offset, newword>>12); |
| 894 | palette_set_color_rgb( | |
| 893 | palette_set_color_rgb(machine, offset, pal4bit(newword >> 0), pal4bit(newword >> 4), pal4bit(newword >> 8)); | |
| 895 | 894 | } |
| 896 | 895 | |
| 897 | 896 |
| r2454 | r2455 | |
|---|---|---|
| 39 | 39 | ***************************************************************************/ |
| 40 | 40 | |
| 41 | 41 | #include "driver.h" |
| 42 | #include "deprecat.h" | |
| 43 | 42 | |
| 44 | 43 | |
| 45 | 44 | extern UINT16 tetrisp2_systemregs[0x10]; |
| r2454 | r2455 | |
| 72 | 71 | { |
| 73 | 72 | data = COMBINE_DATA(&paletteram16[offset]); |
| 74 | 73 | if ((offset & 1) == 0) |
| 75 | palette_set_color_rgb( | |
| 74 | palette_set_color_rgb(machine,offset/2,pal5bit(data >> 1),pal5bit(data >> 6),pal5bit(data >> 11)); | |
| 76 | 75 | } |
| 77 | 76 | |
| 78 | 77 | WRITE16_HANDLER( rocknms_sub_palette_w ) |
| 79 | 78 | { |
| 80 | 79 | data = COMBINE_DATA(&paletteram16_2[offset]); |
| 81 | 80 | if ((offset & 1) == 0) |
| 82 | palette_set_color_rgb( | |
| 81 | palette_set_color_rgb(machine,(0x8000 + (offset/2)),pal5bit(data >> 1),pal5bit(data >> 6),pal5bit(data >> 11)); | |
| 83 | 82 | } |
| 84 | 83 | |
| 85 | 84 |
| r2454 | r2455 | |
|---|---|---|
| 290 | 290 | /* Spriteram is always 1 frame ahead, suggesting buffering. I can't find |
| 291 | 291 | a register to control this so I assume it happens automatically |
| 292 | 292 | every frame at the end of vblank */ |
| 293 | buffer_spriteram16_w(machine,0,0,0); | |
| 293 | buffer_spriteram16_w(machine,0,0,0xffff); | |
| 294 | 294 | } |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ****************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | |
| 10 | 9 | static tilemap *fix_tilemap; |
| 11 | 10 | static int bank_base,flipscreen; |
| r2454 | r2455 | |
| 38 | 37 | g = ((newword >> 3) & 0x1e) | ((newword >> 13) & 0x01); |
| 39 | 38 | b = ((newword << 1) & 0x1e) | ((newword >> 12) & 0x01); |
| 40 | 39 | |
| 41 | palette_set_color_rgb( | |
| 40 | palette_set_color_rgb(machine,offset,pal5bit(r),pal5bit(g),pal5bit(b)); | |
| 42 | 41 | } |
| 43 | 42 | |
| 44 | 43 | /******************************************************************************/ |
| r2454 | r2455 | |
|---|---|---|
| 54 | 54 | ***************************************************************************/ |
| 55 | 55 | |
| 56 | 56 | #include "driver.h" |
| 57 | #include "deprecat.h" | |
| 58 | 57 | #include "megasys1.h" |
| 59 | 58 | |
| 60 | 59 | /* Variables only used here: */ |
| r2454 | r2455 | |
| 225 | 224 | case 0x0004/2 : return input_port_read_indexed(machine, 3); // Motor Limit Switches |
| 226 | 225 | case 0x0006/2 : return input_port_read_indexed(machine, 4); // DSW 1 & 2 |
| 227 | 226 | |
| 228 | case 0x0008/2 : return soundlatch2_word_r(machine,0,0); // From sound cpu | |
| 227 | case 0x0008/2 : return soundlatch2_word_r(machine,0,0xffff); // From sound cpu | |
| 229 | 228 | |
| 230 | 229 | case 0x0010/2 : |
| 231 | 230 | switch (cischeat_ip_select & 0x3) |
| r2454 | r2455 | |
| 274 | 273 | break; |
| 275 | 274 | |
| 276 | 275 | case 0x000a/2 : // to sound cpu |
| 277 | soundlatch_word_w(machine,0,new_data,0); | |
| 276 | soundlatch_word_w(machine,0,new_data,0xffff); | |
| 278 | 277 | break; |
| 279 | 278 | |
| 280 | 279 | case 0x000c/2 : break; // ?? |
| r2454 | r2455 | |
| 298 | 297 | case 0x2208/2 : break; // watchdog reset |
| 299 | 298 | |
| 300 | 299 | /* Not sure about this one.. */ |
| 301 | case 0x2308/2 : cpunum_set_input_line(Machine, 1, INPUT_LINE_RESET, (new_data & 2) ? ASSERT_LINE : CLEAR_LINE ); | |
| 302 | cpunum_set_input_line(Machine, 2, INPUT_LINE_RESET, (new_data & 2) ? ASSERT_LINE : CLEAR_LINE ); | |
| 303 | cpunum_set_input_line(Machine, 3, INPUT_LINE_RESET, (new_data & 1) ? ASSERT_LINE : CLEAR_LINE ); | |
| 300 | case 0x2308/2 : cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, (new_data & 2) ? ASSERT_LINE : CLEAR_LINE ); | |
| 301 | cpunum_set_input_line(machine, 2, INPUT_LINE_RESET, (new_data & 2) ? ASSERT_LINE : CLEAR_LINE ); | |
| 302 | cpunum_set_input_line(machine, 3, INPUT_LINE_RESET, (new_data & 1) ? ASSERT_LINE : CLEAR_LINE ); | |
| 304 | 303 | break; |
| 305 | 304 | |
| 306 | 305 | default: SHOW_WRITE_ERROR("vreg %04X <- %04X",offset*2,data); |
| r2454 | r2455 | |
| 386 | 385 | case 0x2208/2 : break; // watchdog reset |
| 387 | 386 | |
| 388 | 387 | case 0x2300/2 : /* Sound CPU: reads latch during int 4, and stores command */ |
| 389 | soundlatch_word_w(machine,0,new_data,0); | |
| 388 | soundlatch_word_w(machine,0,new_data,0xffff); | |
| 390 | 389 | cpunum_set_input_line(machine, 3,4,HOLD_LINE); |
| 391 | 390 | break; |
| 392 | 391 | |
| r2454 | r2455 | |
| 505 | 504 | case 0x0014/2 : break; |
| 506 | 505 | |
| 507 | 506 | /* Usually written in sequence, but not always */ |
| 508 | case 0x0008/2 : soundlatch_word_w(machine,0,new_data,0); break; | |
| 507 | case 0x0008/2 : soundlatch_word_w(machine,0,new_data,0xffff); break; | |
| 509 | 508 | case 0x0018/2 : cpunum_set_input_line(machine, 3,4,HOLD_LINE); break; |
| 510 | 509 | |
| 511 | 510 | case 0x0010/2 : break; |
| r2454 | r2455 | |
| 1350 | 1349 | #if 1 |
| 1351 | 1350 | popmessage("Cmd: %04X Pos:%04X Lim:%04X Inp:%04X", |
| 1352 | 1351 | scudhamm_motor_command, |
| 1353 | scudhamm_motor_pos_r(screen->machine,0,0), | |
| 1354 | scudhamm_motor_status_r(screen->machine,0,0), | |
| 1355 | scudhamm_analog_r(screen->machine,0,0) ); | |
| 1352 | scudhamm_motor_pos_r(screen->machine,0,0xffff), | |
| 1353 | scudhamm_motor_status_r(screen->machine,0,0xffff), | |
| 1354 | scudhamm_analog_r(screen->machine,0,0xffff) ); | |
| 1356 | 1355 | #endif |
| 1357 | 1356 | |
| 1358 | 1357 | } |
| r2454 | r2455 | |
|---|---|---|
| 2217 | 2217 | dirtypal[offset&(0x7fff/4)] = 1; |
| 2218 | 2218 | } |
| 2219 | 2219 | |
| 2220 | static void namcos22_reset(running_machine *machine) | |
| 2221 | { | |
| 2222 | memset(&mSceneRoot, 0, sizeof(mSceneRoot)); | |
| 2223 | mpFreeSceneNode = NULL; | |
| 2224 | } | |
| 2225 | ||
| 2220 | 2226 | static void namcos22_exit(running_machine *machine) |
| 2221 | 2227 | { |
| 2222 | 2228 | poly_free(poly); |
| r2454 | r2455 | |
| 2243 | 2249 | #else |
| 2244 | 2250 | poly = poly_alloc(4000, sizeof(poly_extra_data), 0); |
| 2245 | 2251 | #endif |
| 2252 | add_reset_callback(machine, namcos22_reset); | |
| 2246 | 2253 | add_exit_callback(machine, namcos22_exit); |
| 2247 | 2254 | } |
| 2248 | 2255 |
| r2454 | r2455 | |
|---|---|---|
| 126 | 126 | backcolor = data & 7; |
| 127 | 127 | |
| 128 | 128 | for (i = 0;i < 32;i += 4) |
| 129 | palette_set_color( | |
| 129 | palette_set_color(machine, COLOR(1, i), palette[4 * backcolor + 0x20]); | |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | /* bit 3 selects char bank */ |
| r2454 | r2455 | |
| 275 | 275 | backcolor = data & 0x03; |
| 276 | 276 | |
| 277 | 277 | for (i = 0; i < 16; i += 4) |
| 278 | palette_set_color( | |
| 278 | palette_set_color(machine, COLOR(1, i), palette[backcolor + 0x10]); | |
| 279 | 279 | } |
| 280 | 280 | } |
| 281 | 281 |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | *************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "centiped.h" |
| 10 | 9 | |
| 11 | 10 | |
| r2454 | r2455 | |
| 235 | 234 | |
| 236 | 235 | /* character colors, set directly */ |
| 237 | 236 | if ((offset & 0x08) == 0) |
| 238 | palette_set_color( | |
| 237 | palette_set_color(machine, offset & 0x03, color); | |
| 239 | 238 | |
| 240 | 239 | /* sprite colors - set all the applicable ones */ |
| 241 | 240 | else |
| r2454 | r2455 | |
| 247 | 246 | for (i = 0; i < 0x100; i += 4) |
| 248 | 247 | { |
| 249 | 248 | if (offset == ((i >> 2) & 0x03)) |
| 250 | palette_set_color( | |
| 249 | palette_set_color(machine, i + 4 + 1, color); | |
| 251 | 250 | |
| 252 | 251 | if (offset == ((i >> 4) & 0x03)) |
| 253 | palette_set_color( | |
| 252 | palette_set_color(machine, i + 4 + 2, color); | |
| 254 | 253 | |
| 255 | 254 | if (offset == ((i >> 6) & 0x03)) |
| 256 | palette_set_color( | |
| 255 | palette_set_color(machine, i + 4 + 3, color); | |
| 257 | 256 | } |
| 258 | 257 | } |
| 259 | 258 | } |
| r2454 | r2455 | |
| 390 | 389 | { |
| 391 | 390 | paletteram[offset] = data; |
| 392 | 391 | |
| 393 | melliped_mazeinv_set_color( | |
| 392 | melliped_mazeinv_set_color(machine, offset, data); | |
| 394 | 393 | } |
| 395 | 394 | |
| 396 | 395 | |
| r2454 | r2455 | |
| 399 | 398 | paletteram[offset] = data; |
| 400 | 399 | |
| 401 | 400 | /* the value passed in is a look-up index into the color PROM */ |
| 402 | melliped_mazeinv_set_color( | |
| 401 | melliped_mazeinv_set_color(machine, offset, ~memory_region(REGION_PROMS)[~data & 0x0f]); | |
| 403 | 402 | } |
| 404 | 403 | |
| 405 | 404 |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ****************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "machine/atarigen.h" |
| 10 | 9 | #include "atarisy1.h" |
| 11 | 10 | |
| r2454 | r2455 | |
| 249 | 248 | /* sound CPU reset */ |
| 250 | 249 | if (diff & 0x0080) |
| 251 | 250 | { |
| 252 | cpunum_set_input_line( | |
| 251 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, (newselect & 0x0080) ? CLEAR_LINE : ASSERT_LINE); | |
| 253 | 252 | if (!(newselect & 0x0080)) atarigen_sound_reset(); |
| 254 | 253 | } |
| 255 | 254 | |
| r2454 | r2455 | |
| 380 | 379 | ((offset & 0xc0) == 0x40 && (newword == 0xffff || oldword == 0xffff))) |
| 381 | 380 | { |
| 382 | 381 | /* if the timer is in the active bank, update the display list */ |
| 383 | atarimo_0_spriteram_w(machine, offset, data, 0); | |
| 382 | atarimo_0_spriteram_w(machine, offset, data, 0xffff); | |
| 384 | 383 | update_timers(machine, video_screen_get_vpos(machine->primary_screen)); |
| 385 | 384 | } |
| 386 | 385 | |
| r2454 | r2455 | |
| 393 | 392 | } |
| 394 | 393 | |
| 395 | 394 | /* let the MO handler do the basic work */ |
| 396 | atarimo_0_spriteram_w(machine, offset, data, 0); | |
| 395 | atarimo_0_spriteram_w(machine, offset, data, 0xffff); | |
| 397 | 396 | } |
| 398 | 397 | |
| 399 | 398 | |
| r2454 | r2455 | |
| 407 | 406 | static TIMER_CALLBACK( int3off_callback ) |
| 408 | 407 | { |
| 409 | 408 | /* clear the state */ |
| 410 | atarigen_scanline_int_ack_w(machine, 0, 0, 0); | |
| 409 | atarigen_scanline_int_ack_w(machine, 0, 0, 0xffff); | |
| 411 | 410 | } |
| 412 | 411 | |
| 413 | 412 |
| r2454 | r2455 | |
|---|---|---|
| 611 | 611 | offset&=0xffe; |
| 612 | 612 | myword=buffer[offset] + (buffer[offset+1]<<8); |
| 613 | 613 | |
| 614 | if (offset<0x10) dec0_pf3_control_0_w(machine,offset/2,myword,0); | |
| 615 | else dec0_pf3_control_1_w(machine,(offset-0x10)/2,myword,0); | |
| 614 | if (offset<0x10) dec0_pf3_control_0_w(machine,offset/2,myword,0xffff); | |
| 615 | else dec0_pf3_control_1_w(machine,(offset-0x10)/2,myword,0xffff); | |
| 616 | 616 | } |
| 617 | 617 | |
| 618 | 618 | WRITE8_HANDLER( dec0_pf3_data_8bit_w ) |
| r2454 | r2455 | |
|---|---|---|
| 136 | 136 | ***************************************************************************/ |
| 137 | 137 | |
| 138 | 138 | #include "driver.h" |
| 139 | #include "deprecat.h" | |
| 140 | 139 | #include "seta.h" |
| 141 | 140 | #ifdef MAME_DEBUG |
| 142 | 141 | #include "ui.h" |
| r2454 | r2455 | |
| 400 | 399 | g = data1 >> 8; |
| 401 | 400 | b = data1 & 0xff; |
| 402 | 401 | |
| 403 | palette_set_color( | |
| 402 | palette_set_color(machine, offset>>1, MAKE_RGB(r, g, b)); | |
| 404 | 403 | } |
| 405 | 404 | |
| 406 | 405 | /*************************************************************************** |
| r2454 | r2455 | |
|---|---|---|
| 52 | 52 | ***************************************************************************/ |
| 53 | 53 | |
| 54 | 54 | #include "driver.h" |
| 55 | #include "deprecat.h" | |
| 56 | 55 | #include "video/konamiic.h" |
| 57 | 56 | |
| 58 | 57 | /* Variables that driver has access to: */ |
| r2454 | r2455 | |
| 130 | 129 | { |
| 131 | 130 | data = COMBINE_DATA(&paletteram16[offset]); |
| 132 | 131 | /* We need the ^0xff because we had to invert the pens in the gfx */ |
| 133 | palette_set_color_rgb( | |
| 132 | palette_set_color_rgb(machine,offset^0xff,pal5bit(data >> 6),pal5bit(data >> 11),pal5bit(data >> 1)); | |
| 134 | 133 | } |
| 135 | 134 | |
| 136 | 135 |
| r2454 | r2455 | |
|---|---|---|
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "deprecat.h" | |
| 11 | 10 | |
| 12 | 11 | |
| 13 | 12 | static tilemap *tx_tilemap,*bgbot_tilemap ,*bgtop_tilemap; |
| r2454 | r2455 | |
| 254 | 253 | paletteram[offset] = data; |
| 255 | 254 | |
| 256 | 255 | no=offset & 0xff; |
| 257 | palette_set_color_rgb( | |
| 256 | palette_set_color_rgb(machine,no,pal4bit(paletteram[no]),pal4bit(paletteram[no]>>4),pal4bit(paletteram[no+0x100])); | |
| 258 | 257 | } |
| 259 | 258 | |
| 260 | 259 | /*** Video Start & Update |
| r2454 | r2455 | |
|---|---|---|
| 512 | 512 | |
| 513 | 513 | COMBINE_DATA(&paletteram32[offset]); |
| 514 | 514 | newword = paletteram32[offset]; |
| 515 | palette_set_color_rgb( | |
| 515 | palette_set_color_rgb(machine, offset, pal5bit(newword >> 10), pal5bit(newword >> 5), pal5bit(newword >> 0)); | |
| 516 | 516 | } |
| 517 | 517 | |
| 518 | 518 |
| r2454 | r2455 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | #include "deprecat.h" | |
| 3 | 2 | |
| 4 | 3 | UINT8 *usgames_videoram,*usgames_charram; |
| 5 | 4 | |
| r2454 | r2455 | |
| 63 | 62 | { |
| 64 | 63 | usgames_charram[offset] = data; |
| 65 | 64 | |
| 66 | decodechar( | |
| 65 | decodechar(machine->gfx[0], offset/8, usgames_charram); | |
| 67 | 66 | |
| 68 | 67 | tilemap_mark_all_tiles_dirty(usgames_tilemap); |
| 69 | 68 | } |
| r2454 | r2455 | |
|---|---|---|
| 58 | 58 | ***************************************************************************/ |
| 59 | 59 | |
| 60 | 60 | #include "driver.h" |
| 61 | #include "deprecat.h" | |
| 62 | 61 | |
| 63 | 62 | static int color_bank; |
| 64 | 63 | |
| r2454 | r2455 | |
| 105 | 104 | { |
| 106 | 105 | offset += color_bank * 256; |
| 107 | 106 | data = COMBINE_DATA(&paletteram16[offset]); |
| 108 | palette_set_color_rgb( | |
| 107 | palette_set_color_rgb( machine, offset, pal5bit(data >> 0),pal5bit(data >> 5),pal5bit(data >> 10)); | |
| 109 | 108 | } |
| 110 | 109 | |
| 111 | 110 |
| r2454 | r2455 | |
|---|---|---|
| 9 | 9 | { |
| 10 | 10 | UINT32 *dest = &vram[offset+(0x40000/4)*eolith_buffer]; |
| 11 | 11 | |
| 12 | if (mem_mask == 0) | |
| 12 | if (mem_mask == 0xffffffff) | |
| 13 | 13 | { |
| 14 | 14 | if (~data & 0x80000000) |
| 15 | 15 | *dest = (*dest & 0x0000ffff) | (data & 0xffff0000); |
| r2454 | r2455 | |
| 17 | 17 | if (~data & 0x00008000) |
| 18 | 18 | *dest = (*dest & 0xffff0000) | (data & 0x0000ffff); |
| 19 | 19 | } |
| 20 | else if (((mem_mask == 0x0000ffff) && (~data & 0x80000000)) || | |
| 21 | ((mem_mask == 0xffff0000) && (~data & 0x00008000))) | |
| 20 | else if (((mem_mask == 0xffff0000) && (~data & 0x80000000)) || | |
| 21 | ((mem_mask == 0x0000ffff) && (~data & 0x00008000))) | |
| 22 | 22 | COMBINE_DATA(dest); |
| 23 | 23 | } |
| 24 | 24 |
| r2454 | r2455 | |
|---|---|---|
| 6 | 6 | |
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | #include "driver.h" |
| 9 | #include "deprecat.h" | |
| 10 | 9 | |
| 11 | 10 | |
| 12 | 11 | UINT8 *bigevglf_spriteram1; |
| r2454 | r2455 | |
| 27 | 26 | |
| 28 | 27 | paletteram[offset] = data; |
| 29 | 28 | color = paletteram[offset&0x3ff] | (paletteram[0x400+(offset&0x3ff)] << 8); |
| 30 | palette_set_color_rgb( | |
| 29 | palette_set_color_rgb(machine, offset&0x3ff, pal4bit(color >> 4), pal4bit(color >> 0), pal4bit(color >> 8)); | |
| 31 | 30 | } |
| 32 | 31 | |
| 33 | 32 | WRITE8_HANDLER( bigevglf_gfxcontrol_w ) |
| r2454 | r2455 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "deprecat.h" | |
| 11 | 10 | |
| 12 | 11 | UINT8 *commando_videoram2, *commando_colorram2; |
| 13 | 12 | |
| r2454 | r2455 | |
| 60 | 59 | coin_counter_w(1, data & 0x02); |
| 61 | 60 | |
| 62 | 61 | // bit 4 resets the sound CPU |
| 63 | cpunum_set_input_line( | |
| 62 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, (data & 0x10) ? ASSERT_LINE : CLEAR_LINE); | |
| 64 | 63 | |
| 65 | 64 | // bit 7 flips screen |
| 66 | 65 | flip_screen_set(data & 0x80); |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ****************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "machine/atarigen.h" |
| 10 | 9 | #include "slapstic.h" |
| 11 | 10 | #include "atarisy2.h" |
| r2454 | r2455 | |
| 241 | 240 | red = (color_table[(newword >> 12) & 15] * inten) >> 4; |
| 242 | 241 | green = (color_table[(newword >> 8) & 15] * inten) >> 4; |
| 243 | 242 | blue = (color_table[(newword >> 4) & 15] * inten) >> 4; |
| 244 | palette_set_color( | |
| 243 | palette_set_color(machine, offset, MAKE_RGB(red, green, blue)); | |
| 245 | 244 | } |
| 246 | 245 | |
| 247 | 246 |
| r2454 | r2455 | |
|---|---|---|
| 28 | 28 | ***************************************************************************/ |
| 29 | 29 | |
| 30 | 30 | #include "driver.h" |
| 31 | #include "deprecat.h" | |
| 32 | 31 | |
| 33 | 32 | /* Variables that driver has access to: */ |
| 34 | 33 | |
| r2454 | r2455 | |
| 83 | 82 | color = RAM[offset & ~1] | (RAM[offset | 1] << 8); |
| 84 | 83 | |
| 85 | 84 | /* BBBBBGGGGGRRRRRx */ |
| 86 | palette_set_color_rgb( | |
| 85 | palette_set_color_rgb(machine, offset/2 + (bank ? 0x400:0), pal5bit(color >> 0), pal5bit(color >> 5), pal5bit(color >> 10)); | |
| 87 | 86 | } |
| 88 | 87 | else |
| 89 | 88 | { |
| r2454 | r2455 | |
|---|---|---|
| 733 | 733 | switch (offset) |
| 734 | 734 | { |
| 735 | 735 | case 0: |
| 736 | get_crosshair_xy( | |
| 736 | get_crosshair_xy(machine, 1, &beamx, &beamy); | |
| 737 | 737 | return (beamy << 16) | (beamx ^ 0x1ff); |
| 738 | 738 | |
| 739 | 739 | case 1: |
| 740 | get_crosshair_xy( | |
| 740 | get_crosshair_xy(machine, 0, &beamx, &beamy); | |
| 741 | 741 | return (beamy << 16) | (beamx ^ 0x1ff); |
| 742 | 742 | |
| 743 | 743 | case 2: |
| r2454 | r2455 | |
|---|---|---|
| 8 | 8 | ******************************************************************************/ |
| 9 | 9 | |
| 10 | 10 | #include "driver.h" |
| 11 | #include "deprecat.h" | |
| 12 | 11 | #include "cpu/z80/z80.h" |
| 13 | 12 | |
| 14 | 13 | |
| r2454 | r2455 | |
| 79 | 78 | ((ojankohs_paletteram[offset + 1] & 0xe0) >> 5); |
| 80 | 79 | b = (ojankohs_paletteram[offset + 1] & 0x1f) >> 0; |
| 81 | 80 | |
| 82 | palette_set_color_rgb( | |
| 81 | palette_set_color_rgb(machine,offset >> 1, pal5bit(r), pal5bit(g), pal5bit(b)); | |
| 83 | 82 | } |
| 84 | 83 | |
| 85 | 84 | WRITE8_HANDLER( ccasino_palette_w ) |
| r2454 | r2455 | |
| 98 | 97 | ((ojankohs_paletteram[offset + 1] & 0xe0) >> 5); |
| 99 | 98 | b = (ojankohs_paletteram[offset + 1] & 0x1f) >> 0; |
| 100 | 99 | |
| 101 | palette_set_color_rgb( | |
| 100 | palette_set_color_rgb(machine,offset >> 1, pal5bit(r), pal5bit(g), pal5bit(b)); | |
| 102 | 101 | } |
| 103 | 102 | |
| 104 | 103 | WRITE8_HANDLER( ojankoc_palette_w ) |
| r2454 | r2455 | |
| 116 | 115 | g = (color >> 5) & 0x1f; |
| 117 | 116 | b = (color >> 0) & 0x1f; |
| 118 | 117 | |
| 119 | palette_set_color_rgb( | |
| 118 | palette_set_color_rgb(machine,offset >> 1, pal5bit(r), pal5bit(g), pal5bit(b)); | |
| 120 | 119 | } |
| 121 | 120 | |
| 122 | 121 |
| r2454 | r2455 | |
|---|---|---|
| 91 | 91 | ***************************************************************************/ |
| 92 | 92 | |
| 93 | 93 | #include "driver.h" |
| 94 | #include "deprecat.h" | |
| 95 | 94 | #include "cpu/m6809/m6809.h" |
| 96 | 95 | #include "machine/bfm_bd1.h" // vfd |
| 97 | 96 | #include "video/bfm_adr2.h" |
| r2454 | r2455 | |
| 290 | 289 | r = ((data & 0x18)>>3) * 85; // 00011000b = 0x18 |
| 291 | 290 | g = ((data & 0x06)>>1) * 85; // 00000110b = 0x06 |
| 292 | 291 | b = ((data & 0x01) ) * 255; |
| 293 | palette_set_color( | |
| 292 | palette_set_color(machine, pal, MAKE_RGB(r,g,b)); | |
| 294 | 293 | } |
| 295 | 294 | |
| 296 | 295 | if ( adder2_screen_page_reg & SL_ACCESS ) |
| r2454 | r2455 | |
|---|---|---|
| 57 | 57 | g = ((nbmj8891_palette[offset + 1] & 0xf0) >> 4); |
| 58 | 58 | b = ((nbmj8891_palette[offset + 1] & 0x0f) >> 0); |
| 59 | 59 | |
| 60 | palette_set_color_rgb( | |
| 60 | palette_set_color_rgb(machine, (offset >> 1), pal4bit(r), pal4bit(g), pal4bit(b)); | |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | READ8_HANDLER( nbmj8891_palette_type2_r ) |
| r2454 | r2455 | |
| 79 | 79 | g = ((nbmj8891_palette[offset + 0x000] & 0xf0) >> 4); |
| 80 | 80 | b = ((nbmj8891_palette[offset + 0x100] & 0x0f) >> 0); |
| 81 | 81 | |
| 82 | palette_set_color_rgb( | |
| 82 | palette_set_color_rgb(machine, (offset & 0x0ff), pal4bit(r), pal4bit(g), pal4bit(b)); | |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | READ8_HANDLER( nbmj8891_palette_type3_r ) |
| r2454 | r2455 | |
| 101 | 101 | g = ((nbmj8891_palette[offset + 0] & 0xf0) >> 4); |
| 102 | 102 | b = ((nbmj8891_palette[offset + 0] & 0x0f) >> 0); |
| 103 | 103 | |
| 104 | palette_set_color_rgb( | |
| 104 | palette_set_color_rgb(machine, (offset >> 1), pal4bit(r), pal4bit(g), pal4bit(b)); | |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | WRITE8_HANDLER( nbmj8891_clutsel_w ) |
| r2454 | r2455 | |
|---|---|---|
| 10 | 10 | *******************************************************************************/ |
| 11 | 11 | |
| 12 | 12 | #include "driver.h" |
| 13 | #include "deprecat.h" | |
| 14 | 13 | #include "cpu/m6502/m6502.h" |
| 15 | 14 | |
| 16 | 15 | static int background_color,background_disable; |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | *************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "turbo.h" |
| 10 | 9 | #include "video/resnet.h" |
| 11 | 10 | |
| r2454 | r2455 | |
| 205 | 204 | |
| 206 | 205 | WRITE8_HANDLER( turbo_videoram_w ) |
| 207 | 206 | { |
| 208 | turbo_state *state = | |
| 207 | turbo_state *state = machine->driver_data; | |
| 209 | 208 | state->videoram[offset] = data; |
| 210 | 209 | if (offset < 0x400) |
| 211 | 210 | { |
| r2454 | r2455 | |
| 217 | 216 | |
| 218 | 217 | WRITE8_HANDLER( buckrog_bitmap_w ) |
| 219 | 218 | { |
| 220 | turbo_state *state = | |
| 219 | turbo_state *state = machine->driver_data; | |
| 221 | 220 | state->buckrog_bitmap_ram[offset] = data & 1; |
| 222 | 221 | } |
| 223 | 222 |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | |
| 10 | 9 | UINT16 *nemesis_videoram1b; |
| 11 | 10 | UINT16 *nemesis_videoram2b; |
| r2454 | r2455 | |
| 94 | 93 | else |
| 95 | 94 | { |
| 96 | 95 | if (data & 0x100) |
| 97 | cpunum_set_input_line_and_vector( | |
| 96 | cpunum_set_input_line_and_vector(machine, 1, 0, HOLD_LINE, 0xff); | |
| 98 | 97 | } |
| 99 | 98 | } |
| 100 | 99 | |
| r2454 | r2455 | |
| 149 | 148 | bit5=(data >> 14)&1; |
| 150 | 149 | b = MULTIPLIER; |
| 151 | 150 | |
| 152 | palette_set_color( | |
| 151 | palette_set_color(machine,offset,MAKE_RGB(r,g,b)); | |
| 153 | 152 | } |
| 154 | 153 | |
| 155 | 154 | WRITE16_HANDLER( salamander_palette_word_w ) |
| r2454 | r2455 | |
| 158 | 157 | offset &= ~1; |
| 159 | 158 | |
| 160 | 159 | data = ((paletteram16[offset] << 8) & 0xff00) | (paletteram16[offset+1] & 0xff); |
| 161 | palette_set_color_rgb( | |
| 160 | palette_set_color_rgb(machine,offset / 2,pal5bit(data >> 0),pal5bit(data >> 5),pal5bit(data >> 10)); | |
| 162 | 161 | } |
| 163 | 162 | |
| 164 | 163 | WRITE16_HANDLER( nemesis_videoram1b_word_w ) |
| r2454 | r2455 | |
|---|---|---|
| 195 | 195 | g = (paletteram16[offset+1] >> 8) & 0xff; |
| 196 | 196 | r = (paletteram16[offset+1] >> 0) & 0xff; |
| 197 | 197 | |
| 198 | palette_set_color( | |
| 198 | palette_set_color(machine,offset/2,MAKE_RGB(r,g,b)); | |
| 199 | 199 | } |
| 200 | 200 | |
| 201 | 201 | WRITE16_HANDLER( deco16_buffered_palette_w ) |
| r2454 | r2455 | |
| 206 | 206 | |
| 207 | 207 | WRITE16_HANDLER( deco16_palette_dma_w ) |
| 208 | 208 | { |
| 209 | const int m= | |
| 209 | const int m=machine->config->total_colors; | |
| 210 | 210 | int r,g,b,i; |
| 211 | 211 | |
| 212 | 212 | for (i=0; i<m; i++) { |
| r2454 | r2455 | |
| 217 | 217 | g = (paletteram16[i*2+1] >> 8) & 0xff; |
| 218 | 218 | r = (paletteram16[i*2+1] >> 0) & 0xff; |
| 219 | 219 | |
| 220 | palette_set_color( | |
| 220 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 221 | 221 | } |
| 222 | 222 | } |
| 223 | 223 | } |
| r2454 | r2455 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "deprecat.h" | |
| 11 | 10 | |
| 12 | 11 | |
| 13 | 12 | UINT8 *c1942_fgvideoram; |
| r2454 | r2455 | |
| 186 | 185 | |
| 187 | 186 | coin_counter_w(0,data & 0x01); |
| 188 | 187 | |
| 189 | cpunum_set_input_line( | |
| 188 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, (data & 0x10) ? ASSERT_LINE : CLEAR_LINE); | |
| 190 | 189 | |
| 191 | 190 | flip_screen_set(data & 0x80); |
| 192 | 191 | } |
| r2454 | r2455 | |
|---|---|---|
| 7 | 7 | ******************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "deprecat.h" | |
| 11 | 10 | |
| 12 | 11 | static int fromanc2_scrollx[2][4], fromanc2_scrolly[2][4]; |
| 13 | 12 | static int fromanc2_gfxbank[2][4]; |
| r2454 | r2455 | |
| 83 | 82 | |
| 84 | 83 | // GGGG_GRRR_RRBB_BBBx |
| 85 | 84 | color = ((offset & 0x0700) << 1) + (offset & 0x00ff); |
| 86 | palette_set_color_rgb( | |
| 85 | palette_set_color_rgb(machine, 0x000 + color, pal5bit(data >> 6), pal5bit(data >> 11), pal5bit(data >> 1)); | |
| 87 | 86 | } |
| 88 | 87 | |
| 89 | 88 | WRITE16_HANDLER( fromanc2_paletteram_1_w ) |
| r2454 | r2455 | |
| 94 | 93 | |
| 95 | 94 | // GGGG_GRRR_RRBB_BBBx |
| 96 | 95 | color = ((offset & 0x0700) << 1) + (offset & 0x00ff); |
| 97 | palette_set_color_rgb( | |
| 96 | palette_set_color_rgb(machine, 0x100 + color, pal5bit(data >> 6), pal5bit(data >> 11), pal5bit(data >> 1)); | |
| 98 | 97 | } |
| 99 | 98 | |
| 100 | 99 | |
| r2454 | r2455 | |
| 116 | 115 | |
| 117 | 116 | // xGGG_GGRR_RRRB_BBBB |
| 118 | 117 | color = ((offset & 0x0700) << 1) + (offset & 0x00ff); |
| 119 | palette_set_color_rgb( | |
| 118 | palette_set_color_rgb(machine, 0x000 + color, pal5bit(data >> 5), pal5bit(data >> 10), pal5bit(data >> 0)); | |
| 120 | 119 | } |
| 121 | 120 | |
| 122 | 121 | WRITE16_HANDLER( fromancr_paletteram_1_w ) |
| r2454 | r2455 | |
| 127 | 126 | |
| 128 | 127 | // xGGG_GGRR_RRRB_BBBB |
| 129 | 128 | color = ((offset & 0x0700) << 1) + (offset & 0x00ff); |
| 130 | palette_set_color_rgb( | |
| 129 | palette_set_color_rgb(machine, 0x100 + color, pal5bit(data >> 5), pal5bit(data >> 10), pal5bit(data >> 0)); | |
| 131 | 130 | } |
| 132 | 131 | |
| 133 | 132 | |
| r2454 | r2455 | |
| 149 | 148 | |
| 150 | 149 | // xRRR_RRGG_GGGB_BBBB |
| 151 | 150 | color = ((offset & 0x0700) << 1) + (offset & 0x00ff); |
| 152 | palette_set_color_rgb( | |
| 151 | palette_set_color_rgb(machine, 0x000 + color, pal5bit(data >> 10), pal5bit(data >> 5), pal5bit(data >> 0)); | |
| 153 | 152 | } |
| 154 | 153 | |
| 155 | 154 | WRITE16_HANDLER( fromanc4_paletteram_1_w ) |
| r2454 | r2455 | |
| 160 | 159 | |
| 161 | 160 | // xRRR_RRGG_GGGB_BBBB |
| 162 | 161 | color = ((offset & 0x0700) << 1) + (offset & 0x00ff); |
| 163 | palette_set_color_rgb( | |
| 162 | palette_set_color_rgb(machine, 0x100 + color, pal5bit(data >> 10), pal5bit(data >> 5), pal5bit(data >> 0)); | |
| 164 | 163 | } |
| 165 | 164 | |
| 166 | 165 |
| r2454 | r2455 | |
|---|---|---|
| 37 | 37 | ***************************************************************************/ |
| 38 | 38 | |
| 39 | 39 | #include "driver.h" |
| 40 | #include "deprecat.h" | |
| 41 | 40 | #include "unico.h" |
| 42 | 41 | |
| 43 | 42 | /* Variables needed by drivers: */ |
| r2454 | r2455 | |
| 65 | 64 | COMBINE_DATA(&paletteram16[offset]); |
| 66 | 65 | data1 = paletteram16[offset & ~1]; |
| 67 | 66 | data2 = paletteram16[offset | 1]; |
| 68 | palette_set_color_rgb( | |
| 67 | palette_set_color_rgb( machine,offset/2, | |
| 69 | 68 | (data1 >> 8) & 0xFC, |
| 70 | 69 | (data1 >> 0) & 0xFC, |
| 71 | 70 | (data2 >> 8) & 0xFC ); |
| r2454 | r2455 | |
| 74 | 73 | WRITE32_HANDLER( unico_palette32_w ) |
| 75 | 74 | { |
| 76 | 75 | UINT32 rgb0 = COMBINE_DATA(&paletteram32[offset]); |
| 77 | palette_set_color_rgb( | |
| 76 | palette_set_color_rgb( machine,offset, | |
| 78 | 77 | (rgb0 >> 24) & 0xFC, |
| 79 | 78 | (rgb0 >> 16) & 0xFC, |
| 80 | 79 | (rgb0 >> 8) & 0xFC ); |
| r2454 | r2455 | |
|---|---|---|
| 4 | 4 | */ |
| 5 | 5 | |
| 6 | 6 | #include "driver.h" |
| 7 | #include "deprecat.h" | |
| 8 | 7 | |
| 9 | 8 | static tilemap *carjmbre_tilemap; |
| 10 | 9 | |
| r2454 | r2455 | |
| 56 | 55 | if(oldbg!=carjmbre_bgcolor) |
| 57 | 56 | { |
| 58 | 57 | for (i=0;i<64;i+=4) |
| 59 | palette_set_color_rgb( | |
| 58 | palette_set_color_rgb(machine, i, (carjmbre_bgcolor&0xff)*0x50, (carjmbre_bgcolor&0xff)*0x50, (carjmbre_bgcolor&0xff)!=0?0x50:0); | |
| 60 | 59 | } |
| 61 | 60 | } |
| 62 | 61 |
| r2454 | r2455 | |
|---|---|---|
| 54 | 54 | if (offset%2) offset-=1; |
| 55 | 55 | |
| 56 | 56 | pal_word=paletteram[offset] | (paletteram[offset+1]<<8); |
| 57 | palette_set_color_rgb( | |
| 57 | palette_set_color_rgb(machine, offset/2, pal3bit(pal_word >> 3), pal3bit(pal_word >> 6), pal3bit(pal_word >> 0)); | |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | /******************************************************************************/ |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | *******************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | |
| 10 | 9 | |
| 11 | 10 | /* |
| r2454 | r2455 | |
| 197 | 196 | r = namcos1_paletteram[offset]; |
| 198 | 197 | g = namcos1_paletteram[offset + 0x0800]; |
| 199 | 198 | b = namcos1_paletteram[offset + 0x1000]; |
| 200 | palette_set_color( | |
| 199 | palette_set_color(machine,color,MAKE_RGB(r,g,b)); | |
| 201 | 200 | } |
| 202 | 201 | else |
| 203 | 202 | { |
| r2454 | r2455 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "deprecat.h" | |
| 11 | 10 | |
| 12 | 11 | |
| 13 | 12 | |
| r2454 | r2455 | |
| 101 | 100 | b = (val >> 4) & 0x0f; |
| 102 | 101 | /* TODO: the bottom 4 bits are used as well, but I'm not sure about the meaning */ |
| 103 | 102 | |
| 104 | palette_set_color_rgb( | |
| 103 | palette_set_color_rgb(machine,offset / 2,pal4bit(r),pal4bit(g),pal4bit(b)); | |
| 105 | 104 | } |
| 106 | 105 | |
| 107 | 106 | WRITE8_HANDLER( gundealr_fg_scroll_w ) |
| r2454 | r2455 | |
|---|---|---|
| 28 | 28 | static INT32 m62_background_hscroll; |
| 29 | 29 | static INT32 m62_background_vscroll; |
| 30 | 30 | |
| 31 | static int ldrun3_topbottom_mask; | |
| 32 | ||
| 31 | 33 | static UINT8 *irem_textram; |
| 32 | 34 | static size_t irem_textram_size; |
| 33 | 35 | |
| r2454 | r2455 | |
| 406 | 408 | m62_background_hscroll = 0; |
| 407 | 409 | m62_background_vscroll = 0; |
| 408 | 410 | |
| 409 | tilemap_set_transmask(m62_background,0,0xffff,0x0000); /* split type 0 is totally transparent in front half */ | |
| 410 | tilemap_set_transmask(m62_background,1,0x0001,0xfffe); /* split type 1 has pen 0 transparent in front half */ | |
| 411 | ||
| 412 | 411 | register_savestate(); |
| 413 | 412 | |
| 414 | 413 | if( rows != 0 ) |
| r2454 | r2455 | |
| 458 | 457 | /* is the following right? */ |
| 459 | 458 | if( ( tile_index / 64 ) < 6 || ( ( color & 0x1f ) >> 1 ) > 0x0c ) |
| 460 | 459 | { |
| 461 | tileinfo->g | |
| 460 | tileinfo->categ | |
| 462 | 461 | } |
| 463 | 462 | else |
| 464 | 463 | { |
| 465 | tileinfo->g | |
| 464 | tileinfo->categ | |
| 466 | 465 | } |
| 467 | 466 | } |
| 468 | 467 | |
| 468 | VIDEO_START( kungfum ) | |
| 469 | { | |
| 470 | m62_start( get_kungfum_bg_tile_info, 32, 0, 8, 8, 64, 32 ); | |
| 471 | } | |
| 472 | ||
| 469 | 473 | VIDEO_UPDATE( kungfum ) |
| 470 | 474 | { |
| 471 | 475 | int i; |
| r2454 | r2455 | |
| 477 | 481 | { |
| 478 | 482 | tilemap_set_scrollx( m62_background, i, m62_background_hscroll ); |
| 479 | 483 | } |
| 480 | tilemap_draw( bitmap, cliprect, m62_background, | |
| 484 | tilemap_draw( bitmap, cliprect, m62_background, 0 | |
| 481 | 485 | draw_sprites( screen->machine, bitmap, cliprect, 0x1f, 0x00, 0x00 ); |
| 482 | tilemap_draw( bitmap, cliprect, m62_background, | |
| 486 | tilemap_draw( bitmap, cliprect, m62_background, 1 | |
| 483 | 487 | return 0; |
| 484 | 488 | } |
| 485 | 489 | |
| 486 | VIDEO_START( kungfum ) | |
| 487 | { | |
| 488 | m62_start( get_kungfum_bg_tile_info, 32, 0, 8, 8, 64, 32 ); | |
| 489 | } | |
| 490 | 490 | |
| 491 | 491 | |
| 492 | 492 | static TILE_GET_INFO( get_ldrun_bg_tile_info ) |
| r2454 | r2455 | |
| 512 | 512 | } |
| 513 | 513 | } |
| 514 | 514 | |
| 515 | VIDEO_START( ldrun ) | |
| 516 | { | |
| 517 | m62_start( get_ldrun_bg_tile_info, 1, 1, 8, 8, 64, 32 ); | |
| 518 | tilemap_set_transmask(m62_background,0,0xffff,0x0000); /* split type 0 is totally transparent in front half */ | |
| 519 | tilemap_set_transmask(m62_background,1,0x0001,0xfffe); /* split type 1 has pen 0 transparent in front half */ | |
| 520 | } | |
| 521 | ||
| 515 | 522 | VIDEO_UPDATE( ldrun ) |
| 516 | 523 | { |
| 517 | 524 | tilemap_set_scrollx( m62_background, 0, m62_background_hscroll ); |
| r2454 | r2455 | |
| 524 | 531 | return 0; |
| 525 | 532 | } |
| 526 | 533 | |
| 527 | VIDEO_START( ldrun ) | |
| 528 | { | |
| 529 | m62_start( get_ldrun_bg_tile_info, 1, 1, 8, 8, 64, 32 ); | |
| 530 | } | |
| 531 | ||
| 532 | 534 | static TILE_GET_INFO( get_ldrun2_bg_tile_info ) |
| 533 | 535 | { |
| 534 | 536 | int code; |
| r2454 | r2455 | |
| 555 | 557 | VIDEO_START( ldrun2 ) |
| 556 | 558 | { |
| 557 | 559 | m62_start( get_ldrun2_bg_tile_info, 1, 1, 8, 8, 64, 32 ); |
| 560 | tilemap_set_transmask(m62_background,0,0xffff,0x0000); /* split type 0 is totally transparent in front half */ | |
| 561 | tilemap_set_transmask(m62_background,1,0x0001,0xfffe); /* split type 1 has pen 0 transparent in front half */ | |
| 558 | 562 | } |
| 559 | 563 | |
| 564 | ||
| 565 | ||
| 566 | WRITE8_HANDLER( ldrun3_topbottom_mask_w ) | |
| 567 | { | |
| 568 | ldrun3_topbottom_mask = data & 1; | |
| 569 | } | |
| 570 | ||
| 571 | VIDEO_UPDATE( ldrun3 ) | |
| 572 | { | |
| 573 | VIDEO_UPDATE_CALL(ldrun); | |
| 574 | ||
| 575 | if (ldrun3_topbottom_mask) | |
| 576 | { | |
| 577 | rectangle my_cliprect = *cliprect; | |
| 578 | ||
| 579 | my_cliprect.min_y = 0*8; | |
| 580 | my_cliprect.max_y = 1*8-1; | |
| 581 | fillbitmap(bitmap,get_black_pen(screen->machine),&my_cliprect); | |
| 582 | ||
| 583 | my_cliprect.min_y = 31*8; | |
| 584 | my_cliprect.max_y = 32*8-1; | |
| 585 | fillbitmap(bitmap,get_black_pen(screen->machine),&my_cliprect); | |
| 586 | } | |
| 587 | ||
| 588 | return 0; | |
| 589 | } | |
| 590 | ||
| 591 | ||
| 560 | 592 | static TILE_GET_INFO( get_battroad_bg_tile_info ) |
| 561 | 593 | { |
| 562 | 594 | int code; |
| r2454 | r2455 | |
| 589 | 621 | SET_TILE_INFO( 2, code | ( ( color & 0x40 ) << 3 ) | ( ( color & 0x10 ) << 4 ), color & 0x0f, 0 ); |
| 590 | 622 | } |
| 591 | 623 | |
| 624 | VIDEO_START( battroad ) | |
| 625 | { | |
| 626 | m62_start( get_battroad_bg_tile_info, 1, 1, 8, 8, 64, 32 ); | |
| 627 | m62_textlayer( get_battroad_fg_tile_info, 1, 1, 8, 8, 32, 32 ); | |
| 628 | tilemap_set_transmask(m62_background,0,0xffff,0x0000); /* split type 0 is totally transparent in front half */ | |
| 629 | tilemap_set_transmask(m62_background,1,0x0001,0xfffe); /* split type 1 has pen 0 transparent in front half */ | |
| 630 | } | |
| 631 | ||
| 592 | 632 | VIDEO_UPDATE( battroad ) |
| 593 | 633 | { |
| 594 | 634 | tilemap_set_scrollx( m62_background, 0, m62_background_hscroll ); |
| r2454 | r2455 | |
| 605 | 645 | return 0; |
| 606 | 646 | } |
| 607 | 647 | |
| 608 | VIDEO_START( battroad ) | |
| 609 | { | |
| 610 | m62_start( get_battroad_bg_tile_info, 1, 1, 8, 8, 64, 32 ); | |
| 611 | m62_textlayer( get_battroad_fg_tile_info, 1, 1, 8, 8, 32, 32 ); | |
| 612 | } | |
| 613 | 648 | |
| 614 | ||
| 615 | 649 | /* almost identical but scrolling background, more characters, */ |
| 616 | 650 | /* no char x flip, and more sprites */ |
| 617 | 651 | static TILE_GET_INFO( get_ldrun4_bg_tile_info ) |
| r2454 | r2455 | |
| 623 | 657 | SET_TILE_INFO( 0, code | ( ( color & 0xc0 ) << 2 ) | ( ( color & 0x20 ) << 5 ), color & 0x1f, 0 ); |
| 624 | 658 | } |
| 625 | 659 | |
| 660 | VIDEO_START( ldrun4 ) | |
| 661 | { | |
| 662 | m62_start( get_ldrun4_bg_tile_info, 1, 0, 8, 8, 64, 32 ); | |
| 663 | } | |
| 664 | ||
| 626 | 665 | VIDEO_UPDATE( ldrun4 ) |
| 627 | 666 | { |
| 628 | 667 | tilemap_set_scrollx( m62_background, 0, m62_background_hscroll ); |
| 629 | 668 | |
| 630 | tilemap_draw( bitmap, cliprect, m62_background, | |
| 669 | tilemap_draw( bitmap, cliprect, m62_background, 0 | |
| 631 | 670 | draw_sprites( screen->machine, bitmap, cliprect, 0x1f, 0x00, 0x00 ); |
| 632 | 671 | return 0; |
| 633 | 672 | } |
| 634 | 673 | |
| 635 | VIDEO_START( ldrun4 ) | |
| 636 | { | |
| 637 | m62_start( get_ldrun4_bg_tile_info, 1, 0, 8, 8, 64, 32 ); | |
| 638 | } | |
| 639 | 674 | |
| 640 | ||
| 641 | 675 | static TILE_GET_INFO( get_lotlot_bg_tile_info ) |
| 642 | 676 | { |
| 643 | 677 | int code; |
| r2454 | r2455 | |
| 662 | 696 | SET_TILE_INFO( 2, code | ( ( color & 0xc0 ) << 2 ), color & 0x1f, 0 ); |
| 663 | 697 | } |
| 664 | 698 | |
| 699 | VIDEO_START( lotlot ) | |
| 700 | { | |
| 701 | m62_start( get_lotlot_bg_tile_info, 1, 1, 12, 10, 32, 64 ); | |
| 702 | m62_textlayer( get_lotlot_fg_tile_info, 1, 1, 12, 10, 32, 64 ); | |
| 703 | } | |
| 704 | ||
| 665 | 705 | VIDEO_UPDATE( lotlot ) |
| 666 | 706 | { |
| 667 | 707 | tilemap_set_scrollx( m62_background, 0, m62_background_hscroll - 64 ); |
| r2454 | r2455 | |
| 670 | 710 | tilemap_set_scrolly( m62_foreground, 0, 32 ); |
| 671 | 711 | tilemap_set_transparent_pen( m62_foreground, 0 ); |
| 672 | 712 | |
| 673 | tilemap_draw( bitmap, cliprect, m62_background, | |
| 713 | tilemap_draw( bitmap, cliprect, m62_background, 0 | |
| 674 | 714 | tilemap_draw( bitmap, cliprect, m62_foreground, 0, 0 ); |
| 675 | 715 | draw_sprites( screen->machine, bitmap, cliprect, 0x1f, 0x00, 0x00 ); |
| 676 | 716 | return 0; |
| 677 | 717 | } |
| 678 | 718 | |
| 679 | VIDEO_START( lotlot ) | |
| 680 | { | |
| 681 | m62_start( get_lotlot_bg_tile_info, 1, 1, 12, 10, 32, 64 ); | |
| 682 | m62_textlayer( get_lotlot_fg_tile_info, 1, 1, 12, 10, 32, 64 ); | |
| 683 | } | |
| 684 | 719 | |
| 685 | ||
| 686 | 720 | WRITE8_HANDLER( kidniki_text_vscroll_low_w ) |
| 687 | 721 | { |
| 688 | 722 | kidniki_text_vscroll = (kidniki_text_vscroll & 0xff00) | data; |
| r2454 | r2455 | |
| 721 | 755 | SET_TILE_INFO( 2, code | ( ( color & 0xc0 ) << 2 ), color & 0x1f, 0 ); |
| 722 | 756 | } |
| 723 | 757 | |
| 724 | VIDEO_UPDATE( kidniki ) | |
| 725 | { | |
| 726 | tilemap_set_scrollx( m62_background, 0, m62_background_hscroll ); | |
| 727 | tilemap_set_scrollx( m62_foreground, 0, -64 ); | |
| 728 | tilemap_set_scrolly( m62_foreground, 0, kidniki_text_vscroll + 128 ); | |
| 729 | tilemap_set_transparent_pen( m62_foreground, 0 ); | |
| 730 | ||
| 731 | tilemap_draw( bitmap, cliprect, m62_background, TILEMAP_DRAW_LAYER1, 0 ); | |
| 732 | draw_sprites( screen->machine, bitmap, cliprect, 0x1f, 0x00, 0x00 ); | |
| 733 | tilemap_draw( bitmap, cliprect, m62_background, TILEMAP_DRAW_LAYER0, 0 ); | |
| 734 | tilemap_draw( bitmap, cliprect, m62_foreground, 0, 0 ); | |
| 735 | return 0; | |
| 736 | } | |
| 737 | ||
| 738 | 758 | VIDEO_START( kidniki ) |
| 739 | 759 | { |
| 740 | 760 | m62_background = tilemap_create( get_kidniki_bg_tile_info, tilemap_scan_rows, 8, 8, 64, 32 ); |
| r2454 | r2455 | |
| 750 | 770 | m62_textlayer( get_kidniki_fg_tile_info, 1, 1, 12, 8, 32, 64 ); |
| 751 | 771 | } |
| 752 | 772 | |
| 773 | VIDEO_UPDATE( kidniki ) | |
| 774 | { | |
| 775 | tilemap_set_scrollx( m62_background, 0, m62_background_hscroll ); | |
| 776 | tilemap_set_scrollx( m62_foreground, 0, -64 ); | |
| 777 | tilemap_set_scrolly( m62_foreground, 0, kidniki_text_vscroll + 128 ); | |
| 778 | tilemap_set_transparent_pen( m62_foreground, 0 ); | |
| 753 | 779 | |
| 780 | tilemap_draw( bitmap, cliprect, m62_background, TILEMAP_DRAW_LAYER1, 0 ); | |
| 781 | draw_sprites( screen->machine, bitmap, cliprect, 0x1f, 0x00, 0x00 ); | |
| 782 | tilemap_draw( bitmap, cliprect, m62_background, TILEMAP_DRAW_LAYER0, 0 ); | |
| 783 | tilemap_draw( bitmap, cliprect, m62_foreground, 0, 0 ); | |
| 784 | return 0; | |
| 785 | } | |
| 786 | ||
| 787 | ||
| 754 | 788 | WRITE8_HANDLER( spelunkr_palbank_w ) |
| 755 | 789 | { |
| 756 | 790 | if (spelunkr_palbank != (data & 0x01)) |
| r2454 | r2455 | |
| 780 | 814 | SET_TILE_INFO( 2, code | ( ( color & 0x10 ) << 4 ), ( color & 0x0f ) | ( spelunkr_palbank << 4 ), 0 ); |
| 781 | 815 | } |
| 782 | 816 | |
| 817 | VIDEO_START( spelunkr ) | |
| 818 | { | |
| 819 | m62_start( get_spelunkr_bg_tile_info, 1, 1, 8, 8, 64, 64 ); | |
| 820 | m62_textlayer( get_spelunkr_fg_tile_info, 1, 1, 12, 8, 32, 32 ); | |
| 821 | } | |
| 822 | ||
| 783 | 823 | VIDEO_UPDATE( spelunkr ) |
| 784 | 824 | { |
| 785 | 825 | tilemap_set_scrollx( m62_background, 0, m62_background_hscroll ); |
| r2454 | r2455 | |
| 788 | 828 | tilemap_set_scrolly( m62_foreground, 0, 0 ); |
| 789 | 829 | tilemap_set_transparent_pen( m62_foreground, 0 ); |
| 790 | 830 | |
| 791 | tilemap_draw( bitmap, cliprect, m62_background, | |
| 831 | tilemap_draw( bitmap, cliprect, m62_background, 0 | |
| 792 | 832 | draw_sprites( screen->machine, bitmap, cliprect, 0x1f, 0x00, 0x00 ); |
| 793 | 833 | tilemap_draw( bitmap, cliprect, m62_foreground, 0, 0 ); |
| 794 | 834 | return 0; |
| 795 | 835 | } |
| 796 | 836 | |
| 797 | VIDEO_START( spelunkr ) | |
| 798 | { | |
| 799 | m62_start( get_spelunkr_bg_tile_info, 1, 1, 8, 8, 64, 64 ); | |
| 800 | m62_textlayer( get_spelunkr_fg_tile_info, 1, 1, 12, 8, 32, 32 ); | |
| 801 | } | |
| 802 | 837 | |
| 803 | ||
| 804 | 838 | WRITE8_HANDLER( spelunk2_gfxport_w ) |
| 805 | 839 | { |
| 806 | 840 | m62_hscroll_high_w(machine,0,(data&2)>>1); |
| r2454 | r2455 | |
| 822 | 856 | SET_TILE_INFO( 0, code | ( ( color & 0xf0 ) << 4 ), ( color & 0x0f ) | ( spelunkr_palbank << 4 ), 0 ); |
| 823 | 857 | } |
| 824 | 858 | |
| 859 | VIDEO_START( spelunk2 ) | |
| 860 | { | |
| 861 | m62_start( get_spelunk2_bg_tile_info, 1, 1, 8, 8, 64, 64 ); | |
| 862 | m62_textlayer( get_spelunkr_fg_tile_info, 1, 1, 12, 8, 32, 32 ); | |
| 863 | } | |
| 864 | ||
| 825 | 865 | VIDEO_UPDATE( spelunk2 ) |
| 826 | 866 | { |
| 827 | 867 | tilemap_set_scrollx( m62_background, 0, m62_background_hscroll - 1); |
| r2454 | r2455 | |
| 830 | 870 | tilemap_set_scrolly( m62_foreground, 0, 0 ); |
| 831 | 871 | tilemap_set_transparent_pen( m62_foreground, 0 ); |
| 832 | 872 | |
| 833 | tilemap_draw( bitmap, cliprect, m62_background, | |
| 873 | tilemap_draw( bitmap, cliprect, m62_background, 0 | |
| 834 | 874 | draw_sprites( screen->machine, bitmap, cliprect, 0x1f, 0x00, 0x00 ); |
| 835 | 875 | tilemap_draw( bitmap, cliprect, m62_foreground, 0, 0 ); |
| 836 | 876 | return 0; |
| 837 | 877 | } |
| 838 | 878 | |
| 839 | VIDEO_START( spelunk2 ) | |
| 840 | { | |
| 841 | m62_start( get_spelunk2_bg_tile_info, 1, 1, 8, 8, 64, 64 ); | |
| 842 | m62_textlayer( get_spelunkr_fg_tile_info, 1, 1, 12, 8, 32, 32 ); | |
| 843 | } | |
| 844 | 879 | |
| 845 | ||
| 846 | 880 | static TILE_GET_INFO( get_youjyudn_bg_tile_info ) |
| 847 | 881 | { |
| 848 | 882 | int code; |
| r2454 | r2455 | |
| 869 | 903 | SET_TILE_INFO( 2, code | ( ( color & 0xc0 ) << 2 ), ( color & 0x0f ), 0 ); |
| 870 | 904 | } |
| 871 | 905 | |
| 906 | VIDEO_START( youjyudn ) | |
| 907 | { | |
| 908 | m62_start( get_youjyudn_bg_tile_info, 1, 0, 8, 16, 64, 16 ); | |
| 909 | m62_textlayer( get_youjyudn_fg_tile_info, 1, 1, 12, 8, 32, 32 ); | |
| 910 | tilemap_set_transmask(m62_background,0,0xffff,0x0000); /* split type 0 is totally transparent in front half */ | |
| 911 | tilemap_set_transmask(m62_background,1,0x0001,0xfffe); /* split type 1 has pen 0 transparent in front half */ | |
| 912 | } | |
| 913 | ||
| 872 | 914 | VIDEO_UPDATE( youjyudn ) |
| 873 | 915 | { |
| 874 | 916 | tilemap_set_scrollx( m62_background, 0, m62_background_hscroll ); |
| r2454 | r2455 | |
| 883 | 925 | return 0; |
| 884 | 926 | } |
| 885 | 927 | |
| 886 | VIDEO_START( youjyudn ) | |
| 887 | { | |
| 888 | m62_start( get_youjyudn_bg_tile_info, 1, 0, 8, 16, 64, 16 ); | |
| 889 | m62_textlayer( get_youjyudn_fg_tile_info, 1, 1, 12, 8, 32, 32 ); | |
| 890 | } | |
| 891 | 928 | |
| 892 | ||
| 893 | 929 | WRITE8_HANDLER( horizon_scrollram_w ) |
| 894 | 930 | { |
| 895 | 931 | horizon_scrollram[ offset ] = data; |
| r2454 | r2455 | |
| 912 | 948 | } |
| 913 | 949 | } |
| 914 | 950 | |
| 951 | VIDEO_START( horizon ) | |
| 952 | { | |
| 953 | m62_start( get_horizon_bg_tile_info, 32, 0, 8, 8, 64, 32 ); | |
| 954 | tilemap_set_transmask(m62_background,0,0xffff,0x0000); /* split type 0 is totally transparent in front half */ | |
| 955 | tilemap_set_transmask(m62_background,1,0x0001,0xfffe); /* split type 1 has pen 0 transparent in front half */ | |
| 956 | } | |
| 957 | ||
| 915 | 958 | VIDEO_UPDATE( horizon ) |
| 916 | 959 | { |
| 917 | 960 | int i; |
| r2454 | r2455 | |
| 924 | 967 | tilemap_draw( bitmap, cliprect, m62_background, TILEMAP_DRAW_LAYER0, 0 ); |
| 925 | 968 | return 0; |
| 926 | 969 | } |
| 927 | ||
| 928 | VIDEO_START( horizon ) | |
| 929 | { | |
| 930 | m62_start( get_horizon_bg_tile_info, 32, 0, 8, 8, 64, 32 ); | |
| 931 | } |
| r2454 | r2455 | |
|---|---|---|
| 38 | 38 | |
| 39 | 39 | VIDEO_EOF( toki ) |
| 40 | 40 | { |
| 41 | buffer_spriteram16_w(machine,0,0,0); | |
| 41 | buffer_spriteram16_w(machine,0,0,0xffff); | |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | VIDEO_EOF( tokib ) |
| 45 | 45 | { |
| 46 | buffer_spriteram16_w(machine,0,0,0); | |
| 46 | buffer_spriteram16_w(machine,0,0,0xffff); | |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | static TILE_GET_INFO( get_text_tile_info ) |
| r2454 | r2455 | |
|---|---|---|
| 58 | 58 | **************************************************************************/ |
| 59 | 59 | |
| 60 | 60 | #include "driver.h" |
| 61 | #include "deprecat.h" | |
| 62 | 61 | |
| 63 | 62 | /* Variables only used here */ |
| 64 | 63 | static tilemap *bg_tilemap, *fg_tilemap, *tx_tilemap; |
| r2454 | r2455 | |
| 182 | 181 | break; |
| 183 | 182 | case 7: |
| 184 | 183 | soundlatch_w(machine,0,data); |
| 185 | cpunum_set_input_line( | |
| 184 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, PULSE_LINE); | |
| 186 | 185 | break; |
| 187 | 186 | default: |
| 188 | 187 | logerror("CPU #0 PC %06X : Warning, videoreg %04X <- %04X\n",activecpu_get_pc(),offset,data); |
| r2454 | r2455 | |
|---|---|---|
| 4 | 4 | */ |
| 5 | 5 | |
| 6 | 6 | #include "driver.h" |
| 7 | #include "de | |
| 7 | #include "video/resnet.h" | |
| 8 | 8 | |
| 9 | 9 | static tilemap *popper_p123_tilemap, *popper_p0_tilemap, *popper_ol_p123_tilemap, *popper_ol_p0_tilemap; |
| 10 | 10 | UINT8 *popper_videoram, *popper_attribram, *popper_ol_videoram, *popper_ol_attribram, *popper_spriteram; |
| r2454 | r2455 | |
| 12 | 12 | static INT32 popper_flipscreen, popper_e002, popper_gfx_bank; |
| 13 | 13 | static rectangle tilemap_clip; |
| 14 | 14 | |
| 15 | PALETTE_INIT( popper ) | |
| 15 | ||
| 16 | /*************************************************************************** | |
| 17 | * | |
| 18 | * Color guns - from schematics | |
| 19 | * | |
| 20 | ***************************************************************************/ | |
| 21 | ||
| 22 | static const res_net_decode_info popper_decode_info = | |
| 16 | 23 | { |
| 17 | int i; | |
| 24 | 1, // there may be two proms needed to construct color | |
| 25 | 0, // start at 0 | |
| 26 | 63, // end at 255 | |
| 27 | // R, G, B, | |
| 28 | { 0, 0, 0, }, // offsets | |
| 29 | { 0, 3, 6, }, // shifts | |
| 30 | {0x07,0x07,0x03, } // masks | |
| 31 | }; | |
| 18 | 32 | |
| 19 | for (i = 0;i < machine->config->total_colors; i++) | |
| 33 | static const res_net_info popper_net_info = | |
| 34 | { | |
| 35 | RES_NET_VCC_5V | RES_NET_VBIAS_5V | RES_NET_VIN_TTL_OUT, | |
| 20 | 36 | { |
| 21 | int bit0,bit1,bit2,r,g,b; | |
| 37 | { RES_NET_AMP_NONE, 0, 0, 3, { 1000, 470, 220 } }, | |
| 38 | { RES_NET_AMP_NONE, 0, 0, 3, { 1000, 470, 220 } }, | |
| 39 | { RES_NET_AMP_NONE, 0, 0, 2, { 470, 220, 0 } } | |
| 40 | } | |
| 41 | }; | |
| 22 | 42 | |
| 23 | /* red component */ | |
| 24 | bit0 = (*color_prom >> 0) & 0x01; | |
| 25 | bit1 = (*color_prom >> 1) & 0x01; | |
| 26 | bit2 = (*color_prom >> 2) & 0x01; | |
| 27 | r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 28 | /* green component */ | |
| 29 | bit0 = (*color_prom >> 3) & 0x01; | |
| 30 | bit1 = (*color_prom >> 4) & 0x01; | |
| 31 | bit2 = (*color_prom >> 5) & 0x01; | |
| 32 | g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 33 | /* blue component */ | |
| 34 | bit1 = (*color_prom >> 6) & 0x01; | |
| 35 | bit2 = (*color_prom >> 7) & 0x01; | |
| 36 | b = 0x97 * bit1 + 0x68 * bit2; | |
| 37 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 38 | color_prom++; | |
| 39 | } | |
| 43 | /*************************************************************************** | |
| 44 | * | |
| 45 | * PALETTE_INIT | |
| 46 | * | |
| 47 | ***************************************************************************/ | |
| 48 | ||
| 49 | PALETTE_INIT( popper ) | |
| 50 | { | |
| 51 | rgb_t *rgb; | |
| 52 | ||
| 53 | rgb = compute_res_net_all(color_prom, &popper_decode_info, &popper_net_info); | |
| 54 | palette_set_colors(machine, 0, rgb, 64); | |
| 55 | palette_normalize_range(machine->palette, 0, 63, 0, 255); | |
| 56 | free(rgb); | |
| 40 | 57 | } |
| 41 | 58 | |
| 42 | 59 | WRITE8_HANDLER( popper_ol_videoram_w ) |
| r2454 | r2455 | |
|---|---|---|
| 4 | 4 | * video hardware for DJ Boy |
| 5 | 5 | */ |
| 6 | 6 | #include "driver.h" |
| 7 | #include "deprecat.h" | |
| 8 | 7 | #include "kan_pand.h" |
| 9 | 8 | |
| 10 | 9 | static UINT8 djboy_videoreg, djboy_scrollx, djboy_scrolly; |
| r2454 | r2455 | |
| 57 | 56 | offset &= ~1; |
| 58 | 57 | val = (paletteram[offset]<<8) | paletteram[offset+1]; |
| 59 | 58 | |
| 60 | palette_set_color_rgb( | |
| 59 | palette_set_color_rgb(machine,offset/2,pal4bit(val >> 8),pal4bit(val >> 4),pal4bit(val >> 0)); | |
| 61 | 60 | } |
| 62 | 61 | |
| 63 | 62 | VIDEO_UPDATE( djboy ) |
| r2454 | r2455 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "deprecat.h" | |
| 11 | 10 | |
| 12 | 11 | extern int sidearms_gameid; |
| 13 | 12 | |
| r2454 | r2455 | |
| 53 | 52 | /* bit 4 resets the sound CPU */ |
| 54 | 53 | if (data & 0x10) |
| 55 | 54 | { |
| 56 | cpunum_set_input_line( | |
| 55 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, PULSE_LINE); | |
| 57 | 56 | } |
| 58 | 57 | |
| 59 | 58 | /* bit 5 enables starfield */ |
| r2454 | r2455 | |
|---|---|---|
| 15 | 15 | ***************************************************************************/ |
| 16 | 16 | |
| 17 | 17 | #include "driver.h" |
| 18 | #include "deprecat.h" | |
| 19 | 18 | |
| 20 | 19 | |
| 21 | 20 | static const rectangle bottomvisiblearea = |
| r2454 | r2455 | |
| 110 | 109 | g = (paletteram[bank + offset + 0x100] << 3) & 0xFF; |
| 111 | 110 | b = (paletteram[bank + offset + 0x200] << 3) & 0xFF; |
| 112 | 111 | |
| 113 | palette_set_color( | |
| 112 | palette_set_color(machine, (bank >> 2) + offset,MAKE_RGB(r,g,b)); | |
| 114 | 113 | } |
| 115 | 114 | |
| 116 | 115 |
| r2454 | r2455 | |
|---|---|---|
| 51 | 51 | g = ((paletteram[offset + 1] & 0xf0) >> 4); |
| 52 | 52 | b = ((paletteram[offset + 1] & 0x0f) >> 0); |
| 53 | 53 | |
| 54 | palette_set_color_rgb( | |
| 54 | palette_set_color_rgb(machine, (offset >> 1), pal4bit(r), pal4bit(g), pal4bit(b)); | |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | WRITE8_HANDLER( nbmj8991_palette_type2_w ) |
| r2454 | r2455 | |
| 68 | 68 | g = (((paletteram[offset + 0] & 0x03) << 3) | ((paletteram[offset + 1] & 0xe0) >> 5)); |
| 69 | 69 | b = ((paletteram[offset + 1] & 0x1f) >> 0); |
| 70 | 70 | |
| 71 | palette_set_color_rgb( | |
| 71 | palette_set_color_rgb(machine, (offset / 2), pal5bit(r), pal5bit(g), pal5bit(b)); | |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | WRITE8_HANDLER( nbmj8991_palette_type3_w ) |
| r2454 | r2455 | |
| 85 | 85 | g = ((paletteram[offset + 0] & 0xf0) >> 4); |
| 86 | 86 | b = ((paletteram[offset + 0] & 0x0f) >> 0); |
| 87 | 87 | |
| 88 | palette_set_color_rgb( | |
| 88 | palette_set_color_rgb(machine, (offset >> 1), pal4bit(r), pal4bit(g), pal4bit(b)); | |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | /****************************************************************************** |
| r2454 | r2455 | |
|---|---|---|
| 138 | 138 | word = (local_paletteram[offset] << 8) + local_paletteram[offset + 1]; |
| 139 | 139 | |
| 140 | 140 | /* extract the 5-5-5 RGB colors */ |
| 141 | palette_set_color_rgb( | |
| 141 | palette_set_color_rgb(machine, offset / 2, pal5bit(word >> 10), pal5bit(word >> 5), pal5bit(word >> 0)); | |
| 142 | 142 | } |
| 143 | 143 | } |
| 144 | 144 | |
| r2454 | r2455 | |
| 221 | 221 | { |
| 222 | 222 | /* extract a word and the 5-5-5 RGB components */ |
| 223 | 223 | int word = (local_paletteram[offset] << 8) + local_paletteram[offset + 1]; |
| 224 | palette_set_color_rgb( | |
| 224 | palette_set_color_rgb(machine, i, pal5bit(word >> 10), pal5bit(word >> 5), pal5bit(word >> 0)); | |
| 225 | 225 | } |
| 226 | 226 | } |
| 227 | 227 | } |
| r2454 | r2455 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | ****************************************************************************/ |
| 6 | 6 | #include "driver.h" |
| 7 | #include "deprecat.h" | |
| 8 | 7 | #include "profiler.h" |
| 9 | 8 | #include "render.h" |
| 10 | 9 | #include "cpu/i86/i86.h" |
| r2454 | r2455 | |
| 1577 | 1576 | } |
| 1578 | 1577 | case 0xe0: |
| 1579 | 1578 | { |
| 1580 | cpunum_set_input_line( | |
| 1579 | cpunum_set_input_line(machine, 1, INPUT_LINE_TEST, CLEAR_LINE); | |
| 1581 | 1580 | vregs.flags = data; |
| 1582 | 1581 | break; |
| 1583 | 1582 | } |
| r2454 | r2455 | |
|---|---|---|
| 99 | 99 | static TIMER_CALLBACK( irq_off ) |
| 100 | 100 | { |
| 101 | 101 | /* clear the interrupt */ |
| 102 | atarigen_scanline_int_ack_w(machine, 0, 0, 0); | |
| 102 | atarigen_scanline_int_ack_w(machine, 0, 0, 0xffff); | |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 |
| r2454 | r2455 | |
|---|---|---|
| 51 | 51 | |
| 52 | 52 | offset=offset%0xc000; |
| 53 | 53 | |
| 54 | decodechar( | |
| 54 | decodechar(machine->gfx[1],offset/0x10,(UINT8 *)roundup5_vram); | |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | |
| r2454 | r2455 | |
| 83 | 83 | |
| 84 | 84 | offset&=~1; |
| 85 | 85 | word = ((paletteram16[offset] & 0xff)<<8) | (paletteram16[offset+1] & 0xff); |
| 86 | palette_set_color_rgb( | |
| 86 | palette_set_color_rgb(machine,offset/2,pal5bit(word >> 10),pal5bit(word >> 5),pal5bit(word >> 0)); | |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | |
| r2454 | r2455 | |
| 113 | 113 | // logerror("PAL: %04x %02x\n",offset,data); |
| 114 | 114 | |
| 115 | 115 | data = paletteram16[offset]; |
| 116 | palette_set_color_rgb( | |
| 116 | palette_set_color_rgb(machine,offset,pal5bit(data >> 10),pal5bit(data >> 5),pal5bit(data >> 0)); | |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 |
| r2454 | r2455 | |
|---|---|---|
| 5878 | 5878 | |
| 5879 | 5879 | READ16_HANDLER( K056832_5bpp_rom_word_r ) |
| 5880 | 5880 | { |
| 5881 | if (mem_mask == 0x | |
| 5881 | if (mem_mask == 0x | |
| 5882 | 5882 | { |
| 5883 | 5883 | return K056832_rom_read_b(offset*2, 4, 5, 0)<<8; |
| 5884 | 5884 | } |
| 5885 | else if (mem_mask == 0x | |
| 5885 | else if (mem_mask == 0x | |
| 5886 | 5886 | { |
| 5887 | 5887 | return K056832_rom_read_b(offset*2+1, 4, 5, 0)<<16; |
| 5888 | 5888 | } |
| r2454 | r2455 | |
| 5895 | 5895 | |
| 5896 | 5896 | READ32_HANDLER( K056832_5bpp_rom_long_r ) |
| 5897 | 5897 | { |
| 5898 | if (mem_mask == 0x | |
| 5898 | if (mem_mask == 0x | |
| 5899 | 5899 | { |
| 5900 | 5900 | return K056832_rom_read_b(offset*4, 4, 5, 0)<<24; |
| 5901 | 5901 | } |
| 5902 | else if (mem_mask == 0x | |
| 5902 | else if (mem_mask == 0x | |
| 5903 | 5903 | { |
| 5904 | 5904 | return K056832_rom_read_b(offset*4+1, 4, 5, 0)<<16; |
| 5905 | 5905 | } |
| 5906 | else if (mem_mask == 0x | |
| 5906 | else if (mem_mask == 0x | |
| 5907 | 5907 | { |
| 5908 | 5908 | return K056832_rom_read_b(offset*4+2, 4, 5, 0)<<8; |
| 5909 | 5909 | } |
| 5910 | else if (mem_mask == 0x | |
| 5910 | else if (mem_mask == 0x | |
| 5911 | 5911 | { |
| 5912 | 5912 | return K056832_rom_read_b(offset*4+3, 4, 5, 1); |
| 5913 | 5913 | } |
| r2454 | r2455 | |
| 5920 | 5920 | |
| 5921 | 5921 | READ32_HANDLER( K056832_6bpp_rom_long_r ) |
| 5922 | 5922 | { |
| 5923 | if (mem_mask == 0x | |
| 5923 | if (mem_mask == 0x | |
| 5924 | 5924 | { |
| 5925 | 5925 | return K056832_rom_read_b(offset*4, 4, 6, 0)<<24; |
| 5926 | 5926 | } |
| 5927 | else if (mem_mask == 0x | |
| 5927 | else if (mem_mask == 0x | |
| 5928 | 5928 | { |
| 5929 | 5929 | return K056832_rom_read_b(offset*4+1, 4, 6, 0)<<16; |
| 5930 | 5930 | } |
| 5931 | else if (mem_mask == 0x | |
| 5931 | else if (mem_mask == 0x | |
| 5932 | 5932 | { |
| 5933 | 5933 | return K056832_rom_read_b(offset*4+2, 4, 6, 0)<<8; |
| 5934 | 5934 | } |
| 5935 | else if (mem_mask == 0x | |
| 5935 | else if (mem_mask == 0x | |
| 5936 | 5936 | { |
| 5937 | 5937 | return K056832_rom_read_b(offset*4+3, 4, 6, 0); |
| 5938 | 5938 | } |
| r2454 | r2455 | |
| 6206 | 6206 | UINT16 old_mask, old_data; |
| 6207 | 6207 | |
| 6208 | 6208 | tile_ptr = &K056832_videoram[K056832_SelectedPagex4096+offset]; |
| 6209 | old_mask = mem_mask; | |
| 6210 | mem_mask = ~mem_mask; | |
| 6209 | old_mask = ~mem_mask; | |
| 6211 | 6210 | old_data = *tile_ptr; |
| 6212 | 6211 | data = (data & mem_mask) | (old_data & old_mask); |
| 6213 | 6212 | |
| r2454 | r2455 | |
| 6248 | 6247 | UINT32 old_mask, old_data; |
| 6249 | 6248 | |
| 6250 | 6249 | tile_ptr = &K056832_videoram[K056832_SelectedPagex4096+offset*2]; |
| 6251 | old_mask = mem_mask; | |
| 6252 | mem_mask = ~mem_mask; | |
| 6250 | old_mask = ~mem_mask; | |
| 6253 | 6251 | old_data = (UINT32)tile_ptr[0]<<16 | (UINT32)tile_ptr[1]; |
| 6254 | 6252 | data = (data & mem_mask) | (old_data & old_mask); |
| 6255 | 6253 | |
| r2454 | r2455 | |
| 6402 | 6400 | { |
| 6403 | 6401 | if (offset & 1) |
| 6404 | 6402 | { |
| 6405 | K056832_word_w(machine, (offset>>1), data, 0x | |
| 6403 | K056832_word_w(machine, (offset>>1), data, 0x | |
| 6406 | 6404 | } |
| 6407 | 6405 | else |
| 6408 | 6406 | { |
| 6409 | K056832_word_w(machine, (offset>>1), data<<8, 0x | |
| 6407 | K056832_word_w(machine, (offset>>1), data<<8, 0x | |
| 6410 | 6408 | } |
| 6411 | 6409 | } |
| 6412 | 6410 | |
| r2454 | r2455 | |
| 6414 | 6412 | { |
| 6415 | 6413 | if (offset & 1) |
| 6416 | 6414 | { |
| 6417 | K056832_b_word_w(machine, (offset>>1), data, 0x | |
| 6415 | K056832_b_word_w(machine, (offset>>1), data, 0x | |
| 6418 | 6416 | } |
| 6419 | 6417 | else |
| 6420 | 6418 | { |
| 6421 | K056832_b_word_w(machine, (offset>>1), data<<8, 0x | |
| 6419 | K056832_b_word_w(machine, (offset>>1), data<<8, 0x | |
| 6422 | 6420 | } |
| 6423 | 6421 | } |
| 6424 | 6422 | |
| r2454 | r2455 | |
| 6439 | 6437 | #define LINE_WIDTH 512 |
| 6440 | 6438 | |
| 6441 | 6439 | #define DRAW_PIX(N) \ |
| 6442 | if ((pen = src_ptr[N])) \ | |
| 6440 | pen = src_ptr[N]; \ | |
| 6441 | if (pen) \ | |
| 6443 | 6442 | { pen += basepen; xpr_ptr[count+N] = TILEMAP_PIXEL_LAYER0; dst_ptr[count+N] = pen; } else \ |
| 6444 | 6443 | { xpr_ptr[count+N] = 0; } |
| 6445 | 6444 | |
| r2454 | r2455 | |
| 6580 | 6579 | cmaxy = cliprect->max_y; |
| 6581 | 6580 | |
| 6582 | 6581 | // flip correction registers |
| 6583 | if ((flipy = K056832_regs[0] & 0x20)) | |
| 6582 | flipy = K056832_regs[0] & 0x20; | |
| 6583 | if (flipy) | |
| 6584 | 6584 | { |
| 6585 | 6585 | corr = K056832_regs[0x3c/2]; |
| 6586 | 6586 | if (corr & 0x400) |
| r2454 | r2455 | |
| 6589 | 6589 | dy += corr; |
| 6590 | 6590 | ay = (unsigned)(dy - K056832_LayerOffset[layer][1]) % height; |
| 6591 | 6591 | |
| 6592 | if ((flipx = K056832_regs[0] & 0x10)) | |
| 6592 | flipx = K056832_regs[0] & 0x10; | |
| 6593 | if (flipx) | |
| 6593 | 6594 | { |
| 6594 | 6595 | corr = K056832_regs[0x3a/2]; |
| 6595 | 6596 | if (corr & 0x800) |
| r2454 | r2455 | |
| 6857 | 6858 | cmaxy = cliprect->max_y; |
| 6858 | 6859 | |
| 6859 | 6860 | // flip correction registers |
| 6860 | if ((flipy = K056832_regs[0] & 0x20)) | |
| 6861 | flipy = K056832_regs[0] & 0x20; | |
| 6862 | if (flipy) | |
| 6861 | 6863 | { |
| 6862 | 6864 | corr = K056832_regs[0x3c/2]; |
| 6863 | 6865 | if (corr & 0x400) |
| r2454 | r2455 | |
| 6866 | 6868 | dy += corr; |
| 6867 | 6869 | ay = (unsigned)(dy - K056832_LayerOffset[layer][1]) % height; |
| 6868 | 6870 | |
| 6869 | if ((flipx = K056832_regs[0] & 0x10)) | |
| 6871 | flipx = K056832_regs[0] & 0x10; | |
| 6872 | if (flipx) | |
| 6870 | 6873 | { |
| 6871 | 6874 | corr = K056832_regs[0x3a/2]; |
| 6872 | 6875 | if (corr & 0x800) |
| r2454 | r2455 | |
| 7194 | 7197 | |
| 7195 | 7198 | WRITE16_HANDLER( K055555_word_w ) |
| 7196 | 7199 | { |
| 7197 | if (mem_mask == 0x | |
| 7200 | if (mem_mask == 0x | |
| 7198 | 7201 | { |
| 7199 | 7202 | K055555_write_reg(offset, data&0xff); |
| 7200 | 7203 | } |
| r2454 | r2455 | |
|---|---|---|
| 29 | 29 | ***************************************************************************/ |
| 30 | 30 | |
| 31 | 31 | #include "driver.h" |
| 32 | #include "deprecat.h" | |
| 33 | 32 | |
| 34 | 33 | /* Variables needed by driver: */ |
| 35 | 34 | |
| r2454 | r2455 | |
| 50 | 49 | WRITE16_HANDLER( blmbycar_palette_w ) |
| 51 | 50 | { |
| 52 | 51 | data = COMBINE_DATA(&paletteram16[offset]); |
| 53 | palette_set_color_rgb( | |
| 52 | palette_set_color_rgb( machine, offset, pal4bit(data >> 4), pal4bit(data >> 0), pal4bit(data >> 8)); | |
| 54 | 53 | } |
| 55 | 54 | |
| 56 | 55 |
| r2454 | r2455 | |
|---|---|---|
| 286 | 286 | break; |
| 287 | 287 | |
| 288 | 288 | case 0x04: |
| 289 | if ( | |
| 289 | if (machine->config->total_colors >= 256 * 8) | |
| 290 | 290 | update_palette_bank((gfx_palettebank & ~4) | (val << 2)); |
| 291 | 291 | break; |
| 292 | 292 |
| r2454 | r2455 | |
|---|---|---|
| 353 | 353 | |
| 354 | 354 | /* bit 4 resets sound CPU (active low) */ |
| 355 | 355 | if (data & 0x10) |
| 356 | cpunum_set_input_line( | |
| 356 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, CLEAR_LINE); | |
| 357 | 357 | else |
| 358 | cpunum_set_input_line( | |
| 358 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, ASSERT_LINE); | |
| 359 | 359 | |
| 360 | 360 | /* bit 5 = "bank"? */ |
| 361 | 361 | } |
| r2454 | r2455 | |
|---|---|---|
| 13 | 13 | ***************************************************************************/ |
| 14 | 14 | |
| 15 | 15 | #include "driver.h" |
| 16 | #include "deprecat.h" | |
| 17 | 16 | |
| 18 | 17 | static int sprite_flip, pow_charbase=0; //* |
| 19 | 18 | static tilemap *fix_tilemap; |
| r2454 | r2455 | |
| 127 | 126 | g = ((newword >> 3) & 0x1e) | ((newword >> 13) & 0x01) ; |
| 128 | 127 | b = ((newword << 1) & 0x1e) | ((newword >> 12) & 0x01) ; |
| 129 | 128 | |
| 130 | palette_set_color_rgb( | |
| 129 | palette_set_color_rgb(machine,offset,pal5bit(r),pal5bit(g),pal5bit(b)); | |
| 131 | 130 | } |
| 132 | 131 | |
| 133 | 132 | WRITE16_HANDLER( pow_video16_w ) |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "mcr.h" |
| 10 | 9 | |
| 11 | 10 | |
| r2454 | r2455 | |
| 134 | 133 | |
| 135 | 134 | COMBINE_DATA(&paletteram16[offset]); |
| 136 | 135 | newword = paletteram16[offset]; |
| 137 | palette_set_color_rgb( | |
| 136 | palette_set_color_rgb(machine, offset, pal3bit(newword >> 6), pal3bit(newword >> 0), pal3bit(newword >> 3)); | |
| 138 | 137 | } |
| 139 | 138 | |
| 140 | 139 | |
| r2454 | r2455 | |
| 144 | 143 | |
| 145 | 144 | COMBINE_DATA(&paletteram16[offset]); |
| 146 | 145 | newword = paletteram16[offset]; |
| 147 | palette_set_color_rgb( | |
| 146 | palette_set_color_rgb(machine, offset, pal5bit(~newword >> 10), pal5bit(~newword >> 0), pal5bit(~newword >> 5)); | |
| 148 | 147 | } |
| 149 | 148 | |
| 150 | 149 |
| r2454 | r2455 | |
|---|---|---|
| 46 | 46 | * Joker Card (Ver.A267BC, encrypted), Vesely Svet, 1993. |
| 47 | 47 | * Mongolfier New (italian), bootleg, 199?. |
| 48 | 48 | * Soccer New (italian), bootleg, 199?. |
| 49 | * Snooker 10 (Ver 1.11), Sandii', 1998. | |
| 50 | 49 | * Saloon (french, encrypted), unknown, 199?. |
| 51 | 50 | |
| 52 | 51 | |
| r2454 | r2455 | |
| 157 | 156 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 4, 8, 112, 34); |
| 158 | 157 | } |
| 159 | 158 | |
| 160 | VIDEO_START(snookr10) | |
| 161 | { | |
| 162 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 4, 8, 128, 32); | |
| 163 | } | |
| 164 | ||
| 165 | 159 | VIDEO_UPDATE(funworld) |
| 166 | 160 | { |
| 167 | 161 | tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0); |
| r2454 | r2455 | |
|---|---|---|
| 41 | 41 | cpk_palette2[offset] = data; |
| 42 | 42 | |
| 43 | 43 | newword = cpk_palette[offset] + 256 * cpk_palette2[offset]; |
| 44 | palette_set_color_rgb( | |
| 44 | palette_set_color_rgb(machine,offset,pal5bit(newword >> 0),pal5bit(newword >> 5),pal5bit(newword >> 10)); | |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | /* Video handling */ |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ****************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | |
| 10 | 9 | |
| 11 | 10 | static tilemap *bg_tilemap; |
| r2454 | r2455 | |
| 34 | 33 | 0x47 * ((~data >> 0) & 1) + |
| 35 | 34 | 0x97 * ((~data >> 1) & 1); |
| 36 | 35 | |
| 37 | palette_set_color( | |
| 36 | palette_set_color(machine, offset, MAKE_RGB(R, G, B)); | |
| 38 | 37 | } |
| 39 | 38 | |
| 40 | 39 |
| r2454 | r2455 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | #include "deprecat.h" | |
| 3 | 2 | #include "video/taitoic.h" |
| 4 | 3 | |
| 5 | 4 | #define TC0100SCN_GFX_NUM 1 |
| r2454 | r2455 | |
| 831 | 830 | if (ACCESSING_BITS_0_7) |
| 832 | 831 | { |
| 833 | 832 | /* bit 0 = reset sub CPU */ |
| 834 | cpunum_set_input_line( | |
| 833 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE); | |
| 835 | 834 | |
| 836 | 835 | /* bits 1-3 n.c. */ |
| 837 | 836 |
| r2454 | r2455 | |
|---|---|---|
| 10 | 10 | extern int pc10_game_mode; |
| 11 | 11 | extern int pc10_dispmask_old; |
| 12 | 12 | |
| 13 | /* from romload.c */ | |
| 14 | extern int system_bios; | |
| 13 | static int pc10_bios; | |
| 15 | 14 | |
| 16 | 15 | static tilemap *bg_tilemap; |
| 17 | 16 | |
| r2454 | r2455 | |
| 98 | 97 | |
| 99 | 98 | VIDEO_START( playch10 ) |
| 100 | 99 | { |
| 100 | const UINT8 *bios = memory_region(REGION_CPU1); | |
| 101 | pc10_bios = (bios[3] == 0x2a) ? 1 : 2; | |
| 102 | ||
| 101 | 103 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, |
| 102 | 104 | 8, 8, 32, 32); |
| 103 | 105 | |
| r2454 | r2455 | |
| 113 | 115 | VIDEO_UPDATE( playch10 ) |
| 114 | 116 | { |
| 115 | 117 | /* Dual monitor version */ |
| 116 | if( | |
| 118 | if (pc10 | |
| 117 | 119 | { |
| 118 | 120 | const device_config *top_screen = device_list_find_by_tag(screen->machine->config->devicelist, VIDEO_SCREEN, "top"); |
| 119 | 121 |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "lockon.h" |
| 10 | 9 | #include "video/resnet.h" |
| 11 | 10 | #include "cpu/nec/nec.h" |
| r2454 | r2455 | |
| 170 | 169 | b = compute_res_net( (p1 & 0x1f), 2, &lockon_pd_net_info ); |
| 171 | 170 | } |
| 172 | 171 | |
| 173 | palette_set_color( | |
| 172 | palette_set_color(machine, i, MAKE_RGB(r, g, b)); | |
| 174 | 173 | } |
| 175 | 174 | } |
| 176 | 175 | |
| r2454 | r2455 | |
| 330 | 329 | |
| 331 | 330 | static TIMER_CALLBACK( bufend_callback ) |
| 332 | 331 | { |
| 333 | cpunum_set_input_line_and_vector(Machine, GROUND_CPU, 0, HOLD_LINE, 0xff); | |
| 334 | cpunum_set_input_line(Machine, OBJECT_CPU, NEC_INPUT_LINE_POLL, ASSERT_LINE); | |
| 332 | cpunum_set_input_line_and_vector(machine, GROUND_CPU, 0, HOLD_LINE, 0xff); | |
| 333 | cpunum_set_input_line(machine, OBJECT_CPU, NEC_INPUT_LINE_POLL, ASSERT_LINE); | |
| 335 | 334 | } |
| 336 | 335 | |
| 337 | 336 | /* Get data for a each 8x8x3 ground tile */ |
| r2454 | r2455 | |
| 659 | 658 | |
| 660 | 659 | READ16_HANDLER( lockon_obj_4000_r ) |
| 661 | 660 | { |
| 662 | cpunum_set_input_line( | |
| 661 | cpunum_set_input_line(machine, OBJECT_CPU, NEC_INPUT_LINE_POLL, CLEAR_LINE); | |
| 663 | 662 | return 0xffff; |
| 664 | 663 | } |
| 665 | 664 | |
| r2454 | r2455 | |
| 695 | 694 | { |
| 696 | 695 | rgb_t color; |
| 697 | 696 | |
| 698 | color = palette_get_color(Machine, 0x300 + (data & 0xff)); | |
| 699 | palette_set_color(Machine, 0x400 + offset, color); | |
| 697 | color = palette_get_color(machine, 0x300 + (data & 0xff)); | |
| 698 | palette_set_color(machine, 0x400 + offset, color); | |
| 700 | 699 | } |
| 701 | 700 | |
| 702 | 701 | /* Rotation control register */ |
| r2454 | r2455 | |
|---|---|---|
| 129 | 129 | |
| 130 | 130 | PC090OJ_draw_sprites(screen->machine,bitmap,cliprect,1); |
| 131 | 131 | |
| 132 | // if (input_port_ | |
| 132 | // if (input_port_ | |
| 133 | 133 | |
| 134 | // popmessage("%d %d",input_port_ | |
| 134 | // popmessage("%d %d",input_port_ | |
| 135 | 135 | |
| 136 | 136 | return 0; |
| 137 | 137 | } |
| r2454 | r2455 | |
|---|---|---|
| 166 | 166 | |
| 167 | 167 | VIDEO_EOF( tigeroad ) |
| 168 | 168 | { |
| 169 | buffer_spriteram16_w(machine,0,0,0); | |
| 169 | buffer_spriteram16_w(machine,0,0,0xffff); | |
| 170 | 170 | } |
| r2454 | r2455 | |
|---|---|---|
| 1145 | 1145 | |
| 1146 | 1146 | VIDEO_EOF( psikyosh ) |
| 1147 | 1147 | { |
| 1148 | buffer_spriteram32_w(machine,0,0,0); | |
| 1148 | buffer_spriteram32_w(machine,0,0,0xffffffff); | |
| 1149 | 1149 | } |
| 1150 | 1150 | |
| 1151 | 1151 | /*popmessage ("Regs %08x %08x %08x\n %08x %08x %08x", |
| r2454 | r2455 | |
|---|---|---|
| 10 | 10 | ******************************************************************************/ |
| 11 | 11 | |
| 12 | 12 | #include "driver.h" |
| 13 | #include "deprecat.h" | |
| 14 | 13 | |
| 15 | 14 | static UINT8 *quizdna_bg_ram; |
| 16 | 15 | static UINT8 *quizdna_fg_ram; |
| r2454 | r2455 | |
| 133 | 132 | g = ((d0 >> 3) & 0x1e) | ((d1 >> 5) & 1); |
| 134 | 133 | b = ((d0 << 1) & 0x1e) | ((d1 >> 6) & 1); |
| 135 | 134 | |
| 136 | palette_set_color_rgb( | |
| 135 | palette_set_color_rgb(machine,offs/2,pal5bit(r),pal5bit(g),pal5bit(b)); | |
| 137 | 136 | } |
| 138 | 137 | |
| 139 | 138 | static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect) |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ***********************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "machine/decocass.h" |
| 10 | 9 | |
| 11 | 10 | static INT32 watchdog_count; |
| r2454 | r2455 | |
| 209 | 208 | * (ME/ input on 1st paletteram, inverter -> ME/ on 2nd) |
| 210 | 209 | */ |
| 211 | 210 | offset = (offset & 31) ^ 16; |
| 212 | colortable_palette_set_color( | |
| 211 | colortable_palette_set_color(machine->colortable, offset, MAKE_RGB(pal3bit(~data >> 0), pal3bit(~data >> 3), pal2bit(~data >> 6))); | |
| 213 | 212 | } |
| 214 | 213 | |
| 215 | 214 | WRITE8_HANDLER( decocass_charram_w ) |
| r2454 | r2455 | |
| 608 | 607 | int scrollx, scrolly_l, scrolly_r; |
| 609 | 608 | rectangle clip; |
| 610 | 609 | |
| 611 | if (0xc0 != (input_port_ | |
| 610 | if (0xc0 != (input_port_ | |
| 612 | 611 | cpunum_set_input_line(screen->machine, 0, INPUT_LINE_NMI, ASSERT_LINE); |
| 613 | 612 | |
| 614 | 613 | if (0 == (watchdog_flip & 0x04)) |
| r2454 | r2455 | |
|---|---|---|
| 8 | 8 | ******************************************************************************/ |
| 9 | 9 | |
| 10 | 10 | #include "driver.h" |
| 11 | #include "deprecat.h" | |
| 12 | 11 | #include "fromance.h" |
| 13 | 12 | |
| 14 | 13 | |
| r2454 | r2455 | |
| 212 | 211 | |
| 213 | 212 | /* compute R,G,B */ |
| 214 | 213 | palword = (local_paletteram[offset | 1] << 8) | local_paletteram[offset & ~1]; |
| 215 | palette_set_color_rgb( | |
| 214 | palette_set_color_rgb(machine, offset / 2, pal5bit(palword >> 10), pal5bit(palword >> 5), pal5bit(palword >> 0)); | |
| 216 | 215 | } |
| 217 | 216 | |
| 218 | 217 |
| r2454 | r2455 | |
|---|---|---|
| 76 | 76 | g = 12 * bits * intensity; |
| 77 | 77 | bits = (color >> 7) & 0x03; |
| 78 | 78 | r = 12 * bits * intensity; |
| 79 | palette_set_color( | |
| 79 | palette_set_color(machine,(offset >> 1) & 0x3F,MAKE_RGB(r,g,b)); | |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 |
| r2454 | r2455 | |
|---|---|---|
| 807 | 807 | UINT16 ret; |
| 808 | 808 | |
| 809 | 809 | /* accessing the LSB only is not mapped */ |
| 810 | if (mem_mask == 0xff00) | |
| 811 | ret = neogeo_unmapped_r(machine, 0, 0) & 0x00ff; | |
| 810 | if (mem_mask == 0x00ff) | |
| 811 | ret = neogeo_unmapped_r(machine, 0, 0xffff) & 0x00ff; | |
| 812 | 812 | else |
| 813 | 813 | { |
| 814 | 814 | switch (offset) |
| r2454 | r2455 | |
| 828 | 828 | WRITE16_HANDLER( neogeo_video_register_w ) |
| 829 | 829 | { |
| 830 | 830 | /* accessing the LSB only is not mapped */ |
| 831 | if (mem_mask != 0x | |
| 831 | if (mem_mask != 0x | |
| 832 | 832 | { |
| 833 | 833 | /* accessing the MSB only stores same data in MSB and LSB */ |
| 834 | if (mem_mask == 0x | |
| 834 | if (mem_mask == 0x | |
| 835 | 835 | data = (data & 0xff00) | (data >> 8); |
| 836 | 836 | |
| 837 | 837 | switch (offset) |
| r0 | r2455 | |
|---|---|---|
| 1 | /********************************************************************************** | |
| 2 | ||
| 3 | ||
| 4 | SNOOKER 10 / SANDII' | |
| 5 | ||
| 6 | Driver by Roberto Fresca. | |
| 7 | ||
| 8 | ||
| 9 | Games running on this hardware: | |
| 10 | ||
| 11 | * Snooker 10 (Ver 1.11), Sandii', 1998. | |
| 12 | * Apple 10 (Ver 1.21), Sandii', 1998. | |
| 13 | * Ten Balls (Ver 1.05), unknown, 1997. | |
| 14 | ||
| 15 | ||
| 16 | **********************************************************************************/ | |
| 17 | ||
| 18 | #include "driver.h" | |
| 19 | #include "video/resnet.h" | |
| 20 | ||
| 21 | static tilemap *bg_tilemap; | |
| 22 | ||
| 23 | ||
| 24 | PALETTE_INIT( snookr10 ) | |
| 25 | { | |
| 26 | int i; | |
| 27 | ||
| 28 | /* RRRBBBGG */ | |
| 29 | if (color_prom == 0) return; | |
| 30 | ||
| 31 | for (i = 0;i < machine->config->total_colors;i++) | |
| 32 | { | |
| 33 | int bit0,bit1,bit2,r,g,b; | |
| 34 | ||
| 35 | /* red component */ | |
| 36 | bit0 = (color_prom[i] >> 0) & 0x01; | |
| 37 | bit1 = (color_prom[i] >> 1) & 0x01; | |
| 38 | bit2 = (color_prom[i] >> 2) & 0x01; | |
| 39 | r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 40 | /* blue component */ | |
| 41 | bit0 = (color_prom[i] >> 3) & 0x01; | |
| 42 | bit1 = (color_prom[i] >> 4) & 0x01; | |
| 43 | bit2 = (color_prom[i] >> 5) & 0x01; | |
| 44 | b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 45 | /* green component */ | |
| 46 | bit0 = 0; | |
| 47 | bit1 = (color_prom[i] >> 6) & 0x01; | |
| 48 | bit2 = (color_prom[i] >> 7) & 0x01; | |
| 49 | g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; | |
| 50 | ||
| 51 | palette_set_color(machine,i,MAKE_RGB(r,g,b)); | |
| 52 | } | |
| 53 | } | |
| 54 | ||
| 55 | WRITE8_HANDLER( snookr10_videoram_w ) | |
| 56 | { | |
| 57 | videoram[offset] = data; | |
| 58 | tilemap_mark_tile_dirty(bg_tilemap, offset); | |
| 59 | } | |
| 60 | ||
| 61 | WRITE8_HANDLER( snookr10_colorram_w ) | |
| 62 | { | |
| 63 | colorram[offset] = data; | |
| 64 | tilemap_mark_tile_dirty(bg_tilemap, offset); | |
| 65 | } | |
| 66 | ||
| 67 | /**** normal hardware limit **** | |
| 68 | - bits - | |
| 69 | 7654 3210 | |
| 70 | xxxx xx-- tiles color. | |
| 71 | xxx- x-xx tiles color (title). | |
| 72 | xxxx -xxx tiles color (background). | |
| 73 | */ | |
| 74 | ||
| 75 | static TILE_GET_INFO( get_bg_tile_info ) | |
| 76 | { | |
| 77 | /* - bits - | |
| 78 | 7654 3210 | |
| 79 | xxxx ---- tiles color. | |
| 80 | ---- xxxx unused. | |
| 81 | */ | |
| 82 | int offs = tile_index; | |
| 83 | int attr = videoram[offs] + (colorram[offs] << 8); | |
| 84 | int code = attr & 0xfff; | |
| 85 | int color = colorram[offs] >> 4; /* 4 bits for color */ | |
| 86 | ||
| 87 | SET_TILE_INFO(0, code, color, 0); | |
| 88 | } | |
| 89 | ||
| 90 | VIDEO_START( snookr10 ) | |
| 91 | { | |
| 92 | bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 4, 8, 128, 32); | |
| 93 | } | |
| 94 | ||
| 95 | VIDEO_UPDATE( snookr10 ) | |
| 96 | { | |
| 97 | tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0); | |
| 98 | return 0; | |
| 99 | } |
| r2454 | r2455 | |
|---|---|---|
| 4 | 4 | */ |
| 5 | 5 | |
| 6 | 6 | #include "driver.h" |
| 7 | #include "deprecat.h" | |
| 8 | 7 | #include "video/konamiic.h" |
| 9 | 8 | #include "machine/konamigx.h" |
| 10 | 9 |
| r2454 | r2455 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "deprecat.h" | |
| 11 | 10 | #include "video/konamiic.h" |
| 12 | 11 | |
| 13 | 12 | static tilemap *bg_tilemap[2]; |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "includes/starshp1.h" |
| 10 | 9 | |
| 11 | 10 | UINT8 *starshp1_playfield_ram; |
| r2454 | r2455 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "deprecat.h" | |
| 11 | 10 | |
| 12 | 11 | UINT8 *gottlieb_charram; |
| 13 | 12 | |
| r2454 | r2455 | |
| 86 | 85 | |
| 87 | 86 | b = 0x10 * bit0 + 0x21 * bit1 + 0x46 * bit2 + 0x88 * bit3; |
| 88 | 87 | |
| 89 | palette_set_color( | |
| 88 | palette_set_color(machine, offset / 2, MAKE_RGB(r, g, b)); | |
| 90 | 89 | } |
| 91 | 90 | |
| 92 | 91 | WRITE8_HANDLER( gottlieb_video_outputs_w ) |
| r2454 | r2455 | |
| 142 | 141 | { |
| 143 | 142 | gottlieb_charram[offset] = data; |
| 144 | 143 | |
| 145 | decodechar( | |
| 144 | decodechar(machine->gfx[0], offset / 32, gottlieb_charram); | |
| 146 | 145 | |
| 147 | 146 | tilemap_mark_all_tiles_dirty(bg_tilemap); |
| 148 | 147 | } |
| r2454 | r2455 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "deprecat.h" | |
| 11 | 10 | #include "includes/tubep.h" |
| 12 | 11 | #include "video/resnet.h" |
| 13 | 12 | |
| r2454 | r2455 | |
| 557 | 556 | /SINT line will be reasserted in XSize * YSize cycles (RH0 signal cycles) |
| 558 | 557 | */ |
| 559 | 558 | /* 1.clear the /SINT interrupt line */ |
| 560 | cpunum_set_input_line( | |
| 559 | cpunum_set_input_line(machine, 3,0,CLEAR_LINE); | |
| 561 | 560 | |
| 562 | 561 | /* 2.assert /SINT again after this time */ |
| 563 | 562 | timer_set( attotime_mul(ATTOTIME_IN_HZ(19968000/8), (XSize+1)*(YSize+1)), NULL, 0, sprite_timer_callback); |
| r2454 | r2455 | |
|---|---|---|
| 102 | 102 | READ8_HANDLER( exidy_interrupt_r ) |
| 103 | 103 | { |
| 104 | 104 | /* clear any interrupts */ |
| 105 | cpunum_set_input_line( | |
| 105 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 106 | 106 | |
| 107 | 107 | /* return the latched condition */ |
| 108 | 108 | return int_condition; |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | |
| 10 | 9 | UINT8 *gladiatr_videoram, *gladiatr_colorram, *gladiatr_textram; |
| 11 | 10 | |
| r2454 | r2455 | |
| 118 | 117 | g = (g << 1) + ((paletteram[offset + 0x400] >> 5) & 0x01); |
| 119 | 118 | b = (b << 1) + ((paletteram[offset + 0x400] >> 6) & 0x01); |
| 120 | 119 | |
| 121 | palette_set_color_rgb( | |
| 120 | palette_set_color_rgb(machine,offset,pal5bit(r),pal5bit(g),pal5bit(b)); | |
| 122 | 121 | } |
| 123 | 122 | |
| 124 | 123 |
| r2454 | r2455 | |
|---|---|---|
| 261 | 261 | it's contents the usual way. |
| 262 | 262 | |
| 263 | 263 | */ |
| 264 | if (TC0100SCN_long_r(screen->machine,0x4090/4,0) || TC0480SCP_long_r(screen->machine,0x20/4,0)==0x240866) { /* Anything in text layer - really stupid hack */ | |
| 264 | if (TC0100SCN_long_r(screen->machine,0x4090/4,0xffffffff) || TC0480SCP_long_r(screen->machine,0x20/4,0xffffffff)==0x240866) { /* Anything in text layer - really stupid hack */ | |
| 265 | 265 | TC0480SCP_tilemap_draw(bitmap,cliprect,layer[1],0,2); |
| 266 | 266 | TC0480SCP_tilemap_draw(bitmap,cliprect,layer[2],0,4); |
| 267 | 267 | TC0480SCP_tilemap_draw(bitmap,cliprect,layer[3],0,8); |
| 268 | 268 | // TC0100SCN_tilemap_draw(machine,bitmap,cliprect,0,pivlayer[2],0,0); |
| 269 | if (TC0480SCP_long_r(screen->machine,0x20/4,0)!=0x240866) /* Stupid hack for start of race */ | |
| 269 | if (TC0480SCP_long_r(screen->machine,0x20/4,0xffffffff)!=0x240866) /* Stupid hack for start of race */ | |
| 270 | 270 | TC0480SCP_tilemap_draw(bitmap,&hack_cliprect,layer[0],0,0); |
| 271 | 271 | draw_sprites(screen->machine,bitmap,cliprect,1,44,-574); |
| 272 | 272 | } else { |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "kangaroo.h" |
| 10 | 9 | |
| 11 | 10 |
| r2454 | r2455 | |
|---|---|---|
| 182 | 182 | cidelsa_prd_changed, |
| 183 | 183 | }; |
| 184 | 184 | |
| 185 | static | |
| 185 | static CDP | |
| 186 | 186 | { |
| 187 | 187 | SCREEN_TAG, |
| 188 | 188 | DRACO_CHR2, |
| r2454 | r2455 | |
|---|---|---|
| 93 | 93 | /* Sprite buffer - the data written doesn't matter (confirmed by several games) */ |
| 94 | 94 | if (offset==4) |
| 95 | 95 | { |
| 96 | buffer_spriteram16_w(machine,0,0,0); | |
| 96 | buffer_spriteram16_w(machine,0,0,0xffff); | |
| 97 | 97 | m92_sprite_buffer_busy = 0; |
| 98 | 98 | |
| 99 | 99 | /* Pixel clock is 26.6666 MHz, we have 0x800 bytes, or 0x400 words |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "m58.h" |
| 10 | 9 | #include "video/resnet.h" |
| 11 | 10 |
| r2454 | r2455 | |
|---|---|---|
| 59 | 59 | ***************************************************************************/ |
| 60 | 60 | |
| 61 | 61 | #include "driver.h" |
| 62 | #include "deprecat.h" | |
| 63 | 62 | #include "profiler.h" |
| 64 | 63 | |
| 65 | 64 | |
| r2454 | r2455 | |
| 212 | 211 | if (flipy) dy = sy + sizey-15 - dy; |
| 213 | 212 | else dy = sy + dy; |
| 214 | 213 | |
| 215 | drawgfx(rawbitmap, | |
| 214 | drawgfx(rawbitmap,machine->gfx[0], | |
| 216 | 215 | (tile & 0x0fff) | (code & 0xf000), |
| 217 | 216 | (tile >> 12) | (color & 0x70), |
| 218 | 217 | flipx,flipy, |
| r2454 | r2455 | |
| 226 | 225 | int w; |
| 227 | 226 | |
| 228 | 227 | if (zoomx <= 1 && zoomy <= 1) |
| 229 | drawgfxzoom(rawbitmap, | |
| 228 | drawgfxzoom(rawbitmap,machine->gfx[0], | |
| 230 | 229 | code, |
| 231 | 230 | color, |
| 232 | 231 | flipx,flipy, |
| r2454 | r2455 | |
| 239 | 238 | |
| 240 | 239 | for (x = 0;x < w;x++) |
| 241 | 240 | { |
| 242 | drawgfxzoom(rawbitmap, | |
| 241 | drawgfxzoom(rawbitmap,machine->gfx[0], | |
| 243 | 242 | code, |
| 244 | 243 | color, |
| 245 | 244 | flipx,flipy, |
| r2454 | r2455 | |
|---|---|---|
| 813 | 813 | b = (paletteram32[offset] >> 0) & 0xff; |
| 814 | 814 | } |
| 815 | 815 | |
| 816 | palette_set_color( | |
| 816 | palette_set_color(machine,offset,MAKE_RGB(r,g,b)); | |
| 817 | 817 | } |
| 818 | 818 | |
| 819 | 819 | /******************************************************************************/ |
| r2454 | r2455 | |
| 1357 | 1357 | } \ |
| 1358 | 1358 | } |
| 1359 | 1359 | |
| 1360 | #define UPDATE_PIXMAP_SP(pf_num) \ | |
| 1361 | if(cx>=clip_als && cx<clip_ars && !(cx>=clip_bls && cx<clip_brs)) \ | |
| 1362 | { \ | |
| 1363 | sprite_pri=sprite[pf_num]&pval; \ | |
| 1364 | if(sprite_pri) \ | |
| 1365 | { \ | |
| 1366 | if(sprite[pf_num]&0x100) break; \ | |
| 1367 | if(!dpix_sp[sprite_pri]) \ | |
| 1368 | { \ | |
| 1369 | if(!(pval&0xf0)) break; \ | |
| 1370 | else {dpix_1_sprite(*dsti);*dsti=dval;break;} \ | |
| 1371 | } \ | |
| 1372 | if(dpix_sp[sprite_pri][pval>>4](*dsti)) {*dsti=dval;break;} \ | |
| 1373 | } \ | |
| 1374 | } | |
| 1375 | ||
| 1376 | #define UPDATE_PIXMAP_LP(pf_num) \ | |
| 1377 | if (cx>=clip_al##pf_num && cx<clip_ar##pf_num && !(cx>=clip_bl##pf_num && cx<clip_br##pf_num)) \ | |
| 1378 | { \ | |
| 1379 | tval=*tsrc##pf_num; \ | |
| 1380 | if(tval&0xf0) \ | |
| 1381 | if(dpix_lp[pf_num][pval>>4](clut[*src##pf_num])) {*dsti=dval;break;} \ | |
| 1382 | } | |
| 1383 | ||
| 1384 | ||
| 1360 | 1385 | /*============================================================================*/ |
| 1361 | 1386 | |
| 1362 | 1387 | INLINE void draw_scanlines(running_machine *machine, |
| r2454 | r2455 | |
| 1372 | 1397 | |
| 1373 | 1398 | const int x=46; |
| 1374 | 1399 | |
| 1375 | UINT32 sprite_noalp_0=sprite[0]&0x100; | |
| 1376 | UINT32 sprite_noalp_1=sprite[1]&0x100; | |
| 1377 | UINT32 sprite_noalp_2=sprite[2]&0x100; | |
| 1378 | UINT32 sprite_noalp_3=sprite[3]&0x100; | |
| 1379 | UINT32 sprite_noalp_4=sprite[4]&0x100; | |
| 1380 | UINT32 sprite_noalp_5=sprite[5]&0x100; | |
| 1381 | ||
| 1382 | 1400 | static UINT16 *src0=0,*src_s0=0,*src_e0=0,clip_al0=0,clip_ar0=0,clip_bl0=0,clip_br0=0; |
| 1383 | 1401 | static UINT8 *tsrc0=0,*tsrc_s0=0; |
| 1384 | 1402 | static UINT32 x_count0=0,x_zoom0=0; |
| r2454 | r2455 | |
| 1457 | 1475 | UINT8 sprite_pri; |
| 1458 | 1476 | switch(skip_layer_num) |
| 1459 | 1477 | { |
| 1460 | case 0: if(cx>=clip_als && cx<clip_ars && !(cx>=clip_bls && cx<clip_brs) && (sprite_pri=sprite[0]&pval)) | |
| 1461 | { | |
| 1462 | if(sprite_noalp_0) break; | |
| 1463 | if(!dpix_sp[sprite_pri]) break; | |
| 1464 | if(dpix_sp[sprite_pri][pval>>4](*dsti)) {*dsti=dval;break;} | |
| 1465 | } | |
| 1466 | if (cx>=clip_al0 && cx<clip_ar0 && !(cx>=clip_bl0 && cx<clip_br0)) {tval=*tsrc0;if(tval&0xf0) if(dpix_lp[0][pval>>4](clut[*src0])) {*dsti=dval;break;}} | |
| 1467 | case 1: if(cx>=clip_als && cx<clip_ars && !(cx>=clip_bls && cx<clip_brs) && (sprite_pri=sprite[1]&pval)) | |
| 1468 | { | |
| 1469 | if(sprite_noalp_1) break; | |
| 1470 | if(!dpix_sp[sprite_pri]) | |
| 1471 | { | |
| 1472 | if(!(pval&0xf0)) break; | |
| 1473 | else {dpix_1_sprite(*dsti);*dsti=dval;break;} | |
| 1474 | } | |
| 1475 | if(dpix_sp[sprite_pri][pval>>4](*dsti)) {*dsti=dval;break;} | |
| 1476 | } | |
| 1477 | if (cx>=clip_al1 && cx<clip_ar1 && !(cx>=clip_bl1 && cx<clip_br1)) {tval=*tsrc1;if(tval&0xf0) if(dpix_lp[1][pval>>4](clut[*src1])) {*dsti=dval;break;}} | |
| 1478 | case 2: if(cx>=clip_als && cx<clip_ars && !(cx>=clip_bls && cx<clip_brs) && (sprite_pri=sprite[2]&pval)) | |
| 1479 | { | |
| 1480 | if(sprite_noalp_2) break; | |
| 1481 | if(!dpix_sp[sprite_pri]) | |
| 1482 | { | |
| 1483 | if(!(pval&0xf0)) break; | |
| 1484 | else {dpix_1_sprite(*dsti);*dsti=dval;break;} | |
| 1485 | } | |
| 1486 | if(dpix_sp[sprite_pri][pval>>4](*dsti)) {*dsti=dval;break;} | |
| 1487 | } | |
| 1488 | if (cx>=clip_al2 && cx<clip_ar2 && !(cx>=clip_bl2 && cx<clip_br2)) {tval=*tsrc2;if(tval&0xf0) if(dpix_lp[2][pval>>4](clut[*src2])) {*dsti=dval;break;}} | |
| 1489 | case 3: if(cx>=clip_als && cx<clip_ars && !(cx>=clip_bls && cx<clip_brs) && (sprite_pri=sprite[3]&pval)) | |
| 1490 | { | |
| 1491 | if(sprite_noalp_3) break; | |
| 1492 | if(!dpix_sp[sprite_pri]) | |
| 1493 | { | |
| 1494 | if(!(pval&0xf0)) break; | |
| 1495 | else {dpix_1_sprite(*dsti);*dsti=dval;break;} | |
| 1496 | } | |
| 1497 | if(dpix_sp[sprite_pri][pval>>4](*dsti)) {*dsti=dval;break;} | |
| 1498 | } | |
| 1499 | if (cx>=clip_al3 && cx<clip_ar3 && !(cx>=clip_bl3 && cx<clip_br3)) {tval=*tsrc3;if(tval&0xf0) if(dpix_lp[3][pval>>4](clut[*src3])) {*dsti=dval;break;}} | |
| 1500 | ||
| 1501 | case 4: if(cx>=clip_als && cx<clip_ars && !(cx>=clip_bls && cx<clip_brs) && (sprite_pri=sprite[4]&pval)) | |
| 1502 | { | |
| 1503 | if(sprite_noalp_4) break; | |
| 1504 | if(!dpix_sp[sprite_pri]) | |
| 1505 | { | |
| 1506 | if(!(pval&0xf0)) break; | |
| 1507 | else {dpix_1_sprite(*dsti);*dsti=dval;break;} | |
| 1508 | } | |
| 1509 | if(dpix_sp[sprite_pri][pval>>4](*dsti)) {*dsti=dval;break;} | |
| 1510 | } | |
| 1511 | if (cx>=clip_al4 && cx<clip_ar4 && !(cx>=clip_bl4 && cx<clip_br4)) { | |
| 1512 | tval=*tsrc4; | |
| 1513 | if(tval&0xf0) | |
| 1514 | { | |
| 1515 | if(dpix_lp[4][pval>>4](clut[*src4])) | |
| 1516 | { | |
| 1517 | *dsti=dval; | |
| 1518 | break; | |
| 1519 | } | |
| 1520 | } | |
| 1521 | } | |
| 1522 | ||
| 1523 | ||
| 1524 | case 5: if(cx>=clip_als && cx<clip_ars && !(cx>=clip_bls && cx<clip_brs) && (sprite_pri=sprite[5]&pval)) | |
| 1525 | { | |
| 1526 | if(sprite_noalp_5) break; | |
| 1527 | if(!dpix_sp[sprite_pri]) | |
| 1528 | { | |
| 1529 | if(!(pval&0xf0)) break; | |
| 1530 | else {dpix_1_sprite(*dsti);*dsti=dval;break;} | |
| 1531 | } | |
| 1532 | if(dpix_sp[sprite_pri][pval>>4](*dsti)) {*dsti=dval;break;} | |
| 1533 | } | |
| 1478 | case 0: UPDATE_PIXMAP_SP(0) UPDATE_PIXMAP_LP(0) | |
| 1479 | case 1: UPDATE_PIXMAP_SP(1) UPDATE_PIXMAP_LP(1) | |
| 1480 | case 2: UPDATE_PIXMAP_SP(2) UPDATE_PIXMAP_LP(2) | |
| 1481 | case 3: UPDATE_PIXMAP_SP(3) UPDATE_PIXMAP_LP(3) | |
| 1482 | case 4: UPDATE_PIXMAP_SP(4) UPDATE_PIXMAP_LP(4) | |
| 1483 | case 5: UPDATE_PIXMAP_SP(5) | |
| 1534 | 1484 | if(!bgcolor) {if(!(pval&0xf0)) {*dsti=0;break;}} |
| 1535 | 1485 | else dpix_bg(bgcolor); |
| 1536 | 1486 | *dsti=dval; |
| r2454 | r2455 | |
| 1588 | 1538 | int opaque_all; |
| 1589 | 1539 | int total_elements; |
| 1590 | 1540 | |
| 1591 | if(!(alpha_mode=line_t->alpha_mode[line])) return; | |
| 1541 | alpha_mode=line_t->alpha_mode[line]; | |
| 1542 | if(!alpha_mode) return; | |
| 1592 | 1543 | |
| 1593 | 1544 | total_elements=machine->gfx[1]->total_elements; |
| 1594 | 1545 |
| r2454 | r2455 | |
|---|---|---|
| 77 | 77 | ***************************************************************************/ |
| 78 | 78 | |
| 79 | 79 | #include "driver.h" |
| 80 | #include "deprecat.h" | |
| 81 | 80 | |
| 82 | 81 | UINT16 *gaelco2_vregs; |
| 83 | 82 | static UINT16 *gaelco2_videoram; |
| r2454 | r2455 | |
| 241 | 240 | b = pal5bit(b); |
| 242 | 241 | |
| 243 | 242 | /* update game palette */ |
| 244 | palette_set_color( | |
| 243 | palette_set_color(machine, 4096*0 + offset, MAKE_RGB(r, g, b)); | |
| 245 | 244 | |
| 246 | 245 | /* update shadow/highligh palettes */ |
| 247 | 246 | for (i = 1; i < 16; i++){ |
| r2454 | r2455 | |
| 253 | 252 | auxg = ADJUST_COLOR(g + pen_color_adjust[i]); |
| 254 | 253 | auxb = ADJUST_COLOR(b + pen_color_adjust[i]); |
| 255 | 254 | |
| 256 | palette_set_color( | |
| 255 | palette_set_color(machine, 4096*i + offset, MAKE_RGB(auxr, auxg, auxb)); | |
| 257 | 256 | } |
| 258 | 257 | } |
| 259 | 258 | |
| r2454 | r2455 | |
| 510 | 509 | VIDEO_EOF( gaelco2 ) |
| 511 | 510 | { |
| 512 | 511 | /* sprites are one frame ahead */ |
| 513 | buffer_spriteram16_w(machine, 0, 0, 0); | |
| 512 | buffer_spriteram16_w(machine, 0, 0, 0xffff); | |
| 514 | 513 | } |
| r2454 | r2455 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | #include "deprecat.h" | |
| 3 | 2 | |
| 4 | 3 | static int homerun_gfx_ctrl; |
| 5 | 4 | static int homerun_gc_up,homerun_gc_down; |
| r2454 | r2455 | |
| 48 | 47 | bit1 = (data >> 6) & 0x01; |
| 49 | 48 | bit2 = (data >> 7) & 0x01; |
| 50 | 49 | b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; |
| 51 | palette_set_color( | |
| 50 | palette_set_color(machine,offset,MAKE_RGB(r,g,b)); | |
| 52 | 51 | } |
| 53 | 52 | |
| 54 | 53 | static TILE_GET_INFO( get_homerun_tile_info ) |
| r2454 | r2455 | |
|---|---|---|
| 8 | 8 | ***************************************************************************/ |
| 9 | 9 | |
| 10 | 10 | #include "driver.h" |
| 11 | #include "deprecat.h" | |
| 12 | 11 | |
| 13 | 12 | UINT8 *ssozumo_videoram2; |
| 14 | 13 | UINT8 *ssozumo_colorram2; |
| r2454 | r2455 | |
| 99 | 98 | bit3 = (val >> 3) & 0x01; |
| 100 | 99 | b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; |
| 101 | 100 | |
| 102 | palette_set_color( | |
| 101 | palette_set_color(machine, offs2 + 64, MAKE_RGB(r, g, b)); | |
| 103 | 102 | } |
| 104 | 103 | |
| 105 | 104 | WRITE8_HANDLER( ssozumo_scroll_w ) |
| r2454 | r2455 | |
|---|---|---|
| 13 | 13 | ***************************************************************************/ |
| 14 | 14 | |
| 15 | 15 | #include "driver.h" |
| 16 | #include "deprecat.h" | |
| 17 | 16 | |
| 18 | 17 | |
| 19 | 18 | |
| r2454 | r2455 | |
| 114 | 113 | bit3 = (val >> 3) & 0x01; |
| 115 | 114 | b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3; |
| 116 | 115 | |
| 117 | palette_set_color( | |
| 116 | palette_set_color(machine,offs2 + 64,MAKE_RGB(r,g,b)); | |
| 118 | 117 | } |
| 119 | 118 | |
| 120 | 119 |
| r2454 | r2455 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "deprecat.h" | |
| 11 | 10 | #include "includes/arkanoid.h" |
| 12 | 11 | |
| 13 | 12 | static UINT8 gfxbank, palettebank; |
| r2454 | r2455 | |
| 68 | 67 | which resets itself). This bit is the likely candidate as it is flipped |
| 69 | 68 | early in bootup just prior to accessing the MCU for the first time. */ |
| 70 | 69 | if (cpu_gettotalcpu()>1) // Bootlegs don't have the MCU but still set this bit |
| 71 | cpunum_set_input_line( | |
| 70 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE); | |
| 72 | 71 | } |
| 73 | 72 | |
| 74 | 73 | static TILE_GET_INFO( get_bg_tile_info ) |
| r2454 | r2455 | |
|---|---|---|
| 14 | 14 | */ |
| 15 | 15 | |
| 16 | 16 | #include "driver.h" |
| 17 | #include "deprecat.h" | |
| 18 | 17 | |
| 19 | 18 | extern UINT16 twin16_custom_video; |
| 20 | 19 | extern UINT16 *twin16_gfx_rom; |
| r2454 | r2455 | |
| 50 | 49 | offset &= ~1; |
| 51 | 50 | |
| 52 | 51 | data = ((paletteram16[offset] & 0xff) << 8) | (paletteram16[offset + 1] & 0xff); |
| 53 | palette_set_color_rgb( | |
| 52 | palette_set_color_rgb(machine, offset / 2, pal5bit(data >> 0), pal5bit(data >> 5), pal5bit(data >> 10)); | |
| 54 | 53 | } |
| 55 | 54 | |
| 56 | 55 | WRITE16_HANDLER( fround_gfx_bank_w ) |
| r2454 | r2455 | |
| 440 | 439 | |
| 441 | 440 | need_process_spriteram = 1; |
| 442 | 441 | |
| 443 | buffer_spriteram16_w(machine,0,0,0); | |
| 442 | buffer_spriteram16_w(machine,0,0,0xffff); | |
| 444 | 443 | } |
| 445 | 444 | |
| 446 | 445 | VIDEO_UPDATE( twin16 ) |
| r2454 | r2455 | |
|---|---|---|
| 192 | 192 | ***************************************************************************/ |
| 193 | 193 | |
| 194 | 194 | #include "driver.h" |
| 195 | #include "deprecat.h" | |
| 196 | 195 | #include "megasys1.h" |
| 197 | 196 | |
| 198 | 197 | /* Variables defined here, that have to be shared: */ |
| r2454 | r2455 | |
| 455 | 454 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, CLEAR_LINE); |
| 456 | 455 | break; |
| 457 | 456 | |
| 458 | case 0x308/2 : soundlatch_word_w(machine,0,new_data,0); | |
| 457 | case 0x308/2 : soundlatch_word_w(machine,0,new_data,0xffff); | |
| 459 | 458 | cpunum_set_input_line(machine, 1,4,HOLD_LINE); |
| 460 | 459 | break; |
| 461 | 460 | |
| r2454 | r2455 | |
| 472 | 471 | { |
| 473 | 472 | switch (offset) |
| 474 | 473 | { |
| 475 | case 0x8000/2: return soundlatch2_word_r(machine,0,0); | |
| 474 | case 0x8000/2: return soundlatch2_word_r(machine,0,0xffff); | |
| 476 | 475 | default: return megasys1_vregs[offset]; |
| 477 | 476 | } |
| 478 | 477 | } |
| r2454 | r2455 | |
| 507 | 506 | break; |
| 508 | 507 | |
| 509 | 508 | case 0x8000/2 : /* Cybattler reads sound latch on irq 2 */ |
| 510 | soundlatch_word_w(machine,0,new_data,0); | |
| 509 | soundlatch_word_w(machine,0,new_data,0xffff); | |
| 511 | 510 | cpunum_set_input_line(machine, 1,2,HOLD_LINE); |
| 512 | 511 | break; |
| 513 | 512 |
| r2454 | r2455 | |
|---|---|---|
| 215 | 215 | |
| 216 | 216 | VIDEO_EOF( crshrace ) |
| 217 | 217 | { |
| 218 | buffer_spriteram16_w(machine,0,0,0); | |
| 219 | buffer_spriteram16_2_w(machine,0,0,0); | |
| 218 | buffer_spriteram16_w(machine,0,0,0xffff); | |
| 219 | buffer_spriteram16_2_w(machine,0,0,0xffff); | |
| 220 | 220 | } |
| r2454 | r2455 | |
|---|---|---|
| 17 | 17 | **************************************************************************/ |
| 18 | 18 | |
| 19 | 19 | #include "driver.h" |
| 20 | #include "deprecat.h" | |
| 21 | 20 | #include "includes/pacman.h" |
| 22 | 21 | #include "video/resnet.h" |
| 23 | 22 | |
| r2454 | r2455 | |
| 354 | 353 | WRITE8_HANDLER( vanvan_bgcolor_w ) |
| 355 | 354 | { |
| 356 | 355 | int c = 0xaa * (data & 1); |
| 357 | palette_set_color( | |
| 356 | palette_set_color(machine,0,MAKE_RGB(c,c,c)); | |
| 358 | 357 | } |
| 359 | 358 | |
| 360 | 359 |
| r2454 | r2455 | |
|---|---|---|
| 300 | 300 | break; |
| 301 | 301 | |
| 302 | 302 | default: |
| 303 | logerror("%06X:write to %06X = %04X & %04x\n", activecpu_get_pc(), 0x2a0000 + 2 * offset, data, mem_mask | |
| 303 | logerror("%06X:write to %06X = %04X & %04x\n", activecpu_get_pc(), 0x2a0000 + 2 * offset, data, mem_mask | |
| 304 | 304 | break; |
| 305 | 305 | } |
| 306 | 306 | } |
| r2454 | r2455 | |
| 309 | 309 | WRITE16_HANDLER( madmax_blitter_unknown_w ) |
| 310 | 310 | { |
| 311 | 311 | /* written to just before the blitter command register is written */ |
| 312 | logerror("%06X:write to %06X = %04X & %04X\n", activecpu_get_pc(), 0x300000 + 2 * offset, data, mem_mask | |
| 312 | logerror("%06X:write to %06X = %04X & %04X\n", activecpu_get_pc(), 0x300000 + 2 * offset, data, mem_mask | |
| 313 | 313 | } |
| 314 | 314 | |
| 315 | 315 |
| r2454 | r2455 | |
|---|---|---|
| 9 | 9 | // Directives |
| 10 | 10 | |
| 11 | 11 | #include "driver.h" |
| 12 | #include "deprecat.h" | |
| 13 | 12 | |
| 14 | 13 | #define BW_DEBUG 0 |
| 15 | 14 | |
| r2454 | r2455 | |
| 154 | 153 | if (b > 0xff) b = 0xff; |
| 155 | 154 | } |
| 156 | 155 | |
| 157 | palette_set_color( | |
| 156 | palette_set_color(machine, offset, MAKE_RGB(r, g, b)); | |
| 158 | 157 | |
| 159 | 158 | #if BW_DEBUG |
| 160 | 159 | paletteram[offset+0x40] = palatch; |
| r2454 | r2455 | |
| 218 | 217 | fgfx = machine->gfx[2]; |
| 219 | 218 | bgfx = machine->gfx[3]; |
| 220 | 219 | |
| 221 | if ((dwptr = fgfx->pen_usage)) | |
| 220 | dwptr = fgfx->pen_usage; | |
| 221 | if (dwptr) | |
| 222 | 222 | { |
| 223 | 223 | dwptr[0] = 0; |
| 224 | 224 | for(i=1; i<BW_NTILES; i++) dwptr[i] = -1; |
| r2454 | r2455 | |
|---|---|---|
| 368 | 368 | |
| 369 | 369 | INLINE void vram_w(UINT16 *VRAM, tilemap *TILEMAP, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT16 data, ATTR_UNUSED UINT16 mem_mask) |
| 370 | 370 | { |
| 371 | if ((VRAM[offset] & | |
| 371 | if ((VRAM[offset] & | |
| 372 | 372 | COMBINE_DATA(&VRAM[offset]); |
| 373 | 373 | offset /= 2; |
| 374 | 374 | if ( offset < 0x1000/4 ) // 16x16 tilemap |
| r2454 | r2455 | |
| 391 | 391 | INLINE void vram_8x8_w(UINT16 *VRAM, tilemap *TILEMAP,ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT16 data, ATTR_UNUSED UINT16 mem_mask) |
| 392 | 392 | { |
| 393 | 393 | offset %= 0x4000/2; |
| 394 | if ((VRAM[offset] & | |
| 394 | if ((VRAM[offset] & | |
| 395 | 395 | COMBINE_DATA(&VRAM[offset + 0x0000/2]); |
| 396 | 396 | COMBINE_DATA(&VRAM[offset + 0x4000/2]); |
| 397 | 397 | tilemap_mark_tile_dirty(TILEMAP,offset/2); |
| r2454 | r2455 | |
|---|---|---|
| 908 | 908 | |
| 909 | 909 | VIDEO_EOF( rshark ) |
| 910 | 910 | { |
| 911 | buffer_spriteram16_w(machine, 0, 0, 0); | |
| 911 | buffer_spriteram16_w(machine, 0, 0, 0xffff); | |
| 912 | 912 | } |
| r2454 | r2455 | |
|---|---|---|
| 92 | 92 | ***************************************************************************/ |
| 93 | 93 | |
| 94 | 94 | #include "driver.h" |
| 95 | #include "deprecat.h" | |
| 96 | 95 | #include "video/resnet.h" |
| 97 | 96 | #include "williams.h" |
| 98 | 97 | |
| r2454 | r2455 | |
| 379 | 378 | b = ((entry_hi >> 0) & 15) * i; |
| 380 | 379 | g = ((entry_lo >> 4) & 15) * i; |
| 381 | 380 | r = ((entry_lo >> 0) & 15) * i; |
| 382 | palette_set_color( | |
| 381 | palette_set_color(machine, offset / 2, MAKE_RGB(r, g, b)); | |
| 383 | 382 | } |
| 384 | 383 | |
| 385 | 384 |
| r2454 | r2455 | |
|---|---|---|
| 41 | 41 | ***************************************************************************/ |
| 42 | 42 | |
| 43 | 43 | #include "driver.h" |
| 44 | #include "deprecat.h" | |
| 45 | 44 | |
| 46 | 45 | //static int scroll1[4]; |
| 47 | 46 | static int scroll2[4]; |
| r2454 | r2455 | |
| 196 | 195 | scroll2[2]=(data>>6)&1; |
| 197 | 196 | |
| 198 | 197 | if (data&0x80) |
| 199 | cpunum_set_input_line( | |
| 198 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, CLEAR_LINE); | |
| 200 | 199 | else |
| 201 | cpunum_set_input_line( | |
| 200 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, ASSERT_LINE); | |
| 202 | 201 | } |
| 203 | 202 | |
| 204 | 203 | WRITE8_HANDLER( shackled_control_w ) |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | |
| 10 | 9 | UINT8 *battlane_spriteram; |
| 11 | 10 | UINT8 *battlane_tileram; |
| r2454 | r2455 | |
| 51 | 50 | bit2 = (~data >> 7) & 0x01; |
| 52 | 51 | b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; |
| 53 | 52 | |
| 54 | palette_set_color( | |
| 53 | palette_set_color(machine, offset, MAKE_RGB(r, g, b)); | |
| 55 | 54 | } |
| 56 | 55 | |
| 57 | 56 | WRITE8_HANDLER( battlane_scrollx_w ) |
| r2454 | r2455 | |
|---|---|---|
| 370 | 370 | { |
| 371 | 371 | case 0x00: /* Write data */ |
| 372 | 372 | case 0x01: |
| 373 | if (mem_mask) | |
| 373 | if (mem_mask != 0xffff) | |
| 374 | 374 | { |
| 375 | data &= | |
| 375 | data &= | |
| 376 | 376 | if (ACCESSING_BITS_8_15) |
| 377 | 377 | data |= data >> 8; |
| 378 | 378 | else |
| r2454 | r2455 | |
| 383 | 383 | |
| 384 | 384 | case 0x02: /* Control Write */ |
| 385 | 385 | case 0x03: |
| 386 | if (mem_mask) | |
| 386 | if (mem_mask != 0xffff) | |
| 387 | 387 | { |
| 388 | data &= | |
| 388 | data &= | |
| 389 | 389 | if (ACCESSING_BITS_8_15) |
| 390 | 390 | data |= data >> 8; |
| 391 | 391 | else |
| r2454 | r2455 | |
|---|---|---|
| 219 | 219 | horizontal flip switch. (This is how the real PCB does it) */ |
| 220 | 220 | if (thepit_flip_screen_x) |
| 221 | 221 | { |
| 222 | return input_port_ | |
| 222 | return input_port_ | |
| 223 | 223 | } |
| 224 | 224 | else |
| 225 | 225 | { |
| 226 | return input_port_ | |
| 226 | return input_port_ | |
| 227 | 227 | } |
| 228 | 228 | } |
| 229 | 229 |
| r2454 | r2455 | |
|---|---|---|
| 7 | 7 | ****************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "deprecat.h" | |
| 11 | 10 | |
| 12 | 11 | |
| 13 | 12 | #define BITMAP_WIDTH 304 |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "cloud9.h" |
| 10 | 9 | #include "video/resnet.h" |
| 11 | 10 | |
| r2454 | r2455 | |
| 112 | 111 | bit2 = (~b >> 2) & 0x01; |
| 113 | 112 | b = combine_3_weights(bweights, bit0, bit1, bit2); |
| 114 | 113 | |
| 115 | palette_set_color( | |
| 114 | palette_set_color(machine, offset & 0x3f, MAKE_RGB(r, g, b)); | |
| 116 | 115 | } |
| 117 | 116 | |
| 118 | 117 |
| r2454 | r2455 | |
|---|---|---|
| 12 | 12 | ***************************************************************************/ |
| 13 | 13 | |
| 14 | 14 | #include "driver.h" |
| 15 | #include "deprecat.h" | |
| 16 | 15 | |
| 17 | 16 | |
| 18 | 17 | extern UINT8 changela_tree0_col; |
| r2454 | r2455 | |
| 785 | 784 | g = color_table[(c >> 3) & 0x07]; |
| 786 | 785 | b = color_table[(c >> 6) & 0x07]; |
| 787 | 786 | |
| 788 | palette_set_color_rgb( | |
| 787 | palette_set_color_rgb(machine,color_index,r,g,b); | |
| 789 | 788 | } |
| 790 | 789 | |
| 791 | 790 |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "subs.h" |
| 10 | 9 | #include "sound/discrete.h" |
| 11 | 10 | |
| r2454 | r2455 | |
| 13 | 12 | { |
| 14 | 13 | if ((offset & 0x01) == 1) |
| 15 | 14 | { |
| 16 | palette_set_color(Machine, 0, MAKE_RGB(0x00, 0x00, 0x00)); | |
| 17 | palette_set_color(Machine, 1, MAKE_RGB(0xFF, 0xFF, 0xFF)); | |
| 15 | palette_set_color(machine, 0, MAKE_RGB(0x00, 0x00, 0x00)); | |
| 16 | palette_set_color(machine, 1, MAKE_RGB(0xFF, 0xFF, 0xFF)); | |
| 18 | 17 | } |
| 19 | 18 | else |
| 20 | 19 | { |
| 21 | palette_set_color(Machine, 1, MAKE_RGB(0x00, 0x00, 0x00)); | |
| 22 | palette_set_color(Machine, 0, MAKE_RGB(0xFF, 0xFF, 0xFF)); | |
| 20 | palette_set_color(machine, 1, MAKE_RGB(0x00, 0x00, 0x00)); | |
| 21 | palette_set_color(machine, 0, MAKE_RGB(0xFF, 0xFF, 0xFF)); | |
| 23 | 22 | } |
| 24 | 23 | } |
| 25 | 24 | |
| r2454 | r2455 | |
| 27 | 26 | { |
| 28 | 27 | if ((offset & 0x01) == 1) |
| 29 | 28 | { |
| 30 | palette_set_color(Machine, 2, MAKE_RGB(0x00, 0x00, 0x00)); | |
| 31 | palette_set_color(Machine, 3, MAKE_RGB(0xFF, 0xFF, 0xFF)); | |
| 29 | palette_set_color(machine, 2, MAKE_RGB(0x00, 0x00, 0x00)); | |
| 30 | palette_set_color(machine, 3, MAKE_RGB(0xFF, 0xFF, 0xFF)); | |
| 32 | 31 | } |
| 33 | 32 | else |
| 34 | 33 | { |
| 35 | palette_set_color(Machine, 3, MAKE_RGB(0x00, 0x00, 0x00)); | |
| 36 | palette_set_color(Machine, 2, MAKE_RGB(0xFF, 0xFF, 0xFF)); | |
| 34 | palette_set_color(machine, 3, MAKE_RGB(0x00, 0x00, 0x00)); | |
| 35 | palette_set_color(machine, 2, MAKE_RGB(0xFF, 0xFF, 0xFF)); | |
| 37 | 36 | } |
| 38 | 37 | } |
| 39 | 38 |
| r2454 | r2455 | |
|---|---|---|
| 6 | 6 | |
| 7 | 7 | |
| 8 | 8 | #include "driver.h" |
| 9 | #include "deprecat.h" | |
| 10 | 9 | |
| 11 | 10 | UINT8* funybubl_banked_videoram; |
| 12 | 11 | UINT8 *funybubl_paletteram; |
| r2454 | r2455 | |
| 24 | 23 | |
| 25 | 24 | coldat = funybubl_paletteram[colchanged*4] | (funybubl_paletteram[colchanged*4+1] << 8) | (funybubl_paletteram[colchanged*4+2] << 16) | (funybubl_paletteram[colchanged*4+3] << 24); |
| 26 | 25 | |
| 27 | palette_set_color_rgb( | |
| 26 | palette_set_color_rgb(machine,colchanged,pal6bit(coldat >> 12),pal6bit(coldat >> 0),pal6bit(coldat >> 6)); | |
| 28 | 27 | } |
| 29 | 28 | |
| 30 | 29 |
| r2454 | r2455 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | #include "deprecat.h" | |
| 3 | 2 | |
| 4 | 3 | static int gfxbank; |
| 5 | 4 | |
| r2454 | r2455 | |
| 41 | 40 | |
| 42 | 41 | offset &= 0xff; |
| 43 | 42 | |
| 44 | palette_set_color_rgb( | |
| 43 | palette_set_color_rgb(machine, offset, pal5bit(paletteram[offset + 0x000]), pal5bit(paletteram[offset + 0x100]), pal5bit(paletteram[offset + 0x200])); | |
| 45 | 44 | } |
| 46 | 45 | |
| 47 | 46 | static TILE_GET_INFO( get_bg_tile_info ) |
| r2454 | r2455 | |
|---|---|---|
| 67 | 67 | |
| 68 | 68 | WRITE8_HANDLER( m15_chargen_w ) |
| 69 | 69 | { |
| 70 | m10_state *state = | |
| 70 | m10_state *state = machine->driver_data; | |
| 71 | 71 | |
| 72 | 72 | if (state->chargen[offset] != data) |
| 73 | 73 | { |
| 74 | 74 | state->chargen[offset] = data; |
| 75 | 75 | /* not very effective ... dirty would be better */ |
| 76 | decodechar( | |
| 76 | decodechar(machine->gfx[0],offset >> 3,state->chargen); | |
| 77 | 77 | } |
| 78 | 78 | } |
| 79 | 79 |
| r2454 | r2455 | |
|---|---|---|
| 711 | 711 | if (*count == 0) |
| 712 | 712 | { |
| 713 | 713 | rgb_t color; |
| 714 | color = palette_get_color( | |
| 714 | color = palette_get_color(machine, ramdac.addr_r); | |
| 715 | 715 | |
| 716 | 716 | ramdac.color_r[0] = RGB_RED(color); |
| 717 | 717 | ramdac.color_r[1] = RGB_GREEN(color); |
| r2454 | r2455 | |
| 755 | 755 | ramdac.color_w[ramdac.count_w] = pal6bit(data); |
| 756 | 756 | if (++ramdac.count_w == 3) |
| 757 | 757 | { |
| 758 | palette_set_color_rgb( | |
| 758 | palette_set_color_rgb(machine, ramdac.addr_w, ramdac.color_w[0], ramdac.color_w[1], ramdac.color_w[2]); | |
| 759 | 759 | ramdac.count_w = 0; |
| 760 | 760 | ramdac.addr_w++; |
| 761 | 761 | } |
| r2454 | r2455 | |
| 1292 | 1292 | |
| 1293 | 1293 | for (pal = 0; pal < 256; ++pal) |
| 1294 | 1294 | { |
| 1295 | palette_set_color_rgb( | |
| 1295 | palette_set_color_rgb(machine, pal, pal3bit((pal>>5)&7), pal3bit((pal>>2)&7), pal2bit(pal&3)); | |
| 1296 | 1296 | } |
| 1297 | 1297 | |
| 1298 | 1298 | bank[0] = 1; |
| r2454 | r2455 | |
| 1380 | 1380 | if (changed & (1 << i)) |
| 1381 | 1381 | { |
| 1382 | 1382 | Mechmtr_update(i, cycles, data & (1 << i) ); |
| 1383 | cpunum_set_input_line( | |
| 1383 | cpunum_set_input_line(machine, 1, M6809_FIRQ_LINE, PULSE_LINE ); | |
| 1384 | 1384 | } |
| 1385 | 1385 | } |
| 1386 | 1386 | } |
| r2454 | r2455 | |
|---|---|---|
| 285 | 285 | |
| 286 | 286 | static const struct AY8910interface ay8910_interface = |
| 287 | 287 | { |
| 288 | AY8910_LEGACY_OUTPUT, | |
| 289 | AY8910_DEFAULT_LOADS, | |
| 288 | 290 | input_port_2_r, // DSW1 |
| 289 | 291 | input_port_3_r, // DSW2 |
| 290 | 292 | 0, |
| r2454 | r2455 | |
|---|---|---|
| 192 | 192 | |
| 193 | 193 | static WRITE8_HANDLER( sub_cpu_halt_w ) |
| 194 | 194 | { |
| 195 | cpunum_set_input_line( | |
| 195 | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, (data )? ASSERT_LINE : CLEAR_LINE); | |
| 196 | 196 | } |
| 197 | 197 | |
| 198 | 198 | static UINT8 snd_data; |
| r2454 | r2455 | |
| 240 | 240 | |
| 241 | 241 | static WRITE8_HANDLER( sound_cpu_reset_w ) |
| 242 | 242 | { |
| 243 | cpunum_set_input_line( | |
| 243 | cpunum_set_input_line(machine, 2, INPUT_LINE_RESET, (data&1 )? ASSERT_LINE : CLEAR_LINE); | |
| 244 | 244 | } |
| 245 | 245 | |
| 246 | 246 | static int vol_ctrl[16]; |
| r2454 | r2455 | |
| 284 | 284 | sound_nmi_enable = 1; |
| 285 | 285 | if (pending_nmi) |
| 286 | 286 | { |
| 287 | cpunum_set_input_line( | |
| 287 | cpunum_set_input_line(machine, 2,INPUT_LINE_NMI,PULSE_LINE); | |
| 288 | 288 | pending_nmi = 0; |
| 289 | 289 | } |
| 290 | 290 | } |
| r2454 | r2455 | |
| 296 | 296 | |
| 297 | 297 | static const struct AY8910interface ay8910_interface = |
| 298 | 298 | { |
| 299 | 0, | |
| 300 | 0, | |
| 299 | AY8910_LEGACY_OUTPUT, | |
| 300 | AY8910_DEFAULT_LOADS, | |
| 301 | NULL, | |
| 302 | NULL, | |
| 301 | 303 | unk_w, |
| 302 | 304 | unk_w |
| 303 | 305 | }; |
| r2454 | r2455 | |
|---|---|---|
| 268 | 268 | if (ACCESSING_BITS_0_7) |
| 269 | 269 | { |
| 270 | 270 | jumping_latch = data & 0xff; /*M68000 writes .b to $400007*/ |
| 271 | cpunum_set_input_line( | |
| 271 | cpunum_set_input_line(machine, 1,0,HOLD_LINE); | |
| 272 | 272 | } |
| 273 | 273 | } |
| 274 | 274 |
| r2454 | r2455 | |
|---|---|---|
| 236 | 236 | |
| 237 | 237 | static const struct YM2203interface ym2203_interface = |
| 238 | 238 | { |
| 239 | 0, | |
| 240 | 0, | |
| 241 | 0, | |
| 242 | 0, | |
| 239 | { | |
| 240 | AY8910_LEGACY_OUTPUT, | |
| 241 | AY8910_DEFAULT_LOADS, | |
| 242 | NULL, NULL, NULL, NULL, | |
| 243 | }, | |
| 243 | 244 | irqhandler |
| 244 | 245 | }; |
| 245 | 246 |
| r2454 | r2455 | |
|---|---|---|
| 143 | 143 | |
| 144 | 144 | static WRITE32_HANDLER( avengrs_eprom_w ) |
| 145 | 145 | { |
| 146 | if ( | |
| 146 | if (ACCESSING_BITS_8_15 | |
| 147 | 147 | UINT8 ebyte=(data>>8)&0xff; |
| 148 | 148 | // if (ebyte&0x80) { |
| 149 | 149 | EEPROM_set_clock_line((ebyte & 0x2) ? ASSERT_LINE : CLEAR_LINE); |
| r2454 | r2455 | |
| 151 | 151 | EEPROM_set_cs_line((ebyte & 0x4) ? CLEAR_LINE : ASSERT_LINE); |
| 152 | 152 | // } |
| 153 | 153 | } |
| 154 | else if ( | |
| 154 | else if (ACCESSING_BITS_ | |
| 155 | 155 | //volume control todo |
| 156 | 156 | } |
| 157 | 157 | else |
| r2454 | r2455 | |
| 162 | 162 | { |
| 163 | 163 | COMBINE_DATA(&paletteram32[offset]); |
| 164 | 164 | /* x bbbbb ggggg rrrrr */ |
| 165 | palette_set_color_rgb( | |
| 165 | palette_set_color_rgb(machine,offset,pal5bit(paletteram32[offset] >> 0),pal5bit(paletteram32[offset] >> 5),pal5bit(paletteram32[offset] >> 10)); | |
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | static READ32_HANDLER( avengrs_sound_r ) |
| 169 | 169 | { |
| 170 | if ( | |
| 170 | if (ACCESSING_BITS_24_31 | |
| 171 | 171 | return YMZ280B_status_0_r(machine,0)<<24; |
| 172 | 172 | } else { |
| 173 | 173 | logerror("%08x: non-byte read from sound mask %08x\n",activecpu_get_pc(),mem_mask); |
| r2454 | r2455 | |
| 178 | 178 | |
| 179 | 179 | static WRITE32_HANDLER( avengrs_sound_w ) |
| 180 | 180 | { |
| 181 | if ( | |
| 181 | if (ACCESSING_BITS_24_31 | |
| 182 | 182 | if (offset) |
| 183 | 183 | YMZ280B_data_0_w(machine,0,data>>24); |
| 184 | 184 | else |
| r2454 | r2455 | |
| 218 | 218 | switch (offset*4) |
| 219 | 219 | { |
| 220 | 220 | case 0x10: /* IRQ ack. Value written doesn't matter */ |
| 221 | cpunum_set_input_line( | |
| 221 | cpunum_set_input_line(machine, 0, mainCpuIsArm ? ARM_IRQ_LINE : 1, CLEAR_LINE); | |
| 222 | 222 | return; |
| 223 | 223 | break; |
| 224 | 224 | case 0x14: /* Prepare scanline interrupt */ |
| r2454 | r2455 | |
|---|---|---|
| 30 | 30 | |
| 31 | 31 | static WRITE8_HANDLER( tryout_nmi_ack_w ) |
| 32 | 32 | { |
| 33 | cpunum_set_input_line( | |
| 33 | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, CLEAR_LINE ); | |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | static WRITE8_HANDLER( tryout_sound_w ) |
| r2454 | r2455 | |
|---|---|---|
| 72 | 72 | *********************************************************************/ |
| 73 | 73 | |
| 74 | 74 | #include "driver.h" |
| 75 | #include "deprecat.h" | |
| 76 | 75 | #include "machine/eeprom.h" |
| 77 | 76 | #include "sound/okim6295.h" |
| 78 | 77 | |
| r2454 | r2455 | |
| 114 | 113 | offset &= 0xff; |
| 115 | 114 | |
| 116 | 115 | color = (paletteram16[offset] >> 8) | (paletteram16[offset+0x100] & 0xff00); |
| 117 | palette_set_color_rgb( | |
| 116 | palette_set_color_rgb(machine,offset*2+0,pal5bit(color),pal5bit(color >> 5),pal5bit(color >> 10)); | |
| 118 | 117 | |
| 119 | 118 | color = (paletteram16[offset] & 0xff) | ((paletteram16[offset+0x100] & 0xff) << 8); |
| 120 | palette_set_color_rgb( | |
| 119 | palette_set_color_rgb(machine,offset*2+1,pal5bit(color),pal5bit(color >> 5),pal5bit(color >> 10)); | |
| 121 | 120 | } |
| 122 | 121 | |
| 123 | 122 | static WRITE16_HANDLER( vbuffer_set_w ) |
| r2454 | r2455 | |
| 140 | 139 | // handle overlapping pixels without writing them |
| 141 | 140 | switch(mem_mask) |
| 142 | 141 | { |
| 143 | case 0: | |
| 144 | bitmap_1_w(machine,offset,data,0x00ff); | |
| 142 | case 0xffff: | |
| 145 | 143 | bitmap_1_w(machine,offset,data,0xff00); |
| 144 | bitmap_1_w(machine,offset,data,0x00ff); | |
| 146 | 145 | return; |
| 147 | 146 | |
| 148 | case 0x | |
| 147 | case 0x | |
| 149 | 148 | if((data & 0xff00) == 0xff00) |
| 150 | 149 | return; |
| 151 | 150 | break; |
| 152 | 151 | |
| 153 | case 0x | |
| 152 | case 0x | |
| 154 | 153 | if((data & 0x00ff) == 0x00ff) |
| 155 | 154 | return; |
| 156 | 155 | break; |
| r2454 | r2455 | |
|---|---|---|
| 36 | 36 | */ |
| 37 | 37 | |
| 38 | 38 | #include "driver.h" |
| 39 | #include "deprecat.h" | |
| 40 | 39 | |
| 41 | 40 | #include "video/konamiic.h" |
| 42 | 41 | #include "cpu/m68000/m68000.h" |
| r2454 | r2455 | |
| 119 | 118 | bit8 : freeze |
| 120 | 119 | bit9 : joysticks layout(auto detect???) |
| 121 | 120 | */ |
| 122 | return | |
| 121 | return input_port_ | |
| 123 | 122 | break; |
| 124 | 123 | |
| 125 | 124 | case 0x06/2: |
| r2454 | r2455 | |
| 163 | 162 | } |
| 164 | 163 | |
| 165 | 164 | if (!(data & 0x40)) |
| 166 | cpunum_set_input_line( | |
| 165 | cpunum_set_input_line(machine, 0, MC68000_IRQ_5, CLEAR_LINE); | |
| 167 | 166 | break; |
| 168 | 167 | |
| 169 | 168 | case 0x0c/2: |
| r2454 | r2455 | |
| 193 | 192 | static WRITE16_HANDLER( sound_irq_w ) |
| 194 | 193 | { |
| 195 | 194 | if (ACCESSING_BITS_8_15) |
| 196 | cpunum_set_input_line( | |
| 195 | cpunum_set_input_line(machine, 1, 0, HOLD_LINE); | |
| 197 | 196 | } |
| 198 | 197 | |
| 199 | 198 | static READ16_HANDLER( sound_status_msb_r ) |
| r2454 | r2455 | |
| 266 | 265 | memory_set_bankptr(2, memory_region(REGION_CPU2) + 0x10000 + (data & 0x07) * 0x4000); |
| 267 | 266 | |
| 268 | 267 | if (data & 0x10) |
| 269 | cpunum_set_input_line( | |
| 268 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, CLEAR_LINE); | |
| 270 | 269 | } |
| 271 | 270 | |
| 272 | 271 | static INTERRUPT_GEN(audio_interrupt) |
| r2454 | r2455 | |
|---|---|---|
| 168 | 168 | |
| 169 | 169 | static WRITE32_HANDLER(FlipCount_w) |
| 170 | 170 | { |
| 171 | if( | |
| 171 | if( | |
| 172 | 172 | { |
| 173 | 173 | int fc=(data>>16)&0xff; |
| 174 | 174 | if(fc==1) |
| r2454 | r2455 | |
| 200 | 200 | static WRITE32_HANDLER(IntAck_w) |
| 201 | 201 | { |
| 202 | 202 | UINT32 IntPend=program_read_dword_32le(0x01800c0c); |
| 203 | if( | |
| 203 | if( | |
| 204 | 204 | { |
| 205 | 205 | IntPend&=~(1<<(data&0x1f)); |
| 206 | 206 | program_write_dword_32le(0x01800c0c,IntPend); |
| 207 | 207 | if(!IntPend) |
| 208 | 208 | cpunum_set_input_line(machine, 0,SE3208_INT,CLEAR_LINE); |
| 209 | 209 | } |
| 210 | if( | |
| 210 | if( | |
| 211 | 211 | IntHigh=(data>>8)&7; |
| 212 | 212 | } |
| 213 | 213 |
| r2454 | r2455 | |
|---|---|---|
| 304 | 304 | |
| 305 | 305 | static WRITE8_HANDLER( wdclr_w ) |
| 306 | 306 | { |
| 307 | cpunum_set_input_line( | |
| 307 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 308 | 308 | watchdog_reset(Machine); |
| 309 | 309 | } |
| 310 | 310 |
| r2454 | r2455 | |
|---|---|---|
| 325 | 325 | #if 0 // doesn't work for some reason |
| 326 | 326 | static WRITE8_HANDLER(soundcpu_reset_w) |
| 327 | 327 | { |
| 328 | cpunum_set_input_line( | |
| 328 | cpunum_set_input_line(machine, 2, INPUT_LINE_RESET, (data & 0x01) ? ASSERT_LINE : CLEAR_LINE); | |
| 329 | 329 | } |
| 330 | 330 | #endif |
| 331 | 331 | |
| r2454 | r2455 | |
| 723 | 723 | |
| 724 | 724 | static const struct YM2203interface ym2203_interface = |
| 725 | 725 | { |
| 726 | 0, | |
| 727 | 0, | |
| 728 | 0, | |
| 729 | 0, | |
| 726 | { | |
| 727 | AY8910_LEGACY_OUTPUT, | |
| 728 | AY8910_DEFAULT_LOADS, | |
| 729 | NULL, NULL, NULL, NULL | |
| 730 | }, | |
| 730 | 731 | irqhandler |
| 731 | 732 | }; |
| 732 | 733 |
| r2454 | r2455 | |
|---|---|---|
| 97 | 97 | |
| 98 | 98 | static const struct YM2203interface ym2203_interface = |
| 99 | 99 | { |
| 100 | input_port_0_r, | |
| 101 | input_port_1_r, | |
| 102 | ym_port_w1, | |
| 103 | ym_port_w2 | |
| 100 | { | |
| 101 | AY8910_LEGACY_OUTPUT, | |
| 102 | AY8910_DEFAULT_LOADS, | |
| 103 | input_port_0_r, | |
| 104 | input_port_1_r, | |
| 105 | ym_port_w1, | |
| 106 | ym_port_w2 | |
| 107 | }, | |
| 104 | 108 | }; |
| 105 | 109 | |
| 106 | 110 | static WRITE8_HANDLER( chinsan_port00_w ) |
| r2454 | r2455 | |
|---|---|---|
| 242 | 242 | { |
| 243 | 243 | paletteram[offset]=data; |
| 244 | 244 | offset&=0xff; |
| 245 | palette_set_color_rgb( | |
| 245 | palette_set_color_rgb(machine, offset, pal4bit(paletteram[offset] >> 4), pal4bit(paletteram[offset]), pal4bit(paletteram[offset+0x100])); | |
| 246 | 246 | } |
| 247 | 247 | |
| 248 | 248 | static WRITE8_HANDLER(pal2_w) |
| 249 | 249 | { |
| 250 | 250 | paletteram[offset]=data; |
| 251 | 251 | offset&=0x1ff; |
| 252 | palette_set_color_rgb( | |
| 252 | palette_set_color_rgb(machine, offset, pal4bit(paletteram[offset] >> 4), pal4bit(paletteram[offset]), pal4bit(paletteram[offset+0x200])); | |
| 253 | 253 | } |
| 254 | 254 | |
| 255 | 255 | static READ8_HANDLER(pal_r) |
| r2454 | r2455 | |
|---|---|---|
| 99 | 99 | VIDEO_UPDATE( turbofrc ); |
| 100 | 100 | VIDEO_UPDATE( aerofgt ); |
| 101 | 101 | VIDEO_UPDATE( aerfboot ); |
| 102 | VIDEO_UPDATE( aerfboo2 ); | |
| 102 | 103 | VIDEO_START( wbbc97 ); |
| 103 | 104 | VIDEO_UPDATE( wbbc97 ); |
| 104 | 105 | |
| r2454 | r2455 | |
| 362 | 363 | AM_RANGE(0x0e0000, 0x0e3fff) AM_RAM AM_BASE(&aerofgt_spriteram1) AM_SIZE(&aerofgt_spriteram1_size) |
| 363 | 364 | AM_RANGE(0x0e4000, 0x0e7fff) AM_RAM AM_BASE(&aerofgt_spriteram2) AM_SIZE(&aerofgt_spriteram2_size) |
| 364 | 365 | AM_RANGE(0x0f8000, 0x0fbfff) AM_RAM /* work RAM */ |
| 365 | AM_RANGE(0x0fc000, 0x0fc7ff) AM_RAM | |
| 366 | AM_RANGE(0x0fc000, 0x0fc7ff) AM_RAM | |
| 366 | 367 | AM_RANGE(0x0fd000, 0x0fd7ff) AM_RAM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16) |
| 367 | 368 | AM_RANGE(0x0fe000, 0x0fe001) AM_READ(input_port_0_word_r) |
| 368 | 369 | AM_RANGE(0x0fe002, 0x0fe003) AM_READ(input_port_1_word_r) |
| r2454 | r2455 | |
| 377 | 378 | AM_RANGE(0x0fe400, 0x0fe401) AM_WRITENOP |
| 378 | 379 | AM_RANGE(0x0fe402, 0x0fe403) AM_WRITENOP |
| 379 | 380 | AM_RANGE(0x0ff000, 0x0fffff) AM_RAM AM_BASE(&aerofgt_rasterram) /* used only for the scroll registers */ |
| 380 | AM_RANGE(0x108000, 0x10bfff) AM_RAM AM_BASE(&aerofgt_spriteram3) AM_SIZE(&aerofgt_spriteram3_size) | |
| 381 | 381 | ADDRESS_MAP_END |
| 382 | 382 | |
| 383 | 383 | static ADDRESS_MAP_START( wbbc97_map, ADDRESS_SPACE_PROGRAM, 16 ) |
| r2454 | r2455 | |
| 1687 | 1687 | MDRV_PALETTE_LENGTH(1024) |
| 1688 | 1688 | |
| 1689 | 1689 | MDRV_VIDEO_START(turbofrc) |
| 1690 | MDRV_VIDEO_UPDATE(aerfboo | |
| 1690 | MDRV_VIDEO_UPDATE(aerfboo2) | |
| 1691 | 1691 | |
| 1692 | 1692 | /* sound hardware */ |
| 1693 | 1693 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| r2454 | r2455 | |
| 2459 | 2459 | GAME( 1992, aerofgtc, aerofgt, aerofgtb, aerofgtb, 0, ROT270, "Video System Co.", "Aero Fighters (Turbo Force hardware set 2)", GAME_NO_COCKTAIL ) |
| 2460 | 2460 | GAME( 1992, sonicwi, aerofgt, aerofgtb, aerofgtb, 0, ROT270, "Video System Co.", "Sonic Wings (Japan)", GAME_NO_COCKTAIL ) |
| 2461 | 2461 | GAME( 1992, aerfboot, aerofgt, aerfboot, aerofgtb, 0, ROT270, "bootleg", "Aero Fighters (bootleg set 1)", GAME_NO_COCKTAIL | GAME_NO_SOUND ) |
| 2462 | GAME( 1992, aerfboo2, aerofgt, aerfboo2, aerofgtb, 0, ROT270, "bootleg", "Aero Fighters (bootleg set 2)", GAME_NO_COCKTAIL | GAME_NO_SOUND | |
| 2462 | GAME( 1992, aerfboo2, aerofgt, aerfboo2, aerofgtb, 0, ROT270, "bootleg", "Aero Fighters (bootleg set 2)", GAME_NO_COCKTAIL | GAME_NO_SOUND | |
| 2463 | 2463 | GAME( 1997, wbbc97, 0, wbbc97, wbbc97, 0, ROT0, "Comad", "Beach Festival World Championship 1997", GAME_NO_COCKTAIL ) |
| r2454 | r2455 | |
|---|---|---|
| 17 | 17 | ***************************************************************************/ |
| 18 | 18 | |
| 19 | 19 | #include "driver.h" |
| 20 | #include "deprecat.h" | |
| 21 | 20 | #include "includes/fgoal.h" |
| 22 | 21 | |
| 23 | 22 | UINT8* fgoal_video_ram; |
| r2454 | r2455 | |
| 129 | 128 | |
| 130 | 129 | static READ8_HANDLER( fgoal_nmi_reset_r ) |
| 131 | 130 | { |
| 132 | cpunum_set_input_line( | |
| 131 | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, CLEAR_LINE); | |
| 133 | 132 | |
| 134 | 133 | return 0; |
| 135 | 134 | } |
| r2454 | r2455 | |
| 137 | 136 | |
| 138 | 137 | static READ8_HANDLER( fgoal_irq_reset_r ) |
| 139 | 138 | { |
| 140 | cpunum_set_input_line( | |
| 139 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 141 | 140 | |
| 142 | 141 | return 0; |
| 143 | 142 | } |
| r2454 | r2455 | |
|---|---|---|
| 621 | 621 | |
| 622 | 622 | static const struct AY8910interface ay8912_interface = |
| 623 | 623 | { |
| 624 | input_port_4_r | |
| 624 | AY8910_LEGACY_OUTPUT, | |
| 625 | AY8910_DEFAULT_LOADS, | |
| 626 | input_port_4_r, | |
| 627 | NULL, | |
| 628 | NULL, | |
| 629 | NULL | |
| 625 | 630 | }; |
| 626 | 631 | |
| 627 | 632 | static MACHINE_DRIVER_START( coinmstr ) |
| r2454 | r2455 | |
|---|---|---|
| 223 | 223 | static WRITE16_HANDLER( galsnew_paletteram_w ) |
| 224 | 224 | { |
| 225 | 225 | data = COMBINE_DATA(&paletteram16[offset]); |
| 226 | palette_set_color_rgb( | |
| 226 | palette_set_color_rgb(machine,offset,pal5bit(data >> 6),pal5bit(data >> 11),pal5bit(data >> 1)); | |
| 227 | 227 | } |
| 228 | 228 | |
| 229 | 229 | static WRITE16_HANDLER( galsnew_6295_bankswitch_w ) |
| r2454 | r2455 | |
|---|---|---|
| 143 | 143 | static WRITE16_HANDLER( K056800_68k_w ) |
| 144 | 144 | { |
| 145 | 145 | if (ACCESSING_BITS_8_15) |
| 146 | K056800_sound_w(machine, (offset*2)+0, (data >> 8) & 0xff, 0x | |
| 146 | K056800_sound_w(machine, (offset*2)+0, (data >> 8) & 0xff, 0x00ff); | |
| 147 | 147 | |
| 148 | 148 | if (ACCESSING_BITS_0_7) |
| 149 | K056800_sound_w(machine, (offset*2)+1, (data >> 0) & 0xff, 0x | |
| 149 | K056800_sound_w(machine, (offset*2)+1, (data >> 0) & 0xff, 0x00ff); | |
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 16 ) |
| r2454 | r2455 | |
|---|---|---|
| 71 | 71 | */ |
| 72 | 72 | |
| 73 | 73 | #include "driver.h" |
| 74 | #include "deprecat.h" | |
| 75 | 74 | #include "sound/ay8910.h" |
| 76 | 75 | #include "sound/namco.h" |
| 77 | 76 | |
| r2454 | r2455 | |
| 100 | 99 | sound_fetched = 0; |
| 101 | 100 | sound_command = data; |
| 102 | 101 | sound_cpu_ready = 0; |
| 103 | cpunum_set_input_line( | |
| 102 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, PULSE_LINE); | |
| 104 | 103 | } |
| 105 | 104 | |
| 106 | 105 | static READ8_HANDLER( sound_command_r ) |
| r2454 | r2455 | |
| 117 | 116 | |
| 118 | 117 | static READ8_HANDLER( mainsnk_port_0_r ) |
| 119 | 118 | { |
| 120 | int result = input_port_ | |
| 119 | int result = input_port_ | |
| 121 | 120 | if( !sound_cpu_ready ) result |= 0x20; |
| 122 | 121 | return result; |
| 123 | 122 | } |
| r2454 | r2455 | |
|---|---|---|
| 69 | 69 | ***************************************************************************/ |
| 70 | 70 | |
| 71 | 71 | #include "driver.h" |
| 72 | #include "deprecat.h" | |
| 73 | 72 | #include "machine/z80ctc.h" |
| 74 | 73 | #include "machine/z80pio.h" |
| 75 | 74 | #include "sound/sn76496.h" |
| r2454 | r2455 | |
| 155 | 154 | b = (data >> 2) & 0x0c; |
| 156 | 155 | if (b) b |= i; |
| 157 | 156 | |
| 158 | palette_set_color_rgb( | |
| 157 | palette_set_color_rgb(machine,offset,pal4bit(r),pal4bit(g),pal4bit(b)); | |
| 159 | 158 | } |
| 160 | 159 | |
| 161 | 160 |
| r2454 | r2455 | |
|---|---|---|
| 352 | 352 | */ |
| 353 | 353 | if (((oldval ^ data) & 0x40) && !(data & 0x40)) watchdog_reset_w(machine,0,0); |
| 354 | 354 | segaic16_set_display_enable(data & 0x20); |
| 355 | cpunum_set_input_line( | |
| 355 | cpunum_set_input_line(machine, 2, INPUT_LINE_RESET, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE); | |
| 356 | 356 | return; |
| 357 | 357 | |
| 358 | 358 | case 3: |
| r2454 | r2455 | |
| 482 | 482 | |
| 483 | 483 | static WRITE16_HANDLER( smgp_excs_w ) |
| 484 | 484 | { |
| 485 | logerror("%06X:smgp_excs_w(%04X) = %04X & %04X\n", activecpu_get_pc(), offset*2, data, mem_mask | |
| 485 | logerror("%06X:smgp_excs_w(%04X) = %04X & %04X\n", activecpu_get_pc(), offset*2, data, mem_mask | |
| 486 | 486 | } |
| 487 | 487 | |
| 488 | 488 |
| r2454 | r2455 | |
|---|---|---|
| 71 | 71 | if (last == 0 && data == 1) |
| 72 | 72 | { |
| 73 | 73 | /* setting bit 0 low then high triggers IRQ on the sound CPU */ |
| 74 | cpunum_set_input_line( | |
| 74 | cpunum_set_input_line(machine, 1,M6809_FIRQ_LINE,HOLD_LINE); | |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | last = data; |
| r2454 | r2455 | |
|---|---|---|
| 81 | 81 | |
| 82 | 82 | |
| 83 | 83 | #include "driver.h" |
| 84 | #include "deprecat.h" | |
| 85 | 84 | #include "cpu/i8051/i8051.h" |
| 86 | 85 | #include "sound/okim6295.h" |
| 87 | 86 |
| r2454 | r2455 | |
|---|---|---|
| 91 | 91 | extern void decrypt156(void); |
| 92 | 92 | |
| 93 | 93 | #include "driver.h" |
| 94 | #include "deprecat.h" | |
| 95 | 94 | #include "decocrpt.h" |
| 96 | 95 | #include "deco32.h" |
| 97 | 96 | #include "cpu/arm/arm.h" |
| r2454 | r2455 | |
| 164 | 163 | color = offset; |
| 165 | 164 | |
| 166 | 165 | dat = paletteram16[offset]&0xffff; |
| 167 | palette_set_color_rgb( | |
| 166 | palette_set_color_rgb(machine,color,pal5bit(dat >> 0),pal5bit(dat >> 5),pal5bit(dat >> 10)); | |
| 168 | 167 | } |
| 169 | 168 | |
| 170 | 169 |
| r2454 | r2455 | |
|---|---|---|
| 38 | 38 | |
| 39 | 39 | static WRITE8_HANDLER( hcastle_soundirq_w ) |
| 40 | 40 | { |
| 41 | cpunum_set_input_line( | |
| 41 | cpunum_set_input_line(machine, 1, 0, HOLD_LINE ); | |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | static WRITE8_HANDLER( hcastle_coin_w ) |
| r2454 | r2455 | |
|---|---|---|
| 190 | 190 | static READ8_HANDLER( cliff_irq_ack_r ) |
| 191 | 191 | { |
| 192 | 192 | /* deassert IRQ on the CPU */ |
| 193 | cpunum_set_input_line( | |
| 193 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 194 | 194 | |
| 195 | 195 | return 0x00; |
| 196 | 196 | } |
| r2454 | r2455 | |
|---|---|---|
| 282 | 282 | static WRITE8_HANDLER( gekitsui_int_w ) |
| 283 | 283 | { |
| 284 | 284 | // if (errorlog) fprintf(errorlog,"%04x: CPU 2 causes NMI\n",cpu_get_pc()); |
| 285 | cpunum_set_input_line( | |
| 285 | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, ASSERT_LINE); | |
| 286 | 286 | } |
| 287 | 287 | static WRITE8_HANDLER( gekitsui_int2_w ) // not used.. |
| 288 | 288 | { |
| 289 | 289 | // if (errorlog) fprintf(errorlog,"%04x: CPU 1 causes IRQ\n",cpu_get_pc()); |
| 290 | cpunum_set_input_line( | |
| 290 | cpunum_set_input_line(machine, 1, M6809_IRQ_LINE, ASSERT_LINE); | |
| 291 | 291 | } |
| 292 | 292 | #endif |
| 293 | 293 | |
| 294 | 294 | static WRITE8_HANDLER( gekitsui_sub_irq_ack ) |
| 295 | 295 | { |
| 296 | cpunum_set_input_line( | |
| 296 | cpunum_set_input_line(machine, 1, M6809_IRQ_LINE, CLEAR_LINE); | |
| 297 | 297 | } |
| 298 | 298 | |
| 299 | 299 | #if 0 |
| 300 | 300 | static WRITE8_HANDLER( cntsteer_int_w ) |
| 301 | 301 | { |
| 302 | cpunum_set_input_line( | |
| 302 | cpunum_set_input_line(machine, 0, M6809_IRQ_LINE, ASSERT_LINE); | |
| 303 | 303 | } |
| 304 | 304 | #endif |
| 305 | 305 | |
| r2454 | r2455 | |
| 311 | 311 | static WRITE8_HANDLER( zerotrgt_ctrl_w ) |
| 312 | 312 | { |
| 313 | 313 | logerror("CTRL: %04x: %04x: %04x\n",activecpu_get_pc(),offset,data); |
| 314 | // if (offset==0) cpunum_set_input_line( | |
| 314 | // if (offset==0) cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, ASSERT_LINE); | |
| 315 | 315 | |
| 316 | 316 | // Wrong - bits 0 & 1 used on this |
| 317 | if (offset==1) cpunum_set_input_line(Machine, 1, M6809_IRQ_LINE, ASSERT_LINE); | |
| 318 | // if (offset==2) cpunum_set_input_line(Machine, 1, INPUT_LINE_RESET, CLEAR_LINE); | |
| 317 | if (offset==1) cpunum_set_input_line(machine, 1, M6809_IRQ_LINE, ASSERT_LINE); | |
| 318 | // if (offset==2) cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, CLEAR_LINE); | |
| 319 | 319 | } |
| 320 | 320 | |
| 321 | 321 | #if 0 |
| r2454 | r2455 | |
|---|---|---|
| 16 | 16 | ***************************************************************************/ |
| 17 | 17 | |
| 18 | 18 | #include "driver.h" |
| 19 | #include "deprecat.h" | |
| 20 | 19 | #include "cpu/m6805/m6805.h" |
| 21 | 20 | #include "sound/ay8910.h" |
| 22 | 21 | #include "sound/dac.h" |
| r2454 | r2455 | |
| 214 | 213 | if (~data & 0x02) |
| 215 | 214 | { |
| 216 | 215 | portA_in = from_main; |
| 217 | if (main_sent) cpunum_set_input_line( | |
| 216 | if (main_sent) cpunum_set_input_line(machine, 2,0,CLEAR_LINE); | |
| 218 | 217 | main_sent = 0; |
| 219 | 218 | } |
| 220 | 219 | |
| r2454 | r2455 | |
| 432 | 431 | |
| 433 | 432 | static const struct AY8910interface ay8910_interface = |
| 434 | 433 | { |
| 435 | 0, | |
| 436 | 0, | |
| 434 | AY8910_LEGACY_OUTPUT, | |
| 435 | AY8910_DEFAULT_LOADS, | |
| 436 | NULL, | |
| 437 | NULL, | |
| 437 | 438 | DAC_0_signed_data_w, |
| 438 | 439 | portb_w |
| 439 | 440 | }; |
| r2454 | r2455 | |
|---|---|---|
| 11 | 11 | ***************************************************************************/ |
| 12 | 12 | |
| 13 | 13 | #include "driver.h" |
| 14 | #include "deprecat.h" | |
| 15 | 14 | #include "cpu/hd6309/hd6309.h" |
| 16 | 15 | #include "cpu/z80/z80.h" |
| 17 | 16 | #include "video/konamiic.h" |
| r2454 | r2455 | |
| 30 | 29 | |
| 31 | 30 | static WRITE8_HANDLER( battlnts_sh_irqtrigger_w ) |
| 32 | 31 | { |
| 33 | cpunum_set_input_line_and_vector( | |
| 32 | cpunum_set_input_line_and_vector(machine, 1, 0, HOLD_LINE, 0xff); | |
| 34 | 33 | } |
| 35 | 34 | |
| 36 | 35 | static WRITE8_HANDLER( battlnts_bankswitch_w ) |
| r2454 | r2455 | |
|---|---|---|
| 282 | 282 | if ((offset*2)==0x104) { dblwings_104_data = data; return; } // p1 inputs select screen OK |
| 283 | 283 | if ((offset*2)==0x200) { dblwings_200_data = data; return; } |
| 284 | 284 | if ((offset*2)==0x28c) { dblwings_28c_data = data; return; } |
| 285 | if ((offset*2)==0x380) { soundlatch_w(machine,0,data&0xff); /*cpunum_set_input_line( | |
| 285 | if ((offset*2)==0x380) { soundlatch_w(machine,0,data&0xff); /*cpunum_set_input_line(machine, 1,0,HOLD_LINE);*/ return; } // sound write | |
| 286 | 286 | if ((offset*2)==0x38e) { dblwings_38e_data = data; return; } |
| 287 | 287 | if ((offset*2)==0x406) { dblwings_406_data = data; return; } // p2 inputs select screen OK |
| 288 | 288 | if ((offset*2)==0x408) { dblwings_408_data = data; return; } // 3rd player 1st level? |
| r2454 | r2455 | |
|---|---|---|
| 332 | 332 | |
| 333 | 333 | static const struct AY8910interface ay8910_interface = |
| 334 | 334 | { |
| 335 | 0, | |
| 336 | 0, | |
| 335 | AY8910_LEGACY_OUTPUT, | |
| 336 | AY8910_DEFAULT_LOADS, | |
| 337 | NULL, | |
| 338 | NULL, | |
| 337 | 339 | ay8910_porta_w, |
| 338 | 340 | ay8910_portb_w |
| 339 | 341 | }; |
| r2454 | r2455 | |
|---|---|---|
| 224 | 224 | |
| 225 | 225 | static const struct YM2203interface ym2203_interface_1 = |
| 226 | 226 | { |
| 227 | input_port_0_r, | |
| 228 | input_port_1_r | |
| 227 | { | |
| 228 | AY8910_LEGACY_OUTPUT, | |
| 229 | AY8910_DEFAULT_LOADS, | |
| 230 | input_port_0_r, | |
| 231 | input_port_1_r, | |
| 232 | NULL, | |
| 233 | NULL | |
| 234 | }, | |
| 235 | NULL | |
| 229 | 236 | }; |
| 230 | 237 | |
| 231 | 238 | static const struct YM2203interface ym2203_interface_2 = |
| 232 | 239 | { |
| 233 | 0, | |
| 234 | input_port_2_r | |
| 240 | { | |
| 241 | AY8910_LEGACY_OUTPUT, | |
| 242 | AY8910_DEFAULT_LOADS, | |
| 243 | NULL, | |
| 244 | input_port_2_r, | |
| 245 | NULL, | |
| 246 | NULL | |
| 247 | }, | |
| 248 | NULL | |
| 235 | 249 | }; |
| 236 | 250 | |
| 237 | 251 |
| r2454 | r2455 | |
|---|---|---|
| 82 | 82 | |
| 83 | 83 | |
| 84 | 84 | #include "driver.h" |
| 85 | #include "deprecat.h" | |
| 86 | 85 | #include "cpu/z80/z80.h" |
| 87 | 86 | #include "sound/ay8910.h" |
| 88 | 87 | #include "video/resnet.h" |
| r2454 | r2455 | |
| 221 | 220 | static WRITE8_HANDLER( shougi_mcu_halt_off_w ) |
| 222 | 221 | { |
| 223 | 222 | /* logerror("mcu HALT OFF"); */ |
| 224 | cpunum_set_input_line( | |
| 223 | cpunum_set_input_line(machine, 2, INPUT_LINE_HALT, CLEAR_LINE); | |
| 225 | 224 | } |
| 226 | 225 | |
| 227 | 226 | static WRITE8_HANDLER( shougi_mcu_halt_on_w ) |
| 228 | 227 | { |
| 229 | 228 | /* logerror("mcu HALT ON"); */ |
| 230 | cpunum_set_input_line( | |
| 229 | cpunum_set_input_line(machine, 2, INPUT_LINE_HALT,ASSERT_LINE); | |
| 231 | 230 | } |
| 232 | 231 | |
| 233 | 232 | |
| r2454 | r2455 | |
| 238 | 237 | nmi_enabled = 0; /* disable NMIs */ |
| 239 | 238 | |
| 240 | 239 | /* NMI lines are tied together on both CPUs and connected to the LS74 /Q output */ |
| 241 | cpunum_set_input_line(Machine, 0, INPUT_LINE_NMI, CLEAR_LINE); | |
| 242 | cpunum_set_input_line(Machine, 1, INPUT_LINE_NMI, CLEAR_LINE); | |
| 240 | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, CLEAR_LINE); | |
| 241 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, CLEAR_LINE); | |
| 243 | 242 | } |
| 244 | 243 | |
| 245 | 244 | static WRITE8_HANDLER( nmi_enable_w ) |
| r2454 | r2455 | |
|---|---|---|
| 416 | 416 | } |
| 417 | 417 | else if (offset >= 0x18000/4) |
| 418 | 418 | { |
| 419 | update_palette_color( | |
| 419 | update_palette_color(machine, chip, 0x18000, offset - (0x18000/4)); | |
| 420 | 420 | } |
| 421 | 421 | } |
| 422 | 422 | else |
| 423 | 423 | { |
| 424 | 424 | if (offset < 0x8000/4) |
| 425 | 425 | { |
| 426 | update_palette_color( | |
| 426 | update_palette_color(machine, chip, 0, offset); | |
| 427 | 427 | } |
| 428 | 428 | else if (offset >= 0x8000/4 && offset < 0x18000/4) |
| 429 | 429 | { |
| r2454 | r2455 | |
| 643 | 643 | { |
| 644 | 644 | if (data & 0x80) /* CG Board 1 IRQ Ack */ |
| 645 | 645 | { |
| 646 | cpunum_set_input_line( | |
| 646 | cpunum_set_input_line(machine, 0, INPUT_LINE_IRQ1, CLEAR_LINE); | |
| 647 | 647 | } |
| 648 | 648 | if (data & 0x40) /* CG Board 0 IRQ Ack */ |
| 649 | 649 | { |
| 650 | cpunum_set_input_line( | |
| 650 | cpunum_set_input_line(machine, 0, INPUT_LINE_IRQ0, CLEAR_LINE); | |
| 651 | 651 | } |
| 652 | 652 | set_cgboard_id((data >> 4) & 0x3); |
| 653 | 653 | } |
| r2454 | r2455 | |
|---|---|---|
| 201 | 201 | static WRITE8_HANDLER( pending_command_clear_w ) |
| 202 | 202 | { |
| 203 | 203 | pending_command = 0; |
| 204 | cpunum_set_input_line( | |
| 204 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, CLEAR_LINE); | |
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | |
| r2454 | r2455 | |
| 533 | 533 | |
| 534 | 534 | static const struct YM2608interface ym2608_interface = |
| 535 | 535 | { |
| 536 | 0,0,0,0,irqhandler, | |
| 536 | { | |
| 537 | AY8910_LEGACY_OUTPUT, | |
| 538 | AY8910_DEFAULT_LOADS, | |
| 539 | NULL, NULL, NULL, NULL | |
| 540 | }, | |
| 541 | irqhandler, | |
| 537 | 542 | REGION_SOUND1 |
| 538 | 543 | }; |
| 539 | 544 |
| r2454 | r2455 | |
|---|---|---|
| 120 | 120 | ***************************************************************************/ |
| 121 | 121 | |
| 122 | 122 | #include "driver.h" |
| 123 | #include "deprecat.h" | |
| 124 | 123 | #include "sound/pokey.h" |
| 125 | 124 | #include "ccastles.h" |
| 126 | 125 | |
| r2454 | r2455 | |
| 265 | 264 | { |
| 266 | 265 | if (irq_state) |
| 267 | 266 | { |
| 268 | cpunum_set_input_line( | |
| 267 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 269 | 268 | irq_state = 0; |
| 270 | 269 | } |
| 271 | 270 | } |
| r2454 | r2455 | |
|---|---|---|
| 61 | 61 | ****************************************************************************/ |
| 62 | 62 | |
| 63 | 63 | #include "driver.h" |
| 64 | #include "deprecat.h" | |
| 65 | 64 | #include "cpu/tms34010/tms34010.h" |
| 66 | 65 | #include "cpu/m6502/m6502.h" |
| 67 | 66 | #include "sound/dac.h" |
| r2454 | r2455 | |
| 156 | 155 | aimpos[which] = (aimpos[which] + trackball_diff) & 0x3f; |
| 157 | 156 | |
| 158 | 157 | /* Combine it with the standard input bits */ |
| 159 | port = which ? input_port_1_word_r(machine, 0, mem_mask) : | |
| 160 | input_port_0_word_r(machine, 0, mem_mask); | |
| 158 | port = which ? input_port_read_indexed(machine,1) : input_port_read_indexed(machine,0); | |
| 161 | 159 | |
| 162 | 160 | return (port & 0xc0ff) | (aimpos[which] << 8); |
| 163 | 161 | } |
| r2454 | r2455 | |
| 200 | 198 | { |
| 201 | 199 | /* Bit 13 = Resets the slave CPU */ |
| 202 | 200 | if ((data & 0x2000) && !(last & 0x2000)) |
| 203 | cpunum_set_input_line( | |
| 201 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, PULSE_LINE); | |
| 204 | 202 | |
| 205 | 203 | /* Bits 14-15 = Coin counters */ |
| 206 | 204 | coin_counter_w(0, data & 0x8000); |
| r2454 | r2455 | |
| 265 | 263 | static READ8_HANDLER( sound_master_latch_r ) |
| 266 | 264 | { |
| 267 | 265 | /* read latch and clear interrupt */ |
| 268 | cpunum_set_input_line( | |
| 266 | cpunum_set_input_line(machine, 2, M6502_IRQ_LINE, CLEAR_LINE); | |
| 269 | 267 | return master_sound_latch; |
| 270 | 268 | } |
| 271 | 269 | |
| r2454 | r2455 | |
| 273 | 271 | static READ8_HANDLER( sound_slave_latch_r ) |
| 274 | 272 | { |
| 275 | 273 | /* read latch and clear interrupt */ |
| 276 | cpunum_set_input_line( | |
| 274 | cpunum_set_input_line(machine, 3, M6502_IRQ_LINE, CLEAR_LINE); | |
| 277 | 275 | return slave_sound_latch; |
| 278 | 276 | } |
| 279 | 277 | |
| r2454 | r2455 | |
| 289 | 287 | static READ8_HANDLER( sound_nmi_to_slave_r ) |
| 290 | 288 | { |
| 291 | 289 | /* a read from here triggers an NMI pulse to the slave */ |
| 292 | cpunum_set_input_line( | |
| 290 | cpunum_set_input_line(machine, 3, INPUT_LINE_NMI, PULSE_LINE); | |
| 293 | 291 | return 0xff; |
| 294 | 292 | } |
| 295 | 293 |
| r2454 | r2455 | |
|---|---|---|
| 202 | 202 | static WRITE8_HANDLER( discoboy_port_03_w ) // sfx? (to sound cpu) |
| 203 | 203 | { |
| 204 | 204 | // printf("unk discoboy_port_03_w %02x\n",data); |
| 205 | // cpunum_set_input_line( | |
| 205 | // cpunum_set_input_line(machine, 1,INPUT_LINE_NMI,HOLD_LINE); | |
| 206 | 206 | soundlatch_w(machine,0,data); |
| 207 | 207 | cpunum_set_input_line(machine, 1,0,HOLD_LINE); |
| 208 | 208 | } |
| r2454 | r2455 | |
|---|---|---|
| 161 | 161 | |
| 162 | 162 | static const struct AY8910interface ay8910_interface_1 = |
| 163 | 163 | { |
| 164 | input_port_0_r | |
| 164 | AY8910_LEGACY_OUTPUT, | |
| 165 | AY8910_DEFAULT_LOADS, | |
| 166 | input_port_0_r, | |
| 167 | NULL, | |
| 168 | NULL, | |
| 169 | NULL | |
| 165 | 170 | }; |
| 166 | 171 | |
| 167 | 172 | static const struct AY8910interface ay8910_interface_2 = |
| 168 | 173 | { |
| 169 | input_port_1_r | |
| 174 | AY8910_LEGACY_OUTPUT, | |
| 175 | AY8910_DEFAULT_LOADS, | |
| 176 | input_port_1_r, | |
| 177 | NULL, | |
| 178 | NULL, | |
| 179 | NULL | |
| 170 | 180 | }; |
| 171 | 181 | |
| 172 | 182 |
| r2454 | r2455 | |
|---|---|---|
| 188 | 188 | /* toggling BSMT off then on causes a reset */ |
| 189 | 189 | if (!(old & 0x80000000) && (control_data & 0x80000000)) |
| 190 | 190 | { |
| 191 | BSMT2000_data_0_w(machine, bsmt_data_bank, 0, 0); | |
| 191 | BSMT2000_data_0_w(machine, bsmt_data_bank, 0, 0xffff); | |
| 192 | 192 | sndti_reset(SOUND_BSMT2000, 0); |
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | /* log any unknown bits */ |
| 196 | 196 | if (data & 0x4f1fffff) |
| 197 | logerror("%08X: control_w = %08X & %08X\n", activecpu_get_previouspc(), data, | |
| 197 | logerror("%08X: control_w = %08X & %08X\n", activecpu_get_previouspc(), data, | |
| 198 | 198 | } |
| 199 | 199 | |
| 200 | 200 | |
| r2454 | r2455 | |
| 208 | 208 | static WRITE32_HANDLER( bsmt2000_reg_w ) |
| 209 | 209 | { |
| 210 | 210 | if (control_data & 0x80000000) |
| 211 | BSMT2000_data_0_w(machine, bsmt_reg, data & 0xffff, mem_mask | |
| 211 | BSMT2000_data_0_w(machine, bsmt_reg, data & 0xffff, mem_mask & 0xffff | |
| 212 | 212 | else |
| 213 | 213 | COMBINE_DATA(&bsmt_data_offset); |
| 214 | 214 | } |
| r2454 | r2455 | |
|---|---|---|
| 841 | 841 | |
| 842 | 842 | static READ32_HANDLER( spi_int_r ) |
| 843 | 843 | { |
| 844 | cpunum_set_input_line( | |
| 844 | cpunum_set_input_line(machine, 0, 0,CLEAR_LINE ); | |
| 845 | 845 | return 0xffffffff; |
| 846 | 846 | } |
| 847 | 847 | |
| r2454 | r2455 | |
| 913 | 913 | if( ACCESSING_BITS_0_7 ) { |
| 914 | 914 | if( data & 0x1 ) { |
| 915 | 915 | z80_prg_fifo_pos = 0; |
| 916 | cpunum_set_input_line( | |
| 916 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, CLEAR_LINE ); | |
| 917 | 917 | } else { |
| 918 | cpunum_set_input_line( | |
| 918 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, ASSERT_LINE ); | |
| 919 | 919 | } |
| 920 | 920 | } |
| 921 | 921 | } |
| r2454 | r2455 | |
| 1008 | 1008 | UINT8 *sound = (UINT8*)memory_region(REGION_USER2); |
| 1009 | 1009 | UINT16 *sound16 = (UINT16*)memory_region(REGION_USER2); |
| 1010 | 1010 | |
| 1011 | if (mem_mask == 0x | |
| 1011 | if (mem_mask == 0x | |
| 1012 | 1012 | { |
| 1013 | 1013 | return sound[offset]; |
| 1014 | 1014 | } |
| 1015 | else if (mem_mask == 0x | |
| 1015 | else if (mem_mask == 0xffffffff) | |
| 1016 | 1016 | { |
| 1017 | 1017 | if (offset < 0x100000) |
| 1018 | 1018 | { |
| r2454 | r2455 | |
|---|---|---|
| 25 | 25 | ***************************************************************************/ |
| 26 | 26 | |
| 27 | 27 | #include "driver.h" |
| 28 | #include "deprecat.h" | |
| 29 | 28 | #include "cpu/tms34010/tms34010.h" |
| 30 | 29 | #include "cpu/tms34010/34010ops.h" |
| 31 | 30 | #include "cpu/tms32025/tms32025.h" |
| r2454 | r2455 | |
| 221 | 220 | coin_counter_w(0, ~data & 0x0001); |
| 222 | 221 | coin_counter_w(1, ~data & 0x0002); |
| 223 | 222 | |
| 224 | cpunum_set_input_line( | |
| 223 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, (data & 0x0400) ? ASSERT_LINE : CLEAR_LINE); | |
| 225 | 224 | |
| 226 | 225 | /* bits 10-15 are counted down over time */ |
| 227 | 226 | if (data & 0x0400) amerdart_iop_echo = 1; |
| r2454 | r2455 | |
| 298 | 297 | coin_counter_w(0, ~data & 0x0001); |
| 299 | 298 | coin_counter_w(1, ~data & 0x0002); |
| 300 | 299 | |
| 301 | cpunum_set_input_line( | |
| 300 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, (data & 0x0400) ? ASSERT_LINE : CLEAR_LINE); | |
| 302 | 301 | } |
| 303 | 302 | |
| 304 | 303 | |
| r2454 | r2455 | |
| 331 | 330 | static READ16_HANDLER( coolpool_iop_r ) |
| 332 | 331 | { |
| 333 | 332 | logerror("%08x:IOP read %04x\n",activecpu_get_pc(),iop_answer); |
| 334 | cpunum_set_input_line( | |
| 333 | cpunum_set_input_line(machine, 0, 1, CLEAR_LINE); | |
| 335 | 334 | |
| 336 | 335 | return iop_answer; |
| 337 | 336 | } |
| r2454 | r2455 | |
| 357 | 356 | { |
| 358 | 357 | logerror("%08x:IOP answer %04x\n",activecpu_get_pc(),data); |
| 359 | 358 | iop_answer = data; |
| 360 | cpunum_set_input_line( | |
| 359 | cpunum_set_input_line(machine, 0, 1, ASSERT_LINE); | |
| 361 | 360 | } |
| 362 | 361 | |
| 363 | 362 |
| r2454 | r2455 | |
|---|---|---|
| 39 | 39 | */ |
| 40 | 40 | |
| 41 | 41 | #include "driver.h" |
| 42 | #include "deprecat.h" | |
| 43 | 42 | #include "sound/okim6295.h" |
| 44 | 43 | |
| 45 | 44 | static tilemap *bg_tilemap, *mlow_tilemap, *mhigh_tilemap, *tx_tilemap; |
| r2454 | r2455 | |
| 124 | 123 | brightness = (double)(data & 0xff); |
| 125 | 124 | for (i=0;i<0x800;i++) |
| 126 | 125 | { |
| 127 | palette_set_brightness( | |
| 126 | palette_set_brightness(machine, i, brightness/255); | |
| 128 | 127 | } |
| 129 | 128 | } |
| 130 | 129 |
| r2454 | r2455 | |
|---|---|---|
| 150 | 150 | ***************************************************************************/ |
| 151 | 151 | |
| 152 | 152 | #include "driver.h" |
| 153 | #include "deprecat.h" | |
| 154 | 153 | #include "machine/namcoio.h" |
| 155 | 154 | #include "sound/namco.h" |
| 156 | 155 | #include "sound/samples.h" |
| r2454 | r2455 | |
| 275 | 274 | int bit = !BIT(offset,11); |
| 276 | 275 | cpu_interrupt_enable(0,bit); |
| 277 | 276 | if (!bit) |
| 278 | cpunum_set_input_line( | |
| 277 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 279 | 278 | } |
| 280 | 279 | |
| 281 | 280 | static WRITE8_HANDLER( gaplus_irq_3_ctrl_w ) |
| r2454 | r2455 | |
| 283 | 282 | int bit = !BIT(offset,13); |
| 284 | 283 | cpu_interrupt_enable(2,bit); |
| 285 | 284 | if (!bit) |
| 286 | cpunum_set_input_line( | |
| 285 | cpunum_set_input_line(machine, 2, 0, CLEAR_LINE); | |
| 287 | 286 | } |
| 288 | 287 | |
| 289 | 288 | static WRITE8_HANDLER( gaplus_irq_2_ctrl_w ) |
| r2454 | r2455 | |
| 291 | 290 | int bit = offset & 1; |
| 292 | 291 | cpu_interrupt_enable(1,bit); |
| 293 | 292 | if (!bit) |
| 294 | cpunum_set_input_line( | |
| 293 | cpunum_set_input_line(machine, 1, 0, CLEAR_LINE); | |
| 295 | 294 | } |
| 296 | 295 | |
| 297 | 296 | static WRITE8_HANDLER( gaplus_sreset_w ) |
| 298 | 297 | { |
| 299 | 298 | int bit = !BIT(offset,11); |
| 300 | cpunum_set_input_line(Machine, 1, INPUT_LINE_RESET, bit ? CLEAR_LINE : ASSERT_LINE); | |
| 301 | cpunum_set_input_line(Machine, 2, INPUT_LINE_RESET, bit ? CLEAR_LINE : ASSERT_LINE); | |
| 299 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, bit ? CLEAR_LINE : ASSERT_LINE); | |
| 300 | cpunum_set_input_line(machine, 2, INPUT_LINE_RESET, bit ? CLEAR_LINE : ASSERT_LINE); | |
| 302 | 301 | mappy_sound_enable(bit); |
| 303 | 302 | } |
| 304 | 303 |
| r2454 | r2455 | |
|---|---|---|
| 35 | 35 | */ |
| 36 | 36 | |
| 37 | 37 | #include "driver.h" |
| 38 | #include "deprecat.h" | |
| 39 | 38 | #include "machine/8255ppi.h" |
| 40 | 39 | #include "sound/ay8910.h" |
| 41 | 40 | |
| r2454 | r2455 | |
| 59 | 58 | { |
| 60 | 59 | a=paletteram[((i*8+j)*2)&0xff ]; |
| 61 | 60 | b=paletteram[((i*8+j)*2+1)&0xff ]; |
| 62 | palette_set_color_rgb( | |
| 61 | palette_set_color_rgb(machine,i*16+j,pal4bit(b),pal4bit(b>>4),pal4bit(a)); | |
| 63 | 62 | } |
| 64 | 63 | } |
| 65 | 64 | } |
| r2454 | r2455 | |
| 116 | 115 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 117 | 116 | AM_RANGE(0x00, 0x00) AM_READWRITE(AY8910_read_port_0_r, AY8910_write_port_0_w) |
| 118 | 117 | AM_RANGE(0x01, 0x01) AM_WRITE(AY8910_control_port_0_w) |
| 119 | AM_RANGE(0x10, 0x13) AM_READWRITE(ppi8255_0_r, ppi8255_0_w) | |
| 120 | AM_RANGE(0x80, 0x83) AM_READWRITE(ppi8255_1_r, ppi8255_1_w) | |
| 118 | AM_RANGE(0x10, 0x13) AM_DEVREADWRITE(PPI8255, "ppi8255_0", ppi8255_r, ppi8255_w) | |
| 119 | AM_RANGE(0x80, 0x83) AM_DEVREADWRITE(PPI8255, "ppi8255_1", ppi8255_r, ppi8255_w) | |
| 121 | 120 | ADDRESS_MAP_END |
| 122 | 121 | |
| 123 | 122 | /* Input Ports */ |
| r2454 | r2455 | |
| 221 | 220 | |
| 222 | 221 | static const struct AY8910interface ay8910_interface = |
| 223 | 222 | { |
| 224 | input_port_3_r,// DSWA | |
| 225 | input_port_4_r,// DSWB | |
| 226 | 0, | |
| 227 | 0 | |
| 223 | AY8910_LEGACY_OUTPUT, | |
| 224 | AY8910_DEFAULT_LOADS, | |
| 225 | input_port_3_r,// DSWA | |
| 226 | input_port_4_r,// DSWB | |
| 227 | NULL, | |
| 228 | NULL | |
| 228 | 229 | }; |
| 229 | 230 | |
| 230 | 231 | /* PPI8255 Interface */ |
| r2454 | r2455 | |
| 233 | 234 | static WRITE8_HANDLER( ppi8255_b_w ){}// lamps ? |
| 234 | 235 | static WRITE8_HANDLER( ppi8255_c_w ){} |
| 235 | 236 | |
| 236 | static const ppi8255_interface ppi8255_intf = | |
| 237 | static const ppi8255_interface ppi8255_intf[2] = | |
| 237 | 238 | { |
| 238 | 2, // 2 chips | |
| 239 | { input_port_0_r, NULL }, // Port A read | |
| 240 | { input_port_1_r, NULL }, // Port B read | |
| 241 | { input_port_2_r, NULL }, // Port C read | |
| 242 | { NULL, ppi8255_a_w }, // Port A write | |
| 243 | { NULL, ppi8255_b_w }, // Port B write | |
| 244 | { NULL, ppi8255_c_w }, // Port C write | |
| 239 | { | |
| 240 | input_port_0_r, // Port A read | |
| 241 | input_port_1_r, // Port B read | |
| 242 | input_port_2_r, // Port C read | |
| 243 | NULL, // Port A write | |
| 244 | NULL, // Port B write | |
| 245 | NULL // Port C write | |
| 246 | }, | |
| 247 | { | |
| 248 | NULL, // Port A read | |
| 249 | NULL, // Port B read | |
| 250 | NULL, // Port C read | |
| 251 | ppi8255_a_w, // Port A write | |
| 252 | ppi8255_b_w, // Port B write | |
| 253 | ppi8255_c_w // Port C write | |
| 254 | } | |
| 245 | 255 | }; |
| 246 | 256 | |
| 247 | /* Machine Initialization */ | |
| 248 | ||
| 249 | static MACHINE_RESET( vroulet ) | |
| 250 | { | |
| 251 | ppi8255_init(&ppi8255_intf); | |
| 252 | } | |
| 253 | ||
| 254 | 257 | /* Machine Driver */ |
| 255 | 258 | |
| 256 | 259 | static MACHINE_DRIVER_START( vroulet ) |
| r2454 | r2455 | |
| 260 | 263 | MDRV_CPU_IO_MAP(vroulet_io_map, 0) |
| 261 | 264 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 262 | 265 | |
| 263 | MDRV_MACHINE_RESET(vroulet) | |
| 264 | ||
| 265 | 266 | MDRV_NVRAM_HANDLER(generic_1fill) |
| 266 | 267 | |
| 268 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 269 | MDRV_DEVICE_CONFIG( ppi8255_intf[0] ) | |
| 270 | ||
| 271 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 272 | MDRV_DEVICE_CONFIG( ppi8255_intf[1] ) | |
| 273 | ||
| 267 | 274 | // video hardware |
| 268 | 275 | |
| 269 | 276 | MDRV_SCREEN_ADD("main", RASTER) |
| r2454 | r2455 | |
|---|---|---|
| 159 | 159 | |
| 160 | 160 | static const struct AY8910interface ay8910_interface = |
| 161 | 161 | { |
| 162 | AY8910_LEGACY_OUTPUT, | |
| 163 | AY8910_DEFAULT_LOADS, | |
| 162 | 164 | input_port_0_r, |
| 163 | 165 | input_port_1_r |
| 164 | 166 | }; |
| r2454 | r2455 | |
|---|---|---|
| 340 | 340 | |
| 341 | 341 | static const struct YM2203interface ym2203_interface = |
| 342 | 342 | { |
| 343 | 0, 0, 0, 0, | |
| 343 | { | |
| 344 | AY8910_LEGACY_OUTPUT, | |
| 345 | AY8910_DEFAULT_LOADS, | |
| 346 | NULL, NULL, NULL, NULL, | |
| 347 | }, | |
| 344 | 348 | irqhandler |
| 345 | 349 | }; |
| 346 | 350 |
| r2454 | r2455 | |
|---|---|---|
| 111 | 111 | ***************************************************************************/ |
| 112 | 112 | |
| 113 | 113 | #include "driver.h" |
| 114 | #include "deprecat.h" | |
| 115 | 114 | #include "cpu/m6502/m6502.h" |
| 116 | 115 | #include "jedi.h" |
| 117 | 116 | |
| r2454 | r2455 | |
| 142 | 141 | |
| 143 | 142 | static WRITE8_HANDLER( main_irq_ack_w ) |
| 144 | 143 | { |
| 145 | cpunum_set_input_line( | |
| 144 | cpunum_set_input_line(machine, 0, M6502_IRQ_LINE, CLEAR_LINE); | |
| 146 | 145 | } |
| 147 | 146 | |
| 148 | 147 |
| r2454 | r2455 | |
|---|---|---|
| 620 | 620 | } |
| 621 | 621 | } |
| 622 | 622 | } |
| 623 | if ( data & 0x1F ) cpunum_set_input_line( | |
| 623 | if ( data & 0x1F ) cpunum_set_input_line(machine, 0, M6809_FIRQ_LINE, ASSERT_LINE ); | |
| 624 | 624 | } |
| 625 | 625 | |
| 626 | 626 | /////////////////////////////////////////////////////////////////////////// |
| r2454 | r2455 | |
| 894 | 894 | |
| 895 | 895 | static READ8_HANDLER( coin_input_r ) |
| 896 | 896 | { |
| 897 | return input_port_ | |
| 897 | return input_port_ | |
| 898 | 898 | } |
| 899 | 899 | |
| 900 | 900 | /////////////////////////////////////////////////////////////////////////// |
| r2454 | r2455 | |
| 1072 | 1072 | |
| 1073 | 1073 | static WRITE8_HANDLER( vid_uart_tx_w ) |
| 1074 | 1074 | { |
| 1075 | send_to_adder( | |
| 1075 | send_to_adder(machine, data); | |
| 1076 | 1076 | } |
| 1077 | 1077 | |
| 1078 | 1078 | /////////////////////////////////////////////////////////////////////////// |
| r2454 | r2455 | |
|---|---|---|
| 190 | 190 | */ |
| 191 | 191 | |
| 192 | 192 | #include "driver.h" |
| 193 | #include "deprecat.h" | |
| 194 | 193 | #include "sound/es8712.h" |
| 195 | 194 | #include "sound/2203intf.h" |
| 196 | 195 | |
| r2454 | r2455 | |
| 366 | 365 | break; |
| 367 | 366 | |
| 368 | 367 | case 0x08: //A008 |
| 369 | cpunum_set_input_line( | |
| 368 | cpunum_set_input_line(machine, cpu_getactivecpu(),0,CLEAR_LINE); | |
| 370 | 369 | break; |
| 371 | 370 | } |
| 372 | 371 | } |
| r2454 | r2455 | |
| 416 | 415 | |
| 417 | 416 | static const struct YM2203interface ym2203_interface_0 = |
| 418 | 417 | { |
| 419 | portA_r, | |
| 420 | portB_r, | |
| 421 | NULL, | |
| 418 | { | |
| 419 | AY8910_LEGACY_OUTPUT, | |
| 420 | AY8910_DEFAULT_LOADS, | |
| 421 | portA_r, | |
| 422 | portB_r, | |
| 423 | NULL, | |
| 424 | NULL | |
| 425 | }, | |
| 422 | 426 | NULL |
| 423 | 427 | }; |
| 424 | 428 | |
| 425 | 429 | static const struct YM2203interface ym2203_interface_1 = |
| 426 | 430 | { |
| 427 | NULL, | |
| 428 | NULL, | |
| 429 | xscroll_w, | |
| 430 | yscroll_w | |
| 431 | { | |
| 432 | AY8910_LEGACY_OUTPUT, | |
| 433 | AY8910_DEFAULT_LOADS, | |
| 434 | NULL, | |
| 435 | NULL, | |
| 436 | xscroll_w, | |
| 437 | yscroll_w | |
| 438 | }, | |
| 439 | NULL | |
| 431 | 440 | }; |
| 432 | 441 | |
| 433 | 442 | static ADDRESS_MAP_START( map_main, ADDRESS_SPACE_PROGRAM, 8 ) |
| r2454 | r2455 | |
|---|---|---|
| 11 | 11 | ***************************************************************************/ |
| 12 | 12 | |
| 13 | 13 | #include "driver.h" |
| 14 | #include "deprecat.h" | |
| 15 | 14 | #include "cpu/z80/z80.h" |
| 16 | 15 | #include "cpu/hd6309/hd6309.h" |
| 17 | 16 | #include "sound/2151intf.h" |
| r2454 | r2455 | |
|---|---|---|
| 331 | 331 | int r = BITSWAP8((x >> 0) & 0x1f, 7,6,5, 0,1,2,3,4 ); |
| 332 | 332 | int g = BITSWAP8((x >> 5) & 0x1f, 7,6,5, 0,1,2,3,4 ); |
| 333 | 333 | int b = BITSWAP8((x >> 10) & 0x1f, 7,6,5, 0,1,2,3,4 ); |
| 334 | palette_set_color_rgb( | |
| 334 | palette_set_color_rgb(machine,256*palbank + offset,pal5bit(r),pal5bit(g),pal5bit(b)); | |
| 335 | 335 | } |
| 336 | 336 | } |
| 337 | 337 | |
| r2454 | r2455 | |
| 386 | 386 | int r = br & 0x1f; |
| 387 | 387 | int g = bg & 0x1f; |
| 388 | 388 | int b = ((bg & 0xc0)>>3) | ((br & 0xe0)>>5); |
| 389 | palette_set_color_rgb( | |
| 389 | palette_set_color_rgb(machine,256*palbank + offset,pal5bit(r),pal5bit(g),pal5bit(b)); | |
| 390 | 390 | } |
| 391 | 391 | } |
| 392 | 392 | |
| r2454 | r2455 | |
| 1263 | 1263 | int r = br & 0x1f; |
| 1264 | 1264 | int g = bg & 0x1f; |
| 1265 | 1265 | int b = ((bg & 0xc0)>>3) | ((br & 0xe0)>>5); |
| 1266 | palette_set_color_rgb( | |
| 1266 | palette_set_color_rgb(machine, 256*palbank + ((offset&0xf)|((offset&0x1e0)>>1)) ,pal5bit(r),pal5bit(g),pal5bit(b)); | |
| 1267 | 1267 | } |
| 1268 | 1268 | } |
| 1269 | 1269 | |
| r2454 | r2455 | |
| 3583 | 3583 | |
| 3584 | 3584 | static const struct YM2203interface hanamai_ym2203_interface = |
| 3585 | 3585 | { |
| 3586 | input_port_1_r, /* Port A Read: DSW */ | |
| 3587 | input_port_0_r, /* Port B Read: DSW */ | |
| 3588 | 0, /* Port A Write */ | |
| 3589 | 0, /* Port B Write */ | |
| 3586 | { | |
| 3587 | AY8910_LEGACY_OUTPUT, | |
| 3588 | AY8910_DEFAULT_LOADS, | |
| 3589 | input_port_1_r, /* Port A Read: DSW */ | |
| 3590 | input_port_0_r, /* Port B Read: DSW */ | |
| 3591 | NULL, /* Port A Write */ | |
| 3592 | NULL, /* Port B Write */ | |
| 3593 | }, | |
| 3590 | 3594 | sprtmtch_sound_callback /* IRQ handler */ |
| 3591 | 3595 | }; |
| 3592 | 3596 | |
| r2454 | r2455 | |
| 3650 | 3654 | |
| 3651 | 3655 | static const struct AY8910interface hnoridur_ay8910_interface = |
| 3652 | 3656 | { |
| 3657 | AY8910_LEGACY_OUTPUT, | |
| 3658 | AY8910_DEFAULT_LOADS, | |
| 3653 | 3659 | input_port_0_r /* Port A Read: DSW */ |
| 3654 | 3660 | }; |
| 3655 | 3661 | |
| r2454 | r2455 | |
| 3700 | 3706 | |
| 3701 | 3707 | static const struct YM2203interface sprtmtch_ym2203_interface = |
| 3702 | 3708 | { |
| 3703 | input_port_3_r, /* Port A Read: DSW */ | |
| 3704 | input_port_4_r, /* Port B Read: DSW */ | |
| 3705 | 0, /* Port A Write */ | |
| 3706 | 0, /* Port B Write */ | |
| 3709 | { | |
| 3710 | AY8910_LEGACY_OUTPUT, | |
| 3711 | AY8910_DEFAULT_LOADS, | |
| 3712 | input_port_3_r, /* Port A Read: DSW */ | |
| 3713 | input_port_4_r, /* Port B Read: DSW */ | |
| 3714 | NULL, /* Port A Write */ | |
| 3715 | NULL, /* Port B Write */ | |
| 3716 | }, | |
| 3707 | 3717 | sprtmtch_sound_callback, /* IRQ handler */ |
| 3708 | 3718 | }; |
| 3709 | 3719 | |
| r2454 | r2455 | |
| 3871 | 3881 | |
| 3872 | 3882 | static const struct YM2203interface jantouki_ym2203_interface = |
| 3873 | 3883 | { |
| 3874 | 0, /* Port A Read: DSW */ | |
| 3875 | 0, /* Port B Read: DSW */ | |
| 3876 | 0, /* Port A Write */ | |
| 3877 | 0, /* Port B Write */ | |
| 3884 | { | |
| 3885 | AY8910_LEGACY_OUTPUT, | |
| 3886 | AY8910_DEFAULT_LOADS, | |
| 3887 | NULL, NULL, NULL, NULL | |
| 3888 | }, | |
| 3878 | 3889 | jantouki_sound_callback /* IRQ handler */ |
| 3879 | 3890 | }; |
| 3880 | 3891 | |
| r2454 | r2455 | |
| 4042 | 4053 | |
| 4043 | 4054 | static const struct AY8910interface htengoku_ay8910_interface = |
| 4044 | 4055 | { |
| 4056 | AY8910_LEGACY_OUTPUT, | |
| 4057 | AY8910_DEFAULT_LOADS, | |
| 4045 | 4058 | // A B |
| 4046 | 4059 | htengoku_dsw_r, 0, // R |
| 4047 | 4060 | 0, htengoku_dsw_w // W |
| r2454 | r2455 | |
| 4100 | 4113 | |
| 4101 | 4114 | static const struct AY8910interface tenkai_ay8910_interface = |
| 4102 | 4115 | { |
| 4116 | AY8910_LEGACY_OUTPUT, | |
| 4117 | AY8910_DEFAULT_LOADS, | |
| 4103 | 4118 | // A // B |
| 4104 | 4119 | tenkai_dsw_r, 0, // Read |
| 4105 | 4120 | 0, tenkai_dswsel_w // Write |
| r2454 | r2455 | |
|---|---|---|
| 275 | 275 | |
| 276 | 276 | static const struct YM2203interface ym2203_interface = |
| 277 | 277 | { |
| 278 | 0,0,0,0,shootout_snd_irq | |
| 278 | { | |
| 279 | AY8910_LEGACY_OUTPUT, | |
| 280 | AY8910_DEFAULT_LOADS, | |
| 281 | NULL, NULL, NULL, NULL | |
| 282 | }, | |
| 283 | shootout_snd_irq | |
| 279 | 284 | }; |
| 280 | 285 | |
| 281 | 286 | static const struct YM2203interface ym2203_interface2 = |
| 282 | 287 | { |
| 283 | 0, | |
| 284 | 0, | |
| 285 | shootout_bankswitch_w, | |
| 286 | shootout_flipscreen_w, | |
| 288 | { | |
| 289 | AY8910_LEGACY_OUTPUT, | |
| 290 | AY8910_DEFAULT_LOADS, | |
| 291 | NULL, | |
| 292 | NULL, | |
| 293 | shootout_bankswitch_w, | |
| 294 | shootout_flipscreen_w | |
| 295 | }, | |
| 287 | 296 | shootout_snd2_irq |
| 288 | 297 | }; |
| 289 | 298 |
| r2454 | r2455 | |
|---|---|---|
| 14 | 14 | ***************************************************************************/ |
| 15 | 15 | |
| 16 | 16 | #include "driver.h" |
| 17 | #include "deprecat.h" | |
| 18 | 17 | #include "cpu/m6809/m6809.h" |
| 19 | 18 | #include "sound/2151intf.h" |
| 20 | 19 | |
| r2454 | r2455 | |
| 50 | 49 | |
| 51 | 50 | static WRITE8_HANDLER( contra_sh_irqtrigger_w ) |
| 52 | 51 | { |
| 53 | cpunum_set_input_line( | |
| 52 | cpunum_set_input_line(machine, 1,M6809_IRQ_LINE,HOLD_LINE); | |
| 54 | 53 | } |
| 55 | 54 | |
| 56 | 55 | static WRITE8_HANDLER( contra_coin_counter_w ) |
| r2454 | r2455 | |
|---|---|---|
| 1194 | 1194 | |
| 1195 | 1195 | static WRITE32_HANDLER( taitofx1a_ymsound_w ) |
| 1196 | 1196 | { |
| 1197 | if (mem_mask == 0x | |
| 1197 | if (mem_mask == 0x | |
| 1198 | 1198 | { |
| 1199 | 1199 | taitosound_port_w(machine, 0, data&0xff); |
| 1200 | 1200 | } |
| r2454 | r2455 | |
| 1678 | 1678 | n_size <<= 2; |
| 1679 | 1679 | while( n_size > 0 ) |
| 1680 | 1680 | { |
| 1681 | psxwritebyte( n_address, ide_controller32_r( ide, 0x1f0 / 4, 0x | |
| 1681 | psxwritebyte( n_address, ide_controller32_r( ide, 0x1f0 / 4, 0x | |
| 1682 | 1682 | n_address++; |
| 1683 | 1683 | n_size--; |
| 1684 | 1684 | } |
| r2454 | r2455 | |
| 2132 | 2132 | int shift = 0; |
| 2133 | 2133 | int ret; |
| 2134 | 2134 | |
| 2135 | if (mem_mask == 0x | |
| 2135 | if (mem_mask == 0x | |
| 2136 | 2136 | { |
| 2137 | 2137 | shift = 16; |
| 2138 | 2138 | reg++; |
| 2139 | 2139 | } |
| 2140 | else if (mem_mask == 0x | |
| 2140 | else if (mem_mask == 0x | |
| 2141 | 2141 | { |
| 2142 | 2142 | if (reg != 0) |
| 2143 | 2143 | { |
| r2454 | r2455 | |
| 2156 | 2156 | { |
| 2157 | 2157 | int reg = offset*2; |
| 2158 | 2158 | |
| 2159 | if (mem_mask == 0x | |
| 2159 | if (mem_mask == 0x | |
| 2160 | 2160 | { |
| 2161 | 2161 | data >>= 16; |
| 2162 | 2162 | reg++; |
| r2454 | r2455 | |
|---|---|---|
| 222 | 222 | |
| 223 | 223 | static const struct YM2203interface ym2203_interface = |
| 224 | 224 | { |
| 225 | input_port_0_r, /* DSW A */ | |
| 226 | input_port_1_r, /* DSW B */ | |
| 227 | 0, | |
| 228 | 0, | |
| 225 | { | |
| 226 | AY8910_LEGACY_OUTPUT, | |
| 227 | AY8910_DEFAULT_LOADS, | |
| 228 | input_port_0_r, /* DSW A */ | |
| 229 | input_port_1_r, /* DSW B */ | |
| 230 | NULL, | |
| 231 | NULL, | |
| 232 | }, | |
| 229 | 233 | irqhandler |
| 230 | 234 | }; |
| 231 | 235 |
| r2454 | r2455 | |
|---|---|---|
| 26 | 26 | ***************************************************************************/ |
| 27 | 27 | |
| 28 | 28 | #include "driver.h" |
| 29 | #include "deprecat.h" | |
| 30 | 29 | #include "machine/8255ppi.h" |
| 31 | 30 | #include "dribling.h" |
| 32 | 31 | |
| r2454 | r2455 | |
| 99 | 98 | /* bit 7 = di */ |
| 100 | 99 | di = (data >> 7) & 1; |
| 101 | 100 | if (!di) |
| 102 | cpunum_set_input_line( | |
| 101 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 103 | 102 | |
| 104 | 103 | /* bit 6 = parata */ |
| 105 | 104 | |
| r2454 | r2455 | |
| 159 | 158 | static READ8_HANDLER( ioread ) |
| 160 | 159 | { |
| 161 | 160 | if (offset & 0x08) |
| 162 | return ppi8255_ | |
| 161 | return ppi8255_ | |
| 163 | 162 | else if (offset & 0x10) |
| 164 | return ppi8255_ | |
| 163 | return ppi8255_ | |
| 165 | 164 | return 0xff; |
| 166 | 165 | } |
| 167 | 166 | |
| r2454 | r2455 | |
| 169 | 168 | static WRITE8_HANDLER( iowrite ) |
| 170 | 169 | { |
| 171 | 170 | if (offset & 0x08) |
| 172 | ppi8255_ | |
| 171 | ppi8255_ | |
| 173 | 172 | else if (offset & 0x10) |
| 174 | ppi8255_ | |
| 173 | ppi8255_ | |
| 175 | 174 | else if (offset & 0x40) |
| 176 | 175 | { |
| 177 | 176 | dr = ds; |
| r2454 | r2455 | |
| 187 | 186 | * |
| 188 | 187 | *************************************/ |
| 189 | 188 | |
| 190 | static const ppi8255_interface ppi8255_intf = | |
| 189 | static const ppi8255_interface ppi8255_intf[2] = | |
| 191 | 190 | { |
| 192 | 2, | |
| 193 | { dsr_r, NULL }, | |
| 194 | { input_mux0_r, NULL }, | |
| 195 | { NULL, input_port_3_r }, | |
| 196 | { NULL, sound_w }, | |
| 197 | { NULL, pb_w }, | |
| 198 | { misc_w, shr_w } | |
| 191 | { | |
| 192 | dsr_r, | |
| 193 | input_mux0_r, | |
| 194 | NULL, | |
| 195 | NULL, | |
| 196 | NULL, | |
| 197 | misc_w | |
| 198 | }, | |
| 199 | { | |
| 200 | NULL, | |
| 201 | NULL, | |
| 202 | input_port_3_r, | |
| 203 | sound_w, | |
| 204 | pb_w, | |
| 205 | shr_w | |
| 206 | } | |
| 199 | 207 | }; |
| 200 | 208 | |
| 201 | static MACHINE_RESET( dribling ) | |
| 202 | { | |
| 203 | ppi8255_init(&ppi8255_intf); | |
| 204 | } | |
| 205 | 209 | |
| 206 | 210 | |
| 207 | ||
| 208 | 211 | /************************************* |
| 209 | 212 | * |
| 210 | 213 | * Main CPU memory handlers |
| r2454 | r2455 | |
| 303 | 306 | MDRV_CPU_IO_MAP(readport,writeport) |
| 304 | 307 | MDRV_CPU_VBLANK_INT("main", dribling_irq_gen) |
| 305 | 308 | |
| 306 | MDRV_MACHINE_RESET(dribling) | |
| 309 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 310 | MDRV_DEVICE_CONFIG( ppi8255_intf[0] ) | |
| 307 | 311 | |
| 312 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 313 | MDRV_DEVICE_CONFIG( ppi8255_intf[1] ) | |
| 314 | ||
| 308 | 315 | /* video hardware */ |
| 309 | 316 | MDRV_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) |
| 310 | 317 |
| r2454 | r2455 | |
|---|---|---|
| 6 | 6 | Thanks to: |
| 7 | 7 | Charles Macdonald for much useful information (cgfm2.emuviews.com) |
| 8 | 8 | |
| 9 | Long Decription names mostly taken from the Good | |
| 9 | Long Decription names mostly taken from the Good | |
| 10 | 10 | |
| 11 | 11 | ToDo: |
| 12 | 12 | |
| r2454 | r2455 | |
| 53 | 53 | |
| 54 | 54 | #define MEGADRIV_VDP_VRAM(address) megadrive_vdp_vram[(address)&0x7fff] |
| 55 | 55 | |
| 56 | #ifdef MESS | |
| 57 | extern void setup_megadriv_custom_mappers(running_machine *); | |
| 58 | #endif | |
| 59 | ||
| 60 | 56 | /* the same on all systems? */ |
| 61 | 57 | #define MASTER_CLOCK 53693100 |
| 62 | 58 | /* timing details */ |
| r2454 | r2455 | |
| 2266 | 2262 | { |
| 2267 | 2263 | //logerror("%06x: 68000 request z80 Bus (byte MSB access) %04x %04x\n", activecpu_get_pc(),data,mem_mask); |
| 2268 | 2264 | genz80.z80_has_bus=0; |
| 2269 | cpunum_set_input_line( | |
| 2265 | cpunum_set_input_line(machine, genz80.z80_cpunum, INPUT_LINE_HALT, ASSERT_LINE); | |
| 2270 | 2266 | } |
| 2271 | 2267 | else |
| 2272 | 2268 | { |
| 2273 | 2269 | //logerror("%06x: 68000 return z80 Bus (byte MSB access) %04x %04x\n", activecpu_get_pc(),data,mem_mask); |
| 2274 | 2270 | genz80.z80_has_bus=1; |
| 2275 | cpunum_set_input_line( | |
| 2271 | cpunum_set_input_line(machine, genz80.z80_cpunum, INPUT_LINE_HALT, CLEAR_LINE); | |
| 2276 | 2272 | |
| 2277 | 2273 | } |
| 2278 | 2274 | } |
| r2454 | r2455 | |
| 2282 | 2278 | { |
| 2283 | 2279 | //logerror("%06x: 68000 request z80 Bus (byte LSB access) %04x %04x\n", activecpu_get_pc(),data,mem_mask); |
| 2284 | 2280 | genz80.z80_has_bus=0; |
| 2285 | cpunum_set_input_line( | |
| 2281 | cpunum_set_input_line(machine, genz80.z80_cpunum, INPUT_LINE_HALT, ASSERT_LINE); | |
| 2286 | 2282 | } |
| 2287 | 2283 | else |
| 2288 | 2284 | { |
| 2289 | 2285 | //logerror("%06x: 68000 return z80 Bus (byte LSB access) %04x %04x\n", activecpu_get_pc(),data,mem_mask); |
| 2290 | 2286 | genz80.z80_has_bus=1; |
| 2291 | cpunum_set_input_line( | |
| 2287 | cpunum_set_input_line(machine, genz80.z80_cpunum, INPUT_LINE_HALT, CLEAR_LINE); | |
| 2292 | 2288 | } |
| 2293 | 2289 | } |
| 2294 | 2290 | else // word access |
| r2454 | r2455 | |
| 2297 | 2293 | { |
| 2298 | 2294 | //logerror("%06x: 68000 request z80 Bus (word access) %04x %04x\n", activecpu_get_pc(),data,mem_mask); |
| 2299 | 2295 | genz80.z80_has_bus=0; |
| 2300 | cpunum_set_input_line( | |
| 2296 | cpunum_set_input_line(machine, genz80.z80_cpunum, INPUT_LINE_HALT, ASSERT_LINE); | |
| 2301 | 2297 | } |
| 2302 | 2298 | else |
| 2303 | 2299 | { |
| 2304 | 2300 | //logerror("%06x: 68000 return z80 Bus (byte LSB access) %04x %04x\n", activecpu_get_pc(),data,mem_mask); |
| 2305 | 2301 | genz80.z80_has_bus=1; |
| 2306 | cpunum_set_input_line( | |
| 2302 | cpunum_set_input_line(machine, genz80.z80_cpunum, INPUT_LINE_HALT, CLEAR_LINE); | |
| 2307 | 2303 | } |
| 2308 | 2304 | } |
| 2309 | 2305 | } |
| r2454 | r2455 | |
| 2316 | 2312 | { |
| 2317 | 2313 | //logerror("%06x: 68000 clear z80 reset (byte MSB access) %04x %04x\n", activecpu_get_pc(),data,mem_mask); |
| 2318 | 2314 | genz80.z80_is_reset=0; |
| 2319 | cpunum_set_input_line( | |
| 2315 | cpunum_set_input_line(machine, genz80.z80_cpunum, INPUT_LINE_RESET, CLEAR_LINE); | |
| 2320 | 2316 | } |
| 2321 | 2317 | else |
| 2322 | 2318 | { |
| 2323 | 2319 | //logerror("%06x: 68000 start z80 reset (byte MSB access) %04x %04x\n", activecpu_get_pc(),data,mem_mask); |
| 2324 | 2320 | genz80.z80_is_reset=1; |
| 2325 | cpunum_set_input_line( | |
| 2321 | cpunum_set_input_line(machine, genz80.z80_cpunum, INPUT_LINE_RESET, ASSERT_LINE); | |
| 2326 | 2322 | sndti_reset(SOUND_YM2612, 0); |
| 2327 | 2323 | } |
| 2328 | 2324 | } |
| r2454 | r2455 | |
| 2332 | 2328 | { |
| 2333 | 2329 | //logerror("%06x: 68000 clear z80 reset (byte LSB access) %04x %04x\n", activecpu_get_pc(),data,mem_mask); |
| 2334 | 2330 | genz80.z80_is_reset=0; |
| 2335 | cpunum_set_input_line( | |
| 2331 | cpunum_set_input_line(machine, genz80.z80_cpunum, INPUT_LINE_RESET, CLEAR_LINE); | |
| 2336 | 2332 | } |
| 2337 | 2333 | else |
| 2338 | 2334 | { |
| 2339 | 2335 | //logerror("%06x: 68000 start z80 reset (byte LSB access) %04x %04x\n", activecpu_get_pc(),data,mem_mask); |
| 2340 | 2336 | genz80.z80_is_reset=1; |
| 2341 | cpunum_set_input_line( | |
| 2337 | cpunum_set_input_line(machine, genz80.z80_cpunum, INPUT_LINE_RESET, ASSERT_LINE); | |
| 2342 | 2338 | sndti_reset(SOUND_YM2612, 0); |
| 2343 | 2339 | |
| 2344 | 2340 | } |
| r2454 | r2455 | |
| 2349 | 2345 | { |
| 2350 | 2346 | //logerror("%06x: 68000 clear z80 reset (word access) %04x %04x\n", activecpu_get_pc(),data,mem_mask); |
| 2351 | 2347 | genz80.z80_is_reset=0; |
| 2352 | cpunum_set_input_line( | |
| 2348 | cpunum_set_input_line(machine, genz80.z80_cpunum, INPUT_LINE_RESET, CLEAR_LINE ); | |
| 2353 | 2349 | } |
| 2354 | 2350 | else |
| 2355 | 2351 | { |
| 2356 | 2352 | //logerror("%06x: 68000 start z80 reset (byte LSB access) %04x %04x\n", activecpu_get_pc(),data,mem_mask); |
| 2357 | 2353 | genz80.z80_is_reset=1; |
| 2358 | cpunum_set_input_line( | |
| 2354 | cpunum_set_input_line(machine, genz80.z80_cpunum, INPUT_LINE_RESET, ASSERT_LINE); | |
| 2359 | 2355 | sndti_reset(SOUND_YM2612, 0); |
| 2360 | 2356 | } |
| 2361 | 2357 | } |
| r2454 | r2455 | |
| 4820 | 4816 | |
| 4821 | 4817 | memset(megadrive_ram,0x00,0x10000); |
| 4822 | 4818 | |
| 4823 | #ifdef MESS | |
| 4824 | setup_megadriv_custom_mappers(machine); | |
| 4825 | #endif | |
| 4819 | ||
| 4826 | 4820 | } |
| 4827 | 4821 | |
| 4828 | 4822 | void megadriv_stop_scanline_timer(void) |
| r2454 | r2455 | |
|---|---|---|
| 563 | 563 | |
| 564 | 564 | static READ8_HANDLER( sound_data_r ) |
| 565 | 565 | { |
| 566 | cpunum_set_input_line( | |
| 566 | cpunum_set_input_line(machine, 1, M6809_IRQ_LINE, CLEAR_LINE); | |
| 567 | 567 | sound_int_state = 0; |
| 568 | 568 | return sound_data; |
| 569 | 569 | } |
| r2454 | r2455 | |
| 669 | 669 | |
| 670 | 670 | static WRITE8_HANDLER( firq_clear_w ) |
| 671 | 671 | { |
| 672 | cpunum_set_input_line( | |
| 672 | cpunum_set_input_line(machine, 1, M6809_FIRQ_LINE, CLEAR_LINE); | |
| 673 | 673 | } |
| 674 | 674 | |
| 675 | 675 | |
| r2454 | r2455 | |
| 682 | 682 | |
| 683 | 683 | static WRITE32_HANDLER( tms_reset_assert_w ) |
| 684 | 684 | { |
| 685 | cpunum_set_input_line(Machine, 2, INPUT_LINE_RESET, ASSERT_LINE); | |
| 686 | cpunum_set_input_line(Machine, 3, INPUT_LINE_RESET, ASSERT_LINE); | |
| 685 | cpunum_set_input_line(machine, 2, INPUT_LINE_RESET, ASSERT_LINE); | |
| 686 | cpunum_set_input_line(machine, 3, INPUT_LINE_RESET, ASSERT_LINE); | |
| 687 | 687 | } |
| 688 | 688 | |
| 689 | 689 | |
| r2454 | r2455 | |
| 692 | 692 | /* kludge to prevent crash on first boot */ |
| 693 | 693 | if ((tms1_ram[0] & 0xff000000) == 0) |
| 694 | 694 | { |
| 695 | cpunum_set_input_line(Machine, 2, INPUT_LINE_RESET, CLEAR_LINE); | |
| 696 | STOP_TMS_SPINNING(Machine, 0); | |
| 695 | cpunum_set_input_line(machine, 2, INPUT_LINE_RESET, CLEAR_LINE); | |
| 696 | STOP_TMS_SPINNING(machine, 0); | |
| 697 | 697 | } |
| 698 | 698 | if ((tms2_ram[0] & 0xff000000) == 0) |
| 699 | 699 | { |
| 700 | cpunum_set_input_line(Machine, 3, INPUT_LINE_RESET, CLEAR_LINE); | |
| 701 | STOP_TMS_SPINNING(Machine, 1); | |
| 700 | cpunum_set_input_line(machine, 3, INPUT_LINE_RESET, CLEAR_LINE); | |
| 701 | STOP_TMS_SPINNING(machine, 1); | |
| 702 | 702 | } |
| 703 | 703 | } |
| 704 | 704 | |
| r2454 | r2455 | |
| 707 | 707 | { |
| 708 | 708 | COMBINE_DATA(&tms1_ram[offset]); |
| 709 | 709 | if (offset == 0) COMBINE_DATA(tms1_boot); |
| 710 | if (offset == 0x382 && tms_spinning[0]) STOP_TMS_SPINNING( | |
| 710 | if (offset == 0x382 && tms_spinning[0]) STOP_TMS_SPINNING(machine, 0); | |
| 711 | 711 | if (!tms_spinning[0]) |
| 712 | 712 | cpu_boost_interleave(ATTOTIME_IN_HZ(CPU020_CLOCK/256), ATTOTIME_IN_USEC(20)); |
| 713 | 713 | } |
| r2454 | r2455 | |
| 716 | 716 | static WRITE32_HANDLER( tms2_68k_ram_w ) |
| 717 | 717 | { |
| 718 | 718 | COMBINE_DATA(&tms2_ram[offset]); |
| 719 | if (offset == 0x382 && tms_spinning[1]) STOP_TMS_SPINNING( | |
| 719 | if (offset == 0x382 && tms_spinning[1]) STOP_TMS_SPINNING(machine, 1); | |
| 720 | 720 | if (!tms_spinning[1]) |
| 721 | 721 | cpu_boost_interleave(ATTOTIME_IN_HZ(CPU020_CLOCK/256), ATTOTIME_IN_USEC(20)); |
| 722 | 722 | } |
| r2454 | r2455 | |
| 757 | 757 | * |
| 758 | 758 | *************************************/ |
| 759 | 759 | |
| 760 | static READ32_HANDLER( input_port_0_msw_r ) | |
| 761 | { | |
| 762 | return input_port_0_word_r(machine,offset,0) << 16; | |
| 763 | } | |
| 764 | ||
| 765 | static READ32_HANDLER( input_port_1_msw_r ) | |
| 766 | { | |
| 767 | return input_port_1_word_r(machine,offset,0) << 16; | |
| 768 | } | |
| 769 | ||
| 770 | static READ32_HANDLER( input_port_2_msw_r ) | |
| 771 | { | |
| 772 | return input_port_2_word_r(machine,offset,0) << 16; | |
| 773 | } | |
| 774 | ||
| 775 | static READ32_HANDLER( input_port_3_msw_r ) | |
| 776 | { | |
| 777 | return input_port_3_word_r(machine,offset,0) << 16; | |
| 778 | } | |
| 779 | ||
| 780 | static READ32_HANDLER( input_port_4_msw_r ) | |
| 781 | { | |
| 782 | return special_port4_r(machine,offset,0) << 16; | |
| 783 | } | |
| 784 | ||
| 785 | 760 | static WRITE32_HANDLER( int1_ack32_w ) |
| 786 | 761 | { |
| 787 | 762 | int1_ack_w(machine, offset, data, mem_mask); |
| r2454 | r2455 | |
| 931 | 906 | AM_RANGE(0x000c00, 0x007fff) AM_MIRROR(0x40000) AM_READWRITE(test2_r, test2_w) |
| 932 | 907 | #endif |
| 933 | 908 | AM_RANGE(0x000000, 0x03ffff) AM_MIRROR(0x40000) AM_RAM AM_BASE((UINT32 **)&main_ram) AM_SIZE(&main_ram_size) |
| 934 | AM_RANGE(0x080000, 0x080003) AM_READ(input_port_3_msw_r) | |
| 935 | AM_RANGE(0x082000, 0x082003) AM_READ(input_port_4_msw_r) | |
| 909 | AM_RANGE(0x080000, 0x080003) AM_READ16(input_port_3_word_r, 0xffff0000) | |
| 910 | AM_RANGE(0x082000, 0x082003) AM_READ16(special_port4_r, 0xffff0000) | |
| 936 | 911 | AM_RANGE(0x084000, 0x084003) AM_READWRITE(sound_data32_r, sound_data32_w) |
| 937 | 912 | // AM_RANGE(0x086000, 0x08623f) AM_RAM -- networking -- first 0x40 bytes = our data, next 0x40*8 bytes = their data, r/w on IRQ2 |
| 938 | 913 | AM_RANGE(0x088000, 0x088003) AM_READ(drivedge_steering_r) |
| 939 | 914 | AM_RANGE(0x08a000, 0x08a003) AM_READWRITE(drivedge_gas_r, SMH_NOP) |
| 940 | AM_RANGE(0x08c000, 0x08c003) AM_READWRITE(input_port_0_msw_r, SMH_NOP) | |
| 941 | AM_RANGE(0x08e000, 0x08e003) AM_READWRITE(input_port_1_msw_r, SMH_NOP) | |
| 915 | AM_RANGE(0x08c000, 0x08c003) AM_READ16(input_port_0_word_r, 0xffff0000) AM_WRITENOP | |
| 916 | AM_RANGE(0x08e000, 0x08e003) AM_READ16(input_port_1_word_r, 0xffff0000) AM_WRITENOP | |
| 942 | 917 | AM_RANGE(0x100000, 0x10000f) AM_WRITE(drivedge_zbuf_control_w) AM_BASE(&drivedge_zbuf_control) |
| 943 | 918 | AM_RANGE(0x180000, 0x180003) AM_WRITE(drivedge_color0_w) |
| 944 | 919 | AM_RANGE(0x1a0000, 0x1bffff) AM_RAM_WRITE(drivedge_paletteram_w) AM_BASE(&paletteram32) |
| r2454 | r2455 | |
| 946 | 921 | AM_RANGE(0x1e0000, 0x1e0113) AM_READWRITE(itech020_video_r, itech020_video_w) AM_BASE((UINT32 **)&itech32_video) |
| 947 | 922 | AM_RANGE(0x1e4000, 0x1e4003) AM_WRITE(tms_reset_assert_w) |
| 948 | 923 | AM_RANGE(0x1ec000, 0x1ec003) AM_WRITE(tms_reset_clear_w) |
| 949 | AM_RANGE(0x200000, 0x200003) AM_READ(input_port_2_ | |
| 924 | AM_RANGE(0x200000, 0x200003) AM_READ16(input_port_2_ | |
| 950 | 925 | AM_RANGE(0x280000, 0x280fff) AM_RAM_WRITE(tms1_68k_ram_w) AM_SHARE(1) |
| 951 | 926 | AM_RANGE(0x300000, 0x300fff) AM_RAM_WRITE(tms2_68k_ram_w) AM_SHARE(2) |
| 952 | 927 | AM_RANGE(0x380000, 0x380003) AM_WRITENOP // AM_WRITE(watchdog_reset16_w) |
| r2454 | r2455 | |
| 968 | 943 | /*------ 68EC020-based memory layout ------*/ |
| 969 | 944 | static ADDRESS_MAP_START( itech020_map, ADDRESS_SPACE_PROGRAM, 32 ) |
| 970 | 945 | AM_RANGE(0x000000, 0x007fff) AM_RAM AM_BASE((UINT32 **)&main_ram) AM_SIZE(&main_ram_size) |
| 971 | AM_RANGE(0x080000, 0x080003) AM_READWRITE(input_port_0_msw_r, int1_ack32_w) | |
| 972 | AM_RANGE(0x100000, 0x100003) AM_READ(input_port_1_msw_r) | |
| 973 | AM_RANGE(0x180000, 0x180003) AM_READ(input_port_2_msw_r) | |
| 974 | AM_RANGE(0x200000, 0x200003) AM_READ(input_port_3_msw_r) | |
| 975 | AM_RANGE(0x280000, 0x280003) AM_READ(input_port_4_msw_r) | |
| 946 | AM_RANGE(0x080000, 0x080003) AM_READ16(input_port_0_word_r, 0xffff0000) AM_WRITE(int1_ack32_w) | |
| 947 | AM_RANGE(0x100000, 0x100003) AM_READ16(input_port_1_word_r, 0xffff0000) | |
| 948 | AM_RANGE(0x180000, 0x180003) AM_READ16(input_port_2_word_r, 0xffff0000) | |
| 949 | AM_RANGE(0x200000, 0x200003) AM_READ16(input_port_3_word_r, 0xffff0000) | |
| 950 | AM_RANGE(0x280000, 0x280003) AM_READ16(special_port4_r, 0xffff0000) | |
| 976 | 951 | AM_RANGE(0x300000, 0x300003) AM_WRITE(itech020_color1_w) |
| 977 | 952 | AM_RANGE(0x380000, 0x380003) AM_WRITE(itech020_color2_w) |
| 978 | 953 | AM_RANGE(0x400000, 0x400003) AM_WRITE(watchdog_reset32_w) |
| r2454 | r2455 | |
|---|---|---|
| 372 | 372 | |
| 373 | 373 | static const struct YM2203interface ym2203_interface = |
| 374 | 374 | { |
| 375 | input_port_3_r, | |
| 376 | input_port_4_r | |
| 375 | { | |
| 376 | AY8910_LEGACY_OUTPUT, | |
| 377 | AY8910_DEFAULT_LOADS, | |
| 378 | input_port_3_r, | |
| 379 | input_port_4_r, | |
| 380 | NULL, | |
| 381 | NULL | |
| 382 | }, | |
| 383 | NULL | |
| 377 | 384 | }; |
| 378 | 385 | |
| 379 | 386 |
| r2454 | r2455 | |
|---|---|---|
| 108 | 108 | |
| 109 | 109 | static const struct AY8910interface ay8910_interface_1 = |
| 110 | 110 | { |
| 111 | AY8910_LEGACY_OUTPUT, | |
| 112 | AY8910_DEFAULT_LOADS, | |
| 111 | 113 | input_port_5_r, // DSW A |
| 112 | input_port_4_r // DSW B | |
| 114 | input_port_4_r, // DSW B | |
| 115 | NULL, | |
| 116 | NULL | |
| 113 | 117 | }; |
| 114 | 118 | |
| 115 | 119 | static const struct AY8910interface ay8910_interface_2 = |
| 116 | 120 | { |
| 117 | 0, | |
| 118 | 0, | |
| 121 | AY8910_LEGACY_OUTPUT, | |
| 122 | AY8910_DEFAULT_LOADS, | |
| 123 | NULL, | |
| 124 | NULL, | |
| 119 | 125 | unknown_port_1_w, // ?? |
| 120 | 126 | unknown_port_2_w // ?? |
| 121 | 127 | }; |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | |
| 10 | 9 | #include "sspeedr.lh" |
| 11 | 10 | |
| r2454 | r2455 | |
| 56 | 55 | |
| 57 | 56 | static WRITE8_HANDLER( sspeedr_int_ack_w ) |
| 58 | 57 | { |
| 59 | cpunum_set_input_line( | |
| 58 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 60 | 59 | } |
| 61 | 60 | |
| 62 | 61 |
| r2454 | r2455 | |
|---|---|---|
| 374 | 374 | static WRITE8_HANDLER( nmi_enable_w ) |
| 375 | 375 | { |
| 376 | 376 | //if(data & 0x80) |
| 377 | //cpunum_set_input_line( | |
| 377 | //cpunum_set_input_line(machine, 0, INPUT_LINE_NMI,ASSERT_LINE); | |
| 378 | 378 | //if(!(data & 0x80)) |
| 379 | //cpunum_set_input_line( | |
| 379 | //cpunum_set_input_line(machine, 0, INPUT_LINE_NMI,CLEAR_LINE); | |
| 380 | 380 | } |
| 381 | 381 | |
| 382 | 382 | static READ8_HANDLER( kludge_r ) |
| r2454 | r2455 | |
| 437 | 437 | } |
| 438 | 438 | else//keyboard emulation |
| 439 | 439 | { |
| 440 | cpunum_set_input_line( | |
| 440 | cpunum_set_input_line(machine, 0,1,PULSE_LINE); | |
| 441 | 441 | return 0x00;//Keyboard is disconnected |
| 442 | 442 | //return 0xaa;//Keyboard code |
| 443 | 443 | } |
| r2454 | r2455 | |
| 470 | 470 | |
| 471 | 471 | static WRITE8_HANDLER( sys_reset_w ) |
| 472 | 472 | { |
| 473 | cpunum_set_input_line( | |
| 473 | cpunum_set_input_line(machine, 0,INPUT_LINE_RESET,PULSE_LINE); | |
| 474 | 474 | } |
| 475 | 475 | |
| 476 | 476 | |
| 477 | static const ppi8255_interface filetto_ppi8255_intf = | |
| 477 | static const ppi8255_interface filetto_ppi8255_intf[2] = | |
| 478 | 478 | { |
| 479 | 2, /* 2 chips */ | |
| 480 | { port_a_r,NULL }, /* Port A read */ | |
| 481 | { port_b_r,NULL }, /* Port B read */ | |
| 482 | { port_c_r,NULL }, /* Port C read */ | |
| 483 | { NULL ,wss_1_w }, /* Port A write */ | |
| 484 | { port_b_w,wss_2_w }, /* Port B write */ | |
| 485 | { NULL ,sys_reset_w }, /* Port C write */ | |
| 479 | { | |
| 480 | port_a_r, /* Port A read */ | |
| 481 | port_b_r, /* Port B read */ | |
| 482 | port_c_r, /* Port C read */ | |
| 483 | NULL, /* Port A write */ | |
| 484 | port_b_w, /* Port B write */ | |
| 485 | NULL /* Port C write */ | |
| 486 | }, | |
| 487 | { | |
| 488 | NULL, /* Port A read */ | |
| 489 | NULL, /* Port B read */ | |
| 490 | NULL, /* Port C read */ | |
| 491 | wss_1_w, /* Port A write */ | |
| 492 | wss_2_w, /* Port B write */ | |
| 493 | sys_reset_w /* Port C write */ | |
| 494 | } | |
| 486 | 495 | }; |
| 487 | 496 | |
| 488 | 497 | static UINT8 irq_data[2]; |
| r2454 | r2455 | |
| 546 | 555 | AM_RANGE(0x0000, 0x000f) AM_RAM //AM_READWRITE(dma8237_0_r,dma8237_0_w) //8237 DMA Controller |
| 547 | 556 | AM_RANGE(0x0020, 0x0021) AM_READWRITE(irq_ctrl_8259_r,irq_ctrl_8259_w)//AM_READWRITE(pic8259_0_r,pic8259_0_w) //8259 Interrupt control |
| 548 | 557 | AM_RANGE(0x0040, 0x0043) AM_READ(kludge_r) //AM_READWRITE(pit8253_0_r,pit8253_0_w) //8253 PIT |
| 549 | AM_RANGE(0x0060, 0x0063) AM_READWRITE(ppi8255_0_r,ppi8255_0_w) //PPI 8255 | |
| 550 | AM_RANGE(0x0064, 0x0066) AM_READWRITE(ppi8255_1_r,ppi8255_1_w) //PPI 8255 | |
| 558 | AM_RANGE(0x0060, 0x0063) AM_DEVREADWRITE(PPI8255, "ppi8255_0", ppi8255_r,ppi8255_w) //PPI 8255 | |
| 559 | AM_RANGE(0x0064, 0x0066) AM_DEVREADWRITE(PPI8255, "ppi8255_0", ppi8255_r,ppi8255_w) //PPI 8255 | |
| 551 | 560 | AM_RANGE(0x0073, 0x0073) AM_READ(undefined_r) |
| 552 | 561 | AM_RANGE(0x0080, 0x0087) AM_RAM //AM_READWRITE(dma_page_select_r,dma_page_select_w) |
| 553 | 562 | AM_RANGE(0x00a0, 0x00a0) AM_WRITE(nmi_enable_w) |
| r2454 | r2455 | |
| 650 | 659 | GFXDECODE_END |
| 651 | 660 | |
| 652 | 661 | |
| 653 | static MACHINE_RESET(filetto) | |
| 654 | { | |
| 655 | ppi8255_init(&filetto_ppi8255_intf); | |
| 656 | } | |
| 657 | ||
| 658 | 662 | /* |
| 659 | 663 | BLACK = 0 |
| 660 | 664 | BLUE = 1 |
| r2454 | r2455 | |
| 740 | 744 | MDRV_DEVICE_ADD( "pit8253", PIT8253 ) |
| 741 | 745 | MDRV_DEVICE_CONFIG( pc_pit8253_config ) |
| 742 | 746 | |
| 747 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 748 | MDRV_DEVICE_CONFIG( filetto_ppi8255_intf[0] ) | |
| 749 | ||
| 750 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 751 | MDRV_DEVICE_CONFIG( filetto_ppi8255_intf[1] ) | |
| 752 | ||
| 743 | 753 | MDRV_GFXDECODE(filetto) |
| 744 | 754 | |
| 745 | 755 | MDRV_SCREEN_ADD("main", RASTER) |
| r2454 | r2455 | |
| 751 | 761 | |
| 752 | 762 | MDRV_PALETTE_LENGTH(0x100) |
| 753 | 763 | |
| 754 | MDRV_MACHINE_RESET(filetto) | |
| 755 | 764 | MDRV_PALETTE_INIT(filetto) |
| 756 | 765 | |
| 757 | 766 | MDRV_VIDEO_START(filetto) |
| r2454 | r2455 | |
|---|---|---|
| 320 | 320 | |
| 321 | 321 | static const struct YM2203interface ym2203_interface = |
| 322 | 322 | { |
| 323 | 0, | |
| 324 | 0, | |
| 325 | writeA, | |
| 326 | writeB, | |
| 323 | { | |
| 324 | AY8910_LEGACY_OUTPUT, | |
| 325 | AY8910_DEFAULT_LOADS, | |
| 326 | NULL, | |
| 327 | NULL, | |
| 328 | writeA, | |
| 329 | writeB, | |
| 330 | }, | |
| 327 | 331 | irqhandler |
| 328 | 332 | }; |
| 329 | 333 |
| r2454 | r2455 | |
|---|---|---|
| 66 | 66 | |
| 67 | 67 | static READ8_HANDLER( port1_r ) |
| 68 | 68 | { |
| 69 | return input_port_ | |
| 69 | return input_port_ | |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | static WRITE8_HANDLER( lamps_w ) |
| r2454 | r2455 | |
| 102 | 102 | // popmessage("%02x",data); |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | static const ppi8255_interface ppi8255_intf = | |
| 105 | static const ppi8255_interface ppi8255_intf[2] = | |
| 106 | 106 | { |
| 107 | 2, /* 2 chips */ | |
| 108 | { input_port_0_r, input_port_2_r }, /* Port A read */ | |
| 109 | { port1_r, NULL }, /* Port B read */ | |
| 110 | { NULL, portC_r }, /* Port C read */ | |
| 111 | { NULL, NULL }, /* Port A write */ | |
| 112 | { NULL, lamps_w }, /* Port B write */ | |
| 113 | { sound_w, NULL }, /* Port C write */ | |
| 107 | { | |
| 108 | input_port_0_r, /* Port A read */ | |
| 109 | port1_r, /* Port B read */ | |
| 110 | NULL, /* Port C read */ | |
| 111 | NULL, /* Port A write */ | |
| 112 | NULL, /* Port B write */ | |
| 113 | sound_w, /* Port C write */ | |
| 114 | }, | |
| 115 | { | |
| 116 | input_port_2_r, /* Port A read */ | |
| 117 | NULL, /* Port B read */ | |
| 118 | portC_r, /* Port C read */ | |
| 119 | NULL, /* Port A write */ | |
| 120 | lamps_w, /* Port B write */ | |
| 121 | NULL /* Port C write */ | |
| 122 | } | |
| 114 | 123 | }; |
| 115 | 124 | |
| 116 | 125 | static MACHINE_RESET( findout ) |
| 117 | 126 | { |
| 118 | ppi8255_init(&ppi8255_intf); | |
| 119 | ||
| 120 | 127 | ticket_dispenser_init(100, 1, 1); |
| 121 | 128 | } |
| 122 | 129 | |
| r2454 | r2455 | |
| 183 | 190 | static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 184 | 191 | AM_RANGE(0x0000, 0x3fff) AM_READ(SMH_ROM) |
| 185 | 192 | AM_RANGE(0x4000, 0x47ff) AM_READ(SMH_RAM) |
| 186 | AM_RANGE(0x4800, 0x4803) AM_READ(ppi8255_0_r) | |
| 187 | AM_RANGE(0x5000, 0x5003) AM_READ(ppi8255_1_r) | |
| 193 | AM_RANGE(0x4800, 0x4803) AM_DEVREAD(PPI8255, "ppi8255_0", ppi8255_r) | |
| 194 | AM_RANGE(0x5000, 0x5003) AM_DEVREAD(PPI8255, "ppi8255_1", ppi8255_r) | |
| 188 | 195 | AM_RANGE(0x6400, 0x6400) AM_READ(signature_r) |
| 189 | 196 | AM_RANGE(0x7800, 0x7fff) AM_READ(SMH_ROM) |
| 190 | 197 | AM_RANGE(0x8000, 0xffff) AM_READ(SMH_BANK1) |
| r2454 | r2455 | |
| 194 | 201 | static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 195 | 202 | AM_RANGE(0x0000, 0x3fff) AM_WRITE(SMH_ROM) |
| 196 | 203 | AM_RANGE(0x4000, 0x47ff) AM_WRITE(SMH_RAM) AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) |
| 197 | AM_RANGE(0x4800, 0x4803) AM_WRITE(ppi8255_0_w) | |
| 198 | AM_RANGE(0x5000, 0x5003) AM_WRITE(ppi8255_1_w) | |
| 204 | AM_RANGE(0x4800, 0x4803) AM_DEVWRITE(PPI8255, "ppi8255_0", ppi8255_w) | |
| 205 | AM_RANGE(0x5000, 0x5003) AM_DEVWRITE(PPI8255, "ppi8255_1", ppi8255_w) | |
| 199 | 206 | /* banked ROMs are enabled by low 6 bits of the address */ |
| 200 | 207 | AM_RANGE(0x603e, 0x603e) AM_WRITE(banksel_1_w) |
| 201 | 208 | AM_RANGE(0x603d, 0x603d) AM_WRITE(banksel_2_w) |
| r2454 | r2455 | |
| 464 | 471 | MDRV_VIDEO_START(generic_bitmapped) |
| 465 | 472 | MDRV_VIDEO_UPDATE(generic_bitmapped) |
| 466 | 473 | |
| 474 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 475 | MDRV_DEVICE_CONFIG( ppi8255_intf[0] ) | |
| 476 | ||
| 477 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 478 | MDRV_DEVICE_CONFIG( ppi8255_intf[1] ) | |
| 479 | ||
| 467 | 480 | /* sound hardware */ |
| 468 | 481 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 469 | 482 |
| r2454 | r2455 | |
|---|---|---|
| 46 | 46 | static WRITE8_HANDLER( mouser_sound_interrupt_w ) |
| 47 | 47 | { |
| 48 | 48 | mouser_sound_byte = data; |
| 49 | cpunum_set_input_line( | |
| 49 | cpunum_set_input_line(machine, 1, 0, HOLD_LINE); | |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | static READ8_HANDLER( mouser_sound_byte_r ) |
| r2454 | r2455 | |
|---|---|---|
| 187 | 187 | ***************************************************************************/ |
| 188 | 188 | |
| 189 | 189 | #include "driver.h" |
| 190 | #include "deprecat.h" | |
| 191 | 190 | #include "cpu/m68000/m68000.h" |
| 192 | 191 | #include "video/taitoic.h" |
| 193 | 192 | #include "audio/taitosnd.h" |
| r2454 | r2455 | |
| 226 | 225 | g = (a &0xff00) >> 8; |
| 227 | 226 | b = (a &0xff); |
| 228 | 227 | |
| 229 | palette_set_color( | |
| 228 | palette_set_color(machine,offset,MAKE_RGB(r,g,b)); | |
| 230 | 229 | } |
| 231 | 230 | } |
| 232 | 231 | |
| r2454 | r2455 | |
| 292 | 291 | { |
| 293 | 292 | case 0x00: |
| 294 | 293 | { |
| 295 | return (input_port_ | |
| 294 | return (input_port_ | |
| 296 | 295 | (EEPROM_read_bit() << 7) | frame_counter; |
| 297 | 296 | } |
| 298 | 297 | |
| 299 | 298 | case 0x01: |
| 300 | 299 | { |
| 301 | return input_port_ | |
| 300 | return input_port_ | |
| 302 | 301 | } |
| 303 | 302 | } |
| 304 | 303 | |
| r2454 | r2455 | |
| 406 | 405 | |
| 407 | 406 | case 0x00: /* P1 */ |
| 408 | 407 | { |
| 409 | x = input_port_3_word_r(machine,0,0) << 6; | |
| 410 | y = input_port_4_word_r(machine,0,0) << 6; | |
| 408 | x = input_port_read_indexed(machine,3) << 6; | |
| 409 | y = input_port_read_indexed(machine,4) << 6; | |
| 411 | 410 | |
| 412 | 411 | return ((x << 24) &0xff000000) | ((x << 8) &0xff0000) |
| 413 | 412 | | ((y << 8) &0xff00) | ((y >> 8) &0xff) ; |
| r2454 | r2455 | |
| 415 | 414 | |
| 416 | 415 | case 0x01: /* P2 */ |
| 417 | 416 | { |
| 418 | x = input_port_5_word_r(machine,0,0) << 6; | |
| 419 | y = input_port_6_word_r(machine,0,0) << 6; | |
| 417 | x = input_port_read_indexed(machine,5) << 6; | |
| 418 | y = input_port_read_indexed(machine,6) << 6; | |
| 420 | 419 | |
| 421 | 420 | return ((x << 24) &0xff000000) | ((x << 8) &0xff0000) |
| 422 | 421 | | ((y << 8) &0xff00) | ((y >> 8) &0xff) ; |
| r2454 | r2455 | |
|---|---|---|
| 263 | 263 | |
| 264 | 264 | switch (offset) { |
| 265 | 265 | case 2: /* Raster IRQ ACK - value read is not used */ |
| 266 | cpunum_set_input_line( | |
| 266 | cpunum_set_input_line(machine, 0, ARM_IRQ_LINE, CLEAR_LINE); | |
| 267 | 267 | return 0; |
| 268 | 268 | |
| 269 | 269 | case 3: /* Irq controller |
| r2454 | r2455 | |
| 492 | 492 | UINT8 *eeprom=EEPROM_get_data_pointer(0); |
| 493 | 493 | |
| 494 | 494 | /* Eprom in low byte */ |
| 495 | if (mem_mask==0x | |
| 495 | if (mem_mask==0x | |
| 496 | 496 | /* |
| 497 | 497 | The Tattoo Assassins eprom seems strange... It's 1024 bytes in size, and 8 bit |
| 498 | 498 | in width, but offers a 'multiple read' mode where a bit stream can be read |
| r2454 | r2455 | |
| 597 | 597 | } |
| 598 | 598 | |
| 599 | 599 | /* Volume in high byte */ |
| 600 | if (mem_mask==0x | |
| 600 | if (mem_mask==0x | |
| 601 | 601 | //TODO: volume attenuation == ((data>>8)&0xff); |
| 602 | 602 | return; |
| 603 | 603 | } |
| 604 | 604 | |
| 605 | 605 | /* Playfield control - Only written in full word memory accesses */ |
| 606 | deco32_pri_w(machine,0,data&0x3,0); /* Bit 0 - layer priority toggle, Bit 1 - BG2/3 Joint mode (8bpp) */ | |
| 606 | deco32_pri_w(machine,0,data&0x3,0xffffffff); /* Bit 0 - layer priority toggle, Bit 1 - BG2/3 Joint mode (8bpp) */ | |
| 607 | 607 | |
| 608 | 608 | /* Sound board reset control */ |
| 609 | 609 | if (data&0x80) |
| 610 | cpunum_set_input_line( | |
| 610 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, CLEAR_LINE); | |
| 611 | 611 | else |
| 612 | cpunum_set_input_line( | |
| 612 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, ASSERT_LINE); | |
| 613 | 613 | |
| 614 | 614 | /* bit 0x4 fade cancel? */ |
| 615 | 615 | /* bit 0x8 ?? */ |
| r2454 | r2455 | |
| 641 | 641 | EEPROM_write_bit(data & 0x10); |
| 642 | 642 | EEPROM_set_cs_line((data & 0x40) ? CLEAR_LINE : ASSERT_LINE); |
| 643 | 643 | |
| 644 | deco32_pri_w(machine,0,data&0x3,0); /* Bit 0 - layer priority toggle, Bit 1 - BG2/3 Joint mode (8bpp) */ | |
| 644 | deco32_pri_w(machine,0,data&0x3,0xffffffff); /* Bit 0 - layer priority toggle, Bit 1 - BG2/3 Joint mode (8bpp) */ | |
| 645 | 645 | } |
| 646 | 646 | } |
| 647 | 647 | |
| r2454 | r2455 | |
| 1133 | 1133 | |
| 1134 | 1134 | static WRITE8_HANDLER(deco32_bsmt1_w) |
| 1135 | 1135 | { |
| 1136 | BSMT2000_data_0_w(machine, offset^ 0xff, ((bsmt_latch<<8)|data), 0); | |
| 1136 | BSMT2000_data_0_w(machine, offset^ 0xff, ((bsmt_latch<<8)|data), 0xffff); | |
| 1137 | 1137 | cpunum_set_input_line(machine, 1, M6809_IRQ_LINE, HOLD_LINE); /* BSMT is ready */ |
| 1138 | 1138 | } |
| 1139 | 1139 |
| r2454 | r2455 | |
|---|---|---|
| 452 | 452 | |
| 453 | 453 | static const struct AY8910interface ay8910_interface_1 = |
| 454 | 454 | { |
| 455 | 0, | |
| 456 | 0, | |
| 455 | AY8910_LEGACY_OUTPUT, | |
| 456 | AY8910_DEFAULT_LOADS, | |
| 457 | NULL, | |
| 458 | NULL, | |
| 457 | 459 | grchamp_portA_0_w, |
| 458 | 460 | grchamp_portB_0_w |
| 459 | 461 | }; |
| 460 | 462 | |
| 461 | 463 | static const struct AY8910interface ay8910_interface_3 = |
| 462 | 464 | { |
| 463 | 0, | |
| 464 | 0, | |
| 465 | AY8910_LEGACY_OUTPUT, | |
| 466 | AY8910_DEFAULT_LOADS, | |
| 467 | NULL, | |
| 468 | NULL, | |
| 465 | 469 | grchamp_portA_2_w, |
| 466 | 470 | grchamp_portB_2_w |
| 467 | 471 | }; |
| r2454 | r2455 | |
|---|---|---|
| 178 | 178 | |
| 179 | 179 | static const struct YM2203interface ym2203_interface = |
| 180 | 180 | { |
| 181 | 0, | |
| 182 | 0, | |
| 183 | 0, | |
| 184 | 0, | |
| 181 | { | |
| 182 | AY8910_LEGACY_OUTPUT, | |
| 183 | AY8910_DEFAULT_LOADS, | |
| 184 | NULL, NULL, NULL, NULL | |
| 185 | }, | |
| 185 | 186 | irqhandler |
| 186 | 187 | }; |
| 187 | 188 |
| r2454 | r2455 | |
|---|---|---|
| 76 | 76 | sound_nmi_enable = 1; |
| 77 | 77 | if (pending_nmi) |
| 78 | 78 | { /* probably wrong but commands may go lost otherwise */ |
| 79 | cpunum_set_input_line( | |
| 79 | cpunum_set_input_line(machine, 1,INPUT_LINE_NMI,PULSE_LINE); | |
| 80 | 80 | pending_nmi = 0; |
| 81 | 81 | } |
| 82 | 82 | } |
| r2454 | r2455 | |
| 316 | 316 | |
| 317 | 317 | static const struct YM2203interface ym2203_interface = |
| 318 | 318 | { |
| 319 | 0, | |
| 320 | 0, | |
| 321 | 0, | |
| 322 | 0, | |
| 319 | { | |
| 320 | AY8910_LEGACY_OUTPUT, | |
| 321 | AY8910_DEFAULT_LOADS, | |
| 322 | NULL, NULL, NULL, NULL | |
| 323 | }, | |
| 323 | 324 | irqhandler |
| 324 | 325 | }; |
| 325 | 326 |
| r2454 | r2455 | |
|---|---|---|
| 22 | 22 | |
| 23 | 23 | #include "driver.h" |
| 24 | 24 | #include "render.h" |
| 25 | #include "deprecat.h" | |
| 26 | 25 | #include "sound/sn76496.h" |
| 27 | 26 | #include "sound/custom.h" |
| 28 | 27 | #include "machine/laserdsc.h" |
| r2454 | r2455 | |
| 179 | 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}; |
| 180 | 179 | |
| 181 | 180 | if ( data & 0x40 ) /* bit 6 = irqack */ |
| 182 | cpunum_set_input_line( | |
| 181 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 183 | 182 | |
| 184 | 183 | coin_counter_w( 0, data & 0x08 ); |
| 185 | 184 | coin_counter_w( 1, data & 0x04 ); |
| r2454 | r2455 | |
|---|---|---|
| 964 | 964 | |
| 965 | 965 | static const struct YM2203interface ym2203_interface = |
| 966 | 966 | { |
| 967 | 0,0,0,0,irqhandler | |
| 967 | { | |
| 968 | AY8910_LEGACY_OUTPUT, | |
| 969 | AY8910_DEFAULT_LOADS, | |
| 970 | NULL, NULL, NULL, NULL | |
| 971 | }, | |
| 972 | irqhandler | |
| 968 | 973 | }; |
| 969 | 974 | |
| 970 | 975 | static MACHINE_DRIVER_START( shadoww ) |
| r2454 | r2455 | |
|---|---|---|
| 305 | 305 | ***************************************************************************/ |
| 306 | 306 | |
| 307 | 307 | #include "driver.h" |
| 308 | #include "deprecat.h" | |
| 309 | 308 | #include "machine/segacrpt.h" |
| 310 | 309 | #include "machine/8255ppi.h" |
| 311 | 310 | #include "audio/segasnd.h" |
| r2454 | r2455 | |
| 374 | 373 | { |
| 375 | 374 | int_enabled = data & 1; |
| 376 | 375 | if (!int_enabled) |
| 377 | cpunum_set_input_line( | |
| 376 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 378 | 377 | } |
| 379 | 378 | |
| 380 | 379 | |
| r2454 | r2455 | |
| 485 | 484 | AM_RANGE(0xc000, 0xc002) AM_MIRROR(0x18f8) AM_WRITE(zaxxon_coin_lockout_w) |
| 486 | 485 | AM_RANGE(0xc003, 0xc004) AM_MIRROR(0x18f8) AM_WRITE(zaxxon_coin_counter_w) |
| 487 | 486 | AM_RANGE(0xc006, 0xc006) AM_MIRROR(0x18f8) AM_WRITE(zaxxon_flipscreen_w) |
| 488 | AM_RANGE(0xe03c, 0xe03f) AM_MIRROR(0x1f00) AM_READWRITE(ppi8255_ | |
| 487 | AM_RANGE(0xe03c, 0xe03f) AM_MIRROR(0x1f00) AM_DEVREADWRITE(PPI8255, "ppi8255", ppi8255_ | |
| 489 | 488 | AM_RANGE(0xe0f0, 0xe0f0) AM_MIRROR(0x1f00) AM_WRITE(int_enable_w) |
| 490 | 489 | AM_RANGE(0xe0f1, 0xe0f1) AM_MIRROR(0x1f00) AM_WRITE(zaxxon_fg_color_w) |
| 491 | 490 | AM_RANGE(0xe0f8, 0xe0f9) AM_MIRROR(0x1f00) AM_WRITE(zaxxon_bg_position_w) |
| r2454 | r2455 | |
| 525 | 524 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 526 | 525 | AM_RANGE(0x4000, 0x47ff) AM_MIRROR(0x1800) AM_RAM |
| 527 | 526 | AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x1fff) AM_WRITE(SN76496_0_w) |
| 528 | AM_RANGE(0x8000, 0x8003) AM_MIRROR(0x1ffc) AM_READWRITE(ppi8255_ | |
| 527 | AM_RANGE(0x8000, 0x8003) AM_MIRROR(0x1ffc) AM_DEVREADWRITE(PPI8255, "ppi8255", ppi8255_ | |
| 529 | 528 | AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x1fff) AM_WRITE(SN76496_1_w) |
| 530 | 529 | ADDRESS_MAP_END |
| 531 | 530 | |
| r2454 | r2455 | |
| 892 | 891 | |
| 893 | 892 | /************************************* |
| 894 | 893 | * |
| 894 | * PPI8255 configurations | |
| 895 | * | |
| 896 | *************************************/ | |
| 897 | ||
| 898 | static const ppi8255_interface zaxxon_ppi_intf = | |
| 899 | { | |
| 900 | NULL, | |
| 901 | NULL, | |
| 902 | NULL, | |
| 903 | zaxxon_sound_a_w, | |
| 904 | zaxxon_sound_b_w, | |
| 905 | zaxxon_sound_c_w | |
| 906 | }; | |
| 907 | ||
| 908 | ||
| 909 | static const ppi8255_interface congo_ppi_intf = | |
| 910 | { | |
| 911 | soundlatch_r, | |
| 912 | NULL, | |
| 913 | NULL, | |
| 914 | NULL, | |
| 915 | congo_sound_b_w, | |
| 916 | congo_sound_c_w | |
| 917 | }; | |
| 918 | ||
| 919 | ||
| 920 | /************************************* | |
| 921 | * | |
| 895 | 922 | * Graphics definitions |
| 896 | 923 | * |
| 897 | 924 | *************************************/ |
| r2454 | r2455 | |
| 936 | 963 | |
| 937 | 964 | MDRV_MACHINE_START(zaxxon) |
| 938 | 965 | |
| 966 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 967 | MDRV_DEVICE_CONFIG( zaxxon_ppi_intf ) | |
| 968 | ||
| 939 | 969 | /* video hardware */ |
| 940 | 970 | MDRV_GFXDECODE(zaxxon) |
| 941 | 971 | MDRV_PALETTE_LENGTH(256) |
| r2454 | r2455 | |
| 992 | 1022 | MDRV_CPU_MODIFY("main") |
| 993 | 1023 | MDRV_CPU_PROGRAM_MAP(congo_map, 0) |
| 994 | 1024 | |
| 1025 | MDRV_DEVICE_MODIFY( "ppi8255", PPI8255 ) | |
| 1026 | MDRV_DEVICE_CONFIG( congo_ppi_intf ) | |
| 1027 | ||
| 995 | 1028 | MDRV_CPU_ADD(Z80, SOUND_CLOCK) |
| 996 | 1029 | MDRV_CPU_PROGRAM_MAP(congo_sound_map,0) |
| 997 | 1030 | MDRV_CPU_PERIODIC_INT(irq0_line_hold, (double)SOUND_CLOCK/16/16/16/4) |
| r2454 | r2455 | |
| 1413 | 1446 | * |
| 1414 | 1447 | *************************************/ |
| 1415 | 1448 | |
| 1416 | static DRIVER_INIT( zaxxon ) | |
| 1417 | { | |
| 1418 | static const ppi8255_interface ppi_intf = | |
| 1419 | { | |
| 1420 | 1, | |
| 1421 | { 0 }, | |
| 1422 | { 0 }, | |
| 1423 | { 0 }, | |
| 1424 | { zaxxon_sound_a_w }, | |
| 1425 | { zaxxon_sound_b_w }, | |
| 1426 | { zaxxon_sound_c_w } | |
| 1427 | }; | |
| 1428 | ||
| 1429 | ppi8255_init(&ppi_intf); | |
| 1430 | } | |
| 1431 | ||
| 1432 | ||
| 1433 | 1449 | static DRIVER_INIT( zaxxonb ) |
| 1434 | 1450 | { |
| 1435 | 1451 | zaxxonb_decode(); |
| 1436 | DRIVER_INIT_CALL(zaxxon); | |
| 1437 | 1452 | } |
| 1438 | 1453 | |
| 1439 | 1454 | |
| 1440 | 1455 | static DRIVER_INIT( szaxxon ) |
| 1441 | 1456 | { |
| 1442 | 1457 | szaxxon_decode(); |
| 1443 | DRIVER_INIT_CALL(zaxxon); | |
| 1444 | 1458 | } |
| 1445 | 1459 | |
| 1446 | 1460 | |
| 1447 | 1461 | static DRIVER_INIT( futspy ) |
| 1448 | 1462 | { |
| 1449 | 1463 | futspy_decode(); |
| 1450 | DRIVER_INIT_CALL(zaxxon); | |
| 1451 | 1464 | } |
| 1452 | 1465 | |
| 1453 | 1466 | |
| 1454 | 1467 | static DRIVER_INIT( razmataz ) |
| 1455 | 1468 | { |
| 1456 | 1469 | nprinces_decode(); |
| 1457 | DRIVER_INIT_CALL(zaxxon); | |
| 1458 | 1470 | |
| 1459 | 1471 | /* additional input ports are wired */ |
| 1460 | 1472 | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xc004, 0xc004, 0, 0x18f3, port_tag_to_handler8("SW04")); |
| r2454 | r2455 | |
| 1476 | 1488 | static DRIVER_INIT( ixion ) |
| 1477 | 1489 | { |
| 1478 | 1490 | szaxxon_decode(); |
| 1479 | DRIVER_INIT_CALL(zaxxon); | |
| 1480 | 1491 | |
| 1481 | 1492 | /* connect the universal sound board */ |
| 1482 | 1493 | memory_install_readwrite8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xe03c, 0xe03c, 0, 0x1f00, sega_usb_status_r, sega_usb_data_w); |
| 1483 | 1494 | } |
| 1484 | 1495 | |
| 1485 | 1496 | |
| 1486 | static DRIVER_INIT( congo ) | |
| 1487 | { | |
| 1488 | static const ppi8255_interface ppi_intf = | |
| 1489 | { | |
| 1490 | 1, | |
| 1491 | { soundlatch_r }, | |
| 1492 | { 0 }, | |
| 1493 | { 0 }, | |
| 1494 | { 0 }, | |
| 1495 | { congo_sound_b_w }, | |
| 1496 | { congo_sound_c_w } | |
| 1497 | }; | |
| 1498 | ppi8255_init(&ppi_intf); | |
| 1499 | } | |
| 1500 | 1497 | |
| 1501 | ||
| 1502 | ||
| 1503 | 1498 | /************************************* |
| 1504 | 1499 | * |
| 1505 | 1500 | * Game drivers |
| r2454 | r2455 | |
| 1507 | 1502 | *************************************/ |
| 1508 | 1503 | |
| 1509 | 1504 | /* these games run on standard Zaxxon hardware */ |
| 1510 | GAME( 1982, zaxxon, 0, zaxxon, zaxxon, zaxxon, ROT90, "Sega", "Zaxxon (set 1)", GAME_SUPPORTS_SAVE ) | |
| 1511 | GAME( 1982, zaxxon2, zaxxon, zaxxon, zaxxon, zaxxon, ROT90, "Sega", "Zaxxon (set 2)", GAME_SUPPORTS_SAVE ) | |
| 1505 | GAME( 1982, zaxxon, 0, zaxxon, zaxxon, 0, ROT90, "Sega", "Zaxxon (set 1)", GAME_SUPPORTS_SAVE ) | |
| 1506 | GAME( 1982, zaxxon2, zaxxon, zaxxon, zaxxon, 0, ROT90, "Sega", "Zaxxon (set 2)", GAME_SUPPORTS_SAVE ) | |
| 1512 | 1507 | GAME( 1982, zaxxonb, zaxxon, zaxxon, zaxxon, zaxxonb, ROT90, "bootleg", "Jackson", GAME_SUPPORTS_SAVE ) |
| 1513 | 1508 | GAME( 1982, szaxxon, 0, zaxxon, szaxxon, szaxxon, ROT90, "Sega", "Super Zaxxon", GAME_SUPPORTS_SAVE ) |
| 1514 | 1509 | GAME( 1984, futspy, 0, futspy, futspy, futspy, ROT90, "Sega", "Future Spy", GAME_SUPPORTS_SAVE ) |
| r2454 | r2455 | |
| 1520 | 1515 | |
| 1521 | 1516 | /* these games run on a slightly newer Zaxxon hardware with more ROM space and a */ |
| 1522 | 1517 | /* custom sprite DMA chip */ |
| 1523 | GAME( 1983, congo, 0, congo, congo, congo, ROT90, "Sega", "Congo Bongo", GAME_SUPPORTS_SAVE ) | |
| 1524 | GAME( 1983, tiptop, congo, congo, congo, congo, ROT90, "Sega", "Tip Top", GAME_SUPPORTS_SAVE ) | |
| 1518 | GAME( 1983, congo, 0, congo, congo, 0, ROT90, "Sega", "Congo Bongo", GAME_SUPPORTS_SAVE ) | |
| 1519 | GAME( 1983, tiptop, congo, congo, congo, 0, ROT90, "Sega", "Tip Top", GAME_SUPPORTS_SAVE ) |
| r2454 | r2455 | |
|---|---|---|
| 49 | 49 | */ |
| 50 | 50 | |
| 51 | 51 | #include "driver.h" |
| 52 | #include "deprecat.h" | |
| 53 | 52 | #include "cpu/z80/z80.h" |
| 54 | 53 | #include "sound/ay8910.h" |
| 55 | 54 | #include "sound/dac.h" |
| r2454 | r2455 | |
| 80 | 79 | |
| 81 | 80 | static WRITE8_HANDLER( shangkid_bbx_enable_w ) |
| 82 | 81 | { |
| 83 | cpunum_set_input_line( | |
| 82 | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, data?0:1 ); | |
| 84 | 83 | } |
| 85 | 84 | |
| 86 | 85 | static WRITE8_HANDLER( shangkid_cpu_reset_w ) |
| 87 | 86 | { |
| 88 | 87 | if( data == 0 ) |
| 89 | 88 | { |
| 90 | cpunum_set_input_line( | |
| 89 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, PULSE_LINE); | |
| 91 | 90 | } |
| 92 | 91 | else if( data == 1 ) |
| 93 | 92 | { |
| 94 | cpunum_set_input_line( | |
| 93 | cpunum_set_input_line(machine, 0, INPUT_LINE_RESET, PULSE_LINE); | |
| 95 | 94 | } |
| 96 | 95 | } |
| 97 | 96 | |
| r2454 | r2455 | |
| 115 | 114 | { |
| 116 | 115 | if( data == 0x01 ) |
| 117 | 116 | /* 0->1 transition triggers interrupt on Sound CPU */ |
| 118 | cpunum_set_input_line( | |
| 117 | cpunum_set_input_line(machine, 2, 0, HOLD_LINE ); | |
| 119 | 118 | } |
| 120 | 119 | break; |
| 121 | 120 | |
| r2454 | r2455 | |
| 138 | 137 | { |
| 139 | 138 | if( data == 0x01 ) |
| 140 | 139 | /* 0->1 transition triggers interrupt on Sound CPU */ |
| 141 | cpunum_set_input_line( | |
| 140 | cpunum_set_input_line(machine, 2, 0, HOLD_LINE ); | |
| 142 | 141 | } |
| 143 | 142 | else |
| 144 | 143 | memory_set_bank(2, data ? 0 : 1); |
| r2454 | r2455 | |
|---|---|---|
| 288 | 288 | break; |
| 289 | 289 | |
| 290 | 290 | case 4: /* DM (DMA to buffer spriteram) */ |
| 291 | buffer_spriteram16_w(machine,0,0,0); | |
| 291 | buffer_spriteram16_w(machine,0,0,0xffff); | |
| 292 | 292 | break; |
| 293 | 293 | |
| 294 | 294 | case 6: /* SECREQ (Interrupt & Data to i8751) */ |
| r2454 | r2455 | |
| 315 | 315 | break; |
| 316 | 316 | |
| 317 | 317 | case 0xe: /* INTCLR (Interrupt ack for Level 7 vbl interrupt) */ |
| 318 | cpunum_set_input_line( | |
| 318 | cpunum_set_input_line(machine, 0,7,CLEAR_LINE); | |
| 319 | 319 | break; |
| 320 | 320 | } |
| 321 | 321 | } |
| r2454 | r2455 | |
|---|---|---|
| 79 | 79 | |
| 80 | 80 | /* clear coin interrupt */ |
| 81 | 81 | if (data & 0x04) |
| 82 | cpunum_set_input_line( | |
| 82 | cpunum_set_input_line(machine, 1, M6805_IRQ_LINE, CLEAR_LINE ); | |
| 83 | 83 | |
| 84 | 84 | /* AUDMUTE */ |
| 85 | 85 | sound_global_enable((data >> 5) & 1); |
| 86 | 86 | |
| 87 | 87 | /* RES600 */ |
| 88 | 88 | if (diff & 0x10) |
| 89 | cpunum_set_input_line( | |
| 89 | cpunum_set_input_line(machine, 0, INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE); | |
| 90 | 90 | |
| 91 | 91 | /* latch for lamps */ |
| 92 | 92 | if ((diff & 0x40) && !(data & 0x40)) |
| r2454 | r2455 | |
|---|---|---|
| 104 | 104 | ***************************************************************************/ |
| 105 | 105 | |
| 106 | 106 | #include "driver.h" |
| 107 | #include "deprecat.h" | |
| 108 | 107 | #include "cpu/m6502/m6502.h" |
| 109 | 108 | #include "sound/vlm5030.h" |
| 110 | 109 | #include "sound/nes_apu.h" |
| r2454 | r2455 | |
| 142 | 141 | |
| 143 | 142 | static READ8_HANDLER( punchout_input_3_r ) |
| 144 | 143 | { |
| 145 | int data = input_port_ | |
| 144 | int data = input_port_ | |
| 146 | 145 | /* bit 4 is busy pin level */ |
| 147 | 146 | if( VLM5030_BSY() ) data &= ~0x10; |
| 148 | 147 | else data |= 0x10; |
| r2454 | r2455 | |
| 167 | 166 | static WRITE8_HANDLER( punchout_2a03_reset_w ) |
| 168 | 167 | { |
| 169 | 168 | if (data & 1) |
| 170 | cpunum_set_input_line( | |
| 169 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, ASSERT_LINE); | |
| 171 | 170 | else |
| 172 | cpunum_set_input_line( | |
| 171 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, CLEAR_LINE); | |
| 173 | 172 | } |
| 174 | 173 | |
| 175 | 174 | static int prot_mode_sel = -1; /* Mode selector */ |
| r2454 | r2455 | |
|---|---|---|
| 637 | 637 | { |
| 638 | 638 | COMBINE_DATA(&timekeeper_nvram[offset]); |
| 639 | 639 | if (offset*4 >= 0x7ff0) |
| 640 | if (LOG_TIMEKEEPER) logerror("timekeeper_w(%04X & %08X) = %08X\n", offset*4, | |
| 640 | if (LOG_TIMEKEEPER) logerror("timekeeper_w(%04X & %08X) = %08X\n", offset*4, | |
| 641 | 641 | cmos_unlocked = 0; |
| 642 | 642 | } |
| 643 | 643 | else |
| 644 | logerror("%08X:timekeeper_w(%04X,%08X & %08X) without CMOS unlocked\n", activecpu_get_pc(), offset, data, | |
| 644 | logerror("%08X:timekeeper_w(%04X,%08X & %08X) without CMOS unlocked\n", activecpu_get_pc(), offset, data, | |
| 645 | 645 | } |
| 646 | 646 | |
| 647 | 647 | |
| r2454 | r2455 | |
| 660 | 660 | { |
| 661 | 661 | /* get the time */ |
| 662 | 662 | mame_system_time systime; |
| 663 | mame_get_base_datetime( | |
| 663 | mame_get_base_datetime(machine, &systime); | |
| 664 | 664 | |
| 665 | 665 | /* return portions thereof */ |
| 666 | 666 | switch (offset*4) |
| r2454 | r2455 | |
| 1111 | 1111 | { |
| 1112 | 1112 | case NREG_CPUSTAT+0: /* CPU status */ |
| 1113 | 1113 | case NREG_CPUSTAT+1: /* CPU status */ |
| 1114 | if (LOG_NILE) logerror("%08X:NILE WRITE: CPU status(%03X) = %08X & %08X\n", activecpu_get_pc(), offset*4, data, | |
| 1114 | if (LOG_NILE) logerror("%08X:NILE WRITE: CPU status(%03X) = %08X & %08X\n", activecpu_get_pc(), offset*4, data, | |
| 1115 | 1115 | logit = 0; |
| 1116 | 1116 | break; |
| 1117 | 1117 | |
| 1118 | 1118 | case NREG_INTCTRL+0: /* Interrupt control */ |
| 1119 | 1119 | case NREG_INTCTRL+1: /* Interrupt control */ |
| 1120 | if (LOG_NILE) logerror("%08X:NILE WRITE: interrupt control(%03X) = %08X & %08X\n", activecpu_get_pc(), offset*4, data, | |
| 1120 | if (LOG_NILE) logerror("%08X:NILE WRITE: interrupt control(%03X) = %08X & %08X\n", activecpu_get_pc(), offset*4, data, | |
| 1121 | 1121 | logit = 0; |
| 1122 | 1122 | update_nile_irqs(); |
| 1123 | 1123 | break; |
| 1124 | 1124 | |
| 1125 | 1125 | case NREG_INTSTAT0+0: /* Interrupt status 0 */ |
| 1126 | 1126 | case NREG_INTSTAT0+1: /* Interrupt status 0 */ |
| 1127 | if (LOG_NILE) logerror("%08X:NILE WRITE: interrupt status 0(%03X) = %08X & %08X\n", activecpu_get_pc(), offset*4, data, | |
| 1127 | if (LOG_NILE) logerror("%08X:NILE WRITE: interrupt status 0(%03X) = %08X & %08X\n", activecpu_get_pc(), offset*4, data, | |
| 1128 | 1128 | logit = 0; |
| 1129 | 1129 | update_nile_irqs(); |
| 1130 | 1130 | break; |
| 1131 | 1131 | |
| 1132 | 1132 | case NREG_INTSTAT1+0: /* Interrupt status 1 */ |
| 1133 | 1133 | case NREG_INTSTAT1+1: /* Interrupt status 1 */ |
| 1134 | if (LOG_NILE) logerror("%08X:NILE WRITE: interrupt status 1/enable(%03X) = %08X & %08X\n", activecpu_get_pc(), offset*4, data, | |
| 1134 | if (LOG_NILE) logerror("%08X:NILE WRITE: interrupt status 1/enable(%03X) = %08X & %08X\n", activecpu_get_pc(), offset*4, data, | |
| 1135 | 1135 | logit = 0; |
| 1136 | 1136 | update_nile_irqs(); |
| 1137 | 1137 | break; |
| 1138 | 1138 | |
| 1139 | 1139 | case NREG_INTCLR+0: /* Interrupt clear */ |
| 1140 | 1140 | case NREG_INTCLR+1: /* Interrupt clear */ |
| 1141 | if (LOG_NILE) logerror("%08X:NILE WRITE: interrupt clear(%03X) = %08X & %08X\n", activecpu_get_pc(), offset*4, data, | |
| 1141 | if (LOG_NILE) logerror("%08X:NILE WRITE: interrupt clear(%03X) = %08X & %08X\n", activecpu_get_pc(), offset*4, data, | |
| 1142 | 1142 | logit = 0; |
| 1143 | 1143 | nile_irq_state &= ~(nile_regs[offset] & ~0xf00); |
| 1144 | 1144 | update_nile_irqs(); |
| r2454 | r2455 | |
| 1146 | 1146 | |
| 1147 | 1147 | case NREG_INTPPES+0: /* PCI Interrupt control */ |
| 1148 | 1148 | case NREG_INTPPES+1: /* PCI Interrupt control */ |
| 1149 | if (LOG_NILE) logerror("%08X:NILE WRITE: PCI interrupt control(%03X) = %08X & %08X\n", activecpu_get_pc(), offset*4, data, | |
| 1149 | if (LOG_NILE) logerror("%08X:NILE WRITE: PCI interrupt control(%03X) = %08X & %08X\n", activecpu_get_pc(), offset*4, data, | |
| 1150 | 1150 | logit = 0; |
| 1151 | 1151 | break; |
| 1152 | 1152 | |
| r2454 | r2455 | |
| 1171 | 1171 | case NREG_T2CTRL+1: /* general purpose timer control (control bits) */ |
| 1172 | 1172 | case NREG_T3CTRL+1: /* watchdog timer control (control bits) */ |
| 1173 | 1173 | which = (offset - NREG_T0CTRL) / 4; |
| 1174 | if (LOG_NILE) logerror("%08X:NILE WRITE: timer %d control(%03X) = %08X & %08X\n", activecpu_get_pc(), which, offset*4, data, | |
| 1174 | if (LOG_NILE) logerror("%08X:NILE WRITE: timer %d control(%03X) = %08X & %08X\n", activecpu_get_pc(), which, offset*4, data, | |
| 1175 | 1175 | logit = 0; |
| 1176 | 1176 | |
| 1177 | 1177 | /* timer just enabled? */ |
| r2454 | r2455 | |
| 1200 | 1200 | case NREG_T2CNTR: /* general purpose timer control (counter) */ |
| 1201 | 1201 | case NREG_T3CNTR: /* watchdog timer control (counter) */ |
| 1202 | 1202 | which = (offset - NREG_T0CTRL) / 4; |
| 1203 | if (LOG_TIMERS) logerror("%08X:NILE WRITE: timer %d counter(%03X) = %08X & %08X\n", activecpu_get_pc(), which, offset*4, data, | |
| 1203 | if (LOG_TIMERS) logerror("%08X:NILE WRITE: timer %d counter(%03X) = %08X & %08X\n", activecpu_get_pc(), which, offset*4, data, | |
| 1204 | 1204 | logit = 0; |
| 1205 | 1205 | |
| 1206 | 1206 | if (nile_regs[offset - 1] & 1) |
| r2454 | r2455 | |
| 1255 | 1255 | } |
| 1256 | 1256 | |
| 1257 | 1257 | if (LOG_NILE && logit) |
| 1258 | logerror("%06X:nile write to offset %03X = %08X & %08X\n", activecpu_get_pc(), offset*4, data, | |
| 1258 | logerror("%06X:nile write to offset %03X = %08X & %08X\n", activecpu_get_pc(), offset*4, data, | |
| 1259 | 1259 | } |
| 1260 | 1260 | |
| 1261 | 1261 |
| r2454 | r2455 | |
|---|---|---|
| 665 | 665 | |
| 666 | 666 | ROM_START( rygar2 ) |
| 667 | 667 | ROM_REGION( 0x18000, REGION_CPU1, 0 ) |
| 668 | ROM_LOAD( "5p.bin", 0x00000, 0x08000, CRC(151ffc0b) SHA1(0eb877f2c68d3d1f52d7b12d0a8ad08c9932c054) ) /* code */ | |
| 669 | ROM_LOAD( "cpu_5m.bin", 0x08000, 0x04000, CRC(7ac5191b) SHA1(305f39d974f906f9bc24e9fe2ca58e647925ab63) ) /* code */ | |
| 670 | ROM_LOAD( "cpu_5j.bin", 0x10000, 0x08000, CRC(ed76d606) SHA1(39c8a07e9a1f218ad088d00a2c9dfc993efafb6b) ) /* banked at f000-f7ff */ | |
| 671 | ||
| 672 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) | |
| 673 | ROM_LOAD( "cpu_4h.bin", 0x0000, 0x2000, CRC(e4a2fa87) SHA1(ed58187dbbcf59358496a98ffd6c227a87d6c433) ) | |
| 674 | ||
| 675 | ROM_REGION( 0x08000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 676 | ROM_LOAD( "cpu_8k.bin", 0x00000, 0x08000, CRC(4d482fb6) SHA1(57ad838b6d30b49dbd2d0ec425f33cfb15a67918) ) /* characters */ | |
| 677 | ||
| 678 | ROM_REGION( 0x20000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 679 | ROM_LOAD( "vid_6k.bin", 0x00000, 0x08000, CRC(aba6db9e) SHA1(43eb6f4f92afb5fbc11adc7e2ab04878ab56cb17) ) /* sprites */ | |
| 680 | ROM_LOAD( "vid_6j.bin", 0x08000, 0x08000, CRC(ae1f2ed6) SHA1(6e6a33e665ba0884b7f57e9ad69d3f51e41d9e7b) ) /* sprites */ | |
| 681 | ROM_LOAD( "vid_6h.bin", 0x10000, 0x08000, CRC(46d9e7df) SHA1(a24e0bea310a03636af704a0ad3f1a9cc4aafe12) ) /* sprites */ | |
| 682 | ROM_LOAD( "vid_6g.bin", 0x18000, 0x08000, CRC(45839c9a) SHA1(eaee5767d8b0b62b991c089ef51b922e89850b79) ) /* sprites */ | |
| 683 | ||
| 684 | ROM_REGION( 0x20000, REGION_GFX3, ROMREGION_DISPOSE ) | |
| 685 | ROM_LOAD( "vid_6p.bin", 0x00000, 0x08000, CRC(9eae5f8e) SHA1(ed83b608ca57b9bf69fa866d9b8f55d16b7cff63) ) | |
| 686 | ROM_LOAD( "vid_6o.bin", 0x08000, 0x08000, CRC(5a10a396) SHA1(12ebed3952ff35a2c275cb27c915f82183048cd4) ) | |
| 687 | ROM_LOAD( "vid_6n.bin", 0x10000, 0x08000, CRC(7b12cf3f) SHA1(6b9d8cad6e15317df01bab0591fab09199ca6d40) ) | |
| 688 | ROM_LOAD( "vid_6l.bin", 0x18000, 0x08000, CRC(3cea7eaa) SHA1(1dd194d5672dfe71c2b27d2d7b76f5a611cff76f) ) | |
| 689 | ||
| 690 | ROM_REGION( 0x20000, REGION_GFX4, ROMREGION_DISPOSE ) | |
| 691 | ROM_LOAD( "vid_6f.bin", 0x00000, 0x08000, CRC(9840edd8) SHA1(f19a1a1d932214037144c533ad07ed81256c34e7) ) | |
| 692 | ROM_LOAD( "vid_6e.bin", 0x08000, 0x08000, CRC(ff65e074) SHA1(513c1bad336ef5d871f15d6ba8943020f98d1f4a) ) | |
| 693 | ROM_LOAD( "vid_6c.bin", 0x10000, 0x08000, CRC(89868c85) SHA1(f21550f40e7a177e95c40f2726c651f85ca8edce) ) | |
| 694 | ROM_LOAD( "vid_6b.bin", 0x18000, 0x08000, CRC(35389a7b) SHA1(a887a89f9bbb5979bb589468d80efba1f243690b) ) | |
| 695 | ||
| 696 | ROM_REGION( 0x4000, REGION_SOUND1, 0 ) /* ADPCM samples */ | |
| 697 | ROM_LOAD( "cpu_1f.bin", 0x0000, 0x4000, CRC(3cc98c5a) SHA1(ea1035be939ed1a994f3273b33412c85dda0973e) ) | |
| 698 | ROM_END | |
| 699 | ||
| 700 | ROM_START( rygar3 ) | |
| 701 | ROM_REGION( 0x18000, REGION_CPU1, 0 ) | |
| 668 | 702 | ROM_LOAD( "cpu_5p.bin", 0x00000, 0x08000, CRC(e79c054a) SHA1(1aaffa53d121d5c55899bf18e85c42333fe0df54) ) /* code */ |
| 669 | 703 | ROM_LOAD( "cpu_5m.bin", 0x08000, 0x04000, CRC(7ac5191b) SHA1(305f39d974f906f9bc24e9fe2ca58e647925ab63) ) /* code */ |
| 670 | 704 | ROM_LOAD( "cpu_5j.bin", 0x10000, 0x08000, CRC(ed76d606) SHA1(39c8a07e9a1f218ad088d00a2c9dfc993efafb6b) ) /* banked at f000-f7ff */ |
| r2454 | r2455 | |
| 845 | 879 | |
| 846 | 880 | GAME( 1986, rygar, 0, rygar, rygar, rygar, ROT0, "Tecmo", "Rygar (US set 1)", 0 ) |
| 847 | 881 | GAME( 1986, rygar2, rygar, rygar, rygar, rygar, ROT0, "Tecmo", "Rygar (US set 2)", 0 ) |
| 882 | GAME( 1986, rygar3, rygar, rygar, rygar, rygar, ROT0, "Tecmo", "Rygar (US set 3 Old Version)", 0 ) | |
| 848 | 883 | GAME( 1986, rygarj, rygar, rygar, rygar, rygar, ROT0, "Tecmo", "Argus no Senshi (Japan)", 0 ) |
| 849 | 884 | GAME( 1987, gemini, 0, gemini, gemini, gemini, ROT90, "Tecmo", "Gemini Wing", 0 ) |
| 850 | 885 | GAME( 1988, silkworm, 0, silkworm, silkworm, silkworm, ROT0, "Tecmo", "Silk Worm (set 1)", 0 ) |
| r2454 | r2455 | |
|---|---|---|
| 51 | 51 | |
| 52 | 52 | static WRITE8_HANDLER( finalizr_i8039_irq_w ) |
| 53 | 53 | { |
| 54 | cpunum_set_input_line( | |
| 54 | cpunum_set_input_line(machine, 1, 0, ASSERT_LINE); | |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | static WRITE8_HANDLER( i8039_irqen_w ) |
| r2454 | r2455 | |
| 62 | 62 | */ |
| 63 | 63 | |
| 64 | 64 | if ((data & 0x80) == 0) |
| 65 | cpunum_set_input_line( | |
| 65 | cpunum_set_input_line(machine, 1, 0, CLEAR_LINE); | |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | static READ8_HANDLER( i8039_T1_r ) |
| r2454 | r2455 | |
|---|---|---|
| 315 | 315 | */ |
| 316 | 316 | segaic16_set_display_enable(data & 0x80); |
| 317 | 317 | if (((old ^ data) & 0x20) && !(data & 0x20)) watchdog_reset_w(machine,0,0); |
| 318 | cpunum_set_input_line(Machine, 3, INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE); | |
| 319 | cpunum_set_input_line(Machine, 1, INPUT_LINE_RESET, (data & 0x08) ? ASSERT_LINE : CLEAR_LINE); | |
| 320 | cpunum_set_input_line(Machine, 2, INPUT_LINE_RESET, (data & 0x04) ? ASSERT_LINE : CLEAR_LINE); | |
| 318 | cpunum_set_input_line(machine, 3, INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE); | |
| 319 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, (data & 0x08) ? ASSERT_LINE : CLEAR_LINE); | |
| 320 | cpunum_set_input_line(machine, 2, INPUT_LINE_RESET, (data & 0x04) ? ASSERT_LINE : CLEAR_LINE); | |
| 321 | 321 | break; |
| 322 | 322 | |
| 323 | 323 | /* mute */ |
| r2454 | r2455 | |
|---|---|---|
| 189 | 189 | ***************************************************************************/ |
| 190 | 190 | |
| 191 | 191 | #include "driver.h" |
| 192 | #include "deprecat.h" | |
| 193 | 192 | #include "machine/segacrpt.h" |
| 194 | 193 | #include "sound/ay8910.h" |
| 195 | 194 | #include "sound/samples.h" |
| r2454 | r2455 | |
|---|---|---|
| 21 | 21 | ******************************************************************************/ |
| 22 | 22 | |
| 23 | 23 | #include "driver.h" |
| 24 | #include "deprecat.h" | |
| 25 | 24 | #include "sound/okim6295.h" |
| 26 | 25 | |
| 27 | 26 | /*** README INFO ************************************************************** |
| r2454 | r2455 | |
|---|---|---|
| 348 | 348 | if (!(data & 0x04) && (last_sound_data & 0x04)) |
| 349 | 349 | sound_latch = (sound_latch << 1) | (~data & 0x01); |
| 350 | 350 | |
| 351 | cpunum_set_input_line( | |
| 351 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, (data & 0x02) ? ASSERT_LINE : CLEAR_LINE); | |
| 352 | 352 | |
| 353 | 353 | last_sound_data = data; |
| 354 | 354 | } |
| r2454 | r2455 | |
| 391 | 391 | |
| 392 | 392 | static const struct AY8910interface ay8910_interface = |
| 393 | 393 | { |
| 394 | AY8910_LEGACY_OUTPUT, | |
| 395 | AY8910_DEFAULT_LOADS, | |
| 394 | 396 | sound_latch_r, |
| 395 | 397 | 0, |
| 396 | 398 | 0, |
| r2454 | r2455 | |
|---|---|---|
| 7 | 7 | *************************************************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "deprecat.h" | |
| 11 | 10 | #include "sound/okim6295.h" |
| 12 | 11 | #include "sound/2203intf.h" |
| 13 | 12 | |
| r2454 | r2455 | |
| 50 | 49 | static WRITE8_HANDLER( cowrace_soundlatch_w ) |
| 51 | 50 | { |
| 52 | 51 | soundlatch_w(0, data); |
| 53 | cpunum_set_input_line( | |
| 52 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, PULSE_LINE); | |
| 54 | 53 | } |
| 55 | 54 | #endif |
| 56 | 55 | |
| r2454 | r2455 | |
| 152 | 151 | |
| 153 | 152 | static const struct YM2203interface ym2203_interface_1 = |
| 154 | 153 | { |
| 155 | soundlatch_r, OKIM6295_status_0_r, // read A,B | |
| 156 | 0, OKIM6295_data_0_w, // write A,B | |
| 157 | 0 | |
| 154 | { | |
| 155 | AY8910_LEGACY_OUTPUT, | |
| 156 | AY8910_DEFAULT_LOADS, | |
| 157 | soundlatch_r, OKIM6295_status_0_r, // read A,B | |
| 158 | NULL, OKIM6295_data_0_w, // write A,B | |
| 159 | }, | |
| 160 | NULL | |
| 158 | 161 | }; |
| 159 | 162 | |
| 160 | 163 |
| r2454 | r2455 | |
|---|---|---|
| 79 | 79 | |
| 80 | 80 | static const ppi8255_interface single_ppi_intf = |
| 81 | 81 | { |
| 82 | 1, | |
| 83 | { unknown_porta_r }, | |
| 84 | { unknown_portb_r }, | |
| 85 | { unknown_portc_r }, | |
| 86 | { unknown_porta_w }, | |
| 87 | { unknown_portb_w }, | |
| 88 | { video_control_w } | |
| 82 | unknown_porta_r, | |
| 83 | unknown_portb_r, | |
| 84 | unknown_portc_r, | |
| 85 | unknown_porta_w, | |
| 86 | unknown_portb_w, | |
| 87 | video_control_w | |
| 89 | 88 | }; |
| 90 | 89 | |
| 91 | 90 | |
| r2454 | r2455 | |
| 156 | 155 | /* init the FD1094 */ |
| 157 | 156 | fd1094_driver_init(segaic16_memory_mapper_set_decrypted); |
| 158 | 157 | |
| 159 | /* configure the 8255 interface */ | |
| 160 | ppi8255_init(&single_ppi_intf); | |
| 161 | ||
| 162 | 158 | /* reset the custom handlers and other pointers */ |
| 163 | 159 | custom_io_r = NULL; |
| 164 | 160 | custom_io_w = NULL; |
| r2454 | r2455 | |
| 364 | 360 | if (custom_io_r) |
| 365 | 361 | return custom_io_r(machine, offset, mem_mask); |
| 366 | 362 | logerror("%06X:misc_io_r - unknown read access to address %04X\n", activecpu_get_pc(), offset * 2); |
| 367 | return segaic16_open_bus_r(machine,0, | |
| 363 | return segaic16_open_bus_r(machine,0,mem_mask); | |
| 368 | 364 | } |
| 369 | 365 | |
| 370 | 366 | |
| r2454 | r2455 | |
| 375 | 371 | custom_io_w(machine, offset, data, mem_mask); |
| 376 | 372 | return; |
| 377 | 373 | } |
| 378 | logerror("%06X:misc_io_w - unknown write access to address %04X = %04X & %04X\n", activecpu_get_pc(), offset * 2, data, mem_mask | |
| 374 | logerror("%06X:misc_io_w - unknown write access to address %04X = %04X & %04X\n", activecpu_get_pc(), offset * 2, data, mem_mask | |
| 379 | 375 | } |
| 380 | 376 | |
| 381 | 377 | |
| r2454 | r2455 | |
| 385 | 381 | switch (offset & 0x70/2) |
| 386 | 382 | { |
| 387 | 383 | case 0x00/2: |
| 388 | return ppi8255_ | |
| 384 | return ppi8255_ | |
| 389 | 385 | |
| 390 | 386 | case 0x10/2: |
| 391 | 387 | return input_port_read_indexed(machine, offset & 3); |
| r2454 | r2455 | |
| 401 | 397 | } |
| 402 | 398 | |
| 403 | 399 | logerror("%06X:outrun_custom_io_r - unknown read access to address %04X\n", activecpu_get_pc(), offset * 2); |
| 404 | return segaic16_open_bus_r(machine,0, | |
| 400 | return segaic16_open_bus_r(machine,0,mem_mask); | |
| 405 | 401 | } |
| 406 | 402 | |
| 407 | 403 | |
| r2454 | r2455 | |
| 412 | 408 | { |
| 413 | 409 | case 0x00/2: |
| 414 | 410 | if (ACCESSING_BITS_0_7) |
| 415 | ppi8255_ | |
| 411 | ppi8255_ | |
| 416 | 412 | return; |
| 417 | 413 | |
| 418 | 414 | case 0x20/2: |
| r2454 | r2455 | |
| 438 | 434 | segaic16_sprites_draw_0_w(machine, offset, data, mem_mask); |
| 439 | 435 | return; |
| 440 | 436 | } |
| 441 | logerror("%06X:misc_io_w - unknown write access to address %04X = %04X & %04X\n", activecpu_get_pc(), offset * 2, data, mem_mask | |
| 437 | logerror("%06X:misc_io_w - unknown write access to address %04X = %04X & %04X\n", activecpu_get_pc(), offset * 2, data, mem_mask | |
| 442 | 438 | } |
| 443 | 439 | |
| 444 | 440 | |
| r2454 | r2455 | |
| 460 | 456 | } |
| 461 | 457 | } |
| 462 | 458 | logerror("%06X:misc_io_r - unknown read access to address %04X\n", activecpu_get_pc(), offset * 2); |
| 463 | return segaic16_open_bus_r(machine,0, | |
| 459 | return segaic16_open_bus_r(machine,0,mem_mask); | |
| 464 | 460 | } |
| 465 | 461 | |
| 466 | 462 | |
| r2454 | r2455 | |
| 493 | 489 | /* ADC trigger */ |
| 494 | 490 | return; |
| 495 | 491 | } |
| 496 | logerror("%06X:misc_io_w - unknown write access to address %04X = %04X & %04X\n", activecpu_get_pc(), offset * 2, data, mem_mask | |
| 492 | logerror("%06X:misc_io_w - unknown write access to address %04X = %04X & %04X\n", activecpu_get_pc(), offset * 2, data, mem_mask | |
| 497 | 493 | } |
| 498 | 494 | |
| 499 | 495 | |
| r2454 | r2455 | |
| 829 | 825 | MDRV_MACHINE_RESET(outrun) |
| 830 | 826 | MDRV_INTERLEAVE(100) |
| 831 | 827 | |
| 828 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 829 | MDRV_DEVICE_CONFIG( single_ppi_intf ) | |
| 830 | ||
| 832 | 831 | /* video hardware */ |
| 833 | 832 | MDRV_GFXDECODE(segaorun) |
| 834 | 833 | MDRV_PALETTE_LENGTH(4096*3) |
| r2454 | r2455 | |
|---|---|---|
| 73 | 73 | if(inputcnt<0){ return 0; } |
| 74 | 74 | if(!inputcnt) |
| 75 | 75 | { |
| 76 | int key=input_port_ | |
| 76 | int key=input_port_ | |
| 77 | 77 | int keyval=0; //we must return 0 (0x2 in 2nd read) to clear 4 bit at $6600 and allow next read |
| 78 | 78 | |
| 79 | 79 | if(key) |
| r2454 | r2455 | |
| 240 | 240 | |
| 241 | 241 | static const struct AY8910interface ay8910_interface = |
| 242 | 242 | { |
| 243 | 0, input_r, | |
| 244 | unknown_w, 0 | |
| 243 | AY8910_LEGACY_OUTPUT, | |
| 244 | AY8910_DEFAULT_LOADS, | |
| 245 | NULL, input_r, | |
| 246 | unknown_w, NULL | |
| 245 | 247 | }; |
| 246 | 248 | |
| 247 | 249 | #define KOIKOI_CRYSTAL 15468000 |
| r2454 | r2455 | |
|---|---|---|
| 123 | 123 | |
| 124 | 124 | static const struct AY8910interface ay8910_interface = |
| 125 | 125 | { |
| 126 | AY8910_LEGACY_OUTPUT, | |
| 127 | AY8910_DEFAULT_LOADS, | |
| 126 | 128 | input_port_0_r, |
| 127 | 129 | input_port_1_r, |
| 130 | NULL, | |
| 131 | NULL | |
| 128 | 132 | }; |
| 129 | 133 | |
| 130 | 134 |
| r2454 | r2455 | |
|---|---|---|
| 74 | 74 | { |
| 75 | 75 | COMBINE_DATA(&paletteram32[offset]); |
| 76 | 76 | data = paletteram32[offset]; |
| 77 | palette_set_color_rgb( | |
| 77 | palette_set_color_rgb(machine, offset, pal5bit(data >> 10), pal5bit(data >> 5), pal5bit(data >> 0)); | |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | static void voodoo_vblank_0(int param) |
| r2454 | r2455 | |
| 349 | 349 | { |
| 350 | 350 | if (data & 0x80000000) /* CG Board 1 IRQ Ack */ |
| 351 | 351 | { |
| 352 | cpunum_set_input_line( | |
| 352 | cpunum_set_input_line(machine, 0, INPUT_LINE_IRQ1, CLEAR_LINE); | |
| 353 | 353 | } |
| 354 | 354 | if (data & 0x40000000) /* CG Board 0 IRQ Ack */ |
| 355 | 355 | { |
| 356 | cpunum_set_input_line( | |
| 356 | cpunum_set_input_line(machine, 0, INPUT_LINE_IRQ0, CLEAR_LINE); | |
| 357 | 357 | } |
| 358 | 358 | |
| 359 | 359 | adc1038_di_w((data >> 24) & 1); |
| r2454 | r2455 | |
|---|---|---|
| 146 | 146 | |
| 147 | 147 | static WRITE8_HANDLER( cloak_irq_reset_0_w ) |
| 148 | 148 | { |
| 149 | cpunum_set_input_line( | |
| 149 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | static WRITE8_HANDLER( cloak_irq_reset_1_w ) |
| 153 | 153 | { |
| 154 | cpunum_set_input_line( | |
| 154 | cpunum_set_input_line(machine, 1, 0, CLEAR_LINE); | |
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | static WRITE8_HANDLER( cloak_nvram_enable_w ) |
| r2454 | r2455 | |
|---|---|---|
| 36 | 36 | ****************************************************************************/ |
| 37 | 37 | |
| 38 | 38 | #include "driver.h" |
| 39 | #include "deprecat.h" | |
| 40 | 39 | #include "sound/ay8910.h" |
| 41 | 40 | |
| 42 | 41 | static UINT8 *cfb_ram; |
| r2454 | r2455 | |
| 284 | 283 | { |
| 285 | 284 | zpu_int_vector &= ~2; /* clear D1 on INTA (interrupt acknowledge) */ |
| 286 | 285 | |
| 287 | cpunum_set_input_line( | |
| 286 | cpunum_set_input_line(machine, 0, 0, ASSERT_LINE); /* main cpu interrupt (comes from CFB (generated at the start of INT routine on CFB) - vblank?) */ | |
| 288 | 287 | } |
| 289 | 288 | |
| 290 | 289 | static READ8_HANDLER( cfb_zpu_int_req_clr ) |
| r2454 | r2455 | |
| 293 | 292 | |
| 294 | 293 | /* clear the INT line when there are no more interrupt requests */ |
| 295 | 294 | if (zpu_int_vector==0xff) |
| 296 | cpunum_set_input_line( | |
| 295 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 297 | 296 | |
| 298 | 297 | return 0; |
| 299 | 298 | } |
| r2454 | r2455 | |
| 584 | 583 | bit0 = (data >> 0) & 0x01; |
| 585 | 584 | b = combine_3_weights(weights_b, bit0, bit1, bit2); |
| 586 | 585 | |
| 587 | palette_set_color( | |
| 586 | palette_set_color(machine, 255, MAKE_RGB(r, g, b)); | |
| 588 | 587 | //logerror("background color (port 01) write=%02x\n",data); |
| 589 | 588 | } |
| 590 | 589 | } |
| r2454 | r2455 | |
| 977 | 976 | b = combine_3_weights(weights_b, bit0, bit1, bit2); |
| 978 | 977 | |
| 979 | 978 | if ((x+y*16)<255)//keep color 255 free for use as background color |
| 980 | palette_set_color( | |
| 979 | palette_set_color(machine, x+y*16, MAKE_RGB(r, g, b)); | |
| 981 | 980 | |
| 982 | 981 | lookup_RAM[ lookup_offs + x + y*16 ] = colour; |
| 983 | 982 | } |
| r2454 | r2455 | |
| 1114 | 1113 | |
| 1115 | 1114 | static WRITE8_HANDLER( sound_int_clear_w ) |
| 1116 | 1115 | { |
| 1117 | cpunum_set_input_line( | |
| 1116 | cpunum_set_input_line(machine, 1, 0, CLEAR_LINE); | |
| 1118 | 1117 | } |
| 1119 | 1118 | static WRITE8_HANDLER( sound_nmi_clear_w ) |
| 1120 | 1119 | { |
| 1121 | cpunum_set_input_line( | |
| 1120 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, CLEAR_LINE); | |
| 1122 | 1121 | } |
| 1123 | 1122 | |
| 1124 | 1123 | static WRITE8_HANDLER( gg_led_ctrl_w ) |
| r2454 | r2455 | |
| 1471 | 1470 | /* only Great Guns */ |
| 1472 | 1471 | static const struct AY8910interface ay8912_interface_1 = |
| 1473 | 1472 | { |
| 1474 | 0, | |
| 1475 | soundcommand_r | |
| 1473 | AY8910_LEGACY_OUTPUT, | |
| 1474 | AY8910_DEFAULT_LOADS, | |
| 1475 | NULL, | |
| 1476 | soundcommand_r, | |
| 1477 | NULL, | |
| 1478 | NULL | |
| 1476 | 1479 | }; |
| 1477 | 1480 | |
| 1478 | 1481 | static const struct AY8910interface ay8912_interface_2 = |
| 1479 | 1482 | { |
| 1480 | 0, | |
| 1481 | 0, | |
| 1482 | 0, | |
| 1483 | AY8910_LEGACY_OUTPUT, | |
| 1484 | AY8910_DEFAULT_LOADS, | |
| 1485 | NULL, | |
| 1486 | NULL, | |
| 1487 | NULL, | |
| 1483 | 1488 | gg_led_ctrl_w |
| 1484 | 1489 | }; |
| 1485 | 1490 |
| r2454 | r2455 | |
|---|---|---|
| 180 | 180 | /* bit 1 = UPDATE */ |
| 181 | 181 | |
| 182 | 182 | if (!(data & 0x04)) |
| 183 | atarigen_scanline_int_ack_w(machine,0,0,0); | |
| 183 | atarigen_scanline_int_ack_w(machine,0,0,0xffff); | |
| 184 | 184 | if (!(data & 0x08)) |
| 185 | atarigen_video_int_ack_w(machine,0,0,0); | |
| 185 | atarigen_video_int_ack_w(machine,0,0,0xffff); | |
| 186 | 186 | |
| 187 | 187 | output_set_led_value(0, (data >> 4) & 1); |
| 188 | 188 | output_set_led_value(1, (data >> 5) & 1); |
| r2454 | r2455 | |
|---|---|---|
| 835 | 835 | } |
| 836 | 836 | if( dest>=0xf00000 && dest<=0xf02000 ) |
| 837 | 837 | { |
| 838 | namcona1_paletteram_w( machine, (dest-0xf00000)/2, data, 0x | |
| 838 | namcona1_paletteram_w( machine, (dest-0xf00000)/2, data, 0xffff ); | |
| 839 | 839 | } |
| 840 | 840 | else if( dest>=0xf40000 && dest<=0xf80000 ) |
| 841 | 841 | { |
| 842 | namcona1_gfxram_w( machine, (dest-0xf40000)/2, data, 0x | |
| 842 | namcona1_gfxram_w( machine, (dest-0xf40000)/2, data, 0xffff ); | |
| 843 | 843 | } |
| 844 | 844 | else if( dest>=0xff0000 && dest<0xff8000 ) |
| 845 | 845 | { |
| 846 | namcona1_videoram_w( machine, (dest-0xff0000)/2, data, 0x | |
| 846 | namcona1_videoram_w( machine, (dest-0xff0000)/2, data, 0xffff ); | |
| 847 | 847 | } |
| 848 | 848 | else if( dest>=0xff8000 && dest<=0xffdfff ) |
| 849 | 849 | { |
| r2454 | r2455 | |
| 1111 | 1111 | |
| 1112 | 1112 | static WRITE16_HANDLER( na1mcu_shared_w ) |
| 1113 | 1113 | { |
| 1114 | mem_mask = ((mem_mask>>8)&0xff) | ((mem_mask<<8)&0xff00); | |
| 1115 | data = ((data>>8)&0xff) | ((data<<8)&0xff00); | |
| 1114 | mem_mask = FLIPENDIAN_INT16(mem_mask); | |
| 1115 | data = FLIPENDIAN_INT16(data); | |
| 1116 | 1116 | |
| 1117 | 1117 | COMBINE_DATA(&namcona1_workram[offset]); |
| 1118 | 1118 | } |
| r2454 | r2455 | |
|---|---|---|
| 226 | 226 | int i; |
| 227 | 227 | for (i = 0; i < 0x1000; i++) |
| 228 | 228 | { |
| 229 | armedf_text_videoram_w(machine,i, ' ', 0); | |
| 229 | armedf_text_videoram_w(machine,i, ' ', 0xffff); | |
| 230 | 230 | } |
| 231 | 231 | } |
| 232 | 232 | } |
| r2454 | r2455 | |
|---|---|---|
| 230 | 230 | |
| 231 | 231 | static const struct AY8910interface ay8910_interface = |
| 232 | 232 | { |
| 233 | AY8910_LEGACY_OUTPUT, | |
| 234 | AY8910_DEFAULT_LOADS, | |
| 233 | 235 | input_port_3_r, |
| 234 | input_port_4_r | |
| 236 | input_port_4_r, | |
| 237 | NULL, | |
| 238 | NULL | |
| 235 | 239 | }; |
| 236 | 240 | |
| 237 | 241 |
| r2454 | r2455 | |
|---|---|---|
| 64 | 64 | |
| 65 | 65 | static WRITE8_HANDLER( metlclsh_cause_irq ) |
| 66 | 66 | { |
| 67 | cpunum_set_input_line( | |
| 67 | cpunum_set_input_line(machine, 1,M6809_IRQ_LINE,ASSERT_LINE); | |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | static WRITE8_HANDLER( metlclsh_ack_nmi ) |
| 71 | 71 | { |
| 72 | cpunum_set_input_line( | |
| 72 | cpunum_set_input_line(machine, 0,INPUT_LINE_NMI,CLEAR_LINE); | |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | static ADDRESS_MAP_START( metlclsh_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| r2454 | r2455 | |
| 115 | 115 | |
| 116 | 116 | static WRITE8_HANDLER( metlclsh_cause_nmi2 ) |
| 117 | 117 | { |
| 118 | cpunum_set_input_line( | |
| 118 | cpunum_set_input_line(machine, 0,INPUT_LINE_NMI,ASSERT_LINE); | |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | static WRITE8_HANDLER( metlclsh_ack_irq2 ) |
| 122 | 122 | { |
| 123 | cpunum_set_input_line( | |
| 123 | cpunum_set_input_line(machine, 1,M6809_IRQ_LINE,CLEAR_LINE); | |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | static WRITE8_HANDLER( metlclsh_ack_nmi2 ) |
| 127 | 127 | { |
| 128 | cpunum_set_input_line( | |
| 128 | cpunum_set_input_line(machine, 1,INPUT_LINE_NMI,CLEAR_LINE); | |
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | static WRITE8_HANDLER( metlclsh_flipscreen_w ) |
| r2454 | r2455 | |
|---|---|---|
| 8 | 8 | ***************************************************************************/ |
| 9 | 9 | |
| 10 | 10 | #include "driver.h" |
| 11 | #include "deprecat.h" | |
| 12 | 11 | #include "cpu/konami/konami.h" /* for the callback and the firq irq definition */ |
| 13 | 12 | #include "video/konamiic.h" |
| 14 | 13 | #include "sound/k007232.h" |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "cpu/konami/konami.h" |
| 10 | 9 | #include "cpu/z80/z80.h" |
| 11 | 10 | #include "video/konamiic.h" |
| r2454 | r2455 | |
| 68 | 67 | |
| 69 | 68 | static WRITE8_HANDLER( k88games_sh_irqtrigger_w ) |
| 70 | 69 | { |
| 71 | cpunum_set_input_line_and_vector( | |
| 70 | cpunum_set_input_line_and_vector(machine, 1, 0, HOLD_LINE, 0xff); | |
| 72 | 71 | } |
| 73 | 72 | |
| 74 | 73 | /* handle fake button for speed cheat for players 1 and 2 */ |
| r2454 | r2455 | |
|---|---|---|
| 6555 | 6555 | |
| 6556 | 6556 | static const struct AY8910interface quiz365_ay8910_interface = |
| 6557 | 6557 | { |
| 6558 | AY8910_LEGACY_OUTPUT, | |
| 6559 | AY8910_DEFAULT_LOADS, | |
| 6558 | 6560 | quiz365_input_r, |
| 6559 | 6561 | 0, |
| 6560 | 6562 | 0, |
| r2454 | r2455 | |
| 6893 | 6895 | |
| 6894 | 6896 | static const struct AY8910interface mjmyster_ay8910_interface = |
| 6895 | 6897 | { |
| 6898 | AY8910_LEGACY_OUTPUT, | |
| 6899 | AY8910_DEFAULT_LOADS, | |
| 6896 | 6900 | 0, |
| 6897 | 6901 | 0, |
| 6898 | 6902 | 0, |
| r2454 | r2455 | |
| 6941 | 6945 | |
| 6942 | 6946 | static const struct AY8910interface hginga_ay8910_interface = |
| 6943 | 6947 | { |
| 6948 | AY8910_LEGACY_OUTPUT, | |
| 6949 | AY8910_DEFAULT_LOADS, | |
| 6944 | 6950 | // A B |
| 6945 | 6951 | hginga_dsw_r, 0, // R |
| 6946 | 6952 | 0, ddenlovr_select_w // W |
| r2454 | r2455 | |
|---|---|---|
| 142 | 142 | |
| 143 | 143 | static WRITE8_HANDLER( chinagat_sub_IRQ_w ) |
| 144 | 144 | { |
| 145 | cpunum_set_input_line( | |
| 145 | cpunum_set_input_line(machine, 1, sprite_irq, (sprite_irq == INPUT_LINE_NMI) ? PULSE_LINE : HOLD_LINE ); | |
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | static WRITE8_HANDLER( chinagat_cpu_sound_cmd_w ) |
| r2454 | r2455 | |
| 483 | 483 | /* This is only on the second bootleg board */ |
| 484 | 484 | static const struct YM2203interface ym2203_interface = |
| 485 | 485 | { |
| 486 | 0, | |
| 487 | 0, | |
| 488 | 0, | |
| 489 | 0, | |
| 486 | { | |
| 487 | AY8910_LEGACY_OUTPUT, | |
| 488 | AY8910_DEFAULT_LOADS, | |
| 489 | NULL, NULL, NULL, NULL | |
| 490 | }, | |
| 490 | 491 | chinagat_irq_handler |
| 491 | 492 | }; |
| 492 | 493 |
| r2454 | r2455 | |
|---|---|---|
| 1649 | 1649 | |
| 1650 | 1650 | static const struct AY8910interface ay8910_intf_dsw = |
| 1651 | 1651 | { |
| 1652 | AY8910_LEGACY_OUTPUT, | |
| 1653 | AY8910_DEFAULT_LOADS, | |
| 1652 | 1654 | input_port_4_r, /* input A: DSW 1 */ |
| 1653 | input_port_5_r /* input B: DSW 2 */ | |
| 1655 | input_port_5_r, /* input B: DSW 2 */ | |
| 1656 | NULL, | |
| 1657 | NULL, | |
| 1654 | 1658 | }; |
| 1655 | 1659 | |
| 1656 | 1660 | static const struct AY8910interface ay8910_intf_eeprom = |
| 1657 | 1661 | { |
| 1662 | AY8910_LEGACY_OUTPUT, | |
| 1663 | AY8910_DEFAULT_LOADS, | |
| 1658 | 1664 | kaneko16_eeprom_r, /* inputs A: 0,EEPROM bit read */ |
| 1659 | 0, /* inputs B */ | |
| 1660 | 0, /* outputs A */ | |
| 1665 | NULL, /* inputs B */ | |
| 1666 | NULL, /* outputs A */ | |
| 1661 | 1667 | kaneko16_eeprom_reset_w /* outputs B: 0,EEPROM reset */ |
| 1662 | 1668 | }; |
| 1663 | 1669 |
| r2454 | r2455 | |
|---|---|---|
| 275 | 275 | |
| 276 | 276 | static const struct AY8910interface ay8910_interface = |
| 277 | 277 | { |
| 278 | input_port_7_r, /* DSW 4 */ | |
| 279 | input_port_6_r, /* DSW 3 */ | |
| 280 | 0, | |
| 281 | 0 | |
| 278 | AY8910_LEGACY_OUTPUT, | |
| 279 | AY8910_DEFAULT_LOADS, | |
| 280 | input_port_7_r, /* DSW 4 */ | |
| 281 | input_port_6_r, /* DSW 3 */ | |
| 282 | NULL, | |
| 283 | NULL | |
| 282 | 284 | }; |
| 283 | 285 | |
| 284 | 286 | static MACHINE_DRIVER_START( goldstar ) |
| r2454 | r2455 | |
|---|---|---|
| 135 | 135 | |
| 136 | 136 | static WRITE16_HANDLER( dbz_sound_cause_nmi ) |
| 137 | 137 | { |
| 138 | cpunum_set_input_line( | |
| 138 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, PULSE_LINE); | |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | static void dbz_sound_irq(int irq) |
| r2454 | r2455 | |
|---|---|---|
| 302 | 302 | case 0: |
| 303 | 303 | // sound data |
| 304 | 304 | if (ACCESSING_BITS_0_7) |
| 305 | cpunum_set_input_line( | |
| 305 | cpunum_set_input_line(machine, 2, 0, HOLD_LINE); | |
| 306 | 306 | else |
| 307 | 307 | LOG_UNKNOWN_WRITE |
| 308 | 308 | break; |
| r2454 | r2455 | |
|---|---|---|
| 309 | 309 | |
| 310 | 310 | static const struct YM2608interface ym2608_interface = |
| 311 | 311 | { |
| 312 | 0,0,0,0,irqhandler, | |
| 312 | { | |
| 313 | AY8910_LEGACY_OUTPUT, | |
| 314 | AY8910_DEFAULT_LOADS, | |
| 315 | NULL, NULL, NULL, NULL | |
| 316 | }, | |
| 317 | irqhandler, | |
| 313 | 318 | REGION_SOUND1 |
| 314 | 319 | }; |
| 315 | 320 |
| r2454 | r2455 | |
|---|---|---|
| 289 | 289 | |
| 290 | 290 | static WRITE32_HANDLER( reset_sub_w ) |
| 291 | 291 | { |
| 292 | if(data) cpunum_set_input_line( | |
| 292 | if(data) cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, PULSE_LINE); // 0 too ? | |
| 293 | 293 | } |
| 294 | 294 | |
| 295 | 295 |
| r2454 | r2455 | |
|---|---|---|
| 9 | 9 | *************************************************************************************************************/ |
| 10 | 10 | |
| 11 | 11 | #include "driver.h" |
| 12 | #include "deprecat.h" | |
| 13 | 12 | #include "sound/ay8910.h" |
| 14 | 13 | |
| 15 | 14 | static tilemap *tmap, *tmap2; |
| r2454 | r2455 | |
| 123 | 122 | paletteram[color] = data; |
| 124 | 123 | r = paletteram[(color/3*3)+0]; g = paletteram[(color/3*3)+1]; b = paletteram[(color/3*3)+2]; |
| 125 | 124 | r = (r << 2) | (r >> 4); g = (g << 2) | (g >> 4); b = (b << 2) | (b >> 4); |
| 126 | palette_set_color( | |
| 125 | palette_set_color(machine,color/3,MAKE_RGB(r,g,b)); | |
| 127 | 126 | color = (color + 1) % (0x100*3); |
| 128 | 127 | } |
| 129 | 128 | } |
| r2454 | r2455 | |
| 142 | 141 | paletteram_2[color] = data; |
| 143 | 142 | r = paletteram_2[(color/3*3)+0]; g = paletteram_2[(color/3*3)+1]; b = paletteram_2[(color/3*3)+2]; |
| 144 | 143 | r = (r << 2) | (r >> 4); g = (g << 2) | (g >> 4); b = (b << 2) | (b >> 4); |
| 145 | palette_set_color( | |
| 144 | palette_set_color(machine,0x100 + color/3,MAKE_RGB(r,g,b)); | |
| 146 | 145 | color = (color + 1) % (0x100*3); |
| 147 | 146 | } |
| 148 | 147 | } |
| r2454 | r2455 | |
| 412 | 411 | |
| 413 | 412 | static const struct AY8910interface ay8910_interface = |
| 414 | 413 | { |
| 415 | input_port_6_r, input_port_7_r, | |
| 416 | 0, 0 | |
| 414 | AY8910_LEGACY_OUTPUT, | |
| 415 | AY8910_DEFAULT_LOADS, | |
| 416 | input_port_6_r, | |
| 417 | input_port_7_r, | |
| 418 | NULL, | |
| 419 | NULL | |
| 417 | 420 | }; |
| 418 | 421 | |
| 419 | 422 |
| r2454 | r2455 | |
|---|---|---|
| 38 | 38 | { |
| 39 | 39 | switch (offset<<1) { |
| 40 | 40 | case 6: /* DMA flag */ |
| 41 | buffer_spriteram16_w(machine,0,0,0); | |
| 41 | buffer_spriteram16_w(machine,0,0,0xffff); | |
| 42 | 42 | return; |
| 43 | 43 | case 8: /* Sound CPU write */ |
| 44 | 44 | soundlatch_w(machine,0,data & 0xff); |
| r2454 | r2455 | |
|---|---|---|
| 43 | 43 | ***************************************************************************/ |
| 44 | 44 | |
| 45 | 45 | #include "driver.h" |
| 46 | #include "deprecat.h" | |
| 47 | 46 | #include "sound/ay8910.h" |
| 48 | 47 | #include "sound/dac.h" |
| 49 | 48 | |
| r2454 | r2455 | |
| 107 | 106 | if (((portb & 4) == 0) && (data & 4)) |
| 108 | 107 | { |
| 109 | 108 | /* reset and start the protection mcu */ |
| 110 | cpunum_set_input_line(Machine, 1, INPUT_LINE_RESET, PULSE_LINE); | |
| 111 | cpunum_set_input_line(Machine, 1, INPUT_LINE_HALT, CLEAR_LINE); | |
| 109 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, PULSE_LINE); | |
| 110 | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, CLEAR_LINE); | |
| 112 | 111 | } |
| 113 | 112 | |
| 114 | 113 | /* other bits unknown */ |
| r2454 | r2455 | |
| 391 | 390 | |
| 392 | 391 | static const struct AY8910interface ay8910_interface = |
| 393 | 392 | { |
| 394 | 0, | |
| 393 | AY8910_LEGACY_OUTPUT, | |
| 394 | AY8910_DEFAULT_LOADS, | |
| 395 | NULL, | |
| 395 | 396 | friskyt_portB_r, |
| 396 | | |
| 397 | NULL, | |
| 397 | 398 | friskyt_portB_w |
| 398 | 399 | }; |
| 399 | 400 |
| r2454 | r2455 | |
|---|---|---|
| 1205 | 1205 | } |
| 1206 | 1206 | static READ16_HANDLER( ga_io_service_r ) |
| 1207 | 1207 | { |
| 1208 | return (input_port_ | |
| 1208 | return (input_port_ | |
| 1209 | 1209 | } |
| 1210 | 1210 | |
| 1211 | 1211 | static ADDRESS_MAP_START( goldnaxe_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| r2454 | r2455 | |
| 1231 | 1231 | if( ACCESSING_BITS_8_15 ) |
| 1232 | 1232 | { |
| 1233 | 1233 | soundlatch_w( machine,0,data>>8 ); |
| 1234 | cpunum_set_input_line( | |
| 1234 | cpunum_set_input_line(machine, 1, 0, HOLD_LINE ); | |
| 1235 | 1235 | } |
| 1236 | 1236 | } |
| 1237 | 1237 | |
| r2454 | r2455 | |
| 1400 | 1400 | |
| 1401 | 1401 | static READ16_HANDLER( passht4b_service_r ) |
| 1402 | 1402 | { |
| 1403 | UINT16 val=input_port_ | |
| 1403 | UINT16 val=input_port_ | |
| 1404 | 1404 | if(!(input_port_read_indexed(machine, 0) & 0x40)) val&=0xef; |
| 1405 | 1405 | if(!(input_port_read_indexed(machine, 1) & 0x40)) val&=0xdf; |
| 1406 | 1406 | if(!(input_port_read_indexed(machine, 5) & 0x40)) val&=0xbf; |
| r2454 | r2455 | |
| 1908 | 1908 | /***************************************************************************/ |
| 1909 | 1909 | |
| 1910 | 1910 | static READ16_HANDLER( tt_io_player1_r ) |
| 1911 | { return input_port_ | |
| 1911 | { return input_port_ | |
| 1912 | 1912 | static READ16_HANDLER( tt_io_player2_r ) |
| 1913 | { return input_port_ | |
| 1913 | { return input_port_ | |
| 1914 | 1914 | static READ16_HANDLER( tt_io_service_r ) |
| 1915 | { return input_port_ | |
| 1915 | { return input_port_ | |
| 1916 | 1916 | |
| 1917 | 1917 | |
| 1918 | 1918 |
| r2454 | r2455 | |
|---|---|---|
| 138 | 138 | /* update the different PIA pins from the input ports */ |
| 139 | 139 | |
| 140 | 140 | /* CA1 - copy of PA0 (COIN1) */ |
| 141 | pia_1_ca1_w(machine, 0, input_port_ | |
| 141 | pia_1_ca1_w(machine, 0, input_port_ | |
| 142 | 142 | |
| 143 | 143 | /* CA2 - copy of PA1 (SERVICE1) */ |
| 144 | pia_1_ca2_w(machine, 0, input_port_ | |
| 144 | pia_1_ca2_w(machine, 0, input_port_ | |
| 145 | 145 | |
| 146 | 146 | /* CB1 - (crosshatch) */ |
| 147 | pia_1_cb1_w(machine, 0, input_port_ | |
| 147 | pia_1_cb1_w(machine, 0, input_port_ | |
| 148 | 148 | |
| 149 | 149 | /* CB2 - NOT CONNECTED */ |
| 150 | 150 | } |
| r2454 | r2455 | |
| 461 | 461 | |
| 462 | 462 | static const struct AY8910interface ay8910_37_interface = |
| 463 | 463 | { |
| 464 | 0, | |
| 465 | 0, | |
| 464 | AY8910_LEGACY_OUTPUT, | |
| 465 | AY8910_DEFAULT_LOADS, | |
| 466 | NULL, | |
| 467 | NULL, | |
| 466 | 468 | nyny_ay8910_37_port_a_w, |
| 467 | 469 | nyny_ay8910_37_port_b_w |
| 468 | 470 | }; |
| r2454 | r2455 | |
| 470 | 472 | |
| 471 | 473 | static const struct AY8910interface ay8910_64_interface = |
| 472 | 474 | { |
| 475 | AY8910_LEGACY_OUTPUT, | |
| 476 | AY8910_DEFAULT_LOADS, | |
| 473 | 477 | input_port_3_r, |
| 474 | input_port_2_r | |
| 478 | input_port_2_r, | |
| 479 | NULL, | |
| 480 | NULL | |
| 475 | 481 | }; |
| 476 | 482 | |
| 477 | 483 |
| r2454 | r2455 | |
|---|---|---|
| 24 | 24 | */ |
| 25 | 25 | |
| 26 | 26 | #include "driver.h" |
| 27 | #include "deprecat.h" | |
| 28 | 27 | #include "sound/okim6295.h" |
| 29 | 28 | #include "machine/eeprom.h" |
| 30 | 29 | |
| r2454 | r2455 | |
| 64 | 63 | if(ACCESSING_BITS_0_15) |
| 65 | 64 | { |
| 66 | 65 | paldata = paletteram32[offset] & 0x7fff; |
| 67 | palette_set_color_rgb( | |
| 66 | palette_set_color_rgb(machine, offset * 2 + 1, pal5bit(paldata >> 0), pal5bit(paldata >> 5), pal5bit(paldata >> 10)); | |
| 68 | 67 | } |
| 69 | 68 | |
| 70 | 69 | if(ACCESSING_BITS_16_31) |
| 71 | 70 | { |
| 72 | 71 | paldata = (paletteram32[offset] >> 16) & 0x7fff; |
| 73 | palette_set_color_rgb( | |
| 72 | palette_set_color_rgb(machine, offset * 2 + 0, pal5bit(paldata >> 0), pal5bit(paldata >> 5), pal5bit(paldata >> 10)); | |
| 74 | 73 | } |
| 75 | 74 | } |
| 76 | 75 |
| r2454 | r2455 | |
|---|---|---|
| 68 | 68 | ****************************************************************************/ |
| 69 | 69 | |
| 70 | 70 | #include "driver.h" |
| 71 | #include "deprecat.h" | |
| 72 | 71 | #include "cpu/m6502/m6502.h" |
| 73 | 72 | #include "redalert.h" |
| 74 | 73 | |
| r2454 | r2455 | |
| 96 | 95 | |
| 97 | 96 | static READ8_HANDLER( redalert_interrupt_clear_r ) |
| 98 | 97 | { |
| 99 | cpunum_set_input_line( | |
| 98 | cpunum_set_input_line(machine, 0, M6502_IRQ_LINE, CLEAR_LINE); | |
| 100 | 99 | |
| 101 | 100 | /* the result never seems to be actually used */ |
| 102 | 101 | return video_screen_get_vpos(machine->primary_screen); |
| r2454 | r2455 | |
|---|---|---|
| 187 | 187 | if(offset<0x300) |
| 188 | 188 | { |
| 189 | 189 | offset&=0xff; |
| 190 | palette_set_color_rgb( | |
| 190 | palette_set_color_rgb(machine, offset, pal6bit(palram[offset]), pal6bit(palram[offset+0x100]), pal6bit(palram[offset+0x200])); | |
| 191 | 191 | } |
| 192 | 192 | } |
| 193 | 193 | } |
| r2454 | r2455 | |
| 219 | 219 | AM_RANGE(0x8000, 0x87ff) AM_RAM |
| 220 | 220 | AM_RANGE(0x8800, 0x97ff) AM_RAM_WRITE(vram1_w) AM_BASE(&vram1) |
| 221 | 221 | AM_RANGE(0x9800, 0xa7ff) AM_RAM_WRITE(vram2_w) AM_BASE(&vram2) |
| 222 | AM_RANGE(0xb800, 0xb803) AM_READWRITE(ppi8255_0_r, ppi8255_0_w) | |
| 223 | AM_RANGE(0xb810, 0xb813) AM_READWRITE(ppi8255_1_r, ppi8255_1_w) | |
| 222 | AM_RANGE(0xb800, 0xb803) AM_DEVREADWRITE(PPI8255, "ppi8255_0", ppi8255_r, ppi8255_w) | |
| 223 | AM_RANGE(0xb810, 0xb813) AM_DEVREADWRITE(PPI8255, "ppi8255_1", ppi8255_r, ppi8255_w) | |
| 224 | 224 | AM_RANGE(0xb830, 0xb830) AM_NOP |
| 225 | 225 | AM_RANGE(0xb840, 0xb840) AM_NOP |
| 226 | 226 | ADDRESS_MAP_END |
| r2454 | r2455 | |
| 228 | 228 | static ADDRESS_MAP_START( cpu1_mem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 229 | 229 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 230 | 230 | AM_RANGE(0xc000, 0xc7ff) AM_RAM |
| 231 | AM_RANGE(0xe000, 0xe003) AM_READWRITE(ppi8255_2 | |
| 231 | AM_RANGE(0xe000, 0xe003) AM_DEVREADWRITE(PPI8255, "ppi8255_2" | |
| 232 | 232 | ADDRESS_MAP_END |
| 233 | 233 | |
| 234 | 234 | static ADDRESS_MAP_START( sound_port, ADDRESS_SPACE_IO, 8 ) |
| r2454 | r2455 | |
| 307 | 307 | { 0, 0, 0, 0, -1 } /* end mark */ |
| 308 | 308 | }; |
| 309 | 309 | |
| 310 | static const ppi8255_interface ppi8255_intf = | |
| 310 | static const ppi8255_interface ppi8255_intf[3] = | |
| 311 | 311 | { |
| 312 | 3, | |
| 313 | { input_port_0_r, input_port_1_r, NULL }, /* Port A read */ | |
| 314 | { NULL, input_port_2_r, NULL }, /* Port B read */ | |
| 315 | { NULL, protection_r, NULL }, /* Port C read */ | |
| 316 | { NULL, NULL, NULL }, /* Port A write */ | |
| 317 | { NULL, NULL, NULL }, /* Port B write */ | |
| 318 | { vidctrl_w, protection_w, NULL }, /* Port C write */ | |
| 312 | { | |
| 313 | input_port_0_r, /* Port A read */ | |
| 314 | NULL, /* Port B read */ | |
| 315 | NULL, /* Port C read */ | |
| 316 | NULL, /* Port A write */ | |
| 317 | NULL, /* Port B write */ | |
| 318 | vidctrl_w /* Port C write */ | |
| 319 | }, | |
| 320 | { | |
| 321 | input_port_1_r, /* Port A read */ | |
| 322 | input_port_2_r, /* Port B read */ | |
| 323 | protection_r, /* Port C read */ | |
| 324 | NULL, /* Port A write */ | |
| 325 | NULL, /* Port B write */ | |
| 326 | protection_w /* Port C write */ | |
| 327 | }, | |
| 328 | { | |
| 329 | NULL, /* Port A read */ | |
| 330 | NULL, /* Port B read */ | |
| 331 | NULL, /* Port C read */ | |
| 332 | NULL, /* Port A write */ | |
| 333 | NULL, /* Port B write */ | |
| 334 | NULL /* Port C write */ | |
| 335 | } | |
| 319 | 336 | }; |
| 320 | 337 | |
| 321 | 338 | static const struct YM2203interface ym2203_interface = |
| 322 | 339 | { |
| 323 | 0, | |
| 324 | 0, | |
| 325 | 0, | |
| 326 | 0 | |
| 340 | { | |
| 341 | AY8910_LEGACY_OUTPUT, | |
| 342 | AY8910_DEFAULT_LOADS, | |
| 343 | NULL, NULL, NULL, NULL | |
| 344 | }, | |
| 345 | NULL | |
| 327 | 346 | }; |
| 328 | 347 | |
| 329 | 348 | static PALETTE_INIT(pipeline) |
| r2454 | r2455 | |
| 349 | 368 | { |
| 350 | 369 | ctc_intf.baseclock = cpunum_get_clock(0); |
| 351 | 370 | z80ctc_init(0, &ctc_intf); |
| 352 | ppi8255_init(&ppi8255_intf); | |
| 353 | 371 | } |
| 354 | 372 | |
| 355 | 373 | static MACHINE_DRIVER_START( pipeline ) |
| r2454 | r2455 | |
| 367 | 385 | MDRV_CPU_ADD(M68705, 7372800/2) |
| 368 | 386 | MDRV_CPU_PROGRAM_MAP(mcu_mem, 0) |
| 369 | 387 | |
| 388 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 389 | MDRV_DEVICE_CONFIG( ppi8255_intf[0] ) | |
| 390 | ||
| 391 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 392 | MDRV_DEVICE_CONFIG( ppi8255_intf[1] ) | |
| 393 | ||
| 394 | MDRV_DEVICE_ADD( "ppi8255_2", PPI8255 ) | |
| 395 | MDRV_DEVICE_CONFIG( ppi8255_intf[2] ) | |
| 396 | ||
| 370 | 397 | /* video hardware */ |
| 371 | 398 | MDRV_SCREEN_ADD("main", RASTER) |
| 372 | 399 | MDRV_SCREEN_REFRESH_RATE(60) |
| r2454 | r2455 | |
|---|---|---|
| 357 | 357 | |
| 358 | 358 | /******************************************************************************/ |
| 359 | 359 | |
| 360 | static READ16_HANDLER( world_cycle_r ) | |
| 361 | { | |
| 362 | int pc=activecpu_get_pc(); | |
| 363 | int ret=prehisle_ram16[0x12]; | |
| 364 | 360 | |
| 365 | if ((ret&0x8000) && (pc==0x260c || pc==0x268a || pc==0x2b0a || pc==0x34a8 || pc==0x6ae4 || pc==0x83ac || pc==0x25ce || pc==0x29c4)) { | |
| 366 | cpu_spinuntil_int(); | |
| 367 | return ret&0x7fff; | |
| 368 | } | |
| 369 | return ret; | |
| 370 | } | |
| 371 | ||
| 372 | static DRIVER_INIT( prehisle ) | |
| 373 | { | |
| 374 | memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x70024, 0x70025, 0, 0, world_cycle_r); | |
| 375 | } | |
| 376 | ||
| 377 | static READ16_HANDLER( usa_cycle_r ) | |
| 378 | { | |
| 379 | int pc=activecpu_get_pc(); | |
| 380 | int ret=prehisle_ram16[0x12]; | |
| 381 | ||
| 382 | if ((ret&0x8000) && (pc==0x281e || pc==0x28a6 || pc==0x295a || pc==0x2868 || pc==0x8f98 || pc==0x3b1e)) { | |
| 383 | cpu_spinuntil_int(); | |
| 384 | return ret&0x7fff; | |
| 385 | } | |
| 386 | return ret; | |
| 387 | } | |
| 388 | ||
| 389 | static DRIVER_INIT( prehislu ) | |
| 390 | { | |
| 391 | memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x70024, 0x70025, 0, 0, usa_cycle_r); | |
| 392 | } | |
| 393 | ||
| 394 | static READ16_HANDLER( jap_cycle_r ) | |
| 395 | { | |
| 396 | int pc=activecpu_get_pc(); | |
| 397 | int ret=prehisle_ram16[0x12]; | |
| 398 | ||
| 399 | if ((ret&0x8000) && (pc==0x34b6 /* Todo! */ )) { | |
| 400 | cpu_spinuntil_int(); | |
| 401 | return ret&0x7fff; | |
| 402 | } | |
| 403 | return ret; | |
| 404 | } | |
| 405 | ||
| 406 | static DRIVER_INIT( gensitou ) | |
| 407 | { | |
| 408 | memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x70024, 0x70025, 0, 0, jap_cycle_r); | |
| 409 | } | |
| 410 | ||
| 411 | /******************************************************************************/ | |
| 412 | ||
| 413 | GAME( 1989, prehisle, 0, prehisle, prehisle, prehisle, ROT0, "SNK", "Prehistoric Isle in 1930 (World)", GAME_SUPPORTS_SAVE ) | |
| 414 | GAME( 1989, prehislu, prehisle, prehisle, prehisle, prehislu, ROT0, "SNK of America", "Prehistoric Isle in 1930 (US)", GAME_SUPPORTS_SAVE ) | |
| 415 | GAME( 1989, gensitou, prehisle, prehisle, prehisle, gensitou, ROT0, "SNK", "Genshi-Tou 1930's", GAME_SUPPORTS_SAVE ) | |
| 361 | GAME( 1989, prehisle, 0, prehisle, prehisle, 0, ROT0, "SNK", "Prehistoric Isle in 1930 (World)", GAME_SUPPORTS_SAVE ) | |
| 362 | GAME( 1989, prehislu, prehisle, prehisle, prehisle, 0, ROT0, "SNK of America", "Prehistoric Isle in 1930 (US)", GAME_SUPPORTS_SAVE ) | |
| 363 | GAME( 1989, gensitou, prehisle, prehisle, prehisle, 0, ROT0, "SNK", "Genshi-Tou 1930's", GAME_SUPPORTS_SAVE ) |
| r2454 | r2455 | |
|---|---|---|
| 85 | 85 | static WRITE8_HANDLER( z80_arm_nmi_w ) |
| 86 | 86 | { |
| 87 | 87 | // sound_nmi_enabled = 1; |
| 88 | cpunum_set_input_line( | |
| 88 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, CLEAR_LINE); | |
| 89 | 89 | timer_set(ATTOTIME_IN_USEC(25), NULL,0,nmi_callback); /* kludge until the K053260 is emulated correctly */ |
| 90 | 90 | } |
| 91 | 91 |
| r2454 | r2455 | |
|---|---|---|
| 141 | 141 | static WRITE16_HANDLER( wwfsstar_irqack_w ) |
| 142 | 142 | { |
| 143 | 143 | if(offset == 0) |
| 144 | cpunum_set_input_line( | |
| 144 | cpunum_set_input_line(machine, 0, 6, CLEAR_LINE); | |
| 145 | 145 | |
| 146 | 146 | else |
| 147 | cpunum_set_input_line( | |
| 147 | cpunum_set_input_line(machine, 0, 5, CLEAR_LINE); | |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | /* |
| r2454 | r2455 | |
|---|---|---|
| 880 | 880 | if (fifo_wptr >= FIFO_SIZE) fifo_wptr = 0; |
| 881 | 881 | |
| 882 | 882 | // signal the 68000 that there's data waiting |
| 883 | cpunum_set_input_line( | |
| 883 | cpunum_set_input_line(machine, 1, 2, HOLD_LINE); | |
| 884 | 884 | // give the 68k time to reply |
| 885 | 885 | cpu_spinuntil_time(ATTOTIME_IN_USEC(40)); |
| 886 | 886 | } |
| r2454 | r2455 | |
|---|---|---|
| 373 | 373 | |
| 374 | 374 | cpu_interrupt_enable(which,data); |
| 375 | 375 | if (!data) |
| 376 | cpunum_set_input_line( | |
| 376 | cpunum_set_input_line(machine, which, 0, CLEAR_LINE); | |
| 377 | 377 | } |
| 378 | 378 | |
| 379 | 379 |
| r2454 | r2455 | |
|---|---|---|
| 328 | 328 | |
| 329 | 329 | static READ16_HANDLER( tracky1_hi_r ) |
| 330 | 330 | { |
| 331 | return input_port_ | |
| 331 | return input_port_ | |
| 332 | 332 | } |
| 333 | 333 | static READ16_HANDLER( tracky1_lo_r ) |
| 334 | 334 | { |
| 335 | return (input_port_ | |
| 335 | return (input_port_ | |
| 336 | 336 | } |
| 337 | 337 | static READ16_HANDLER( trackx1_hi_r ) |
| 338 | 338 | { |
| 339 | return input_port_ | |
| 339 | return input_port_ | |
| 340 | 340 | } |
| 341 | 341 | static READ16_HANDLER( trackx1_lo_r ) |
| 342 | 342 | { |
| 343 | return (input_port_ | |
| 343 | return (input_port_ | |
| 344 | 344 | } |
| 345 | 345 | static READ16_HANDLER( tracky2_hi_r ) |
| 346 | 346 | { |
| 347 | return input_port_ | |
| 347 | return input_port_ | |
| 348 | 348 | } |
| 349 | 349 | static READ16_HANDLER( tracky2_lo_r ) |
| 350 | 350 | { |
| 351 | return (input_port_ | |
| 351 | return (input_port_ | |
| 352 | 352 | } |
| 353 | 353 | static READ16_HANDLER( trackx2_hi_r ) |
| 354 | 354 | { |
| 355 | return input_port_ | |
| 355 | return input_port_ | |
| 356 | 356 | } |
| 357 | 357 | static READ16_HANDLER( trackx2_lo_r ) |
| 358 | 358 | { |
| 359 | return (input_port_ | |
| 359 | return (input_port_ | |
| 360 | 360 | } |
| 361 | 361 | |
| 362 | 362 | |
| r2454 | r2455 | |
| 413 | 413 | int res; |
| 414 | 414 | |
| 415 | 415 | res = (EEPROM_read_bit() & 0x01); |
| 416 | res |= input_port_ | |
| 416 | res |= input_port_ | |
| 417 | 417 | |
| 418 | 418 | return res; |
| 419 | 419 | } |
| r2454 | r2455 | |
| 2587 | 2587 | |
| 2588 | 2588 | static const struct YM2203interface ym2203_interface = |
| 2589 | 2589 | { |
| 2590 | 0, | |
| 2591 | 0, | |
| 2592 | bankswitch_w, | |
| 2593 | 0, | |
| 2590 | { | |
| 2591 | AY8910_LEGACY_OUTPUT, | |
| 2592 | AY8910_DEFAULT_LOADS, | |
| 2593 | NULL, | |
| 2594 | NULL, | |
| 2595 | bankswitch_w, | |
| 2596 | NULL, | |
| 2597 | }, | |
| 2594 | 2598 | irqhandler |
| 2595 | 2599 | }; |
| 2596 | 2600 |
| r2454 | r2455 | |
|---|---|---|
| 141 | 141 | ****************************************************************************/ |
| 142 | 142 | |
| 143 | 143 | #include "driver.h" |
| 144 | #include "deprecat.h" | |
| 145 | 144 | #include "rendlay.h" |
| 146 | 145 | #include "rescap.h" |
| 147 | 146 | #include "mw8080bw.h" |
| r2454 | r2455 | |
|---|---|---|
| 175 | 175 | *******************************************************************/ |
| 176 | 176 | |
| 177 | 177 | #include "driver.h" |
| 178 | #include "deprecat.h" | |
| 179 | 178 | #include "cpu/m6800/m6800.h" |
| 180 | 179 | #include "sound/2151intf.h" |
| 181 | 180 | #include "sound/namco.h" |
| r2454 | r2455 | |
| 266 | 265 | |
| 267 | 266 | static WRITE8_HANDLER( int_ack1_w ) |
| 268 | 267 | { |
| 269 | cpunum_set_input_line( | |
| 268 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 270 | 269 | } |
| 271 | 270 | |
| 272 | 271 | static WRITE8_HANDLER( int_ack2_w ) |
| 273 | 272 | { |
| 274 | cpunum_set_input_line( | |
| 273 | cpunum_set_input_line(machine, 1, 0, CLEAR_LINE); | |
| 275 | 274 | } |
| 276 | 275 | |
| 277 | 276 |
| r2454 | r2455 | |
|---|---|---|
| 1534 | 1534 | |
| 1535 | 1535 | static const struct AY8910interface hardhead_ay8910_interface = |
| 1536 | 1536 | { |
| 1537 | 0, | |
| 1538 | 0, | |
| 1537 | AY8910_LEGACY_OUTPUT, | |
| 1538 | AY8910_DEFAULT_LOADS, | |
| 1539 | NULL, | |
| 1540 | NULL, | |
| 1539 | 1541 | suna8_play_samples_w, |
| 1540 | 1542 | suna8_samples_number_w |
| 1541 | 1543 | }; |
| r2454 | r2455 | |
| 1757 | 1759 | |
| 1758 | 1760 | static const struct AY8910interface starfigh_ay8910_interface = |
| 1759 | 1761 | { |
| 1760 | 0, | |
| 1761 | 0, | |
| 1762 | AY8910_LEGACY_OUTPUT, | |
| 1763 | AY8910_DEFAULT_LOADS, | |
| 1764 | NULL, | |
| 1765 | NULL, | |
| 1762 | 1766 | suna8_play_samples_w, |
| 1763 | 1767 | suna8_samples_number_w |
| 1764 | 1768 | }; |
| r2454 | r2455 | |
|---|---|---|
| 47 | 47 | static READ16_HANDLER( i_port1_r ) |
| 48 | 48 | { |
| 49 | 49 | if (control & 0x0080) |
| 50 | return input_port_ | |
| 50 | return input_port_ | |
| 51 | 51 | else |
| 52 | return input_port_ | |
| 52 | return input_port_ | |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | static READ16_HANDLER( i_port2_r ) |
| 56 | 56 | { |
| 57 | 57 | /* bit 0-1 battery power sensor: 3=good, 2=low, other=bad */ |
| 58 | return (input_port_ | |
| 58 | return (input_port_ | |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | |
| r2454 | r2455 | |
| 214 | 214 | static READ16_DEVICE_HANDLER( ide_std_r ) |
| 215 | 215 | { |
| 216 | 216 | if (offset & 0x01) |
| 217 | return ide_controller16_r(device, IDE_STD_OFFSET + offset/2, 0x | |
| 217 | return ide_controller16_r(device, IDE_STD_OFFSET + offset/2, 0x | |
| 218 | 218 | else |
| 219 | return ide_controller16_r(device, IDE_STD_OFFSET + offset/2, 0x | |
| 219 | return ide_controller16_r(device, IDE_STD_OFFSET + offset/2, 0xffff); | |
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | static WRITE16_DEVICE_HANDLER( ide_std_w ) |
| 223 | 223 | { |
| 224 | 224 | if (offset & 0x01) |
| 225 | ide_controller16_w(device, IDE_STD_OFFSET + offset/2, data << 8, 0x | |
| 225 | ide_controller16_w(device, IDE_STD_OFFSET + offset/2, data << 8, 0x | |
| 226 | 226 | else |
| 227 | ide_controller16_w(device, IDE_STD_OFFSET + offset/2, data, 0x | |
| 227 | ide_controller16_w(device, IDE_STD_OFFSET + offset/2, data, 0xffff); | |
| 228 | 228 | } |
| 229 | 229 | |
| 230 | 230 | static READ16_DEVICE_HANDLER( ide_alt_r ) |
| 231 | 231 | { |
| 232 | 232 | if (offset == 0) |
| 233 | return ide_controller16_r(device, IDE_ALT_OFFSET, 0x | |
| 233 | return ide_controller16_r(device, IDE_ALT_OFFSET, 0x | |
| 234 | 234 | |
| 235 | 235 | return 0; |
| 236 | 236 | } |
| r2454 | r2455 | |
| 238 | 238 | static WRITE16_DEVICE_HANDLER( ide_alt_w ) |
| 239 | 239 | { |
| 240 | 240 | if (offset == 0) |
| 241 | ide_controller16_w(device, IDE_ALT_OFFSET, data, 0x | |
| 241 | ide_controller16_w(device, IDE_ALT_OFFSET, data, 0x | |
| 242 | 242 | } |
| 243 | 243 | |
| 244 | 244 | |
| r2454 | r2455 | |
| 260 | 260 | break; |
| 261 | 261 | } |
| 262 | 262 | } |
| 263 | return ide_controller16_r(device, IDE_STD_OFFSET + offset/2, 0x | |
| 263 | return ide_controller16_r(device, IDE_STD_OFFSET + offset/2, 0x | |
| 264 | 264 | } else { |
| 265 | return ide_controller16_r(device, IDE_STD_OFFSET + offset/2, 0x | |
| 265 | return ide_controller16_r(device, IDE_STD_OFFSET + offset/2, 0xffff); | |
| 266 | 266 | } |
| 267 | 267 | } |
| 268 | 268 |
| r2454 | r2455 | |
|---|---|---|
| 161 | 161 | |
| 162 | 162 | #include "cps1.h" /* External CPS1 definitions */ |
| 163 | 163 | |
| 164 | READ16_HANDLER( cps1_ | |
| 164 | READ16_HANDLER( cps1_dsw | |
| 165 | 165 | { |
| 166 | 166 | static const char *const dswname[] = { "IN0", "DSWA", "DSWB", "DSWC" }; |
| 167 | 167 | int in = input_port_read(machine, dswname[offset]); |
| 168 | return in << 8; | |
| 168 | return (in << 8) | 0xff; | |
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | READ16_HANDLER( cps1_in1_r ) |
| 172 | 172 | { |
| 173 | int buttons = input_port_read(machine, "IN1"); | |
| 174 | return buttons; | |
| 173 | return input_port_read(machine, "IN1"); | |
| 175 | 174 | } |
| 176 | 175 | |
| 177 | 176 | READ16_HANDLER( cps1_in2_r ) |
| r2454 | r2455 | |
| 213 | 212 | static WRITE8_HANDLER( cps1_snd_bankswitch_w ) |
| 214 | 213 | { |
| 215 | 214 | UINT8 *RAM = memory_region(REGION_CPU2); |
| 216 | int length = memory_region_length(REGION_CPU2) - 0x10000; | |
| 217 | 215 | int bankaddr; |
| 218 | 216 | |
| 219 | bankaddr = (data * 0x4000 | |
| 217 | bankaddr = ((data & 1) * 0x4000 | |
| 220 | 218 | memory_set_bankptr(1,&RAM[0x10000 + bankaddr]); |
| 221 | ||
| 222 | if (data & 0xfe) logerror("%04x: write %02x to f004\n",activecpu_get_pc(),data); | |
| 223 | 219 | } |
| 224 | 220 | |
| 225 | 221 | static WRITE8_HANDLER( cps1_oki_pin7_w ) |
| 226 | 222 | { |
| 227 | logerror("%04x: write %02x to f006 (Oki Pin 7)\n",activecpu_get_pc(),data); | |
| 228 | 223 | OKIM6295_set_pin7(0, (data & 1)); |
| 229 | 224 | } |
| 230 | 225 | |
| r2454 | r2455 | |
| 242 | 237 | |
| 243 | 238 | WRITE16_HANDLER( cps1_coinctrl_w ) |
| 244 | 239 | { |
| 245 | // popmessage("coinctrl %04x",data); | |
| 246 | ||
| 247 | 240 | if (ACCESSING_BITS_8_15) |
| 248 | 241 | { |
| 249 | 242 | coin_counter_w(0,data & 0x0100); |
| r2454 | r2455 | |
| 253 | 246 | |
| 254 | 247 | // bit 15 = CPS-A custom reset? |
| 255 | 248 | } |
| 256 | ||
| 257 | // there's no trace of this in the Forgotten Worlds schematics | |
| 258 | if (ACCESSING_BITS_0_7) | |
| 259 | { | |
| 260 | /* mercs sets bit 0 */ | |
| 261 | set_led_status(0,data & 0x02); | |
| 262 | set_led_status(1,data & 0x04); | |
| 263 | set_led_status(2,data & 0x08); | |
| 264 | } | |
| 265 | 249 | } |
| 266 | 250 | |
| 267 | 251 | static WRITE16_HANDLER( cpsq_coinctrl2_w ) |
| r2454 | r2455 | |
| 278 | 262 | INTERRUPT_GEN( cps1_interrupt ) |
| 279 | 263 | { |
| 280 | 264 | /* Strider also has a IRQ4 handler. It is input port related, but the game */ |
| 281 | /* works without it (maybe it's used to multiplex controls). It is the */ | |
| 282 | /* *only* game to have that. */ | |
| 265 | /* works without it. It is the *only* CPS1 game to have that. */ | |
| 283 | 266 | cpunum_set_input_line(machine, 0, 2, HOLD_LINE); |
| 284 | 267 | } |
| 285 | 268 | |
| r2454 | r2455 | |
| 432 | 415 | |
| 433 | 416 | |
| 434 | 417 | |
| 418 | /* | |
| 419 | PAL PRG1 (16P8B @ 12H): | |
| 420 | ||
| 421 | I0 = AS | |
| 422 | I1 = /BGACKB | |
| 423 | I2 = A23 | |
| 424 | I3 = A22 | |
| 425 | I4 = A21 | |
| 426 | I5 = A20 | |
| 427 | I6 = A19 | |
| 428 | I7 = A18 | |
| 429 | I8 = A17 | |
| 430 | I9 = A16 | |
| 431 | ||
| 432 | n.c. = pin19 = ( !I0 & I1 ) | |
| 433 | n.c. = pin18 = ( !I0 & I1 ) | |
| 434 | n.c. = pin17 = ! ( I0 & I1 & (!I2 | !I3 | !I4 | !I5 | !I6 | !I7) ) | |
| 435 | n.c. = pin16 = ! ( I2 & I3 & I4 & I5 & I6 & I7 ) | |
| 436 | /IOCS = pin15 = ! ( I0 & I1 & I2 & !I3 & !I4 & !I5 ) | |
| 437 | /ONE WAIT = pin14 = ! ( I0 & I1 & ((!I2 & !I3) | ( I2 & !I3) | ( I2 & I3)) ) | |
| 438 | /databus = pin13 = ! ( I0 & I1 & (!I2 | !I3 | !I4 | !I5 | !I6 | !I7) ) | |
| 439 | /workram = pin12 = ! ( I0 & I1 & I2 & I3 & I4 & I5 & I6 & I7 ) | |
| 440 | ||
| 441 | ||
| 442 | PAL IOA1 (16P8B @ 12F): | |
| 443 | ||
| 444 | I0 = /IOCS | |
| 445 | I1 = /RDB | |
| 446 | I2 = /UDSWR | |
| 447 | I3 = /LDSWR | |
| 448 | I4 = AB8 | |
| 449 | I5 = AB7 | |
| 450 | I6 = AB6 | |
| 451 | I7 = AB5 | |
| 452 | I8 = AB4 | |
| 453 | I9 = AB3 | |
| 454 | ||
| 455 | player input = pin19 = ! ( !I0 & !I1 & !I4 & !I5 & !I6 & !I7 & !I8 & !I9 ) | |
| 456 | system input/dips = pin18 = ! ( !I0 & !I1 & !I4 & !I5 & !I6 & !I7 & I8 & I9 ) | |
| 457 | outputs = pin17 = ! ( !I0 & !I2 & !I4 & !I5 & !I6 & I7 & I8 & !I9 ) | |
| 458 | sound 1B = pin16 = ! ( !I0 & !I3 & I4 & I5 & !I6 & !I7 & !I8 & I9 ) | |
| 459 | sound 0B = pin15 = ! ( !I0 & !I3 & I4 & I5 & !I6 & !I7 & !I8 & !I9 ) | |
| 460 | n.c. = pin14 = ( !I1 & !I2 ) | |
| 461 | /PPU1 = pin13 = ! ( !I0 & I4 & !I5 & !I6 ) | |
| 462 | n.c. = pin12 = ( !I1 & !I2 ) | |
| 463 | ||
| 464 | ||
| 465 | PAL BUF1 (16P8B @ 16H): | |
| 466 | ||
| 467 | I0 = A23 (all address lines can come both from 68000 and CPS-A custom) | |
| 468 | I1 = A22 | |
| 469 | I2 = A21 | |
| 470 | I3 = A20 | |
| 471 | I4 = A19 | |
| 472 | I5 = A18 | |
| 473 | I6 = A17 | |
| 474 | I7 = A16 | |
| 475 | I8 = ASB | |
| 476 | ||
| 477 | BUF0 = pin19 = ! ( I0 & !I1 & !I2 & I3 & !I4 & !I5 & !I6 & !I7 ) | |
| 478 | BUF1 = pin18 = ! ( I0 & !I1 & !I2 & I3 & !I4 & !I5 & !I6 & I7 ) | |
| 479 | BUF2 = pin17 = ! ( I0 & !I1 & !I2 & I3 & !I4 & !I5 & I6 & !I7 ) | |
| 480 | BUF3 = pin16 = ! ( I0 & !I1 & !I2 & I3 & !I4 & !I5 & I6 & I7 ) | |
| 481 | BUF4 = pin15 = ! ( I0 & !I1 & !I2 & I3 & !I4 & I5 & !I6 & !I7 ) | |
| 482 | BUF5 = pin14 = ! ( I0 & !I1 & !I2 & I3 & !I4 & I5 & !I6 & I7 ) | |
| 483 | BUF6 = pin13 = ! ( I0 & !I1 & !I2 & I3 & !I4 & I5 & I6 & !I7 ) | |
| 484 | /RDB = pin12 = ( I0 & !I1 & !I2 & I3 & !I8 ) | |
| 485 | ||
| 486 | BUF0-BUF2 are gfxram on A-board. BUF3-BUF6 go to B-board (provision for expansion, never used) | |
| 487 | ||
| 488 | ||
| 489 | PAL ROM1 (16P8B @ 15H): | |
| 490 | ||
| 491 | I0 = A23 (all address lines can come both from 68000 and CPS-A custom) | |
| 492 | I1 = A22 | |
| 493 | I2 = A21 | |
| 494 | I3 = A20 | |
| 495 | I4 = A19 | |
| 496 | I5 = A18 | |
| 497 | I6 = A17 | |
| 498 | I7 = A16 | |
| 499 | I8 = ASB | |
| 500 | ||
| 501 | PRG0 = pin17 = ! ( !I8 & !I0 & !I1 & !I2 & !I3 & !I4 & !I5 ) | |
| 502 | PRG1 = pin16 = ! ( !I8 & !I0 & !I1 & !I2 & !I3 & !I4 & I5 ) | |
| 503 | PRG2 = pin15 = ! ( !I8 & !I0 & !I1 & !I2 & !I3 & I4 & !I5 ) | |
| 504 | PRG3 = pin14 = ! ( !I8 & !I0 & !I1 & !I2 & !I3 & I4 & I5 ) | |
| 505 | PRG4 = pin19 = ! ( !I8 & !I0 & !I1 & !I2 & I3 & !I4 ) | |
| 506 | PRG5 = pin18 = ! ( !I8 & !I0 & !I1 & !I2 & I3 & I4 ) | |
| 507 | PRG6 = pin13 = ! ( !I8 & !I0 & !I1 & I2 & !I3 & !I4 ) | |
| 508 | /RDB = pin12 = ( !I8 & !I0 & !I1 ) | |
| 509 | ||
| 510 | All PRGx go to B-board. Provision for up to 4MB of ROM space, which was never used in full. | |
| 511 | ||
| 512 | */ | |
| 513 | ||
| 435 | 514 | static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 16 ) |
| 436 | AM_RANGE(0x000000, 0x1fffff) AM_ROM | |
| 437 | AM_RANGE(0x800000, 0x800001) AM_READ(cps1_in1_r) /* Player input ports */ | |
| 438 | AM_RANGE(0x800010, 0x800011) AM_READ(cps1_in1_r) /* mirror? */ | |
| 439 | AM_RANGE(0x800018, 0x80001f) AM_READ(cps1_input_r) /* System input ports / Dip Switches */ | |
| 440 | AM_RANGE(0x800020, 0x800021) AM_READNOP /* ? Used by Rockman ? */ | |
| 441 | AM_RANGE(0x800030, 0x800031) AM_WRITE(cps1_coinctrl_w) | |
| 442 | AM_RANGE(0x800040, 0x800041) AM_WRITE(forgottn_dial_0_reset_w) | |
| 443 | AM_RANGE(0x800048, 0x800049) AM_WRITE(forgottn_dial_1_reset_w) | |
| 444 | AM_RANGE(0x800052, 0x800055) AM_READ(forgottn_dial_0_r) /* Forgotten Worlds */ | |
| 445 | AM_RANGE(0x80005a, 0x80005d) AM_READ(forgottn_dial_1_r) /* Forgotten Worlds */ | |
| 446 | AM_RANGE(0x800176, 0x800177) AM_READ(cps1_in2_r) /* Extra input ports (on C-board) */ | |
| 447 | AM_RANGE(0x800178, 0x800179) AM_READ(cps1_in3_r) /* Player 4 controls (on C-board) ("Captain Commando") */ | |
| 515 | AM_RANGE(0x000000, 0x3fffff) AM_ROM | |
| 516 | AM_RANGE(0x800000, 0x800007) AM_READ(cps1_in1_r) /* Player input ports */ | |
| 517 | /* forgottn, willow, cawing, nemo, varth read from 800010. Probably debug input leftover from development */ | |
| 518 | AM_RANGE(0x800018, 0x80001f) AM_READ(cps1_dsw_r) /* System input ports / Dip Switches */ | |
| 519 | AM_RANGE(0x800020, 0x800021) AM_READNOP /* ? Used by Rockman ? not mapped according to PAL */ | |
| 520 | AM_RANGE(0x800030, 0x800037) AM_WRITE(cps1_coinctrl_w) | |
| 521 | /* Forgotten Worlds has dial controls on B-board mapped at 800040-80005f. See DRIVER_INIT */ | |
| 522 | AM_RANGE(0x800100, 0x80013f) AM_WRITE(cps1_cps_a_w) AM_BASE(&cps1_cps_a_regs) /* CPS-A custom */ | |
| 523 | AM_RANGE(0x800140, 0x80017f) AM_READWRITE(cps1_cps_b_r, cps1_cps_b_w) AM_BASE(&cps1_cps_b_regs) /* CPS-B custom */ | |
| 448 | 524 | AM_RANGE(0x800180, 0x800187) AM_WRITE(cps1_soundlatch_w) /* Sound command */ |
| 449 | 525 | AM_RANGE(0x800188, 0x80018f) AM_WRITE(cps1_soundlatch2_w) /* Sound timer fade */ |
| 450 | AM_RANGE(0x8001fc, 0x8001fd) AM_READ(cps1_in2_r) /* Extra input ports ("SF Rev E") */ | |
| 451 | AM_RANGE(0x800100, 0x8001ff) AM_READWRITE(cps1_output_r, cps1_output_w) AM_BASE(&cps1_output) AM_SIZE(&cps1_output_size) /* CPS-B custom */ | |
| 526 | AM_RANGE(0x8001c0, 0x8001ff) AM_READWRITE(cps1_cps_b_r, cps1_cps_b_w) /* mirror (SF2 revision "E" US 910228) */ | |
| 452 | 527 | AM_RANGE(0x900000, 0x92ffff) AM_RAM_WRITE(cps1_gfxram_w) AM_BASE(&cps1_gfxram) AM_SIZE(&cps1_gfxram_size) /* SF2CE executes code from here */ |
| 453 | 528 | AM_RANGE(0xff0000, 0xffffff) AM_RAM |
| 454 | 529 | ADDRESS_MAP_END |
| 455 | 530 | |
| 531 | /* | |
| 532 | PAL SOU1 (16P8 @ 13E): | |
| 533 | ||
| 534 | I0 = /MREQ | |
| 535 | I1 = A15 | |
| 536 | I2 = A14 | |
| 537 | I3 = A13 | |
| 538 | I4 = A12 | |
| 539 | I5 = bank latch | |
| 540 | I6 = /RD | |
| 541 | I7 = /WR | |
| 542 | I8 = /BANK | |
| 543 | ||
| 544 | bank latch = pin19 = ! ( !I0 & !I7 & !I8 ) | |
| 545 | /SWR = pin18 = ! ( !I0 & !I7 ) | |
| 546 | /SRD = pin17 = ! ( !I0 & !I6 ) | |
| 547 | ls138 = pin16 = ! ( !I0 & I1 & I2 & I3 & I4 ) | |
| 548 | workram = pin15 = ! ( !I0 & I1 & I2 & !I3 & I4 ) | |
| 549 | SOUNDA14 = pin14 = ! ( !I0 & ((!I1 & !I2) | ( I1 & !I2 & !I5)) ) | |
| 550 | SOUNDA15 = pin13 = ( I1 ) | |
| 551 | /SOUNDCE = pin12 = ! ( !I0 & (!I1 | ( I1 & !I2)) ) | |
| 552 | */ | |
| 553 | ||
| 456 | 554 | static ADDRESS_MAP_START( sub_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 457 | 555 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 458 | 556 | AM_RANGE(0x8000, 0xbfff) AM_ROMBANK(1) |
| r2454 | r2455 | |
| 469 | 567 | |
| 470 | 568 | static ADDRESS_MAP_START( qsound_main_map, ADDRESS_SPACE_PROGRAM, 16 ) |
| 471 | 569 | AM_RANGE(0x000000, 0x1fffff) AM_ROM |
| 472 | AM_RANGE(0x800000, 0x800001) AM_READ(cps1_in1_r) /* Player input ports */ | |
| 473 | AM_RANGE(0x800010, 0x800011) AM_READ(cps1_in1_r) /* mirror? */ | |
| 474 | AM_RANGE(0x800018, 0x80001f) AM_READ(cps1_input_r) /* System input ports / Dip Switches */ | |
| 475 | AM_RANGE(0x800030, 0x800031) AM_WRITE(cps1_coinctrl_w) | |
| 476 | AM_RANGE(0x800100, 0x8001ff) AM_READWRITE(cps1_output_r, cps1_output_w) AM_BASE(&cps1_output) AM_SIZE(&cps1_output_size) /* CPS-B custom */ | |
| 570 | AM_RANGE(0x800000, 0x800007) AM_READ(cps1_in1_r) /* Player input ports */ | |
| 571 | AM_RANGE(0x800018, 0x80001f) AM_READ(cps1_dsw_r) /* System input ports / Dip Switches */ | |
| 572 | AM_RANGE(0x800030, 0x800037) AM_WRITE(cps1_coinctrl_w) | |
| 573 | AM_RANGE(0x800100, 0x80013f) AM_WRITE(cps1_cps_a_w) AM_BASE(&cps1_cps_a_regs) /* CPS-A custom */ | |
| 574 | AM_RANGE(0x800140, 0x80017f) AM_READWRITE(cps1_cps_b_r, cps1_cps_b_w) AM_BASE(&cps1_cps_b_regs) /* CPS-B custom */ | |
| 477 | 575 | AM_RANGE(0x900000, 0x92ffff) AM_RAM_WRITE(cps1_gfxram_w) AM_BASE(&cps1_gfxram) AM_SIZE(&cps1_gfxram_size) /* SF2CE executes code from here */ |
| 478 | 576 | AM_RANGE(0xf00000, 0xf0ffff) AM_READ(qsound_rom_r) /* Slammasters protection */ |
| 479 | 577 | AM_RANGE(0xf18000, 0xf19fff) AM_READWRITE(qsound_sharedram1_r, qsound_sharedram1_w) /* Q RAM */ |
| r2454 | r2455 | |
| 3517 | 3615 | |
| 3518 | 3616 | ***************************************************************************/ |
| 3519 | 3617 | |
| 3520 | #define CODE_SIZE 0x | |
| 3618 | #define CODE_SIZE 0x400000 | |
| 3521 | 3619 | |
| 3522 | 3620 | ROM_START( forgottn ) |
| 3523 | 3621 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) |
| r2454 | r2455 | |
| 3525 | 3623 | ROM_LOAD16_BYTE( "lwu15a", 0x00001, 0x20000, CRC(f7ce2097) SHA1(44c06fabdb6de7d8afc2164458c90b0be9cf945d) ) |
| 3526 | 3624 | ROM_LOAD16_BYTE( "lwu10a", 0x40000, 0x20000, CRC(8cb38c81) SHA1(1d36cab7d17ff778ee7dfcd9606a3a87f6906f21) ) |
| 3527 | 3625 | ROM_LOAD16_BYTE( "lwu14a", 0x40001, 0x20000, CRC(d70ef9fd) SHA1(b393aa2a7bea440fdcf057ffc6ff233fc0d35d4b) ) |
| 3528 | ROM_LOAD16_WORD_SWAP( "lw-07", | |
| 3626 | ROM_LOAD16_WORD_SWAP( "lw-07", | |
| 3529 | 3627 | |
| 3530 | 3628 | ROM_REGION( 0x400000, REGION_GFX1, 0 ) |
| 3531 | 3629 | ROMX_LOAD( "lw-01", 0x000000, 0x80000, CRC(0318f298) SHA1(178ffd6da7bf845e30abf1bfc38a469cd319a73f) , ROM_GROUPWORD | ROM_SKIP(6) ) |
| r2454 | r2455 | |
| 3564 | 3662 | ROM_LOAD16_BYTE( "lw-15c.14g", 0x00001, 0x20000, CRC(402e2a46) SHA1(cbb7017e75a425706505717bf83c2615f53309f9) ) |
| 3565 | 3663 | ROM_LOAD16_BYTE( "lw-10c.13f", 0x40000, 0x20000, CRC(c46479d7) SHA1(84fd9ef33ae7d0af2110e8dc299de25c0f039cee) ) |
| 3566 | 3664 | ROM_LOAD16_BYTE( "lw-14c.13g", 0x40001, 0x20000, CRC(97670f4a) SHA1(f249977c814abdff85007216d7fa57db5684be0f) ) |
| 3567 | ROM_LOAD16_WORD_SWAP( "lw-07", | |
| 3665 | ROM_LOAD16_WORD_SWAP( "lw-07", | |
| 3568 | 3666 | |
| 3569 | 3667 | ROM_REGION( 0x400000, REGION_GFX1, 0 ) |
| 3570 | 3668 | ROMX_LOAD( "lw-01", 0x000000, 0x80000, CRC(0318f298) SHA1(178ffd6da7bf845e30abf1bfc38a469cd319a73f) , ROM_GROUPWORD | ROM_SKIP(6) ) |
| r2454 | r2455 | |
| 3704 | 3802 | |
| 3705 | 3803 | ROM_START( strider ) |
| 3706 | 3804 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 3707 | ROM_LOAD16_BYTE( "strider.30", 0x00000, 0x20000, CRC(da997474) SHA1(3e4ac98f9a6967d61899281b31c7de779723397b) ) | |
| 3708 | ROM_LOAD16_BYTE( "strider.35", 0x00001, 0x20000, CRC(5463aaa3) SHA1(e2d07ec2d818e9a2e2d7a77ff0309ae4011c0083) ) | |
| 3709 | ROM_LOAD16_BYTE( "strider.31", 0x40000, 0x20000, CRC(d20786db) SHA1(c9c75488e6bb37cfd0d56073faf87ff5713bc9a0) ) | |
| 3710 | ROM_LOAD16_BYTE( "strider.36", 0x40001, 0x20000, CRC(21aa2863) SHA1(446dc9280630318deb423531210a4eedfb4adfa6) ) | |
| 3805 | ROM_LOAD16_BYTE( "strider.30", 0x00000, 0x20000, CRC(da997474) SHA1(3e4ac98f9a6967d61899281b31c7de779723397b) ) | |
| 3806 | ROM_LOAD16_BYTE( "strider.35", 0x00001, 0x20000, CRC(5463aaa3) SHA1(e2d07ec2d818e9a2e2d7a77ff0309ae4011c0083) ) | |
| 3807 | ROM_LOAD16_BYTE( "strider.31", 0x40000, 0x20000, CRC(d20786db) SHA1(c9c75488e6bb37cfd0d56073faf87ff5713bc9a0) ) | |
| 3808 | ROM_LOAD16_BYTE( "strider.36", 0x40001, 0x20000, CRC(21aa2863) SHA1(446dc9280630318deb423531210a4eedfb4adfa6) ) | |
| 3711 | 3809 | ROM_LOAD16_WORD_SWAP( "strider.32", 0x80000, 0x80000, CRC(9b3cfc08) SHA1(a7d7f270a097437affa845d80bed82a1fa874878) ) |
| 3712 | 3810 | |
| 3713 | 3811 | ROM_REGION( 0x400000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 3734 | 3832 | |
| 3735 | 3833 | ROM_START( stridrua ) |
| 3736 | 3834 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 3737 | ROM_LOAD16_BYTE( "strid.30", 0x00000, 0x20000, CRC(66aec273) SHA1(576b1e9062874e68d68f8725949c151509eb6d56) ) | |
| 3738 | ROM_LOAD16_BYTE( "strid.35", 0x00001, 0x20000, CRC(50e0e865) SHA1(201ef385c228c124ed9412002233a501ea514efd) ) | |
| 3739 | ROM_LOAD16_BYTE( "strid.31", 0x40000, 0x20000, CRC(eae93bd1) SHA1(b320a00b67ea3c7fffc6c37d57863163975f7b80) ) | |
| 3740 | ROM_LOAD16_BYTE( "strid.36", 0x40001, 0x20000, CRC(b904a31d) SHA1(5509d1024151eb8548fd1b29e6c0c95775c61364) ) | |
| 3835 | ROM_LOAD16_BYTE( "strid.30", 0x00000, 0x20000, CRC(66aec273) SHA1(576b1e9062874e68d68f8725949c151509eb6d56) ) | |
| 3836 | ROM_LOAD16_BYTE( "strid.35", 0x00001, 0x20000, CRC(50e0e865) SHA1(201ef385c228c124ed9412002233a501ea514efd) ) | |
| 3837 | ROM_LOAD16_BYTE( "strid.31", 0x40000, 0x20000, CRC(eae93bd1) SHA1(b320a00b67ea3c7fffc6c37d57863163975f7b80) ) | |
| 3838 | ROM_LOAD16_BYTE( "strid.36", 0x40001, 0x20000, CRC(b904a31d) SHA1(5509d1024151eb8548fd1b29e6c0c95775c61364) ) | |
| 3741 | 3839 | ROM_LOAD16_WORD_SWAP( "strider.32", 0x80000, 0x80000, CRC(9b3cfc08) SHA1(a7d7f270a097437affa845d80bed82a1fa874878) ) |
| 3742 | 3840 | |
| 3743 | 3841 | ROM_REGION( 0x400000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 3841 | 3939 | ROM_COPY( REGION_GFX1, 0x000000, 0x000000, 0x8000 ) /* stars */ |
| 3842 | 3940 | |
| 3843 | 3941 | ROM_REGION( 0x18000, REGION_CPU2, 0 ) /* 64k for the audio CPU (+banks) */ |
| 3844 | ROM_LOAD( "tke17.12b", | |
| 3942 | ROM_LOAD( "tke17.12b", | |
| 3845 | 3943 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 3846 | 3944 | |
| 3847 | 3945 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 3946 | ROM_LOAD( "tke18.11c", 0x00000, 0x20000, CRC(ac6e307d) SHA1(b490ce625bb7ce0904b0fd121fbfbd5252790f7a) ) | |
| 3848 | 3947 | ROM_LOAD( "tke19.12c", 0x20000, 0x20000, CRC(068741db) SHA1(ab48aff639a7ac218b7d5304145e10e92d61fd9f) ) |
| 3849 | ROM_LOAD( "tke18.11c", 0x00000, 0x20000, CRC(ac6e307d) SHA1(b490ce625bb7ce0904b0fd121fbfbd5252790f7a) ) | |
| 3850 | 3948 | ROM_END |
| 3851 | 3949 | |
| 3852 | 3950 | /* the content of the smaller roms in this set is 99% identical, just japanese program roms |
| r2454 | r2455 | |
| 3910 | 4008 | |
| 3911 | 4009 | ROM_START( willow ) |
| 3912 | 4010 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 3913 | ROM_LOAD16_BYTE( "wlu_30.rom", 0x00000, 0x20000, CRC(d604dbb1) SHA1(b5d78871011ff11a67f1a0cad147cd4de8d67f35) ) | |
| 3914 | ROM_LOAD16_BYTE( "willow-u.35", 0x00001, 0x20000, CRC(7a791e77) SHA1(fe1429588b7eceab1d369abe03f2cad8de727f71) ) | |
| 3915 | ROM_LOAD16_BYTE( "wlu_31.rom", 0x40000, 0x20000, CRC(0eb48a83) SHA1(28c40c4b5d767f88922cd899e948abf11a85a864) ) | |
| 3916 | ROM_LOAD16_BYTE( "wlu_36.rom", 0x40001, 0x20000, CRC(36100209) SHA1(63c9338e71dba8b52daffba50b4bca31aaa10d9e) ) | |
| 4011 | ROM_LOAD16_BYTE( "wlu_30.rom", 0x00000, 0x20000, CRC(d604dbb1) SHA1(b5d78871011ff11a67f1a0cad147cd4de8d67f35) ) | |
| 4012 | ROM_LOAD16_BYTE( "willow-u.35", 0x00001, 0x20000, CRC(7a791e77) SHA1(fe1429588b7eceab1d369abe03f2cad8de727f71) ) | |
| 4013 | ROM_LOAD16_BYTE( "wlu_31.rom", 0x40000, 0x20000, CRC(0eb48a83) SHA1(28c40c4b5d767f88922cd899e948abf11a85a864) ) | |
| 4014 | ROM_LOAD16_BYTE( "wlu_36.rom", 0x40001, 0x20000, CRC(36100209) SHA1(63c9338e71dba8b52daffba50b4bca31aaa10d9e) ) | |
| 3917 | 4015 | ROM_LOAD16_WORD_SWAP( "wl_32.rom", 0x80000, 0x80000, CRC(dfd9f643) SHA1(9c760c30af593a87e7fd39fb213a4c73c68ca440) ) |
| 3918 | 4016 | |
| 3919 | 4017 | ROM_REGION( 0x400000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 3944 | 4042 | |
| 3945 | 4043 | ROM_START( willowj ) |
| 3946 | 4044 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 3947 | ROM_LOAD16_BYTE( "wl36.bin", 0x00000, 0x20000, CRC(2b0d7cbc) SHA1(58172b4fdf856efa8d77abbde76738de2424f712) ) | |
| 3948 | ROM_LOAD16_BYTE( "wl42.bin", 0x00001, 0x20000, CRC(1ac39615) SHA1(c9fa6d20418b9bdc5a08df1fb86368b40709280a) ) | |
| 3949 | ROM_LOAD16_BYTE( "wl37.bin", 0x40000, 0x20000, CRC(30a717fa) SHA1(cb815e9ee2691761925898e3932b502f8f399cb4) ) | |
| 3950 | ROM_LOAD16_BYTE( "wl43.bin", 0x40001, 0x20000, CRC(d0dddc9e) SHA1(1176b9a43b3355a5ba44e59abde01ee7eaa89c25) ) | |
| 4045 | ROM_LOAD16_BYTE( "wl36.bin", 0x00000, 0x20000, CRC(2b0d7cbc) SHA1(58172b4fdf856efa8d77abbde76738de2424f712) ) | |
| 4046 | ROM_LOAD16_BYTE( "wl42.bin", 0x00001, 0x20000, CRC(1ac39615) SHA1(c9fa6d20418b9bdc5a08df1fb86368b40709280a) ) | |
| 4047 | ROM_LOAD16_BYTE( "wl37.bin", 0x40000, 0x20000, CRC(30a717fa) SHA1(cb815e9ee2691761925898e3932b502f8f399cb4) ) | |
| 4048 | ROM_LOAD16_BYTE( "wl43.bin", 0x40001, 0x20000, CRC(d0dddc9e) SHA1(1176b9a43b3355a5ba44e59abde01ee7eaa89c25) ) | |
| 3951 | 4049 | ROM_LOAD16_WORD_SWAP( "wl_32.rom", 0x80000, 0x80000, CRC(dfd9f643) SHA1(9c760c30af593a87e7fd39fb213a4c73c68ca440) ) |
| 3952 | 4050 | |
| 3953 | 4051 | ROM_REGION( 0x400000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 3978 | 4076 | |
| 3979 | 4077 | ROM_START( willowje ) |
| 3980 | 4078 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 3981 | ROM_LOAD16_BYTE( "wlu_30.rom", 0x00000, 0x20000, CRC(d604dbb1) SHA1(b5d78871011ff11a67f1a0cad147cd4de8d67f35) ) | |
| 3982 | ROM_LOAD16_BYTE( "wlu_35.rom", 0x00001, 0x20000, CRC(daee72fe) SHA1(2ec62f44394fac2887821881f56b6f24d05234b3) ) | |
| 3983 | ROM_LOAD16_BYTE( "wlu_31.rom", 0x40000, 0x20000, CRC(0eb48a83) SHA1(28c40c4b5d767f88922cd899e948abf11a85a864) ) | |
| 3984 | ROM_LOAD16_BYTE( "wlu_36.rom", 0x40001, 0x20000, CRC(36100209) SHA1(63c9338e71dba8b52daffba50b4bca31aaa10d9e) ) | |
| 4079 | ROM_LOAD16_BYTE( "wlu_30.rom", 0x00000, 0x20000, CRC(d604dbb1) SHA1(b5d78871011ff11a67f1a0cad147cd4de8d67f35) ) | |
| 4080 | ROM_LOAD16_BYTE( "wlu_35.rom", 0x00001, 0x20000, CRC(daee72fe) SHA1(2ec62f44394fac2887821881f56b6f24d05234b3) ) | |
| 4081 | ROM_LOAD16_BYTE( "wlu_31.rom", 0x40000, 0x20000, CRC(0eb48a83) SHA1(28c40c4b5d767f88922cd899e948abf11a85a864) ) | |
| 4082 | ROM_LOAD16_BYTE( "wlu_36.rom", 0x40001, 0x20000, CRC(36100209) SHA1(63c9338e71dba8b52daffba50b4bca31aaa10d9e) ) | |
| 3985 | 4083 | ROM_LOAD16_WORD_SWAP( "wl_32.rom", 0x80000, 0x80000, CRC(dfd9f643) SHA1(9c760c30af593a87e7fd39fb213a4c73c68ca440) ) |
| 3986 | 4084 | |
| 3987 | 4085 | ROM_REGION( 0x400000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 4012 | 4110 | |
| 4013 | 4111 | ROM_START( unsquad ) |
| 4014 | 4112 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 4015 | ROM_LOAD16_BYTE( "unsquad.30", 0x00000, 0x20000, CRC(24d8f88d) SHA1(9c39aa1140e92307d6d9c0ca198003282bf78c78) ) | |
| 4016 | ROM_LOAD16_BYTE( "unsquad.35", 0x00001, 0x20000, CRC(8b954b59) SHA1(33114f1417d48f60c6da3e14a094be7c0f0fd979) ) | |
| 4017 | ROM_LOAD16_BYTE( "unsquad.31", 0x40000, 0x20000, CRC(33e9694b) SHA1(90db3052ac2ff859ede8473dd13e0f5be148590c) ) | |
| 4018 | ROM_LOAD16_BYTE( "unsquad.36", 0x40001, 0x20000, CRC(7cc8fb9e) SHA1(f70118d1a368fd4795d9953c55d283305d1f9630) ) | |
| 4113 | ROM_LOAD16_BYTE( "unsquad.30", 0x00000, 0x20000, CRC(24d8f88d) SHA1(9c39aa1140e92307d6d9c0ca198003282bf78c78) ) | |
| 4114 | ROM_LOAD16_BYTE( "unsquad.35", 0x00001, 0x20000, CRC(8b954b59) SHA1(33114f1417d48f60c6da3e14a094be7c0f0fd979) ) | |
| 4115 | ROM_LOAD16_BYTE( "unsquad.31", 0x40000, 0x20000, CRC(33e9694b) SHA1(90db3052ac2ff859ede8473dd13e0f5be148590c) ) | |
| 4116 | ROM_LOAD16_BYTE( "unsquad.36", 0x40001, 0x20000, CRC(7cc8fb9e) SHA1(f70118d1a368fd4795d9953c55d283305d1f9630) ) | |
| 4019 | 4117 | ROM_LOAD16_WORD_SWAP( "unsquad.32", 0x80000, 0x80000, CRC(ae1d7fb0) SHA1(bb51e77574db5e2d807c4ca8e85a5d9661f5d3b3) ) |
| 4020 | 4118 | |
| 4021 | 4119 | ROM_REGION( 0x200000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 4031 | 4129 | ROM_LOAD( "unsquad.09", 0x00000, 0x08000, CRC(f3dd1367) SHA1(09eef72e862ac6b1a5cce5a45938b45bf4e456ad) ) |
| 4032 | 4130 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 4033 | 4131 | |
| 4034 | ROM_REGION( 0x | |
| 4132 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ | |
| 4035 | 4133 | ROM_LOAD( "unsquad.18", 0x00000, 0x20000, CRC(584b43a9) SHA1(7820815c8c67d484baf2fdad7e55d8c14b98b860) ) |
| 4134 | /* 20000-3ffff empty */ | |
| 4036 | 4135 | ROM_END |
| 4037 | 4136 | |
| 4038 | 4137 | ROM_START( area88 ) |
| 4039 | 4138 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 4040 | ROM_LOAD16_BYTE( "ar36.bin", 0x00000, 0x20000, CRC(65030392) SHA1(d9dea5cfde28345716b0e519ee033c475be0454b) ) | |
| 4041 | ROM_LOAD16_BYTE( "ar42.bin", 0x00001, 0x20000, CRC(c48170de) SHA1(e968522dbdd217dd8e4cd6aaeaef801c63488c1d) ) | |
| 4042 | ROM_LOAD16_BYTE( "unsquad.31", 0x40000, 0x20000, CRC(33e9694b) SHA1(90db3052ac2ff859ede8473dd13e0f5be148590c) ) | |
| 4043 | ROM_LOAD16_BYTE( "unsquad.36", 0x40001, 0x20000, CRC(7cc8fb9e) SHA1(f70118d1a368fd4795d9953c55d283305d1f9630) ) | |
| 4139 | ROM_LOAD16_BYTE( "ar36.bin", 0x00000, 0x20000, CRC(65030392) SHA1(d9dea5cfde28345716b0e519ee033c475be0454b) ) | |
| 4140 | ROM_LOAD16_BYTE( "ar42.bin", 0x00001, 0x20000, CRC(c48170de) SHA1(e968522dbdd217dd8e4cd6aaeaef801c63488c1d) ) | |
| 4141 | ROM_LOAD16_BYTE( "unsquad.31", 0x40000, 0x20000, CRC(33e9694b) SHA1(90db3052ac2ff859ede8473dd13e0f5be148590c) ) | |
| 4142 | ROM_LOAD16_BYTE( "unsquad.36", 0x40001, 0x20000, CRC(7cc8fb9e) SHA1(f70118d1a368fd4795d9953c55d283305d1f9630) ) | |
| 4044 | 4143 | ROM_LOAD16_WORD_SWAP( "unsquad.32", 0x80000, 0x80000, CRC(ae1d7fb0) SHA1(bb51e77574db5e2d807c4ca8e85a5d9661f5d3b3) ) |
| 4045 | 4144 | |
| 4046 | 4145 | ROM_REGION( 0x200000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 4056 | 4155 | ROM_LOAD( "unsquad.09", 0x00000, 0x08000, CRC(f3dd1367) SHA1(09eef72e862ac6b1a5cce5a45938b45bf4e456ad) ) |
| 4057 | 4156 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 4058 | 4157 | |
| 4059 | ROM_REGION( 0x | |
| 4158 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ | |
| 4060 | 4159 | ROM_LOAD( "unsquad.18", 0x00000, 0x20000, CRC(584b43a9) SHA1(7820815c8c67d484baf2fdad7e55d8c14b98b860) ) |
| 4160 | /* 20000-3ffff empty */ | |
| 4061 | 4161 | ROM_END |
| 4062 | 4162 | |
| 4063 | 4163 | ROM_START( ffight ) |
| 4064 | 4164 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 4065 | ROM_LOAD16_BYTE( "ff30-36.bin", 0x00000, 0x20000, CRC(f9a5ce83) SHA1(0756ae576a1f6d5b8b22f8630dca40ef38567ea6) ) | |
| 4066 | ROM_LOAD16_BYTE( "ff35-42.bin", 0x00001, 0x20000, CRC(65f11215) SHA1(5045a467f3e228c02b4a355b52f58263ffa90113) ) | |
| 4067 | ROM_LOAD16_BYTE( "ff31-37.bin", 0x40000, 0x20000, CRC(e1033784) SHA1(38f44434c8befd623953ae23d6e5ff4e201d6627) ) | |
| 4068 | ROM_LOAD16_BYTE( "ff36-43.bin", 0x40001, 0x20000, CRC(995e968a) SHA1(de16873d1639ac1738be0937270b108a9914f263) ) | |
| 4165 | ROM_LOAD16_BYTE( "ff30-36.bin", 0x00000, 0x20000, CRC(f9a5ce83) SHA1(0756ae576a1f6d5b8b22f8630dca40ef38567ea6) ) | |
| 4166 | ROM_LOAD16_BYTE( "ff35-42.bin", 0x00001, 0x20000, CRC(65f11215) SHA1(5045a467f3e228c02b4a355b52f58263ffa90113) ) | |
| 4167 | ROM_LOAD16_BYTE( "ff31-37.bin", 0x40000, 0x20000, CRC(e1033784) SHA1(38f44434c8befd623953ae23d6e5ff4e201d6627) ) | |
| 4168 | ROM_LOAD16_BYTE( "ff36-43.bin", 0x40001, 0x20000, CRC(995e968a) SHA1(de16873d1639ac1738be0937270b108a9914f263) ) | |
| 4069 | 4169 | ROM_LOAD16_WORD_SWAP( "ff32-32m.bin", 0x80000, 0x80000, CRC(c747696e) SHA1(d3362dadded31ccb7eaf71ef282d698d18edd722) ) |
| 4070 | 4170 | |
| 4071 | 4171 | ROM_REGION( 0x200000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 4088 | 4188 | |
| 4089 | 4189 | ROM_START( ffightu ) |
| 4090 | 4190 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 4091 | ROM_LOAD16_BYTE( "ff30-36.bin", 0x00000, 0x20000, CRC(f9a5ce83) SHA1(0756ae576a1f6d5b8b22f8630dca40ef38567ea6) ) | |
| 4092 | ROM_LOAD16_BYTE( "ff35-42.bin", 0x00001, 0x20000, CRC(65f11215) SHA1(5045a467f3e228c02b4a355b52f58263ffa90113) ) | |
| 4093 | ROM_LOAD16_BYTE( "ff31-37.bin", 0x40000, 0x20000, CRC(e1033784) SHA1(38f44434c8befd623953ae23d6e5ff4e201d6627) ) | |
| 4094 | ROM_LOAD16_BYTE( "ff43.rom", 0x40001, 0x20000, CRC(4ca65947) SHA1(74ffe00df96273770a24d9a46f13e53ea8812670) ) | |
| 4191 | ROM_LOAD16_BYTE( "ff30-36.bin", 0x00000, 0x20000, CRC(f9a5ce83) SHA1(0756ae576a1f6d5b8b22f8630dca40ef38567ea6) ) | |
| 4192 | ROM_LOAD16_BYTE( "ff35-42.bin", 0x00001, 0x20000, CRC(65f11215) SHA1(5045a467f3e228c02b4a355b52f58263ffa90113) ) | |
| 4193 | ROM_LOAD16_BYTE( "ff31-37.bin", 0x40000, 0x20000, CRC(e1033784) SHA1(38f44434c8befd623953ae23d6e5ff4e201d6627) ) | |
| 4194 | ROM_LOAD16_BYTE( "ff43.rom", 0x40001, 0x20000, CRC(4ca65947) SHA1(74ffe00df96273770a24d9a46f13e53ea8812670) ) | |
| 4095 | 4195 | ROM_LOAD16_WORD_SWAP( "ff32-32m.bin", 0x80000, 0x80000, CRC(c747696e) SHA1(d3362dadded31ccb7eaf71ef282d698d18edd722) ) |
| 4096 | 4196 | |
| 4097 | 4197 | ROM_REGION( 0x200000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 4114 | 4214 | |
| 4115 | 4215 | ROM_START( ffightua ) |
| 4116 | 4216 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 4117 | ROM_LOAD16_BYTE( "36", 0x00000, 0x20000, CRC(e2a48af9) SHA1(11e06f95bdf575af396dded2b84d858f6c7388f1) ) | |
| 4118 | ROM_LOAD16_BYTE( "42", 0x00001, 0x20000, CRC(f4bb480e) SHA1(32114df1d2f4f98a4a2280a330c7b6af8ab4d862) ) | |
| 4119 | ROM_LOAD16_BYTE( "37", 0x40000, 0x20000, CRC(c371c667) SHA1(633977c91a8ff09b7fe83128eced7c4dee9aee1d) ) | |
| 4120 | ROM_LOAD16_BYTE( "43", 0x40001, 0x20000, CRC(2f5771f9) SHA1(fb532402bc00b5619a23dfa7e4525f1717020303) ) | |
| 4217 | ROM_LOAD16_BYTE( "36", 0x00000, 0x20000, CRC(e2a48af9) SHA1(11e06f95bdf575af396dded2b84d858f6c7388f1) ) | |
| 4218 | ROM_LOAD16_BYTE( "42", 0x00001, 0x20000, CRC(f4bb480e) SHA1(32114df1d2f4f98a4a2280a330c7b6af8ab4d862) ) | |
| 4219 | ROM_LOAD16_BYTE( "37", 0x40000, 0x20000, CRC(c371c667) SHA1(633977c91a8ff09b7fe83128eced7c4dee9aee1d) ) | |
| 4220 | ROM_LOAD16_BYTE( "43", 0x40001, 0x20000, CRC(2f5771f9) SHA1(fb532402bc00b5619a23dfa7e4525f1717020303) ) | |
| 4121 | 4221 | ROM_LOAD16_WORD_SWAP( "ff32-32m.bin", 0x80000, 0x80000, CRC(c747696e) SHA1(d3362dadded31ccb7eaf71ef282d698d18edd722) ) |
| 4122 | 4222 | |
| 4123 | 4223 | /* Note: the gfx ROMs were missing from this set. I used the ones from */ |
| r2454 | r2455 | |
| 4143 | 4243 | |
| 4144 | 4244 | ROM_START( ffightub ) |
| 4145 | 4245 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 4146 | ROM_LOAD16_BYTE( "30_2da0.010", 0x00000, 0x20000, CRC(ed988977) SHA1(c718e989206bd2b68832c8fcb5667397d500ebac) ) | |
| 4147 | ROM_LOAD16_BYTE( "35_46ff.010", 0x00001, 0x20000, CRC(07bf1c21) SHA1(f21a939fd92607c7f54816dedbcb3c5818cf4183) ) | |
| 4148 | ROM_LOAD16_BYTE( "31_c933.010", 0x40000, 0x20000, CRC(dba5a476) SHA1(2f0176dd050f9630b914f1c1ca5d96215bcf567f) ) | |
| 4149 | ROM_LOAD16_BYTE( "36_0ace.010", 0x40001, 0x20000, CRC(4d89f542) SHA1(0b7d483a2c5759715f99f287cbd8a36165b59de7) ) | |
| 4246 | ROM_LOAD16_BYTE( "30_2da0.010", 0x00000, 0x20000, CRC(ed988977) SHA1(c718e989206bd2b68832c8fcb5667397d500ebac) ) | |
| 4247 | ROM_LOAD16_BYTE( "35_46ff.010", 0x00001, 0x20000, CRC(07bf1c21) SHA1(f21a939fd92607c7f54816dedbcb3c5818cf4183) ) | |
| 4248 | ROM_LOAD16_BYTE( "31_c933.010", 0x40000, 0x20000, CRC(dba5a476) SHA1(2f0176dd050f9630b914f1c1ca5d96215bcf567f) ) | |
| 4249 | ROM_LOAD16_BYTE( "36_0ace.010", 0x40001, 0x20000, CRC(4d89f542) SHA1(0b7d483a2c5759715f99f287cbd8a36165b59de7) ) | |
| 4150 | 4250 | ROM_LOAD16_WORD_SWAP( "ff32-32m.bin", 0x80000, 0x80000, CRC(c747696e) SHA1(d3362dadded31ccb7eaf71ef282d698d18edd722) ) |
| 4151 | 4251 | |
| 4152 | 4252 | ROM_REGION( 0x200000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 4183 | 4283 | |
| 4184 | 4284 | ROM_START( ffightj ) |
| 4185 | 4285 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 4186 | ROM_LOAD16_BYTE( "ff30-36.bin", 0x00000, 0x20000, CRC(f9a5ce83) SHA1(0756ae576a1f6d5b8b22f8630dca40ef38567ea6) ) | |
| 4187 | ROM_LOAD16_BYTE( "ff35-42.bin", 0x00001, 0x20000, CRC(65f11215) SHA1(5045a467f3e228c02b4a355b52f58263ffa90113) ) | |
| 4188 | ROM_LOAD16_BYTE( "ff31-37.bin", 0x40000, 0x20000, CRC(e1033784) SHA1(38f44434c8befd623953ae23d6e5ff4e201d6627) ) | |
| 4189 | ROM_LOAD16_BYTE( "ff43.bin", 0x40001, 0x20000, CRC(b6dee1c3) SHA1(3a85312a2e9d8e06259b73d91ccb5e66a6bad62d) ) | |
| 4286 | ROM_LOAD16_BYTE( "ff30-36.bin", 0x00000, 0x20000, CRC(f9a5ce83) SHA1(0756ae576a1f6d5b8b22f8630dca40ef38567ea6) ) | |
| 4287 | ROM_LOAD16_BYTE( "ff35-42.bin", 0x00001, 0x20000, CRC(65f11215) SHA1(5045a467f3e228c02b4a355b52f58263ffa90113) ) | |
| 4288 | ROM_LOAD16_BYTE( "ff31-37.bin", 0x40000, 0x20000, CRC(e1033784) SHA1(38f44434c8befd623953ae23d6e5ff4e201d6627) ) | |
| 4289 | ROM_LOAD16_BYTE( "ff43.bin", 0x40001, 0x20000, CRC(b6dee1c3) SHA1(3a85312a2e9d8e06259b73d91ccb5e66a6bad62d) ) | |
| 4190 | 4290 | ROM_LOAD16_WORD_SWAP( "ff32-32m.bin", 0x80000, 0x80000, CRC(c747696e) SHA1(d3362dadded31ccb7eaf71ef282d698d18edd722) ) |
| 4191 | 4291 | |
| 4192 | 4292 | ROM_REGION( 0x200000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 4221 | 4321 | |
| 4222 | 4322 | ROM_START( ffightj1 ) |
| 4223 | 4323 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 4224 | ROM_LOAD16_BYTE( "ff30-36.rom", 0x00000, 0x20000, CRC(088ed1c9) SHA1(7b96cd45f4d3d2c0fe94904882652814b7790869) ) | |
| 4225 | ROM_LOAD16_BYTE( "ff35-42.rom", 0x00001, 0x20000, CRC(c4c491e6) SHA1(d0e34d7b94f67c33615710ea721da8fefe832e3a) ) | |
| 4226 | ROM_LOAD16_BYTE( "ff31-37.rom", 0x40000, 0x20000, CRC(708557ff) SHA1(89e56bfd9486623a18fdbf984a72bb52054ca0e6) ) | |
| 4227 | ROM_LOAD16_BYTE( "ff36-43.rom", 0x40001, 0x20000, CRC(c004004a) SHA1(10ccf27972591f65645a8dd2bb65989176ac07d5) ) | |
| 4324 | ROM_LOAD16_BYTE( "ff30-36.rom", 0x00000, 0x20000, CRC(088ed1c9) SHA1(7b96cd45f4d3d2c0fe94904882652814b7790869) ) | |
| 4325 | ROM_LOAD16_BYTE( "ff35-42.rom", 0x00001, 0x20000, CRC(c4c491e6) SHA1(d0e34d7b94f67c33615710ea721da8fefe832e3a) ) | |
| 4326 | ROM_LOAD16_BYTE( "ff31-37.rom", 0x40000, 0x20000, CRC(708557ff) SHA1(89e56bfd9486623a18fdbf984a72bb52054ca0e6) ) | |
| 4327 | ROM_LOAD16_BYTE( "ff36-43.rom", 0x40001, 0x20000, CRC(c004004a) SHA1(10ccf27972591f65645a8dd2bb65989176ac07d5) ) | |
| 4228 | 4328 | ROM_LOAD16_WORD_SWAP( "ff32-32m.bin", 0x80000, 0x80000, CRC(c747696e) SHA1(d3362dadded31ccb7eaf71ef282d698d18edd722) ) |
| 4229 | 4329 | |
| 4230 | 4330 | ROM_REGION( 0x200000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 4259 | 4359 | |
| 4260 | 4360 | ROM_START( 1941 ) |
| 4261 | 4361 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 4262 | ROM_LOAD16_BYTE( "41e_30.rom", 0x00000, 0x20000, CRC(9deb1e75) SHA1(68d9f91bef6a5c9e1bcbf286629aed6b37b4acb9) ) | |
| 4263 | ROM_LOAD16_BYTE( "41e_35.rom", 0x00001, 0x20000, CRC(d63942b3) SHA1(b4bc7d06dcefbc075d316f2d31abbd4c7a99dbae) ) | |
| 4264 | ROM_LOAD16_BYTE( "41e_31.rom", 0x40000, 0x20000, CRC(df201112) SHA1(d84f63bffeb9255cbabc02f23d7511f9b3c6a96c) ) | |
| 4265 | ROM_LOAD16_BYTE( "41e_36.rom", 0x40001, 0x20000, CRC(816a818f) SHA1(3e491a30352b71ddd775142f3a80cdde480b669f) ) | |
| 4362 | ROM_LOAD16_BYTE( "41e_30.rom", 0x00000, 0x20000, CRC(9deb1e75) SHA1(68d9f91bef6a5c9e1bcbf286629aed6b37b4acb9) ) | |
| 4363 | ROM_LOAD16_BYTE( "41e_35.rom", 0x00001, 0x20000, CRC(d63942b3) SHA1(b4bc7d06dcefbc075d316f2d31abbd4c7a99dbae) ) | |
| 4364 | ROM_LOAD16_BYTE( "41e_31.rom", 0x40000, 0x20000, CRC(df201112) SHA1(d84f63bffeb9255cbabc02f23d7511f9b3c6a96c) ) | |
| 4365 | ROM_LOAD16_BYTE( "41e_36.rom", 0x40001, 0x20000, CRC(816a818f) SHA1(3e491a30352b71ddd775142f3a80cdde480b669f) ) | |
| 4266 | 4366 | ROM_LOAD16_WORD_SWAP( "41_32.rom", 0x80000, 0x80000, CRC(4e9648ca) SHA1(d8e67e6e3a6dc79053e4f56cfd83431385ea7611) ) |
| 4267 | 4367 | |
| 4268 | 4368 | ROM_REGION( 0x200000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 4285 | 4385 | |
| 4286 | 4386 | ROM_START( 1941j ) |
| 4287 | 4387 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 4288 | ROM_LOAD16_BYTE( "4136.bin", 0x00000, 0x20000, CRC(7fbd42ab) SHA1(4e52a599e3099bf3cccabb89152c69f216fde79e) ) | |
| 4289 | ROM_LOAD16_BYTE( "4142.bin", 0x00001, 0x20000, CRC(c7781f89) SHA1(7e99c433de0c903791ae153a3cc8632042b0a90d) ) | |
| 4290 | ROM_LOAD16_BYTE( "4137.bin", 0x40000, 0x20000, CRC(c6464b0b) SHA1(abef422d891d32334a858d49599f1ef7cf0db45d) ) | |
| 4291 | ROM_LOAD16_BYTE( "4143.bin", 0x40001, 0x20000, CRC(440fc0b5) SHA1(e725535533c25a2c80a45a2200bbfd0dcda5ed97) ) | |
| 4388 | ROM_LOAD16_BYTE( "4136.bin", 0x00000, 0x20000, CRC(7fbd42ab) SHA1(4e52a599e3099bf3cccabb89152c69f216fde79e) ) | |
| 4389 | ROM_LOAD16_BYTE( "4142.bin", 0x00001, 0x20000, CRC(c7781f89) SHA1(7e99c433de0c903791ae153a3cc8632042b0a90d) ) | |
| 4390 | ROM_LOAD16_BYTE( "4137.bin", 0x40000, 0x20000, CRC(c6464b0b) SHA1(abef422d891d32334a858d49599f1ef7cf0db45d) ) | |
| 4391 | ROM_LOAD16_BYTE( "4143.bin", 0x40001, 0x20000, CRC(440fc0b5) SHA1(e725535533c25a2c80a45a2200bbfd0dcda5ed97) ) | |
| 4292 | 4392 | ROM_LOAD16_WORD_SWAP( "41_32.rom", 0x80000, 0x80000, CRC(4e9648ca) SHA1(d8e67e6e3a6dc79053e4f56cfd83431385ea7611) ) |
| 4293 | 4393 | |
| 4294 | 4394 | ROM_REGION( 0x200000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 4311 | 4411 | |
| 4312 | 4412 | ROM_START( mercs ) |
| 4313 | 4413 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 4314 | ROM_LOAD16_BYTE( "so2_30e.rom", 0x00000, 0x20000, CRC(e17f9bf7) SHA1(f44bb378de428b429c97a21f74829182d3187ace) ) | |
| 4315 | ROM_LOAD16_BYTE( "so2_35e.rom", 0x00001, 0x20000, CRC(78e63575) SHA1(5776de0daaaedd0dec2cec8d088a0fd8bb3d4dbe) ) | |
| 4316 | ROM_LOAD16_BYTE( "so2_31e.rom", 0x40000, 0x20000, CRC(51204d36) SHA1(af288fc369d092f38ea73be967705aacade06f28) ) | |
| 4317 | ROM_LOAD16_BYTE( "so2_36e.rom", 0x40001, 0x20000, CRC(9cfba8b4) SHA1(df8ee5e3a68f056f68f096c46fdb548f63d29446) ) | |
| 4414 | ROM_LOAD16_BYTE( "so2_30e.rom", 0x00000, 0x20000, CRC(e17f9bf7) SHA1(f44bb378de428b429c97a21f74829182d3187ace) ) | |
| 4415 | ROM_LOAD16_BYTE( "so2_35e.rom", 0x00001, 0x20000, CRC(78e63575) SHA1(5776de0daaaedd0dec2cec8d088a0fd8bb3d4dbe) ) | |
| 4416 | ROM_LOAD16_BYTE( "so2_31e.rom", 0x40000, 0x20000, CRC(51204d36) SHA1(af288fc369d092f38ea73be967705aacade06f28) ) | |
| 4417 | ROM_LOAD16_BYTE( "so2_36e.rom", 0x40001, 0x20000, CRC(9cfba8b4) SHA1(df8ee5e3a68f056f68f096c46fdb548f63d29446) ) | |
| 4318 | 4418 | ROM_LOAD16_WORD_SWAP( "so2_32.rom", 0x80000, 0x80000, CRC(2eb5cf0c) SHA1(e0d765fb6957d156ffd40cabf51ba6098cbbeb19) ) |
| 4319 | 4419 | |
| 4320 | 4420 | ROM_REGION( 0x400000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 4345 | 4445 | |
| 4346 | 4446 | ROM_START( mercsu ) |
| 4347 | 4447 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 4348 | ROM_LOAD16_BYTE( "so2_30e.rom", 0x00000, 0x20000, CRC(e17f9bf7) SHA1(f44bb378de428b429c97a21f74829182d3187ace) ) | |
| 4349 | ROM_LOAD16_BYTE( "s02-35", 0x00001, 0x20000, CRC(4477df61) SHA1(e9b42357c7073c098e8fde7e7d0e4a6e3062fd0d) ) | |
| 4350 | ROM_LOAD16_BYTE( "so2_31e.rom", 0x40000, 0x20000, CRC(51204d36) SHA1(af288fc369d092f38ea73be967705aacade06f28) ) | |
| 4351 | ROM_LOAD16_BYTE( "so2_36e.rom", 0x40001, 0x20000, CRC(9cfba8b4) SHA1(df8ee5e3a68f056f68f096c46fdb548f63d29446) ) | |
| 4448 | ROM_LOAD16_BYTE( "so2_30e.rom", 0x00000, 0x20000, CRC(e17f9bf7) SHA1(f44bb378de428b429c97a21f74829182d3187ace) ) | |
| 4449 | ROM_LOAD16_BYTE( "s02-35", 0x00001, 0x20000, CRC(4477df61) SHA1(e9b42357c7073c098e8fde7e7d0e4a6e3062fd0d) ) | |
| 4450 | ROM_LOAD16_BYTE( "so2_31e.rom", 0x40000, 0x20000, CRC(51204d36) SHA1(af288fc369d092f38ea73be967705aacade06f28) ) | |
| 4451 | ROM_LOAD16_BYTE( "so2_36e.rom", 0x40001, 0x20000, CRC(9cfba8b4) SHA1(df8ee5e3a68f056f68f096c46fdb548f63d29446) ) | |
| 4352 | 4452 | ROM_LOAD16_WORD_SWAP( "so2_32.rom", 0x80000, 0x80000, CRC(2eb5cf0c) SHA1(e0d765fb6957d156ffd40cabf51ba6098cbbeb19) ) |
| 4353 | 4453 | |
| 4354 | 4454 | ROM_REGION( 0x400000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 4379 | 4479 | |
| 4380 | 4480 | ROM_START( mercsua ) |
| 4381 | 4481 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 4382 | ROM_LOAD16_BYTE( "so2.30a", 0x00000, 0x20000, CRC(e4e725d7) SHA1(b0454dedeb741a7dd4ceb18bac958417ca74a7e6) ) | |
| 4383 | ROM_LOAD16_BYTE( "so2.35a", 0x00001, 0x20000, CRC(e7843445) SHA1(192c85ced637e05b37ed889246ebb73e792e984b) ) | |
| 4384 | ROM_LOAD16_BYTE( "so2.31a", 0x40000, 0x20000, CRC(c0b91dea) SHA1(5c1d086ae09e4f66384a03994b3c5e12d80582ff) ) | |
| 4385 | ROM_LOAD16_BYTE( "so2.36a", 0x40001, 0x20000, CRC(591edf6c) SHA1(68d77e21fe32e0b95d2fabe40bc1cadd419ab0bd) ) | |
| 4482 | ROM_LOAD16_BYTE( "so2.30a", 0x00000, 0x20000, CRC(e4e725d7) SHA1(b0454dedeb741a7dd4ceb18bac958417ca74a7e6) ) | |
| 4483 | ROM_LOAD16_BYTE( "so2.35a", 0x00001, 0x20000, CRC(e7843445) SHA1(192c85ced637e05b37ed889246ebb73e792e984b) ) | |
| 4484 | ROM_LOAD16_BYTE( "so2.31a", 0x40000, 0x20000, CRC(c0b91dea) SHA1(5c1d086ae09e4f66384a03994b3c5e12d80582ff) ) | |
| 4485 | ROM_LOAD16_BYTE( "so2.36a", 0x40001, 0x20000, CRC(591edf6c) SHA1(68d77e21fe32e0b95d2fabe40bc1cadd419ab0bd) ) | |
| 4386 | 4486 | ROM_LOAD16_WORD_SWAP( "so2_32.rom", 0x80000, 0x80000, CRC(2eb5cf0c) SHA1(e0d765fb6957d156ffd40cabf51ba6098cbbeb19) ) |
| 4387 | 4487 | |
| 4388 | 4488 | ROM_REGION( 0x400000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 4413 | 4513 | |
| 4414 | 4514 | ROM_START( mercsj ) |
| 4415 | 4515 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 4416 | ROM_LOAD16_BYTE( "so2_30e.rom", 0x00000, 0x20000, CRC(e17f9bf7) SHA1(f44bb378de428b429c97a21f74829182d3187ace) ) | |
| 4417 | ROM_LOAD16_BYTE( "so2_42.bin", 0x00001, 0x20000, CRC(2c3884c6) SHA1(98c3e93741d2344fe0a699aacdc5038bdd9007a0) ) | |
| 4418 | ROM_LOAD16_BYTE( "so2_31e.rom", 0x40000, 0x20000, CRC(51204d36) SHA1(af288fc369d092f38ea73be967705aacade06f28) ) | |
| 4419 | ROM_LOAD16_BYTE( "so2_36e.rom", 0x40001, 0x20000, CRC(9cfba8b4) SHA1(df8ee5e3a68f056f68f096c46fdb548f63d29446) ) | |
| 4516 | ROM_LOAD16_BYTE( "so2_30e.rom", 0x00000, 0x20000, CRC(e17f9bf7) SHA1(f44bb378de428b429c97a21f74829182d3187ace) ) | |
| 4517 | ROM_LOAD16_BYTE( "so2_42.bin", 0x00001, 0x20000, CRC(2c3884c6) SHA1(98c3e93741d2344fe0a699aacdc5038bdd9007a0) ) | |
| 4518 | ROM_LOAD16_BYTE( "so2_31e.rom", 0x40000, 0x20000, CRC(51204d36) SHA1(af288fc369d092f38ea73be967705aacade06f28) ) | |
| 4519 | ROM_LOAD16_BYTE( "so2_36e.rom", 0x40001, 0x20000, CRC(9cfba8b4) SHA1(df8ee5e3a68f056f68f096c46fdb548f63d29446) ) | |
| 4420 | 4520 | ROM_LOAD16_WORD_SWAP( "so2_32.rom", 0x80000, 0x80000, CRC(2eb5cf0c) SHA1(e0d765fb6957d156ffd40cabf51ba6098cbbeb19) ) |
| 4421 | 4521 | |
| 4422 | 4522 | ROM_REGION( 0x400000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 4447 | 4547 | |
| 4448 | 4548 | ROM_START( mtwins ) |
| 4449 | 4549 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 4450 | ROM_LOAD16_BYTE( "che_30.rom", 0x00000, 0x20000, CRC(9a2a2db1) SHA1(57524e76311afc8ab5d5affa76c85cb1be5a1faf) ) | |
| 4451 | ROM_LOAD16_BYTE( "che_35.rom", 0x00001, 0x20000, CRC(a7f96b02) SHA1(b5fda02e5069f9e1cdafbacf98334510e9af8fcd) ) | |
| 4452 | ROM_LOAD16_BYTE( "che_31.rom", 0x40000, 0x20000, CRC(bbff8a99) SHA1(1f931fad9f43a1494f3b8dbcf910156d5b0bd458) ) | |
| 4453 | ROM_LOAD16_BYTE( "che_36.rom", 0x40001, 0x20000, CRC(0fa00c39) SHA1(6404d91590c5c521c8fe944a0aa7091e35b664ae) ) | |
| 4550 | ROM_LOAD16_BYTE( "che_30.rom", 0x00000, 0x20000, CRC(9a2a2db1) SHA1(57524e76311afc8ab5d5affa76c85cb1be5a1faf) ) | |
| 4551 | ROM_LOAD16_BYTE( "che_35.rom", 0x00001, 0x20000, CRC(a7f96b02) SHA1(b5fda02e5069f9e1cdafbacf98334510e9af8fcd) ) | |
| 4552 | ROM_LOAD16_BYTE( "che_31.rom", 0x40000, 0x20000, CRC(bbff8a99) SHA1(1f931fad9f43a1494f3b8dbcf910156d5b0bd458) ) | |
| 4553 | ROM_LOAD16_BYTE( "che_36.rom", 0x40001, 0x20000, CRC(0fa00c39) SHA1(6404d91590c5c521c8fe944a0aa7091e35b664ae) ) | |
| 4454 | 4554 | ROM_LOAD16_WORD_SWAP( "ch_32.rom", 0x80000, 0x80000, CRC(9b70bd41) SHA1(28ec37d9d0ace5b9fd212fdc02e0f13dc280c068) ) |
| 4455 | 4555 | |
| 4456 | 4556 | ROM_REGION( 0x200000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 4473 | 4573 | |
| 4474 | 4574 | ROM_START( chikij ) |
| 4475 | 4575 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 4476 | ROM_LOAD16_BYTE( "chj36a.bin", 0x00000, 0x20000, CRC(ec1328d8) SHA1(a7111f9c264c56d1c6474ec3ad90e394a32a86f6) ) | |
| 4477 | ROM_LOAD16_BYTE( "chj42a.bin", 0x00001, 0x20000, CRC(4ae13503) SHA1(c47db0445e107ad4fb62b74e277a7dc2b4d9b7ea) ) | |
| 4478 | ROM_LOAD16_BYTE( "chj37a.bin", 0x40000, 0x20000, CRC(46d2cf7b) SHA1(5cb7ed3003d89a08882d4dcd326c8fd9430f0eac) ) | |
| 4479 | ROM_LOAD16_BYTE( "chj43a.bin", 0x40001, 0x20000, CRC(8d387fe8) SHA1(7832ecd487b5ef4e49b5ea78e80e52f8e2dcaa17) ) | |
| 4576 | ROM_LOAD16_BYTE( "chj36a.bin", 0x00000, 0x20000, CRC(ec1328d8) SHA1(a7111f9c264c56d1c6474ec3ad90e394a32a86f6) ) | |
| 4577 | ROM_LOAD16_BYTE( "chj42a.bin", 0x00001, 0x20000, CRC(4ae13503) SHA1(c47db0445e107ad4fb62b74e277a7dc2b4d9b7ea) ) | |
| 4578 | ROM_LOAD16_BYTE( "chj37a.bin", 0x40000, 0x20000, CRC(46d2cf7b) SHA1(5cb7ed3003d89a08882d4dcd326c8fd9430f0eac) ) | |
| 4579 | ROM_LOAD16_BYTE( "chj43a.bin", 0x40001, 0x20000, CRC(8d387fe8) SHA1(7832ecd487b5ef4e49b5ea78e80e52f8e2dcaa17) ) | |
| 4480 | 4580 | ROM_LOAD16_WORD_SWAP( "ch_32.rom", 0x80000, 0x80000, CRC(9b70bd41) SHA1(28ec37d9d0ace5b9fd212fdc02e0f13dc280c068) ) |
| 4481 | 4581 | |
| 4482 | 4582 | ROM_REGION( 0x200000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 4499 | 4599 | |
| 4500 | 4600 | ROM_START( msword ) |
| 4501 | 4601 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 4502 | ROM_LOAD16_BYTE( "mse_30.rom", 0x00000, 0x20000, CRC(03fc8dbc) SHA1(a9e4e8a06e2d170faeae75a8b17fd65e6e5fecd4) ) | |
| 4503 | ROM_LOAD16_BYTE( "mse_35.rom", 0x00001, 0x20000, CRC(d5bf66cd) SHA1(37c5bc4deafd7037ec5cf09c88bb89f35ea3d95c) ) | |
| 4504 | ROM_LOAD16_BYTE( "mse_31.rom", 0x40000, 0x20000, CRC(30332bcf) SHA1(1c77c06028b77473276cb5dde5ecf414b43a7b78) ) | |
| 4505 | ROM_LOAD16_BYTE( "mse_36.rom", 0x40001, 0x20000, CRC(8f7d6ce9) SHA1(7694c940023c12520663593f973ddb4168a6bfa5) ) | |
| 4602 | ROM_LOAD16_BYTE( "mse_30.rom", 0x00000, 0x20000, CRC(03fc8dbc) SHA1(a9e4e8a06e2d170faeae75a8b17fd65e6e5fecd4) ) | |
| 4603 | ROM_LOAD16_BYTE( "mse_35.rom", 0x00001, 0x20000, CRC(d5bf66cd) SHA1(37c5bc4deafd7037ec5cf09c88bb89f35ea3d95c) ) | |
| 4604 | ROM_LOAD16_BYTE( "mse_31.rom", 0x40000, 0x20000, CRC(30332bcf) SHA1(1c77c06028b77473276cb5dde5ecf414b43a7b78) ) | |
| 4605 | ROM_LOAD16_BYTE( "mse_36.rom", 0x40001, 0x20000, CRC(8f7d6ce9) SHA1(7694c940023c12520663593f973ddb4168a6bfa5) ) | |
| 4506 | 4606 | ROM_LOAD16_WORD_SWAP( "ms_32.rom", 0x80000, 0x80000, CRC(2475ddfc) SHA1(cc34dfae8124aa781320be6870a1929495eee456) ) |
| 4507 | 4607 | |
| 4508 | 4608 | ROM_REGION( 0x200000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 4525 | 4625 | |
| 4526 | 4626 | ROM_START( mswordr1 ) |
| 4527 | 4627 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 4528 | ROM_LOAD16_BYTE( "ms30.11f", 0x00000, 0x20000, CRC(21c1f078) SHA1(f32bd3b462cc84466244b362a66510b9d40ac2fd) ) | |
| 4529 | ROM_LOAD16_BYTE( "ms35.11h", 0x00001, 0x20000, CRC(a540a73a) SHA1(1c91241ba0d17d13adaa68e231b95dfd49d93b6d) ) | |
| 4530 | ROM_LOAD16_BYTE( "ms31.12f", 0x40000, 0x20000, CRC(d7e762b5) SHA1(6977130e9c0cd36d8a67e242c132df38f7aea5b7) ) | |
| 4531 | ROM_LOAD16_BYTE( "ms36.12h", 0x40001, 0x20000, CRC(66f2dcdb) SHA1(287508b1c96762d0048a10272cf2cbd39a7fba5c) ) | |
| 4628 | ROM_LOAD16_BYTE( "ms30.11f", 0x00000, 0x20000, CRC(21c1f078) SHA1(f32bd3b462cc84466244b362a66510b9d40ac2fd) ) | |
| 4629 | ROM_LOAD16_BYTE( "ms35.11h", 0x00001, 0x20000, CRC(a540a73a) SHA1(1c91241ba0d17d13adaa68e231b95dfd49d93b6d) ) | |
| 4630 | ROM_LOAD16_BYTE( "ms31.12f", 0x40000, 0x20000, CRC(d7e762b5) SHA1(6977130e9c0cd36d8a67e242c132df38f7aea5b7) ) | |
| 4631 | ROM_LOAD16_BYTE( "ms36.12h", 0x40001, 0x20000, CRC(66f2dcdb) SHA1(287508b1c96762d0048a10272cf2cbd39a7fba5c) ) | |
| 4532 | 4632 | ROM_LOAD16_WORD_SWAP( "ms_32.rom", 0x80000, 0x80000, CRC(2475ddfc) SHA1(cc34dfae8124aa781320be6870a1929495eee456) ) |
| 4533 | 4633 | |
| 4534 | 4634 | ROM_REGION( 0x200000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 4551 | 4651 | |
| 4552 | 4652 | ROM_START( mswordu ) |
| 4553 | 4653 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 4554 | ROM_LOAD16_BYTE( "msu30", 0x00000, 0x20000, CRC(d963c816) SHA1(e23844a60ddfc0a8a98c0ada9c3d58fce71c5484) ) | |
| 4555 | ROM_LOAD16_BYTE( "msu35", 0x00001, 0x20000, CRC(72f179b3) SHA1(8d31cdc84b02fc345fc78e8f231410adeb834c28) ) | |
| 4556 | ROM_LOAD16_BYTE( "msu31", 0x40000, 0x20000, CRC(20cd7904) SHA1(cea2db01be97f69dc10e9da80f3b46f6ddaa953a) ) | |
| 4557 | ROM_LOAD16_BYTE( "msu36", 0x40001, 0x20000, CRC(bf88c080) SHA1(b8cd0b127fd3e1afc45402e667ff4b4b01602384) ) | |
| 4654 | ROM_LOAD16_BYTE( "msu30", 0x00000, 0x20000, CRC(d963c816) SHA1(e23844a60ddfc0a8a98c0ada9c3d58fce71c5484) ) | |
| 4655 | ROM_LOAD16_BYTE( "msu35", 0x00001, 0x20000, CRC(72f179b3) SHA1(8d31cdc84b02fc345fc78e8f231410adeb834c28) ) | |
| 4656 | ROM_LOAD16_BYTE( "msu31", 0x40000, 0x20000, CRC(20cd7904) SHA1(cea2db01be97f69dc10e9da80f3b46f6ddaa953a) ) | |
| 4657 | ROM_LOAD16_BYTE( "msu36", 0x40001, 0x20000, CRC(bf88c080) SHA1(b8cd0b127fd3e1afc45402e667ff4b4b01602384) ) | |
| 4558 | 4658 | ROM_LOAD16_WORD_SWAP( "ms_32.rom", 0x80000, 0x80000, CRC(2475ddfc) SHA1(cc34dfae8124aa781320be6870a1929495eee456) ) |
| 4559 | 4659 | |
| 4560 | 4660 | ROM_REGION( 0x200000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 4577 | 4677 | |
| 4578 | 4678 | ROM_START( mswordj ) |
| 4579 | 4679 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 4580 | ROM_LOAD16_BYTE( "msj_36.bin", 0x00000, 0x20000, CRC(04f0ef50) SHA1(76dac695732ade1873bb6da51834ef90c6595689) ) | |
| 4581 | ROM_LOAD16_BYTE( "msj_42.bin", 0x00001, 0x20000, CRC(9fcbb9cd) SHA1(bfbf805ddecd3fa9e209a658526e1430ad9e459a) ) | |
| 4582 | ROM_LOAD16_BYTE( "msj_37.bin", 0x40000, 0x20000, CRC(6c060d70) SHA1(7fe56f125bc11156955bf0defc956fe7c18a1c72) ) | |
| 4583 | ROM_LOAD16_BYTE( "msj_43.bin", 0x40001, 0x20000, CRC(aec77787) SHA1(3260f9a80b67394dd90dbabdd544c9b8b31e5817) ) | |
| 4680 | ROM_LOAD16_BYTE( "msj_36.bin", 0x00000, 0x20000, CRC(04f0ef50) SHA1(76dac695732ade1873bb6da51834ef90c6595689) ) | |
| 4681 | ROM_LOAD16_BYTE( "msj_42.bin", 0x00001, 0x20000, CRC(9fcbb9cd) SHA1(bfbf805ddecd3fa9e209a658526e1430ad9e459a) ) | |
| 4682 | ROM_LOAD16_BYTE( "msj_37.bin", 0x40000, 0x20000, CRC(6c060d70) SHA1(7fe56f125bc11156955bf0defc956fe7c18a1c72) ) | |
| 4683 | ROM_LOAD16_BYTE( "msj_43.bin", 0x40001, 0x20000, CRC(aec77787) SHA1(3260f9a80b67394dd90dbabdd544c9b8b31e5817) ) | |
| 4584 | 4684 | ROM_LOAD16_WORD_SWAP( "ms_32.rom", 0x80000, 0x80000, CRC(2475ddfc) SHA1(cc34dfae8124aa781320be6870a1929495eee456) ) |
| 4585 | 4685 | |
| 4586 | 4686 | ROM_REGION( 0x200000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 4603 | 4703 | |
| 4604 | 4704 | ROM_START( cawing ) |
| 4605 | 4705 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 4606 | ROM_LOAD16_BYTE( "cae_30a.rom", 0x00000, 0x20000, CRC(91fceacd) SHA1(4845999a96fee829264346ca399fdd64a8408001) ) | |
| 4607 | ROM_LOAD16_BYTE( "cae_35a.rom", 0x00001, 0x20000, CRC(3ef03083) SHA1(297dfc9ec1e0f07d6083bf5efaa0de8d0fb361fa) ) | |
| 4608 | ROM_LOAD16_BYTE( "cae_31a.rom", 0x40000, 0x20000, CRC(e5b75caf) SHA1(4d04220c78620867b7598deea5685bbe88298ae6) ) | |
| 4609 | ROM_LOAD16_BYTE( "cae_36a.rom", 0x40001, 0x20000, CRC(c73fd713) SHA1(fa202c252b2cc5972d42d634c466d89cf8b5d178) ) | |
| 4706 | ROM_LOAD16_BYTE( "cae_30a.rom", 0x00000, 0x20000, CRC(91fceacd) SHA1(4845999a96fee829264346ca399fdd64a8408001) ) | |
| 4707 | ROM_LOAD16_BYTE( "cae_35a.rom", 0x00001, 0x20000, CRC(3ef03083) SHA1(297dfc9ec1e0f07d6083bf5efaa0de8d0fb361fa) ) | |
| 4708 | ROM_LOAD16_BYTE( "cae_31a.rom", 0x40000, 0x20000, CRC(e5b75caf) SHA1(4d04220c78620867b7598deea5685bbe88298ae6) ) | |
| 4709 | ROM_LOAD16_BYTE( "cae_36a.rom", 0x40001, 0x20000, CRC(c73fd713) SHA1(fa202c252b2cc5972d42d634c466d89cf8b5d178) ) | |
| 4610 | 4710 | ROM_LOAD16_WORD_SWAP( "ca_32.rom", 0x80000, 0x80000, CRC(0c4837d4) SHA1(1c61958b43066b59d86eb4bae0b52c3109be4b07) ) |
| 4611 | 4711 | |
| 4612 | 4712 | ROM_REGION( 0x200000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 4629 | 4729 | |
| 4630 | 4730 | ROM_START( cawingr1 ) |
| 4631 | 4731 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 4632 | ROM_LOAD16_BYTE( "cae_30.11f", 0x00000, 0x20000, CRC(23305cd5) SHA1(59cbcb79c171b433f278e128c73cdd3635876370) ) | |
| 4633 | ROM_LOAD16_BYTE( "cae_35.11h", 0x00001, 0x20000, CRC(69419113) SHA1(cfbb6dbbe224ffaf7747fd70b65a7dbd4f696fe9) ) | |
| 4634 | ROM_LOAD16_BYTE( "cae_31.12f", 0x40000, 0x20000, CRC(9008dfb3) SHA1(81fdd21606caabe9e0df773fc33377c958ab80f6) ) | |
| 4635 | ROM_LOAD16_BYTE( "cae_36.12h", 0x40001, 0x20000, CRC(4dbf6f8e) SHA1(a2da49dce72c2366381bd8bea8ce4eba0b70d78c) ) | |
| 4732 | ROM_LOAD16_BYTE( "cae_30.11f", 0x00000, 0x20000, CRC(23305cd5) SHA1(59cbcb79c171b433f278e128c73cdd3635876370) ) | |
| 4733 | ROM_LOAD16_BYTE( "cae_35.11h", 0x00001, 0x20000, CRC(69419113) SHA1(cfbb6dbbe224ffaf7747fd70b65a7dbd4f696fe9) ) | |
| 4734 | ROM_LOAD16_BYTE( "cae_31.12f", 0x40000, 0x20000, CRC(9008dfb3) SHA1(81fdd21606caabe9e0df773fc33377c958ab80f6) ) | |
| 4735 | ROM_LOAD16_BYTE( "cae_36.12h", 0x40001, 0x20000, CRC(4dbf6f8e) SHA1(a2da49dce72c2366381bd8bea8ce4eba0b70d78c) ) | |
| 4636 | 4736 | ROM_LOAD16_WORD_SWAP( "ca_32.rom", 0x80000, 0x80000, CRC(0c4837d4) SHA1(1c61958b43066b59d86eb4bae0b52c3109be4b07) ) |
| 4637 | 4737 | |
| 4638 | 4738 | ROM_REGION( 0x200000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 4655 | 4755 | |
| 4656 | 4756 | ROM_START( cawingu ) |
| 4657 | 4757 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 4658 | ROM_LOAD16_BYTE( "cae_30a.rom", 0x00000, 0x20000, CRC(91fceacd) SHA1(4845999a96fee829264346ca399fdd64a8408001) ) | |
| 4659 | ROM_LOAD16_BYTE( "cau_35a.rom", 0x00001, 0x20000, CRC(f090d9b2) SHA1(261dc4ac79507299a7f9a1ad5edb8425345db06c) ) | |
| 4660 | ROM_LOAD16_BYTE( "cae_31a.rom", 0x40000, 0x20000, CRC(e5b75caf) SHA1(4d04220c78620867b7598deea5685bbe88298ae6) ) | |
| 4661 | ROM_LOAD16_BYTE( "cae_36a.rom", 0x40001, 0x20000, CRC(c73fd713) SHA1(fa202c252b2cc5972d42d634c466d89cf8b5d178) ) | |
| 4758 | ROM_LOAD16_BYTE( "cae_30a.rom", 0x00000, 0x20000, CRC(91fceacd) SHA1(4845999a96fee829264346ca399fdd64a8408001) ) | |
| 4759 | ROM_LOAD16_BYTE( "cau_35a.rom", 0x00001, 0x20000, CRC(f090d9b2) SHA1(261dc4ac79507299a7f9a1ad5edb8425345db06c) ) | |
| 4760 | ROM_LOAD16_BYTE( "cae_31a.rom", 0x40000, 0x20000, CRC(e5b75caf) SHA1(4d04220c78620867b7598deea5685bbe88298ae6) ) | |
| 4761 | ROM_LOAD16_BYTE( "cae_36a.rom", 0x40001, 0x20000, CRC(c73fd713) SHA1(fa202c252b2cc5972d42d634c466d89cf8b5d178) ) | |
| 4662 | 4762 | ROM_LOAD16_WORD_SWAP( "ca_32.rom", 0x80000, 0x80000, CRC(0c4837d4) SHA1(1c61958b43066b59d86eb4bae0b52c3109be4b07) ) |
| 4663 | 4763 | |
| 4664 | 4764 | ROM_REGION( 0x200000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 4722 | 4822 | |
| 4723 | 4823 | ROM_START( nemo ) |
| 4724 | 4824 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 4725 | ROM_LOAD16_BYTE( "nme_30a.rom", 0x00000, 0x20000, CRC(d2c03e56) SHA1(df468e3b5deba01a6825b742f1cc87bfb26c1981) ) | |
| 4726 | ROM_LOAD16_BYTE( "nme_35a.rom", 0x00001, 0x20000, CRC(5fd31661) SHA1(12f92a7255e8cae6975452db956670cf72d51768) ) | |
| 4727 | ROM_LOAD16_BYTE( "nme_31a.rom", 0x40000, 0x20000, CRC(b2bd4f6f) SHA1(82a59b5f36cb4c23dca05297e2a643842fc12609) ) | |
| 4728 | ROM_LOAD16_BYTE( "nme_36a.rom", 0x40001, 0x20000, CRC(ee9450e3) SHA1(a5454268ef58533e71fe07167b4c3fd263363f77) ) | |
| 4825 | ROM_LOAD16_BYTE( "nme_30a.rom", 0x00000, 0x20000, CRC(d2c03e56) SHA1(df468e3b5deba01a6825b742f1cc87bfb26c1981) ) | |
| 4826 | ROM_LOAD16_BYTE( "nme_35a.rom", 0x00001, 0x20000, CRC(5fd31661) SHA1(12f92a7255e8cae6975452db956670cf72d51768) ) | |
| 4827 | ROM_LOAD16_BYTE( "nme_31a.rom", 0x40000, 0x20000, CRC(b2bd4f6f) SHA1(82a59b5f36cb4c23dca05297e2a643842fc12609) ) | |
| 4828 | ROM_LOAD16_BYTE( "nme_36a.rom", 0x40001, 0x20000, CRC(ee9450e3) SHA1(a5454268ef58533e71fe07167b4c3fd263363f77) ) | |
| 4729 | 4829 | ROM_LOAD16_WORD_SWAP( "nm_32.rom", 0x80000, 0x80000, CRC(d6d1add3) SHA1(61c3013d322dbb7622cca032adcd020ba318e885) ) |
| 4730 | 4830 | |
| 4731 | 4831 | ROM_REGION( 0x200000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 4748 | 4848 | |
| 4749 | 4849 | ROM_START( nemoj ) |
| 4750 | 4850 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 4751 | ROM_LOAD16_BYTE( "nm36.bin", 0x00000, 0x20000, CRC(daeceabb) SHA1(ebd44922be9d07a3d3411af52edee8a60cb11dad) ) | |
| 4752 | ROM_LOAD16_BYTE( "nm42.bin", 0x00001, 0x20000, CRC(55024740) SHA1(4bacbd191bb435de5dc548ac7fa16ed286bd2d3b) ) | |
| 4753 | ROM_LOAD16_BYTE( "nm37.bin", 0x40000, 0x20000, CRC(619068b6) SHA1(2507c6f77a06a80f913c848dcb6816bcbf4bba8a) ) | |
| 4754 | ROM_LOAD16_BYTE( "nm43.bin", 0x40001, 0x20000, CRC(a948a53b) SHA1(65c2abf321cf8b171bbfbb51ed57bc99eb552ca9) ) | |
| 4851 | ROM_LOAD16_BYTE( "nm36.bin", 0x00000, 0x20000, CRC(daeceabb) SHA1(ebd44922be9d07a3d3411af52edee8a60cb11dad) ) | |
| 4852 | ROM_LOAD16_BYTE( "nm42.bin", 0x00001, 0x20000, CRC(55024740) SHA1(4bacbd191bb435de5dc548ac7fa16ed286bd2d3b) ) | |
| 4853 | ROM_LOAD16_BYTE( "nm37.bin", 0x40000, 0x20000, CRC(619068b6) SHA1(2507c6f77a06a80f913c848dcb6816bcbf4bba8a) ) | |
| 4854 | ROM_LOAD16_BYTE( "nm43.bin", 0x40001, 0x20000, CRC(a948a53b) SHA1(65c2abf321cf8b171bbfbb51ed57bc99eb552ca9) ) | |
| 4755 | 4855 | ROM_LOAD16_WORD_SWAP( "nm_32.rom", 0x80000, 0x80000, CRC(d6d1add3) SHA1(61c3013d322dbb7622cca032adcd020ba318e885) ) |
| 4756 | 4856 | |
| 4757 | 4857 | ROM_REGION( 0x200000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 4805 | 4905 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 4806 | 4906 | |
| 4807 | 4907 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 4808 | ROM_LOAD( "sf2_18.bin", 0x00000, 0x20000, CRC(7f162009) SHA1(346bf42992b4c36c593e21901e22c87ae4a7d86d) ) | |
| 4809 | ROM_LOAD( "sf2_19.bin", 0x20000, 0x20000, CRC(beade53f) SHA1(277c397dc12752719ec6b47d2224750bd1c07f79) ) | |
| 4908 | ROM_LOAD( "sf2_18.bin", 0x00000, 0x20000, CRC(7f162009) SHA1(346bf42992b4c36c593e21901e22c87ae4a7d86d) ) | |
| 4909 | ROM_LOAD( "sf2_19.bin", 0x20000, 0x20000, CRC(beade53f) SHA1(277c397dc12752719ec6b47d2224750bd1c07f79) ) | |
| 4810 | 4910 | ROM_END |
| 4811 | 4911 | |
| 4812 | 4912 | ROM_START( sf2eb ) |
| r2454 | r2455 | |
| 4842 | 4942 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 4843 | 4943 | |
| 4844 | 4944 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 4845 | ROM_LOAD( "sf2_18.bin", 0x00000, 0x20000, CRC(7f162009) SHA1(346bf42992b4c36c593e21901e22c87ae4a7d86d) ) | |
| 4846 | ROM_LOAD( "sf2_19.bin", 0x20000, 0x20000, CRC(beade53f) SHA1(277c397dc12752719ec6b47d2224750bd1c07f79) ) | |
| 4945 | ROM_LOAD( "sf2_18.bin", 0x00000, 0x20000, CRC(7f162009) SHA1(346bf42992b4c36c593e21901e22c87ae4a7d86d) ) | |
| 4946 | ROM_LOAD( "sf2_19.bin", 0x20000, 0x20000, CRC(beade53f) SHA1(277c397dc12752719ec6b47d2224750bd1c07f79) ) | |
| 4847 | 4947 | ROM_END |
| 4848 | 4948 | |
| 4849 | 4949 | ROM_START( sf2ua ) |
| r2454 | r2455 | |
| 4879 | 4979 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 4880 | 4980 | |
| 4881 | 4981 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 4882 | ROM_LOAD( "sf2_18.bin", 0x00000, 0x20000, CRC(7f162009) SHA1(346bf42992b4c36c593e21901e22c87ae4a7d86d) ) | |
| 4883 | ROM_LOAD( "sf2_19.bin", 0x20000, 0x20000, CRC(beade53f) SHA1(277c397dc12752719ec6b47d2224750bd1c07f79) ) | |
| 4982 | ROM_LOAD( "sf2_18.bin", 0x00000, 0x20000, CRC(7f162009) SHA1(346bf42992b4c36c593e21901e22c87ae4a7d86d) ) | |
| 4983 | ROM_LOAD( "sf2_19.bin", 0x20000, 0x20000, CRC(beade53f) SHA1(277c397dc12752719ec6b47d2224750bd1c07f79) ) | |
| 4884 | 4984 | ROM_END |
| 4885 | 4985 | |
| 4886 | 4986 | ROM_START( sf2ub ) |
| r2454 | r2455 | |
| 4916 | 5016 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 4917 | 5017 | |
| 4918 | 5018 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 4919 | ROM_LOAD( "sf2_18.bin", 0x00000, 0x20000, CRC(7f162009) SHA1(346bf42992b4c36c593e21901e22c87ae4a7d86d) ) | |
| 4920 | ROM_LOAD( "sf2_19.bin", 0x20000, 0x20000, CRC(beade53f) SHA1(277c397dc12752719ec6b47d2224750bd1c07f79) ) | |
| 5019 | ROM_LOAD( "sf2_18.bin", 0x00000, 0x20000, CRC(7f162009) SHA1(346bf42992b4c36c593e21901e22c87ae4a7d86d) ) | |
| 5020 | ROM_LOAD( "sf2_19.bin", 0x20000, 0x20000, CRC(beade53f) SHA1(277c397dc12752719ec6b47d2224750bd1c07f79) ) | |
| 4921 | 5021 | ROM_END |
| 4922 | 5022 | |
| 4923 | 5023 | ROM_START( sf2ud ) |
| 4924 | 5024 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 4925 | ROM_LOAD16_BYTE( "sf2u.30d", 0x00000, 0x20000, CRC(4bb2657c) SHA1(b2d077296b77be7db371f953b7fc446a67d8a9d6) ) | |
| 4926 | ROM_LOAD16_BYTE( "sf2u.37d", 0x00001, 0x20000, CRC(b33b42f2) SHA1(2e0babc8734c79dc2b51a6be64433bb2411c3da5) ) | |
| 4927 | ROM_LOAD16_BYTE( "sf2u.31d", 0x40000, 0x20000, CRC(d57b67d7) SHA1(43d0b47c9fada8d9b445caa4b96ac8493061aa8b) ) | |
| 4928 | ROM_LOAD16_BYTE( "sf2u.38d", 0x40001, 0x20000, CRC(9c8916ef) SHA1(a4629356a816454bcc1d7b41e70e147d4769a682) ) | |
| 4929 | ROM_LOAD16_BYTE( "sf2u.28d", 0x80000, 0x20000, CRC(175819d1) SHA1(c98b6b7af4e57735dbfb3d1e61ba1bfb9f145d33) ) | |
| 4930 | ROM_LOAD16_BYTE( "sf2u.35d", 0x80001, 0x20000, CRC(82060da4) SHA1(7487cfc28cce3d76772ece657aef83b56034011e) ) | |
| 5025 | ROM_LOAD16_BYTE( "sf2u.30d", 0x00000, 0x20000, CRC(4bb2657c) SHA1(b2d077296b77be7db371f953b7fc446a67d8a9d6) ) | |
| 5026 | ROM_LOAD16_BYTE( "sf2u.37d", 0x00001, 0x20000, CRC(b33b42f2) SHA1(2e0babc8734c79dc2b51a6be64433bb2411c3da5) ) | |
| 5027 | ROM_LOAD16_BYTE( "sf2u.31d", 0x40000, 0x20000, CRC(d57b67d7) SHA1(43d0b47c9fada8d9b445caa4b96ac8493061aa8b) ) | |
| 5028 | ROM_LOAD16_BYTE( "sf2u.38d", 0x40001, 0x20000, CRC(9c8916ef) SHA1(a4629356a816454bcc1d7b41e70e147d4769a682) ) | |
| 5029 | ROM_LOAD16_BYTE( "sf2u.28d", 0x80000, 0x20000, CRC(175819d1) SHA1(c98b6b7af4e57735dbfb3d1e61ba1bfb9f145d33) ) | |
| 5030 | ROM_LOAD16_BYTE( "sf2u.35d", 0x80001, 0x20000, CRC(82060da4) SHA1(7487cfc28cce3d76772ece657aef83b56034011e) ) | |
| 4931 | 5031 | ROM_LOAD16_BYTE( "sf2_29a.bin", 0xc0000, 0x20000, CRC(bb4af315) SHA1(75f0827f4f7e9f292add46467f8d4fe19b2514c9) ) |
| 4932 | 5032 | ROM_LOAD16_BYTE( "sf2_36a.bin", 0xc0001, 0x20000, CRC(c02a13eb) SHA1(b807cc495bff3f95d03b061fc629c95f965cb6d8) ) |
| 4933 | 5033 | |
| r2454 | r2455 | |
| 4953 | 5053 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 4954 | 5054 | |
| 4955 | 5055 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 4956 | ROM_LOAD( "sf2_18.bin", 0x00000, 0x20000, CRC(7f162009) SHA1(346bf42992b4c36c593e21901e22c87ae4a7d86d) ) | |
| 4957 | ROM_LOAD( "sf2_19.bin", 0x20000, 0x20000, CRC(beade53f) SHA1(277c397dc12752719ec6b47d2224750bd1c07f79) ) | |
| 5056 | ROM_LOAD( "sf2_18.bin", 0x00000, 0x20000, CRC(7f162009) SHA1(346bf42992b4c36c593e21901e22c87ae4a7d86d) ) | |
| 5057 | ROM_LOAD( "sf2_19.bin", 0x20000, 0x20000, CRC(beade53f) SHA1(277c397dc12752719ec6b47d2224750bd1c07f79) ) | |
| 4958 | 5058 | ROM_END |
| 4959 | 5059 | |
| 4960 | 5060 | ROM_START( sf2ue ) |
| r2454 | r2455 | |
| 4990 | 5090 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 4991 | 5091 | |
| 4992 | 5092 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 4993 | ROM_LOAD( "sf2_18.bin", 0x00000, 0x20000, CRC(7f162009) SHA1(346bf42992b4c36c593e21901e22c87ae4a7d86d) ) | |
| 4994 | ROM_LOAD( "sf2_19.bin", 0x20000, 0x20000, CRC(beade53f) SHA1(277c397dc12752719ec6b47d2224750bd1c07f79) ) | |
| 5093 | ROM_LOAD( "sf2_18.bin", 0x00000, 0x20000, CRC(7f162009) SHA1(346bf42992b4c36c593e21901e22c87ae4a7d86d) ) | |
| 5094 | ROM_LOAD( "sf2_19.bin", 0x20000, 0x20000, CRC(beade53f) SHA1(277c397dc12752719ec6b47d2224750bd1c07f79) ) | |
| 4995 | 5095 | ROM_END |
| 4996 | 5096 | |
| 4997 | 5097 | ROM_START( sf2uf ) |
| r2454 | r2455 | |
| 5027 | 5127 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 5028 | 5128 | |
| 5029 | 5129 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 5030 | ROM_LOAD( "sf2_18.bin", 0x00000, 0x20000, CRC(7f162009) SHA1(346bf42992b4c36c593e21901e22c87ae4a7d86d) ) | |
| 5031 | ROM_LOAD( "sf2_19.bin", 0x20000, 0x20000, CRC(beade53f) SHA1(277c397dc12752719ec6b47d2224750bd1c07f79) ) | |
| 5130 | ROM_LOAD( "sf2_18.bin", 0x00000, 0x20000, CRC(7f162009) SHA1(346bf42992b4c36c593e21901e22c87ae4a7d86d) ) | |
| 5131 | ROM_LOAD( "sf2_19.bin", 0x20000, 0x20000, CRC(beade53f) SHA1(277c397dc12752719ec6b47d2224750bd1c07f79) ) | |
| 5032 | 5132 | ROM_END |
| 5033 | 5133 | |
| 5034 | 5134 | ROM_START( sf2ui ) |
| r2454 | r2455 | |
| 5064 | 5164 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 5065 | 5165 | |
| 5066 | 5166 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 5067 | ROM_LOAD( "sf2_18.bin", 0x00000, 0x20000, CRC(7f162009) SHA1(346bf42992b4c36c593e21901e22c87ae4a7d86d) ) | |
| 5068 | ROM_LOAD( "sf2_19.bin", 0x20000, 0x20000, CRC(beade53f) SHA1(277c397dc12752719ec6b47d2224750bd1c07f79) ) | |
| 5167 | ROM_LOAD( "sf2_18.bin", 0x00000, 0x20000, CRC(7f162009) SHA1(346bf42992b4c36c593e21901e22c87ae4a7d86d) ) | |
| 5168 | ROM_LOAD( "sf2_19.bin", 0x20000, 0x20000, CRC(beade53f) SHA1(277c397dc12752719ec6b47d2224750bd1c07f79) ) | |
| 5069 | 5169 | ROM_END |
| 5070 | 5170 | |
| 5071 | 5171 | ROM_START( sf2uk ) |
| r2454 | r2455 | |
| 5101 | 5201 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 5102 | 5202 | |
| 5103 | 5203 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 5104 | ROM_LOAD( "sf2_18.bin", 0x00000, 0x20000, CRC(7f162009) SHA1(346bf42992b4c36c593e21901e22c87ae4a7d86d) ) | |
| 5105 | ROM_LOAD( "sf2_19.bin", 0x20000, 0x20000, CRC(beade53f) SHA1(277c397dc12752719ec6b47d2224750bd1c07f79) ) | |
| 5204 | ROM_LOAD( "sf2_18.bin", 0x00000, 0x20000, CRC(7f162009) SHA1(346bf42992b4c36c593e21901e22c87ae4a7d86d) ) | |
| 5205 | ROM_LOAD( "sf2_19.bin", 0x20000, 0x20000, CRC(beade53f) SHA1(277c397dc12752719ec6b47d2224750bd1c07f79) ) | |
| 5106 | 5206 | ROM_END |
| 5107 | 5207 | |
| 5108 | 5208 | ROM_START( sf2j ) |
| r2454 | r2455 | |
| 5138 | 5238 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 5139 | 5239 | |
| 5140 | 5240 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 5141 | ROM_LOAD( "sf2_18.bin", 0x00000, 0x20000, CRC(7f162009) SHA1(346bf42992b4c36c593e21901e22c87ae4a7d86d) ) | |
| 5142 | ROM_LOAD( "sf2_19.bin", 0x20000, 0x20000, CRC(beade53f) SHA1(277c397dc12752719ec6b47d2224750bd1c07f79) ) | |
| 5241 | ROM_LOAD( "sf2_18.bin", 0x00000, 0x20000, CRC(7f162009) SHA1(346bf42992b4c36c593e21901e22c87ae4a7d86d) ) | |
| 5242 | ROM_LOAD( "sf2_19.bin", 0x20000, 0x20000, CRC(beade53f) SHA1(277c397dc12752719ec6b47d2224750bd1c07f79) ) | |
| 5143 | 5243 | ROM_END |
| 5144 | 5244 | |
| 5145 | 5245 | ROM_START( sf2ja ) |
| r2454 | r2455 | |
| 5175 | 5275 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 5176 | 5276 | |
| 5177 | 5277 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 5178 | ROM_LOAD( "sf2_18.bin", 0x00000, 0x20000, CRC(7f162009) SHA1(346bf42992b4c36c593e21901e22c87ae4a7d86d) ) | |
| 5179 | ROM_LOAD( "sf2_19.bin", 0x20000, 0x20000, CRC(beade53f) SHA1(277c397dc12752719ec6b47d2224750bd1c07f79) ) | |
| 5278 | ROM_LOAD( "sf2_18.bin", 0x00000, 0x20000, CRC(7f162009) SHA1(346bf42992b4c36c593e21901e22c87ae4a7d86d) ) | |
| 5279 | ROM_LOAD( "sf2_19.bin", 0x20000, 0x20000, CRC(beade53f) SHA1(277c397dc12752719ec6b47d2224750bd1c07f79) ) | |
| 5180 | 5280 | ROM_END |
| 5181 | 5281 | |
| 5182 | 5282 | ROM_START( sf2jc ) |
| r2454 | r2455 | |
| 5212 | 5312 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 5213 | 5313 | |
| 5214 | 5314 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 5215 | ROM_LOAD( "sf2_18.bin", 0x00000, 0x20000, CRC(7f162009) SHA1(346bf42992b4c36c593e21901e22c87ae4a7d86d) ) | |
| 5216 | ROM_LOAD( "sf2_19.bin", 0x20000, 0x20000, CRC(beade53f) SHA1(277c397dc12752719ec6b47d2224750bd1c07f79) ) | |
| 5315 | ROM_LOAD( "sf2_18.bin", 0x00000, 0x20000, CRC(7f162009) SHA1(346bf42992b4c36c593e21901e22c87ae4a7d86d) ) | |
| 5316 | ROM_LOAD( "sf2_19.bin", 0x20000, 0x20000, CRC(beade53f) SHA1(277c397dc12752719ec6b47d2224750bd1c07f79) ) | |
| 5217 | 5317 | ROM_END |
| 5218 | 5318 | |
| 5219 | 5319 | ROM_START( 3wonders ) |
| r2454 | r2455 | |
| 5245 | 5345 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 5246 | 5346 | |
| 5247 | 5347 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 5248 | ROM_LOAD( "3wonders.18", 0x00000, 0x20000, CRC(26b211ab) SHA1(0ea03fdd9edff41eacfc52aa9e0421c10968356b) ) | |
| 5249 | ROM_LOAD( "3wonders.19", 0x20000, 0x20000, CRC(dbe64ad0) SHA1(09f2ad522fe75d7bcca094b8c6696c3733b539d5) ) | |
| 5348 | ROM_LOAD( "3wonders.18", 0x00000, 0x20000, CRC(26b211ab) SHA1(0ea03fdd9edff41eacfc52aa9e0421c10968356b) ) | |
| 5349 | ROM_LOAD( "3wonders.19", 0x20000, 0x20000, CRC(dbe64ad0) SHA1(09f2ad522fe75d7bcca094b8c6696c3733b539d5) ) | |
| 5250 | 5350 | ROM_END |
| 5251 | 5351 | |
| 5252 | 5352 | ROM_START( 3wonderu ) |
| r2454 | r2455 | |
| 5278 | 5378 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 5279 | 5379 | |
| 5280 | 5380 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 5281 | ROM_LOAD( "3wonders.18", 0x00000, 0x20000, CRC(26b211ab) SHA1(0ea03fdd9edff41eacfc52aa9e0421c10968356b) ) | |
| 5282 | ROM_LOAD( "3wonders.19", 0x20000, 0x20000, CRC(dbe64ad0) SHA1(09f2ad522fe75d7bcca094b8c6696c3733b539d5) ) | |
| 5381 | ROM_LOAD( "3wonders.18", 0x00000, 0x20000, CRC(26b211ab) SHA1(0ea03fdd9edff41eacfc52aa9e0421c10968356b) ) | |
| 5382 | ROM_LOAD( "3wonders.19", 0x20000, 0x20000, CRC(dbe64ad0) SHA1(09f2ad522fe75d7bcca094b8c6696c3733b539d5) ) | |
| 5283 | 5383 | ROM_END |
| 5284 | 5384 | |
| 5285 | 5385 | ROM_START( wonder3 ) |
| r2454 | r2455 | |
| 5288 | 5388 | ROM_LOAD16_BYTE( "rtj42.bin", 0x00001, 0x20000, CRC(b4baa117) SHA1(44486b3d50f9b0a8c32c2c2dc5f1a046aface7b6) ) |
| 5289 | 5389 | ROM_LOAD16_BYTE( "rtj37.bin", 0x40000, 0x20000, CRC(a1f677b0) SHA1(e1511ea0fa4a689d1355119ac37c075192880dde) ) |
| 5290 | 5390 | ROM_LOAD16_BYTE( "rtj43.bin", 0x40001, 0x20000, CRC(85337a47) SHA1(0a247aa56c5cc17b1e888df7b502f65e88715469) ) |
| 5291 | ||
| 5292 | 5391 | ROM_LOAD16_BYTE( "3wonders.28", 0x80000, 0x20000, CRC(054137c8) SHA1(e4c406e0a32198323a5931093fbaa6836510b8ad) ) |
| 5293 | 5392 | ROM_LOAD16_BYTE( "3wonders.33", 0x80001, 0x20000, CRC(7264cb1b) SHA1(b367acb9f6579569321ecaa98a14e29dd775b9db) ) |
| 5294 | 5393 | ROM_LOAD16_BYTE( "rtj35.bin", 0xc0000, 0x20000, CRC(e72f9ea3) SHA1(c63df200416bd61af73e8589204f7daef743041e) ) |
| r2454 | r2455 | |
| 5312 | 5411 | ROM_CONTINUE( 0x10000, 0x08000 ) /* (compare with US version, */ |
| 5313 | 5412 | /* which is verified to be correct) */ |
| 5314 | 5413 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 5315 | ROM_LOAD( "3wonders.18", 0x00000, 0x20000, CRC(26b211ab) SHA1(0ea03fdd9edff41eacfc52aa9e0421c10968356b) ) | |
| 5316 | ROM_LOAD( "3wonders.19", 0x20000, 0x20000, CRC(dbe64ad0) SHA1(09f2ad522fe75d7bcca094b8c6696c3733b539d5) ) | |
| 5414 | ROM_LOAD( "3wonders.18", 0x00000, 0x20000, CRC(26b211ab) SHA1(0ea03fdd9edff41eacfc52aa9e0421c10968356b) ) | |
| 5415 | ROM_LOAD( "3wonders.19", 0x20000, 0x20000, CRC(dbe64ad0) SHA1(09f2ad522fe75d7bcca094b8c6696c3733b539d5) ) | |
| 5317 | 5416 | ROM_END |
| 5318 | 5417 | |
| 5319 | 5418 | ROM_START( kod ) |
| r2454 | r2455 | |
| 5345 | 5444 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 5346 | 5445 | |
| 5347 | 5446 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 5348 | ROM_LOAD( "kod18.rom", 0x00000, 0x20000, CRC(69ecb2c8) SHA1(fadf266b6b20bd6329a3e638918c5a3106413476) ) | |
| 5349 | ROM_LOAD( "kod19.rom", 0x20000, 0x20000, CRC(02d851c1) SHA1(c959a6fc3e7d893557f319debae91f28471f4be2) ) | |
| 5447 | ROM_LOAD( "kod18.rom", 0x00000, 0x20000, CRC(69ecb2c8) SHA1(fadf266b6b20bd6329a3e638918c5a3106413476) ) | |
| 5448 | ROM_LOAD( "kod19.rom", 0x20000, 0x20000, CRC(02d851c1) SHA1(c959a6fc3e7d893557f319debae91f28471f4be2) ) | |
| 5350 | 5449 | ROM_END |
| 5351 | 5450 | |
| 5352 | 5451 | ROM_START( kodu ) |
| r2454 | r2455 | |
| 5378 | 5477 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 5379 | 5478 | |
| 5380 | 5479 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 5381 | ROM_LOAD( "kd18.bin", 0x00000, 0x20000, CRC(4c63181d) SHA1(270f27534a95cb0be3ff3f9ca71c502320d8090b) ) | |
| 5382 | ROM_LOAD( "kd19.bin", 0x20000, 0x20000, CRC(92941b80) SHA1(5fa7c2793e6febee54a83042d118ddd4f2b7d127) ) | |
| 5480 | ROM_LOAD( "kd18.bin", 0x00000, 0x20000, CRC(4c63181d) SHA1(270f27534a95cb0be3ff3f9ca71c502320d8090b) ) | |
| 5481 | ROM_LOAD( "kd19.bin", 0x20000, 0x20000, CRC(92941b80) SHA1(5fa7c2793e6febee54a83042d118ddd4f2b7d127) ) | |
| 5383 | 5482 | ROM_END |
| 5384 | 5483 | |
| 5385 | 5484 | ROM_START( kodj ) |
| 5386 | 5485 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 5387 | ROM_LOAD16_BYTE( "kd30.bin", 0x00000, 0x20000, CRC(ebc788ad) SHA1(f4a297e409fcdbb2c15a13b39a16e4a83e7e060b) ) | |
| 5388 | ROM_LOAD16_BYTE( "kd37.bin", 0x00001, 0x20000, CRC(e55c3529) SHA1(a5254895499a53b4fbaac6fd50464b9e08175b8d) ) | |
| 5389 | ROM_LOAD16_BYTE( "kd31.bin", 0x40000, 0x20000, CRC(c710d722) SHA1(a2e9b84d3e7d835a910ab9f584bdc64c2559995a) ) | |
| 5390 | ROM_LOAD16_BYTE( "kd38.bin", 0x40001, 0x20000, CRC(57d6ed3a) SHA1(a47da5068723c8e16ed458fbfa3e3db57b32d87d) ) | |
| 5486 | ROM_LOAD16_BYTE( "kd30.bin", 0x00000, 0x20000, CRC(ebc788ad) SHA1(f4a297e409fcdbb2c15a13b39a16e4a83e7e060b) ) | |
| 5487 | ROM_LOAD16_BYTE( "kd37.bin", 0x00001, 0x20000, CRC(e55c3529) SHA1(a5254895499a53b4fbaac6fd50464b9e08175b8d) ) | |
| 5488 | ROM_LOAD16_BYTE( "kd31.bin", 0x40000, 0x20000, CRC(c710d722) SHA1(a2e9b84d3e7d835a910ab9f584bdc64c2559995a) ) | |
| 5489 | ROM_LOAD16_BYTE( "kd38.bin", 0x40001, 0x20000, CRC(57d6ed3a) SHA1(a47da5068723c8e16ed458fbfa3e3db57b32d87d) ) | |
| 5391 | 5490 | ROM_LOAD16_WORD_SWAP("kd33.bin", 0x80000, 0x80000, CRC(9bd7ad4b) SHA1(7bece5d408fd13116bd5518014b632ecc9a2feaa) ) |
| 5392 | 5491 | |
| 5393 | 5492 | ROM_REGION( 0x400000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 5408 | 5507 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 5409 | 5508 | |
| 5410 | 5509 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 5411 | ROM_LOAD( "kd18.bin", 0x00000, 0x20000, CRC(4c63181d) SHA1(270f27534a95cb0be3ff3f9ca71c502320d8090b) ) | |
| 5412 | ROM_LOAD( "kd19.bin", 0x20000, 0x20000, CRC(92941b80) SHA1(5fa7c2793e6febee54a83042d118ddd4f2b7d127) ) | |
| 5510 | ROM_LOAD( "kd18.bin", 0x00000, 0x20000, CRC(4c63181d) SHA1(270f27534a95cb0be3ff3f9ca71c502320d8090b) ) | |
| 5511 | ROM_LOAD( "kd19.bin", 0x20000, 0x20000, CRC(92941b80) SHA1(5fa7c2793e6febee54a83042d118ddd4f2b7d127) ) | |
| 5413 | 5512 | ROM_END |
| 5414 | 5513 | |
| 5415 | 5514 | ROM_START( kodb ) |
| r2454 | r2455 | |
| 5435 | 5534 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 5436 | 5535 | |
| 5437 | 5536 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 5438 | ROM_LOAD( "kd18.bin", 0x00000, 0x20000, CRC(4c63181d) SHA1(270f27534a95cb0be3ff3f9ca71c502320d8090b) ) | |
| 5439 | ROM_LOAD( "kd19.bin", 0x20000, 0x20000, CRC(92941b80) SHA1(5fa7c2793e6febee54a83042d118ddd4f2b7d127) ) | |
| 5537 | ROM_LOAD( "kd18.bin", 0x00000, 0x20000, CRC(4c63181d) SHA1(270f27534a95cb0be3ff3f9ca71c502320d8090b) ) | |
| 5538 | ROM_LOAD( "kd19.bin", 0x20000, 0x20000, CRC(92941b80) SHA1(5fa7c2793e6febee54a83042d118ddd4f2b7d127) ) | |
| 5440 | 5539 | ROM_END |
| 5441 | 5540 | |
| 5442 | 5541 | ROM_START( captcomm ) |
| r2454 | r2455 | |
| 5464 | 5563 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 5465 | 5564 | |
| 5466 | 5565 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 5467 | ROM_LOAD( "cc_18.rom", 0x00000, 0x20000, CRC(6de2c2db) SHA1(9a1eaba8d104f59a5e61f89679bb5de0c0c64364) ) | |
| 5468 | ROM_LOAD( "cc_19.rom", 0x20000, 0x20000, CRC(b99091ae) SHA1(b19197c7ad3aeaf5f41c26bf853b0c9b502ecfca) ) | |
| 5566 | ROM_LOAD( "cc_18.rom", 0x00000, 0x20000, CRC(6de2c2db) SHA1(9a1eaba8d104f59a5e61f89679bb5de0c0c64364) ) | |
| 5567 | ROM_LOAD( "cc_19.rom", 0x20000, 0x20000, CRC(b99091ae) SHA1(b19197c7ad3aeaf5f41c26bf853b0c9b502ecfca) ) | |
| 5469 | 5568 | ROM_END |
| 5470 | 5569 | |
| 5471 | 5570 | ROM_START( captcomu ) |
| r2454 | r2455 | |
| 5493 | 5592 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 5494 | 5593 | |
| 5495 | 5594 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 5496 | ROM_LOAD( "cc_18.rom", 0x00000, 0x20000, CRC(6de2c2db) SHA1(9a1eaba8d104f59a5e61f89679bb5de0c0c64364) ) | |
| 5497 | ROM_LOAD( "cc_19.rom", 0x20000, 0x20000, CRC(b99091ae) SHA1(b19197c7ad3aeaf5f41c26bf853b0c9b502ecfca) ) | |
| 5595 | ROM_LOAD( "cc_18.rom", 0x00000, 0x20000, CRC(6de2c2db) SHA1(9a1eaba8d104f59a5e61f89679bb5de0c0c64364) ) | |
| 5596 | ROM_LOAD( "cc_19.rom", 0x20000, 0x20000, CRC(b99091ae) SHA1(b19197c7ad3aeaf5f41c26bf853b0c9b502ecfca) ) | |
| 5498 | 5597 | ROM_END |
| 5499 | 5598 | |
| 5500 | 5599 | ROM_START( captcomj ) |
| r2454 | r2455 | |
| 5522 | 5621 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 5523 | 5622 | |
| 5524 | 5623 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 5525 | ROM_LOAD( "cc_18.rom", 0x00000, 0x20000, CRC(6de2c2db) SHA1(9a1eaba8d104f59a5e61f89679bb5de0c0c64364) ) | |
| 5526 | ROM_LOAD( "cc_19.rom", 0x20000, 0x20000, CRC(b99091ae) SHA1(b19197c7ad3aeaf5f41c26bf853b0c9b502ecfca) ) | |
| 5624 | ROM_LOAD( "cc_18.rom", 0x00000, 0x20000, CRC(6de2c2db) SHA1(9a1eaba8d104f59a5e61f89679bb5de0c0c64364) ) | |
| 5625 | ROM_LOAD( "cc_19.rom", 0x20000, 0x20000, CRC(b99091ae) SHA1(b19197c7ad3aeaf5f41c26bf853b0c9b502ecfca) ) | |
| 5527 | 5626 | ROM_END |
| 5528 | 5627 | |
| 5529 | 5628 | ROM_START( knights ) |
| r2454 | r2455 | |
| 5549 | 5648 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 5550 | 5649 | |
| 5551 | 5650 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 5552 | ROM_LOAD( "kr_18.rom", 0x00000, 0x20000, CRC(da69d15f) SHA1(9616207e693bae85705f786cef60b9f6951b5067) ) | |
| 5553 | ROM_LOAD( "kr_19.rom", 0x20000, 0x20000, CRC(bfc654e9) SHA1(01b3d92e4dedf55ea3933d387c7ddb9ba2549773) ) | |
| 5651 | ROM_LOAD( "kr_18.rom", 0x00000, 0x20000, CRC(da69d15f) SHA1(9616207e693bae85705f786cef60b9f6951b5067) ) | |
| 5652 | ROM_LOAD( "kr_19.rom", 0x20000, 0x20000, CRC(bfc654e9) SHA1(01b3d92e4dedf55ea3933d387c7ddb9ba2549773) ) | |
| 5554 | 5653 | ROM_END |
| 5555 | 5654 | |
| 5556 | 5655 | ROM_START( knightsu ) |
| r2454 | r2455 | |
| 5576 | 5675 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 5577 | 5676 | |
| 5578 | 5677 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 5579 | ROM_LOAD( "kr_18.rom", 0x00000, 0x20000, CRC(da69d15f) SHA1(9616207e693bae85705f786cef60b9f6951b5067) ) | |
| 5580 | ROM_LOAD( "kr_19.rom", 0x20000, 0x20000, CRC(bfc654e9) SHA1(01b3d92e4dedf55ea3933d387c7ddb9ba2549773) ) | |
| 5678 | ROM_LOAD( "kr_18.rom", 0x00000, 0x20000, CRC(da69d15f) SHA1(9616207e693bae85705f786cef60b9f6951b5067) ) | |
| 5679 | ROM_LOAD( "kr_19.rom", 0x20000, 0x20000, CRC(bfc654e9) SHA1(01b3d92e4dedf55ea3933d387c7ddb9ba2549773) ) | |
| 5581 | 5680 | ROM_END |
| 5582 | 5681 | |
| 5583 | 5682 | ROM_START( knightsj ) |
| 5584 | 5683 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 5585 | ROM_LOAD16_BYTE( "krj30.bin", 0x00000, 0x20000, CRC(ad3d1a8e) SHA1(327f9e818f1500836fc549afeffbb2a3c5aafe8c) ) | |
| 5586 | ROM_LOAD16_BYTE( "krj37.bin", 0x00001, 0x20000, CRC(e694a491) SHA1(5a4d27c879c10032c49880019501de3e45ab1b35) ) | |
| 5587 | ROM_LOAD16_BYTE( "krj31.bin", 0x40000, 0x20000, CRC(85596094) SHA1(74ad294de63aa6b60aa8b885c45c3d41a07ce19a) ) | |
| 5588 | ROM_LOAD16_BYTE( "krj38.bin", 0x40001, 0x20000, CRC(9198bf8f) SHA1(aa3610600286ab25ce81705ea1319d42e7cc7f6c) ) | |
| 5684 | ROM_LOAD16_BYTE( "krj30.bin", 0x00000, 0x20000, CRC(ad3d1a8e) SHA1(327f9e818f1500836fc549afeffbb2a3c5aafe8c) ) | |
| 5685 | ROM_LOAD16_BYTE( "krj37.bin", 0x00001, 0x20000, CRC(e694a491) SHA1(5a4d27c879c10032c49880019501de3e45ab1b35) ) | |
| 5686 | ROM_LOAD16_BYTE( "krj31.bin", 0x40000, 0x20000, CRC(85596094) SHA1(74ad294de63aa6b60aa8b885c45c3d41a07ce19a) ) | |
| 5687 | ROM_LOAD16_BYTE( "krj38.bin", 0x40001, 0x20000, CRC(9198bf8f) SHA1(aa3610600286ab25ce81705ea1319d42e7cc7f6c) ) | |
| 5589 | 5688 | ROM_LOAD16_WORD_SWAP( "kr_22.rom", 0x80000, 0x80000, CRC(d0b671a9) SHA1(9865472c5fc3f617345e23b5de5a9ba177945b5a) ) |
| 5590 | 5689 | |
| 5591 | 5690 | ROM_REGION( 0x400000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 5606 | 5705 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 5607 | 5706 | |
| 5608 | 5707 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 5609 | ROM_LOAD( "kr_18.rom", 0x00000, 0x20000, CRC(da69d15f) SHA1(9616207e693bae85705f786cef60b9f6951b5067) ) | |
| 5610 | ROM_LOAD( "kr_19.rom", 0x20000, 0x20000, CRC(bfc654e9) SHA1(01b3d92e4dedf55ea3933d387c7ddb9ba2549773) ) | |
| 5708 | ROM_LOAD( "kr_18.rom", 0x00000, 0x20000, CRC(da69d15f) SHA1(9616207e693bae85705f786cef60b9f6951b5067) ) | |
| 5709 | ROM_LOAD( "kr_19.rom", 0x20000, 0x20000, CRC(bfc654e9) SHA1(01b3d92e4dedf55ea3933d387c7ddb9ba2549773) ) | |
| 5611 | 5710 | ROM_END |
| 5612 | 5711 | |
| 5613 | 5712 | ROM_START( sf2ce ) |
| r2454 | r2455 | |
| 5772 | 5871 | |
| 5773 | 5872 | ROM_START( sf2rb ) |
| 5774 | 5873 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 5775 | ROM_LOAD16_WORD( "sf2d__23.rom", 0x000000, 0x80000, CRC(450532b0) SHA1(14d5ff44ce97247ef4c42147157856d16c5fb4b8) ) | |
| 5776 | ROM_LOAD16_WORD( "sf2d__22.rom", 0x080000, 0x80000, CRC(fe9d9cf5) SHA1(91afb25d8c0fd1a721f982cebf8fdf563fe11760) ) | |
| 5874 | ROM_LOAD16_WORD( "sf2d__23.rom", 0x000000, 0x80000, CRC(450532b0) SHA1(14d5ff44ce97247ef4c42147157856d16c5fb4b8) ) | |
| 5875 | ROM_LOAD16_WORD( "sf2d__22.rom", 0x080000, 0x80000, CRC(fe9d9cf5) SHA1(91afb25d8c0fd1a721f982cebf8fdf563fe11760) ) | |
| 5777 | 5876 | ROM_LOAD16_WORD_SWAP( "s92_21a.bin", 0x100000, 0x80000, CRC(925a7877) SHA1(1960dca35f0ca6f2b399a9fccfbc0132ac6425d1) ) |
| 5778 | 5877 | |
| 5779 | 5878 | ROM_REGION( 0x600000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 5804 | 5903 | |
| 5805 | 5904 | ROM_START( sf2rb2 ) |
| 5806 | 5905 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 5807 | ROM_LOAD16_BYTE( "27.bin", 0x000000, 0x20000, CRC(40296ecd) SHA1(6006b9bc7e2e8ccec47f87b51791d3c0512620df) ) | |
| 5808 | ROM_LOAD16_BYTE( "31.bin", 0x000001, 0x20000, CRC(87954a41) SHA1(67225f180e1f954f0bebba49b618f793a973af14) ) | |
| 5809 | ROM_LOAD16_BYTE( "26.bin", 0x040000, 0x20000, CRC(a6974195) SHA1(f7e0fd43bd75229d49d5c330820bdc5c3b11ab03) ) | |
| 5810 | ROM_LOAD16_BYTE( "30.bin", 0x040001, 0x20000, CRC(8141fe32) SHA1(e6ea1ee331f674c64e63a776ad4e428f6081c79c) ) | |
| 5811 | ROM_LOAD16_BYTE( "25.bin", 0x080000, 0x20000, CRC(9ef8f772) SHA1(3ee271413521cc2d6ac9544e401ff38eff8a1347) ) | |
| 5812 | ROM_LOAD16_BYTE( "29.bin", 0x080001, 0x20000, CRC(7d9c479c) SHA1(a1195444caac5230a1f74f3444b024ceaf1d0667) ) | |
| 5813 | ROM_LOAD16_BYTE( "24.bin", 0x0c0000, 0x20000, CRC(93579684) SHA1(9052b46f635cae7843e9d37a601db0189a89e0f9) ) | |
| 5814 | ROM_LOAD16_BYTE( "28.bin", 0x0c0001, 0x20000, CRC(ff728865) SHA1(ad4522294ff2e02b594d960b45940a3e57a5d1ec) ) | |
| 5815 | ROM_LOAD16_WORD_SWAP( "s92_21a.bin", 0x100000, 0x80000, CRC(925a7877) SHA1(1960dca35f0ca6f2b399a9fccfbc0132ac6425d1) ) | |
| 5906 | ROM_LOAD16_BYTE( "27.bin", 0x000000, 0x20000, CRC(40296ecd) SHA1(6006b9bc7e2e8ccec47f87b51791d3c0512620df) ) | |
| 5907 | ROM_LOAD16_BYTE( "31.bin", 0x000001, 0x20000, CRC(87954a41) SHA1(67225f180e1f954f0bebba49b618f793a973af14) ) | |
| 5908 | ROM_LOAD16_BYTE( "26.bin", 0x040000, 0x20000, CRC(a6974195) SHA1(f7e0fd43bd75229d49d5c330820bdc5c3b11ab03) ) | |
| 5909 | ROM_LOAD16_BYTE( "30.bin", 0x040001, 0x20000, CRC(8141fe32) SHA1(e6ea1ee331f674c64e63a776ad4e428f6081c79c) ) | |
| 5910 | ROM_LOAD16_BYTE( "25.bin", 0x080000, 0x20000, CRC(9ef8f772) SHA1(3ee271413521cc2d6ac9544e401ff38eff8a1347) ) | |
| 5911 | ROM_LOAD16_BYTE( "29.bin", 0x080001, 0x20000, CRC(7d9c479c) SHA1(a1195444caac5230a1f74f3444b024ceaf1d0667) ) | |
| 5912 | ROM_LOAD16_BYTE( "24.bin", 0x0c0000, 0x20000, CRC(93579684) SHA1(9052b46f635cae7843e9d37a601db0189a89e0f9) ) | |
| 5913 | ROM_LOAD16_BYTE( "28.bin", 0x0c0001, 0x20000, CRC(ff728865) SHA1(ad4522294ff2e02b594d960b45940a3e57a5d1ec) ) | |
| 5914 | ROM_LOAD16_WORD_SWAP( "s92_21a.bin", 0x100000, 0x80000, CRC(925a7877) SHA1(1960dca35f0ca6f2b399a9fccfbc0132ac6425d1) ) | |
| 5816 | 5915 | |
| 5817 | 5916 | ROM_REGION( 0x600000, REGION_GFX1, 0 ) |
| 5818 | 5917 | ROMX_LOAD( "s92_01.bin", 0x000000, 0x80000, CRC(03b0d852) SHA1(f370f25c96ad2b94f8c53d6b7139100285a25bef) , ROM_GROUPWORD | ROM_SKIP(6) ) |
| r2454 | r2455 | |
| 5940 | 6039 | |
| 5941 | 6040 | ROM_START( sf2m1 ) |
| 5942 | 6041 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 5943 | ROM_LOAD16_BYTE( "222e", 0x000000, 0x80000, CRC(1e20d0a3) SHA1(5e05b52fd938aff5190bca7e178705d7236aef66) ) | |
| 5944 | ROM_LOAD16_BYTE( "196e", 0x000001, 0x80000, CRC(88cc38a3) SHA1(6049962f943bd37748a9531cc3254e8b59326eac) ) | |
| 6042 | ROM_LOAD16_BYTE( "222e", 0x000000, 0x80000, CRC(1e20d0a3) SHA1(5e05b52fd938aff5190bca7e178705d7236aef66) ) | |
| 6043 | ROM_LOAD16_BYTE( "196e", 0x000001, 0x80000, CRC(88cc38a3) SHA1(6049962f943bd37748a9531cc3254e8b59326eac) ) | |
| 5945 | 6044 | ROM_LOAD16_WORD_SWAP( "s92_21a.bin", 0x100000, 0x80000, CRC(925a7877) SHA1(1960dca35f0ca6f2b399a9fccfbc0132ac6425d1) ) |
| 5946 | 6045 | |
| 5947 | 6046 | ROM_REGION( 0x600000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 5972 | 6071 | |
| 5973 | 6072 | ROM_START( sf2m2 ) |
| 5974 | 6073 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 5975 | ROM_LOAD16_BYTE( "ch222esp", 0x000000, 0x80000, CRC(9e6d058a) SHA1(8c9adca7b65dc929c325c0a62304d24dc0902c08) ) | |
| 5976 | ROM_LOAD16_BYTE( "ch196esp", 0x000001, 0x80000, CRC(ed2ff437) SHA1(e76fc2953b6c800d5955c8fb442b80142e40e375) ) | |
| 6074 | ROM_LOAD16_BYTE( "ch222esp", 0x000000, 0x80000, CRC(9e6d058a) SHA1(8c9adca7b65dc929c325c0a62304d24dc0902c08) ) | |
| 6075 | ROM_LOAD16_BYTE( "ch196esp", 0x000001, 0x80000, CRC(ed2ff437) SHA1(e76fc2953b6c800d5955c8fb442b80142e40e375) ) | |
| 5977 | 6076 | ROM_LOAD16_WORD_SWAP( "s92_21a.bin", 0x100000, 0x80000, CRC(925a7877) SHA1(1960dca35f0ca6f2b399a9fccfbc0132ac6425d1) ) |
| 5978 | 6077 | |
| 5979 | 6078 | ROM_REGION( 0x600000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 6004 | 6103 | |
| 6005 | 6104 | ROM_START( sf2m3 ) |
| 6006 | 6105 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 6007 | ROM_LOAD16_BYTE( "u222chp", 0x000000, 0x80000, CRC(db567b66) SHA1(315bfbf2786ef67a95afb87de836ab348523dbbe) ) | |
| 6008 | ROM_LOAD16_BYTE( "u196chp", 0x000001, 0x80000, CRC(95ea597e) SHA1(5eb82feaa1de5611a96888e4670744bbb7d90393) ) | |
| 6106 | ROM_LOAD16_BYTE( "u222chp", 0x000000, 0x80000, CRC(db567b66) SHA1(315bfbf2786ef67a95afb87de836ab348523dbbe) ) | |
| 6107 | ROM_LOAD16_BYTE( "u196chp", 0x000001, 0x80000, CRC(95ea597e) SHA1(5eb82feaa1de5611a96888e4670744bbb7d90393) ) | |
| 6009 | 6108 | ROM_LOAD16_WORD_SWAP( "s92_21a.bin", 0x100000, 0x80000, CRC(925a7877) SHA1(1960dca35f0ca6f2b399a9fccfbc0132ac6425d1) ) |
| 6010 | 6109 | |
| 6011 | 6110 | ROM_REGION( 0x600000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 6036 | 6135 | |
| 6037 | 6136 | ROM_START( sf2m4 ) |
| 6038 | 6137 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 6039 | ROM_LOAD16_BYTE( "u222ne", 0x000000, 0x80000, CRC(7133489e) SHA1(036ef100c64c6e912c911340b32eea0da0b6f6d9) ) | |
| 6040 | ROM_LOAD16_BYTE( "u196ne", 0x000001, 0x80000, CRC(b07a4f90) SHA1(7a4a800bddc43cfa60f9097723b44a05c9d290ae) ) | |
| 6138 | ROM_LOAD16_BYTE( "u222ne", 0x000000, 0x80000, CRC(7133489e) SHA1(036ef100c64c6e912c911340b32eea0da0b6f6d9) ) | |
| 6139 | ROM_LOAD16_BYTE( "u196ne", 0x000001, 0x80000, CRC(b07a4f90) SHA1(7a4a800bddc43cfa60f9097723b44a05c9d290ae) ) | |
| 6041 | 6140 | ROM_LOAD16_WORD_SWAP( "s92_21a.bin", 0x100000, 0x80000, CRC(925a7877) SHA1(1960dca35f0ca6f2b399a9fccfbc0132ac6425d1) ) |
| 6042 | 6141 | |
| 6043 | 6142 | ROM_REGION( 0x600000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 6068 | 6167 | |
| 6069 | 6168 | ROM_START( sf2m5 ) |
| 6070 | 6169 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 6071 | ROM_LOAD16_BYTE( "u222", 0x000000, 0x80000, CRC(03991fba) SHA1(6c42bf15248640fdb3e98fb01b0a870649deb410) ) | |
| 6072 | ROM_LOAD16_BYTE( "u196", 0x000001, 0x80000, CRC(39f15a1e) SHA1(901c4fea76bf5bff7330ed07ffde54cdccdaa680) ) | |
| 6170 | ROM_LOAD16_BYTE( "u222", 0x000000, 0x80000, CRC(03991fba) SHA1(6c42bf15248640fdb3e98fb01b0a870649deb410) ) | |
| 6171 | ROM_LOAD16_BYTE( "u196", 0x000001, 0x80000, CRC(39f15a1e) SHA1(901c4fea76bf5bff7330ed07ffde54cdccdaa680) ) | |
| 6073 | 6172 | ROM_LOAD16_WORD_SWAP( "s92_21a.bin", 0x100000, 0x80000, CRC(925a7877) SHA1(1960dca35f0ca6f2b399a9fccfbc0132ac6425d1) ) |
| 6074 | 6173 | |
| 6075 | 6174 | ROM_REGION( 0x600000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 6100 | 6199 | |
| 6101 | 6200 | ROM_START( sf2m6 ) |
| 6102 | 6201 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 6103 | ROM_LOAD16_BYTE( "u222-6b", 0x000000, 0x80000, CRC(0a3692be) SHA1(7b937b7b0130e460b5f12188b19f464c55b507c9) ) | |
| 6104 | ROM_LOAD16_BYTE( "u196-6b", 0x000001, 0x80000, CRC(80454da7) SHA1(64f6dba14d342c9933ce632aa7ca126b34b4ee8b) ) | |
| 6202 | ROM_LOAD16_BYTE( "u222-6b", 0x000000, 0x80000, CRC(0a3692be) SHA1(7b937b7b0130e460b5f12188b19f464c55b507c9) ) | |
| 6203 | ROM_LOAD16_BYTE( "u196-6b", 0x000001, 0x80000, CRC(80454da7) SHA1(64f6dba14d342c9933ce632aa7ca126b34b4ee8b) ) | |
| 6105 | 6204 | ROM_LOAD16_WORD_SWAP( "s92_21a.bin", 0x100000, 0x80000, CRC(925a7877) SHA1(1960dca35f0ca6f2b399a9fccfbc0132ac6425d1) ) |
| 6106 | 6205 | |
| 6107 | 6206 | ROM_REGION( 0x600000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 6132 | 6231 | |
| 6133 | 6232 | ROM_START( sf2m7 ) |
| 6134 | 6233 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 6135 | ROM_LOAD16_BYTE( "u222-2i", 0x000000, 0x40000, CRC(1ca7adbd) SHA1(45e9dc05766ad156edcfc9e59a9804f74f90dc68) ) | |
| 6136 | ROM_LOAD16_BYTE( "u196-2i", 0x000001, 0x40000, CRC(f758408c) SHA1(aac44a7287bb3b7ba35d68aff279e265dbd3f6d3) ) | |
| 6137 | ROM_LOAD16_BYTE( "u222-2s", 0x080000, 0x40000, CRC(720cea3e) SHA1(ec4f22159d44a8abc40643b986b88a4f947d6aea) ) | |
| 6138 | ROM_LOAD16_BYTE( "u196-2s", 0x080001, 0x40000, CRC(9932832c) SHA1(0da0f5ebab91b0759c5fc00902cfe4b12a856466) ) | |
| 6234 | ROM_LOAD16_BYTE( "u222-2i", 0x000000, 0x40000, CRC(1ca7adbd) SHA1(45e9dc05766ad156edcfc9e59a9804f74f90dc68) ) | |
| 6235 | ROM_LOAD16_BYTE( "u196-2i", 0x000001, 0x40000, CRC(f758408c) SHA1(aac44a7287bb3b7ba35d68aff279e265dbd3f6d3) ) | |
| 6236 | ROM_LOAD16_BYTE( "u222-2s", 0x080000, 0x40000, CRC(720cea3e) SHA1(ec4f22159d44a8abc40643b986b88a4f947d6aea) ) | |
| 6237 | ROM_LOAD16_BYTE( "u196-2s", 0x080001, 0x40000, CRC(9932832c) SHA1(0da0f5ebab91b0759c5fc00902cfe4b12a856466) ) | |
| 6139 | 6238 | ROM_LOAD16_WORD_SWAP( "s92_21a.bin", 0x100000, 0x80000, CRC(925a7877) SHA1(1960dca35f0ca6f2b399a9fccfbc0132ac6425d1) ) |
| 6140 | 6239 | |
| 6141 | 6240 | ROM_REGION( 0x600000, REGION_GFX1, 0 ) |
| r2454 | r2455 | |
| 6169 | 6268 | ROM_LOAD16_BYTE( "b12.rom", 0x000000, 0x80000, CRC(8f742fd5) SHA1(a78a00e686856481011d8b5f5e60ed18197a5225) ) |
| 6170 | 6269 | ROM_LOAD16_BYTE( "b14.rom", 0x000001, 0x80000, CRC(8831ec7f) SHA1(0293ff189cbacf90098e734fb31fcbf3c3165e6b) ) |
| 6171 | 6270 | ROM_LOAD16_BYTE( "b11.rom", 0x100000, 0x20000, CRC(94a46525) SHA1(2712b979ce2bfd87e74da3369e0fceaae2a0654c) ) |
| 6172 | ROM_RELOAD | |
| 6271 | ROM_RELOAD | |
| 6173 | 6272 | ROM_LOAD16_BYTE( "b13.rom", 0x100001, 0x20000, CRC(8fb3dd47) SHA1(ebf30ad7ae60eeda446e23bd74f6e2d98dde4158) ) |
| 6174 | ROM_RELOAD | |
| 6273 | ROM_RELOAD | |
| 6175 | 6274 | |
| 6176 | 6275 | ROM_REGION( 0x600000, REGION_GFX1, 0 ) |
| 6177 | 6276 | ROMX_LOAD( "s92_01.bin", 0x000000, 0x80000, CRC(03b0d852) SHA1(f370f25c96ad2b94f8c53d6b7139100285a25bef) , ROM_GROUPWORD | ROM_SKIP(6) ) |
| r2454 | r2455 | |
| 6257 | 6356 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 6258 | 6357 | |
| 6259 | 6358 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 6260 | ROM_LOAD( "va_18.rom", 0x00000, 0x20000, CRC(de30510e) SHA1(8e878696192606b76a3a0e53553e638d9621cff7) ) | |
| 6261 | ROM_LOAD( "va_19.rom", 0x20000, 0x20000, CRC(0610a4ac) SHA1(3da02ea6a7a56c85de898806d2a1cf6bc526c1b3) ) | |
| 6359 | ROM_LOAD( "va_18.rom", 0x00000, 0x20000, CRC(de30510e) SHA1(8e878696192606b76a3a0e53553e638d9621cff7) ) | |
| 6360 | ROM_LOAD( "va_19.rom", 0x20000, 0x20000, CRC(0610a4ac) SHA1(3da02ea6a7a56c85de898806d2a1cf6bc526c1b3) ) | |
| 6262 | 6361 | ROM_END |
| 6263 | 6362 | |
| 6264 | 6363 | ROM_START( varthr1 ) |
| r2454 | r2455 | |
| 6286 | 6385 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 6287 | 6386 | |
| 6288 | 6387 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 6289 | ROM_LOAD( "va_18.rom", 0x00000, 0x20000, CRC(de30510e) SHA1(8e878696192606b76a3a0e53553e638d9621cff7) ) | |
| 6290 | ROM_LOAD( "va_19.rom", 0x20000, 0x20000, CRC(0610a4ac) SHA1(3da02ea6a7a56c85de898806d2a1cf6bc526c1b3) ) | |
| 6388 | ROM_LOAD( "va_18.rom", 0x00000, 0x20000, CRC(de30510e) SHA1(8e878696192606b76a3a0e53553e638d9621cff7) ) | |
| 6389 | ROM_LOAD( "va_19.rom", 0x20000, 0x20000, CRC(0610a4ac) SHA1(3da02ea6a7a56c85de898806d2a1cf6bc526c1b3) ) | |
| 6291 | 6390 | ROM_END |
| 6292 | 6391 | |
| 6293 | 6392 | ROM_START( varthu ) |
| 6294 | 6393 | ROM_REGION( CODE_SIZE, REGION_CPU1, 0 ) /* 68000 code */ |
| 6295 | 6394 | ROM_LOAD16_WORD_SWAP( "vau23a.bin", 0x00000, 0x80000, CRC(fbe68726) SHA1(68917d366551d2203400adc3261355dd3b332bcb) ) |
| 6296 | ROM_LOAD16_BYTE( "vae_28a.rom", 0x80000, 0x20000, CRC(7a0e0d25) SHA1(203692ef1daeef7ba08b154cf029cc07a2e0e23d) ) | |
| 6297 | ROM_LOAD16_BYTE( "vae_33a.rom", 0x80001, 0x20000, CRC(f2365922) SHA1(efb2221033e4b46fedaf3d8c850e208f849e6af0) ) | |
| 6298 | ROM_LOAD16_BYTE( "vae_29a.rom", 0xc0000, 0x20000, CRC(5e2cd2c3) SHA1(eff955c7dc0d8ae215e7188cc4865726104c7777) ) | |
| 6299 | ROM_LOAD16_BYTE( "vae_34a.rom", 0xc0001, 0x20000, CRC(3d9bdf83) SHA1(d655803a6f07b90e44aacaa3e6059ac330ef2ec6) ) | |
| 6395 | ROM_LOAD16_BYTE( "vae_28a.rom", 0x80000, 0x20000, CRC(7a0e0d25) SHA1(203692ef1daeef7ba08b154cf029cc07a2e0e23d) ) | |
| 6396 | ROM_LOAD16_BYTE( "vae_33a.rom", 0x80001, 0x20000, CRC(f2365922) SHA1(efb2221033e4b46fedaf3d8c850e208f849e6af0) ) | |
| 6397 | ROM_LOAD16_BYTE( "vae_29a.rom", 0xc0000, 0x20000, CRC(5e2cd2c3) SHA1(eff955c7dc0d8ae215e7188cc4865726104c7777) ) | |
| 6398 | ROM_LOAD16_BYTE( "vae_34a.rom", 0xc0001, 0x20000, CRC(3d9bdf83) SHA1(d655803a6f07b90e44aacaa3e6059ac330ef2ec6) ) | |
| 6300 | 6399 | |
| 6301 | 6400 | ROM_REGION( 0x200000, REGION_GFX1, 0 ) |
| 6302 | 6401 | ROMX_LOAD( "va_gfx5.rom", 0x000000, 0x80000, CRC(b1fb726e) SHA1(5ac0876b6c49d0a99710dda68653664f4d8c1167) , ROM_GROUPWORD | ROM_SKIP(6) ) |
| r2454 | r2455 | |
| 6312 | 6411 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 6313 | 6412 | |
| 6314 | 6413 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 6315 | ROM_LOAD( "va_18.rom", 0x00000, 0x20000, CRC(de30510e) SHA1(8e878696192606b76a3a0e53553e638d9621cff7) ) | |
| 6316 | ROM_LOAD( "va_19.rom", 0x20000, 0x20000, CRC(0610a4ac) SHA1(3da02ea6a7a56c85de898806d2a1cf6bc526c1b3) ) | |
| 6414 | ROM_LOAD( "va_18.rom", 0x00000, 0x20000, CRC(de30510e) SHA1(8e878696192606b76a3a0e53553e638d9621cff7) ) | |
| 6415 | ROM_LOAD( "va_19.rom", 0x20000, 0x20000, CRC(0610a4ac) SHA1(3da02ea6a7a56c85de898806d2a1cf6bc526c1b3) ) | |
| 6317 | 6416 | ROM_END |
| 6318 | 6417 | |
| 6319 | 6418 | ROM_START( varthj ) |
| r2454 | r2455 | |
| 6341 | 6440 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 6342 | 6441 | |
| 6343 | 6442 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 6344 | ROM_LOAD( "va_18.rom", 0x00000, 0x20000, CRC(de30510e) SHA1(8e878696192606b76a3a0e53553e638d9621cff7) ) | |
| 6345 | ROM_LOAD( "va_19.rom", 0x20000, 0x20000, CRC(0610a4ac) SHA1(3da02ea6a7a56c85de898806d2a1cf6bc526c1b3) ) | |
| 6443 | ROM_LOAD( "va_18.rom", 0x00000, 0x20000, CRC(de30510e) SHA1(8e878696192606b76a3a0e53553e638d9621cff7) ) | |
| 6444 | ROM_LOAD( "va_19.rom", 0x20000, 0x20000, CRC(0610a4ac) SHA1(3da02ea6a7a56c85de898806d2a1cf6bc526c1b3) ) | |
| 6346 | 6445 | ROM_END |
| 6347 | 6446 | |
| 6348 | 6447 | ROM_START( cworld2j ) |
| r2454 | r2455 | |
| 6382 | 6481 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 6383 | 6482 | |
| 6384 | 6483 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 6385 | ROM_LOAD( "q530.bin", 0x00000, 0x20000, CRC(d10c1b68) SHA1(2423241f3340d8ab1b6bf9514ca8c3bba1273873) ) | |
| 6386 | ROM_LOAD( "q531.bin", 0x20000, 0x20000, CRC(7d17e496) SHA1(a274b94ec4f042dddc239ecb9ac2e1e2375f5eb2) ) | |
| 6484 | ROM_LOAD( "q530.bin", 0x00000, 0x20000, CRC(d10c1b68) SHA1(2423241f3340d8ab1b6bf9514ca8c3bba1273873) ) | |
| 6485 | ROM_LOAD( "q531.bin", 0x20000, 0x20000, CRC(7d17e496) SHA1(a274b94ec4f042dddc239ecb9ac2e1e2375f5eb2) ) | |
| 6387 | 6486 | ROM_END |
| 6388 | 6487 | |
| 6389 | 6488 | ROM_START( wof ) |
| r2454 | r2455 | |
| 7046 | 7145 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 7047 | 7146 | |
| 7048 | 7147 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 7049 | ROM_LOAD( "pnij24.bin", 0x00000, 0x20000, CRC(5092257d) SHA1(95dc9d10940653b2fb37baf5c1ed27145b02104e) ) | |
| 7050 | ROM_LOAD( "pnij25.bin", 0x20000, 0x20000, CRC(22109aaa) SHA1(cf21e75674d81b2daae2083d02f9f4b6e52722c6) ) | |
| 7148 | ROM_LOAD( "pnij24.bin", 0x00000, 0x20000, CRC(5092257d) SHA1(95dc9d10940653b2fb37baf5c1ed27145b02104e) ) | |
| 7149 | ROM_LOAD( "pnij25.bin", 0x20000, 0x20000, CRC(22109aaa) SHA1(cf21e75674d81b2daae2083d02f9f4b6e52722c6) ) | |
| 7051 | 7150 | ROM_END |
| 7052 | 7151 | |
| 7053 | 7152 | ROM_START( qad ) |
| r2454 | r2455 | |
| 7075 | 7174 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 7076 | 7175 | |
| 7077 | 7176 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 7078 | ROM_LOAD( "qdu_30.rom", 0x00000, 0x20000, CRC(f190da84) SHA1(d5cd4c69b5d135a2f2fea8ca9631251c9da79e70) ) | |
| 7079 | ROM_LOAD( "qdu_31.rom", 0x20000, 0x20000, CRC(b7583f73) SHA1(3896e0fcf375e9e5d9ba70cc1ed001cd702f9ff7) ) | |
| 7177 | ROM_LOAD( "qdu_30.rom", 0x00000, 0x20000, CRC(f190da84) SHA1(d5cd4c69b5d135a2f2fea8ca9631251c9da79e70) ) | |
| 7178 | ROM_LOAD( "qdu_31.rom", 0x20000, 0x20000, CRC(b7583f73) SHA1(3896e0fcf375e9e5d9ba70cc1ed001cd702f9ff7) ) | |
| 7080 | 7179 | ROM_END |
| 7081 | 7180 | |
| 7082 | 7181 | ROM_START( qadj ) |
| r2454 | r2455 | |
| 7098 | 7197 | ROM_CONTINUE( 0x10000, 0x08000 ) |
| 7099 | 7198 | |
| 7100 | 7199 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 7101 | ROM_LOAD( "qad18.bin", 0x00000, 0x20000, CRC(2bfe6f6a) SHA1(b2a98ac034c65b7ac8167431f05f35d4799032ea) ) | |
| 7102 | ROM_LOAD( "qad19.bin", 0x20000, 0x20000, CRC(13d3236b) SHA1(785d49de484e9ac6971eaceebebfecb8e58563f6) ) | |
| 7200 | ROM_LOAD( "qad18.bin", 0x00000, 0x20000, CRC(2bfe6f6a) SHA1(b2a98ac034c65b7ac8167431f05f35d4799032ea) ) | |
| 7201 | ROM_LOAD( "qad19.bin", 0x20000, 0x20000, CRC(13d3236b) SHA1(785d49de484e9ac6971eaceebebfecb8e58563f6) ) | |
| 7103 | 7202 | ROM_END |
| 7104 | 7203 | |
| 7105 | 7204 | ROM_START( qtono2 ) |
| r2454 | r2455 | |
| 7130 | 7229 | ROM_LOAD( "tn2j-09.12a", 0x00000, 0x08000, CRC(6d8edcef) SHA1(9ec2d64278b30cc4316238c3efee663a8bbb255e) ) |
| 7131 | 7230 | |
| 7132 | 7231 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 7133 | ROM_LOAD( "tn2j-18.11c", 0x00000, 0x20000, CRC(a40bf9a7) SHA1(07cb1076262a281e31a621cbcc10be0cae883175) ) | |
| 7134 | ROM_LOAD( "tn2j-19.12c", 0x20000, 0x20000, CRC(5b3b931e) SHA1(cf28891f84814cbfaa3adaade8bb08b1e0546a3d) ) | |
| 7232 | ROM_LOAD( "tn2j-18.11c", 0x00000, 0x20000, CRC(a40bf9a7) SHA1(07cb1076262a281e31a621cbcc10be0cae883175) ) | |
| 7233 | ROM_LOAD( "tn2j-19.12c", 0x20000, 0x20000, CRC(5b3b931e) SHA1(cf28891f84814cbfaa3adaade8bb08b1e0546a3d) ) | |
| 7135 | 7234 | ROM_END |
| 7136 | 7235 | |
| 7137 | 7236 | ROM_START( pang3 ) |
| r2454 | r2455 | |
| 7207 | 7306 | |
| 7208 | 7307 | ROM_REGION( 0x28000, REGION_CPU2, 0 ) /* 64k for the audio CPU (+banks) */ |
| 7209 | 7308 | ROM_LOAD( "rcm_09.rom", 0x00000, 0x08000, CRC(9632d6ef) SHA1(2bcb6f17005ffbc9ef8fa4478a814f24b2e6e0b6) ) |
| 7210 | ROM_CONTINUE( 0x10000, 0x18000 ) | |
| 7309 | ROM_CONTINUE( 0x10000, 0x18000 ) // second half of ROM is empty, not mapped in memory | |
| 7211 | 7310 | |
| 7212 | 7311 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 7213 | 7312 | ROM_LOAD( "rcm_18.rom", 0x00000, 0x20000, CRC(80f1f8aa) SHA1(4a5b7b2a6941ad68da7472c63362c7bcd353fa54) ) |
| r2454 | r2455 | |
| 7243 | 7342 | |
| 7244 | 7343 | ROM_REGION( 0x28000, REGION_CPU2, 0 ) /* 64k for the audio CPU (+banks) */ |
| 7245 | 7344 | ROM_LOAD( "rcm_09.rom", 0x00000, 0x08000, CRC(9632d6ef) SHA1(2bcb6f17005ffbc9ef8fa4478a814f24b2e6e0b6) ) |
| 7246 | ROM_CONTINUE( 0x10000, 0x18000 ) | |
| 7345 | ROM_CONTINUE( 0x10000, 0x18000 ) // second half of ROM is empty, not mapped in memory | |
| 7247 | 7346 | |
| 7248 | 7347 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ |
| 7249 | 7348 | ROM_LOAD( "rcm_18.rom", 0x00000, 0x20000, CRC(80f1f8aa) SHA1(4a5b7b2a6941ad68da7472c63362c7bcd353fa54) ) |
| r2454 | r2455 | |
| 7252 | 7351 | |
| 7253 | 7352 | |
| 7254 | 7353 | #ifndef MESS |
| 7354 | ||
| 7355 | static DRIVER_INIT( forgottn ) | |
| 7356 | { | |
| 7357 | /* Forgotten Worlds has extra inputs on the B-board CN-MOWS connector for the dial controls. */ | |
| 7358 | memory_install_write16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x800040, 0x800041, 0, 0, forgottn_dial_0_reset_w); | |
| 7359 | memory_install_write16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x800048, 0x800049, 0, 0, forgottn_dial_1_reset_w); | |
| 7360 | memory_install_read16_handler (machine, 0, ADDRESS_SPACE_PROGRAM, 0x800052, 0x800055, 0, 0, forgottn_dial_0_r); | |
| 7361 | memory_install_read16_handler (machine, 0, ADDRESS_SPACE_PROGRAM, 0x80005a, 0x80005d, 0, 0, forgottn_dial_1_r); | |
| 7362 | ||
| 7363 | DRIVER_INIT_CALL(cps1); | |
| 7364 | } | |
| 7365 | ||
| 7255 | 7366 | static DRIVER_INIT( wof ) |
| 7256 | 7367 | { |
| 7257 | 7368 | wof_decode(); |
| r2454 | r2455 | |
| 7278 | 7389 | |
| 7279 | 7390 | static DRIVER_INIT( pang3 ) |
| 7280 | 7391 | { |
| 7281 | /* Pang 3 EEPROM interface is at a different address */ | |
| 7392 | /* Pang 3 is the only non-QSound game to have an EEPROM. */ | |
| 7393 | /* It is mapped in the CPS-B address range so probably is on the C-board. */ | |
| 7282 | 7394 | memory_install_readwrite16_handler (machine, 0, ADDRESS_SPACE_PROGRAM, 0x80017a, 0x80017b, 0, 0, cps1_eeprom_port_r, cps1_eeprom_port_w); |
| 7283 | 7395 | |
| 7284 | 7396 | DRIVER_INIT_CALL(cps1); |
| r2454 | r2455 | |
| 7310 | 7422 | #endif |
| 7311 | 7423 | |
| 7312 | 7424 | |
| 7313 | GAME( 1988, forgottn, 0, cps1_10MHz, forgottn, cps1, ROT0, "Capcom", "Forgotten Worlds (US)", 0 ) | |
| 7314 | GAME( 1988, lostwrld, forgottn, cps1_10MHz, forgottn, cps1, ROT0, "Capcom", "Lost Worlds (Japan)", 0 ) | |
| 7425 | GAME( 1988, forgottn, 0, cps1_10MHz, forgottn, forgottn, ROT0, "Capcom", "Forgotten Worlds (US)", 0 ) | |
| 7426 | GAME( 1988, lostwrld, forgottn, cps1_10MHz, forgottn, forgottn, ROT0, "Capcom", "Lost Worlds (Japan)", 0 ) | |
| 7315 | 7427 | GAME( 1988, ghouls, 0, cps1_10MHz, ghouls, cps1, ROT0, "Capcom", "Ghouls'n Ghosts (World)" , 0) // Wed.26.10.1988 in the ROMS |
| 7316 | 7428 | GAME( 1988, ghoulsu, ghouls, cps1_10MHz, ghoulsu, cps1, ROT0, "Capcom", "Ghouls'n Ghosts (US)" , 0) // Wed.26.10.1988 in the ROMS |
| 7317 | 7429 | GAME( 1988, daimakai, ghouls, cps1_10MHz, daimakai, cps1, ROT0, "Capcom", "Dai Makai-Mura (Japan)" , 0) // Wed.26.10.1988 in the ROMS |
| r2454 | r2455 | |
| 7350 | 7462 | GAME( 1990, cawingj, cawing, cps1_10MHz, cawing, cps1, ROT0, "Capcom", "U.S. Navy (Japan 901012)", 0 ) |
| 7351 | 7463 | GAME( 1990, nemo, 0, cps1_10MHz, nemo, cps1, ROT0, "Capcom", "Nemo (World 901130)" , 0) // "ETC" |
| 7352 | 7464 | GAME( 1990, nemoj, nemo, cps1_10MHz, nemo, cps1, ROT0, "Capcom", "Nemo (Japan 901120)", 0 ) |
| 7353 | GAME( 1991, sf2, 0, cps1_12MHz, sf2, cps1, ROT0, "Capcom", "Street Fighter II - The World Warrior (World 910522)" , 0) // "ETC" | |
| 7354 | GAME( 1991, sf2eb, sf2, cps1_12MHz, sf2, cps1, ROT0, "Capcom", "Street Fighter II - The World Warrior (World 910214)" , 0) // "ETC" | |
| 7355 | GAME( 1991, sf2ua, sf2, cps1_12MHz, sf2, cps1, ROT0, "Capcom", "Street Fighter II - The World Warrior (US 910206)", 0 ) | |
| 7356 | GAME( 1991, sf2ub, sf2, cps1_12MHz, sf2, cps1, ROT0, "Capcom", "Street Fighter II - The World Warrior (US 910214)", 0 ) | |
| 7357 | GAME( 1991, sf2ud, sf2, cps1_12MHz, sf2, cps1, ROT0, "Capcom", "Street Fighter II - The World Warrior (US 910318)", 0 ) | |
| 7358 | GAME( 1991, sf2ue, sf2, cps1_12MHz, sf2, cps1, ROT0, "Capcom", "Street Fighter II - The World Warrior (US 910228)", 0 ) | |
| 7359 | GAME( 1991, sf2uf, sf2, cps1_12MHz, sf2, cps1, ROT0, "Capcom", "Street Fighter II - The World Warrior (US 910411)", 0 ) | |
| 7360 | GAME( 1991, sf2ui, sf2, cps1_12MHz, sf2, cps1, ROT0, "Capcom", "Street Fighter II - The World Warrior (US 910522)", 0 ) | |
| 7361 | GAME( 1991, sf2uk, sf2, cps1_12MHz, sf2, cps1, ROT0, "Capcom", "Street Fighter II - The World Warrior (US 911101)", 0 ) | |
| 7362 | GAME( 1991, sf2j, sf2, cps1_12MHz, sf2j, cps1, ROT0, "Capcom", "Street Fighter II - The World Warrior (Japan 911210)", 0 ) | |
| 7363 | GAME( 1991, sf2ja, sf2, cps1_12MHz, sf2j, cps1, ROT0, "Capcom", "Street Fighter II - The World Warrior (Japan 910214)", 0 ) | |
| 7364 | GAME( 1991, sf2jc, sf2, cps1_12MHz, sf2j, cps1, ROT0, "Capcom", "Street Fighter II - The World Warrior (Japan 910306)", 0 ) | |
| 7465 | GAME( 1991, sf2, 0, cps1_10MHz, sf2, cps1, ROT0, "Capcom", "Street Fighter II - The World Warrior (World 910522)" , 0) // "ETC" | |
| 7466 | GAME( 1991, sf2eb, sf2, cps1_10MHz, sf2, cps1, ROT0, "Capcom", "Street Fighter II - The World Warrior (World 910214)" , 0) // "ETC" | |
| 7467 | GAME( 1991, sf2ua, sf2, cps1_10MHz, sf2, cps1, ROT0, "Capcom", "Street Fighter II - The World Warrior (US 910206)", 0 ) | |
| 7468 | GAME( 1991, sf2ub, sf2, cps1_10MHz, sf2, cps1, ROT0, "Capcom", "Street Fighter II - The World Warrior (US 910214)", 0 ) | |
| 7469 | GAME( 1991, sf2ud, sf2, cps1_10MHz, sf2, cps1, ROT0, "Capcom", "Street Fighter II - The World Warrior (US 910318)", 0 ) | |
| 7470 | GAME( 1991, sf2ue, sf2, cps1_10MHz, sf2, cps1, ROT0, "Capcom", "Street Fighter II - The World Warrior (US 910228)", 0 ) | |
| 7471 | GAME( 1991, sf2uf, sf2, cps1_10MHz, sf2, cps1, ROT0, "Capcom", "Street Fighter II - The World Warrior (US 910411)", 0 ) | |
| 7472 | GAME( 1991, sf2ui, sf2, cps1_10MHz, sf2, cps1, ROT0, "Capcom", "Street Fighter II - The World Warrior (US 910522)", 0 ) | |
| 7473 | GAME( 1991, sf2uk, sf2, cps1_10MHz, sf2, cps1, ROT0, "Capcom", "Street Fighter II - The World Warrior (US 911101)", 0 ) | |
| 7474 | GAME( 1991, sf2j, sf2, cps1_10MHz, sf2j, cps1, ROT0, "Capcom", "Street Fighter II - The World Warrior (Japan 911210)", 0 ) | |
| 7475 | GAME( 1991, sf2ja, sf2, cps1_10MHz, sf2j, cps1, ROT0, "Capcom", "Street Fighter II - The World Warrior (Japan 910214)", 0 ) | |
| 7476 | GAME( 1991, sf2jc, sf2, cps1_10MHz, sf2j, cps1, ROT0, "Capcom", "Street Fighter II - The World Warrior (Japan 910306)", 0 ) | |
| 7365 | 7477 | GAME( 1991, 3wonders, 0, cps1_10MHz, 3wonders, cps1, ROT0, "Capcom", "Three Wonders (World 910520)" , 0) // "ETC" |
| 7366 | 7478 | GAME( 1991, 3wonderu, 3wonders, cps1_10MHz, 3wonders, cps1, ROT0, "Capcom", "Three Wonders (US 910520)", 0 ) |
| 7367 | 7479 | GAME( 1991, wonder3, 3wonders, cps1_10MHz, 3wonders, cps1, ROT0, "Capcom", "Wonder 3 (Japan 910520)", 0 ) |
| r2454 | r2455 | |
| 7394 | 7506 | GAME( 1992, sf2m7, sf2ce, cps1_12MHz, sf2, cps1, ROT0, "bootleg","Street Fighter II' - Champion Edition (M7)", 0 ) |
| 7395 | 7507 | GAME( 1992, sf2yyc, sf2ce, cps1_12MHz, sf2, cps1, ROT0, "bootleg","Street Fighter II' - Champion Edition (YYC)", 0 ) |
| 7396 | 7508 | GAME( 1992, sf2koryu, sf2ce, cps1_12MHz, sf2, cps1, ROT0, "bootleg","Street Fighter II' - Champion Edition (Kouryu)", 0 ) |
| 7397 | GAME( 1992, varth, 0, cps1_10MHz, varth, cps1, ROT270, "Capcom", "Varth - Operation Thunderstorm (World 920714)" , 0) // "ETC" | |
| 7398 | GAME( 1992, varthr1, varth, cps1_10MHz, varth, cps1, ROT270, "Capcom", "Varth - Operation Thunderstorm (World 920612)" , 0) // "ETC" | |
| 7399 | GAME( 1992, varthu, varth, cps1_10MHz, varth, cps1, ROT270, "Capcom (Romstar license)", "Varth - Operation Thunderstorm (US 920612)", 0 ) | |
| 7400 | GAME( 1992, varthj, varth, cps1_10MHz, varth, cps1, ROT270, "Capcom", "Varth - Operation Thunderstorm (Japan 920714)", 0 ) | |
| 7509 | GAME( 1992, varth, 0, cps1_12MHz, varth, cps1, ROT270, "Capcom", "Varth - Operation Thunderstorm (World 920714)" , 0) // "ETC" 12MHz not verified but game slows down at 10MHz | |
| 7510 | GAME( 1992, varthr1, varth, cps1_12MHz, varth, cps1, ROT270, "Capcom", "Varth - Operation Thunderstorm (World 920612)" , 0) // "ETC" | |
| 7511 | GAME( 1992, varthu, varth, cps1_12MHz, varth, cps1, ROT270, "Capcom (Romstar license)", "Varth - Operation Thunderstorm (US 920612)", 0 ) | |
| 7512 | GAME( 1992, varthj, varth, cps1_12MHz, varth, cps1, ROT270, "Capcom", "Varth - Operation Thunderstorm (Japan 920714)", 0 ) | |
| 7401 | 7513 | GAME( 1992, cworld2j, 0, cps1_10MHz, cworld2j, cps1, ROT0, "Capcom", "Capcom World 2 (Japan 920611)", 0 ) |
| 7402 | 7514 | GAME( 1992, sf2hf, sf2ce, cps1_12MHz, sf2, cps1, ROT0, "Capcom", "Street Fighter II' - Hyper Fighting (World 921209)", 0 ) |
| 7403 | 7515 | GAME( 1992, sf2t, sf2ce, cps1_12MHz, sf2, cps1, ROT0, "Capcom", "Street Fighter II' - Hyper Fighting (US 921209)", 0 ) |
| r2454 | r2455 | |
| 7421 | 7533 | GAME( 1993, slammast, 0, qsound, slammast, slammast, ROT0, "Capcom", "Saturday Night Slam Masters (World 930713)" , 0) // "ETC" |
| 7422 | 7534 | GAME( 1993, slammasu, slammast, qsound, slammast, slammast, ROT0, "Capcom", "Saturday Night Slam Masters (US 930713)", 0 ) |
| 7423 | 7535 | GAME( 1993, mbomberj, slammast, qsound, slammast, slammast, ROT0, "Capcom", "Muscle Bomber - The Body Explosion (Japan 930713)", 0 ) |
| 7424 | GAME( 1993, mbombrd, slammast, qsound, slammast, slammast, ROT0, "Capcom", "Muscle Bomber Duo - Ultimate Team Battle (World 931206)" , 0) // "ETC" | |
| 7425 | GAME( 1993, mbombrdj, slammast, qsound, slammast, slammast, ROT0, "Capcom", "Muscle Bomber Duo - Heat Up Warriors (Japan 931206)", 0 ) | |
| 7536 | GAME( 1993, mbombrd, 0, qsound, slammast, slammast, ROT0, "Capcom", "Muscle Bomber Duo - Ultimate Team Battle (World 931206)" , 0) // "ETC" | |
| 7537 | GAME( 1993, mbombrdj, mbombrd, qsound, slammast, slammast, ROT0, "Capcom", "Muscle Bomber Duo - Heat Up Warriors (Japan 931206)", 0 ) | |
| 7426 | 7538 | |
| 7427 | 7539 | GAME( 1994, pnickj, 0, cps1_10MHz, pnickj, cps1, ROT0, "Compile (Capcom license)", "Pnickies (Japan 940608)", 0 ) |
| 7428 | 7540 | /* Japanese version of Pang 3 is encrypted, Euro version is not */ |
| r2454 | r2455 | |
|---|---|---|
| 653 | 653 | |
| 654 | 654 | static const struct AY8910interface nova2001_ay8910_interface_1 = |
| 655 | 655 | { |
| 656 | 0, | |
| 657 | 0, | |
| 656 | AY8910_LEGACY_OUTPUT, | |
| 657 | AY8910_DEFAULT_LOADS, | |
| 658 | NULL, | |
| 659 | NULL, | |
| 658 | 660 | nova2001_scroll_x_w, |
| 659 | 661 | nova2001_scroll_y_w |
| 660 | 662 | }; |
| 661 | 663 | |
| 662 | 664 | static const struct AY8910interface nova2001_ay8910_interface_2 = |
| 663 | 665 | { |
| 666 | AY8910_LEGACY_OUTPUT, | |
| 667 | AY8910_DEFAULT_LOADS, | |
| 664 | 668 | input_port_3_r, |
| 665 | input_port_4_r | |
| 669 | input_port_4_r, | |
| 670 | NULL, | |
| 671 | NULL | |
| 666 | 672 | }; |
| 667 | 673 | |
| 668 | 674 | static const struct AY8910interface pkunwar_ay8910_interface_1 = |
| 669 | 675 | { |
| 676 | AY8910_LEGACY_OUTPUT, | |
| 677 | AY8910_DEFAULT_LOADS, | |
| 670 | 678 | input_port_0_r, |
| 671 | input_port_1_r | |
| 679 | input_port_1_r, | |
| 680 | NULL, | |
| 681 | NULL | |
| 672 | 682 | }; |
| 673 | 683 | |
| 674 | 684 | static const struct AY8910interface pkunwar_ay8910_interface_2 = |
| 675 | 685 | { |
| 686 | AY8910_LEGACY_OUTPUT, | |
| 687 | AY8910_DEFAULT_LOADS, | |
| 676 | 688 | input_port_2_r, |
| 677 | input_port_3_r | |
| 689 | input_port_3_r, | |
| 690 | NULL, | |
| 691 | NULL | |
| 678 | 692 | }; |
| 679 | 693 | |
| 680 | 694 |
| r2454 | r2455 | |
|---|---|---|
| 84 | 84 | |
| 85 | 85 | static const struct AY8910interface hustler_ay8910_interface = |
| 86 | 86 | { |
| 87 | AY8910_LEGACY_OUTPUT, | |
| 88 | AY8910_DEFAULT_LOADS, | |
| 87 | 89 | soundlatch_r, |
| 88 | frogger_portB_r | |
| 90 | frogger_portB_r, | |
| 91 | NULL, | |
| 92 | NULL | |
| 89 | 93 | }; |
| 90 | 94 | |
| 91 | static READ8_HANDLER(scobra_type2_ppi8255 | |
| 95 | static READ8_DEVICE_HANDLER(scobra_type2_ppi8255 | |
| 92 | 96 | { |
| 93 | return ppi8255_ | |
| 97 | return ppi8255_ | |
| 94 | 98 | } |
| 95 | 99 | |
| 96 | static RE | |
| 100 | static WRITE | |
| 97 | 101 | { |
| 98 | | |
| 102 | | |
| 99 | 103 | } |
| 100 | 104 | |
| 101 | static | |
| 105 | static | |
| 102 | 106 | { |
| 103 | ppi8255_ | |
| 107 | return ppi8255_r | |
| 104 | 108 | } |
| 105 | 109 | |
| 106 | static WRITE8_HANDLER(s | |
| 110 | static WRITE8_DEVICE_HANDLER(hus | |
| 107 | 111 | { |
| 108 | ppi8255_ | |
| 112 | ppi8255_ | |
| 109 | 113 | } |
| 110 | 114 | |
| 111 | static READ8_HANDLER(hustler_ppi8255_0_r) | |
| 112 | { | |
| 113 | return ppi8255_0_r(machine, offset >> 3); | |
| 114 | } | |
| 115 | ||
| 116 | static READ8_HANDLER(hustler_ppi8255_1_r) | |
| 117 | { | |
| 118 | return ppi8255_1_r(machine, offset >> 3); | |
| 119 | } | |
| 120 | ||
| 121 | static WRITE8_HANDLER(hustler_ppi8255_0_w) | |
| 122 | { | |
| 123 | ppi8255_0_w(machine, offset >> 3, data); | |
| 124 | } | |
| 125 | ||
| 126 | static WRITE8_HANDLER(hustler_ppi8255_1_w) | |
| 127 | { | |
| 128 | ppi8255_1_w(machine, offset >> 3, data); | |
| 129 | } | |
| 130 | ||
| 131 | 115 | static ADDRESS_MAP_START( type1_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 132 | 116 | AM_RANGE(0x0000, 0x7fff) AM_READ(SMH_ROM) |
| 133 | 117 | AM_RANGE(0x8000, 0x8bff) AM_READ(SMH_RAM) |
| 134 | 118 | AM_RANGE(0x8c00, 0x8fff) AM_READ(galaxold_videoram_r) /* mirror */ |
| 135 | 119 | AM_RANGE(0x9000, 0x90ff) AM_READ(SMH_RAM) |
| 136 | AM_RANGE(0x9800, 0x9803) AM_READ(ppi8255_0_r) | |
| 137 | AM_RANGE(0xa000, 0xa003) AM_READ(ppi8255_1_r) | |
| 120 | AM_RANGE(0x9800, 0x9803) AM_DEVREAD(PPI8255, "ppi8255_0", ppi8255_r) | |
| 121 | AM_RANGE(0xa000, 0xa003) AM_DEVREAD(PPI8255, "ppi8255_1", ppi8255_r) | |
| 138 | 122 | AM_RANGE(0xb000, 0xb000) AM_READ(watchdog_reset_r) |
| 139 | 123 | ADDRESS_MAP_END |
| 140 | 124 | |
| r2454 | r2455 | |
| 147 | 131 | AM_RANGE(0x9040, 0x905f) AM_WRITE(SMH_RAM) AM_BASE(&galaxold_spriteram) AM_SIZE(&galaxold_spriteram_size) |
| 148 | 132 | AM_RANGE(0x9060, 0x907f) AM_WRITE(SMH_RAM) AM_BASE(&galaxold_bulletsram) AM_SIZE(&galaxold_bulletsram_size) |
| 149 | 133 | AM_RANGE(0x9080, 0x90ff) AM_WRITE(SMH_RAM) |
| 150 | AM_RANGE(0x9800, 0x9803) AM_WRITE(ppi8255_0_w) | |
| 151 | AM_RANGE(0xa000, 0xa003) AM_WRITE(ppi8255_1_w) | |
| 134 | AM_RANGE(0x9800, 0x9803) AM_DEVWRITE(PPI8255, "ppi8255_0", ppi8255_w) | |
| 135 | AM_RANGE(0xa000, 0xa003) AM_DEVWRITE(PPI8255, "ppi8255_1", ppi8255_w) | |
| 152 | 136 | AM_RANGE(0xa801, 0xa801) AM_WRITE(galaxold_nmi_enable_w) |
| 153 | 137 | AM_RANGE(0xa802, 0xa802) AM_WRITE(galaxold_coin_counter_w) |
| 154 | 138 | AM_RANGE(0xa804, 0xa804) AM_WRITE(galaxold_stars_enable_w) |
| r2454 | r2455 | |
| 162 | 146 | AM_RANGE(0x9000, 0x93ff) AM_READ(SMH_RAM) |
| 163 | 147 | AM_RANGE(0x9400, 0x97ff) AM_READ(galaxold_videoram_r) /* mirror */ |
| 164 | 148 | AM_RANGE(0x9800, 0x9800) AM_READ(watchdog_reset_r) |
| 165 | AM_RANGE(0xa000, 0xa00f) AM_READ(scobra_type2_ppi8255_0_r) | |
| 166 | AM_RANGE(0xa800, 0xa80f) AM_READ(scobra_type2_ppi8255_1_r) | |
| 149 | AM_RANGE(0xa000, 0xa00f) AM_DEVREAD(PPI8255, "ppi8255_0", scobra_type2_ppi8255_r) | |
| 150 | AM_RANGE(0xa800, 0xa80f) AM_DEVREAD(PPI8255, "ppi8255_1", scobra_type2_ppi8255_r) | |
| 167 | 151 | ADDRESS_MAP_END |
| 168 | 152 | |
| 169 | 153 | static ADDRESS_MAP_START( type2_writemem, ADDRESS_SPACE_PROGRAM, 8 ) |
| r2454 | r2455 | |
| 175 | 159 | AM_RANGE(0x8880, 0x88ff) AM_WRITE(SMH_RAM) |
| 176 | 160 | AM_RANGE(0x9000, 0x93ff) AM_WRITE(galaxold_videoram_w) AM_BASE(&galaxold_videoram) |
| 177 | 161 | AM_RANGE(0x9400, 0x97ff) AM_WRITE(galaxold_videoram_w) /* mirror */ |
| 178 | AM_RANGE(0xa000, 0xa00f) AM_WRITE(scobra_type2_ppi8255_0_w) | |
| 179 | AM_RANGE(0xa800, 0xa80f) AM_WRITE(scobra_type2_ppi8255_1_w) | |
| 162 | AM_RANGE(0xa000, 0xa00f) AM_DEVWRITE(PPI8255, "ppi8255_0", scobra_type2_ppi8255_w) | |
| 163 | AM_RANGE(0xa800, 0xa80f) AM_DEVWRITE(PPI8255, "ppi8255_1", scobra_type2_ppi8255_w) | |
| 180 | 164 | AM_RANGE(0xb000, 0xb000) AM_WRITE(galaxold_stars_enable_w) |
| 181 | 165 | AM_RANGE(0xb004, 0xb004) AM_WRITE(galaxold_nmi_enable_w) |
| 182 | 166 | AM_RANGE(0xb006, 0xb006) AM_WRITE(galaxold_coin_counter_0_w) |
| r2454 | r2455 | |
| 190 | 174 | AM_RANGE(0x8000, 0x8bff) AM_READ(SMH_RAM) |
| 191 | 175 | AM_RANGE(0x9000, 0x90ff) AM_READ(SMH_RAM) |
| 192 | 176 | AM_RANGE(0xb800, 0xb800) AM_READ(watchdog_reset_r) |
| 193 | AM_RANGE(0xd000, 0xd01f) AM_READ(hustler_ppi8255_0_r) | |
| 194 | AM_RANGE(0xe000, 0xe01f) AM_READ(hustler_ppi8255_1_r) | |
| 177 | AM_RANGE(0xd000, 0xd01f) AM_DEVREAD(PPI8255, "ppi8255_0", hustler_ppi8255_r) | |
| 178 | AM_RANGE(0xe000, 0xe01f) AM_DEVREAD(PPI8255, "ppi8255_1", hustler_ppi8255_r) | |
| 195 | 179 | ADDRESS_MAP_END |
| 196 | 180 | |
| 197 | 181 | static ADDRESS_MAP_START( hustler_writemem, ADDRESS_SPACE_PROGRAM, 8 ) |
| r2454 | r2455 | |
| 206 | 190 | AM_RANGE(0xa804, 0xa804) AM_WRITE(galaxold_nmi_enable_w) |
| 207 | 191 | AM_RANGE(0xa806, 0xa806) AM_WRITE(galaxold_flip_screen_y_w) |
| 208 | 192 | AM_RANGE(0xa80e, 0xa80e) AM_WRITE(SMH_NOP) /* coin counters */ |
| 209 | AM_RANGE(0xd000, 0xd01f) AM_WRITE(hustler_ppi8255_0_w) | |
| 210 | AM_RANGE(0xe000, 0xe01f) AM_WRITE(hustler_ppi8255_1_w) | |
| 193 | AM_RANGE(0xd000, 0xd01f) AM_DEVWRITE(PPI8255, "ppi8255_0", hustler_ppi8255_w) | |
| 194 | AM_RANGE(0xe000, 0xe01f) AM_DEVWRITE(PPI8255, "ppi8255_1", hustler_ppi8255_w) | |
| 211 | 195 | ADDRESS_MAP_END |
| 212 | 196 | |
| 213 | 197 | static ADDRESS_MAP_START( hustlerb_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| r2454 | r2455 | |
| 215 | 199 | AM_RANGE(0x8000, 0x8bff) AM_READ(SMH_RAM) |
| 216 | 200 | AM_RANGE(0x9000, 0x90ff) AM_READ(SMH_RAM) |
| 217 | 201 | AM_RANGE(0xb000, 0xb000) AM_READ(watchdog_reset_r) |
| 218 | AM_RANGE(0xc100, 0xc103) AM_READ(ppi8255_0_r) | |
| 219 | AM_RANGE(0xc200, 0xc203) AM_READ(ppi8255_1_r) | |
| 202 | AM_RANGE(0xc100, 0xc103) AM_DEVREAD(PPI8255, "ppi8255_0", ppi8255_r) | |
| 203 | AM_RANGE(0xc200, 0xc203) AM_DEVREAD(PPI8255, "ppi8255_1", ppi8255_r) | |
| 220 | 204 | ADDRESS_MAP_END |
| 221 | 205 | |
| 222 | 206 | static ADDRESS_MAP_START( hustlerb_writemem, ADDRESS_SPACE_PROGRAM, 8 ) |
| r2454 | r2455 | |
| 231 | 215 | AM_RANGE(0xa802, 0xa802) AM_WRITE(SMH_NOP) /* coin counters */ |
| 232 | 216 | AM_RANGE(0xa806, 0xa806) AM_WRITE(galaxold_flip_screen_y_w) |
| 233 | 217 | AM_RANGE(0xa807, 0xa807) AM_WRITE(galaxold_flip_screen_x_w) |
| 234 | AM_RANGE(0xc100, 0xc103) AM_WRITE(ppi8255_0_w) | |
| 235 | AM_RANGE(0xc200, 0xc203) AM_WRITE(ppi8255_1_w) | |
| 218 | AM_RANGE(0xc100, 0xc103) AM_DEVWRITE(PPI8255, "ppi8255_0", ppi8255_w) | |
| 219 | AM_RANGE(0xc200, 0xc203) AM_DEVWRITE(PPI8255, "ppi8255_1", ppi8255_w) | |
| 236 | 220 | ADDRESS_MAP_END |
| 237 | 221 | |
| 238 | 222 | static ADDRESS_MAP_START( mimonkey_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| r2454 | r2455 | |
| 240 | 224 | AM_RANGE(0x8000, 0x8bff) AM_READ(SMH_RAM) |
| 241 | 225 | AM_RANGE(0x8c00, 0x8fff) AM_READ(galaxold_videoram_r) /* mirror */ |
| 242 | 226 | AM_RANGE(0x9000, 0x90ff) AM_READ(SMH_RAM) |
| 243 | AM_RANGE(0x9800, 0x9803) AM_READ(ppi8255_0_r) | |
| 244 | AM_RANGE(0xa000, 0xa003) AM_READ(ppi8255_1_r) | |
| 227 | AM_RANGE(0x9800, 0x9803) AM_DEVREAD(PPI8255, "ppi8255_0", ppi8255_r) | |
| 228 | AM_RANGE(0xa000, 0xa003) AM_DEVREAD(PPI8255, "ppi8255_1", ppi8255_r) | |
| 245 | 229 | AM_RANGE(0xb000, 0xb000) AM_READ(watchdog_reset_r) |
| 246 | 230 | AM_RANGE(0xc000, 0xffff) AM_READ(SMH_ROM) |
| 247 | 231 | ADDRESS_MAP_END |
| r2454 | r2455 | |
| 255 | 239 | AM_RANGE(0x9040, 0x905f) AM_WRITE(SMH_RAM) AM_BASE(&galaxold_spriteram) AM_SIZE(&galaxold_spriteram_size) |
| 256 | 240 | AM_RANGE(0x9060, 0x907f) AM_WRITE(SMH_RAM) AM_BASE(&galaxold_bulletsram) AM_SIZE(&galaxold_bulletsram_size) |
| 257 | 241 | AM_RANGE(0x9080, 0x90ff) AM_WRITE(SMH_RAM) |
| 258 | AM_RANGE(0x9800, 0x9803) AM_WRITE(ppi8255_0_w) | |
| 259 | AM_RANGE(0xa000, 0xa003) AM_WRITE(ppi8255_1_w) | |
| 242 | AM_RANGE(0x9800, 0x9803) AM_DEVWRITE(PPI8255, "ppi8255_0", ppi8255_w) | |
| 243 | AM_RANGE(0xa000, 0xa003) AM_DEVWRITE(PPI8255, "ppi8255_1", ppi8255_w) | |
| 260 | 244 | AM_RANGE(0xa801, 0xa801) AM_WRITE(galaxold_nmi_enable_w) |
| 261 | 245 | AM_RANGE(0xa800, 0xa802) AM_WRITE(galaxold_gfxbank_w) |
| 262 | 246 | AM_RANGE(0xa806, 0xa806) AM_WRITE(galaxold_flip_screen_x_w) |
| r2454 | r2455 | |
| 265 | 249 | ADDRESS_MAP_END |
| 266 | 250 | |
| 267 | 251 | |
| 268 | static READ8_HANDLER( anteatg_ppi8255_0_reg0_r ) | |
| 252 | static READ8_DEVICE_HANDLER( anteatg_ppi8255_0_reg0_r ) | |
| 269 | 253 | { |
| 270 | return ppi8255_ | |
| 254 | return ppi8255_ | |
| 271 | 255 | } |
| 272 | 256 | |
| 273 | static READ8_HANDLER( anteatg_ppi8255_0_reg1_r ) | |
| 257 | static READ8_DEVICE_HANDLER( anteatg_ppi8255_0_reg1_r ) | |
| 274 | 258 | { |
| 275 | return ppi8255_ | |
| 259 | return ppi8255_ | |
| 276 | 260 | } |
| 277 | 261 | |
| 278 | static READ8_HANDLER( anteatg_ppi8255_0_reg2_r ) | |
| 262 | static READ8_DEVICE_HANDLER( anteatg_ppi8255_0_reg2_r ) | |
| 279 | 263 | { |
| 280 | return ppi8255_ | |
| 264 | return ppi8255_ | |
| 281 | 265 | } |
| 282 | 266 | |
| 283 | static READ8_HANDLER( anteatg_ppi8255_0_reg3_r ) | |
| 267 | static READ8_DEVICE_HANDLER( anteatg_ppi8255_0_reg3_r ) | |
| 284 | 268 | { |
| 285 | return ppi8255_ | |
| 269 | return ppi8255_ | |
| 286 | 270 | } |
| 287 | 271 | |
| 288 | static WRITE8_HANDLER( anteatg_ppi8255_0_reg0_w ) | |
| 272 | static WRITE8_DEVICE_HANDLER( anteatg_ppi8255_0_reg0_w ) | |
| 289 | 273 | { |
| 290 | ppi8255_ | |
| 274 | ppi8255_ | |
| 291 | 275 | } |
| 292 | 276 | |
| 293 | static WRITE8_HANDLER( anteatg_ppi8255_0_reg1_w ) | |
| 277 | static WRITE8_DEVICE_HANDLER( anteatg_ppi8255_0_reg1_w ) | |
| 294 | 278 | { |
| 295 | ppi8255_ | |
| 279 | ppi8255_ | |
| 296 | 280 | } |
| 297 | 281 | |
| 298 | static WRITE8_HANDLER( anteatg_ppi8255_0_reg2_w ) | |
| 282 | static WRITE8_DEVICE_HANDLER( anteatg_ppi8255_0_reg2_w ) | |
| 299 | 283 | { |
| 300 | ppi8255_ | |
| 284 | ppi8255_ | |
| 301 | 285 | } |
| 302 | 286 | |
| 303 | static WRITE8_HANDLER( anteatg_ppi8255_0_reg3_w ) | |
| 287 | static WRITE8_DEVICE_HANDLER( anteatg_ppi8255_0_reg3_w ) | |
| 304 | 288 | { |
| 305 | ppi8255_ | |
| 289 | ppi8255_ | |
| 306 | 290 | } |
| 307 | 291 | |
| 308 | static WRITE8_HANDLER( anteatg_ppi8255_1_reg0_w ) | |
| 292 | static WRITE8_DEVICE_HANDLER( anteatg_ppi8255_1_reg0_w ) | |
| 309 | 293 | { |
| 310 | ppi8255_ | |
| 294 | ppi8255_ | |
| 311 | 295 | } |
| 312 | 296 | |
| 313 | static WRITE8_HANDLER( anteatg_ppi8255_1_reg1_w ) | |
| 297 | static WRITE8_DEVICE_HANDLER( anteatg_ppi8255_1_reg1_w ) | |
| 314 | 298 | { |
| 315 | ppi8255_ | |
| 299 | ppi8255_ | |
| 316 | 300 | } |
| 317 | 301 | |
| 318 | static WRITE8_HANDLER( anteatg_ppi8255_1_reg3_w ) | |
| 302 | static WRITE8_DEVICE_HANDLER( anteatg_ppi8255_1_reg3_w ) | |
| 319 | 303 | { |
| 320 | ppi8255_ | |
| 304 | ppi8255_ | |
| 321 | 305 | } |
| 322 | 306 | |
| 323 | 307 | static ADDRESS_MAP_START( anteatg_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| r2454 | r2455 | |
| 330 | 314 | AM_RANGE(0x8300, 0x98ff) AM_READ(SMH_ROM) |
| 331 | 315 | AM_RANGE(0xa300, 0xa7ff) AM_READ(SMH_ROM) |
| 332 | 316 | AM_RANGE(0xf521, 0xf521) AM_READ(watchdog_reset_r) |
| 333 | AM_RANGE(0xf612, 0xf612) AM_READ(anteatg_ppi8255_0_reg0_r) | |
| 334 | AM_RANGE(0xf631, 0xf631) AM_READ(anteatg_ppi8255_0_reg1_r) | |
| 335 | AM_RANGE(0xf710, 0xf710) AM_READ(anteatg_ppi8255_0_reg2_r) | |
| 336 | AM_RANGE(0xf753, 0xf753) AM_READ(anteatg_ppi8255_0_reg3_r) | |
| 317 | AM_RANGE(0xf612, 0xf612) AM_DEVREAD(PPI8255, "ppi8255_0", anteatg_ppi8255_0_reg0_r) | |
| 318 | AM_RANGE(0xf631, 0xf631) AM_DEVREAD(PPI8255, "ppi8255_0", anteatg_ppi8255_0_reg1_r) | |
| 319 | AM_RANGE(0xf710, 0xf710) AM_DEVREAD(PPI8255, "ppi8255_0", anteatg_ppi8255_0_reg2_r) | |
| 320 | AM_RANGE(0xf753, 0xf753) AM_DEVREAD(PPI8255, "ppi8255_0", anteatg_ppi8255_0_reg3_r) | |
| 337 | 321 | ADDRESS_MAP_END |
| 338 | 322 | |
| 339 | 323 | static ADDRESS_MAP_START( anteatg_writemem, ADDRESS_SPACE_PROGRAM, 8 ) |
| r2454 | r2455 | |
| 344 | 328 | AM_RANGE(0x2040, 0x205f) AM_WRITE(SMH_RAM) AM_BASE(&galaxold_spriteram) AM_SIZE(&galaxold_spriteram_size) |
| 345 | 329 | AM_RANGE(0x2060, 0x207f) AM_WRITE(SMH_RAM) AM_BASE(&galaxold_bulletsram) AM_SIZE(&galaxold_bulletsram_size) |
| 346 | 330 | AM_RANGE(0x2080, 0x20ff) AM_WRITE(SMH_RAM) |
| 347 | AM_RANGE(0x2423, 0x2423) AM_WRITE(anteatg_ppi8255_1_reg3_w) | |
| 348 | AM_RANGE(0x2450, 0x2450) AM_WRITE(anteatg_ppi8255_1_reg0_w) | |
| 349 | AM_RANGE(0x2511, 0x2511) AM_WRITE(anteatg_ppi8255_1_reg1_w) | |
| 331 | AM_RANGE(0x2423, 0x2423) AM_DEVWRITE(PPI8255, "ppi8255_1", anteatg_ppi8255_1_reg3_w) | |
| 332 | AM_RANGE(0x2450, 0x2450) AM_DEVWRITE(PPI8255, "ppi8255_1", anteatg_ppi8255_1_reg0_w) | |
| 333 | AM_RANGE(0x2511, 0x2511) AM_DEVWRITE(PPI8255, "ppi8255_1", anteatg_ppi8255_1_reg1_w) | |
| 350 | 334 | AM_RANGE(0x2621, 0x2621) AM_WRITE(galaxold_nmi_enable_w) |
| 351 | 335 | AM_RANGE(0x2624, 0x2624) AM_WRITE(galaxold_stars_enable_w) |
| 352 | 336 | AM_RANGE(0x2647, 0x2647) AM_WRITE(galaxold_flip_screen_y_w) |
| r2454 | r2455 | |
| 358 | 342 | AM_RANGE(0x7c00, 0x7fff) AM_WRITE(galaxold_videoram_w) /* mirror */ |
| 359 | 343 | AM_RANGE(0x8300, 0x98ff) AM_WRITE(SMH_ROM) |
| 360 | 344 | AM_RANGE(0xa300, 0xa7ff) AM_WRITE(SMH_ROM) |
| 361 | AM_RANGE(0xf612, 0xf612) AM_WRITE(anteatg_ppi8255_0_reg0_w) | |
| 362 | AM_RANGE(0xf631, 0xf631) AM_WRITE(anteatg_ppi8255_0_reg1_w) | |
| 363 | AM_RANGE(0xf710, 0xf710) AM_WRITE(anteatg_ppi8255_0_reg2_w) | |
| 364 | AM_RANGE(0xf753, 0xf753) AM_WRITE(anteatg_ppi8255_0_reg3_w) | |
| 345 | AM_RANGE(0xf612, 0xf612) AM_DEVWRITE(PPI8255, "ppi8255_0", anteatg_ppi8255_0_reg0_w) | |
| 346 | AM_RANGE(0xf631, 0xf631) AM_DEVWRITE(PPI8255, "ppi8255_0", anteatg_ppi8255_0_reg1_w) | |
| 347 | AM_RANGE(0xf710, 0xf710) AM_DEVWRITE(PPI8255, "ppi8255_0", anteatg_ppi8255_0_reg2_w) | |
| 348 | AM_RANGE(0xf753, 0xf753) AM_DEVWRITE(PPI8255, "ppi8255_0", anteatg_ppi8255_0_reg3_w) | |
| 365 | 349 | ADDRESS_MAP_END |
| 366 | 350 | |
| 367 | 351 | static ADDRESS_MAP_START( anteatgb_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| r2454 | r2455 | |
| 373 | 357 | AM_RANGE(0x6400, 0x7aff) AM_READ(SMH_ROM) |
| 374 | 358 | AM_RANGE(0x8300, 0x98ff) AM_READ(SMH_ROM) |
| 375 | 359 | AM_RANGE(0xa300, 0xa7ff) AM_READ(SMH_ROM) |
| 376 | AM_RANGE(0xf300, 0xf303) AM_READ(ppi8255_0_r) | |
| 377 | AM_RANGE(0xfe00, 0xfe03) AM_READ(ppi8255_1_r) | |
| 360 | AM_RANGE(0xf300, 0xf303) AM_DEVREAD(PPI8255, "ppi8255_0", ppi8255_r) | |
| 361 | AM_RANGE(0xfe00, 0xfe03) AM_DEVREAD(PPI8255, "ppi8255_1", ppi8255_r) | |
| 378 | 362 | ADDRESS_MAP_END |
| 379 | 363 | |
| 380 | 364 | static ADDRESS_MAP_START( anteatgb_writemem, ADDRESS_SPACE_PROGRAM, 8 ) |
| r2454 | r2455 | |
| 395 | 379 | AM_RANGE(0x6400, 0x7aff) AM_WRITE(SMH_ROM) |
| 396 | 380 | AM_RANGE(0x8300, 0x98ff) AM_WRITE(SMH_ROM) |
| 397 | 381 | AM_RANGE(0xa300, 0xa7ff) AM_WRITE(SMH_ROM) |
| 398 | AM_RANGE(0xf300, 0xf303) AM_WRITE(ppi8255_0_w) | |
| 399 | AM_RANGE(0xfe00, 0xfe03) AM_WRITE(ppi8255_1_w) | |
| 382 | AM_RANGE(0xf300, 0xf303) AM_DEVWRITE(PPI8255, "ppi8255_0", ppi8255_w) | |
| 383 | AM_RANGE(0xfe00, 0xfe03) AM_DEVWRITE(PPI8255, "ppi8255_1", ppi8255_w) | |
| 400 | 384 | ADDRESS_MAP_END |
| 401 | 385 | |
| 402 | 386 | static UINT8 *scobra_soundram; |
| r2454 | r2455 | |
| 1375 | 1359 | |
| 1376 | 1360 | static const struct AY8910interface scobra_ay8910_interface_2 = |
| 1377 | 1361 | { |
| 1362 | AY8910_LEGACY_OUTPUT, | |
| 1363 | AY8910_DEFAULT_LOADS, | |
| 1378 | 1364 | soundlatch_r, |
| 1379 | scramble_portB_r | |
| 1365 | scramble_portB_r, | |
| 1366 | NULL, | |
| 1367 | NULL | |
| 1380 | 1368 | }; |
| 1381 | 1369 | |
| 1382 | 1370 | |
| r2454 | r2455 | |
| 1393 | 1381 | |
| 1394 | 1382 | MDRV_MACHINE_RESET(scramble) |
| 1395 | 1383 | |
| 1384 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 1385 | MDRV_DEVICE_CONFIG( scramble_ppi_ppi8255_intf[0] ) | |
| 1386 | ||
| 1387 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 1388 | MDRV_DEVICE_CONFIG( scramble_ppi_ppi8255_intf[1] ) | |
| 1389 | ||
| 1396 | 1390 | /* video hardware */ |
| 1397 | 1391 | MDRV_SCREEN_ADD("main", RASTER) |
| 1398 | 1392 | MDRV_SCREEN_REFRESH_RATE(16000.0/132/2) |
| r2454 | r2455 | |
| 1419 | 1413 | MACHINE_DRIVER_END |
| 1420 | 1414 | |
| 1421 | 1415 | |
| 1416 | static MACHINE_DRIVER_START( superbon ) | |
| 1417 | /* basic machine hardware */ | |
| 1418 | MDRV_IMPORT_FROM(type1) | |
| 1419 | ||
| 1420 | /* device config overrides */ | |
| 1421 | MDRV_DEVICE_MODIFY( "ppi8255_0", PPI8255 ) | |
| 1422 | MDRV_DEVICE_CONFIG( scramble_ppi8255_intf[0] ) | |
| 1423 | ||
| 1424 | MDRV_DEVICE_MODIFY( "ppi8255_1", PPI8255 ) | |
| 1425 | MDRV_DEVICE_CONFIG( scramble_ppi8255_intf[1] ) | |
| 1426 | MACHINE_DRIVER_END | |
| 1427 | ||
| 1422 | 1428 | /* same as regular type 1, the only difference that it has long bullets */ |
| 1423 | 1429 | static MACHINE_DRIVER_START( armorcar ) |
| 1424 | 1430 | |
| r2454 | r2455 | |
| 1439 | 1445 | /* basic machine hardware */ |
| 1440 | 1446 | MDRV_IMPORT_FROM(type1) |
| 1441 | 1447 | |
| 1448 | /* device config overrides */ | |
| 1449 | MDRV_DEVICE_MODIFY( "ppi8255_0", PPI8255 ) | |
| 1450 | MDRV_DEVICE_CONFIG( moonwar_ppi8255_intf[0] ) | |
| 1451 | ||
| 1452 | MDRV_DEVICE_MODIFY( "ppi8255_1", PPI8255 ) | |
| 1453 | MDRV_DEVICE_CONFIG( moonwar_ppi8255_intf[1] ) | |
| 1454 | ||
| 1442 | 1455 | /* video hardware */ |
| 1443 | 1456 | MDRV_PALETTE_LENGTH(32+64+2+1) /* 32 for characters, 64 for stars, 2 for bullets, 1 for bg */ |
| 1444 | 1457 | |
| r2454 | r2455 | |
| 1516 | 1529 | /* basic machine hardware */ |
| 1517 | 1530 | MDRV_IMPORT_FROM(type2) |
| 1518 | 1531 | |
| 1532 | /* device config overrides */ | |
| 1533 | MDRV_DEVICE_MODIFY( "ppi8255_0", PPI8255 ) | |
| 1534 | MDRV_DEVICE_CONFIG( stratgyx_ppi8255_intf[0] ) | |
| 1535 | ||
| 1536 | MDRV_DEVICE_MODIFY( "ppi8255_1", PPI8255 ) | |
| 1537 | MDRV_DEVICE_CONFIG( stratgyx_ppi8255_intf[1] ) | |
| 1538 | ||
| 1519 | 1539 | /* video hardware */ |
| 1520 | 1540 | MDRV_PALETTE_LENGTH(32+64+2+8) /* 32 for characters, 64 for stars, 2 for bullets, 8 for background */ |
| 1521 | 1541 | |
| r2454 | r2455 | |
| 1529 | 1549 | /* basic machine hardware */ |
| 1530 | 1550 | MDRV_IMPORT_FROM(type2) |
| 1531 | 1551 | |
| 1552 | /* device config overrides */ | |
| 1553 | MDRV_DEVICE_MODIFY( "ppi8255_0", PPI8255 ) | |
| 1554 | MDRV_DEVICE_CONFIG( darkplnt_ppi8255_intf[0] ) | |
| 1555 | ||
| 1556 | MDRV_DEVICE_MODIFY( "ppi8255_1", PPI8255 ) | |
| 1557 | MDRV_DEVICE_CONFIG( darkplnt_ppi8255_intf[1] ) | |
| 1558 | ||
| 1532 | 1559 | /* video hardware */ |
| 1533 | 1560 | MDRV_PALETTE_LENGTH(32+64+2) /* 32 for characters, 64 (buffer) for stars, 2 for bullets */ |
| 1534 | 1561 | |
| r2454 | r2455 | |
| 1550 | 1577 | |
| 1551 | 1578 | MDRV_MACHINE_RESET(scramble) |
| 1552 | 1579 | |
| 1580 | /* device config overrides */ | |
| 1581 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 1582 | MDRV_DEVICE_CONFIG( scramble_ppi_ppi8255_intf[0] ) | |
| 1583 | ||
| 1584 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 1585 | MDRV_DEVICE_CONFIG( scramble_ppi_ppi8255_intf[1] ) | |
| 1586 | ||
| 1553 | 1587 | /* video hardware */ |
| 1554 | 1588 | MDRV_SCREEN_ADD("main", RASTER) |
| 1555 | 1589 | MDRV_SCREEN_REFRESH_RATE(16000.0/132/2) |
| r2454 | r2455 | |
|---|---|---|
| 250 | 250 | |
| 251 | 251 | static WRITE16_HANDLER( irq_ack_w ) |
| 252 | 252 | { |
| 253 | cpunum_set_input_line( | |
| 253 | cpunum_set_input_line(machine, 0, 2, CLEAR_LINE); | |
| 254 | 254 | } |
| 255 | 255 | |
| 256 | 256 | |
| r2454 | r2455 | |
| 309 | 309 | |
| 310 | 310 | static WRITE16_HANDLER( sound_data_w ) |
| 311 | 311 | { |
| 312 | logerror("%06X:sound_data_w(%02X) = %08X & %08X\n", activecpu_get_pc(), offset, data, | |
| 312 | logerror("%06X:sound_data_w(%02X) = %08X & %08X\n", activecpu_get_pc(), offset, data, | |
| 313 | 313 | if (ACCESSING_BITS_0_7) |
| 314 | 314 | timer_call_after_resynch(NULL, data & 0xff, delayed_sound_w); |
| 315 | 315 | } |
| r2454 | r2455 | |
| 367 | 367 | } |
| 368 | 368 | } |
| 369 | 369 | else |
| 370 | logerror("%06X:analog_port_clock_w(%02X) = %08X & %08X\n", activecpu_get_pc(), offset, data, | |
| 370 | logerror("%06X:analog_port_clock_w(%02X) = %08X & %08X\n", activecpu_get_pc(), offset, data, | |
| 371 | 371 | } |
| 372 | 372 | |
| 373 | 373 | |
| r2454 | r2455 | |
| 385 | 385 | } |
| 386 | 386 | } |
| 387 | 387 | else |
| 388 | logerror("%06X:analog_port_latch_w(%02X) = %08X & %08X\n", activecpu_get_pc(), offset, data, | |
| 388 | logerror("%06X:analog_port_latch_w(%02X) = %08X & %08X\n", activecpu_get_pc(), offset, data, | |
| 389 | 389 | } |
| 390 | 390 | |
| 391 | 391 | |
| r2454 | r2455 | |
| 427 | 427 | { |
| 428 | 428 | /* this is set to 0 while data is uploaded, then set to $ffff after it is done */ |
| 429 | 429 | /* it does not ever appear to be touched after that */ |
| 430 | logerror("%06X:tms_reset_w(%02X) = %08X & %08X\n", activecpu_get_pc(), offset, data, | |
| 430 | logerror("%06X:tms_reset_w(%02X) = %08X & %08X\n", activecpu_get_pc(), offset, data, | |
| 431 | 431 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, (data == 0xffff) ? CLEAR_LINE : ASSERT_LINE); |
| 432 | 432 | } |
| 433 | 433 | |
| r2454 | r2455 | |
| 436 | 436 | { |
| 437 | 437 | /* this is written twice, 0,1, in quick succession */ |
| 438 | 438 | /* done after uploading, and after modifying the comm area */ |
| 439 | logerror("%06X:tms_irq_w(%02X) = %08X & %08X\n", activecpu_get_pc(), offset, data, | |
| 439 | logerror("%06X:tms_irq_w(%02X) = %08X & %08X\n", activecpu_get_pc(), offset, data, | |
| 440 | 440 | if (ACCESSING_BITS_0_7) |
| 441 | 441 | cpunum_set_input_line(machine, 1, 0, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE); |
| 442 | 442 | } |
| r2454 | r2455 | |
| 444 | 444 | |
| 445 | 445 | static WRITE16_HANDLER( tms_control3_w ) |
| 446 | 446 | { |
| 447 | logerror("%06X:tms_control3_w(%02X) = %08X & %08X\n", activecpu_get_pc(), offset, data, | |
| 447 | logerror("%06X:tms_control3_w(%02X) = %08X & %08X\n", activecpu_get_pc(), offset, data, | |
| 448 | 448 | } |
| 449 | 449 | |
| 450 | 450 | |
| 451 | 451 | static WRITE16_HANDLER( tms_comm_w ) |
| 452 | 452 | { |
| 453 | 453 | COMBINE_DATA(&tms_comm_base[offset ^ tms_offset_xor]); |
| 454 | logerror("%06X:tms_comm_w(%02X) = %08X & %08X\n", activecpu_get_pc(), offset*2, data, | |
| 454 | logerror("%06X:tms_comm_w(%02X) = %08X & %08X\n", activecpu_get_pc(), offset*2, data, | |
| 455 | 455 | } |
| 456 | 456 | |
| 457 | 457 | |
| r2454 | r2455 | |
| 650 | 650 | if (ACCESSING_BITS_0_7) |
| 651 | 651 | logerror("%06X:unknown_107_w = %02X\n", activecpu_get_pc(), data & 0xff); |
| 652 | 652 | else |
| 653 | logerror("%06X:unknown_107_w(%02X) = %08X & %08X\n", activecpu_get_pc(), offset, data, | |
| 653 | logerror("%06X:unknown_107_w(%02X) = %08X & %08X\n", activecpu_get_pc(), offset, data, | |
| 654 | 654 | } |
| 655 | 655 | |
| 656 | 656 | static WRITE32_HANDLER( unknown_127_w ) |
| r2454 | r2455 | |
| 659 | 659 | if (ACCESSING_BITS_0_7) |
| 660 | 660 | logerror("%06X:unknown_127_w = %02X\n", activecpu_get_pc(), data & 0xff); |
| 661 | 661 | else |
| 662 | logerror("%06X:unknown_127_w(%02X) = %08X & %08X\n", activecpu_get_pc(), offset, data, | |
| 662 | logerror("%06X:unknown_127_w(%02X) = %08X & %08X\n", activecpu_get_pc(), offset, data, | |
| 663 | 663 | } |
| 664 | 664 | |
| 665 | 665 | static WRITE32_HANDLER( unknown_137_w ) |
| r2454 | r2455 | |
| 668 | 668 | if (ACCESSING_BITS_0_7) |
| 669 | 669 | logerror("%06X:unknown_137_w = %02X\n", activecpu_get_pc(), data & 0xff); |
| 670 | 670 | else |
| 671 | logerror("%06X:unknown_137_w(%02X) = %08X & %08X\n", activecpu_get_pc(), offset, data, | |
| 671 | logerror("%06X:unknown_137_w(%02X) = %08X & %08X\n", activecpu_get_pc(), offset, data, | |
| 672 | 672 | } |
| 673 | 673 | |
| 674 | 674 | static WRITE32_HANDLER( unknown_13a_w ) |
| r2454 | r2455 | |
| 677 | 677 | if (ACCESSING_BITS_0_15) |
| 678 | 678 | logerror("%06X:unknown_13a_w = %04X\n", activecpu_get_pc(), data & 0xffff); |
| 679 | 679 | else |
| 680 | logerror("%06X:unknown_13a_w(%02X) = %08X & %08X\n", activecpu_get_pc(), offset, data, | |
| 680 | logerror("%06X:unknown_13a_w(%02X) = %08X & %08X\n", activecpu_get_pc(), offset, data, | |
| 681 | 681 | } |
| 682 | 682 | |
| 683 | 683 |
| r2454 | r2455 | |
|---|---|---|
| 592 | 592 | static WRITE8_HANDLER( itech8_nmi_ack_w ) |
| 593 | 593 | { |
| 594 | 594 | /* doesn't seem to hold for every game (e.g., hstennis) */ |
| 595 | /* cpunum_set_input_line( | |
| 595 | /* cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, CLEAR_LINE);*/ | |
| 596 | 596 | } |
| 597 | 597 | |
| 598 | 598 | |
| r2454 | r2455 | |
| 803 | 803 | |
| 804 | 804 | static READ8_HANDLER( sound_data_r ) |
| 805 | 805 | { |
| 806 | cpunum_set_input_line( | |
| 806 | cpunum_set_input_line(machine, 1, M6809_IRQ_LINE, CLEAR_LINE); | |
| 807 | 807 | return sound_data; |
| 808 | 808 | } |
| 809 | 809 | |
| r2454 | r2455 | |
| 1683 | 1683 | |
| 1684 | 1684 | static const struct YM2203interface ym2203_interface = |
| 1685 | 1685 | { |
| 1686 | 0, | |
| 1687 | 0, | |
| 1688 | 0, | |
| 1689 | ym2203_portb_out, | |
| 1686 | { | |
| 1687 | AY8910_LEGACY_OUTPUT, | |
| 1688 | AY8910_DEFAULT_LOADS, | |
| 1689 | NULL, | |
| 1690 | NULL, | |
| 1691 | NULL, | |
| 1692 | ym2203_portb_out, | |
| 1693 | }, | |
| 1690 | 1694 | generate_sound_irq |
| 1691 | 1695 | }; |
| 1692 | 1696 |
| r2454 | r2455 | |
|---|---|---|
| 281 | 281 | |
| 282 | 282 | static WRITE8_HANDLER( konami_ay8910_w ) |
| 283 | 283 | { |
| 284 | /* the decoding here is very simplistic, and you can address all four simultaneously */ | |
| 285 | if (offset & 0x10) AY8910_control_port_0_w(machine, 0, data); | |
| 286 | if (offset & 0x20) AY8910_write_port_0_w(machine, 0, data); | |
| 287 | if (offset & 0x40) AY8910_control_port_1_w(machine, 0, data); | |
| 288 | if (offset & 0x80) AY8910_write_port_1_w(machine, 0, data); | |
| 284 | /* the decoding here is very simplistic, and you can address two simultaneously */ | |
| 285 | if (offset & 0x10) | |
| 286 | AY8910_control_port_0_w(machine, 0, data); | |
| 287 | else if (offset & 0x20) | |
| 288 | AY8910_write_port_0_w(machine, 0, data); | |
| 289 | ||
| 290 | if (offset & 0x40) | |
| 291 | AY8910_control_port_1_w(machine, 0, data); | |
| 292 | else if (offset & 0x80) | |
| 293 | AY8910_write_port_1_w(machine, 0, data); | |
| 289 | 294 | } |
| 290 | 295 | |
| 291 | 296 | |
| r2454 | r2455 | |
| 352 | 357 | |
| 353 | 358 | /* low bit goes to 0.22uF capacitor = 220000pF */ |
| 354 | 359 | /* high bit goes to 0.047uF capacitor = 47000pF */ |
| 355 | discrete_sound_w(machine, NODE(3 * which + chan + 11), bits); | |
| 360 | discrete_sound_w(machine, NODE(3 * (1-which) + chan + 11), bits); | |
| 356 | 361 | } |
| 357 | 362 | } |
| 358 | 363 | |
| r2454 | r2455 | |
| 397 | 402 | } |
| 398 | 403 | |
| 399 | 404 | |
| 400 | static const ppi8255_interface konami_ppi8255_intf = | |
| 405 | static const ppi8255_interface konami_ppi8255_intf[2] = | |
| 401 | 406 | { |
| 402 | 2, | |
| 403 | { konami_porta_0_r, NULL }, /* Port A read */ | |
| 404 | { konami_portb_0_r, NULL }, /* Port B read */ | |
| 405 | { konami_portc_0_r, konami_portc_1_r }, /* Port C read */ | |
| 406 | { NULL, soundlatch_w }, /* Port A write */ | |
| 407 | { NULL, konami_sound_control_w }, /* Port B write */ | |
| 408 | { konami_portc_0_w, konami_portc_1_w }, /* Port C write */ | |
| 407 | { | |
| 408 | konami_porta_0_r, /* Port A read */ | |
| 409 | konami_portb_0_r, /* Port B read */ | |
| 410 | konami_portc_0_r, /* Port C read */ | |
| 411 | NULL, /* Port A write */ | |
| 412 | NULL, /* Port B write */ | |
| 413 | konami_portc_0_w /* Port C write */ | |
| 414 | }, | |
| 415 | { | |
| 416 | NULL, /* Port A read */ | |
| 417 | NULL, /* Port B read */ | |
| 418 | konami_portc_1_r, /* Port C read */ | |
| 419 | soundlatch_w, /* Port A write */ | |
| 420 | konami_sound_control_w, /* Port B write */ | |
| 421 | konami_portc_1_w /* Port C write */ | |
| 422 | } | |
| 409 | 423 | }; |
| 410 | 424 | |
| 411 | 425 | |
| r2454 | r2455 | |
| 420 | 434 | { |
| 421 | 435 | /* the decoding here is very simplistic, and you can address both simultaneously */ |
| 422 | 436 | UINT8 result = 0xff; |
| 423 | if (offset & 0x0100) result &= ppi8255_0_r(machine, offset & 3); | |
| 424 | if (offset & 0x0200) result &= ppi8255_1_r(machine, offset & 3); | |
| 437 | if (offset & 0x0100) result &= ppi8255_r(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_0" ), offset & 3); | |
| 438 | if (offset & 0x0200) result &= ppi8255_r(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_1" ), offset & 3); | |
| 425 | 439 | return result; |
| 426 | 440 | } |
| 427 | 441 | |
| r2454 | r2455 | |
| 429 | 443 | static WRITE8_HANDLER( theend_ppi8255_w ) |
| 430 | 444 | { |
| 431 | 445 | /* the decoding here is very simplistic, and you can address both simultaneously */ |
| 432 | if (offset & 0x0100) ppi8255_0_w(machine, offset & 3, data); | |
| 433 | if (offset & 0x0200) ppi8255_1_w(machine, offset & 3, data); | |
| 446 | if (offset & 0x0100) ppi8255_w(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_0" ), offset & 3, data); | |
| 447 | if (offset & 0x0200) ppi8255_w(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_1" ), offset & 3, data); | |
| 434 | 448 | } |
| 435 | 449 | |
| 436 | 450 | |
| r2454 | r2455 | |
| 440 | 454 | } |
| 441 | 455 | |
| 442 | 456 | |
| 457 | static const ppi8255_interface theend_ppi8255_intf[2] = | |
| 458 | { | |
| 459 | { | |
| 460 | konami_porta_0_r, /* Port A read */ | |
| 461 | konami_portb_0_r, /* Port B read */ | |
| 462 | konami_portc_0_r, /* Port C read */ | |
| 463 | NULL, /* Port A write */ | |
| 464 | NULL, /* Port B write */ | |
| 465 | theend_coin_counter_w /* Port C write */ | |
| 466 | }, | |
| 467 | { | |
| 468 | NULL, /* Port A read */ | |
| 469 | NULL, /* Port B read */ | |
| 470 | konami_portc_1_r, /* Port C read */ | |
| 471 | soundlatch_w, /* Port A write */ | |
| 472 | konami_sound_control_w, /* Port B write */ | |
| 473 | konami_portc_1_w /* Port C write */ | |
| 474 | } | |
| 475 | }; | |
| 443 | 476 | |
| 477 | ||
| 478 | ||
| 444 | 479 | /************************************* |
| 445 | 480 | * |
| 446 | 481 | * Scramble I/O |
| r2454 | r2455 | |
| 488 | 523 | } |
| 489 | 524 | |
| 490 | 525 | |
| 526 | static const ppi8255_interface scramble_ppi8255_intf[2] = | |
| 527 | { | |
| 528 | { | |
| 529 | konami_porta_0_r, /* Port A read */ | |
| 530 | konami_portb_0_r, /* Port B read */ | |
| 531 | konami_portc_0_r, /* Port C read */ | |
| 532 | NULL, /* Port A write */ | |
| 533 | NULL, /* Port B write */ | |
| 534 | konami_portc_0_w /* Port C write */ | |
| 535 | }, | |
| 536 | { | |
| 537 | NULL, /* Port A read */ | |
| 538 | NULL, /* Port B read */ | |
| 539 | scramble_protection_r, /* Port C read */ | |
| 540 | soundlatch_w, /* Port A write */ | |
| 541 | konami_sound_control_w, /* Port B write */ | |
| 542 | scramble_protection_w /* Port C write */ | |
| 543 | } | |
| 544 | }; | |
| 491 | 545 | |
| 546 | ||
| 492 | 547 | /************************************* |
| 493 | 548 | * |
| 494 | 549 | * Explorer I/O |
| r2454 | r2455 | |
| 519 | 574 | { |
| 520 | 575 | /* the decoding here is very simplistic, and you can address both simultaneously */ |
| 521 | 576 | UINT8 result = 0xff; |
| 522 | if (offset & 0x04) result &= ppi8255_ | |
| 577 | if (offset & 0x04) result &= ppi8255_ | |
| 523 | 578 | return result; |
| 524 | 579 | } |
| 525 | 580 | |
| r2454 | r2455 | |
| 527 | 582 | static WRITE8_HANDLER( sfx_sample_io_w ) |
| 528 | 583 | { |
| 529 | 584 | /* the decoding here is very simplistic, and you can address both simultaneously */ |
| 530 | if (offset & 0x04) ppi8255_ | |
| 585 | if (offset & 0x04) ppi8255_ | |
| 531 | 586 | if (offset & 0x10) DAC_0_signed_data_w(machine, offset, data); |
| 532 | 587 | } |
| 533 | 588 | |
| r2454 | r2455 | |
| 544 | 599 | } |
| 545 | 600 | |
| 546 | 601 | |
| 547 | static const ppi8255_interface sfx_ppi8255_intf = | |
| 602 | static const ppi8255_interface sfx_ppi8255_intf[3] = | |
| 548 | 603 | { |
| 549 | 3, | |
| 550 | { konami_porta_0_r, NULL, soundlatch2_r }, /* Port A read */ | |
| 551 | { konami_portb_0_r, NULL, NULL }, /* Port B read */ | |
| 552 | { konami_portc_0_r, konami_portc_1_r, NULL }, /* Port C read */ | |
| 553 | { NULL, soundlatch_w, NULL }, /* Port A write */ | |
| 554 | { NULL, konami_sound_control_w, NULL }, /* Port B write */ | |
| 555 | { konami_portc_0_w, konami_portc_1_w, NULL }, /* Port C write */ | |
| 604 | { | |
| 605 | konami_porta_0_r, /* Port A read */ | |
| 606 | konami_portb_0_r, /* Port B read */ | |
| 607 | konami_portc_0_r, /* Port C read */ | |
| 608 | NULL, /* Port A write */ | |
| 609 | NULL, /* Port B write */ | |
| 610 | konami_portc_0_w /* Port C write */ | |
| 611 | }, | |
| 612 | { | |
| 613 | NULL, /* Port A read */ | |
| 614 | NULL, /* Port B read */ | |
| 615 | konami_portc_1_r, /* Port C read */ | |
| 616 | soundlatch_w, /* Port A write */ | |
| 617 | konami_sound_control_w, /* Port B write */ | |
| 618 | konami_portc_1_w /* Port C write */ | |
| 619 | }, | |
| 620 | { | |
| 621 | soundlatch2_r, /* Port A read */ | |
| 622 | NULL, /* Port B read */ | |
| 623 | NULL, /* Port C read */ | |
| 624 | NULL, /* Port A write */ | |
| 625 | NULL, /* Port B write */ | |
| 626 | NULL /* Port C write */ | |
| 627 | } | |
| 556 | 628 | }; |
| 557 | 629 | |
| 558 | 630 | |
| r2454 | r2455 | |
| 567 | 639 | { |
| 568 | 640 | /* the decoding here is very simplistic, and you can address both simultaneously */ |
| 569 | 641 | UINT8 result = 0xff; |
| 570 | if (offset & 0x1000) result &= ppi8255_1_r(machine, (offset >> 1) & 3); | |
| 571 | if (offset & 0x2000) result &= ppi8255_0_r(machine, (offset >> 1) & 3); | |
| 642 | if (offset & 0x1000) result &= ppi8255_r(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_1" ), (offset >> 1) & 3); | |
| 643 | if (offset & 0x2000) result &= ppi8255_r(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_0" ), (offset >> 1) & 3); | |
| 572 | 644 | return result; |
| 573 | 645 | } |
| 574 | 646 | |
| r2454 | r2455 | |
| 576 | 648 | static WRITE8_HANDLER( frogger_ppi8255_w ) |
| 577 | 649 | { |
| 578 | 650 | /* the decoding here is very simplistic, and you can address both simultaneously */ |
| 579 | if (offset & 0x1000) ppi8255_1_w(machine, (offset >> 1) & 3, data); | |
| 580 | if (offset & 0x2000) ppi8255_0_w(machine, (offset >> 1) & 3, data); | |
| 651 | if (offset & 0x1000) ppi8255_w(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_1" ), (offset >> 1) & 3, data); | |
| 652 | if (offset & 0x2000) ppi8255_w(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_0" ), (offset >> 1) & 3, data); | |
| 581 | 653 | } |
| 582 | 654 | |
| 583 | 655 | |
| r2454 | r2455 | |
| 592 | 664 | |
| 593 | 665 | static WRITE8_HANDLER( frogger_ay8910_w ) |
| 594 | 666 | { |
| 595 | /* the decoding here is very simplistic, and you can address both simultaneously */ | |
| 596 | if (offset & 0x80) AY8910_control_port_0_w(machine, 0, data); | |
| 597 | if (offset & 0x40) AY8910_write_port_0_w(machine, 0, data); | |
| 667 | /* the decoding here is very simplistic */ | |
| 668 | if (offset & 0x40) | |
| 669 | AY8910_write_port_0_w(machine, 0, data); | |
| 670 | else if (offset & 0x80) | |
| 671 | AY8910_control_port_0_w(machine, 0, data); | |
| 598 | 672 | } |
| 599 | 673 | |
| 600 | 674 | |
| r2454 | r2455 | |
| 623 | 697 | { |
| 624 | 698 | /* the decoding here is very simplistic, and you can address both simultaneously */ |
| 625 | 699 | UINT8 result = 0xff; |
| 626 | if (offset & 0x1000) result &= ppi8255_0_r(machine, (offset >> 3) & 3); | |
| 627 | if (offset & 0x2000) result &= ppi8255_1_r(machine, (offset >> 3) & 3); | |
| 700 | if (offset & 0x1000) result &= ppi8255_r(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_0" ), (offset >> 3) & 3); | |
| 701 | if (offset & 0x2000) result &= ppi8255_r(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_1" ), (offset >> 3) & 3); | |
| 628 | 702 | return result; |
| 629 | 703 | } |
| 630 | 704 | |
| r2454 | r2455 | |
| 632 | 706 | static WRITE8_HANDLER( frogf_ppi8255_w ) |
| 633 | 707 | { |
| 634 | 708 | /* the decoding here is very simplistic, and you can address both simultaneously */ |
| 635 | if (offset & 0x1000) ppi8255_0_w(machine, (offset >> 3) & 3, data); | |
| 636 | if (offset & 0x2000) ppi8255_1_w(machine, (offset >> 3) & 3, data); | |
| 709 | if (offset & 0x1000) ppi8255_w(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_0" ), (offset >> 3) & 3, data); | |
| 710 | if (offset & 0x2000) ppi8255_w(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_1" ), (offset >> 3) & 3, data); | |
| 637 | 711 | } |
| 638 | 712 | |
| 639 | 713 | |
| r2454 | r2455 | |
| 644 | 718 | * |
| 645 | 719 | *************************************/ |
| 646 | 720 | |
| 647 | static READ8_HANDLER( turtles_ppi8255_0_r ) { return ppi8255_0_r(machine, (offset >> 4) & 3); } | |
| 648 | static READ8_HANDLER( turtles_ppi8255_1_r ) { return ppi8255_1_r(machine, (offset >> 4) & 3); } | |
| 649 | static WRITE8_HANDLER( turtles_ppi8255_0_w ) { ppi8255_0_w(machine, (offset >> 4) & 3, data); } | |
| 650 | static WRITE8_HANDLER( turtles_ppi8255_1_w ) { ppi8255_1_w(machine, (offset >> 4) & 3, data); } | |
| 721 | static READ8_HANDLER( turtles_ppi8255_0_r ) { return ppi8255_r(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_0" ), (offset >> 4) & 3); } | |
| 722 | static READ8_HANDLER( turtles_ppi8255_1_r ) { return ppi8255_r(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_1" ), (offset >> 4) & 3); } | |
| 723 | static WRITE8_HANDLER( turtles_ppi8255_0_w ) { ppi8255_w(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_0" ), (offset >> 4) & 3, data); } | |
| 724 | static WRITE8_HANDLER( turtles_ppi8255_1_w ) { ppi8255_w(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_1" ), (offset >> 4) & 3, data); } | |
| 651 | 725 | |
| 652 | 726 | |
| 653 | 727 | |
| r2454 | r2455 | |
| 732 | 806 | } |
| 733 | 807 | |
| 734 | 808 | |
| 809 | static const ppi8255_interface scorpion_ppi8255_intf[2] = | |
| 810 | { | |
| 811 | { | |
| 812 | konami_porta_0_r, /* Port A read */ | |
| 813 | konami_portb_0_r, /* Port B read */ | |
| 814 | konami_portc_0_r, /* Port C read */ | |
| 815 | NULL, /* Port A write */ | |
| 816 | NULL, /* Port B write */ | |
| 817 | konami_portc_0_w /* Port C write */ | |
| 818 | }, | |
| 819 | { | |
| 820 | NULL, /* Port A read */ | |
| 821 | NULL, /* Port B read */ | |
| 822 | scorpion_protection_r, /* Port C read */ | |
| 823 | soundlatch_w, /* Port A write */ | |
| 824 | konami_sound_control_w, /* Port B write */ | |
| 825 | scorpion_protection_w /* Port C write */ | |
| 826 | } | |
| 827 | }; | |
| 735 | 828 | |
| 829 | ||
| 830 | ||
| 736 | 831 | /************************************* |
| 737 | 832 | * |
| 738 | 833 | * Ghostmuncher Galaxian I/O |
| r2454 | r2455 | |
| 1148 | 1243 | AM_RANGE(0x8000, 0x87ff) AM_MIRROR(0x4000) AM_RAM |
| 1149 | 1244 | AM_RANGE(0x8800, 0x8bff) AM_MIRROR(0x4400) AM_RAM_WRITE(galaxian_videoram_w) AM_BASE(&videoram) |
| 1150 | 1245 | AM_RANGE(0x9000, 0x90ff) AM_MIRROR(0x4700) AM_RAM_WRITE(galaxian_objram_w) AM_BASE(&spriteram) |
| 1151 | AM_RANGE(0x9800, 0x9803) AM_MIRROR(0x47fc) AM_READWRITE(ppi8255_0_r, ppi8255_0_w) | |
| 1152 | AM_RANGE(0xa000, 0xa003) AM_MIRROR(0x47fc) AM_READWRITE(ppi8255_1_r, ppi8255_1_w) | |
| 1246 | AM_RANGE(0x9800, 0x9803) AM_MIRROR(0x47fc) AM_DEVREADWRITE(PPI8255, "ppi8255_0", ppi8255_r, ppi8255_w) | |
| 1247 | AM_RANGE(0xa000, 0xa003) AM_MIRROR(0x47fc) AM_DEVREADWRITE(PPI8255, "ppi8255_1", ppi8255_r, ppi8255_w) | |
| 1153 | 1248 | AM_RANGE(0xa801, 0xa801) AM_MIRROR(0x47f8) AM_WRITE(irq_enable_w) |
| 1154 | 1249 | AM_RANGE(0xa802, 0xa802) AM_MIRROR(0x47f8) AM_WRITE(coin_count_0_w) |
| 1155 | 1250 | AM_RANGE(0xa803, 0xa803) AM_MIRROR(0x47f8) AM_WRITE(scramble_background_enable_w) |
| r2454 | r2455 | |
| 1448 | 1543 | |
| 1449 | 1544 | static struct AY8910interface frogger_ay8910_interface = |
| 1450 | 1545 | { |
| 1546 | AY8910_DISCRETE_OUTPUT, | |
| 1547 | {RES_K(5.1), RES_K(5.1), RES_K(5.1)}, | |
| 1451 | 1548 | soundlatch_r, |
| 1452 | frogger_sound_timer_r | |
| 1549 | frogger_sound_timer_r, | |
| 1550 | NULL, | |
| 1551 | NULL | |
| 1453 | 1552 | }; |
| 1454 | 1553 | |
| 1455 | static struct AY8910interface konami_ay8910_interface = | |
| 1554 | static struct AY8910interface konami_ay8910_interface_1 = | |
| 1456 | 1555 | { |
| 1556 | AY8910_DISCRETE_OUTPUT, | |
| 1557 | {RES_K(5.1), RES_K(5.1), RES_K(5.1)}, | |
| 1558 | NULL, | |
| 1559 | NULL, | |
| 1560 | NULL, | |
| 1561 | NULL | |
| 1562 | }; | |
| 1563 | ||
| 1564 | static struct AY8910interface konami_ay8910_interface_2 = | |
| 1565 | { | |
| 1566 | AY8910_DISCRETE_OUTPUT, | |
| 1567 | {RES_K(5.1), RES_K(5.1), RES_K(5.1)}, | |
| 1457 | 1568 | soundlatch_r, |
| 1458 | konami_sound_timer_r | |
| 1569 | konami_sound_timer_r, | |
| 1570 | NULL, | |
| 1571 | NULL | |
| 1459 | 1572 | }; |
| 1460 | 1573 | |
| 1461 | 1574 | static struct AY8910interface explorer_ay8910_interface_1 = |
| 1462 | 1575 | { |
| 1463 | konami_sound_timer_r | |
| 1576 | AY8910_LEGACY_OUTPUT, | |
| 1577 | AY8910_DEFAULT_LOADS, | |
| 1578 | konami_sound_timer_r, | |
| 1579 | NULL, | |
| 1580 | NULL, | |
| 1581 | NULL | |
| 1464 | 1582 | }; |
| 1465 | 1583 | |
| 1466 | 1584 | static struct AY8910interface explorer_ay8910_interface_2 = |
| 1467 | 1585 | { |
| 1468 | explorer_sound_latch_r | |
| 1586 | AY8910_LEGACY_OUTPUT, | |
| 1587 | AY8910_DEFAULT_LOADS, | |
| 1588 | explorer_sound_latch_r, | |
| 1589 | NULL, | |
| 1590 | NULL, | |
| 1591 | NULL | |
| 1469 | 1592 | }; |
| 1470 | 1593 | |
| 1471 | 1594 | static struct AY8910interface sfx_ay8910_interface = |
| 1472 | 1595 | { |
| 1473 | 0, | |
| 1474 | 0, | |
| 1596 | AY8910_LEGACY_OUTPUT, | |
| 1597 | AY8910_DEFAULT_LOADS, | |
| 1598 | NULL, | |
| 1599 | NULL, | |
| 1475 | 1600 | soundlatch2_w, |
| 1476 | 1601 | sfx_sample_control_w |
| 1477 | 1602 | }; |
| 1478 | 1603 | |
| 1479 | 1604 | static struct AY8910interface scorpion_ay8910_interface = |
| 1480 | 1605 | { |
| 1481 | 0, | |
| 1482 | 0, | |
| 1606 | AY8910_LEGACY_OUTPUT, | |
| 1607 | AY8910_DEFAULT_LOADS, | |
| 1608 | NULL, | |
| 1609 | NULL, | |
| 1483 | 1610 | scorpion_sound_data_w, |
| 1484 | 1611 | scorpion_sound_control_w, |
| 1485 | 1612 | }; |
| 1486 | 1613 | |
| 1487 | 1614 | static struct AY8910interface checkmaj_ay8910_interface = |
| 1488 | 1615 | { |
| 1489 | soundlatch_r | |
| 1616 | AY8910_LEGACY_OUTPUT, | |
| 1617 | AY8910_DEFAULT_LOADS, | |
| 1618 | soundlatch_r, | |
| 1619 | NULL, | |
| 1620 | NULL, | |
| 1621 | NULL | |
| 1490 | 1622 | }; |
| 1491 | 1623 | |
| 1492 | 1624 | |
| 1493 | 1625 | static const discrete_mixer_desc konami_sound_mixer_desc = |
| 1494 | {DISC_MIXER_IS_ | |
| 1626 | {DISC_MIXER_IS_ | |
| 1495 | 1627 | {RES_K(5.1), RES_K(5.1), RES_K(5.1), RES_K(5.1), RES_K(5.1), RES_K(5.1)}, |
| 1496 | 1628 | {0,0,0,0,0,0}, /* no variable resistors */ |
| 1497 | 1629 | {0,0,0,0,0,0}, /* no node capacitors */ |
| 1498 | 0, RES_K(2 | |
| 1630 | 0, RES_K(2.2), | |
| 1499 | 1631 | 0, |
| 1500 | 1632 | CAP_U(0.15), |
| 1501 | 1633 | 0, 1}; |
| r2454 | r2455 | |
| 1518 | 1650 | DISCRETE_INPUT_DATA(NODE_15) |
| 1519 | 1651 | DISCRETE_INPUT_DATA(NODE_16) |
| 1520 | 1652 | |
| 1521 | DISCRETE_RCFILTER_SW(NODE_21, 1, NODE_01, NODE_11, 1000, CAP_U(0.22), CAP_U(0.047), 0, 0) | |
| 1522 | DISCRETE_RCFILTER_SW(NODE_22, 1, NODE_02, NODE_12, 1000, CAP_U(0.22), CAP_U(0.047), 0, 0) | |
| 1523 | DISCRETE_RCFILTER_SW(NODE_23, 1, NODE_03, NODE_13, 1000, CAP_U(0.22), CAP_U(0.047), 0, 0) | |
| 1653 | DISCRETE_RCFILTER_SW(NODE_21, 1, NODE_01, NODE_11, AY8910_INTERNAL_RESISTANCE+1000, CAP_U(0.22), CAP_U(0.047), 0, 0) | |
| 1654 | DISCRETE_RCFILTER_SW(NODE_22, 1, NODE_02, NODE_12, AY8910_INTERNAL_RESISTANCE+1000, CAP_U(0.22), CAP_U(0.047), 0, 0) | |
| 1655 | DISCRETE_RCFILTER_SW(NODE_23, 1, NODE_03, NODE_13, AY8910_INTERNAL_RESISTANCE+1000, CAP_U(0.22), CAP_U(0.047), 0, 0) | |
| 1524 | 1656 | |
| 1525 | DISCRETE_RCFILTER_SW(NODE_24, 1, NODE_04, NODE_14, 1000, CAP_U(0.22), CAP_U(0.047), 0, 0) | |
| 1526 | DISCRETE_RCFILTER_SW(NODE_25, 1, NODE_05, NODE_15, 1000, CAP_U(0.22), CAP_U(0.047), 0, 0) | |
| 1527 | DISCRETE_RCFILTER_SW(NODE_26, 1, NODE_06, NODE_16, 1000, CAP_U(0.22), CAP_U(0.047), 0, 0) | |
| 1657 | DISCRETE_RCFILTER_SW(NODE_24, 1, NODE_04, NODE_14, AY8910_INTERNAL_RESISTANCE+1000, CAP_U(0.22), CAP_U(0.047), 0, 0) | |
| 1658 | DISCRETE_RCFILTER_SW(NODE_25, 1, NODE_05, NODE_15, AY8910_INTERNAL_RESISTANCE+1000, CAP_U(0.22), CAP_U(0.047), 0, 0) | |
| 1659 | DISCRETE_RCFILTER_SW(NODE_26, 1, NODE_06, NODE_16, AY8910_INTERNAL_RESISTANCE+1000, CAP_U(0.22), CAP_U(0.047), 0, 0) | |
| 1528 | 1660 | |
| 1529 | 1661 | DISCRETE_MIXER6(NODE_30, 1, NODE_21, NODE_22, NODE_23, NODE_24, NODE_25, NODE_26, &konami_sound_mixer_desc) |
| 1530 | 1662 | |
| r2454 | r2455 | |
| 1532 | 1664 | /* This is handled with sound_global_enable but */ |
| 1533 | 1665 | /* belongs here. */ |
| 1534 | 1666 | |
| 1535 | DISCRETE_OUTPUT(NODE_30, | |
| 1667 | DISCRETE_OUTPUT(NODE_30, 12.0 ) | |
| 1536 | 1668 | |
| 1537 | 1669 | DISCRETE_SOUND_END |
| 1538 | 1670 | |
| r2454 | r2455 | |
| 1582 | 1714 | MACHINE_DRIVER_END |
| 1583 | 1715 | |
| 1584 | 1716 | |
| 1717 | static MACHINE_DRIVER_START( konami_base ) | |
| 1718 | MDRV_IMPORT_FROM( galaxian_base ) | |
| 1719 | ||
| 1720 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 1721 | MDRV_DEVICE_CONFIG( konami_ppi8255_intf[0] ) | |
| 1722 | ||
| 1723 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 1724 | MDRV_DEVICE_CONFIG( konami_ppi8255_intf[1] ) | |
| 1725 | MACHINE_DRIVER_END | |
| 1726 | ||
| 1727 | ||
| 1585 | 1728 | static MACHINE_DRIVER_START( konami_sound_1x_ay8910 ) |
| 1586 | 1729 | |
| 1587 | 1730 | /* 2nd CPU to drive sound */ |
| r2454 | r2455 | |
| 1592 | 1735 | /* sound hardware */ |
| 1593 | 1736 | MDRV_SOUND_ADD_TAG("8910.0", AY8910, KONAMI_SOUND_CLOCK/8) |
| 1594 | 1737 | MDRV_SOUND_CONFIG(frogger_ay8910_interface) |
| 1595 | MDRV_SOUND_ROUTE_EX(0, "konami", 1.0, 0) | |
| 1596 | MDRV_SOUND_ROUTE_EX(1, "konami", 1.0, 1) | |
| 1597 | MDRV_SOUND_ROUTE_EX(2, "konami", 1.0, 2) | |
| 1738 | MDRV_SOUND_ROUTE_EX(0, "konami", 1.0, 3) | |
| 1739 | MDRV_SOUND_ROUTE_EX(1, "konami", 1.0, 4) | |
| 1740 | MDRV_SOUND_ROUTE_EX(2, "konami", 1.0, 5) | |
| 1598 | 1741 | |
| 1599 | 1742 | MDRV_SOUND_ADD_TAG("konami", DISCRETE, 0) |
| 1600 | 1743 | MDRV_SOUND_CONFIG_DISCRETE(konami_sound) |
| r2454 | r2455 | |
| 1611 | 1754 | |
| 1612 | 1755 | /* sound hardware */ |
| 1613 | 1756 | MDRV_SOUND_ADD_TAG("8910.0", AY8910, KONAMI_SOUND_CLOCK/8) |
| 1757 | MDRV_SOUND_CONFIG(konami_ay8910_interface_1) | |
| 1614 | 1758 | MDRV_SOUND_ROUTE_EX(0, "konami", 1.0, 0) |
| 1615 | 1759 | MDRV_SOUND_ROUTE_EX(1, "konami", 1.0, 1) |
| 1616 | 1760 | MDRV_SOUND_ROUTE_EX(2, "konami", 1.0, 2) |
| 1617 | 1761 | |
| 1618 | 1762 | MDRV_SOUND_ADD_TAG("8910.1", AY8910, KONAMI_SOUND_CLOCK/8) |
| 1619 | MDRV_SOUND_CONFIG(konami_ay8910_interface) | |
| 1763 | MDRV_SOUND_CONFIG(konami_ay8910_interface_2) | |
| 1620 | 1764 | MDRV_SOUND_ROUTE_EX(0, "konami", 1.0, 3) |
| 1621 | 1765 | MDRV_SOUND_ROUTE_EX(1, "konami", 1.0, 4) |
| 1622 | 1766 | MDRV_SOUND_ROUTE_EX(2, "konami", 1.0, 5) |
| r2454 | r2455 | |
| 1758 | 1902 | |
| 1759 | 1903 | |
| 1760 | 1904 | static MACHINE_DRIVER_START( frogger ) |
| 1761 | MDRV_IMPORT_FROM( | |
| 1905 | MDRV_IMPORT_FROM(konam | |
| 1762 | 1906 | MDRV_IMPORT_FROM(konami_sound_1x_ay8910) |
| 1763 | 1907 | |
| 1764 | 1908 | /* alternate memory map */ |
| r2454 | r2455 | |
| 1778 | 1922 | |
| 1779 | 1923 | |
| 1780 | 1924 | static MACHINE_DRIVER_START( froggers ) |
| 1781 | MDRV_IMPORT_FROM( | |
| 1925 | MDRV_IMPORT_FROM(konam | |
| 1782 | 1926 | MDRV_IMPORT_FROM(konami_sound_1x_ay8910) |
| 1783 | 1927 | |
| 1784 | 1928 | /* alternate memory map */ |
| r2454 | r2455 | |
| 1788 | 1932 | |
| 1789 | 1933 | |
| 1790 | 1934 | static MACHINE_DRIVER_START( frogf ) |
| 1791 | MDRV_IMPORT_FROM( | |
| 1935 | MDRV_IMPORT_FROM(konam | |
| 1792 | 1936 | MDRV_IMPORT_FROM(konami_sound_1x_ay8910) |
| 1793 | 1937 | |
| 1794 | 1938 | /* alternate memory map */ |
| r2454 | r2455 | |
| 1798 | 1942 | |
| 1799 | 1943 | |
| 1800 | 1944 | static MACHINE_DRIVER_START( turtles ) |
| 1801 | MDRV_IMPORT_FROM( | |
| 1945 | MDRV_IMPORT_FROM(konam | |
| 1802 | 1946 | MDRV_IMPORT_FROM(konami_sound_2x_ay8910) |
| 1803 | 1947 | |
| 1804 | 1948 | /* alternate memory map */ |
| r2454 | r2455 | |
| 1814 | 1958 | /* alternate memory map */ |
| 1815 | 1959 | MDRV_CPU_MODIFY("main") |
| 1816 | 1960 | MDRV_CPU_PROGRAM_MAP(theend_map,0) |
| 1961 | ||
| 1962 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 1963 | MDRV_DEVICE_CONFIG( theend_ppi8255_intf[0] ) | |
| 1964 | ||
| 1965 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 1966 | MDRV_DEVICE_CONFIG( theend_ppi8255_intf[1] ) | |
| 1817 | 1967 | MACHINE_DRIVER_END |
| 1818 | 1968 | |
| 1819 | 1969 | |
| 1820 | static MACHINE_DRIVER_START( | |
| 1970 | static MACHINE_DRIVER_START( sc | |
| 1821 | 1971 | MDRV_IMPORT_FROM(galaxian_base) |
| 1972 | MDRV_IMPORT_FROM(konami_sound_2x_ay8910) | |
| 1822 | 1973 | |
| 1823 | 1974 | /* alternate memory map */ |
| 1824 | 1975 | MDRV_CPU_MODIFY("main") |
| 1825 | 1976 | MDRV_CPU_PROGRAM_MAP(theend_map,0) |
| 1826 | 1977 | |
| 1978 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 1979 | MDRV_DEVICE_CONFIG( scramble_ppi8255_intf[0] ) | |
| 1980 | ||
| 1981 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 1982 | MDRV_DEVICE_CONFIG( scramble_ppi8255_intf[1] ) | |
| 1983 | MACHINE_DRIVER_END | |
| 1984 | ||
| 1985 | ||
| 1986 | static MACHINE_DRIVER_START( explorer ) | |
| 1987 | MDRV_IMPORT_FROM(konami_base) | |
| 1988 | ||
| 1989 | /* alternate memory map */ | |
| 1990 | MDRV_CPU_MODIFY("main") | |
| 1991 | MDRV_CPU_PROGRAM_MAP(theend_map,0) | |
| 1992 | ||
| 1827 | 1993 | /* 2nd CPU to drive sound */ |
| 1828 | 1994 | MDRV_CPU_ADD(Z80,KONAMI_SOUND_CLOCK/8) |
| 1829 | 1995 | MDRV_CPU_PROGRAM_MAP(konami_sound_map,0) |
| r2454 | r2455 | |
| 1843 | 2009 | static MACHINE_DRIVER_START( scorpion ) |
| 1844 | 2010 | MDRV_IMPORT_FROM(theend) |
| 1845 | 2011 | |
| 2012 | MDRV_DEVICE_MODIFY( "ppi8255_0", PPI8255 ) | |
| 2013 | MDRV_DEVICE_CONFIG( scorpion_ppi8255_intf[0] ) | |
| 2014 | ||
| 2015 | MDRV_DEVICE_MODIFY( "ppi8255_1", PPI8255 ) | |
| 2016 | MDRV_DEVICE_CONFIG( scorpion_ppi8255_intf[1] ) | |
| 2017 | ||
| 1846 | 2018 | /* extra AY8910 with I/O ports */ |
| 1847 | 2019 | MDRV_SOUND_ADD_TAG("8910.2", AY8910, KONAMI_SOUND_CLOCK/8) |
| 1848 | 2020 | MDRV_SOUND_CONFIG(scorpion_ay8910_interface) |
| r2454 | r2455 | |
| 1865 | 2037 | MDRV_CPU_PROGRAM_MAP(sfx_sample_map,0) |
| 1866 | 2038 | MDRV_CPU_IO_MAP(sfx_sample_portmap,0) |
| 1867 | 2039 | |
| 2040 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 2041 | MDRV_DEVICE_CONFIG( sfx_ppi8255_intf[0] ) | |
| 2042 | ||
| 2043 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 2044 | MDRV_DEVICE_CONFIG( sfx_ppi8255_intf[1] ) | |
| 2045 | ||
| 2046 | MDRV_DEVICE_ADD( "ppi8255_2", PPI8255 ) | |
| 2047 | MDRV_DEVICE_CONFIG( sfx_ppi8255_intf[2] ) | |
| 2048 | ||
| 1868 | 2049 | /* port on 1st 8910 is used for communication */ |
| 1869 | 2050 | MDRV_SOUND_MODIFY("8910.0") |
| 1870 | 2051 | MDRV_SOUND_CONFIG(sfx_ay8910_interface) |
| r2454 | r2455 | |
| 1876 | 2057 | |
| 1877 | 2058 | |
| 1878 | 2059 | static MACHINE_DRIVER_START( scobra ) |
| 1879 | MDRV_IMPORT_FROM( | |
| 2060 | MDRV_IMPORT_FROM(konam | |
| 1880 | 2061 | MDRV_IMPORT_FROM(konami_sound_2x_ay8910) |
| 1881 | 2062 | |
| 1882 | 2063 | /* alternate memory map */ |
| r2454 | r2455 | |
| 2082 | 2263 | } |
| 2083 | 2264 | |
| 2084 | 2265 | |
| 2085 | static void konami_common_init( | |
| 2086 | running_machine *machine, | |
| 2087 | galaxian_draw_bullet_func draw_bullet, | |
| 2088 | galaxian_draw_background_func draw_background, | |
| 2089 | galaxian_extend_tile_info_func extend_tile_info, | |
| 2090 | galaxian_extend_sprite_info_func extend_sprite_info) | |
| 2091 | { | |
| 2092 | /* basic configuration */ | |
| 2093 | common_init(machine, draw_bullet, draw_background, extend_tile_info, extend_sprite_info); | |
| 2094 | ||
| 2095 | /* configure Konami sound */ | |
| 2096 | ppi8255_init(&konami_ppi8255_intf); | |
| 2097 | } | |
| 2098 | ||
| 2099 | ||
| 2100 | 2266 | static void unmap_galaxian_sound(running_machine *machine, offs_t base) |
| 2101 | 2267 | { |
| 2102 | 2268 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, base + 0x0004, base + 0x0007, 0, 0x07f8, SMH_UNMAP); |
| r2454 | r2455 | |
| 2441 | 2607 | static DRIVER_INIT( theend ) |
| 2442 | 2608 | { |
| 2443 | 2609 | /* video extensions */ |
| 2444 | | |
| 2610 | | |
| 2445 | 2611 | |
| 2446 | 2612 | /* coin counter on the upper bit of port C */ |
| 2447 | 2613 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x6802, 0x6802, 0, 0x7f8, SMH_UNMAP); |
| 2448 | ppi8255_set_portCwrite(0, theend_coin_counter_w); | |
| 2449 | 2614 | } |
| 2450 | 2615 | |
| 2451 | 2616 | |
| 2452 | 2617 | static DRIVER_INIT( scramble ) |
| 2453 | 2618 | { |
| 2454 | 2619 | /* video extensions */ |
| 2455 | konami_common_init(machine, scramble_draw_bullet, scramble_draw_background, NULL, NULL); | |
| 2456 | ||
| 2457 | /* configure protection */ | |
| 2458 | ppi8255_set_portCread (1, scramble_protection_r); | |
| 2459 | ppi8255_set_portCwrite(1, scramble_protection_w); | |
| 2620 | common_init(machine, scramble_draw_bullet, scramble_draw_background, NULL, NULL); | |
| 2460 | 2621 | } |
| 2461 | 2622 | |
| 2462 | 2623 | |
| 2463 | 2624 | static DRIVER_INIT( explorer ) |
| 2464 | 2625 | { |
| 2465 | 2626 | /* video extensions */ |
| 2466 | | |
| 2627 | | |
| 2467 | 2628 | |
| 2468 | 2629 | /* watchdog works for writes as well? (or is it just disabled?) */ |
| 2469 | 2630 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x7000, 0x7000, 0, 0x7ff, watchdog_reset_w); |
| r2454 | r2455 | |
| 2485 | 2646 | common_init(machine, scramble_draw_bullet, scramble_draw_background, upper_extend_tile_info, NULL); |
| 2486 | 2647 | galaxian_sfx_tilemap = TRUE; |
| 2487 | 2648 | |
| 2488 | /* sfx uses 3 x 8255, so we need a non-standard interface */ | |
| 2489 | ppi8255_init(&sfx_ppi8255_intf); | |
| 2490 | ||
| 2491 | 2649 | /* sound board has space for extra ROM */ |
| 2492 | 2650 | memory_install_read8_handler(machine, 1, ADDRESS_SPACE_PROGRAM, 0x0000, 0x3fff, 0, 0, SMH_BANK1); |
| 2493 | 2651 | memory_set_bankptr(1, memory_region(REGION_CPU2)); |
| r2454 | r2455 | |
| 2497 | 2655 | static DRIVER_INIT( atlantis ) |
| 2498 | 2656 | { |
| 2499 | 2657 | /* video extensions */ |
| 2500 | | |
| 2658 | | |
| 2501 | 2659 | |
| 2502 | 2660 | /* watchdog is at $7800? (or is it just disabled?) */ |
| 2503 | 2661 | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x7000, 0x7000, 0, 0x7ff, SMH_UNMAP); |
| r2454 | r2455 | |
| 2508 | 2666 | static DRIVER_INIT( scobra ) |
| 2509 | 2667 | { |
| 2510 | 2668 | /* video extensions */ |
| 2511 | | |
| 2669 | | |
| 2512 | 2670 | } |
| 2513 | 2671 | |
| 2514 | 2672 | |
| 2515 | 2673 | static DRIVER_INIT( losttomb ) |
| 2516 | 2674 | { |
| 2517 | 2675 | /* video extensions */ |
| 2518 | | |
| 2676 | | |
| 2519 | 2677 | |
| 2520 | 2678 | /* decrypt */ |
| 2521 | 2679 | decode_losttomb_gfx(); |
| r2454 | r2455 | |
| 2525 | 2683 | static DRIVER_INIT( frogger ) |
| 2526 | 2684 | { |
| 2527 | 2685 | /* video extensions */ |
| 2528 | | |
| 2686 | | |
| 2529 | 2687 | galaxian_frogger_adjust = TRUE; |
| 2530 | 2688 | |
| 2531 | 2689 | /* decrypt */ |
| r2454 | r2455 | |
| 2554 | 2712 | static DRIVER_INIT( froggers ) |
| 2555 | 2713 | { |
| 2556 | 2714 | /* video extensions */ |
| 2557 | | |
| 2715 | | |
| 2558 | 2716 | |
| 2559 | 2717 | /* decrypt */ |
| 2560 | 2718 | decode_frogger_sound(); |
| r2454 | r2455 | |
| 2564 | 2722 | static DRIVER_INIT( turtles ) |
| 2565 | 2723 | { |
| 2566 | 2724 | /* video extensions */ |
| 2567 | | |
| 2725 | | |
| 2568 | 2726 | } |
| 2569 | 2727 | |
| 2570 | 2728 | |
| r2454 | r2455 | |
| 2573 | 2731 | { |
| 2574 | 2732 | /* no existing amidar sets run on Amidar hardware as described by Amidar schematics! */ |
| 2575 | 2733 | /* video extensions */ |
| 2576 | | |
| 2734 | | |
| 2577 | 2735 | } |
| 2578 | 2736 | #endif |
| 2579 | 2737 | |
| 2580 | 2738 | |
| 2581 | 2739 | static DRIVER_INIT( scorpion ) |
| 2582 | 2740 | { |
| 2583 | | |
| 2741 | | |
| 2584 | 2742 | |
| 2585 | 2743 | /* hook up AY8910 */ |
| 2586 | 2744 | memory_install_readwrite8_handler(machine, 1, ADDRESS_SPACE_IO, 0x00, 0xff, 0, 0, scorpion_ay8910_r, scorpion_ay8910_w); |
| 2587 | 2745 | |
| 2588 | /* configure protection */ | |
| 2589 | ppi8255_set_portCwrite(1, scorpion_protection_w); | |
| 2590 | ppi8255_set_portCread(1, scorpion_protection_r); | |
| 2591 | ||
| 2592 | 2746 | /* extra ROM */ |
| 2593 | 2747 | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x5800, 0x67ff, 0, 0, SMH_BANK1); |
| 2594 | 2748 | memory_set_bankptr(1, memory_region(REGION_CPU1) + 0x5800); |
| r2454 | r2455 | |
| 2620 | 2774 | static DRIVER_INIT( anteater ) |
| 2621 | 2775 | { |
| 2622 | 2776 | /* video extensions */ |
| 2623 | | |
| 2777 | | |
| 2624 | 2778 | |
| 2625 | 2779 | /* decode graphics */ |
| 2626 | 2780 | decode_anteater_gfx(); |
| r2454 | r2455 | |
|---|---|---|
| 68 | 68 | { |
| 69 | 69 | mame_system_time systime; |
| 70 | 70 | |
| 71 | mame_get_base_datetime( | |
| 71 | mame_get_base_datetime(machine, &systime); | |
| 72 | 72 | |
| 73 | 73 | switch (offset) |
| 74 | 74 | { |
| r2454 | r2455 | |
|---|---|---|
| 673 | 673 | |
| 674 | 674 | static const struct YM2608interface ym2608_interface = |
| 675 | 675 | { |
| 676 | 0,0,0,0,sound_irq, | |
| 676 | { | |
| 677 | AY8910_LEGACY_OUTPUT, | |
| 678 | AY8910_DEFAULT_LOADS, | |
| 679 | NULL, NULL, NULL, NULL | |
| 680 | }, | |
| 681 | sound_irq, | |
| 677 | 682 | REGION_SOUND1 |
| 678 | 683 | }; |
| 679 | 684 | |
| r2454 | r2455 | |
| 709 | 714 | |
| 710 | 715 | static VIDEO_EOF( bbuster ) |
| 711 | 716 | { |
| 712 | buffer_spriteram16_w(machine,0,0,0); | |
| 713 | buffer_spriteram16_2_w(machine,0,0,0); | |
| 717 | buffer_spriteram16_w(machine,0,0,0xffff); | |
| 718 | buffer_spriteram16_2_w(machine,0,0,0xffff); | |
| 714 | 719 | } |
| 715 | 720 | |
| 716 | 721 | static VIDEO_EOF( mechatt ) |
| 717 | 722 | { |
| 718 | buffer_spriteram16_w(machine,0,0,0); | |
| 723 | buffer_spriteram16_w(machine,0,0,0xffff); | |
| 719 | 724 | } |
| 720 | 725 | |
| 721 | 726 | static MACHINE_DRIVER_START( bbusters ) |
| r2454 | r2455 | |
| 756 | 761 | |
| 757 | 762 | MDRV_SOUND_ADD(YM2610, 8000000) |
| 758 | 763 | MDRV_SOUND_CONFIG(ym2610_interface) |
| 759 | MDRV_SOUND_ROUTE(0, "left", 0.60) | |
| 760 | MDRV_SOUND_ROUTE(0, "right", 0.60) | |
| 761 | MDRV_SOUND_ROUTE(1, "left", 0.20) | |
| 762 | MDRV_SOUND_ROUTE(2, "right", 0.20) | |
| 764 | MDRV_SOUND_ROUTE(0, "left", 3.0) | |
| 765 | MDRV_SOUND_ROUTE(0, "right", 3.0) | |
| 766 | MDRV_SOUND_ROUTE(1, "left", 1.0) | |
| 767 | MDRV_SOUND_ROUTE(2, "right", 1.0) | |
| 763 | 768 | MACHINE_DRIVER_END |
| 764 | 769 | |
| 765 | 770 | static MACHINE_DRIVER_START( mechatt ) |
| r2454 | r2455 | |
|---|---|---|
| 320 | 320 | switch( snk_io[which] ){ |
| 321 | 321 | case SNK_INP0: |
| 322 | 322 | { |
| 323 | int value = input_port_ | |
| 323 | int value = input_port_ | |
| 324 | 324 | if( (snk_sound_register & 0x04) == 0 ) value &= ~snk_sound_busy_bit; |
| 325 | 325 | return value; |
| 326 | 326 | } |
| r2454 | r2455 | |
|---|---|---|
| 128 | 128 | { |
| 129 | 129 | if (pc != 0x95f2) |
| 130 | 130 | { |
| 131 | cpunum_set_input_line( | |
| 131 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, ASSERT_LINE); | |
| 132 | 132 | subcpu_resetline = 1; |
| 133 | 133 | } else { |
| 134 | cpunum_set_input_line( | |
| 134 | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, ASSERT_LINE); | |
| 135 | 135 | subcpu_resetline = -1; |
| 136 | 136 | } |
| 137 | 137 | } |
| 138 | 138 | } else { |
| 139 | 139 | if (subcpu_resetline == 1 && (data != 0x0c)) |
| 140 | 140 | { |
| 141 | cpunum_set_input_line( | |
| 141 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, CLEAR_LINE); | |
| 142 | 142 | subcpu_resetline = 0; |
| 143 | 143 | if (pc == 0xbb0 || pc == 0x9d30 || pc == 0xb19c) |
| 144 | 144 | cpu_spinuntil_time(ATTOTIME_IN_USEC(15000)); /* sync semaphore */ |
| 145 | 145 | } |
| 146 | 146 | else if (subcpu_resetline == -1) |
| 147 | 147 | { |
| 148 | cpunum_set_input_line( | |
| 148 | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, CLEAR_LINE); | |
| 149 | 149 | subcpu_resetline = 0; |
| 150 | 150 | } |
| 151 | 151 | } |
| r2454 | r2455 | |
|---|---|---|
| 691 | 691 | { |
| 692 | 692 | if (offset < 0xb0) |
| 693 | 693 | { |
| 694 | if (mem_mask == 0x | |
| 694 | if (mem_mask == 0x | |
| 695 | 695 | { |
| 696 | 696 | namcoc7x_sound_write16((data>>16), offset*2); |
| 697 | 697 | } |
| 698 | else if (mem_mask == 0x | |
| 698 | else if (mem_mask == 0x | |
| 699 | 699 | { |
| 700 | 700 | namcoc7x_sound_write16((data&0xffff), (offset*2)+1); |
| 701 | 701 | } |
| r2454 | r2455 | |
|---|---|---|
| 104 | 104 | sound_nmi_enable = 1; |
| 105 | 105 | if (pending_nmi) |
| 106 | 106 | { |
| 107 | cpunum_set_input_line( | |
| 107 | cpunum_set_input_line(machine, 1,INPUT_LINE_NMI,PULSE_LINE); | |
| 108 | 108 | pending_nmi = 0; |
| 109 | 109 | } |
| 110 | 110 | } |
| r2454 | r2455 | |
| 672 | 672 | |
| 673 | 673 | static const struct AY8910interface ay8910_interface = |
| 674 | 674 | { |
| 675 | 0, | |
| 676 | 0, | |
| 675 | AY8910_LEGACY_OUTPUT, | |
| 676 | AY8910_DEFAULT_LOADS, | |
| 677 | NULL, | |
| 678 | NULL, | |
| 677 | 679 | sound_control_2_w, |
| 678 | 680 | sound_control_3_w |
| 679 | 681 | }; |
| r2454 | r2455 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | Final Crash is a bootleg of Final Fight |
| 6 | 6 | |
| 7 | Final Fight is by Capcom and runs on CPS1 hard | |
| 7 | Final Fight is by Capcom and runs on CPS1 hard | |
| 8 | 8 | The bootleg was manufactured by Playmark of Italy |
| 9 | 9 | |
| 10 | 10 | this driver depends heavily on cps1.c, but has been |
| 11 | 11 | kept apart in an attempt to keep cps1.c clutter free |
| 12 | 12 | |
| 13 | todo: | |
| 14 | Add Sound (very different to CPS1) | |
| 13 | Sound is very different from CPS1. | |
| 15 | 14 | |
| 16 | 15 | --- |
| 17 | 16 | |
| r2454 | r2455 | |
| 36 | 35 | #include "driver.h" |
| 37 | 36 | #include "cpu/m68000/m68kmame.h" |
| 38 | 37 | #include "cps1.h" |
| 38 | #include "sound/2203intf.h" | |
| 39 | #include "sound/msm5205.h" | |
| 39 | 40 | |
| 41 | ||
| 42 | static int sample_buffer1, sample_buffer2; | |
| 43 | static int sample_select1, sample_select2; | |
| 44 | ||
| 45 | static WRITE16_HANDLER( fcrash_soundlatch_w ) | |
| 46 | { | |
| 47 | if (ACCESSING_BITS_0_7) | |
| 48 | { | |
| 49 | soundlatch_w(machine,0,data & 0xff); | |
| 50 | cpunum_set_input_line(machine, 1, 0, HOLD_LINE); | |
| 51 | } | |
| 52 | } | |
| 53 | ||
| 54 | static WRITE8_HANDLER( fcrash_snd_bankswitch_w ) | |
| 55 | { | |
| 56 | UINT8 *RAM = memory_region(REGION_CPU2); | |
| 57 | int bankaddr; | |
| 58 | ||
| 59 | sndti_set_output_gain(SOUND_MSM5205, 0, 0, (data & 0x08) ? 0.0 : 1.0); | |
| 60 | sndti_set_output_gain(SOUND_MSM5205, 1, 0, (data & 0x10) ? 0.0 : 1.0); | |
| 61 | ||
| 62 | bankaddr = ((data & 7) * 0x4000); | |
| 63 | memory_set_bankptr(1,&RAM[0x10000 + bankaddr]); | |
| 64 | } | |
| 65 | ||
| 66 | static void m5205_int1(int data) | |
| 67 | { | |
| 68 | MSM5205_data_w(0, sample_buffer1 & 0x0F); | |
| 69 | sample_buffer1 >>= 4; | |
| 70 | sample_select1 ^= 1; | |
| 71 | if (sample_select1 == 0) | |
| 72 | cpunum_set_input_line(Machine, 1, INPUT_LINE_NMI, PULSE_LINE); | |
| 73 | } | |
| 74 | ||
| 75 | static void m5205_int2(int data) | |
| 76 | { | |
| 77 | MSM5205_data_w(1, sample_buffer2 & 0x0F); | |
| 78 | sample_buffer2 >>= 4; | |
| 79 | sample_select2 ^= 1; | |
| 80 | } | |
| 81 | ||
| 82 | ||
| 83 | static WRITE8_HANDLER( fcrash_msm5205_0_data_w ) | |
| 84 | { | |
| 85 | sample_buffer1 = data; | |
| 86 | } | |
| 87 | ||
| 88 | static WRITE8_HANDLER( fcrash_msm5205_1_data_w ) | |
| 89 | { | |
| 90 | sample_buffer2 = data; | |
| 91 | } | |
| 92 | ||
| 93 | ||
| 94 | ||
| 40 | 95 | /* not verified */ |
| 41 | #define CPS1_ROWSCROLL_OFFS 0x20 /* base of row scroll offsets in other RAM */ | |
| 96 | #define CPS1_ROWSCROLL_OFFS (0x20/2) /* base of row scroll offsets in other RAM */ | |
| 42 | 97 | |
| 43 | 98 | static void fcrash_update_transmasks(void) |
| 44 | 99 | { |
| 45 | 100 | int i; |
| 46 | 101 | int priority[4]; |
| 47 | 102 | |
| 48 | priority[0]=0x66; | |
| 49 | priority[1]=0x70; | |
| 50 | priority[2]=0x68; | |
| 51 | priority[3]=0x72; | |
| 103 | priority[0]=0x26; | |
| 104 | priority[1]=0x30; | |
| 105 | priority[2]=0x28; | |
| 106 | priority[3]=0x32; | |
| 52 | 107 | |
| 53 | 108 | for (i = 0;i < 4;i++) |
| 54 | 109 | { |
| r2454 | r2455 | |
| 56 | 111 | |
| 57 | 112 | /* Get transparency registers */ |
| 58 | 113 | if (priority[i]) |
| 59 | mask = cps1_p | |
| 114 | mask = cps1_cps_b_regs[priority[i]/2] ^ 0xffff; | |
| 60 | 115 | else mask = 0xffff; /* completely transparent if priority masks not defined (mercs, qad) */ |
| 61 | 116 | |
| 62 | 117 | tilemap_set_transmask(cps1_bg_tilemap[0],i,mask,0x8000); |
| r2454 | r2455 | |
| 80 | 135 | |
| 81 | 136 | tileno = cps1_gfxram[base+pos]; |
| 82 | 137 | xpos = cps1_gfxram[base+pos+2]; |
| 83 | ypos = cps1_gfxram[base+pos-1]; | |
| 138 | ypos = cps1_gfxram[base+pos-1]&0xff; | |
| 84 | 139 | flipx = cps1_gfxram[base+pos+1]&0x20; |
| 85 | 140 | flipy = cps1_gfxram[base+pos+1]&0x40; |
| 86 | 141 | colour = cps1_gfxram[base+pos+1]&0x1f; |
| r2454 | r2455 | |
| 146 | 201 | |
| 147 | 202 | static VIDEO_UPDATE( fcrash ) |
| 148 | 203 | { |
| 149 | int layercontrol,l0,l1,l2,l3; | |
| 150 | int videocontrol=cps1_port(0x22); | |
| 204 | int layercontrol,l0,l1,l2,l3; | |
| 205 | int videocontrol=cps1_cps_a_regs[0x22/2]; | |
| 151 | 206 | |
| 152 | 207 | |
| 153 | 208 | flip_screen_set(videocontrol & 0x8000); |
| 154 | 209 | |
| 155 | layercontrol = cps1_ | |
| 210 | layercontrol = cps1_c | |
| 156 | 211 | |
| 157 | 212 | /* Get video memory base registers */ |
| 158 | 213 | cps1_get_video_base(); |
| r2454 | r2455 | |
| 172 | 227 | |
| 173 | 228 | tilemap_set_scroll_rows(cps1_bg_tilemap[1],1024); |
| 174 | 229 | |
| 175 | otheroffs = cps1_p | |
| 230 | otheroffs = cps1_cps_a_regs[CPS1_ROWSCROLL_OFFS]; | |
| 176 | 231 | |
| 177 | 232 | for (i = 0;i < 256;i++) |
| 178 | 233 | tilemap_set_scrollx(cps1_bg_tilemap[1],(i - scrly) & 0x3ff,cps1_scroll2x + cps1_other[(i + otheroffs) & 0x3ff]); |
| r2454 | r2455 | |
| 215 | 270 | } |
| 216 | 271 | |
| 217 | 272 | |
| 218 | static ADDRESS_MAP_START( fcrash_readmem, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 219 | AM_RANGE(0x000000, 0x1fffff) AM_READ(SMH_ROM) /* 68000 ROM */ | |
| 220 | AM_RANGE(0x880000, 0x880001) AM_READ(cps1_in1_r) /* Player input ports */ | |
| 221 | AM_RANGE(0x880008, 0x88000f) AM_READ(cps1_input_r) /* System input ports / Dip Switches */ | |
| 222 | AM_RANGE(0x800100, 0x8001ff) AM_READ(cps1_output_r) /* Output ports */ | |
| 223 | AM_RANGE(0x900000, 0x92ffff) AM_READ(SMH_RAM) /* SF2CE executes code from here */ | |
| 224 | AM_RANGE(0xf1c000, 0xf1c001) AM_READ(cps1_in2_r) | |
| 225 | AM_RANGE(0xf1c002, 0xf1c003) AM_READ(cps1_in3_r) | |
| 226 | AM_RANGE(0xff0000, 0xffffff) AM_READ(SMH_RAM) /* RAM */ | |
| 227 | ADDRESS_MAP_END | |
| 228 | 273 | |
| 229 | static ADDRESS_MAP_START( fcrash_writemem, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 230 | AM_RANGE(0x000000, 0x1fffff) AM_WRITE(SMH_ROM) /* ROM */ | |
| 274 | static ADDRESS_MAP_START( fcrash_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 275 | AM_RANGE(0x000000, 0x1fffff) AM_ROM | |
| 231 | 276 | AM_RANGE(0x800030, 0x800031) AM_WRITE(cps1_coinctrl_w) |
| 232 | AM_RANGE(0x800100, 0x8001ff) AM_WRITE(cps1_output_w) AM_BASE(&cps1_output) AM_SIZE(&cps1_output_size) /* Output ports */ | |
| 233 | AM_RANGE(0x900000, 0x92ffff) AM_WRITE(cps1_gfxram_w) AM_BASE(&cps1_gfxram) AM_SIZE(&cps1_gfxram_size) | |
| 234 | AM_RANGE(0xff0000, 0xffffff) AM_WRITE(SMH_RAM) /* RAM */ | |
| 277 | AM_RANGE(0x800100, 0x80013f) AM_RAM AM_BASE(&cps1_cps_a_regs) /* CPS-A custom */ | |
| 278 | AM_RANGE(0x800140, 0x80017f) AM_RAM AM_BASE(&cps1_cps_b_regs) /* CPS-B custom */ | |
| 279 | AM_RANGE(0x880000, 0x880001) AM_READ(cps1_in1_r) /* Player input ports */ | |
| 280 | AM_RANGE(0x880006, 0x880007) AM_WRITE(fcrash_soundlatch_w) /* Sound command */ | |
| 281 | AM_RANGE(0x880008, 0x88000f) AM_READ(cps1_dsw_r) /* System input ports / Dip Switches */ | |
| 282 | AM_RANGE(0x890000, 0x890001) AM_WRITENOP // palette related? | |
| 283 | AM_RANGE(0x900000, 0x92ffff) AM_RAM_WRITE(cps1_gfxram_w) AM_BASE(&cps1_gfxram) AM_SIZE(&cps1_gfxram_size) | |
| 284 | AM_RANGE(0xff0000, 0xffffff) AM_RAM | |
| 235 | 285 | ADDRESS_MAP_END |
| 236 | 286 | |
| 287 | static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 288 | AM_RANGE(0x0000, 0x7fff) AM_ROM | |
| 289 | AM_RANGE(0x8000, 0xbfff) AM_ROMBANK(1) | |
| 290 | AM_RANGE(0xd000, 0xd7ff) AM_RAM | |
| 291 | AM_RANGE(0xd800, 0xd800) AM_READWRITE(YM2203_status_port_0_r, YM2203_control_port_0_w) | |
| 292 | AM_RANGE(0xd801, 0xd801) AM_READWRITE(YM2203_read_port_0_r, YM2203_write_port_0_w) | |
| 293 | AM_RANGE(0xdc00, 0xdc00) AM_READWRITE(YM2203_status_port_0_r, YM2203_control_port_0_w) | |
| 294 | AM_RANGE(0xdc01, 0xdc01) AM_READWRITE(YM2203_read_port_0_r, YM2203_write_port_0_w) | |
| 295 | AM_RANGE(0xe000, 0xe000) AM_WRITE(fcrash_snd_bankswitch_w) | |
| 296 | AM_RANGE(0xe400, 0xe400) AM_READ(soundlatch_r) | |
| 297 | AM_RANGE(0xe800, 0xe800) AM_WRITE(fcrash_msm5205_0_data_w) | |
| 298 | AM_RANGE(0xec00, 0xec00) AM_WRITE(fcrash_msm5205_1_data_w) | |
| 299 | ADDRESS_MAP_END | |
| 237 | 300 | |
| 301 | ||
| 238 | 302 | #define CPS1_COINAGE_1 \ |
| 239 | 303 | PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) \ |
| 240 | 304 | PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) \ |
| r2454 | r2455 | |
| 340 | 404 | INPUT_PORTS_END |
| 341 | 405 | |
| 342 | 406 | |
| 407 | ||
| 408 | static const struct MSM5205interface msm5205_interface1 = | |
| 409 | { | |
| 410 | m5205_int1, /* interrupt function */ | |
| 411 | MSM5205_S96_4B /* 4KHz 4-bit */ | |
| 412 | }; | |
| 413 | ||
| 414 | static const struct MSM5205interface msm5205_interface2 = | |
| 415 | { | |
| 416 | m5205_int2, /* interrupt function */ | |
| 417 | MSM5205_S96_4B /* 4KHz 4-bit */ | |
| 418 | }; | |
| 419 | ||
| 420 | ||
| 343 | 421 | static MACHINE_DRIVER_START( fcrash ) |
| 344 | 422 | |
| 345 | 423 | /* basic machine hardware */ |
| 346 | 424 | MDRV_CPU_ADD_TAG("main", M68000, 10000000) |
| 347 | MDRV_CPU_PROGRAM_MAP(fcrash_ | |
| 425 | MDRV_CPU_PROGRAM_MAP(fcrash_ | |
| 348 | 426 | MDRV_CPU_VBLANK_INT("main", cps1_interrupt) |
| 349 | 427 | |
| 350 | // MDRV_CPU_ADD_TAG("sound", Z80, 4000000) /* ???? */ | |
| 351 | // /* audio CPU */ | |
| 352 | // MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem) | |
| 428 | MDRV_CPU_ADD_TAG("sound", Z80, 24000000/6) /* ? */ | |
| 429 | MDRV_CPU_PROGRAM_MAP(sound_map,0) | |
| 353 | 430 | |
| 354 | 431 | /* video hardware */ |
| 355 | 432 | MDRV_SCREEN_ADD("main", RASTER) |
| r2454 | r2455 | |
| 365 | 442 | MDRV_VIDEO_START(cps1) |
| 366 | 443 | MDRV_VIDEO_EOF(cps1) |
| 367 | 444 | MDRV_VIDEO_UPDATE(fcrash) |
| 445 | ||
| 446 | // sound hardware | |
| 447 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 448 | ||
| 449 | MDRV_SOUND_ADD(YM2203, 24000000/6) /* ? */ | |
| 450 | MDRV_SOUND_ROUTE(0, "mono", 0.10) | |
| 451 | MDRV_SOUND_ROUTE(1, "mono", 0.10) | |
| 452 | MDRV_SOUND_ROUTE(2, "mono", 0.10) | |
| 453 | MDRV_SOUND_ROUTE(3, "mono", 1.0) | |
| 454 | ||
| 455 | MDRV_SOUND_ADD(YM2203, 24000000/6) /* ? */ | |
| 456 | MDRV_SOUND_ROUTE(0, "mono", 0.10) | |
| 457 | MDRV_SOUND_ROUTE(1, "mono", 0.10) | |
| 458 | MDRV_SOUND_ROUTE(2, "mono", 0.10) | |
| 459 | MDRV_SOUND_ROUTE(3, "mono", 1.0) | |
| 460 | ||
| 461 | MDRV_SOUND_ADD(MSM5205, 24000000/64) /* ? */ | |
| 462 | MDRV_SOUND_CONFIG(msm5205_interface1) | |
| 463 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) | |
| 464 | ||
| 465 | MDRV_SOUND_ADD(MSM5205, 24000000/64) /* ? */ | |
| 466 | MDRV_SOUND_CONFIG(msm5205_interface2) | |
| 467 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) | |
| 368 | 468 | MACHINE_DRIVER_END |
| 369 | 469 | |
| 370 | 470 | |
| r2454 | r2455 | |
| 405 | 505 | ROM_RELOAD( 0x10000, 0x20000 ) |
| 406 | 506 | ROM_END |
| 407 | 507 | |
| 408 | GAME( 1990, fcrash, ffight, fcrash, fcrash, cps1, ROT0, "Playmark, bootleg [Capcom]", "Final Crash (World, bootleg)", | |
| 508 | GAME( 1990, fcrash, ffight, fcrash, fcrash, cps1, ROT0, "Playmark, bootleg [Capcom]", "Final Crash (World, bootleg)", 0 |
| r2454 | r2455 | |
|---|---|---|
| 98 | 98 | if ((activecpu_get_pc() == 0x000379de) || |
| 99 | 99 | (activecpu_get_pc() == 0x000379cc) ) activecpu_adjust_icount(-100); |
| 100 | 100 | //else printf("PC %08x\n", activecpu_get_pc() ); |
| 101 | return input_port_ | |
| 101 | return input_port_ | |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 |
| r2454 | r2455 | |
|---|---|---|
| 48 | 48 | |
| 49 | 49 | |
| 50 | 50 | #include "driver.h" |
| 51 | #include "deprecat.h" | |
| 52 | 51 | #include "cpu/m6502/m6502.h" |
| 53 | 52 | #include "slapstic.h" |
| 54 | 53 | #include "atetris.h" |
| r2454 | r2455 | |
| 93 | 92 | |
| 94 | 93 | static WRITE8_HANDLER( irq_ack_w ) |
| 95 | 94 | { |
| 96 | cpunum_set_input_line( | |
| 95 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 97 | 96 | } |
| 98 | 97 | |
| 99 | 98 |
| r2454 | r2455 | |
|---|---|---|
| 142 | 142 | { |
| 143 | 143 | UINT32 *dest = &vram[offset+(0x40000/4)*vbuffer]; |
| 144 | 144 | |
| 145 | if (mem_mask == 0) | |
| 145 | if (mem_mask == 0xffffffff) | |
| 146 | 146 | { |
| 147 | 147 | if (~data & 0x80000000) |
| 148 | 148 | *dest = (*dest & 0x0000ffff) | (data & 0xffff0000); |
| r2454 | r2455 | |
| 150 | 150 | if (~data & 0x00008000) |
| 151 | 151 | *dest = (*dest & 0xffff0000) | (data & 0x0000ffff); |
| 152 | 152 | } |
| 153 | else if (((mem_mask == 0x0000ffff) && (~data & 0x80000000)) || | |
| 154 | ((mem_mask == 0xffff0000) && (~data & 0x00008000))) | |
| 153 | else if (((mem_mask == 0xffff0000) && (~data & 0x80000000)) || | |
| 154 | ((mem_mask == 0x0000ffff) && (~data & 0x00008000))) | |
| 155 | 155 | COMBINE_DATA(dest); |
| 156 | 156 | } |
| 157 | 157 | |
| r2454 | r2455 | |
| 182 | 182 | { |
| 183 | 183 | /* burn a bunch of cycles because this is polled frequently during busy loops */ |
| 184 | 184 | activecpu_adjust_icount(-100); |
| 185 | return input_port_ | |
| 185 | return input_port_ | |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | static ADDRESS_MAP_START( cpu_map, ADDRESS_SPACE_PROGRAM, 32 ) |
| r2454 | r2455 | |
|---|---|---|
| 924 | 924 | |
| 925 | 925 | static READ32_HANDLER( model2_serial_r ) |
| 926 | 926 | { |
| 927 | if ((offset == 0) && (mem_mask == 0x | |
| 927 | if ((offset == 0) && (mem_mask == 0x | |
| 928 | 928 | { |
| 929 | 929 | return 0x00070000; // TxRdy RxRdy (zeroguna also needs bit 4 set) |
| 930 | 930 | } |
| r2454 | r2455 | |
| 934 | 934 | |
| 935 | 935 | static WRITE32_HANDLER( model2o_serial_w ) |
| 936 | 936 | { |
| 937 | if (mem_mask == 0x | |
| 937 | if (mem_mask == 0x | |
| 938 | 938 | { |
| 939 | 939 | snd_latch_to_68k_w(data&0xff); |
| 940 | 940 | } |
| r2454 | r2455 | |
| 1007 | 1007 | |
| 1008 | 1008 | static WRITE32_HANDLER( model2_prot_w ) |
| 1009 | 1009 | { |
| 1010 | if (mem_mask == 0xffff) | |
| 1010 | if (mem_mask == 0xffff0000) | |
| 1011 | 1011 | { |
| 1012 | 1012 | data >>= 16; |
| 1013 | 1013 | } |
| r2454 | r2455 | |
| 1085 | 1085 | if (offset <= 0x1f/4) |
| 1086 | 1086 | { |
| 1087 | 1087 | // special |
| 1088 | if (mem_mask == 0x | |
| 1088 | if (mem_mask == 0x | |
| 1089 | 1089 | { |
| 1090 | 1090 | // 16-bit protection reads |
| 1091 | 1091 | model2_maxxstate++; |
| r2454 | r2455 | |
| 1106 | 1106 | } |
| 1107 | 1107 | } |
| 1108 | 1108 | } |
| 1109 | else if (mem_mask == 0) | |
| 1109 | else if (mem_mask == 0xffffffff) | |
| 1110 | 1110 | { |
| 1111 | 1111 | // 32-bit read |
| 1112 | 1112 | if (offset == 0x22/4) |
| r2454 | r2455 | |
| 1127 | 1127 | |
| 1128 | 1128 | static READ32_HANDLER( network_r ) |
| 1129 | 1129 | { |
| 1130 | if ((mem_mask == 0) || (mem_mask == 0x | |
| 1130 | if ((mem_mask == 0xffffffff) || (mem_mask == 0x | |
| 1131 | 1131 | { |
| 1132 | 1132 | return 0xffffffff; |
| 1133 | 1133 | } |
| r2454 | r2455 | |
| 1137 | 1137 | return model2_netram[offset]; |
| 1138 | 1138 | } |
| 1139 | 1139 | |
| 1140 | if (mem_mask == 0x | |
| 1140 | if (mem_mask == 0x | |
| 1141 | 1141 | { |
| 1142 | 1142 | return sysres<<16; |
| 1143 | 1143 | } |
| 1144 | else if (mem_mask == 0x | |
| 1144 | else if (mem_mask == 0x | |
| 1145 | 1145 | { |
| 1146 | 1146 | return zflagi; |
| 1147 | 1147 | } |
| r2454 | r2455 | |
| 1151 | 1151 | |
| 1152 | 1152 | static WRITE32_HANDLER( network_w ) |
| 1153 | 1153 | { |
| 1154 | if ((mem_mask == 0) || (mem_mask == 0x | |
| 1154 | if ((mem_mask == 0xffffffff) || (mem_mask == 0x | |
| 1155 | 1155 | { |
| 1156 | 1156 | COMBINE_DATA(&model2_netram[offset+0x4000/4]); |
| 1157 | 1157 | return; |
| r2454 | r2455 | |
| 1163 | 1163 | return; |
| 1164 | 1164 | } |
| 1165 | 1165 | |
| 1166 | if (mem_mask == 0x | |
| 1166 | if (mem_mask == 0x | |
| 1167 | 1167 | { |
| 1168 | 1168 | sysres = data>>16; |
| 1169 | 1169 | } |
| 1170 | else if (mem_mask == 0x | |
| 1170 | else if (mem_mask == 0x | |
| 1171 | 1171 | { |
| 1172 | 1172 | zflagi = data; |
| 1173 | 1173 | zflag = 0; |
| r2454 | r2455 | |
|---|---|---|
| 203 | 203 | static WRITE16_HANDLER( bmc_RAMDAC_color_w ) |
| 204 | 204 | { |
| 205 | 205 | colorram[clr_offset]=data; |
| 206 | palette_set_color_rgb( | |
| 206 | palette_set_color_rgb(machine,clr_offset/3,pal6bit(colorram[(clr_offset/3)*3]),pal6bit(colorram[(clr_offset/3)*3+1]),pal6bit(colorram[(clr_offset/3)*3+2])); | |
| 207 | 207 | clr_offset=(clr_offset+1)%768; |
| 208 | 208 | } |
| 209 | 209 | |
| r2454 | r2455 | |
| 463 | 463 | |
| 464 | 464 | static const struct AY8910interface ay8910_interface = |
| 465 | 465 | { |
| 466 | AY8910_LEGACY_OUTPUT, | |
| 467 | AY8910_DEFAULT_LOADS, | |
| 466 | 468 | dips1_r, |
| 467 | 0, | |
| 468 | 0, | |
| 469 | NULL, | |
| 470 | NULL, | |
| 469 | 471 | input_mux_w |
| 470 | 472 | }; |
| 471 | 473 |
| r2454 | r2455 | |
|---|---|---|
| 83 | 83 | |
| 84 | 84 | if (offset == (0x260 >> 1)) { |
| 85 | 85 | //soundlatch_w(0,data&0xff); |
| 86 | //cpunum_set_input_line( | |
| 86 | //cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, PULSE_LINE); | |
| 87 | 87 | } |
| 88 | 88 | } |
| 89 | 89 | |
| r2454 | r2455 | |
| 142 | 142 | orientation when entering the "test mode" |
| 143 | 143 | (check the game code from 0x0006b8 to 0x0006f0). |
| 144 | 144 | I can't tell however if this is accurate or not. */ |
| 145 | sshangha_control_0_w(machine, 0, 0x10, 0x | |
| 145 | sshangha_control_0_w(machine, 0, 0x10, 0x | |
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | /******************************************************************************/ |
| r2454 | r2455 | |
| 334 | 334 | |
| 335 | 335 | static const struct YM2203interface ym2203_interface = |
| 336 | 336 | { |
| 337 | 0,0,0,0,irqhandler | |
| 337 | { | |
| 338 | AY8910_LEGACY_OUTPUT, | |
| 339 | AY8910_DEFAULT_LOADS, | |
| 340 | NULL, NULL, NULL, NULL | |
| 341 | }, | |
| 342 | irqhandler | |
| 338 | 343 | }; |
| 339 | 344 | |
| 340 | 345 | static MACHINE_DRIVER_START( sshangha ) |
| r2454 | r2455 | |
|---|---|---|
| 34 | 34 | |
| 35 | 35 | ***************************************************************************/ |
| 36 | 36 | #include "driver.h" |
| 37 | #include "deprecat.h" | |
| 38 | 37 | #include "cpu/z80/z80.h" |
| 39 | 38 | #include "sound/custom.h" |
| 40 | 39 | |
| r2454 | r2455 | |
| 87 | 86 | static WRITE8_HANDLER( subcpu_reset_w ) |
| 88 | 87 | { |
| 89 | 88 | if (data & 1) |
| 90 | cpunum_set_input_line( | |
| 89 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, CLEAR_LINE); | |
| 91 | 90 | else |
| 92 | cpunum_set_input_line( | |
| 91 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, ASSERT_LINE); | |
| 93 | 92 | } |
| 94 | 93 | |
| 95 | 94 |
| r2454 | r2455 | |
|---|---|---|
| 46 | 46 | |
| 47 | 47 | WRITE8_HANDLER( kyugo_sub_cpu_control_w ) |
| 48 | 48 | { |
| 49 | cpunum_set_input_line( | |
| 49 | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, data ? CLEAR_LINE : ASSERT_LINE); | |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | |
| r2454 | r2455 | |
| 479 | 479 | |
| 480 | 480 | static const struct AY8910interface ay8910_interface = |
| 481 | 481 | { |
| 482 | AY8910_LEGACY_OUTPUT, | |
| 483 | AY8910_DEFAULT_LOADS, | |
| 482 | 484 | input_port_0_r, |
| 483 | input_port_1_r | |
| 485 | input_port_1_r, | |
| 486 | NULL, | |
| 487 | NULL | |
| 484 | 488 | }; |
| 485 | 489 | |
| 486 | 490 | |
| r2454 | r2455 | |
| 493 | 497 | static MACHINE_DRIVER_START( gyrodine ) |
| 494 | 498 | |
| 495 | 499 | /* basic machine hardware */ |
| 496 | MDRV_CPU_ADD_TAG("main", Z80, 18432 | |
| 500 | MDRV_CPU_ADD_TAG("main", Z80, XTAL_18_432MHz | |
| 497 | 501 | MDRV_CPU_PROGRAM_MAP(main_map,0) |
| 498 | 502 | MDRV_CPU_IO_MAP(0,gyrodine_portmap) |
| 499 | 503 | MDRV_CPU_VBLANK_INT("main", nmi_line_pulse) |
| 500 | 504 | |
| 501 | MDRV_CPU_ADD_TAG("sub", Z80, 18432 | |
| 505 | MDRV_CPU_ADD_TAG("sub", Z80, XTAL_18_432MHz | |
| 502 | 506 | MDRV_CPU_PROGRAM_MAP(gyrodine_sub_map,0) |
| 503 | 507 | MDRV_CPU_IO_MAP(gyrodine_sub_portmap,0) |
| 504 | 508 | MDRV_CPU_VBLANK_INT_HACK(irq0_line_hold,4) |
| r2454 | r2455 | |
| 525 | 529 | /* sound hardware */ |
| 526 | 530 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 527 | 531 | |
| 528 | MDRV_SOUND_ADD(AY8910, 1 | |
| 532 | MDRV_SOUND_ADD(AY8910, XTAL_18_432MHz/12) /* verified on pcb */ | |
| 529 | 533 | MDRV_SOUND_CONFIG(ay8910_interface) |
| 530 | 534 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) |
| 531 | 535 | |
| 532 | MDRV_SOUND_ADD(AY8910, 1 | |
| 536 | MDRV_SOUND_ADD(AY8910, XTAL_18_432MHz/12) /* verified on pcb */ | |
| 533 | 537 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) |
| 534 | 538 | MACHINE_DRIVER_END |
| 535 | 539 |
| r2454 | r2455 | |
|---|---|---|
| 681 | 681 | |
| 682 | 682 | static const struct AY8910interface ay8910_interface = |
| 683 | 683 | { |
| 684 | leland_sound_port_r, | |
| 684 | AY8910_LEGACY_OUTPUT, | |
| 685 | AY8910_DEFAULT_LOADS, | |
| 686 | leland_sound_port_r, | |
| 685 | 687 | 0, |
| 686 | ||
| 688 | | |
| 687 | 689 | 0 |
| 688 | 690 | }; |
| 689 | 691 |
| r2454 | r2455 | |
|---|---|---|
| 67 | 67 | |
| 68 | 68 | static const struct AY8910interface ay8910_interface = |
| 69 | 69 | { |
| 70 | 0, /* Input A: DSW 2 */ | |
| 71 | 0, /* Input B: DSW 1 */ | |
| 70 | AY8910_LEGACY_OUTPUT, | |
| 71 | AY8910_DEFAULT_LOADS, | |
| 72 | NULL, /* Input A: DSW 2 */ | |
| 73 | NULL, /* Input B: DSW 1 */ | |
| 74 | NULL, | |
| 75 | NULL | |
| 72 | 76 | }; |
| 73 | 77 | |
| 74 | 78 | static const struct MSM5205interface msm5205_interface = |
| r2454 | r2455 | |
|---|---|---|
| 463 | 463 | int res; |
| 464 | 464 | |
| 465 | 465 | |
| 466 | res = input_port_3_r(machine,offset); | |
| 467 | res |= (input_port_4_r(machine,offset) << (7-dswbit)) & 0x80; | |
| 466 | res = input_port_read_indexed(machine,3); | |
| 467 | res |= (input_port_read_indexed(machine,4) << (7-dswbit)) & 0x80; | |
| 468 | 468 | |
| 469 | 469 | return res; |
| 470 | 470 | } |
| 471 | 471 | |
| 472 | 472 | static const struct AY8910interface ay8910_interface = |
| 473 | 473 | { |
| 474 | AY8910_LEGACY_OUTPUT, | |
| 475 | AY8910_DEFAULT_LOADS, | |
| 474 | 476 | popeye_portA_r, |
| 475 | 0, | |
| 476 | 0, | |
| 477 | NULL, | |
| 478 | NULL, | |
| 477 | 479 | popeye_portB_w |
| 478 | 480 | }; |
| 479 | 481 |
| r2454 | r2455 | |
|---|---|---|
| 95 | 95 | *********************************************************************/ |
| 96 | 96 | |
| 97 | 97 | #include "driver.h" |
| 98 | #include "deprecat.h" | |
| 99 | 98 | #include "sound/okim6295.h" |
| 100 | 99 | |
| 101 | 100 | static UINT32 *gstream_vram; |
| r2454 | r2455 | |
| 112 | 111 | { |
| 113 | 112 | COMBINE_DATA(&paletteram32[offset]); |
| 114 | 113 | |
| 115 | palette_set_color_rgb( | |
| 114 | palette_set_color_rgb(machine,offset*2,pal5bit(paletteram32[offset] >> (0+16)), | |
| 116 | 115 | pal5bit(paletteram32[offset] >> (6+16)), |
| 117 | 116 | pal5bit(paletteram32[offset] >> (11+16))); |
| 118 | 117 | |
| 119 | 118 | |
| 120 | palette_set_color_rgb( | |
| 119 | palette_set_color_rgb(machine,offset*2+1,pal5bit(paletteram32[offset] >> (0)), | |
| 121 | 120 | pal5bit(paletteram32[offset] >> (6)), |
| 122 | 121 | pal5bit(paletteram32[offset] >> (11))); |
| 123 | 122 | } |
| r2454 | r2455 | |
|---|---|---|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | |
| 96 | static const ppi8255_interface ppi8255_intf = | |
| 96 | static const ppi8255_interface ppi8255_intf[5] = | |
| 97 | 97 | { |
| 98 | 5, /* 5 chips */ | |
| 99 | { p0a_r, NULL, NULL, NULL, NULL }, /* Port A read */ | |
| 100 | { NULL, p1b_r, NULL, NULL, NULL }, /* Port B read */ | |
| 101 | { p0c_r, p1c_r, NULL, NULL, NULL }, /* Port C read */ | |
| 102 | { NULL, p1a_w, p2a_w, p3a_w, p4a_w }, /* Port A write */ | |
| 103 | { p0b_w, NULL, p2b_w, p3b_w, p4b_w }, /* Port B write */ | |
| 104 | { p0c_w, p1c_w, p2c_w, p3c_w, p4c_w } /* Port C write */ | |
| 98 | { | |
| 99 | p0a_r, /* Port A read */ | |
| 100 | NULL, /* Port B read */ | |
| 101 | p0c_r, /* Port C read */ | |
| 102 | NULL, /* Port A write */ | |
| 103 | p0b_w, /* Port B write */ | |
| 104 | p0c_w /* Port C write */ | |
| 105 | }, | |
| 106 | { | |
| 107 | NULL, /* Port A read */ | |
| 108 | p1b_r, /* Port B read */ | |
| 109 | p1c_r, /* Port C read */ | |
| 110 | p1a_w, /* Port A write */ | |
| 111 | NULL, /* Port B write */ | |
| 112 | p1c_w /* Port C write */ | |
| 113 | }, | |
| 114 | { | |
| 115 | NULL, /* Port A read */ | |
| 116 | NULL, /* Port B read */ | |
| 117 | NULL, /* Port C read */ | |
| 118 | p2a_w, /* Port A write */ | |
| 119 | p2b_w, /* Port B write */ | |
| 120 | p2c_w /* Port C write */ | |
| 121 | }, | |
| 122 | { | |
| 123 | NULL, /* Port A read */ | |
| 124 | NULL, /* Port B read */ | |
| 125 | NULL, /* Port C read */ | |
| 126 | p3a_w, /* Port A write */ | |
| 127 | p3b_w, /* Port B write */ | |
| 128 | p3c_w /* Port C write */ | |
| 129 | }, | |
| 130 | { | |
| 131 | NULL, /* Port A read */ | |
| 132 | NULL, /* Port B read */ | |
| 133 | NULL, /* Port C read */ | |
| 134 | p4a_w, /* Port A write */ | |
| 135 | p4b_w, /* Port B write */ | |
| 136 | p4c_w /* Port C write */ | |
| 137 | } | |
| 105 | 138 | }; |
| 106 | 139 | |
| 107 | static MACHINE_RESET( taxidrvr ) | |
| 108 | { | |
| 109 | ppi8255_init(&ppi8255_intf); | |
| 110 | } | |
| 111 | 140 | |
| 112 | ||
| 113 | ||
| 114 | 141 | static ADDRESS_MAP_START( readmem1, ADDRESS_SPACE_PROGRAM, 8 ) |
| 115 | 142 | AM_RANGE(0x0000, 0x7fff) AM_READ(SMH_ROM) |
| 116 | 143 | AM_RANGE(0x8000, 0x8fff) AM_READ(SMH_RAM) |
| r2454 | r2455 | |
| 120 | 147 | AM_RANGE(0xc000, 0xc7ff) AM_READ(SMH_RAM) |
| 121 | 148 | AM_RANGE(0xd800, 0xdfff) AM_READ(SMH_RAM) |
| 122 | 149 | AM_RANGE(0xe000, 0xf3ff) AM_READ(SMH_RAM) |
| 123 | AM_RANGE(0xf400, 0xf403) AM_READ(ppi8255_0_r) | |
| 124 | AM_RANGE(0xf480, 0xf483) AM_READ(ppi8255_2_r) | |
| 125 | AM_RANGE(0xf500, 0xf503) AM_READ(ppi8255_3_r) | |
| 126 | AM_RANGE(0xf580, 0xf583) AM_READ(ppi8255_4_r) | |
| 150 | AM_RANGE(0xf400, 0xf403) AM_DEVREAD(PPI8255, "ppi8255_0", ppi8255_r) | |
| 151 | AM_RANGE(0xf480, 0xf483) AM_DEVREAD(PPI8255, "ppi8255_2", ppi8255_r) | |
| 152 | AM_RANGE(0xf500, 0xf503) AM_DEVREAD(PPI8255, "ppi8255_3", ppi8255_r) | |
| 153 | AM_RANGE(0xf580, 0xf583) AM_DEVREAD(PPI8255, "ppi8255_4", ppi8255_r) | |
| 127 | 154 | AM_RANGE(0xf800, 0xffff) AM_READ(SMH_RAM) |
| 128 | 155 | ADDRESS_MAP_END |
| 129 | 156 | |
| r2454 | r2455 | |
| 141 | 168 | AM_RANGE(0xe400, 0xebff) AM_WRITE(SMH_RAM) AM_BASE(&taxidrvr_vram2) /* bg1 tilemap */ |
| 142 | 169 | AM_RANGE(0xec00, 0xefff) AM_WRITE(SMH_RAM) AM_BASE(&taxidrvr_vram0) /* fg tilemap */ |
| 143 | 170 | AM_RANGE(0xf000, 0xf3ff) AM_WRITE(SMH_RAM) AM_BASE(&taxidrvr_vram3) /* bg2 tilemap */ |
| 144 | AM_RANGE(0xf400, 0xf403) AM_WRITE(ppi8255_0_w) | |
| 145 | AM_RANGE(0xf480, 0xf483) AM_WRITE(ppi8255_2_w) /* "sprite1" placement */ | |
| 146 | AM_RANGE(0xf500, 0xf503) AM_WRITE(ppi8255_3_w) /* "sprite2" placement */ | |
| 147 | AM_RANGE(0xf580, 0xf583) AM_WRITE(ppi8255_4_w) /* "sprite3" placement */ | |
| 171 | AM_RANGE(0xf400, 0xf403) AM_DEVWRITE(PPI8255, "ppi8255_0", ppi8255_w) | |
| 172 | AM_RANGE(0xf480, 0xf483) AM_DEVWRITE(PPI8255, "ppi8255_2", ppi8255_w) /* "sprite1" placement */ | |
| 173 | AM_RANGE(0xf500, 0xf503) AM_DEVWRITE(PPI8255, "ppi8255_3", ppi8255_w) /* "sprite2" placement */ | |
| 174 | AM_RANGE(0xf580, 0xf583) AM_DEVWRITE(PPI8255, "ppi8255_4", ppi8255_w) /* "sprite3" placement */ | |
| 148 | 175 | // AM_RANGE(0xf780, 0xf781) AM_WRITE(SMH_RAM) /* more scroll registers? */ |
| 149 | 176 | AM_RANGE(0xf782, 0xf787) AM_WRITE(SMH_RAM) AM_BASE(&taxidrvr_scroll) /* bg scroll (three copies always identical) */ |
| 150 | 177 | AM_RANGE(0xf800, 0xffff) AM_WRITE(SMH_RAM) |
| r2454 | r2455 | |
| 154 | 181 | AM_RANGE(0x0000, 0x3fff) AM_READ(SMH_ROM) |
| 155 | 182 | AM_RANGE(0x6000, 0x67ff) AM_READ(SMH_RAM) |
| 156 | 183 | AM_RANGE(0x8000, 0x87ff) AM_READ(SMH_RAM) |
| 157 | AM_RANGE(0xa000, 0xa003) AM_READ(ppi8255_1_r) | |
| 184 | AM_RANGE(0xa000, 0xa003) AM_DEVREAD(PPI8255, "ppi8255_1", ppi8255_r) | |
| 158 | 185 | AM_RANGE(0xe000, 0xe000) AM_READ(input_port_0_r) |
| 159 | 186 | AM_RANGE(0xe001, 0xe001) AM_READ(input_port_1_r) |
| 160 | 187 | AM_RANGE(0xe002, 0xe002) AM_READ(input_port_2_r) |
| r2454 | r2455 | |
| 166 | 193 | AM_RANGE(0x0000, 0x3fff) AM_WRITE(SMH_ROM) |
| 167 | 194 | AM_RANGE(0x6000, 0x67ff) AM_WRITE(SMH_RAM) |
| 168 | 195 | AM_RANGE(0x8000, 0x87ff) AM_WRITE(SMH_RAM) |
| 169 | AM_RANGE(0xa000, 0xa003) AM_WRITE(ppi8255_1_w) | |
| 196 | AM_RANGE(0xa000, 0xa003) AM_DEVWRITE(PPI8255, "ppi8255_1", ppi8255_w) | |
| 170 | 197 | ADDRESS_MAP_END |
| 171 | 198 | |
| 172 | 199 | static ADDRESS_MAP_START( readmem3, ADDRESS_SPACE_PROGRAM, 8 ) |
| r2454 | r2455 | |
| 344 | 371 | |
| 345 | 372 | static const struct AY8910interface ay8910_interface_1 = |
| 346 | 373 | { |
| 374 | AY8910_LEGACY_OUTPUT, | |
| 375 | AY8910_DEFAULT_LOADS, | |
| 347 | 376 | p8910_0a_r, |
| 348 | 0, | |
| 349 | 0, | |
| 377 | NULL, | |
| 378 | NULL, | |
| 350 | 379 | p8910_0b_w |
| 351 | 380 | }; |
| 352 | 381 | |
| 353 | 382 | static const struct AY8910interface ay8910_interface_2 = |
| 354 | 383 | { |
| 355 | p8910_1a_r | |
| 384 | AY8910_LEGACY_OUTPUT, | |
| 385 | AY8910_DEFAULT_LOADS, | |
| 386 | p8910_1a_r, | |
| 387 | NULL, | |
| 388 | NULL, | |
| 389 | NULL | |
| 356 | 390 | }; |
| 357 | 391 | |
| 358 | 392 | |
| r2454 | r2455 | |
| 375 | 409 | |
| 376 | 410 | MDRV_INTERLEAVE(100) /* 100 CPU slices per frame - an high value to ensure proper */ |
| 377 | 411 | /* synchronization of the CPUs */ |
| 378 | MDRV_MACHINE_RESET(taxidrvr) | |
| 379 | 412 | |
| 413 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 414 | MDRV_DEVICE_CONFIG( ppi8255_intf[0] ) | |
| 415 | ||
| 416 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 417 | MDRV_DEVICE_CONFIG( ppi8255_intf[1] ) | |
| 418 | ||
| 419 | MDRV_DEVICE_ADD( "ppi8255_2", PPI8255 ) | |
| 420 | MDRV_DEVICE_CONFIG( ppi8255_intf[2] ) | |
| 421 | ||
| 422 | MDRV_DEVICE_ADD( "ppi8255_3", PPI8255 ) | |
| 423 | MDRV_DEVICE_CONFIG( ppi8255_intf[3] ) | |
| 424 | ||
| 425 | MDRV_DEVICE_ADD( "ppi8255_4", PPI8255 ) | |
| 426 | MDRV_DEVICE_CONFIG( ppi8255_intf[4] ) | |
| 427 | ||
| 380 | 428 | /* video hardware */ |
| 381 | 429 | MDRV_SCREEN_ADD("main", RASTER) |
| 382 | 430 | MDRV_SCREEN_REFRESH_RATE(60) |
| r2454 | r2455 | |
|---|---|---|
| 201 | 201 | |
| 202 | 202 | static const struct YM2203interface ym2203_interface = |
| 203 | 203 | { |
| 204 | 0, | |
| 205 | 0, | |
| 206 | compgolf_scrollx_lo_w, | |
| 207 | compgolf_scrolly_lo_w, | |
| 204 | { | |
| 205 | AY8910_LEGACY_OUTPUT, | |
| 206 | AY8910_DEFAULT_LOADS, | |
| 207 | NULL, | |
| 208 | NULL, | |
| 209 | compgolf_scrollx_lo_w, | |
| 210 | compgolf_scrolly_lo_w, | |
| 211 | }, | |
| 208 | 212 | sound_irq |
| 209 | 213 | }; |
| 210 | 214 |
| r2454 | r2455 | |
|---|---|---|
| 646 | 646 | } |
| 647 | 647 | scancount++; |
| 648 | 648 | |
| 649 | if(cps1_output[0x50/2] & 0x8000) | |
| 650 | cps1_output[0x50/2] = cps1_output[0x50/2] & 0x1ff; | |
| 651 | if(cps1_output[0x52/2] & 0x8000) | |
| 652 | cps1_output[0x52/2] = cps1_output[0x52/2] & 0x1ff; | |
| 649 | if (cps1_cps_b_regs[0x10/2] & 0x8000) | |
| 650 | cps1_cps_b_regs[0x10/2] = cps1_cps_b_regs[0x10/2] & 0x1ff; | |
| 651 | if (cps1_cps_b_regs[0x12/2] & 0x8000) | |
| 652 | cps1_cps_b_regs[0x12/2] = cps1_cps_b_regs[0x12/2] & 0x1ff; | |
| 653 | 653 | |
| 654 | // popmessage("%04x %04x - %04x %04x",cps1_scanline1,cps1_scanline2,cps1_ | |
| 654 | // popmessage("%04x %04x - %04x %04x",cps1_scanline1,cps1_scanline2,cps1_c | |
| 655 | 655 | |
| 656 | 656 | /* raster effects */ |
| 657 | 657 | if(cps1_scanline1 == scancount || (cps1_scanline1 < scancount && !cps1_scancalls)) |
| 658 | 658 | { |
| 659 | cps1_ | |
| 659 | cps1_c | |
| 660 | 660 | cpunum_set_input_line(machine, 0, 4, HOLD_LINE); |
| 661 | 661 | cps2_set_sprite_priorities(); |
| 662 | 662 | video_screen_update_partial(machine->primary_screen, 16 - 10 + scancount); /* visarea.min_y - [first visible line?] + scancount */ |
| r2454 | r2455 | |
| 667 | 667 | /* raster effects */ |
| 668 | 668 | if(cps1_scanline2 == scancount || (cps1_scanline2 < scancount && !cps1_scancalls)) |
| 669 | 669 | { |
| 670 | cps1_ | |
| 670 | cps1_c | |
| 671 | 671 | cpunum_set_input_line(machine, 0, 4, HOLD_LINE); |
| 672 | 672 | cps2_set_sprite_priorities(); |
| 673 | 673 | video_screen_update_partial(machine->primary_screen, 16 - 10 + scancount); /* visarea.min_y - [first visible line?] + scancount */ |
| r2454 | r2455 | |
| 677 | 677 | |
| 678 | 678 | if(scancount == 256) /* VBlank */ |
| 679 | 679 | { |
| 680 | cps1_output[0x50/2] = cps1_scanline1; | |
| 681 | cps1_output[0x52/2] = cps1_scanline2; | |
| 680 | cps1_cps_b_regs[0x10/2] = cps1_scanline1; | |
| 681 | cps1_cps_b_regs[0x12/2] = cps1_scanline2; | |
| 682 | 682 | cpunum_set_input_line(machine, 0, 2, HOLD_LINE); |
| 683 | 683 | if(cps1_scancalls) |
| 684 | 684 | { |
| r2454 | r2455 | |
| 863 | 863 | static ADDRESS_MAP_START( cps2_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| 864 | 864 | AM_RANGE(0x000000, 0x3fffff) AM_READ(SMH_ROM) /* 68000 ROM */ |
| 865 | 865 | AM_RANGE(0x400000, 0x40000b) AM_READ(SMH_RAM) /* CPS2 object output */ |
| 866 | AM_RANGE(0x618000, 0x619fff) AM_READ(qsound_sharedram1_r) | |
| 866 | AM_RANGE(0x618000, 0x619fff) AM_READ(qsound_sharedram1_r) | |
| 867 | 867 | AM_RANGE(0x662000, 0x662001) AM_READ(SMH_RAM) /* Network adapter related, accessed in SSF2TB */ |
| 868 | 868 | AM_RANGE(0x662008, 0x662009) AM_READ(SMH_RAM) /* Network adapter related, accessed in SSF2TB */ |
| 869 | 869 | AM_RANGE(0x662020, 0x662021) AM_READ(SMH_RAM) /* Network adapter related, accessed in SSF2TB */ |
| 870 | 870 | AM_RANGE(0x660000, 0x663fff) AM_READ(SMH_RAM) /* When bit 14 of 0x804030 equals 0 this space is available. Many games store highscores and other info here if available. */ |
| 871 | 871 | AM_RANGE(0x664000, 0x664001) AM_READ(SMH_RAM) /* Unknown - Only used if 0x660000-0x663fff available (could be RAM enable?) */ |
| 872 | AM_RANGE(0x708000, 0x709fff) AM_READ(cps2_objram2_r) /* Object RAM */ | |
| 873 | AM_RANGE(0x70a000, 0x70bfff) AM_READ(cps2_objram2_r) /* mirror */ | |
| 874 | AM_RANGE(0x70c000, 0x70dfff) AM_READ(cps2_objram2_r) /* mirror */ | |
| 875 | AM_RANGE(0x70e000, 0x70ffff) AM_READ(cps2_objram2_r) /* mirror */ | |
| 876 | AM_RANGE(0x800100, 0x8001ff) AM_READ(cps1_output_r) /* Output ports mirror (sfa) */ | |
| 877 | AM_RANGE(0x804000, 0x804001) AM_READ_PORT("IN0") /* IN0 */ | |
| 878 | AM_RANGE(0x804010, 0x804011) AM_READ_PORT("IN1") /* IN1 */ | |
| 879 | AM_RANGE(0x804020, 0x804021) AM_READ_PORT("IN2") /* IN2 + EEPROM */ | |
| 880 | AM_RANGE(0x804030, 0x804031) AM_READ(cps2_qsound_volume_r) /* Master volume. Also when bit 14=0 addon memory is present, when bit 15=0 network adapter present. */ | |
| 881 | AM_RANGE(0x8040b0, 0x8040b3) AM_READ(kludge_r) /* unknown (xmcotaj hangs if this is 0) */ | |
| 882 | AM_RANGE(0x804100, 0x8041ff) AM_READ(cps1_output_r) /* CPS1 Output ports */ | |
| 872 | AM_RANGE(0x708000, 0x709fff) AM_READ(cps2_objram2_r) /* Object RAM */ | |
| 873 | AM_RANGE(0x70a000, 0x70bfff) AM_READ(cps2_objram2_r) /* mirror */ | |
| 874 | AM_RANGE(0x70c000, 0x70dfff) AM_READ(cps2_objram2_r) /* mirror */ | |
| 875 | AM_RANGE(0x70e000, 0x70ffff) AM_READ(cps2_objram2_r) /* mirror */ | |
| 876 | AM_RANGE(0x800140, 0x80017f) AM_READ(cps1_cps_b_r) /* mirror (sfa) */ | |
| 877 | AM_RANGE(0x804000, 0x804001) AM_READ_PORT("IN0") /* IN0 */ | |
| 878 | AM_RANGE(0x804010, 0x804011) AM_READ_PORT("IN1") /* IN1 */ | |
| 879 | AM_RANGE(0x804020, 0x804021) AM_READ_PORT("IN2") /* IN2 + EEPROM */ | |
| 880 | AM_RANGE(0x804030, 0x804031) AM_READ(cps2_qsound_volume_r) /* Master volume. Also when bit 14=0 addon memory is present, when bit 15=0 network adapter present. */ | |
| 881 | AM_RANGE(0x8040b0, 0x8040b3) AM_READ(kludge_r) /* unknown (xmcotaj hangs if this is 0) */ | |
| 882 | AM_RANGE(0x804140, 0x80417f) AM_READ(cps1_cps_b_r) /* CPS-B custom */ | |
| 883 | 883 | AM_RANGE(0x900000, 0x92ffff) AM_READ(SMH_RAM) /* Video RAM */ |
| 884 | 884 | AM_RANGE(0xff0000, 0xffffff) AM_READ(SMH_RAM) /* RAM */ |
| 885 | 885 | ADDRESS_MAP_END |
| r2454 | r2455 | |
| 898 | 898 | AM_RANGE(0x70a000, 0x70bfff) AM_WRITE(cps2_objram2_w) /* mirror */ |
| 899 | 899 | AM_RANGE(0x70c000, 0x70dfff) AM_WRITE(cps2_objram2_w) /* mirror */ |
| 900 | 900 | AM_RANGE(0x70e000, 0x70ffff) AM_WRITE(cps2_objram2_w) /* mirror */ |
| 901 | AM_RANGE(0x800100, 0x8001ff) AM_WRITE(cps1_output_w) /* Output ports mirror (sfa) */ | |
| 901 | AM_RANGE(0x800100, 0x80013f) AM_WRITE(cps1_cps_a_w) AM_BASE(&cps1_cps_a_regs) /* mirror (sfa) */ | |
| 902 | AM_RANGE(0x800140, 0x80017f) AM_WRITE(cps1_cps_b_w) AM_BASE(&cps1_cps_b_regs) /* mirror (sfa) */ | |
| 902 | 903 | AM_RANGE(0x804040, 0x804041) AM_WRITE(cps2_eeprom_port_w) /* EEPROM */ |
| 903 | 904 | AM_RANGE(0x8040a0, 0x8040a1) AM_WRITE(SMH_NOP) /* Unknown (reset once on startup) */ |
| 904 | 905 | AM_RANGE(0x8040e0, 0x8040e1) AM_WRITE(cps2_objram_bank_w) /* bit 0 = Object ram bank swap */ |
| 905 | AM_RANGE(0x804100, 0x8041ff) AM_WRITE(cps1_output_w) AM_BASE(&cps1_output) AM_SIZE(&cps1_output_size) /* Output ports */ | |
| 906 | AM_RANGE(0x804100, 0x80413f) AM_WRITE(cps1_cps_a_w) AM_BASE(&cps1_cps_a_regs) /* CPS-A custom */ | |
| 907 | AM_RANGE(0x804140, 0x80417f) AM_WRITE(cps1_cps_b_w) AM_BASE(&cps1_cps_b_regs) /* CPS-B custom */ | |
| 906 | 908 | AM_RANGE(0x900000, 0x92ffff) AM_WRITE(cps1_gfxram_w) AM_BASE(&cps1_gfxram) AM_SIZE(&cps1_gfxram_size) |
| 907 | 909 | AM_RANGE(0xff0000, 0xffffff) AM_WRITE(SMH_RAM) /* RAM */ |
| 908 | 910 | ADDRESS_MAP_END |
| r2454 | r2455 | |
| 7175 | 7177 | GAME( 1993, ssf2tb, ssf2, cps2, cps2_2p6b, ssf2tb, ROT0, "Capcom", "Super Street Fighter II: The Tournament Battle (World 931119)", 0 ) // works, but not in tournament mode |
| 7176 | 7178 | GAME( 1993, ssf2tbr1, ssf2, cps2, cps2_2p6b, ssf2tb, ROT0, "Capcom", "Super Street Fighter II: The Tournament Battle (World 930911)", 0 ) // works, but not in tournament mode |
| 7177 | 7179 | GAME( 1993, ssf2tbj, ssf2, cps2, cps2_2p6b, ssf2tb, ROT0, "Capcom", "Super Street Fighter II: The Tournament Battle (Japan 930911)", 0 ) // works, but not in tournament mode |
| 7180 | GAME( 1993, ecofghtr, 0, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Eco Fighters (World 931203)", 0 ) | |
| 7181 | GAME( 1993, ecofghtu, ecofghtr, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Eco Fighters (USA 940215)", 0 ) | |
| 7182 | GAME( 1993, ecofgtu1, ecofghtr, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Eco Fighters (USA 931203)", 0 ) | |
| 7183 | GAME( 1993, uecology, ecofghtr, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Ultimate Ecology (Japan 931203)", 0 ) | |
| 7184 | GAME( 1993, ecofghta, ecofghtr, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Eco Fighters (Asia 931203)", 0 ) | |
| 7178 | 7185 | GAME( 1993, ddtod, 0, cps2, cps2_4p4b, cps2, ROT0, "Capcom", "Dungeons & Dragons: Tower of Doom (Euro 940412)", 0 ) |
| 7179 | 7186 | GAME( 1993, ddtodr1, ddtod, cps2, cps2_4p4b, cps2, ROT0, "Capcom", "Dungeons & Dragons: Tower of Doom (Euro 940113)", 0 ) |
| 7180 | 7187 | GAME( 1993, ddtodu, ddtod, cps2, cps2_4p4b, cps2, ROT0, "Capcom", "Dungeons & Dragons: Tower of Doom (USA 940125)", 0 ) |
| r2454 | r2455 | |
| 7184 | 7191 | GAME( 1993, ddtodjr2, ddtod, cps2, cps2_4p4b, cps2, ROT0, "Capcom", "Dungeons & Dragons: Tower of Doom (Japan 940113)", 0 ) |
| 7185 | 7192 | GAME( 1993, ddtoda, ddtod, cps2, cps2_4p4b, cps2, ROT0, "Capcom", "Dungeons & Dragons: Tower of Doom (Asia 940113)", 0 ) |
| 7186 | 7193 | GAME( 1993, ddtodh, ddtod, cps2, cps2_4p4b, cps2, ROT0, "Capcom", "Dungeons & Dragons: Tower of Doom (Hispanic 940125)", 0 ) |
| 7187 | GAME( 1993, ecofghtr, 0, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Eco Fighters (World 931203)", 0 ) | |
| 7188 | GAME( 1993, ecofghtu, ecofghtr, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Eco Fighters (USA 940215)", 0 ) | |
| 7189 | GAME( 1993, ecofgtu1, ecofghtr, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Eco Fighters (USA 931203)", 0 ) | |
| 7190 | GAME( 1993, uecology, ecofghtr, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Ultimate Ecology (Japan 931203)", 0 ) | |
| 7191 | GAME( 1993, ecofghta, ecofghtr, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Eco Fighters (Asia 931203)", 0 ) | |
| 7192 | 7194 | GAME( 1994, ssf2t, ssf2, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Super Street Fighter II Turbo (World 940223)", 0 ) |
| 7193 | 7195 | GAME( 1994, ssf2ta, ssf2, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Super Street Fighter II Turbo (Asia 940223)", 0 ) |
| 7194 | 7196 | GAME( 1994, ssf2tu, ssf2, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Super Street Fighter II Turbo (USA 940323)", 0 ) |
| 7195 | 7197 | GAME( 1994, ssf2tur1, ssf2, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Super Street Fighter II Turbo (USA 940223)", 0 ) |
| 7196 | 7198 | GAME( 1994, ssf2xj, ssf2, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Super Street Fighter II X: Grand Master Challenge (Japan 940223)", 0 ) |
| 7197 | GAME( 1994, xmcota, 0, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (Euro 950105)", 0 ) | |
| 7198 | GAME( 1994, xmcotau, xmcota, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (USA 950105)", 0 ) | |
| 7199 | GAME( 1994, xmcotah, xmcota, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (Hispanic 950331)", 0 ) | |
| 7200 | GAME( 1994, xmcotaj, xmcota, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (Japan 941222)", 0 ) | |
| 7201 | GAME( 1994, xmcotaj1, xmcota, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (Japan 941219)", 0 ) | |
| 7202 | GAME( 1994, xmcotaj2, xmcota, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (Japan 941217)", 0 ) | |
| 7203 | GAME( 1994, xmcotajr, xmcota, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (Japan 941208 rent version)", 0 ) | |
| 7204 | GAME( 1994, xmcotaa, xmcota, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (Asia 941217)", 0 ) | |
| 7205 | GAME( 1994, armwar, 0, cps2, cps2_3p3b, cps2, ROT0, "Capcom", "Armored Warriors (Euro 941024)", 0 ) | |
| 7206 | GAME( 1994, armwarr1, armwar, cps2, cps2_3p3b, cps2, ROT0, "Capcom", "Armored Warriors (Euro 941011)", 0 ) | |
| 7207 | GAME( 1994, armwaru, armwar, cps2, cps2_3p3b, cps2, ROT0, "Capcom", "Armored Warriors (USA 941024)", 0 ) | |
| 7208 | GAME( 1994, pgear, armwar, cps2, cps2_3p3b, cps2, ROT0, "Capcom", "Powered Gear: Strategic Variant Armor Equipment (Japan 941024)", 0 ) | |
| 7209 | GAME( 1994, pgearr1, armwar, cps2, cps2_3p3b, cps2, ROT0, "Capcom", "Powered Gear: Strategic Variant Armor Equipment (Japan 940916)", 0 ) | |
| 7210 | GAME( 1994, armwara, armwar, cps2, cps2_3p3b, cps2, ROT0, "Capcom", "Armored Warriors (Asia 940920)", 0 ) | |
| 7211 | 7199 | GAME( 1994, avsp, 0, cps2, cps2_3p3b, cps2, ROT0, "Capcom", "Alien vs. Predator (Euro 940520)", 0 ) |
| 7212 | 7200 | GAME( 1994, avspu, avsp, cps2, cps2_3p3b, cps2, ROT0, "Capcom", "Alien vs. Predator (USA 940520)", 0 ) |
| 7213 | 7201 | GAME( 1994, avspj, avsp, cps2, cps2_3p3b, cps2, ROT0, "Capcom", "Alien vs. Predator (Japan 940520)", 0 ) |
| r2454 | r2455 | |
| 7223 | 7211 | GAME( 1994, ringdest, 0, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Ring of Destruction: Slammasters II (Euro 940902)", 0 ) |
| 7224 | 7212 | GAME( 1994, smbomb, ringdest, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Super Muscle Bomber: The International Blowout (Japan 940831)", 0 ) |
| 7225 | 7213 | GAME( 1994, smbombr1, ringdest, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Super Muscle Bomber: The International Blowout (Japan 940808)", 0 ) |
| 7226 | GAME( 1995, cybots, 0, cps2, cybots, cps2, ROT0, "Capcom", "Cyberbots: Fullmetal Madness (Euro 950424)", 0 ) | |
| 7227 | GAME( 1995, cybotsu, cybots, cps2, cybots, cps2, ROT0, "Capcom", "Cyberbots: Fullmetal Madness (USA 950424)", 0 ) | |
| 7228 | GAME( 1995, cybotsj, cybots, cps2, cybots, cps2, ROT0, "Capcom", "Cyberbots: Fullmetal Madness (Japan 950420)", 0 ) | |
| 7229 | GAME( 1995, msh, 0, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes (Euro 951024)", 0 ) | |
| 7230 | GAME( 1995, mshu, msh, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes (USA 951024)", 0 ) | |
| 7231 | GAME( 1995, mshj, msh, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes (Japan 951117)", 0 ) | |
| 7232 | GAME( 1995, mshjr1, msh, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes (Japan 951024)", 0 ) | |
| 7233 | GAME( 1995, msha, msh, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes (Asia 951024)", 0 ) | |
| 7234 | GAME( 1995, mshh, msh, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes (Hispanic 951117)", 0 ) | |
| 7235 | GAME( 1995, mshb, msh, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes (Brazil 951117)", 0 ) | |
| 7214 | GAME( 1994, armwar, 0, cps2, cps2_3p3b, cps2, ROT0, "Capcom", "Armored Warriors (Euro 941024)", 0 ) | |
| 7215 | GAME( 1994, armwarr1, armwar, cps2, cps2_3p3b, cps2, ROT0, "Capcom", "Armored Warriors (Euro 941011)", 0 ) | |
| 7216 | GAME( 1994, armwaru, armwar, cps2, cps2_3p3b, cps2, ROT0, "Capcom", "Armored Warriors (USA 941024)", 0 ) | |
| 7217 | GAME( 1994, pgear, armwar, cps2, cps2_3p3b, cps2, ROT0, "Capcom", "Powered Gear: Strategic Variant Armor Equipment (Japan 941024)", 0 ) | |
| 7218 | GAME( 1994, pgearr1, armwar, cps2, cps2_3p3b, cps2, ROT0, "Capcom", "Powered Gear: Strategic Variant Armor Equipment (Japan 940916)", 0 ) | |
| 7219 | GAME( 1994, armwara, armwar, cps2, cps2_3p3b, cps2, ROT0, "Capcom", "Armored Warriors (Asia 940920)", 0 ) | |
| 7220 | GAME( 1994, xmcota, 0, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (Euro 950105)", 0 ) | |
| 7221 | GAME( 1994, xmcotau, xmcota, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (USA 950105)", 0 ) | |
| 7222 | GAME( 1994, xmcotah, xmcota, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (Hispanic 950331)", 0 ) | |
| 7223 | GAME( 1994, xmcotaj, xmcota, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (Japan 941222)", 0 ) | |
| 7224 | GAME( 1994, xmcotaj1, xmcota, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (Japan 941219)", 0 ) | |
| 7225 | GAME( 1994, xmcotaj2, xmcota, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (Japan 941217)", 0 ) | |
| 7226 | GAME( 1994, xmcotajr, xmcota, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (Japan 941208 rent version)", 0 ) | |
| 7227 | GAME( 1994, xmcotaa, xmcota, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men: Children of the Atom (Asia 941217)", 0 ) | |
| 7236 | 7228 | GAME( 1995, nwarr, 0, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Night Warriors: Darkstalkers' Revenge (Euro 950316)", 0 ) |
| 7237 | 7229 | GAME( 1995, nwarru, nwarr, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Night Warriors: Darkstalkers' Revenge (USA 950406)", 0 ) |
| 7238 | 7230 | GAME( 1995, nwarrh, nwarr, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Night Warriors: Darkstalkers' Revenge (Hispanic 950403)", 0 ) |
| r2454 | r2455 | |
| 7240 | 7232 | GAME( 1995, vhuntj, nwarr, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Vampire Hunter: Darkstalkers' Revenge (Japan 950316)", 0 ) |
| 7241 | 7233 | GAME( 1995, vhuntjr1, nwarr, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Vampire Hunter: Darkstalkers' Revenge (Japan 950307)", 0 ) |
| 7242 | 7234 | GAME( 1995, vhuntjr2, nwarr, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Vampire Hunter: Darkstalkers' Revenge (Japan 950302)", 0 ) |
| 7235 | GAME( 1995, cybots, 0, cps2, cybots, cps2, ROT0, "Capcom", "Cyberbots: Fullmetal Madness (Euro 950424)", 0 ) | |
| 7236 | GAME( 1995, cybotsu, cybots, cps2, cybots, cps2, ROT0, "Capcom", "Cyberbots: Fullmetal Madness (USA 950424)", 0 ) | |
| 7237 | GAME( 1995, cybotsj, cybots, cps2, cybots, cps2, ROT0, "Capcom", "Cyberbots: Fullmetal Madness (Japan 950420)", 0 ) | |
| 7243 | 7238 | GAME( 1995, sfa, 0, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Alpha: Warriors' Dreams (Euro 950727)", 0 ) |
| 7244 | 7239 | GAME( 1995, sfar1, sfa, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Alpha: Warriors' Dreams (Euro 950718)", 0 ) |
| 7245 | 7240 | GAME( 1995, sfar2, sfa, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Alpha: Warriors' Dreams (Euro 950627)", 0 ) |
| r2454 | r2455 | |
| 7254 | 7249 | GAME( 1995, sfzbr1, sfa, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Zero (Brazil 950727)", 0 ) |
| 7255 | 7250 | GAME( 1995, mmancp2u, megaman, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Mega Man - The Power Battle (CPS2, USA 951006, SAMPLE Version)", 0 ) |
| 7256 | 7251 | GAME( 1995, rmancp2j, megaman, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Rockman: The Power Battle (CPS2, Japan 950922)", 0 ) |
| 7252 | GAME( 1995, msh, 0, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes (Euro 951024)", 0 ) | |
| 7253 | GAME( 1995, mshu, msh, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes (USA 951024)", 0 ) | |
| 7254 | GAME( 1995, mshj, msh, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes (Japan 951117)", 0 ) | |
| 7255 | GAME( 1995, mshjr1, msh, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes (Japan 951024)", 0 ) | |
| 7256 | GAME( 1995, msha, msh, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes (Asia 951024)", 0 ) | |
| 7257 | GAME( 1995, mshh, msh, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes (Hispanic 951117)", 0 ) | |
| 7258 | GAME( 1995, mshb, msh, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes (Brazil 951117)", 0 ) | |
| 7257 | 7259 | GAME( 1996, 19xx, 0, cps2, cps2_2p2b, cps2, ROT270, "Capcom", "19XX: The War Against Destiny (USA 951207)", 0 ) |
| 7258 | 7260 | GAME( 1996, 19xxa, 19xx, cps2, cps2_2p2b, cps2, ROT270, "Capcom", "19XX: The War Against Destiny (Asia 951207)", 0 ) |
| 7259 | 7261 | GAME( 1996, 19xxj, 19xx, cps2, cps2_2p2b, cps2, ROT270, "Capcom", "19XX: The War Against Destiny (Japan 951225)", 0 ) |
| r2454 | r2455 | |
| 7270 | 7272 | GAME( 1996, ddsomjr1, ddsom, cps2, cps2_4p4b, cps2, ROT0, "Capcom", "Dungeons & Dragons: Shadow over Mystara (Japan 960206)", 0 ) |
| 7271 | 7273 | GAME( 1996, ddsoma, ddsom, cps2, cps2_4p4b, cps2, ROT0, "Capcom", "Dungeons & Dragons: Shadow over Mystara (Asia 960619)", 0 ) |
| 7272 | 7274 | GAME( 1996, ddsomb, ddsom, cps2, cps2_4p4b, cps2, ROT0, "Capcom", "Dungeons & Dragons: Shadow over Mystara (Brazil 960223)", 0 ) |
| 7273 | GAME( 1996, megaman2, 0, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Mega Man 2: The Power Fighters (USA 960708)", 0 ) | |
| 7274 | GAME( 1996, megamn2a, megaman2, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Mega Man 2: The Power Fighters (Asia 960708)", 0 ) | |
| 7275 | GAME( 1996, rckman2j, megaman2, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Rockman 2: The Power Fighters (Japan 960708)", 0 ) | |
| 7276 | GAME( 1996, qndream, 0, cps2, qndream, cps2, ROT0, "Capcom", "Quiz Nanairo Dreams: Nijiirochou no Kiseki (Japan 960826)", 0 ) | |
| 7277 | 7275 | GAME( 1996, sfa2, 0, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Alpha 2 (USA 960306)", 0 ) |
| 7278 | 7276 | GAME( 1996, sfz2j, sfa2, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Zero 2 (Japan 960227)", 0 ) |
| 7279 | 7277 | GAME( 1996, sfz2a, sfa2, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Street Fighter Zero 2 (Asia 960227)", 0 ) |
| r2454 | r2455 | |
| 7288 | 7286 | GAME( 1996, spf2t, 0, cps2, cps2_2p2b, cps2, ROT0, "Capcom", "Super Puzzle Fighter II Turbo (USA 960620)", 0 ) |
| 7289 | 7287 | GAME( 1996, spf2xj, spf2t, cps2, cps2_2p2b, cps2, ROT0, "Capcom", "Super Puzzle Fighter II X (Japan 960531)", 0 ) |
| 7290 | 7288 | GAME( 1996, spf2ta, spf2t, cps2, cps2_2p2b, cps2, ROT0, "Capcom", "Super Puzzle Fighter II Turbo (Asia 960529)", 0 ) |
| 7289 | GAME( 1996, megaman2, 0, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Mega Man 2: The Power Fighters (USA 960708)", 0 ) | |
| 7290 | GAME( 1996, megamn2a, megaman2, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Mega Man 2: The Power Fighters (Asia 960708)", 0 ) | |
| 7291 | GAME( 1996, rckman2j, megaman2, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Rockman 2: The Power Fighters (Japan 960708)", 0 ) | |
| 7292 | GAME( 1996, qndream, 0, cps2, qndream, cps2, ROT0, "Capcom", "Quiz Nanairo Dreams: Nijiirochou no Kiseki (Japan 960826)", 0 ) | |
| 7291 | 7293 | GAME( 1996, xmvsf, 0, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men Vs. Street Fighter (Euro 961004)", 0 ) |
| 7292 | 7294 | GAME( 1996, xmvsfr1, xmvsf, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men Vs. Street Fighter (Euro 960910)", 0 ) |
| 7293 | 7295 | GAME( 1996, xmvsfu, xmvsf, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "X-Men Vs. Street Fighter (USA 961023)", 0 ) |
| r2454 | r2455 | |
| 7302 | 7304 | GAME( 1997, batcir, 0, cps2, cps2_4p2b, cps2, ROT0, "Capcom", "Battle Circuit (Euro 970319)", 0 ) |
| 7303 | 7305 | GAME( 1997, batcira, batcir, cps2, cps2_4p2b, cps2, ROT0, "Capcom", "Battle Circuit (Asia 970319)", 0 ) |
| 7304 | 7306 | GAME( 1997, batcirj, batcir, cps2, cps2_4p2b, cps2, ROT0, "Capcom", "Battle Circuit (Japan 970319)", 0 ) |
| 7305 | GAME( 1997, csclub, 0, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Capcom Sports Club (Euro 970722)", 0 ) | |
| 7306 | GAME( 1997, cscluba, csclub, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Capcom Sports Club (Asia 970722)", 0 ) | |
| 7307 | GAME( 1997, csclubj, csclub, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Capcom Sports Club (Japan 970722)", 0 ) | |
| 7308 | GAME( 1997, csclubh, csclub, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Capcom Sports Club (Hispanic 970722)", 0 ) | |
| 7307 | GAME( 1997, vsav, 0, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Vampire Savior: The Lord of Vampire (Euro 970519)", 0 ) | |
| 7308 | GAME( 1997, vsavu, vsav, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Vampire Savior: The Lord of Vampire (USA 970519)", 0 ) | |
| 7309 | GAME( 1997, vsavj, vsav, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Vampire Savior: The Lord of Vampire (Japan 970519)", 0 ) | |
| 7310 | GAME( 1997, vsava, vsav, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Vampire Savior: The Lord of Vampire (Asia 970519)", 0 ) | |
| 7311 | GAME( 1997, vsavh, vsav, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Vampire Savior: The Lord of Vampire (Hispanic 970519)", 0 ) | |
| 7309 | 7312 | GAME( 1997, mshvsf, 0, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (Euro 970625)", 0 ) |
| 7310 | 7313 | GAME( 1997, mshvsfu, mshvsf, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (USA 970827)", 0 ) |
| 7311 | 7314 | GAME( 1997, mshvsfu1, mshvsf, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (USA 970625)", 0 ) |
| r2454 | r2455 | |
| 7317 | 7320 | GAME( 1997, mshvsfa1, mshvsf, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (Asia 970620)", 0 ) |
| 7318 | 7321 | GAME( 1997, mshvsfb, mshvsf, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (Brazil 970827)", 0 ) |
| 7319 | 7322 | GAME( 1997, mshvsfb1, mshvsf, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Super Heroes Vs. Street Fighter (Brazil 970625)", 0 ) |
| 7323 | GAME( 1997, csclub, 0, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Capcom Sports Club (Euro 970722)", 0 ) | |
| 7324 | GAME( 1997, cscluba, csclub, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Capcom Sports Club (Asia 970722)", 0 ) | |
| 7325 | GAME( 1997, csclubj, csclub, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Capcom Sports Club (Japan 970722)", 0 ) | |
| 7326 | GAME( 1997, csclubh, csclub, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Capcom Sports Club (Hispanic 970722)", 0 ) | |
| 7320 | 7327 | GAME( 1997, sgemf, 0, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Super Gem Fighter Mini Mix (USA 970904)", 0 ) |
| 7321 | 7328 | GAME( 1997, pfghtj, sgemf, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Pocket Fighter (Japan 970904)", 0 ) |
| 7322 | 7329 | GAME( 1997, sgemfa, sgemf, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Super Gem Fighter: Mini Mix (Asia 970904)", 0 ) |
| 7323 | 7330 | GAME( 1997, sgemfh, sgemf, cps2, cps2_2p3b, cps2, ROT0, "Capcom", "Super Gem Fighter: Mini Mix (Hispanic 970904)", 0 ) |
| 7324 | 7331 | GAME( 1997, vhunt2, 0, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Vampire Hunter 2: Darkstalkers Revenge (Japan 970929)", 0 ) |
| 7325 | 7332 | GAME( 1997, vhunt2r1, vhunt2, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Vampire Hunter 2: Darkstalkers Revenge (Japan 970913)", 0 ) |
| 7326 | GAME( 1997, vsav, 0, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Vampire Savior: The Lord of Vampire (Euro 970519)", 0 ) | |
| 7327 | GAME( 1997, vsavu, vsav, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Vampire Savior: The Lord of Vampire (USA 970519)", 0 ) | |
| 7328 | GAME( 1997, vsavj, vsav, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Vampire Savior: The Lord of Vampire (Japan 970519)", 0 ) | |
| 7329 | GAME( 1997, vsava, vsav, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Vampire Savior: The Lord of Vampire (Asia 970519)", 0 ) | |
| 7330 | GAME( 1997, vsavh, vsav, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Vampire Savior: The Lord of Vampire (Hispanic 970519)", 0 ) | |
| 7331 | 7333 | GAME( 1997, vsav2, 0, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Vampire Savior 2: The Lord of Vampire (Japan 970913)", 0 ) |
| 7332 | 7334 | GAME( 1998, mvsc, 0, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Vs. Capcom: Clash of Super Heroes (Euro 980112)", 0 ) |
| 7333 | 7335 | GAME( 1998, mvscu, mvsc, cps2, cps2_2p6b, cps2, ROT0, "Capcom", "Marvel Vs. Capcom: Clash of Super Heroes (USA 980123)", 0 ) |
| r2454 | r2455 | |
|---|---|---|
| 152 | 152 | // popmessage("PR: %04x", data); |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | static READ16_HANDLER( lordgun_ppi8255_0_r ) { return ppi8255_0_r(machine, offset); } | |
| 156 | static READ16_HANDLER( lordgun_ppi8255_1_r ) { return ppi8255_1_r(machine, offset); } | |
| 155 | static READ16_DEVICE_HANDLER( lordgun_ppi8255_r ) { return ppi8255_r(device, offset); } | |
| 157 | 156 | |
| 158 | static WRITE16_HANDLER( lordgun_ppi8255_0_w ) { ppi8255_0_w(machine, offset, data & 0xff); } | |
| 159 | static WRITE16_HANDLER( lordgun_ppi8255_1_w ) { ppi8255_1_w(machine, offset, data & 0xff); } | |
| 157 | static WRITE16_DEVICE_HANDLER( lordgun_ppi8255_w ) { ppi8255_w(device, offset, data & 0xff); } | |
| 160 | 158 | |
| 161 | 159 | static READ16_HANDLER( lordgun_gun_0_x_r ) { return lordgun_gun[0].hw_x; } |
| 162 | 160 | static READ16_HANDLER( lordgun_gun_0_y_r ) { return lordgun_gun[0].hw_y; } |
| r2454 | r2455 | |
| 197 | 195 | AM_RANGE(0x503c00, 0x503c01) AM_READ(lordgun_gun_0_y_r) |
| 198 | 196 | AM_RANGE(0x503e00, 0x503e01) AM_READ(lordgun_gun_1_y_r) |
| 199 | 197 | AM_RANGE(0x504000, 0x504001) AM_WRITE(lordgun_soundlatch_w) |
| 200 | AM_RANGE(0x506000, 0x506007) AM_READWRITE(lordgun_ppi8255_0_r, lordgun_ppi8255_0_w) | |
| 201 | AM_RANGE(0x508000, 0x508007) AM_READWRITE(lordgun_ppi8255_1_r, lordgun_ppi8255_1_w) | |
| 198 | AM_RANGE(0x506000, 0x506007) AM_DEVREADWRITE(PPI8255, "ppi8255_0", lordgun_ppi8255_r, lordgun_ppi8255_w) | |
| 199 | AM_RANGE(0x508000, 0x508007) AM_DEVREADWRITE(PPI8255, "ppi8255_1", lordgun_ppi8255_r, lordgun_ppi8255_w) | |
| 202 | 200 | AM_RANGE(0x50a900, 0x50a9ff) AM_RAM // protection |
| 203 | 201 | ADDRESS_MAP_END |
| 204 | 202 | |
| r2454 | r2455 | |
| 224 | 222 | AM_RANGE(0x502e00, 0x502e01) AM_WRITE(SMH_RAM) AM_BASE(&lordgun_scroll_y_3) |
| 225 | 223 | AM_RANGE(0x503000, 0x503001) AM_WRITE(lordgun_priority_w) |
| 226 | 224 | AM_RANGE(0x504000, 0x504001) AM_WRITE(lordgun_soundlatch_w) |
| 227 | AM_RANGE(0x506000, 0x506007) AM_READWRITE(lordgun_ppi8255_0_r, lordgun_ppi8255_0_w) | |
| 228 | AM_RANGE(0x508000, 0x508007) AM_READWRITE(lordgun_ppi8255_1_r, lordgun_ppi8255_1_w) | |
| 225 | AM_RANGE(0x506000, 0x506007) AM_DEVREADWRITE(PPI8255, "ppi8255_0", lordgun_ppi8255_r, lordgun_ppi8255_w) | |
| 226 | AM_RANGE(0x508000, 0x508007) AM_DEVREADWRITE(PPI8255, "ppi8255_1", lordgun_ppi8255_r, lordgun_ppi8255_w) | |
| 229 | 227 | AM_RANGE(0x50b900, 0x50b9ff) AM_RAM // protection |
| 230 | 228 | ADDRESS_MAP_END |
| 231 | 229 | |
| r2454 | r2455 | |
| 409 | 407 | |
| 410 | 408 | ***************************************************************************/ |
| 411 | 409 | |
| 412 | static const ppi8255_interface ppi8255_intf = | |
| 410 | static const ppi8255_interface ppi8255_intf[2] = | |
| 413 | 411 | { |
| 414 | 2, // 2 chips | |
| 415 | { lordgun_eeprom_r, input_port_1_r }, // Port A read | |
| 416 | { 0, input_port_2_r }, // Port B read | |
| 417 | { input_port_3_r, input_port_4_r }, // Port C read | |
| 418 | { fake_w, fake_w }, // Port A write | |
| 419 | { lordgun_eeprom_w, fake_w }, // Port B write | |
| 420 | { fake2_w, fake_w }, // Port C write | |
| 412 | { | |
| 413 | lordgun_eeprom_r, // Port A read | |
| 414 | NULL, // Port B read | |
| 415 | input_port_3_r, // Port C read | |
| 416 | fake_w, // Port A write | |
| 417 | lordgun_eeprom_w, // Port B write | |
| 418 | fake2_w // Port C write | |
| 419 | }, | |
| 420 | { | |
| 421 | input_port_1_r, // Port A read | |
| 422 | input_port_2_r, // Port B read | |
| 423 | input_port_4_r, // Port C read | |
| 424 | fake_w, // Port A write | |
| 425 | fake_w, // Port B write | |
| 426 | fake_w // Port C write | |
| 427 | } | |
| 421 | 428 | }; |
| 422 | 429 | |
| 423 | static MACHINE_RESET( lordgun ) | |
| 424 | { | |
| 425 | ppi8255_init(&ppi8255_intf); | |
| 426 | } | |
| 427 | ||
| 428 | 430 | static void soundirq(int state) |
| 429 | 431 | { |
| 430 | 432 | cpunum_set_input_line(Machine, 1, 0, state); |
| r2454 | r2455 | |
| 444 | 446 | MDRV_CPU_PROGRAM_MAP(lordgun_soundmem_map,0) |
| 445 | 447 | MDRV_CPU_IO_MAP(lordgun_soundio_map,0) |
| 446 | 448 | |
| 447 | MDRV_MACHINE_RESET(lordgun) | |
| 449 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 450 | MDRV_DEVICE_CONFIG( ppi8255_intf[0] ) | |
| 448 | 451 | |
| 452 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 453 | MDRV_DEVICE_CONFIG( ppi8255_intf[1] ) | |
| 454 | ||
| 449 | 455 | MDRV_NVRAM_HANDLER(93C46) |
| 450 | 456 | |
| 451 | 457 | MDRV_GFXDECODE(lordgun) |
| r2454 | r2455 | |
|---|---|---|
| 69 | 69 | g = (paletteram16[offset+1] >> 8) & 0xff; |
| 70 | 70 | r = (paletteram16[offset+1] >> 0) & 0xff; |
| 71 | 71 | |
| 72 | palette_set_color( | |
| 72 | palette_set_color(machine,offset/2,MAKE_RGB(r,g,b)); | |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | static WRITE16_HANDLER( lemmings_sound_w ) |
| r2454 | r2455 | |
| 80 | 80 | |
| 81 | 81 | static WRITE8_HANDLER( lemmings_sound_ack_w ) |
| 82 | 82 | { |
| 83 | cpunum_set_input_line( | |
| 83 | cpunum_set_input_line(machine, 1,1,CLEAR_LINE); | |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | /******************************************************************************/ |
| r2454 | r2455 | |
|---|---|---|
| 63 | 63 | |
| 64 | 64 | if (offset==1) |
| 65 | 65 | { |
| 66 | cpunum_set_input_line( | |
| 66 | cpunum_set_input_line(machine, 2,M68705_IRQ_LINE,HOLD_LINE); | |
| 67 | 67 | cpu_spin(); |
| 68 | 68 | new_latch=0; |
| 69 | 69 | } |
| r2454 | r2455 | |
| 426 | 426 | |
| 427 | 427 | static const struct YM2203interface ym2203_interface = |
| 428 | 428 | { |
| 429 | 0,0,0,0,irqhandler | |
| 429 | { | |
| 430 | AY8910_LEGACY_OUTPUT, | |
| 431 | AY8910_DEFAULT_LOADS, | |
| 432 | NULL, NULL, NULL, NULL, | |
| 433 | }, | |
| 434 | irqhandler | |
| 430 | 435 | }; |
| 431 | 436 | |
| 432 | 437 |
| r2454 | r2455 | |
|---|---|---|
| 27 | 27 | |
| 28 | 28 | ***************************************************************************/ |
| 29 | 29 | #include "driver.h" |
| 30 | #include "deprecat.h" | |
| 31 | 30 | #include "sound/okim6295.h" |
| 32 | 31 | |
| 33 | 32 | VIDEO_START( zerozone ); |
| r2454 | r2455 | |
|---|---|---|
| 300 | 300 | * |
| 301 | 301 | *************************************/ |
| 302 | 302 | |
| 303 | static READ8_HANDLER( sindbadm_portb_r ) | |
| 304 | { | |
| 305 | return input_port_read(machine, "FC"); | |
| 306 | } | |
| 307 | ||
| 308 | ||
| 303 | 309 | static WRITE8_HANDLER( sindbadm_soundport_w ) |
| 304 | 310 | { |
| 305 | 311 | soundlatch_w(machine,0,data); |
| r2454 | r2455 | |
| 331 | 337 | |
| 332 | 338 | /************************************* |
| 333 | 339 | * |
| 340 | * PPI 8255 configurations | |
| 341 | * | |
| 342 | *************************************/ | |
| 343 | ||
| 344 | static const ppi8255_interface sindbadm_ppi_intf = | |
| 345 | { | |
| 346 | NULL, | |
| 347 | sindbadm_portb_r, | |
| 348 | NULL, | |
| 349 | sindbadm_soundport_w, | |
| 350 | NULL, | |
| 351 | sindbadm_misc_w | |
| 352 | }; | |
| 353 | ||
| 354 | ||
| 355 | ||
| 356 | /************************************* | |
| 357 | * | |
| 334 | 358 | * Main CPU memory handlers |
| 335 | 359 | * |
| 336 | 360 | *************************************/ |
| r2454 | r2455 | |
| 355 | 379 | ADDRESS_MAP_END |
| 356 | 380 | |
| 357 | 381 | |
| 382 | static ADDRESS_MAP_START( main_ppi8255_portmap, ADDRESS_SPACE_IO, 8 ) | |
| 383 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 384 | AM_RANGE(0x0c, 0x0f) AM_DEVREADWRITE(PPI8255, "ppi8255", ppi8255_r, ppi8255_w) | |
| 385 | AM_RANGE(0xbe, 0xbf) AM_READWRITE(segag80r_video_port_r, segag80r_video_port_w) | |
| 386 | AM_RANGE(0xf9, 0xf9) AM_MIRROR(0x04) AM_WRITE(coin_count_w) | |
| 387 | AM_RANGE(0xf8, 0xfb) AM_READ(mangled_ports_r) | |
| 388 | AM_RANGE(0xfc, 0xfc) AM_READ_PORT("FC") | |
| 389 | ADDRESS_MAP_END | |
| 390 | ||
| 391 | ||
| 358 | 392 | static ADDRESS_MAP_START( sindbadm_portmap, ADDRESS_SPACE_IO, 8 ) |
| 359 | 393 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 360 | 394 | AM_RANGE(0x42, 0x43) AM_READWRITE(segag80r_video_port_r, segag80r_video_port_w) |
| 395 | AM_RANGE(0x80, 0x83) AM_DEVREADWRITE(PPI8255, "ppi8255", ppi8255_r, ppi8255_w) | |
| 361 | 396 | AM_RANGE(0xf8, 0xfb) AM_READ(mangled_ports_r) |
| 362 | 397 | ADDRESS_MAP_END |
| 363 | 398 | |
| r2454 | r2455 | |
| 854 | 889 | /* basic machine hardware */ |
| 855 | 890 | MDRV_IMPORT_FROM(g80r_base) |
| 856 | 891 | |
| 892 | MDRV_CPU_MODIFY("main") | |
| 893 | MDRV_CPU_IO_MAP(main_ppi8255_portmap,0) | |
| 894 | ||
| 857 | 895 | /* sound boards */ |
| 858 | 896 | MDRV_IMPORT_FROM(005_sound_board) |
| 859 | 897 | MACHINE_DRIVER_END |
| r2454 | r2455 | |
| 881 | 919 | /* basic machine hardware */ |
| 882 | 920 | MDRV_IMPORT_FROM(g80r_base) |
| 883 | 921 | |
| 922 | MDRV_CPU_MODIFY("main") | |
| 923 | MDRV_CPU_IO_MAP(main_ppi8255_portmap,0) | |
| 924 | ||
| 884 | 925 | /* background board changes */ |
| 885 | 926 | MDRV_GFXDECODE(monsterb) |
| 886 | 927 | MDRV_PALETTE_LENGTH(64+64) |
| r2454 | r2455 | |
| 913 | 954 | MDRV_CPU_IO_MAP(sindbadm_portmap,0) |
| 914 | 955 | MDRV_CPU_VBLANK_INT("main", sindbadm_vblank_start) |
| 915 | 956 | |
| 957 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 958 | MDRV_DEVICE_CONFIG( sindbadm_ppi_intf ) | |
| 959 | ||
| 916 | 960 | /* video hardware */ |
| 917 | 961 | MDRV_GFXDECODE(monsterb) |
| 918 | 962 | MDRV_PALETTE_LENGTH(64+64) |
| r2454 | r2455 | |
| 1414 | 1458 | |
| 1415 | 1459 | /* configure video */ |
| 1416 | 1460 | segag80r_background_pcb = G80_BACKGROUND_NONE; |
| 1417 | ||
| 1418 | /* install the 8255 PPI for the sound board */ | |
| 1419 | memory_install_readwrite8_handler(machine, 0, ADDRESS_SPACE_IO, 0x0c, 0x0f, 0, 0, ppi8255_0_r, ppi8255_0_w); | |
| 1420 | 1461 | } |
| 1421 | 1462 | |
| 1422 | 1463 | |
| r2454 | r2455 | |
| 1452 | 1493 | /* install background board handlers */ |
| 1453 | 1494 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_IO, 0xb8, 0xbd, 0, 0, monsterb_back_port_w); |
| 1454 | 1495 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xe000, 0xffff, 0, 0, monsterb_vidram_w); |
| 1455 | ||
| 1456 | /* install Monster Bash sound board */ | |
| 1457 | memory_install_readwrite8_handler(machine, 0, ADDRESS_SPACE_IO, 0x0c, 0x0f, 0, 0, ppi8255_0_r, ppi8255_0_w); | |
| 1458 | 1496 | } |
| 1459 | 1497 | |
| 1460 | 1498 | |
| r2454 | r2455 | |
| 1472 | 1510 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_IO, 0xb4, 0xb5, 0, 0, pignewt_back_color_w); |
| 1473 | 1511 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_IO, 0xb8, 0xbd, 0, 0, pignewt_back_port_w); |
| 1474 | 1512 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xe000, 0xffff, 0, 0, pignewt_vidram_w); |
| 1475 | ||
| 1476 | /* install Monster Bash sound board */ | |
| 1477 | memory_install_readwrite8_handler(machine, 0, ADDRESS_SPACE_IO, 0x0c, 0x0f, 0, 0, ppi8255_0_r, ppi8255_0_w); | |
| 1478 | 1513 | } |
| 1479 | 1514 | |
| 1480 | 1515 | |
| r2454 | r2455 | |
| 1500 | 1535 | |
| 1501 | 1536 | static DRIVER_INIT( sindbadm ) |
| 1502 | 1537 | { |
| 1503 | static ppi8255_interface ppi_intf = | |
| 1504 | { | |
| 1505 | 1, | |
| 1506 | { 0 }, | |
| 1507 | { 0 }, | |
| 1508 | { 0 }, | |
| 1509 | { sindbadm_soundport_w }, | |
| 1510 | { 0 }, | |
| 1511 | { sindbadm_misc_w } | |
| 1512 | }; | |
| 1513 | ||
| 1514 | 1538 | /* configure the encrypted Z80 */ |
| 1515 | 1539 | sindbadm_decode(); |
| 1516 | 1540 | sega_security(0); |
| r2454 | r2455 | |
| 1521 | 1545 | /* install background board handlers */ |
| 1522 | 1546 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_IO, 0x40, 0x41, 0, 0, sindbadm_back_port_w); |
| 1523 | 1547 | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xe000, 0xffff, 0, 0, sindbadm_vidram_w); |
| 1524 | ||
| 1525 | /* install the 8255 PPI for the sound board */ | |
| 1526 | memory_install_readwrite8_handler(machine, 0, ADDRESS_SPACE_IO, 0x80, 0x83, 0, 0, ppi8255_0_r, ppi8255_0_w); | |
| 1527 | ppi_intf.portBread[0] = port_tag_to_handler8("FC"); | |
| 1528 | ppi8255_init(&ppi_intf); | |
| 1529 | 1548 | } |
| 1530 | 1549 | |
| 1531 | 1550 |
| r2454 | r2455 | |
|---|---|---|
| 18 | 18 | */ |
| 19 | 19 | |
| 20 | 20 | #include "driver.h" |
| 21 | #include "deprecat.h" | |
| 22 | 21 | #include "sound/okim6295.h" |
| 23 | 22 | |
| 24 | 23 | static tilemap *layer0_tilemap, *layer1_tilemap, *layer2_tilemap; |
| r2454 | r2455 | |
| 46 | 45 | static WRITE16_HANDLER( paletteram_w ) |
| 47 | 46 | { |
| 48 | 47 | data = COMBINE_DATA(&paletteram16[offset]); |
| 49 | palette_set_color_rgb( | |
| 48 | palette_set_color_rgb( machine, offset, pal4bit(data >> 4), pal4bit(data >> 0), pal4bit(data >> 8)); | |
| 50 | 49 | } |
| 51 | 50 | |
| 52 | 51 | static WRITE16_HANDLER( magic10_misc_w ) |
| r2454 | r2455 | |
|---|---|---|
| 604 | 604 | |
| 605 | 605 | static const struct YM2203interface ym2203_interface = |
| 606 | 606 | { |
| 607 | input_port_0_r, | |
| 608 | input_port_1_r, | |
| 609 | 0, | |
| 610 | 0, | |
| 607 | { | |
| 608 | AY8910_LEGACY_OUTPUT, | |
| 609 | AY8910_DEFAULT_LOADS, | |
| 610 | input_port_0_r, | |
| 611 | input_port_1_r, | |
| 612 | NULL, | |
| 613 | NULL, | |
| 614 | }, | |
| 611 | 615 | irqhandler |
| 612 | 616 | }; |
| 613 | 617 |
| r2454 | r2455 | |
|---|---|---|
| 972 | 972 | |
| 973 | 973 | static const struct YM2203interface sh_ym2203_interface = |
| 974 | 974 | { |
| 975 | input_port_3_r, | |
| 976 | input_port_4_r | |
| 975 | { | |
| 976 | AY8910_LEGACY_OUTPUT, | |
| 977 | AY8910_DEFAULT_LOADS, | |
| 978 | input_port_3_r, | |
| 979 | input_port_4_r, | |
| 980 | NULL, | |
| 981 | NULL | |
| 982 | }, | |
| 983 | NULL | |
| 977 | 984 | }; |
| 978 | 985 | |
| 979 | 986 |
| r2454 | r2455 | |
|---|---|---|
| 358 | 358 | static WRITE8_HANDLER( sound_arm_nmi_w ) |
| 359 | 359 | { |
| 360 | 360 | // sound_nmi_enabled = 1; |
| 361 | cpunum_set_input_line( | |
| 361 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, CLEAR_LINE); | |
| 362 | 362 | timer_set(ATTOTIME_IN_USEC(50), NULL,0,nmi_callback); /* kludge until the K053260 is emulated correctly */ |
| 363 | 363 | } |
| 364 | 364 | |
| r2454 | r2455 | |
| 436 | 436 | { |
| 437 | 437 | if ((program_read_word(0x180006 + 128*i) >> 8) == logical_pri) |
| 438 | 438 | { |
| 439 | K053245_word_w(machine,8*i,hardware_pri,0x | |
| 439 | K053245_word_w(machine,8*i,hardware_pri,0x | |
| 440 | 440 | hardware_pri++; |
| 441 | 441 | } |
| 442 | 442 | } |
| r2454 | r2455 | |
| 491 | 491 | |
| 492 | 492 | /* bit 3 is service button */ |
| 493 | 493 | /* bit 6 is ??? VBLANK? OBJMPX? */ |
| 494 | res = input_port_ | |
| 494 | res = input_port_ | |
| 495 | 495 | if (init_eeprom_count) |
| 496 | 496 | { |
| 497 | 497 | init_eeprom_count--; |
| r2454 | r2455 | |
| 507 | 507 | |
| 508 | 508 | /* bit 0 is EEPROM data */ |
| 509 | 509 | /* bit 1 is EEPROM ready */ |
| 510 | res = EEPROM_read_bit() | input_port_ | |
| 510 | res = EEPROM_read_bit() | input_port_ | |
| 511 | 511 | return res; |
| 512 | 512 | } |
| 513 | 513 | |
| r2454 | r2455 | |
| 520 | 520 | /* bit 1 is EEPROM ready */ |
| 521 | 521 | /* bit 2 is VBLANK (???) */ |
| 522 | 522 | /* bit 7 is service button */ |
| 523 | res = EEPROM_read_bit() | input_port_ | |
| 523 | res = EEPROM_read_bit() | input_port_ | |
| 524 | 524 | if (init_eeprom_count) |
| 525 | 525 | { |
| 526 | 526 | init_eeprom_count--; |
| r2454 | r2455 | |
| 539 | 539 | /* bit 1 is EEPROM ready */ |
| 540 | 540 | /* bit 2 is VBLANK (???) */ |
| 541 | 541 | /* bit 3 is service button */ |
| 542 | res = EEPROM_read_bit() | input_port_ | |
| 542 | res = EEPROM_read_bit() | input_port_ | |
| 543 | 543 | if (init_eeprom_count) |
| 544 | 544 | { |
| 545 | 545 | init_eeprom_count--; |
| r2454 | r2455 | |
| 598 | 598 | { |
| 599 | 599 | int res; |
| 600 | 600 | |
| 601 | res = input_port_ | |
| 601 | res = input_port_ | |
| 602 | 602 | if (init_eeprom_count) |
| 603 | 603 | { |
| 604 | 604 | init_eeprom_count--; |
| r2454 | r2455 | |
| 616 | 616 | /* bit 1 is EEPROM ready */ |
| 617 | 617 | /* bit 3 is VBLANK (???) */ |
| 618 | 618 | /* bit 7 is service button */ |
| 619 | res = (EEPROM_read_bit() << 8) | input_port_ | |
| 619 | res = (EEPROM_read_bit() << 8) | input_port_ | |
| 620 | 620 | toggle ^= 0x0800; |
| 621 | 621 | return (res ^ toggle); |
| 622 | 622 | } |
| r2454 | r2455 | |
| 636 | 636 | |
| 637 | 637 | /* bit 5 triggers IRQ on sound cpu */ |
| 638 | 638 | if (last == 0 && (data & 0x20) != 0) |
| 639 | cpunum_set_input_line_and_vector( | |
| 639 | cpunum_set_input_line_and_vector(machine, 1,0,HOLD_LINE,0xff); | |
| 640 | 640 | last = data & 0x20; |
| 641 | 641 | |
| 642 | 642 | /* bit 6 = enable char ROM reading through the video RAM */ |
| r2454 | r2455 | |
| 650 | 650 | /* bit 9 is service button */ |
| 651 | 651 | int res; |
| 652 | 652 | |
| 653 | res = input_port_ | |
| 653 | res = input_port_ | |
| 654 | 654 | if (init_eeprom_count) |
| 655 | 655 | { |
| 656 | 656 | init_eeprom_count--; |
| r2454 | r2455 | |
| 663 | 663 | { |
| 664 | 664 | /* bit 8 is EEPROM data */ |
| 665 | 665 | /* bit 9 is EEPROM ready */ |
| 666 | return (EEPROM_read_bit() << 8) | input_port_ | |
| 666 | return (EEPROM_read_bit() << 8) | input_port_ | |
| 667 | 667 | } |
| 668 | 668 | |
| 669 | 669 | static WRITE16_HANDLER( prmrsocr_eeprom_w ) |
| r2454 | r2455 | |
| 824 | 824 | static WRITE16_HANDLER( ssriders_soundkludge_w ) |
| 825 | 825 | { |
| 826 | 826 | /* I think this is more than just a trigger */ |
| 827 | cpunum_set_input_line_and_vector( | |
| 827 | cpunum_set_input_line_and_vector(machine, 1,0,HOLD_LINE,0xff); | |
| 828 | 828 | } |
| 829 | 829 | |
| 830 | 830 | static ADDRESS_MAP_START( blswhstl_main_map, ADDRESS_SPACE_PROGRAM, 16 ) |
| r2454 | r2455 | |
| 916 | 916 | if (!(offs & 0x0031)) |
| 917 | 917 | { |
| 918 | 918 | offs = ((offs & 0x000e) >> 1) | ((offs & 0x1fc0) >> 3); |
| 919 | K053245_word_w(machine, offs, data, 0); | |
| 919 | K053245_word_w(machine, offs, data, 0xffff); | |
| 920 | 920 | } |
| 921 | 921 | } |
| 922 | 922 | else if (addr >= 0x104000/2 && addr <= 0x107fff/2) sunset_104000[addr-0x104000/2] = data; |
| r2454 | r2455 | |
|---|---|---|
| 1207 | 1207 | static MACHINE_RESET( namcos12 ) |
| 1208 | 1208 | { |
| 1209 | 1209 | psx_machine_init(); |
| 1210 | bankoffset_w(machine,0,0,0); | |
| 1210 | bankoffset_w(machine,0,0,0xffffffff); | |
| 1211 | 1211 | |
| 1212 | 1212 | if( strcmp( machine->gamedrv->name, "tektagt" ) == 0 || |
| 1213 | 1213 | strcmp( machine->gamedrv->name, "tektagta" ) == 0 || |
| r2454 | r2455 | |
|---|---|---|
| 1 | /* raiden 2 board test note 17/04/08 (based on test by dox) | |
| 2 | ||
| 3 | rom banking is at 6c9, bit 0x80 | |
| 4 | -- the game only writes this directly at startup, must be written indirectly by | |
| 5 | one of the protection commands? or mirrored? | |
| 6 | value of 0x80 puts 0x00000-0x1ffff at 0x20000 - 0x3ffff | |
| 7 | value of 0x00 puts 0x20000-0x3ffff at 0x20000 - 0x3ffff | |
| 8 | ||
| 9 | */ | |
| 10 | ||
| 1 | 11 | /* |
| 2 | ||
| 3 | 12 | Raiden 2 Hardware |
| 4 | 13 | |
| 5 | 14 | Games on this PCB / Similar PCBs |
| r2454 | r2455 | |
| 610 | 619 | COMBINE_DATA(&mainram[offset]); |
| 611 | 620 | switch(offset) { |
| 612 | 621 | default: |
| 613 | logerror("io_w %04x, %04x & %04x (%x)\n", offset*2, data, mem_mask | |
| 622 | logerror("io_w %04x, %04x & %04x (%x)\n", offset*2, data, mem_mask | |
| 614 | 623 | } |
| 615 | 624 | } |
| 616 | 625 | |
| r2454 | r2455 | |
| 638 | 647 | offset != 0x444/2 && offset != 0x6de/2 && offset != 0x47e/2 && |
| 639 | 648 | offset != 0x4a0/2 && offset != 0x620/2 && offset != 0x6c6/2 && |
| 640 | 649 | offset != 0x628/2 && offset != 0x62a/2) |
| 641 | logerror("mainram_w %04x, %04x & %04x (%x)\n", offset*2, data, mem_mask | |
| 650 | logerror("mainram_w %04x, %04x & %04x (%x)\n", offset*2, data, mem_mask | |
| 642 | 651 | } |
| 643 | 652 | |
| 644 | 653 | if(0 && c_w[offset]>1000 && !c_r[offset]) { |
| 645 | 654 | if(offset != 0x4c0/2 && (offset<0x500/2 || offset > 0x503/2)) |
| 646 | logerror("mainram_w %04x, %04x & %04x [%d.%d] (%x)\n", offset*2, data, mem_mask | |
| 655 | logerror("mainram_w %04x, %04x & %04x [%d.%d] (%x)\n", offset*2, data, mem_mask | |
| 647 | 656 | } |
| 648 | 657 | |
| 649 | 658 | // if(offset == 0x471 || (offset >= 0xb146 && offset < 0xb156)) |
| r2454 | r2455 | |
| 654 | 663 | // show = offset == 0x704 || offset == 0x710 || offset == 0x71c; |
| 655 | 664 | |
| 656 | 665 | if(show) |
| 657 | logerror("mainram_w %04x, %04x & %04x (%x)\n", offset*2, data, mem_mask | |
| 666 | logerror("mainram_w %04x, %04x & %04x (%x)\n", offset*2, data, mem_mask | |
| 658 | 667 | |
| 659 | 668 | // if(offset == 0x700) |
| 660 | 669 | // cpu_setbank(2, memory_region(REGION_USER1)+0x20000*data); |
| r2454 | r2455 | |
| 666 | 675 | { |
| 667 | 676 | COMBINE_DATA(&w1ram[offset]); |
| 668 | 677 | if(0 && offset < 0x800/2) |
| 669 | logerror("w1x %05x, %04x & %04x (%05x)\n", offset*2+0x10000, data, mem_mask | |
| 678 | logerror("w1x %05x, %04x & %04x (%05x)\n", offset*2+0x10000, data, mem_mask | |
| 670 | 679 | } |
| 671 | 680 | |
| 672 | 681 | #ifdef UNUSED_FUNCTION |
| r2454 | r2455 | |
|---|---|---|
| 41 | 41 | AM_RANGE(0x5000, 0x50ff) AM_READ(SMH_RAM) |
| 42 | 42 | AM_RANGE(0x7000, 0x7000) AM_READ(watchdog_reset_r) |
| 43 | 43 | AM_RANGE(0x7800, 0x7800) AM_READ(watchdog_reset_r) |
| 44 | AM_RANGE(0x8100, 0x8103) AM_READ(ppi8255_0_r) | |
| 45 | AM_RANGE(0x8110, 0x8113) AM_READ(ppi8255_0_r) /* mirror for Frog */ | |
| 46 | AM_RANGE(0x8200, 0x8203) AM_READ(ppi8255_1_r) | |
| 44 | AM_RANGE(0x8100, 0x8103) AM_DEVREAD(PPI8255, "ppi8255_0", ppi8255_r) | |
| 45 | AM_RANGE(0x8110, 0x8113) AM_DEVREAD(PPI8255, "ppi8255_0", ppi8255_r) /* mirror for Frog */ | |
| 46 | AM_RANGE(0x8200, 0x8203) AM_DEVREAD(PPI8255, "ppi8255_1", ppi8255_r) | |
| 47 | 47 | ADDRESS_MAP_END |
| 48 | 48 | |
| 49 | 49 | static ADDRESS_MAP_START( scramble_writemem, ADDRESS_SPACE_PROGRAM, 8 ) |
| r2454 | r2455 | |
| 60 | 60 | AM_RANGE(0x6804, 0x6804) AM_WRITE(galaxold_stars_enable_w) |
| 61 | 61 | AM_RANGE(0x6806, 0x6806) AM_WRITE(galaxold_flip_screen_x_w) |
| 62 | 62 | AM_RANGE(0x6807, 0x6807) AM_WRITE(galaxold_flip_screen_y_w) |
| 63 | AM_RANGE(0x8100, 0x8103) AM_WRITE(ppi8255_0_w) | |
| 64 | AM_RANGE(0x8200, 0x8203) AM_WRITE(ppi8255_1_w) | |
| 63 | AM_RANGE(0x8100, 0x8103) AM_DEVWRITE(PPI8255, "ppi8255_0", ppi8255_w) | |
| 64 | AM_RANGE(0x8200, 0x8203) AM_DEVWRITE(PPI8255, "ppi8255_1", ppi8255_w) | |
| 65 | 65 | ADDRESS_MAP_END |
| 66 | 66 | |
| 67 | 67 | |
| r2454 | r2455 | |
| 142 | 142 | static ADDRESS_MAP_START( ckongs_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 143 | 143 | AM_RANGE(0x0000, 0x5fff) AM_READ(SMH_ROM) |
| 144 | 144 | AM_RANGE(0x6000, 0x6bff) AM_READ(SMH_RAM) |
| 145 | AM_RANGE(0x7000, 0x7003) AM_READ(ppi8255_0_r) | |
| 146 | AM_RANGE(0x7800, 0x7803) AM_READ(ppi8255_1_r) | |
| 145 | AM_RANGE(0x7000, 0x7003) AM_DEVREAD(PPI8255, "ppi8255_0", ppi8255_r) | |
| 146 | AM_RANGE(0x7800, 0x7803) AM_DEVREAD(PPI8255, "ppi8255_1", ppi8255_r) | |
| 147 | 147 | AM_RANGE(0x9000, 0x93ff) AM_READ(SMH_RAM) |
| 148 | 148 | AM_RANGE(0x9800, 0x98ff) AM_READ(SMH_RAM) |
| 149 | 149 | AM_RANGE(0xb000, 0xb000) AM_READ(watchdog_reset_r) |
| r2454 | r2455 | |
| 152 | 152 | static ADDRESS_MAP_START( ckongs_writemem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 153 | 153 | AM_RANGE(0x0000, 0x5fff) AM_WRITE(SMH_ROM) |
| 154 | 154 | AM_RANGE(0x6000, 0x6bff) AM_WRITE(SMH_RAM) |
| 155 | AM_RANGE(0x7000, 0x7003) AM_WRITE(ppi8255_0_w) | |
| 156 | AM_RANGE(0x7800, 0x7803) AM_WRITE(ppi8255_1_w) | |
| 155 | AM_RANGE(0x7000, 0x7003) AM_DEVWRITE(PPI8255, "ppi8255_0", ppi8255_w) | |
| 156 | AM_RANGE(0x7800, 0x7803) AM_DEVWRITE(PPI8255, "ppi8255_1", ppi8255_w) | |
| 157 | 157 | AM_RANGE(0x9000, 0x93ff) AM_WRITE(galaxold_videoram_w) AM_BASE(&galaxold_videoram) |
| 158 | 158 | AM_RANGE(0x9800, 0x983f) AM_WRITE(galaxold_attributesram_w) AM_BASE(&galaxold_attributesram) |
| 159 | 159 | AM_RANGE(0x9840, 0x985f) AM_WRITE(SMH_RAM) AM_BASE(&galaxold_spriteram) AM_SIZE(&galaxold_spriteram_size) |
| r2454 | r2455 | |
| 166 | 166 | ADDRESS_MAP_END |
| 167 | 167 | |
| 168 | 168 | |
| 169 | static READ8_HANDLER(mars_ppi8255 | |
| 169 | static READ8_DEVICE_HANDLER(mars_ppi8255 | |
| 170 | 170 | { |
| 171 | return ppi8255_ | |
| 171 | return ppi8255_ | |
| 172 | 172 | } |
| 173 | 173 | |
| 174 | static RE | |
| 174 | static WRITE | |
| 175 | 175 | { |
| 176 | | |
| 176 | | |
| 177 | 177 | } |
| 178 | 178 | |
| 179 | static WRITE8_HANDLER(mars_ppi8255_0_w) | |
| 180 | { | |
| 181 | ppi8255_0_w(machine, ((offset >> 2) & 0x02) | ((offset >> 1) & 0x01), data); | |
| 182 | } | |
| 183 | 179 | |
| 184 | static WRITE8_HANDLER(mars_ppi8255_1_w) | |
| 185 | { | |
| 186 | ppi8255_1_w(machine, ((offset >> 2) & 0x02) | ((offset >> 1) & 0x01), data); | |
| 187 | } | |
| 188 | ||
| 189 | ||
| 190 | 180 | static ADDRESS_MAP_START( mars_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 191 | 181 | AM_RANGE(0x0000, 0x3fff) AM_READ(SMH_ROM) |
| 192 | 182 | AM_RANGE(0x4000, 0x4bff) AM_READ(SMH_RAM) |
| r2454 | r2455 | |
| 194 | 184 | AM_RANGE(0x5000, 0x50ff) AM_READ(SMH_RAM) |
| 195 | 185 | AM_RANGE(0x7000, 0x7000) AM_READ(watchdog_reset_r) |
| 196 | 186 | AM_RANGE(0x7000, 0x7000) AM_READ(SMH_NOP) |
| 197 | AM_RANGE(0x8100, 0x810f) AM_READ(mars_ppi8255_0_r) | |
| 198 | AM_RANGE(0x8200, 0x820f) AM_READ(mars_ppi8255_1_r) | |
| 187 | AM_RANGE(0x8100, 0x810f) AM_DEVREAD(PPI8255, "ppi8255_0", mars_ppi8255_r) | |
| 188 | AM_RANGE(0x8200, 0x820f) AM_DEVREAD(PPI8255, "ppi8255_1", mars_ppi8255_r) | |
| 199 | 189 | ADDRESS_MAP_END |
| 200 | 190 | |
| 201 | 191 | static ADDRESS_MAP_START( mars_writemem, ADDRESS_SPACE_PROGRAM, 8 ) |
| r2454 | r2455 | |
| 212 | 202 | AM_RANGE(0x6808, 0x6808) AM_WRITE(galaxold_coin_counter_0_w) |
| 213 | 203 | AM_RANGE(0x6809, 0x6809) AM_WRITE(galaxold_flip_screen_x_w) |
| 214 | 204 | AM_RANGE(0x680b, 0x680b) AM_WRITE(galaxold_flip_screen_y_w) |
| 215 | AM_RANGE(0x8100, 0x810f) AM_WRITE(mars_ppi8255_0_w) | |
| 216 | AM_RANGE(0x8200, 0x820f) AM_WRITE(mars_ppi8255_1_w) | |
| 205 | AM_RANGE(0x8100, 0x810f) AM_DEVWRITE(PPI8255, "ppi8255_0", mars_ppi8255_w) | |
| 206 | AM_RANGE(0x8200, 0x820f) AM_DEVWRITE(PPI8255, "ppi8255_1", mars_ppi8255_w) | |
| 217 | 207 | ADDRESS_MAP_END |
| 218 | 208 | |
| 219 | 209 | |
| r2454 | r2455 | |
| 223 | 213 | AM_RANGE(0x4c00, 0x4fff) AM_READ(galaxold_videoram_r) |
| 224 | 214 | AM_RANGE(0x5000, 0x50ff) AM_READ(SMH_RAM) |
| 225 | 215 | AM_RANGE(0x7000, 0x7000) AM_READ(watchdog_reset_r) |
| 226 | AM_RANGE(0x8200, 0x820f) AM_READ(mars_ppi8255 | |
| 216 | AM_RANGE(0x8200, 0x820f) AM_DEVREAD(PPI8255, "ppi8255_1", mars_ppi8255 | |
| 227 | 217 | AM_RANGE(0xa000, 0xafff) AM_READ(SMH_ROM) |
| 228 | AM_RANGE(0xc100, 0xc10f) AM_READ(mars_ppi8255 | |
| 218 | AM_RANGE(0xc100, 0xc10f) AM_DEVREAD(PPI8255, "ppi8255_0", mars_ppi8255 | |
| 229 | 219 | ADDRESS_MAP_END |
| 230 | 220 | |
| 231 | 221 | static ADDRESS_MAP_START( newsin7_writemem, ADDRESS_SPACE_PROGRAM, 8 ) |
| r2454 | r2455 | |
| 242 | 232 | AM_RANGE(0x6808, 0x6808) AM_WRITE(galaxold_coin_counter_0_w) |
| 243 | 233 | AM_RANGE(0x6809, 0x6809) AM_WRITE(galaxold_flip_screen_x_w) |
| 244 | 234 | AM_RANGE(0x680b, 0x680b) AM_WRITE(galaxold_flip_screen_y_w) |
| 245 | AM_RANGE(0x8200, 0x820f) AM_WRITE(mars_ppi8255 | |
| 235 | AM_RANGE(0x8200, 0x820f) AM_DEVWRITE(PPI8255, "ppi8255_1", mars_ppi8255 | |
| 246 | 236 | AM_RANGE(0xa000, 0xafff) AM_WRITE(SMH_ROM) |
| 247 | AM_RANGE(0xc100, 0xc10f) AM_WRITE(mars_ppi8255 | |
| 237 | AM_RANGE(0xc100, 0xc10f) AM_DEVWRITE(PPI8255, "ppi8255_0", mars_ppi8255 | |
| 248 | 238 | ADDRESS_MAP_END |
| 249 | 239 | |
| 250 | 240 | |
| r2454 | r2455 | |
| 262 | 252 | AM_RANGE(0x6808, 0x6808) AM_WRITE(galaxold_coin_counter_0_w) |
| 263 | 253 | AM_RANGE(0x6809, 0x6809) AM_WRITE(galaxold_flip_screen_x_w) |
| 264 | 254 | AM_RANGE(0x680b, 0x680b) AM_WRITE(galaxold_flip_screen_y_w) |
| 265 | AM_RANGE(0x8100, 0x810f) AM_WRITE(mars_ppi8255_0_w) | |
| 266 | AM_RANGE(0x8200, 0x820f) AM_WRITE(mars_ppi8255_1_w) | |
| 255 | AM_RANGE(0x8100, 0x810f) AM_DEVWRITE(PPI8255, "ppi8255_0", mars_ppi8255_w) | |
| 256 | AM_RANGE(0x8200, 0x820f) AM_DEVWRITE(PPI8255, "ppi8255_1", mars_ppi8255_w) | |
| 267 | 257 | ADDRESS_MAP_END |
| 268 | 258 | |
| 269 | 259 | |
| r2454 | r2455 | |
| 300 | 290 | |
| 301 | 291 | static ADDRESS_MAP_START( hunchbks_readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 302 | 292 | AM_RANGE(0x0000, 0x0fff) AM_READ(SMH_ROM) |
| 303 | AM_RANGE(0x1210, 0x1213) AM_READ(ppi8255_1_r) | |
| 293 | AM_RANGE(0x1210, 0x1213) AM_DEVREAD(PPI8255, "ppi8255_1", ppi8255_r) | |
| 304 | 294 | AM_RANGE(0x1400, 0x14ff) AM_READ(SMH_RAM) |
| 305 | AM_RANGE(0x1500, 0x1503) AM_READ(ppi8255_0_r) | |
| 295 | AM_RANGE(0x1500, 0x1503) AM_DEVREAD(PPI8255, "ppi8255_0", ppi8255_r) | |
| 306 | 296 | AM_RANGE(0x1680, 0x1680) AM_READ(watchdog_reset_r) |
| 307 | 297 | AM_RANGE(0x1780, 0x1780) AM_READ(watchdog_reset_r) |
| 308 | 298 | AM_RANGE(0x1800, 0x1fff) AM_READ(SMH_RAM) |
| r2454 | r2455 | |
| 316 | 306 | |
| 317 | 307 | static ADDRESS_MAP_START( hunchbks_writemem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 318 | 308 | AM_RANGE(0x0000, 0x0fff) AM_WRITE(SMH_ROM) |
| 319 | AM_RANGE(0x1210, 0x1213) AM_WRITE(ppi8255_1_w) | |
| 309 | AM_RANGE(0x1210, 0x1213) AM_DEVWRITE(PPI8255, "ppi8255_1", ppi8255_w) | |
| 320 | 310 | AM_RANGE(0x1400, 0x143f) AM_WRITE(galaxold_attributesram_w) AM_BASE(&galaxold_attributesram) |
| 321 | 311 | AM_RANGE(0x1440, 0x145f) AM_WRITE(SMH_RAM) AM_BASE(&galaxold_spriteram) AM_SIZE(&galaxold_spriteram_size) |
| 322 | 312 | AM_RANGE(0x1460, 0x147f) AM_WRITE(SMH_RAM) AM_BASE(&galaxold_bulletsram) AM_SIZE(&galaxold_bulletsram_size) |
| 323 | 313 | AM_RANGE(0x1480, 0x14ff) AM_WRITE(SMH_RAM) |
| 324 | AM_RANGE(0x1500, 0x1503) AM_WRITE(ppi8255_0_w) | |
| 314 | AM_RANGE(0x1500, 0x1503) AM_DEVWRITE(PPI8255, "ppi8255_0", ppi8255_w) | |
| 325 | 315 | AM_RANGE(0x1606, 0x1606) AM_WRITE(galaxold_flip_screen_x_w) |
| 326 | 316 | AM_RANGE(0x1607, 0x1607) AM_WRITE(galaxold_flip_screen_y_w) |
| 327 | 317 | AM_RANGE(0x1800, 0x1bff) AM_WRITE(galaxold_videoram_w) AM_BASE(&galaxold_videoram) |
| r2454 | r2455 | |
| 341 | 331 | AM_RANGE(0x4400, 0x4bff) AM_READ(SMH_RAM) |
| 342 | 332 | AM_RANGE(0x5000, 0x50ff) AM_READ(SMH_RAM) |
| 343 | 333 | AM_RANGE(0x7000, 0x7000) AM_READ(watchdog_reset_r) |
| 344 | AM_RANGE(0x8100, 0x8103) AM_READ(ppi8255_0_r) | |
| 345 | AM_RANGE(0x8200, 0x8203) AM_READ(ppi8255_1_r) | |
| 334 | AM_RANGE(0x8100, 0x8103) AM_DEVREAD(PPI8255, "ppi8255_0", ppi8255_r) | |
| 335 | AM_RANGE(0x8200, 0x8203) AM_DEVREAD(PPI8255, "ppi8255_1", ppi8255_r) | |
| 346 | 336 | AM_RANGE(0xc000, 0xffff) AM_READ(SMH_ROM) |
| 347 | 337 | ADDRESS_MAP_END |
| 348 | 338 | |
| r2454 | r2455 | |
| 359 | 349 | AM_RANGE(0x6800, 0x6802) AM_WRITE(galaxold_gfxbank_w) |
| 360 | 350 | AM_RANGE(0x6806, 0x6806) AM_WRITE(galaxold_flip_screen_x_w) |
| 361 | 351 | AM_RANGE(0x6807, 0x6807) AM_WRITE(galaxold_flip_screen_y_w) |
| 362 | AM_RANGE(0x8100, 0x8103) AM_WRITE(ppi8255_0_w) | |
| 363 | AM_RANGE(0x8200, 0x8203) AM_WRITE(ppi8255_1_w) | |
| 352 | AM_RANGE(0x8100, 0x8103) AM_DEVWRITE(PPI8255, "ppi8255_0", ppi8255_w) | |
| 353 | AM_RANGE(0x8200, 0x8203) AM_DEVWRITE(PPI8255, "ppi8255_1", ppi8255_w) | |
| 364 | 354 | AM_RANGE(0xc000, 0xffff) AM_WRITE(SMH_ROM) |
| 365 | 355 | ADDRESS_MAP_END |
| 366 | 356 | |
| 367 | 357 | |
| 368 | static READ8_HANDLER(frogf_ppi8255 | |
| 358 | static READ8_DEVICE_HANDLER(frogf_ppi8255 | |
| 369 | 359 | { |
| 370 | return ppi8255_ | |
| 360 | return ppi8255_ | |
| 371 | 361 | } |
| 372 | 362 | |
| 373 | static RE | |
| 363 | static WRITE | |
| 374 | 364 | { |
| 375 | | |
| 365 | | |
| 376 | 366 | } |
| 377 | 367 | |
| 378 | static WRITE8_HANDLER(frogf_ppi8255_0_w) | |
| 379 | { | |
| 380 | ppi8255_0_w(machine, offset >> 3, data); | |
| 381 | } | |
| 382 | ||
| 383 | static WRITE8_HANDLER(frogf_ppi8255_1_w) | |
| 384 | { | |
| 385 | ppi8255_1_w(machine, offset >> 3, data); | |
| 386 | } | |
| 387 | ||
| 388 | 368 | static ADDRESS_MAP_START( frogf_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 389 | 369 | AM_RANGE(0x0000, 0x2fff) AM_ROM |
| 390 | 370 | AM_RANGE(0x8000, 0x87ff) AM_RAM |
| r2454 | r2455 | |
| 398 | 378 | AM_RANGE(0xa808, 0xa808) AM_WRITE(galaxold_coin_counter_1_w) |
| 399 | 379 | AM_RANGE(0xa80e, 0xa80e) AM_WRITE(galaxold_coin_counter_0_w) |
| 400 | 380 | AM_RANGE(0xb800, 0xb800) AM_READ(watchdog_reset_r) |
| 401 | AM_RANGE(0xd000, 0xd018) AM_READWRITE(frogf_ppi8255_0_r, frogf_ppi8255_0_w) | |
| 402 | AM_RANGE(0xe000, 0xe018) AM_READWRITE(frogf_ppi8255_1_r, frogf_ppi8255_1_w) | |
| 381 | AM_RANGE(0xd000, 0xd018) AM_DEVREADWRITE(PPI8255, "ppi8255_0", frogf_ppi8255_r, frogf_ppi8255_w) | |
| 382 | AM_RANGE(0xe000, 0xe018) AM_DEVREADWRITE(PPI8255, "ppi8255_1", frogf_ppi8255_r, frogf_ppi8255_w) | |
| 403 | 383 | ADDRESS_MAP_END |
| 404 | 384 | |
| 405 | 385 | static ADDRESS_MAP_START( ad2083_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| r2454 | r2455 | |
| 1737 | 1717 | |
| 1738 | 1718 | static const struct AY8910interface scramble_ay8910_interface_2 = |
| 1739 | 1719 | { |
| 1720 | AY8910_LEGACY_OUTPUT, | |
| 1721 | AY8910_DEFAULT_LOADS, | |
| 1740 | 1722 | soundlatch_r, |
| 1741 | scramble_portB_r | |
| 1723 | scramble_portB_r, | |
| 1724 | NULL, | |
| 1725 | NULL | |
| 1742 | 1726 | }; |
| 1743 | 1727 | |
| 1744 | 1728 | static const struct AY8910interface sfx_ay8910_interface_1 = |
| 1745 | 1729 | { |
| 1746 | 0, | |
| 1747 | 0, | |
| 1730 | AY8910_LEGACY_OUTPUT, | |
| 1731 | AY8910_DEFAULT_LOADS, | |
| 1732 | NULL, | |
| 1733 | NULL, | |
| 1748 | 1734 | soundlatch2_w, |
| 1749 | 1735 | sfx_sh_irqtrigger_w |
| 1750 | 1736 | }; |
| 1751 | 1737 | |
| 1752 | 1738 | static const struct AY8910interface explorer_ay8910_interface_1 = |
| 1753 | 1739 | { |
| 1754 | scramble_portB_r | |
| 1740 | AY8910_LEGACY_OUTPUT, | |
| 1741 | AY8910_DEFAULT_LOADS, | |
| 1742 | scramble_portB_r, | |
| 1743 | NULL, | |
| 1744 | NULL, | |
| 1745 | NULL | |
| 1755 | 1746 | }; |
| 1756 | 1747 | |
| 1757 | 1748 | static const struct AY8910interface explorer_ay8910_interface_2 = |
| 1758 | 1749 | { |
| 1759 | hotshock_soundlatch_r | |
| 1750 | AY8910_LEGACY_OUTPUT, | |
| 1751 | AY8910_DEFAULT_LOADS, | |
| 1752 | hotshock_soundlatch_r, | |
| 1753 | NULL, | |
| 1754 | NULL, | |
| 1755 | NULL | |
| 1760 | 1756 | }; |
| 1761 | 1757 | |
| 1762 | 1758 | static const struct AY8910interface hotshock_ay8910_interface_2 = |
| 1763 | 1759 | { |
| 1760 | AY8910_LEGACY_OUTPUT, | |
| 1761 | AY8910_DEFAULT_LOADS, | |
| 1764 | 1762 | hotshock_soundlatch_r, |
| 1765 | scramble_portB_r | |
| 1763 | scramble_portB_r, | |
| 1764 | NULL, | |
| 1765 | NULL | |
| 1766 | 1766 | }; |
| 1767 | 1767 | |
| 1768 | 1768 | static const struct AY8910interface scorpion_ay8910_interface_1 = |
| 1769 | 1769 | { |
| 1770 | 0, | |
| 1771 | 0, | |
| 1770 | AY8910_LEGACY_OUTPUT, | |
| 1771 | AY8910_DEFAULT_LOADS, | |
| 1772 | NULL, | |
| 1773 | NULL, | |
| 1772 | 1774 | scorpion_extra_sound_w, |
| 1773 | 1775 | scorpion_sound_cmd_w, |
| 1774 | 1776 | }; |
| r2454 | r2455 | |
| 1860 | 1862 | |
| 1861 | 1863 | MDRV_MACHINE_RESET(scramble) |
| 1862 | 1864 | |
| 1865 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 1866 | MDRV_DEVICE_CONFIG( scramble_ppi_ppi8255_intf[0] ) | |
| 1867 | ||
| 1868 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 1869 | MDRV_DEVICE_CONFIG( scramble_ppi_ppi8255_intf[1] ) | |
| 1870 | ||
| 1863 | 1871 | /* video hardware */ |
| 1864 | 1872 | MDRV_SCREEN_ADD("main", RASTER) |
| 1865 | 1873 | MDRV_SCREEN_REFRESH_RATE(16000.0/132/2) |
| r2454 | r2455 | |
| 1954 | 1962 | MDRV_CPU_MODIFY("main") |
| 1955 | 1963 | MDRV_CPU_PROGRAM_MAP(mars_readmem,mars_writemem) |
| 1956 | 1964 | |
| 1965 | MDRV_DEVICE_MODIFY( "ppi8255_0", PPI8255 ) | |
| 1966 | MDRV_DEVICE_CONFIG( mars_ppi8255_intf[0] ) | |
| 1967 | ||
| 1968 | MDRV_DEVICE_MODIFY( "ppi8255_1", PPI8255 ) | |
| 1969 | MDRV_DEVICE_CONFIG( mars_ppi8255_intf[1] ) | |
| 1970 | ||
| 1957 | 1971 | /* video hardware */ |
| 1958 | 1972 | MDRV_PALETTE_LENGTH(32+64+2+0) /* 32 for characters, 64 for stars, 2 for bullets, 0/1 for background */ |
| 1959 | 1973 | MDRV_PALETTE_INIT(galaxold) |
| r2454 | r2455 | |
| 1979 | 1993 | MDRV_CPU_MODIFY("main") |
| 1980 | 1994 | MDRV_CPU_PROGRAM_MAP(newsin7_readmem,newsin7_writemem) |
| 1981 | 1995 | |
| 1996 | MDRV_DEVICE_MODIFY( "ppi8255_0", PPI8255 ) | |
| 1997 | MDRV_DEVICE_CONFIG( mars_ppi8255_intf[0] ) | |
| 1998 | ||
| 1999 | MDRV_DEVICE_MODIFY( "ppi8255_1", PPI8255 ) | |
| 2000 | MDRV_DEVICE_CONFIG( mars_ppi8255_intf[1] ) | |
| 2001 | ||
| 1982 | 2002 | /* video hardware */ |
| 1983 | 2003 | MDRV_GFXDECODE(newsin7) |
| 1984 | 2004 | MDRV_PALETTE_LENGTH(32+64+2+0) /* 32 for characters, 64 for stars, 2 for bullets, 0/1 for background */ |
| r2454 | r2455 | |
| 1993 | 2013 | MDRV_CPU_MODIFY("main") |
| 1994 | 2014 | MDRV_CPU_PROGRAM_MAP(mars_readmem,mrkougar_writemem) |
| 1995 | 2015 | |
| 2016 | MDRV_DEVICE_MODIFY( "ppi8255_0", PPI8255 ) | |
| 2017 | MDRV_DEVICE_CONFIG( mrkougar_ppi8255_intf[0] ) | |
| 2018 | ||
| 2019 | MDRV_DEVICE_MODIFY( "ppi8255_1", PPI8255 ) | |
| 2020 | MDRV_DEVICE_CONFIG( mrkougar_ppi8255_intf[1] ) | |
| 2021 | ||
| 1996 | 2022 | /* video hardware */ |
| 1997 | 2023 | MDRV_GFXDECODE(mrkougar) |
| 1998 | 2024 | MDRV_PALETTE_LENGTH(32+64+2+0) /* 32 for characters, 64 for stars, 2 for bullets, 0/1 for background */ |
| r2454 | r2455 | |
| 2006 | 2032 | MDRV_CPU_MODIFY("main") |
| 2007 | 2033 | MDRV_CPU_PROGRAM_MAP(mars_readmem,mrkougar_writemem) |
| 2008 | 2034 | |
| 2035 | MDRV_DEVICE_MODIFY( "ppi8255_0", PPI8255 ) | |
| 2036 | MDRV_DEVICE_CONFIG( mrkougar_ppi8255_intf[0] ) | |
| 2037 | ||
| 2038 | MDRV_DEVICE_MODIFY( "ppi8255_1", PPI8255 ) | |
| 2039 | MDRV_DEVICE_CONFIG( mrkougar_ppi8255_intf[1] ) | |
| 2040 | ||
| 2009 | 2041 | /* video hardware */ |
| 2010 | 2042 | MDRV_PALETTE_LENGTH(32+64+2+0) /* 32 for characters, 64 for stars, 2 for bullets, 0/1 for background */ |
| 2011 | 2043 | MDRV_PALETTE_INIT(galaxold) |
| r2454 | r2455 | |
| 2018 | 2050 | MDRV_CPU_MODIFY("main") |
| 2019 | 2051 | MDRV_CPU_PROGRAM_MAP(ckongs_readmem,ckongs_writemem) |
| 2020 | 2052 | |
| 2053 | MDRV_DEVICE_MODIFY( "ppi8255_0", PPI8255 ) | |
| 2054 | MDRV_DEVICE_CONFIG( ckongs_ppi8255_intf[0] ) | |
| 2055 | ||
| 2056 | MDRV_DEVICE_MODIFY( "ppi8255_1", PPI8255 ) | |
| 2057 | MDRV_DEVICE_CONFIG( ckongs_ppi8255_intf[1] ) | |
| 2058 | ||
| 2021 | 2059 | /* video hardware */ |
| 2022 | 2060 | MDRV_PALETTE_LENGTH(32+64+2+0) /* 32 for characters, 64 for stars, 2 for bullets, 0/1 for background */ |
| 2023 | 2061 | MDRV_PALETTE_INIT(galaxold) |
| r2454 | r2455 | |
| 2031 | 2069 | MDRV_CPU_MODIFY("main") |
| 2032 | 2070 | MDRV_CPU_PROGRAM_MAP(hotshock_readmem,hotshock_writemem) |
| 2033 | 2071 | |
| 2072 | MDRV_DEVICE_REMOVE( "ppi8255_0", PPI8255 ) | |
| 2073 | MDRV_DEVICE_REMOVE( "ppi8255_1", PPI8255 ) | |
| 2074 | ||
| 2034 | 2075 | MDRV_CPU_MODIFY("audio") |
| 2035 | 2076 | MDRV_CPU_IO_MAP(hotshock_sound_readport,hotshock_sound_writeport) |
| 2036 | 2077 | |
| r2454 | r2455 | |
| 2197 | 2238 | MDRV_IMPORT_FROM(scramble) |
| 2198 | 2239 | MDRV_CPU_MODIFY("main") |
| 2199 | 2240 | MDRV_CPU_PROGRAM_MAP(turpins_readmem,turpins_writemem) |
| 2241 | ||
| 2200 | 2242 | MACHINE_DRIVER_END |
| 2201 | 2243 | |
| 2202 | 2244 | /*************************************************************************** |
| r2454 | r2455 | |
|---|---|---|
| 408 | 408 | g = (color >> 16) & 0xff; |
| 409 | 409 | b = (color >> 0) & 0xff; |
| 410 | 410 | |
| 411 | palette_set_color( | |
| 411 | palette_set_color(machine,offset, MAKE_RGB(r, g, b)); | |
| 412 | 412 | } |
| 413 | 413 | |
| 414 | 414 | static READ32_HANDLER ( jc_control_r ) |
| r2454 | r2455 | |
| 776 | 776 | { |
| 777 | 777 | if (!first_dsp_reset) |
| 778 | 778 | { |
| 779 | cpunum_set_input_line( | |
| 779 | cpunum_set_input_line(machine, 3, INPUT_LINE_RESET, CLEAR_LINE); | |
| 780 | 780 | } |
| 781 | 781 | first_dsp_reset = 0; |
| 782 | 782 | } |
| 783 | 783 | else |
| 784 | 784 | { |
| 785 | cpunum_set_input_line( | |
| 785 | cpunum_set_input_line(machine, 3, INPUT_LINE_RESET, ASSERT_LINE); | |
| 786 | 786 | } |
| 787 | 787 | } |
| 788 | 788 | } |
| r2454 | r2455 | |
| 1333 | 1333 | ROM_FILL( 0x0000, 0x0080, 0 ) |
| 1334 | 1334 | |
| 1335 | 1335 | ROM_REGION( 0x1800000, REGION_GFX1, 0 ) |
| 1336 | ROM_LOAD32_WORD( "e23-05.009", 0x0800002, 0x200000, BAD_DUMP CRC(9aa0d956) SHA1(bd146e3db7c2a53701eca6b43f903899ed15623a) ) | |
| 1337 | ROM_LOAD32_WORD( "e23-12.022", 0x0800000, 0x200000, BAD_DUMP CRC(c93fab09) SHA1(1ed292b11bf6bf09d1783d247f3de0c899e4df28) ) | |
| 1338 | ROM_LOAD32_WORD( "e23-06.010", 0x0c00002, 0x200000, BAD_DUMP CRC(2077ac3a) SHA1(894e1bbfef8a693bda50aa8681e8f283c0d6b6cf) ) | |
| 1339 | ROM_LOAD32_WORD( "e23-13.023", 0x0c00000, 0x200000, BAD_DUMP CRC(985f6785) SHA1(81cd33957b943f4bb33323fbf491ace344f8245b) ) | |
| 1340 | ROM_LOAD32_WORD( "e23-07.012", 0x1400002, 0x200000, BAD_DUMP CRC(bf1cd99d) SHA1(f98e1dacb485c7e40b0b2277a690d74ae020c9d9) ) | |
| 1341 | ROM_LOAD32_WORD( "e23-14.025", 0x1400000, 0x200000, BAD_DUMP CRC(9d54eac7) SHA1(4f97b388a0fd0529d26e1cc31491a0e2ce6c381d) ) | |
| 1336 | ROM_LOAD32_WORD( "e23-05.009", 0x0800002, 0x200000, CRC(6e5d11ec) SHA1(e5c39d80577bf8ae9fc6162dc54571c6c8421160) ) | |
| 1337 | ROM_LOAD32_WORD( "e23-12.022", 0x0800000, 0x200000, CRC(7365333c) SHA1(4f7b75088799ea37f714bc7e5c5b276a7e5d933f) ) | |
| 1338 | ROM_LOAD32_WORD( "e23-06.010", 0x0c00002, 0x200000, CRC(ffcfd153) SHA1(65fa486cf0156e2988bd6e7060d66f87f765a123) ) | |
| 1339 | ROM_LOAD32_WORD( "e23-13.023", 0x0c00000, 0x200000, CRC(16982d37) SHA1(134370f7dfadb1886f1e5e5dd16f8b72ad08fc68) ) | |
| 1340 | ROM_LOAD32_WORD( "e23-07.012", 0x1400002, 0x200000, CRC(90f2a87c) SHA1(770bb89fa42cb2a1d5a58525b8d72ed7df3f93ed) ) | |
| 1341 | ROM_LOAD32_WORD( "e23-14.025", 0x1400000, 0x200000, CRC(1bc5a914) SHA1(92f82a4e2fbac73dbb3293726fc09022bd11a8fe) ) | |
| 1342 | 1342 | |
| 1343 | 1343 | ROM_REGION( 0x1000000, REGION_GFX2, 0 ) /* only accessible to the TMS */ |
| 1344 | ROM_LOAD( "e23-01.005", 0x0000000, 0x200000, BAD_DUMP CRC(c5018242) SHA1(d1a45aa6899d9a95b32aeba0f9a4520714d5f5a3) ) | |
| 1345 | ROM_LOAD( "e23-02.006", 0x0200000, 0x200000, BAD_DUMP CRC(dbf24766) SHA1(2ee0bdb9f912f31bdf962a1af53ad1a6e3121a05) ) | |
| 1346 | ROM_LOAD( "e23-03.007", 0x0400000, 0x200000, BAD_DUMP CRC(3ab59dd0) SHA1(39e93d306a59017bef0f2fdadc69f96aecbffca6) ) | |
| 1347 | ROM_LOAD( "e23-04.008", 0x0600000, 0x200000, BAD_DUMP CRC(5060119c) SHA1(c8c5c33bd37121d222961ecfcdb79bbe6cbdf821) ) | |
| 1348 | ROM_LOAD( "e23-08.018", 0x0800000, 0x200000, BAD_DUMP CRC(04738f5b) SHA1(0ebc8c61d87f10822148f3b272612dc10ac4652c) ) | |
| 1349 | ROM_LOAD( "e23-09.019", 0x0a00000, 0x200000, BAD_DUMP CRC(089fac53) SHA1(3af008c65f4b60ae221b90fdb52d4e6fe552e5a8) ) | |
| 1350 | ROM_LOAD( "e23-10.020", 0x0c00000, 0x200000, BAD_DUMP CRC(dccb19ed) SHA1(35749c823ad9a30f471367750c087435b678b42f) ) | |
| 1351 | ROM_LOAD( "e23-11.021", 0x0e00000, 0x200000, BAD_DUMP CRC(6981a46f) SHA1(262bf821275413c70a1a8374185df64c697d8b04) ) | |
| 1344 | ROM_LOAD( "e23-01.005", 0x0000000, 0x200000, CRC(2cbe4bbd) SHA1(ed6fe4344c86d50914b5ddbc720dd15544f4d07f) ) | |
| 1345 | ROM_LOAD( "e23-02.006", 0x0200000, 0x200000, CRC(7ebada03) SHA1(d75c992aa33dd7f71de6a6d09aac471012b0daa3) ) | |
| 1346 | ROM_LOAD( "e23-03.007", 0x0400000, 0x200000, CRC(5bf1f30b) SHA1(6e0c07b9f92962eec55ee444732a10ac78f8b050) ) | |
| 1347 | ROM_LOAD( "e23-04.008", 0x0600000, 0x200000, CRC(0f860fb5) SHA1(47c0db4ec6d02e10d8abfacd1fa332f7af3976dd) ) | |
| 1348 | ROM_LOAD( "e23-08.018", 0x0800000, 0x200000, CRC(bceea63e) SHA1(eeec1e2306aa37431c5ba69bdb9c5524ab7b7ba4) ) | |
| 1349 | ROM_LOAD( "e23-09.019", 0x0a00000, 0x200000, CRC(3917c12f) SHA1(e3a568f638bb6b0cd6237c9fee5fc350983ea1e7) ) | |
| 1350 | ROM_LOAD( "e23-10.020", 0x0c00000, 0x200000, CRC(038370d9) SHA1(c02f68a25121d2d5aae62c419522b25cd6ec32b6) ) | |
| 1351 | ROM_LOAD( "e23-11.021", 0x0e00000, 0x200000, CRC(91fab03d) SHA1(1865d8b679faa6f2b3c14db2c6c461c00afd547c) ) | |
| 1352 | 1352 | |
| 1353 | 1353 | ROM_REGION16_BE( 0x1000000, REGION_SOUND1, ROMREGION_ERASE00 ) |
| 1354 | ROM_LOAD16_BYTE( "e23-15.32", 0x000000, 0x200000, CRC(8955b7c7) SHA1(767626bd5cf6810b0368ee85e487c12ef7e8a23d)) | |
| 1355 | ROM_LOAD16_BYTE( "e23-16.33", 0x400000, 0x200000, CRC(1d63d785) SHA1(0cf74bb433e9c453e35f7a552fdf9e22084b2f49) ) | |
| 1356 | ROM_LOAD16_BYTE( "e23-17.34", 0x800000, 0x200000, CRC(1c54021a) SHA1(a1efbdb02d23a5d32ebd25cb8e99dface3178ebd) ) | |
| 1357 | ROM_LOAD16_BYTE( "e23-18.35", 0xc00000, 0x200000, CRC(1816f38a) SHA1(6451bdb4b4297aaf4987451bc0ddd97b0072e113) ) | |
| 1354 | ROM_LOAD16_BYTE( "e23-15.032", 0x000000, 0x200000, CRC(8955b7c7) SHA1(767626bd5cf6810b0368ee85e487c12ef7e8a23d)) | |
| 1355 | ROM_LOAD16_BYTE( "e23-16.033", 0x400000, 0x200000, CRC(1d63d785) SHA1(0cf74bb433e9c453e35f7a552fdf9e22084b2f49) ) | |
| 1356 | ROM_LOAD16_BYTE( "e23-17.034", 0x800000, 0x200000, CRC(1c54021a) SHA1(a1efbdb02d23a5d32ebd25cb8e99dface3178ebd) ) | |
| 1357 | ROM_LOAD16_BYTE( "e23-18.035", 0xc00000, 0x200000, CRC(1816f38a) SHA1(6451bdb4b4297aaf4987451bc0ddd97b0072e113) ) | |
| 1358 | 1358 | ROM_END |
| 1359 | 1359 | |
| 1360 | 1360 | ROM_START( sidebs2 ) |
| r2454 | r2455 | |
| 1785 | 1785 | ROM_END |
| 1786 | 1786 | |
| 1787 | 1787 | |
| 1788 | GAME( 1996, dendeg, 0, taitojc, dendeg, taitojc, ROT0, "Taito", "Densya De Go", GAME_NOT_WORKING ) | |
| 1789 | GAME( 1996, dendegx, dendeg, taitojc, dendeg, taitojc, ROT0, "Taito", "Densya De Go Ex", GAME_NOT_WORKING ) | |
| 1790 | GAME( 1998, dendeg2, 0, taitojc, dendeg, taitojc, ROT0, "Taito", "Densya De Go 2", GAME_NOT_WORKING ) | |
| 1791 | GAME( 1998, dendeg2x, dendeg2, taitojc, dendeg, taitojc, ROT0, "Taito", "Densya De Go 2 Ex", GAME_NOT_WORKING ) | |
| 1792 | GAME( 1996, sidebs, 0, taitojc, sidebs, taitojc, ROT0, "Taito", "Side By Side", GAME_NOT_WORKING ) | |
| 1793 | GAME( 1997, sidebs2, 0, taitojc, sidebs, taitojc, ROT0, "Taito", "Side By Side 2", GAME_IMPERFECT_GRAPHICS ) | |
| 1788 | GAME( 1996, dendeg, 0, taitojc, dendeg, taitojc, ROT0, "Taito", "Densya De Go (Japan)", GAME_NOT_WORKING ) | |
| 1789 | GAME( 1996, dendegx, dendeg, taitojc, dendeg, taitojc, ROT0, "Taito", "Densya De Go Ex (Japan)", GAME_NOT_WORKING ) | |
| 1790 | GAME( 1998, dendeg2, 0, taitojc, dendeg, taitojc, ROT0, "Taito", "Densya De Go 2 (Japan)", GAME_NOT_WORKING ) | |
| 1791 | GAME( 1998, dendeg2x, dendeg2, taitojc, dendeg, taitojc, ROT0, "Taito", "Densya De Go 2 Ex (Japan)", GAME_NOT_WORKING ) | |
| 1792 | GAME( 1996, sidebs, 0, taitojc, sidebs, taitojc, ROT0, "Taito", "Side By Side (Japan)", GAME_IMPERFECT_GRAPHICS ) | |
| 1793 | GAME( 1997, sidebs2, 0, taitojc, sidebs, taitojc, ROT0, "Taito", "Side By Side 2 (North/South America)", GAME_IMPERFECT_GRAPHICS ) | |
| 1794 | 1794 | GAME( 1997, sidebs2j, sidebs2, taitojc, sidebs, taitojc, ROT0, "Taito", "Side By Side 2 (Japan)", GAME_IMPERFECT_GRAPHICS ) |
| 1795 | 1795 | GAME( 1995, landgear, 0, taitojc, landgear, taitojc, ROT0, "Taito", "Landing Gear", GAME_NOT_WORKING ) |
| 1796 | 1796 | GAME( 1995, dangcurv, 0, taitojc, dangcurv, taitojc, ROT0, "Taito", "Dangerous Curves", GAME_NOT_WORKING ) |
| r2454 | r2455 | |
|---|---|---|
| 273 | 273 | |
| 274 | 274 | static const struct AY8910interface ay8910_interface = |
| 275 | 275 | { |
| 276 | AY8910_LEGACY_OUTPUT, | |
| 277 | AY8910_DEFAULT_LOADS, | |
| 276 | 278 | soundlatch_r, |
| 277 | soundlatch_r | |
| 279 | soundlatch_r, | |
| 280 | NULL, | |
| 281 | NULL | |
| 278 | 282 | }; |
| 279 | 283 | |
| 280 | 284 | static GFXDECODE_START( pitnrun ) |
| r2454 | r2455 | |
|---|---|---|
| 95 | 95 | ***************************************************************************/ |
| 96 | 96 | |
| 97 | 97 | #include "driver.h" |
| 98 | #include "deprecat.h" | |
| 99 | 98 | #include "cpu/z80/z80.h" |
| 100 | 99 | #include "sound/ay8910.h" |
| 101 | 100 | #include "sound/msm5205.h" |
| r2454 | r2455 | |
| 120 | 119 | static WRITE8_HANDLER( sub_cpu_halt_w ) |
| 121 | 120 | { |
| 122 | 121 | if (data) |
| 123 | cpunum_set_input_line( | |
| 122 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, CLEAR_LINE); | |
| 124 | 123 | else |
| 125 | cpunum_set_input_line( | |
| 124 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, ASSERT_LINE); | |
| 126 | 125 | } |
| 127 | 126 | |
| 128 | 127 | |
| r2454 | r2455 | |
| 638 | 637 | |
| 639 | 638 | static const struct AY8910interface ay8910_interface_1 = |
| 640 | 639 | { |
| 641 | 0, | |
| 642 | 0, | |
| 640 | AY8910_LEGACY_OUTPUT, | |
| 641 | AY8910_DEFAULT_LOADS, | |
| 642 | NULL, | |
| 643 | NULL, | |
| 643 | 644 | tehkanwc_portA_w, |
| 644 | 645 | tehkanwc_portB_w |
| 645 | 646 | }; |
| 646 | 647 | |
| 647 | 648 | static const struct AY8910interface ay8910_interface_2 = |
| 648 | 649 | { |
| 650 | AY8910_LEGACY_OUTPUT, | |
| 651 | AY8910_DEFAULT_LOADS, | |
| 649 | 652 | tehkanwc_portA_r, |
| 650 | tehkanwc_portB_r | |
| 653 | tehkanwc_portB_r, | |
| 654 | NULL, | |
| 655 | NULL | |
| 651 | 656 | }; |
| 652 | 657 | |
| 653 | 658 | static const struct MSM5205interface msm5205_interface = |
| r2454 | r2455 | |
|---|---|---|
| 198 | 198 | |
| 199 | 199 | static const struct YM2203interface ym2203_interface = |
| 200 | 200 | { |
| 201 | soundlatch_r, | |
| 202 | soundlatch2_r, | |
| 201 | { | |
| 202 | AY8910_LEGACY_OUTPUT, | |
| 203 | AY8910_DEFAULT_LOADS, | |
| 204 | soundlatch_r, | |
| 205 | soundlatch2_r, | |
| 206 | NULL, | |
| 207 | NULL | |
| 208 | }, | |
| 209 | NULL | |
| 203 | 210 | }; |
| 204 | 211 | |
| 205 | 212 |
| r2454 | r2455 | |
|---|---|---|
| 80 | 80 | ***************************************************************************/ |
| 81 | 81 | |
| 82 | 82 | #include "driver.h" |
| 83 | #include "deprecat.h" | |
| 84 | 83 | #include "suprridr.h" |
| 85 | 84 | #include "sound/ay8910.h" |
| 86 | 85 | |
| r2454 | r2455 | |
| 136 | 135 | |
| 137 | 136 | static WRITE8_HANDLER( sound_irq_ack_w ) |
| 138 | 137 | { |
| 139 | cpunum_set_input_line( | |
| 138 | cpunum_set_input_line(machine, 1, 0, CLEAR_LINE); | |
| 140 | 139 | } |
| 141 | 140 | |
| 142 | 141 | |
| r2454 | r2455 | |
| 338 | 337 | |
| 339 | 338 | static const struct AY8910interface ay8910_interface = |
| 340 | 339 | { |
| 341 | sound_data_r | |
| 340 | AY8910_LEGACY_OUTPUT, | |
| 341 | AY8910_DEFAULT_LOADS, | |
| 342 | sound_data_r, | |
| 343 | NULL, | |
| 344 | NULL, | |
| 345 | NULL | |
| 342 | 346 | }; |
| 343 | 347 | |
| 344 | 348 |
| r2454 | r2455 | |
|---|---|---|
| 333 | 333 | |
| 334 | 334 | static WRITE8_HANDLER( spy_sh_irqtrigger_w ) |
| 335 | 335 | { |
| 336 | cpunum_set_input_line_and_vector( | |
| 336 | cpunum_set_input_line_and_vector(machine, 1,0,HOLD_LINE,0xff); | |
| 337 | 337 | } |
| 338 | 338 | |
| 339 | 339 | static WRITE8_HANDLER( sound_bank_w ) |
| r2454 | r2455 | |
|---|---|---|
| 226 | 226 | // Accesses are always bytes, so resolve it |
| 227 | 227 | int suboff; |
| 228 | 228 | for(suboff=0; suboff < 3; suboff++) |
| 229 | if( | |
| 229 | if( | |
| 230 | 230 | break; |
| 231 | 231 | data >>= 8*suboff; |
| 232 | 232 | offset = offset*4+4+(3-suboff); |
| r2454 | r2455 | |
| 381 | 381 | |
| 382 | 382 | static WRITE8_HANDLER( psikyo_clear_nmi_w ) |
| 383 | 383 | { |
| 384 | cpunum_set_input_line( | |
| 384 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, CLEAR_LINE); | |
| 385 | 385 | z80_nmi = 0; |
| 386 | 386 | } |
| 387 | 387 |
| r2454 | r2455 | |
|---|---|---|
| 845 | 845 | |
| 846 | 846 | static const struct AY8910interface ay8910_interface = |
| 847 | 847 | { |
| 848 | 0, 0, 0, 0 /* no ports used */ | |
| 848 | AY8910_LEGACY_OUTPUT, | |
| 849 | AY8910_DEFAULT_LOADS, | |
| 850 | NULL, NULL, NULL, NULL /* no ports used */ | |
| 849 | 851 | }; |
| 850 | 852 | |
| 851 | 853 |
| r2454 | r2455 | |
|---|---|---|
| 12 | 12 | ******************************************************************************/ |
| 13 | 13 | |
| 14 | 14 | #include "driver.h" |
| 15 | #include "deprecat.h" | |
| 16 | 15 | |
| 17 | 16 | static UINT8 *bgvideoram,*fgvideoram; |
| 18 | 17 | static int bg_bank = 0; |
| r2454 | r2455 | |
| 54 | 53 | static WRITE8_HANDLER( snd_irq_w ) |
| 55 | 54 | { |
| 56 | 55 | if(data == 1) |
| 57 | cpunum_set_input_line_and_vector( | |
| 56 | cpunum_set_input_line_and_vector(machine, 1, 0, ASSERT_LINE, 0x38); | |
| 58 | 57 | else |
| 59 | cpunum_set_input_line_and_vector( | |
| 58 | cpunum_set_input_line_and_vector(machine, 1, 0, CLEAR_LINE, 0x38); | |
| 60 | 59 | } |
| 61 | 60 | |
| 62 | 61 | static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| r2454 | r2455 | |
|---|---|---|
| 1323 | 1323 | model3_irq_state &= ~0x40; |
| 1324 | 1324 | |
| 1325 | 1325 | // serial configuration writes |
| 1326 | if ((mem_mask == U64(0x | |
| 1326 | if ((mem_mask == U64(0x | |
| 1327 | 1327 | { |
| 1328 | 1328 | SCSP_MidiIn(machine, 0, (data>>56)&0xff, 0); |
| 1329 | 1329 |
| r2454 | r2455 | |
|---|---|---|
| 1244 | 1244 | if( data ) |
| 1245 | 1245 | { |
| 1246 | 1246 | winrun_flushpoly(); |
| 1247 | cpunum_set_input_line( | |
| 1247 | cpunum_set_input_line(machine, 4, INPUT_LINE_RESET, PULSE_LINE); | |
| 1248 | 1248 | namcos21_ClearPolyFrameBuffer(); |
| 1249 | 1249 | } |
| 1250 | 1250 | } |
| r2454 | r2455 | |
|---|---|---|
| 345 | 345 | #ifdef PGMARM7SPEEDHACK |
| 346 | 346 | // cpu_boost_interleave(attotime_zero, ATTOTIME_IN_USEC(100)); |
| 347 | 347 | if (data!=0xaa) cpu_spinuntil_trigger(1000); |
| 348 | cpu_trigger( | |
| 348 | cpu_trigger(machine, 1002); | |
| 349 | 349 | #else |
| 350 | 350 | cpu_boost_interleave(attotime_zero, ATTOTIME_IN_USEC(100)); |
| 351 | 351 | cpu_spinuntil_time(ATTOTIME_IN_CYCLES(100, 0)); |
| r2454 | r2455 | |
| 376 | 376 | COMBINE_DATA(&arm7_latch); |
| 377 | 377 | |
| 378 | 378 | #ifdef PGMARM7SPEEDHACK |
| 379 | cpu_trigger( | |
| 379 | cpu_trigger(machine, 1000); | |
| 380 | 380 | timer_set(ATTOTIME_IN_USEC(50), NULL, 0, arm_irq); // i don't know how long.. |
| 381 | 381 | cpu_spinuntil_trigger(1002); |
| 382 | 382 | #else |
| 383 | cpunum_set_input_line( | |
| 383 | cpunum_set_input_line(machine, 2, ARM7_FIRQ_LINE, PULSE_LINE); | |
| 384 | 384 | cpu_boost_interleave(attotime_zero, ATTOTIME_IN_USEC(200)); |
| 385 | 385 | cpu_spinuntil_time(ATTOTIME_IN_CYCLES(200, 2)); // give the arm time to respond (just boosting the interleave doesn't help |
| 386 | 386 | #endif |
| r2454 | r2455 | |
| 419 | 419 | |
| 420 | 420 | if(data == 0x5050) { |
| 421 | 421 | sndti_reset(SOUND_ICS2115, 0); |
| 422 | cpunum_set_input_line(Machine, 1, INPUT_LINE_HALT, CLEAR_LINE); | |
| 423 | cpunum_set_input_line(Machine, 1, INPUT_LINE_RESET, PULSE_LINE); | |
| 422 | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, CLEAR_LINE); | |
| 423 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, PULSE_LINE); | |
| 424 | 424 | if(0) { |
| 425 | 425 | FILE *out; |
| 426 | 426 | out = fopen("z80ram.bin", "wb"); |
| r2454 | r2455 | |
| 432 | 432 | { |
| 433 | 433 | /* this might not be 100% correct, but several of the games (ddp2, puzzli2 etc. expect the z80 to be turned |
| 434 | 434 | off during data uploads, they write here before the upload */ |
| 435 | cpunum_set_input_line( | |
| 435 | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, ASSERT_LINE); | |
| 436 | 436 | } |
| 437 | 437 | } |
| 438 | 438 | |
| r2454 | r2455 | |
| 487 | 487 | { |
| 488 | 488 | static mame_system_time systime; |
| 489 | 489 | |
| 490 | mame_get_base_datetime( | |
| 490 | mame_get_base_datetime(machine, &systime); | |
| 491 | 491 | |
| 492 | 492 | // initialize the time, otherwise it crashes |
| 493 | 493 | if( !systime.time ) |
| 494 | mame_get_base_datetime( | |
| 494 | mame_get_base_datetime(machine, &systime); | |
| 495 | 495 | |
| 496 | 496 | CalCom <<= 1; |
| 497 | 497 | CalCom |= data & 1; |
| r2454 | r2455 | |
| 540 | 540 | break; |
| 541 | 541 | |
| 542 | 542 | case 0xf: //Load Date |
| 543 | mame_get_base_datetime( | |
| 543 | mame_get_base_datetime(machine, &systime); | |
| 544 | 544 | break; |
| 545 | 545 | } |
| 546 | 546 | } |
| r2454 | r2455 | |
|---|---|---|
| 83 | 83 | |
| 84 | 84 | static WRITE8_HANDLER( iqblock_irqack_w ) |
| 85 | 85 | { |
| 86 | cpunum_set_input_line( | |
| 86 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | static READ8_HANDLER( iqblock_irqack_r ) |
| 90 | 90 | { |
| 91 | cpunum_set_input_line( | |
| 91 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 92 | 92 | return 0; |
| 93 | 93 | } |
| 94 | 94 | |
| r2454 | r2455 | |
| 113 | 113 | |
| 114 | 114 | static const ppi8255_interface ppi8255_intf = |
| 115 | 115 | { |
| 116 | 1, /* 1 chip */ | |
| 117 | { input_port_0_r }, /* Port A read */ | |
| 118 | { input_port_1_r }, /* Port B read */ | |
| 119 | { input_port_2_r }, /* Port C read */ | |
| 120 | { 0 }, /* Port A write */ | |
| 121 | { 0 }, /* Port B write */ | |
| 122 | { port_C_w }, /* Port C write */ | |
| 116 | input_port_0_r, /* Port A read */ | |
| 117 | input_port_1_r, /* Port B read */ | |
| 118 | input_port_2_r, /* Port C read */ | |
| 119 | NULL, /* Port A write */ | |
| 120 | NULL, /* Port B write */ | |
| 121 | port_C_w /* Port C write */ | |
| 123 | 122 | }; |
| 124 | 123 | |
| 125 | static MACHINE_RESET( iqblock ) | |
| 126 | { | |
| 127 | ppi8255_init(&ppi8255_intf); | |
| 128 | } | |
| 129 | 124 | |
| 130 | ||
| 131 | ||
| 132 | 125 | static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 133 | 126 | AM_RANGE(0x0000, 0xefff) AM_ROM |
| 134 | 127 | AM_RANGE(0xf000, 0xffff) AM_RAM AM_BASE(&rambase) |
| r2454 | r2455 | |
| 141 | 134 | AM_RANGE(0x6000, 0x603f) AM_WRITE(iqblock_fgscroll_w) |
| 142 | 135 | AM_RANGE(0x6800, 0x69ff) AM_WRITE(iqblock_fgvideoram_w) /* initialized up to 6fff... bug or larger tilemap? */ |
| 143 | 136 | AM_RANGE(0x7000, 0x7fff) AM_WRITE(iqblock_bgvideoram_w) |
| 144 | AM_RANGE(0x5080, 0x5083) AM_WRITE(ppi8255_0_w) | |
| 145 | AM_RANGE(0x5080, 0x5083) AM_READ(ppi8255_0_r) | |
| 137 | AM_RANGE(0x5080, 0x5083) AM_DEVWRITE(PPI8255, "ppi8255", ppi8255_w) | |
| 138 | AM_RANGE(0x5080, 0x5083) AM_DEVREAD(PPI8255, "ppi8255", ppi8255_r) | |
| 146 | 139 | AM_RANGE(0x5090, 0x5090) AM_READ(input_port_3_r) |
| 147 | 140 | AM_RANGE(0x50a0, 0x50a0) AM_READ(input_port_4_r) |
| 148 | 141 | AM_RANGE(0x50b0, 0x50b0) AM_WRITE(YM2413_register_port_0_w) // UM3567_register_port_0_w |
| r2454 | r2455 | |
| 158 | 151 | // AM_RANGE(0x6000, 0x603f) AM_WRITE(iqblock_fgscroll_w) |
| 159 | 152 | // AM_RANGE(0x6800, 0x69ff) AM_WRITE(iqblock_fgvideoram_w) |
| 160 | 153 | AM_RANGE(0x7000, 0x7fff) AM_WRITE(iqblock_bgvideoram_w) |
| 161 | AM_RANGE(0x5080, 0x5083) AM_WRITE(ppi8255_0_w) | |
| 162 | AM_RANGE(0x5080, 0x5083) AM_READ(ppi8255_0_r) | |
| 154 | AM_RANGE(0x5080, 0x5083) AM_DEVWRITE(PPI8255, "ppi8255", ppi8255_w) | |
| 155 | AM_RANGE(0x5080, 0x5083) AM_DEVREAD(PPI8255, "ppi8255", ppi8255_r) | |
| 163 | 156 | AM_RANGE(0x5090, 0x5090) AM_READ(input_port_3_r) AM_WRITENOP |
| 164 | 157 | AM_RANGE(0x5091, 0x5091) AM_READNOP AM_WRITENOP |
| 165 | 158 | AM_RANGE(0x50a0, 0x50a0) AM_READ(input_port_4_r) |
| r2454 | r2455 | |
| 308 | 301 | MDRV_CPU_IO_MAP(main_portmap,0) |
| 309 | 302 | MDRV_CPU_VBLANK_INT_HACK(iqblock_interrupt,16) |
| 310 | 303 | |
| 311 | MDRV_MACHINE_RESET(iqblock) | |
| 304 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 305 | MDRV_DEVICE_CONFIG( ppi8255_intf ) | |
| 312 | 306 | |
| 313 | 307 | /* video hardware */ |
| 314 | 308 | MDRV_SCREEN_ADD("main", RASTER) |
| r2454 | r2455 | |
| 339 | 333 | MDRV_CPU_IO_MAP(main_portmap,0) |
| 340 | 334 | MDRV_CPU_VBLANK_INT_HACK(iqblock_interrupt,16) |
| 341 | 335 | |
| 342 | MDRV_MACHINE_RESET(iqblock) | |
| 336 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 337 | MDRV_DEVICE_CONFIG( ppi8255_intf ) | |
| 343 | 338 | |
| 344 | 339 | /* video hardware */ |
| 345 | 340 | MDRV_SCREEN_ADD("main", RASTER) |
| r2454 | r2455 | |
| 370 | 365 | MDRV_CPU_IO_MAP(pokerigs_portmap,0) |
| 371 | 366 | MDRV_CPU_VBLANK_INT_HACK(iqblock_interrupt,16) |
| 372 | 367 | |
| 373 | MDRV_MACHINE_RESET(iqblock) | |
| 368 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 369 | MDRV_DEVICE_CONFIG( ppi8255_intf ) | |
| 374 | 370 | |
| 375 | 371 | /* video hardware */ |
| 376 | 372 | MDRV_SCREEN_ADD("main", RASTER) |
| r2454 | r2455 | |
|---|---|---|
| 1160 | 1160 | |
| 1161 | 1161 | static const struct AY8910interface ay8910_interface = |
| 1162 | 1162 | { |
| 1163 | AY8910_LEGACY_OUTPUT, | |
| 1164 | AY8910_DEFAULT_LOADS, | |
| 1163 | 1165 | input_port_6_r, |
| 1164 | 1166 | input_port_7_r, |
| 1165 | 1167 | }; |
| r2454 | r2455 | |
|---|---|---|
| 163 | 163 | |
| 164 | 164 | static READ8_HANDLER( track_0_r ) |
| 165 | 165 | { |
| 166 | return (input_port_ | |
| 166 | return (input_port_ | |
| 167 | 167 | } |
| 168 | 168 | |
| 169 | 169 | |
| 170 | 170 | static READ8_HANDLER( track_1_r ) |
| 171 | 171 | { |
| 172 | return (input_port_ | |
| 172 | return (input_port_ | |
| 173 | 173 | } |
| 174 | 174 | |
| 175 | 175 | |
| 176 | 176 | static WRITE8_HANDLER( track_reset_w ) |
| 177 | 177 | { |
| 178 | 178 | /* reset the trackball counters */ |
| 179 | last_trackball_val[0] = input_port_2_r(machine, offset); | |
| 180 | last_trackball_val[1] = input_port_3_r(machine, offset); | |
| 179 | last_trackball_val[0] = input_port_read_indexed(machine, 2); | |
| 180 | last_trackball_val[1] = input_port_read_indexed(machine, 3); | |
| 181 | 181 | |
| 182 | 182 | watchdog_reset_w(machine, offset, data); |
| 183 | 183 | } |
| r2454 | r2455 | |
| 332 | 332 | |
| 333 | 333 | static const struct YM2203interface ym2203_interface = |
| 334 | 334 | { |
| 335 | ticket_dispenser_r, | |
| 336 | 0, | |
| 337 | 0, | |
| 338 | ticket_dispenser_w, /* Also a status LED. See memory map above */ | |
| 335 | { | |
| 336 | AY8910_LEGACY_OUTPUT, | |
| 337 | AY8910_DEFAULT_LOADS, | |
| 338 | ticket_dispenser_r, | |
| 339 | NULL, | |
| 340 | NULL, | |
| 341 | ticket_dispenser_w, /* Also a status LED. See memory map above */ | |
| 342 | }, | |
| 339 | 343 | firqhandler |
| 340 | 344 | }; |
| 341 | 345 |
| r2454 | r2455 | |
|---|---|---|
| 189 | 189 | return (taitosound_comm_r(machine,0) & 0xff); /* sound interface read */ |
| 190 | 190 | |
| 191 | 191 | case 0x04: |
| 192 | return input_port_ | |
| 192 | return input_port_ | |
| 193 | 193 | |
| 194 | 194 | case 0x05: |
| 195 | return input_port_ | |
| 195 | return input_port_ | |
| 196 | 196 | |
| 197 | 197 | case 0x06: |
| 198 | return input_port_ | |
| 198 | return input_port_ | |
| 199 | 199 | |
| 200 | 200 | case 0x07: |
| 201 | 201 | return coin_word; /* bits 3&4 coin lockouts, must return zero */ |
| 202 | 202 | |
| 203 | 203 | case 0x08: |
| 204 | return input_port_ | |
| 204 | return input_port_ | |
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | logerror("CPU #0 PC %06x: warning - read unmapped ioc offset %06x\n",activecpu_get_pc(),offset); |
| r2454 | r2455 | |
| 808 | 808 | |
| 809 | 809 | static const struct YM2203interface ym2203_interface_1 = |
| 810 | 810 | { |
| 811 | 0, /* portA read */ | |
| 812 | 0, | |
| 813 | darius_write_portA0, /* portA write */ | |
| 814 | darius_write_portB0, /* portB write */ | |
| 811 | { | |
| 812 | AY8910_LEGACY_OUTPUT, | |
| 813 | AY8910_DEFAULT_LOADS, | |
| 814 | NULL, /* portA read */ | |
| 815 | NULL, | |
| 816 | darius_write_portA0, /* portA write */ | |
| 817 | darius_write_portB0, /* portB write */ | |
| 818 | }, | |
| 815 | 819 | irqhandler |
| 816 | 820 | }; |
| 817 | 821 | |
| 818 | 822 | static const struct YM2203interface ym2203_interface_2 = |
| 819 | 823 | { |
| 820 | 0, /* portA read */ | |
| 821 | 0, | |
| 822 | darius_write_portA1, /* portA write */ | |
| 823 | darius_write_portB1 /* portB write */ | |
| 824 | { | |
| 825 | AY8910_LEGACY_OUTPUT, | |
| 826 | AY8910_DEFAULT_LOADS, | |
| 827 | NULL, /* portA read */ | |
| 828 | NULL, | |
| 829 | darius_write_portA1, /* portA write */ | |
| 830 | darius_write_portB1 /* portB write */ | |
| 831 | }, | |
| 824 | 832 | }; |
| 825 | 833 | |
| 826 | 834 |
| r2454 | r2455 | |
|---|---|---|
| 129 | 129 | ***************************************************************************/ |
| 130 | 130 | |
| 131 | 131 | #include "driver.h" |
| 132 | #include "deprecat.h" | |
| 133 | 132 | #include "cpu/mips/mips3.h" |
| 134 | 133 | #include "cpu/adsp2100/adsp2100.h" |
| 135 | 134 | #include "machine/idectrl.h" |
| r2454 | r2455 | |
| 311 | 310 | |
| 312 | 311 | static READ32_DEVICE_HANDLER( kinst_ide_extra_r ) |
| 313 | 312 | { |
| 314 | return ide_controller32_r(device, 0x3f6/4, 0x | |
| 313 | return ide_controller32_r(device, 0x3f6/4, 0x | |
| 315 | 314 | } |
| 316 | 315 | |
| 317 | 316 | |
| 318 | 317 | static WRITE32_DEVICE_HANDLER( kinst_ide_extra_w ) |
| 319 | 318 | { |
| 320 | ide_controller32_w(device, 0x3f6/4, data << 16, 0x | |
| 319 | ide_controller32_w(device, 0x3f6/4, data << 16, 0x | |
| 321 | 320 | } |
| 322 | 321 | |
| 323 | 322 |
| r2454 | r2455 | |
|---|---|---|
| 248 | 248 | { |
| 249 | 249 | if (eeprom_enabled) |
| 250 | 250 | { |
| 251 | mem_mask | |
| 251 | mem_mask &= 0x | |
| 252 | 252 | COMBINE_DATA(generic_nvram32 + offset); |
| 253 | 253 | eeprom_enabled = 0; |
| 254 | 254 | } |
| r2454 | r2455 | |
| 304 | 304 | |
| 305 | 305 | static READ32_HANDLER( sound_data_r ) |
| 306 | 306 | { |
| 307 | return atarigen_sound_r(machine,offset,0); | |
| 307 | return atarigen_sound_r(machine,offset,0xffff); | |
| 308 | 308 | } |
| 309 | 309 | |
| 310 | 310 |
| r2454 | r2455 | |
|---|---|---|
| 16 | 16 | ***************************************************************************/ |
| 17 | 17 | |
| 18 | 18 | #include "driver.h" |
| 19 | #include "deprecat.h" | |
| 20 | 19 | #include "cpu/m6809/m6809.h" |
| 21 | 20 | #include "sound/vlm5030.h" |
| 22 | 21 | #include "sound/dac.h" |
| r2454 | r2455 | |
| 45 | 44 | |
| 46 | 45 | static WRITE8_HANDLER( sbasketb_sh_irqtrigger_w ) |
| 47 | 46 | { |
| 48 | cpunum_set_input_line_and_vector( | |
| 47 | cpunum_set_input_line_and_vector(machine, 1,0,HOLD_LINE,0xff); | |
| 49 | 48 | } |
| 50 | 49 | |
| 51 | 50 | static WRITE8_HANDLER( sbasketb_coin_counter_w ) |
| r2454 | r2455 | |
|---|---|---|
| 188 | 188 | |
| 189 | 189 | static ADDRESS_MAP_START( smstrv_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 190 | 190 | AM_RANGE(0x00000, 0x007ff) AM_RAM |
| 191 | AM_RANGE(0x00800, 0x00803) AM_READWRITE(ppi8255_0_r, ppi8255 | |
| 191 | AM_RANGE(0x00800, 0x00803) AM_DEVREADWRITE(PPI8255, "ppi8255_0", ppi8255_r, ppi8255 | |
| 192 | 192 | AM_RANGE(0x01000, 0x01005) AM_RAM |
| 193 | AM_RANGE(0x01800, 0x01803) AM_READWRITE(ppi8255_1_r, ppi8255 | |
| 193 | AM_RANGE(0x01800, 0x01803) AM_DEVREADWRITE(PPI8255, "ppi8255_1", ppi8255_r, ppi8255 | |
| 194 | 194 | AM_RANGE(0x08000, 0x0ffff) AM_ROM |
| 195 | 195 | AM_RANGE(0xf8000, 0xfffff) AM_ROM // mirror for vectors |
| 196 | 196 | ADDRESS_MAP_END |
| r2454 | r2455 | |
| 205 | 205 | return 0; |
| 206 | 206 | } |
| 207 | 207 | |
| 208 | static const ppi8255_interface ppi8255_intf = | |
| 208 | static const ppi8255_interface ppi8255_intf[2] = | |
| 209 | 209 | { |
| 210 | 2, /* 2 chips */ | |
| 211 | { r1, r4 }, /* Port A read */ | |
| 212 | { r2, r5 }, /* Port B read */ | |
| 213 | { r3, r6 }, /* Port C read */ | |
| 214 | { w1, w4 }, /* Port A write */ | |
| 215 | { w2, w5 }, /* Port B write */ | |
| 216 | { w3, w6 }, /* Port C write */ | |
| 210 | { | |
| 211 | r1, /* Port A read */ | |
| 212 | r2, /* Port B read */ | |
| 213 | r3, /* Port C read */ | |
| 214 | w1, /* Port A write */ | |
| 215 | w2, /* Port B write */ | |
| 216 | w3 /* Port C write */ | |
| 217 | }, | |
| 218 | { | |
| 219 | r4, /* Port A read */ | |
| 220 | r5, /* Port B read */ | |
| 221 | r6, /* Port C read */ | |
| 222 | w4, /* Port A write */ | |
| 223 | w5, /* Port B write */ | |
| 224 | w6 /* Port C write */ | |
| 225 | } | |
| 217 | 226 | }; |
| 218 | 227 | |
| 219 | 228 | |
| 220 | static MACHINE_RESET( smstrv ) | |
| 221 | { | |
| 222 | ppi8255_init(&ppi8255_intf); | |
| 223 | } | |
| 224 | ||
| 225 | ||
| 226 | 229 | static MACHINE_DRIVER_START( smstrv ) |
| 227 | 230 | MDRV_CPU_ADD(I8088,24000000/2) |
| 228 | 231 | MDRV_CPU_PROGRAM_MAP(smstrv_map,0) |
| r2454 | r2455 | |
| 230 | 233 | MDRV_CPU_VBLANK_INT("main", nmi_line_pulse) |
| 231 | 234 | |
| 232 | 235 | // MDRV_NVRAM_HANDLER(generic_0fill) |
| 233 | MDRV_MACHINE_RESET(smstrv) | |
| 234 | 236 | |
| 237 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 238 | MDRV_DEVICE_CONFIG( ppi8255_intf[0] ) | |
| 239 | ||
| 240 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 241 | MDRV_DEVICE_CONFIG( ppi8255_intf[1] ) | |
| 242 | ||
| 235 | 243 | /* video hardware */ |
| 236 | 244 | MDRV_SCREEN_ADD("main", RASTER) |
| 237 | 245 | MDRV_SCREEN_REFRESH_RATE(60) |
| r2454 | r2455 | |
|---|---|---|
| 182 | 182 | |
| 183 | 183 | static const struct AY8910interface ay8910_interface_1 = |
| 184 | 184 | { |
| 185 | AY8910_LEGACY_OUTPUT, | |
| 186 | AY8910_DEFAULT_LOADS, | |
| 185 | 187 | soundlatch_r, |
| 186 | 0, | |
| 187 | 0, | |
| 188 | NULL, | |
| 189 | NULL, | |
| 188 | 190 | dummy_w |
| 189 | 191 | }; |
| 190 | 192 | |
| 191 | 193 | static const struct AY8910interface ay8910_interface_2 = |
| 192 | 194 | { |
| 193 | 0, | |
| 194 | 0, | |
| 195 | AY8910_LEGACY_OUTPUT, | |
| 196 | AY8910_DEFAULT_LOADS, | |
| 197 | NULL, | |
| 198 | NULL, | |
| 195 | 199 | dummy_w, |
| 196 | 200 | dummy_w |
| 197 | 201 | }; |
| r2454 | r2455 | |
|---|---|---|
| 264 | 264 | |
| 265 | 265 | static const struct YM2203interface ym2203_interface = |
| 266 | 266 | { |
| 267 | input_port_5_r, | |
| 268 | input_port_6_r, | |
| 269 | suprgolf_writeA, | |
| 270 | suprgolf_writeB, | |
| 267 | { | |
| 268 | AY8910_LEGACY_OUTPUT, | |
| 269 | AY8910_DEFAULT_LOADS, | |
| 270 | input_port_5_r, | |
| 271 | input_port_6_r, | |
| 272 | suprgolf_writeA, | |
| 273 | suprgolf_writeB, | |
| 274 | }, | |
| 271 | 275 | irqhandler |
| 272 | 276 | }; |
| 273 | 277 | static const gfx_layout gfxlayout = |
| r2454 | r2455 | |
|---|---|---|
| 207 | 207 | /* bit 0 is EEPROM data */ |
| 208 | 208 | /* bit 1 is EEPROM ready */ |
| 209 | 209 | /* bit 3 is service button */ |
| 210 | res = EEPROM_read_bit() | input_port_ | |
| 210 | res = EEPROM_read_bit() | input_port_ | |
| 211 | 211 | |
| 212 | 212 | if (init_eeprom_count) |
| 213 | 213 | { |
| r2454 | r2455 | |
|---|---|---|
| 42 | 42 | |
| 43 | 43 | static WRITE8_HANDLER( ironhors_sh_irqtrigger_w ) |
| 44 | 44 | { |
| 45 | cpunum_set_input_line_and_vector( | |
| 45 | cpunum_set_input_line_and_vector(machine, 1,0,HOLD_LINE,0xff); | |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | static WRITE8_HANDLER( ironhors_filter_w ) |
| r2454 | r2455 | |
| 402 | 402 | |
| 403 | 403 | static DISCRETE_SOUND_START( ironhors ) |
| 404 | 404 | |
| 405 | DISCRETE_INPUTX_STREAM(NODE_01, 0, 1.0, 0) | |
| 406 | DISCRETE_INPUTX_STREAM(NODE_02, 1, 1.0, 0) | |
| 407 | DISCRETE_INPUTX_STREAM(NODE_03, 2, 1.0, 0) | |
| 405 | DISCRETE_INPUTX_STREAM(NODE_01, 0, 5.0, 0) | |
| 406 | DISCRETE_INPUTX_STREAM(NODE_02, 1, 5.0, 0) | |
| 407 | DISCRETE_INPUTX_STREAM(NODE_03, 2, 5.0, 0) | |
| 408 | 408 | |
| 409 | 409 | DISCRETE_INPUTX_STREAM(NODE_04, 3, 1.0, 0) |
| 410 | 410 | |
| r2454 | r2455 | |
| 427 | 427 | |
| 428 | 428 | static const struct YM2203interface ym2203_interface = |
| 429 | 429 | { |
| 430 | 0, | |
| 431 | 0, | |
| 432 | ironhors_filter_w, | |
| 433 | 0 | |
| 430 | { | |
| 431 | AY8910_LEGACY_OUTPUT, | |
| 432 | AY8910_DEFAULT_LOADS, | |
| 433 | NULL, | |
| 434 | NULL, | |
| 435 | ironhors_filter_w, | |
| 436 | NULL | |
| 437 | }, | |
| 438 | NULL | |
| 434 | 439 | }; |
| 435 | 440 | |
| 436 | 441 |
| r2454 | r2455 | |
|---|---|---|
| 46 | 46 | */ |
| 47 | 47 | |
| 48 | 48 | #include "driver.h" |
| 49 | #include "deprecat.h" | |
| 50 | 49 | #include "cpu/mips/psx.h" |
| 51 | 50 | #include "includes/psx.h" |
| 52 | 51 | #include "machine/konamigx.h" |
| r2454 | r2455 | |
| 67 | 66 | sndto000[ ( offset << 1 ) + 1 ] = data >> 16; |
| 68 | 67 | if( offset == 3 ) |
| 69 | 68 | { |
| 70 | cpunum_set_input_line( | |
| 69 | cpunum_set_input_line(machine, 1, 1, HOLD_LINE ); | |
| 71 | 70 | } |
| 72 | 71 | } |
| 73 | 72 | if( ACCESSING_BITS_0_15 ) |
| r2454 | r2455 | |
| 141 | 140 | EEPROM_write_bit( ( data & 0x01 ) ? 1 : 0 ); |
| 142 | 141 | EEPROM_set_clock_line( ( data & 0x04 ) ? ASSERT_LINE : CLEAR_LINE ); |
| 143 | 142 | EEPROM_set_cs_line( ( data & 0x02 ) ? CLEAR_LINE : ASSERT_LINE ); |
| 144 | cpunum_set_input_line( | |
| 143 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, ( data & 0x40 ) ? CLEAR_LINE : ASSERT_LINE ); | |
| 145 | 144 | } |
| 146 | 145 | |
| 147 | 146 | static CUSTOM_INPUT( eeprom_bit_r ) |
| r2454 | r2455 | |
|---|---|---|
| 109 | 109 | |
| 110 | 110 | static ADDRESS_MAP_START( dealer_readport, ADDRESS_SPACE_IO, 8 ) |
| 111 | 111 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 112 | AM_RANGE(0x10, 0x13) AM_READ(ppi8255 | |
| 112 | AM_RANGE(0x10, 0x13) AM_DEVREAD(PPI8255, "ppi8255", ppi8255_r) | |
| 113 | 113 | AM_RANGE(0x38, 0x38) AM_READ(input_port_0_r) |
| 114 | 114 | ADDRESS_MAP_END |
| 115 | 115 | |
| 116 | 116 | static ADDRESS_MAP_START( dealer_writeport, ADDRESS_SPACE_IO, 8 ) |
| 117 | 117 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 118 | AM_RANGE(0x10, 0x13) AM_WRITE(ppi8255 | |
| 118 | AM_RANGE(0x10, 0x13) AM_DEVWRITE(PPI8255, "ppi8255", ppi8255_w) | |
| 119 | 119 | AM_RANGE(0x20, 0x24) AM_WRITE(dealer_decrypt_rom) |
| 120 | 120 | // AM_RANGE(0x40, 0x40) AM_WRITE(watchdog_reset_w) |
| 121 | 121 | ADDRESS_MAP_END |
| 122 | 122 | |
| 123 | 123 | static const ppi8255_interface ppi8255_intf = |
| 124 | 124 | { |
| 125 | 1, /* 1 chip */ | |
| 126 | { input_port_2_r }, /* Port A read */ | |
| 127 | { NULL }, /* Port B read */ | |
| 128 | { NULL }, /* Port C read */ | |
| 129 | { NULL }, /* Port A write */ | |
| 130 | { NULL }, /* Port B write */ | |
| 131 | { NULL }, /* Port C write */ | |
| 125 | input_port_2_r, /* Port A read */ | |
| 126 | NULL, /* Port B read */ | |
| 127 | NULL, /* Port C read */ | |
| 128 | NULL, /* Port A write */ | |
| 129 | NULL, /* Port B write */ | |
| 130 | NULL, /* Port C write */ | |
| 132 | 131 | }; |
| 133 | 132 | |
| 134 | 133 | /************************************* |
| r2454 | r2455 | |
| 376 | 375 | MDRV_CPU_IO_MAP(dealer_readport,dealer_writeport) |
| 377 | 376 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 378 | 377 | |
| 378 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 379 | MDRV_DEVICE_CONFIG( ppi8255_intf ) | |
| 380 | ||
| 379 | 381 | /* video hardware */ |
| 380 | 382 | MDRV_VIDEO_UPDATE(epos) |
| 381 | 383 | |
| r2454 | r2455 | |
| 558 | 560 | static MACHINE_RESET( dealer ) |
| 559 | 561 | { |
| 560 | 562 | memory_set_bankptr(1, memory_region(REGION_CPU1)); |
| 561 | ||
| 562 | ppi8255_init(&ppi8255_intf); | |
| 563 | 563 | } |
| 564 | 564 | |
| 565 | 565 | static DRIVER_INIT( dealer ) |
| r2454 | r2455 | |
|---|---|---|
| 127 | 127 | static WRITE8_HANDLER( mrflea_io_w ){ |
| 128 | 128 | mrflea_status |= 0x08; // pending command to IO CPU |
| 129 | 129 | mrflea_io = data; |
| 130 | cpunum_set_input_line( | |
| 130 | cpunum_set_input_line(machine, 1, 0, HOLD_LINE ); | |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | static READ8_HANDLER( mrflea_main_r ){ |
| r2454 | r2455 | |
|---|---|---|
| 9 | 9 | ***************************************************************************/ |
| 10 | 10 | |
| 11 | 11 | #include "driver.h" |
| 12 | #include "deprecat.h" | |
| 13 | 12 | #include "cpu/m68000/m68000.h" |
| 14 | 13 | #include "sound/okim6295.h" |
| 15 | 14 | |
| r2454 | r2455 | |
| 40 | 39 | static INTERRUPT_GEN( glass_interrupt ) |
| 41 | 40 | { |
| 42 | 41 | if (cause_interrupt){ |
| 43 | cpunum_set_input_line( | |
| 42 | cpunum_set_input_line(machine, 0, 6, HOLD_LINE); | |
| 44 | 43 | cause_interrupt = 0; |
| 45 | 44 | } |
| 46 | 45 | } |
| r2454 | r2455 | |
|---|---|---|
| 272 | 272 | /* update the different PIA pins from the input ports */ |
| 273 | 273 | |
| 274 | 274 | /* CA1 - copy of PA1 (COIN1) */ |
| 275 | pia_1_ca1_w(machine, 0, input_port_ | |
| 275 | pia_1_ca1_w(machine, 0, input_port_ | |
| 276 | 276 | |
| 277 | 277 | /* CA2 - copy of PA0 (SERVICE1) */ |
| 278 | pia_1_ca2_w(machine, 0, input_port_ | |
| 278 | pia_1_ca2_w(machine, 0, input_port_ | |
| 279 | 279 | |
| 280 | 280 | /* CB1 - (crosshatch) */ |
| 281 | pia_1_cb1_w(machine, 0, input_port_ | |
| 281 | pia_1_cb1_w(machine, 0, input_port_ | |
| 282 | 282 | |
| 283 | 283 | /* CB2 - NOT CONNECTED */ |
| 284 | 284 | } |
| r2454 | r2455 | |
|---|---|---|
| 684 | 684 | |
| 685 | 685 | #if USE_V25 |
| 686 | 686 | /* only the ram-based V25 based games access the following bits */ |
| 687 | //cpunum_set_input_line(Machine, 1, INPUT_LINE_RESET, (data & 0x0020) ? CLEAR_LINE : ASSERT_LINE ); | |
| 688 | cpunum_set_input_line(Machine, 1, INPUT_LINE_HALT, (data & 0x0010) ? CLEAR_LINE : ASSERT_LINE); | |
| 687 | //cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, (data & 0x0020) ? CLEAR_LINE : ASSERT_LINE ); | |
| 688 | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, (data & 0x0010) ? CLEAR_LINE : ASSERT_LINE); | |
| 689 | 689 | #endif |
| 690 | 690 | |
| 691 | 691 | } |
| r2454 | r2455 | |
| 1238 | 1238 | { |
| 1239 | 1239 | // not sure whether this is correct |
| 1240 | 1240 | // the 68K writes here during the sound IRQ handler, and nowhere else... |
| 1241 | cpunum_set_input_line( | |
| 1241 | cpunum_set_input_line(machine, 0, raizing_sndirq_line, CLEAR_LINE); | |
| 1242 | 1242 | } |
| 1243 | 1243 | |
| 1244 | 1244 | |
| 1245 | 1245 | static WRITE8_HANDLER( raizing_sndirq_w ) |
| 1246 | 1246 | { |
| 1247 | 1247 | // if raizing_clear_sndirq_w() is correct, should this be ASSERT_LINE? |
| 1248 | cpunum_set_input_line( | |
| 1248 | cpunum_set_input_line(machine, 0, raizing_sndirq_line, HOLD_LINE); | |
| 1249 | 1249 | } |
| 1250 | 1250 | |
| 1251 | 1251 | |
| 1252 | 1252 | static WRITE8_HANDLER( raizing_clear_nmi_w ) |
| 1253 | 1253 | { |
| 1254 | cpunum_set_input_line( | |
| 1254 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, CLEAR_LINE); | |
| 1255 | 1255 | } |
| 1256 | 1256 | |
| 1257 | 1257 | |
| r2454 | r2455 | |
| 1577 | 1577 | WRITE16_HANDLER( fixeight_subcpu_ctrl ) |
| 1578 | 1578 | { |
| 1579 | 1579 | /* 0x18 used */ |
| 1580 | cpunum_set_input_line( | |
| 1580 | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, (data & 0x0010) ? CLEAR_LINE : ASSERT_LINE); | |
| 1581 | 1581 | } |
| 1582 | 1582 | #endif |
| 1583 | 1583 |
| r2454 | r2455 | |
|---|---|---|
| 480 | 480 | { |
| 481 | 481 | COMBINE_DATA(&main2sub_cmd); |
| 482 | 482 | logerror("cpu #%d (PC=%06X): write cmd %04x to subcpu\n", cpu_getactivecpu(), activecpu_get_previouspc(), main2sub_cmd); |
| 483 | cpunum_set_input_line( | |
| 483 | cpunum_set_input_line(machine, 1, 4, HOLD_LINE); | |
| 484 | 484 | } |
| 485 | 485 | static READ16_HANDLER ( main2sub_status_r ) |
| 486 | 486 | { |
| r2454 | r2455 | |
| 513 | 513 | { |
| 514 | 514 | COMBINE_DATA(&sub2main_cmd); |
| 515 | 515 | logerror("cpu #%d (PC=%06X): write cmd %04x to maincpu\n", cpu_getactivecpu(), activecpu_get_previouspc(), sub2main_cmd); |
| 516 | cpunum_set_input_line( | |
| 516 | cpunum_set_input_line(machine, 0, 3, HOLD_LINE); | |
| 517 | 517 | } |
| 518 | 518 | static READ16_HANDLER ( sub2main_cmd_r ) |
| 519 | 519 | { |
| r2454 | r2455 | |
|---|---|---|
| 125 | 125 | }; |
| 126 | 126 | #endif |
| 127 | 127 | |
| 128 | static const ppi8255_interface ppi8255_intf = | |
| 128 | static const ppi8255_interface ppi8255_intf[2] = | |
| 129 | 129 | { |
| 130 | 2, | |
| 131 | { input_port_0_r, input_port_1_r }, /* Port A read */ | |
| 132 | { input_port_2_r, input_port_3_r }, /* Port B read */ | |
| 133 | { NULL, input_port_4_r }, /* Port C read */ | |
| 134 | { NULL, NULL }, /* Port A write */ | |
| 135 | { NULL, NULL }, /* Port B write */ | |
| 136 | { NULL, NULL }, /* Port C write */ | |
| 130 | { | |
| 131 | input_port_0_r, /* Port A read */ | |
| 132 | input_port_2_r, /* Port B read */ | |
| 133 | NULL, /* Port C read */ | |
| 134 | NULL, /* Port A write */ | |
| 135 | NULL, /* Port B write */ | |
| 136 | NULL /* Port C write */ | |
| 137 | }, | |
| 138 | { | |
| 139 | input_port_1_r, /* Port A read */ | |
| 140 | input_port_3_r, /* Port B read */ | |
| 141 | input_port_4_r, /* Port C read */ | |
| 142 | NULL, /* Port A write */ | |
| 143 | NULL, /* Port B write */ | |
| 144 | NULL /* Port C write */ | |
| 145 | } | |
| 137 | 146 | }; |
| 138 | 147 | |
| 139 | 148 | static ADDRESS_MAP_START( merit_mem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 140 | 149 | AM_RANGE( 0x0000, 0x7fff ) AM_ROM |
| 141 | 150 | AM_RANGE( 0x8000, 0x9fff ) AM_ROMBANK(1) |
| 142 | 151 | AM_RANGE( 0xa000, 0xbfff ) AM_RAM AM_BASE(&backup_ram) |
| 143 | AM_RANGE( 0xc004, 0xc007 ) AM_READWRITE(ppi8255_0_r, ppi8255_0_w) | |
| 144 | AM_RANGE( 0xc008, 0xc00a ) AM_READWRITE(ppi8255_1_r, ppi8255_1_w) | |
| 152 | AM_RANGE( 0xc004, 0xc007 ) AM_DEVREADWRITE(PPI8255, "ppi8255_0", ppi8255_r, ppi8255_w) | |
| 153 | AM_RANGE( 0xc008, 0xc00a ) AM_DEVREADWRITE(PPI8255, "ppi8255_1", ppi8255_r, ppi8255_w) | |
| 145 | 154 | AM_RANGE( 0xc00b, 0xc00b ) AM_WRITE(merit_prot_w) |
| 146 | 155 | // AM_RANGE( 0xc000, 0xc00f ) AM_READ(dummy_inputs_r) |
| 147 | 156 | // AM_RANGE( 0xc008, 0xc008 ) AM_READ(input_port_0_r) |
| r2454 | r2455 | |
| 159 | 168 | AM_RANGE(0xc10c, 0xc10c) AM_WRITE(AY8910_write_port_0_w) |
| 160 | 169 | ADDRESS_MAP_END |
| 161 | 170 | |
| 162 | static MACHINE_RESET( couple ) | |
| 163 | { | |
| 164 | ppi8255_init(&ppi8255_intf); | |
| 165 | } | |
| 166 | ||
| 167 | 171 | static PALETTE_INIT( couple ) |
| 168 | 172 | { |
| 169 | 173 | int i; |
| r2454 | r2455 | |
| 435 | 439 | MDRV_CPU_IO_MAP(merit_io,0) |
| 436 | 440 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 437 | 441 | |
| 438 | MDRV_MACHINE_RESET(couple) | |
| 442 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 443 | MDRV_DEVICE_CONFIG( ppi8255_intf[0] ) | |
| 439 | 444 | |
| 445 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 446 | MDRV_DEVICE_CONFIG( ppi8255_intf[1] ) | |
| 447 | ||
| 440 | 448 | /* video hardware */ |
| 441 | 449 | MDRV_SCREEN_ADD("main", RASTER) |
| 442 | 450 | MDRV_SCREEN_REFRESH_RATE(60) |
| r2454 | r2455 | |
|---|---|---|
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | 22 | #include "driver.h" |
| 23 | #include "deprecat.h" | |
| 24 | 23 | #include "cpu/z80/z80.h" |
| 25 | 24 | #include "snk.h" |
| 26 | 25 | #include "sound/ay8910.h" |
| r2454 | r2455 | |
| 75 | 74 | |
| 76 | 75 | static READ8_HANDLER( sgladiat_sound_nmi_ack_r ) |
| 77 | 76 | { |
| 78 | // cpunum_set_input_line( | |
| 77 | // cpunum_set_input_line(machine, 2, INPUT_LINE_NMI, CLEAR_LINE); | |
| 79 | 78 | return 0; |
| 80 | 79 | } |
| 81 | 80 |
| r2454 | r2455 | |
|---|---|---|
| 78 | 78 | { |
| 79 | 79 | //wrong |
| 80 | 80 | if(activecpu_get_pc()==0x822) |
| 81 | cpunum_set_input_line( | |
| 81 | cpunum_set_input_line(machine, 2, INPUT_LINE_RESET, PULSE_LINE); | |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | static WRITE8_HANDLER( sound_bankswitch_w ) |
| r2454 | r2455 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "deprecat.h" | |
| 11 | 10 | #include "cpu/m6809/m6809.h" |
| 12 | 11 | #include "cpu/m68000/m68000.h" |
| 13 | 12 | #include "sound/okim6295.h" |
| r2454 | r2455 | |
|---|---|---|
| 360 | 360 | |
| 361 | 361 | static const struct AY8910interface ay8910_interface = |
| 362 | 362 | { |
| 363 | AY8910_LEGACY_OUTPUT, | |
| 364 | AY8910_DEFAULT_LOADS, | |
| 363 | 365 | tankbust_soundlatch_r, |
| 364 | tankbust_soundtimer_r | |
| 366 | tankbust_soundtimer_r, | |
| 367 | NULL, | |
| 368 | NULL | |
| 365 | 369 | }; |
| 366 | 370 | |
| 367 | 371 | static MACHINE_DRIVER_START( tankbust ) |
| r2454 | r2455 | |
|---|---|---|
| 372 | 372 | |
| 373 | 373 | // Bit 0 : SUBINT |
| 374 | 374 | if ( (wecleman_irqctrl & 1) && (!(data & 1)) ) // 1->0 transition |
| 375 | cpunum_set_input_line( | |
| 375 | cpunum_set_input_line(machine, 1,4,HOLD_LINE); | |
| 376 | 376 | |
| 377 | 377 | // Bit 1 : NSUBRST |
| 378 | if (data & 2) cpunum_set_input_line(Machine, 1, INPUT_LINE_RESET, CLEAR_LINE ); | |
| 379 | else cpunum_set_input_line(Machine, 1, INPUT_LINE_RESET, ASSERT_LINE ); | |
| 378 | if (data & 2) cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, CLEAR_LINE ); | |
| 379 | else cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, ASSERT_LINE ); | |
| 380 | 380 | |
| 381 | 381 | // Bit 2 : SOUND-ON |
| 382 | 382 | // Bit 3 : SOUNDRST |
| r2454 | r2455 | |
| 408 | 408 | { |
| 409 | 409 | switch ( (wecleman_selected_ip >> 5) & 3 ) |
| 410 | 410 | { // From WEC Le Mans Schems: |
| 411 | case 0: return input_port_ | |
| 411 | case 0: return input_port_ | |
| 412 | 412 | case 1: return ~0; // ????? - Schems: Not Used |
| 413 | case 2: return input_port_ | |
| 413 | case 2: return input_port_ | |
| 414 | 414 | case 3: return ~0; // Table - Schems: Turnvr |
| 415 | 415 | |
| 416 | 416 | default: return ~0; |
| r2454 | r2455 | |
|---|---|---|
| 193 | 193 | |
| 194 | 194 | static const struct AY8910interface ay8910_interface = |
| 195 | 195 | { |
| 196 | AY8910_LEGACY_OUTPUT, | |
| 197 | AY8910_DEFAULT_LOADS, | |
| 196 | 198 | input_port_1_r, |
| 197 | input_port_0_r | |
| 199 | input_port_0_r, | |
| 200 | NULL, | |
| 201 | NULL | |
| 198 | 202 | }; |
| 199 | 203 | |
| 200 | 204 |
| r2454 | r2455 | |
|---|---|---|
| 659 | 659 | |
| 660 | 660 | /* VBLANK: clear anything pending on the old IRQ */ |
| 661 | 661 | if (vblank_irq_num != 0) |
| 662 | cpunum_set_input_line( | |
| 662 | cpunum_set_input_line(machine, 0, vblank_irq_num, CLEAR_LINE); | |
| 663 | 663 | |
| 664 | 664 | /* VBLANK: compute the new IRQ vector */ |
| 665 | 665 | irq = (*interrupt_config >> (2*VBLANK_IRQ_SHIFT)) & 3; |
| r2454 | r2455 | |
| 670 | 670 | { |
| 671 | 671 | /* Widget: clear anything pending on the old IRQ */ |
| 672 | 672 | if (widget.irq_num != 0) |
| 673 | cpunum_set_input_line( | |
| 673 | cpunum_set_input_line(machine, 0, widget.irq_num, CLEAR_LINE); | |
| 674 | 674 | |
| 675 | 675 | /* Widget: compute the new IRQ vector */ |
| 676 | 676 | irq = (*interrupt_config >> (2*WIDGET_IRQ_SHIFT)) & 3; |
| r2454 | r2455 | |
| 682 | 682 | { |
| 683 | 683 | /* Ethernet: clear anything pending on the old IRQ */ |
| 684 | 684 | if (ethernet_irq_num != 0) |
| 685 | cpunum_set_input_line( | |
| 685 | cpunum_set_input_line(machine, 0, ethernet_irq_num, CLEAR_LINE); | |
| 686 | 686 | |
| 687 | 687 | /* Ethernet: compute the new IRQ vector */ |
| 688 | 688 | irq = (*interrupt_config >> (2*ETHERNET_IRQ_SHIFT)) & 3; |
| r2454 | r2455 | |
| 1018 | 1018 | } |
| 1019 | 1019 | |
| 1020 | 1020 | /* write the data and advance */ |
| 1021 | voodoo_0_w(machine, (dstaddr & 0xffffff) / 4, program_read_dword(srcaddr), 0); | |
| 1021 | voodoo_0_w(machine, (dstaddr & 0xffffff) / 4, program_read_dword(srcaddr), 0xffffffff); | |
| 1022 | 1022 | srcaddr += srcinc; |
| 1023 | 1023 | dstaddr += dstinc; |
| 1024 | 1024 | bytesleft -= 4; |
| r2454 | r2455 | |
| 1169 | 1169 | int which = offset % 4; |
| 1170 | 1170 | |
| 1171 | 1171 | if (LOG_DMA) |
| 1172 | logerror("%08X:Galileo write to offset %03X = %08X & %08X\n", activecpu_get_pc(), offset*4, data, | |
| 1172 | logerror("%08X:Galileo write to offset %03X = %08X & %08X\n", activecpu_get_pc(), offset*4, data, | |
| 1173 | 1173 | |
| 1174 | 1174 | /* keep the read only activity bit */ |
| 1175 | 1175 | galileo.reg[offset] &= ~0x4000; |
| r2454 | r2455 | |
| 1240 | 1240 | |
| 1241 | 1241 | case GREG_INT_STATE: |
| 1242 | 1242 | if (LOG_GALILEO) |
| 1243 | logerror("%08X:Galileo write to IRQ clear = %08X & %08X\n", offset*4, data, | |
| 1243 | logerror("%08X:Galileo write to IRQ clear = %08X & %08X\n", offset*4, data, | |
| 1244 | 1244 | galileo.reg[offset] = oldata & data; |
| 1245 | 1245 | update_galileo_irqs(); |
| 1246 | 1246 | break; |
| r2454 | r2455 | |
| 1278 | 1278 | case GREG_CONFIG_ADDRESS: |
| 1279 | 1279 | case GREG_INT_MASK: |
| 1280 | 1280 | if (LOG_GALILEO) |
| 1281 | logerror("%08X:Galileo write to offset %03X = %08X & %08X\n", activecpu_get_pc(), offset*4, data, | |
| 1281 | logerror("%08X:Galileo write to offset %03X = %08X & %08X\n", activecpu_get_pc(), offset*4, data, | |
| 1282 | 1282 | break; |
| 1283 | 1283 | |
| 1284 | 1284 | default: |
| 1285 | logerror("%08X:Galileo write to offset %03X = %08X & %08X\n", activecpu_get_pc(), offset*4, data, | |
| 1285 | logerror("%08X:Galileo write to offset %03X = %08X & %08X\n", activecpu_get_pc(), offset*4, data, | |
| 1286 | 1286 | break; |
| 1287 | 1287 | } |
| 1288 | 1288 | } |
| r2454 | r2455 | |
| 1467 | 1467 | static READ32_HANDLER( ethernet_r ) |
| 1468 | 1468 | { |
| 1469 | 1469 | if (!(offset & 8)) |
| 1470 | return smc91c94_r(machine, offset & 7, mem_mask | |
| 1470 | return smc91c94_r(machine, offset & 7, mem_mask & 0xffff); | |
| 1471 | 1471 | else |
| 1472 | return smc91c94_r(machine, offset & 7, mem_mask | |
| 1472 | return smc91c94_r(machine, offset & 7, mem_mask & 0x | |
| 1473 | 1473 | } |
| 1474 | 1474 | |
| 1475 | 1475 | |
| 1476 | 1476 | static WRITE32_HANDLER( ethernet_w ) |
| 1477 | 1477 | { |
| 1478 | 1478 | if (!(offset & 8)) |
| 1479 | smc91c94_w(machine, offset & 7, data & 0xffff, mem_mask | 0x | |
| 1479 | smc91c94_w(machine, offset & 7, data & 0xffff, mem_mask | 0xffff); | |
| 1480 | 1480 | else |
| 1481 | smc91c94_w(machine, offset & 7, data & 0x00ff, mem_mask | 0x | |
| 1481 | smc91c94_w(machine, offset & 7, data & 0x00ff, mem_mask | 0x | |
| 1482 | 1482 | } |
| 1483 | 1483 | |
| 1484 | 1484 | |
| r2454 | r2455 | |
| 1535 | 1535 | } |
| 1536 | 1536 | |
| 1537 | 1537 | if (LOG_WIDGET) |
| 1538 | logerror("Widget read (%02X) = %08X & %08X\n", offset*4, result, | |
| 1538 | logerror("Widget read (%02X) = %08X & %08X\n", offset*4, result, | |
| 1539 | 1539 | return result; |
| 1540 | 1540 | } |
| 1541 | 1541 | |
| r2454 | r2455 | |
| 1543 | 1543 | static WRITE32_HANDLER( widget_w ) |
| 1544 | 1544 | { |
| 1545 | 1545 | if (LOG_WIDGET) |
| 1546 | logerror("Widget write (%02X) = %08X & %08X\n", offset*4, data, | |
| 1546 | logerror("Widget write (%02X) = %08X & %08X\n", offset*4, data, | |
| 1547 | 1547 | |
| 1548 | 1548 | switch (offset) |
| 1549 | 1549 | { |
| r2454 | r2455 | |
|---|---|---|
| 64 | 64 | |
| 65 | 65 | static WRITE8_HANDLER( sound_nmi_ack_w ) |
| 66 | 66 | { |
| 67 | cpunum_set_input_line( | |
| 67 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, CLEAR_LINE); | |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 ) |
| r2454 | r2455 | |
|---|---|---|
| 94 | 94 | static READ8_HANDLER( funkybee_input_port_0_r ) |
| 95 | 95 | { |
| 96 | 96 | watchdog_reset_r(machine,0); |
| 97 | return input_port_ | |
| 97 | return input_port_ | |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | static WRITE8_HANDLER( funkybee_coin_counter_w ) |
| r2454 | r2455 | |
| 298 | 298 | |
| 299 | 299 | static const struct AY8910interface ay8910_interface = |
| 300 | 300 | { |
| 301 | input_port_3_r | |
| 301 | AY8910_LEGACY_OUTPUT, | |
| 302 | AY8910_DEFAULT_LOADS, | |
| 303 | input_port_3_r, | |
| 304 | NULL, | |
| 305 | NULL, | |
| 306 | NULL | |
| 302 | 307 | }; |
| 303 | 308 | |
| 304 | 309 |
| r2454 | r2455 | |
|---|---|---|
| 7 | 7 | **************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "deprecat.h" | |
| 11 | 10 | #include "cpu/tms34010/tms34010.h" |
| 12 | 11 | #include "video/tlc34076.h" |
| 13 | 12 | #include "btoads.h" |
| r2454 | r2455 | |
| 150 | 149 | sndti_reset(SOUND_BSMT2000, 0); |
| 151 | 150 | |
| 152 | 151 | /* also clears interrupts */ |
| 153 | cpunum_set_input_line( | |
| 152 | cpunum_set_input_line(machine, 1, 0, CLEAR_LINE); | |
| 154 | 153 | sound_int_state = data; |
| 155 | 154 | } |
| 156 | 155 | |
| r2454 | r2455 | |
| 172 | 171 | { |
| 173 | 172 | UINT16 reg = offset >> 8; |
| 174 | 173 | UINT16 val = ((offset & 0xff) << 8) | data; |
| 175 | BSMT2000_data_0_w(machine, reg, val, 0); | |
| 174 | BSMT2000_data_0_w(machine, reg, val, 0xffff); | |
| 176 | 175 | } |
| 177 | 176 | |
| 178 | 177 |
| r2454 | r2455 | |
|---|---|---|
| 1572 | 1572 | 3.3 / |
| 1573 | 1573 | (actual label is "Cawaii 1 Ver1.1" & "Cawaii 3 Ver1.1") |
| 1574 | 1574 | |
| 1575 | MR97006-01.2 (42pin mask ROM, read as | |
| 1575 | MR97006-01.2 (42pin mask ROM, read as 16M, byte mode) | |
| 1576 | 1576 | MR97006-02.5 (same as above) |
| 1577 | 1577 | MR97001-01.6 (same as above) |
| 1578 | 1578 | MR96017-04.9 (same as above, samples) |
| 1579 | 1579 | |
| 1580 | MR97006-04.8 (32pin mask ROM, read as | |
| 1580 | MR97006-04.8 (32pin mask ROM, read as 8M | |
| 1581 | 1581 | |
| 1582 | 1582 | |
| 1583 | 1583 | dumped by sayu |
| r2454 | r2455 | |
|---|---|---|
| 239 | 239 | |
| 240 | 240 | static const struct YM2203interface ym2203_interface = |
| 241 | 241 | { |
| 242 | 0,0,0,0,irqhandler | |
| 242 | { | |
| 243 | AY8910_LEGACY_OUTPUT, | |
| 244 | AY8910_DEFAULT_LOADS, | |
| 245 | NULL, NULL, NULL, NULL, | |
| 246 | }, | |
| 247 | irqhandler | |
| 243 | 248 | }; |
| 244 | 249 | |
| 245 | 250 | static INTERRUPT_GEN( lastduel_interrupt ) |
| r2454 | r2455 | |
|---|---|---|
| 1951 | 1951 | |
| 1952 | 1952 | static const struct AY8910interface ay8910_interface = |
| 1953 | 1953 | { |
| 1954 | AY8910_LEGACY_OUTPUT, | |
| 1955 | AY8910_DEFAULT_LOADS, | |
| 1954 | 1956 | soundlatch_r |
| 1955 | 1957 | }; |
| 1956 | 1958 | |
| 1957 | 1959 | static const struct YM2203interface ym2203_interface = |
| 1958 | 1960 | { |
| 1959 | soundlatch_r | |
| 1961 | { | |
| 1962 | AY8910_LEGACY_OUTPUT, | |
| 1963 | AY8910_DEFAULT_LOADS, | |
| 1964 | soundlatch_r | |
| 1965 | } | |
| 1960 | 1966 | }; |
| 1961 | 1967 | |
| 1962 | 1968 | static void YM3812_irq(int param) |
| r2454 | r2455 | |
|---|---|---|
| 346 | 346 | |
| 347 | 347 | static const struct AY8910interface ay8910_interface = |
| 348 | 348 | { |
| 349 | input_port_7_r, // DSW3 | |
| 350 | input_port_8_r, // DSW4 | |
| 351 | 0, | |
| 352 | 0 | |
| 349 | AY8910_LEGACY_OUTPUT, | |
| 350 | AY8910_DEFAULT_LOADS, | |
| 351 | input_port_7_r, // DSW3 | |
| 352 | input_port_8_r, // DSW4 | |
| 353 | NULL, | |
| 354 | NULL | |
| 353 | 355 | }; |
| 354 | 356 | |
| 355 | 357 | static MACHINE_DRIVER_START( lucky8 ) |
| r2454 | r2455 | |
|---|---|---|
| 9 | 9 | ***************************************************************************/ |
| 10 | 10 | |
| 11 | 11 | #include "driver.h" |
| 12 | #include "deprecat.h" | |
| 13 | 12 | |
| 14 | 13 | extern UINT8* boxer_tile_ram; |
| 15 | 14 | extern UINT8* boxer_sprite_ram; |
| r2454 | r2455 | |
| 147 | 146 | |
| 148 | 147 | pot_latch = data & 0x3f; |
| 149 | 148 | |
| 150 | cpunum_set_input_line( | |
| 149 | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, CLEAR_LINE); | |
| 151 | 150 | } |
| 152 | 151 | |
| 153 | 152 | |
| 154 | 153 | static WRITE8_HANDLER( boxer_irq_reset_w ) |
| 155 | 154 | { |
| 156 | cpunum_set_input_line( | |
| 155 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 157 | 156 | } |
| 158 | 157 | |
| 159 | 158 |
| r2454 | r2455 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | -= Touch Master / Galaxy Games =- |
| 4 | 4 | |
| 5 | | |
| 5 | | |
| 6 | 6 | |
| 7 | 7 | |
| 8 | 8 | CPU: 68000 |
| r2454 | r2455 | |
| 11 | 11 | |
| 12 | 12 | [Touch Master] |
| 13 | 13 | |
| 14 | Input: | |
| 14 | Input: M | |
| 15 | 15 | Other: Dallas NVRAM + optional RTC |
| 16 | 16 | To Do: |
| 17 | 17 | |
| 18 | - Proper touchscreen controller emulation. Currently it's flakey and | |
| 19 | tends to stop registering user input (try coining up in that case) | |
| 20 | - Protection in tm4k and later games | |
| 18 | - Protection in tm4k and later games (where is DS1204 mapped?) | |
| 21 | 19 | - Coin optics |
| 22 | - RTC emulation (there's code to check the upper bytes of NVRAM to see if | |
| 23 | the real time clock is present, and to only use it in that case) | |
| 20 | - Is sound banking correct? | |
| 24 | 21 | |
| 25 | 22 | To be dumped and added: |
| 26 | 23 | |
| r2454 | r2455 | |
| 30 | 27 | Touch Master 8000 *(?) |
| 31 | 28 | |
| 32 | 29 | * There is a reported "Minnesota" version with modifications due to legal issues |
| 33 | Touch Master | |
| 30 | Touch Master (current set) is | |
| 34 | 31 | Is there a Touch Master 6000? TM5K is version 7.10, then TM7K is version 8, TM8K is version 9.04 |
| 35 | 32 | Starting with Touch Master 2000, each later version is a chipswap for the mainboard. |
| 36 | 33 | IE: Touch Master 8000 chips can update any Touch Master mainboard 2000 through 7000 |
| 34 | Each version (IE: 2000, 3000, 7000 ect) has different girls for Strip Poker ;-) | |
| 37 | 35 | |
| 38 | 36 | Touch Master 8000 part lists: |
| 39 | 37 | |
| r2454 | r2455 | |
| 48 | 46 | A-5343-60194-9 U41 Graphics |
| 49 | 47 | A-21657-007 Security Key |
| 50 | 48 | |
| 49 | Known Versions not dumped: | |
| 50 | Touch Master 7000 V8.04 | |
| 51 | Touch Master 8000 V9.04 (from service bulletin) | |
| 52 | ||
| 51 | 53 | ****************************************************************** |
| 52 | 54 | |
| 53 | 55 | [Galaxy Games] |
| r2454 | r2455 | |
| 64 | 66 | #include "deprecat.h" |
| 65 | 67 | #include "sound/okim6295.h" |
| 66 | 68 | #include "machine/eeprom.h" |
| 69 | #include "machine/microtch.h" | |
| 70 | #include "machine/68681.h" | |
| 67 | 71 | |
| 68 | 72 | /*************************************************************************** |
| 69 | 73 | |
| r2454 | r2455 | |
| 89 | 93 | |
| 90 | 94 | /*************************************************************************** |
| 91 | 95 | |
| 92 | | |
| 96 | 68681 DUART <-> Microtouch t | |
| 93 | 97 | |
| 94 | 98 | ***************************************************************************/ |
| 95 | 99 | |
| 96 | static int touchscreen; | |
| 97 | ||
| 98 | static void show_touchscreen(running_machine *machine) | |
| 100 | static void duart_irq_handler(UINT8 vector) | |
| 99 | 101 | { |
| 100 | #ifdef MAME_DEBUG | |
| 101 | popmessage("% d] %03x %03x - %d",touchscreen,input_port_read(machine, "TSCREEN_X")&0x1ff,input_port_read(machine, "TSCREEN_Y"),okibank); | |
| 102 | #endif | |
| 103 | } | |
| 102 | cpunum_set_input_line_and_vector(Machine, 0, 4, HOLD_LINE, vector); | |
| 103 | }; | |
| 104 | 104 | |
| 105 | static | |
| 105 | static void | |
| 106 | 106 | { |
| 107 | if ( | |
| 107 | if ( | |
| 108 | 108 | { |
| 109 | touchscreen = 0; | |
| 110 | show_touchscreen(machine); | |
| 109 | //logerror( "duart->microtouch: %02x %c\n", data, (char)data); | |
| 110 | microtouch_rx(1, &data); | |
| 111 | 111 | } |
| 112 | } | |
| 112 | }; | |
| 113 | 113 | |
| 114 | static | |
| 114 | static void | |
| 115 | 115 | { |
| 116 | if (touchscreen != -1) | |
| 117 | touchscreen++; | |
| 118 | if (touchscreen == 6) | |
| 119 | touchscreen = -1; | |
| 120 | show_touchscreen(machine); | |
| 121 | ||
| 122 | return 0; | |
| 116 | //logerror( "microtouch->duart: %02x %c\n", data, (char)data); | |
| 117 | duart_68681_rx_data(0, data); | |
| 123 | 118 | } |
| 124 | 119 | |
| 125 | static READ16_HANDLER( tmaster_tscreen_x_hi_r ) | |
| 120 | ||
| 121 | /*************************************************************************** | |
| 122 | ||
| 123 | DS1644 RTC | |
| 124 | ||
| 125 | ***************************************************************************/ | |
| 126 | ||
| 127 | static UINT8 rtc_ram[8]; | |
| 128 | ||
| 129 | static UINT8 binary_to_BCD(UINT8 data) | |
| 126 | 130 | { |
| 127 | switch (touchscreen) | |
| 128 | { | |
| 129 | case -1: return 0xf1; | |
| 130 | } | |
| 131 | return 0x01; | |
| 131 | data %= 100; | |
| 132 | ||
| 133 | return ((data / 10) << 4) | (data %10); | |
| 132 | 134 | } |
| 133 | 135 | |
| 134 | static READ16_HANDLER( | |
| 136 | static READ16_HANDLER( | |
| 135 | 137 | { |
| 136 | | |
| 138 | m | |
| 137 | 139 | |
| 138 | int press1 = input_port_read(machine, "TSCREEN_X") & 0x4000; | |
| 139 | int press2 = input_port_read(machine, "TSCREEN_X") & 0x8000; | |
| 140 | if (press1) press2 = 1; | |
| 140 | mame_get_current_datetime(Machine, &systime); | |
| 141 | rtc_ram[0x1] = binary_to_BCD(systime.local_time.second); | |
| 142 | rtc_ram[0x2] = binary_to_BCD(systime.local_time.minute); | |
| 143 | rtc_ram[0x3] = binary_to_BCD(systime.local_time.hour); | |
| 144 | rtc_ram[0x4] = binary_to_BCD(systime.local_time.weekday+1); | |
| 145 | rtc_ram[0x5] = binary_to_BCD(systime.local_time.mday); | |
| 146 | rtc_ram[0x6] = binary_to_BCD(systime.local_time.month+1); | |
| 147 | rtc_ram[0x7] = binary_to_BCD(systime.local_time.year % 100); | |
| 141 | 148 | |
| 142 | switch (touchscreen) | |
| 143 | { | |
| 144 | case 1: val = press1 ? 0 : 1<<6; break; // press | |
| 145 | case 2: val = input_port_read(machine, "TSCREEN_X") & 0x003; break; | |
| 146 | case 3: val = (input_port_read(machine, "TSCREEN_X") >> 2) & 0x7f; break; | |
| 147 | case 4: val = 0; break; | |
| 148 | case 5: val = ((input_port_read(machine, "TSCREEN_Y")^0xff) >> 1) & 0x7f; break; | |
| 149 | return rtc_ram[offset]; | |
| 150 | } | |
| 149 | 151 | |
| 150 | default: | |
| 151 | return 0; | |
| 152 | static WRITE16_HANDLER(rtc_w) | |
| 153 | { | |
| 154 | if ( offset == 0 ) | |
| 155 | { | |
| 156 | rtc_ram[0x0] = data & 0xff; | |
| 152 | 157 | } |
| 153 | return val | (press2 ? 0x80 : 0); // away : hover | |
| 154 | 158 | } |
| 155 | 159 | |
| 156 | static READ16_HANDLER( tmaster_tscreen_y_hi_r ) { return 0x01; } | |
| 157 | static READ16_HANDLER( tmaster_tscreen_y_lo_r ) { return 0x00; } | |
| 158 | 160 | |
| 159 | ||
| 160 | ||
| 161 | 161 | /*************************************************************************** |
| 162 | 162 | |
| 163 | 163 | Video & Blitter |
| r2454 | r2455 | |
| 362 | 362 | { |
| 363 | 363 | case 0x0e: |
| 364 | 364 | tmaster_draw(); |
| 365 | cpunum_set_input_line( | |
| 365 | cpunum_set_input_line(machine, 0, 2, HOLD_LINE); | |
| 366 | 366 | break; |
| 367 | 367 | } |
| 368 | 368 | } |
| r2454 | r2455 | |
| 390 | 390 | static ADDRESS_MAP_START( tmaster_map, ADDRESS_SPACE_PROGRAM, 16 ) |
| 391 | 391 | AM_RANGE( 0x000000, 0x1fffff ) AM_ROM |
| 392 | 392 | AM_RANGE( 0x200000, 0x27ffff ) AM_RAM |
| 393 | AM_RANGE( 0x280000, 0x28ffff ) AM_RAM AM_BASE(&generic_nvram16) AM_SIZE(&generic_nvram_size) | |
| 393 | AM_RANGE( 0x280000, 0x28ffef ) AM_RAM AM_BASE(&generic_nvram16) AM_SIZE(&generic_nvram_size) | |
| 394 | AM_RANGE( 0x28fff0, 0x28ffff ) AM_READWRITE( rtc_r, rtc_w ) | |
| 394 | 395 | |
| 395 | 396 | AM_RANGE( 0x300010, 0x300011 ) AM_READ( tmaster_coins_r ) |
| 396 | 397 | |
| 397 | AM_RANGE( 0x300022, 0x300023 ) AM_READ ( tmaster_tscreen_x_hi_r ) | |
| 398 | AM_RANGE( 0x300024, 0x300025 ) AM_WRITE( tmaster_tscreen_reset_w ) | |
| 399 | AM_RANGE( 0x300026, 0x300027 ) AM_READ ( tmaster_tscreen_x_lo_r ) | |
| 400 | AM_RANGE( 0x300028, 0x300029 ) AM_READ ( tmaster_tscreen_next_r ) | |
| 401 | AM_RANGE( 0x300032, 0x300033 ) AM_READ ( tmaster_tscreen_y_hi_r ) | |
| 402 | AM_RANGE( 0x300036, 0x300037 ) AM_READ ( tmaster_tscreen_y_lo_r ) | |
| 398 | AM_RANGE( 0x300020, 0x30003f ) AM_READWRITE( duart_68681_r, duart_68681_w ) | |
| 403 | 399 | |
| 404 | 400 | AM_RANGE( 0x300040, 0x300041 ) AM_WRITE( tmaster_oki_bank_w ) |
| 405 | 401 | |
| r2454 | r2455 | |
| 488 | 484 | palette_data[palette_index] = data & 0xff; |
| 489 | 485 | if (++palette_index == 3) |
| 490 | 486 | { |
| 491 | palette_set_color( | |
| 487 | palette_set_color(machine, palette_offset, MAKE_RGB(palette_data[0], palette_data[1], palette_data[2])); | |
| 492 | 488 | palette_index = 0; |
| 493 | 489 | palette_offset++; |
| 494 | 490 | } |
| r2454 | r2455 | |
| 603 | 599 | Input Ports |
| 604 | 600 | |
| 605 | 601 | ***************************************************************************/ |
| 602 | static INPUT_PORTS_START( tm ) | |
| 603 | PORT_INCLUDE(microtouch) | |
| 606 | 604 | |
| 605 | PORT_START_TAG("COIN") // IN3 | |
| 606 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) // m. coin 1 (coin optics?) | |
| 607 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) // m. coin 2 (coin optics?) | |
| 608 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) // dbv input (coin optics?) | |
| 609 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 610 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_COIN1 ) // (service coin?) | |
| 611 | PORT_SERVICE_NO_TOGGLE( 0x0020, IP_ACTIVE_LOW ) | |
| 612 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 ) // calibrate | |
| 613 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 614 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 615 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 616 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 617 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_SPECIAL ) | |
| 618 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) // e. coin 1 | |
| 619 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // e. coin 2 | |
| 620 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // e. coin 3 | |
| 621 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // e. coin 4 | |
| 622 | INPUT_PORTS_END | |
| 623 | ||
| 607 | 624 | static INPUT_PORTS_START( tmaster ) |
| 608 | PORT_START_TAG("TSCREEN_X") | |
| 609 | PORT_BIT( 0x01ff, 0x100, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1, 0, 0) PORT_SENSITIVITY(35) PORT_KEYDELTA(3) PORT_PLAYER(1) | |
| 610 | PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_IMPULSE(5) // press | |
| 611 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_BUTTON2 ) // hover | |
| 625 | PORT_INCLUDE(microtouch) | |
| 612 | 626 | |
| 613 | PORT_START_TAG("TSCREEN_Y") | |
| 614 | PORT_BIT( 0x0ff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1, 0, 0) PORT_SENSITIVITY(35) PORT_KEYDELTA(3) PORT_PLAYER(1) | |
| 615 | ||
| 616 | 627 | PORT_START_TAG("COIN") // IN3 |
| 617 | 628 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) // m. coin 1 (coin optics?) |
| 618 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(4) // m. coin 2 (coin optics?) | |
| 619 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(6) // dbv input (coin optics?) | |
| 629 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) // m. coin 2 (coin optics?) | |
| 630 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) // dbv input (coin optics?) | |
| 620 | 631 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 621 | 632 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_COIN1 ) // (service coin?) |
| 622 | 633 | PORT_SERVICE_NO_TOGGLE( 0x0020, IP_ACTIVE_LOW ) |
| r2454 | r2455 | |
| 626 | 637 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 627 | 638 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 628 | 639 | PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_SPECIAL ) |
| 629 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_COIN1 ) // e. coin 1 | |
| 630 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_COIN2 ) // e. coin 2 | |
| 631 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_COIN3 ) // e. coin 3 | |
| 632 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN4 ) // e. coin 4 | |
| 640 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // e. coin 1 | |
| 641 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // e. coin 2 | |
| 642 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // e. coin 3 | |
| 643 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // e. coin 4 | |
| 633 | 644 | INPUT_PORTS_END |
| 634 | 645 | |
| 635 | 646 | static INPUT_PORTS_START( galgames ) |
| r2454 | r2455 | |
| 684 | 695 | |
| 685 | 696 | ***************************************************************************/ |
| 686 | 697 | |
| 687 | static MACHINE_ | |
| 698 | static MACHINE_ | |
| 688 | 699 | { |
| 689 | touchscreen = -1; | |
| 700 | duart_68681_init(0, duart_irq_handler, duart_tx); | |
| 701 | microtouch_init(microtouch_tx, 0); | |
| 690 | 702 | } |
| 691 | 703 | |
| 692 | 704 | static INTERRUPT_GEN( tm3k_interrupt ) |
| r2454 | r2455 | |
| 695 | 707 | { |
| 696 | 708 | case 0: cpunum_set_input_line(machine, 0, 2, HOLD_LINE); break; |
| 697 | 709 | case 1: cpunum_set_input_line(machine, 0, 3, HOLD_LINE); break; |
| 698 | ||
| 699 | case 2: | |
| 700 | case 3: | |
| 701 | case 4: | |
| 702 | case 5: | |
| 703 | case 6: cpunum_set_input_line_and_vector(machine, 0, 4, HOLD_LINE, 0x100/4); break; // touch screen controller | |
| 704 | ||
| 705 | 710 | default: cpunum_set_input_line(machine, 0, 1, HOLD_LINE); break; |
| 706 | 711 | } |
| 707 | 712 | } |
| r2454 | r2455 | |
| 709 | 714 | static MACHINE_DRIVER_START( tm3k ) |
| 710 | 715 | MDRV_CPU_ADD_TAG("main", M68000, 12000000) |
| 711 | 716 | MDRV_CPU_PROGRAM_MAP(tmaster_map,0) |
| 712 | MDRV_CPU_VBLANK_INT_HACK(tm3k_interrupt,2+ | |
| 717 | MDRV_CPU_VBLANK_INT_HACK(tm3k_interrupt,2+ | |
| 713 | 718 | |
| 714 | MDRV_MACHINE_ | |
| 719 | MDRV_MACHINE_ | |
| 715 | 720 | MDRV_NVRAM_HANDLER(generic_0fill) |
| 716 | 721 | |
| 717 | 722 | |
| r2454 | r2455 | |
| 735 | 740 | MACHINE_DRIVER_END |
| 736 | 741 | |
| 737 | 742 | |
| 738 | static INTERRUPT_GEN( tm_interrupt ) | |
| 739 | { | |
| 740 | switch (cpu_getiloops()) | |
| 741 | { | |
| 742 | case 0: cpunum_set_input_line(machine, 0, 2, HOLD_LINE); break; | |
| 743 | case 1: cpunum_set_input_line(machine, 0, 3, HOLD_LINE); break; | |
| 744 | case 2: cpunum_set_input_line_and_vector(machine, 0, 4, HOLD_LINE, 0x100/4); break; // touch screen controller | |
| 745 | default: cpunum_set_input_line(machine, 0, 1, HOLD_LINE); break; | |
| 746 | } | |
| 747 | } | |
| 748 | ||
| 749 | 743 | static MACHINE_DRIVER_START( tm ) |
| 750 | 744 | MDRV_IMPORT_FROM(tm3k) |
| 751 | MDRV_CPU_MODIFY("main") | |
| 752 | MDRV_CPU_VBLANK_INT_HACK(tm_interrupt,3+20) // ?? | |
| 753 | 745 | |
| 754 | 746 | MDRV_SOUND_REPLACE("OKI",OKIM6295, 1122000) |
| 755 | 747 | MDRV_SOUND_CONFIG(okim6295_interface_region_1_pin7high) // clock frequency & pin 7 not verified |
| r2454 | r2455 | |
| 831 | 823 | |
| 832 | 824 | ROM_START( tm ) |
| 833 | 825 | ROM_REGION( 0x200000, REGION_CPU1, 0 ) // 68000 Code |
| 834 | ROM_LOAD16_BYTE( "tmaster.u51", 0x000000, 0x080000, CRC(edaa5874) SHA1(48b99bc7f5a6453def265967ca7d8eefdf9dc97b) ) | |
| 835 | ROM_LOAD16_BYTE( "tmaster.u52", 0x000001, 0x080000, CRC(e9fd30fc) SHA1(d91ea05d5f574603883336729fb9df705688945d) ) | |
| 826 | ROM_LOAD16_BYTE( "tmaster.u51", 0x000000, 0x080000, CRC(edaa5874) SHA1(48b99bc7f5a6453def265967ca7d8eefdf9dc97b) ) /* Ver: 3.00 Euro 11-25-96 */ | |
| 827 | ROM_LOAD16_BYTE( "tmaster.u52", 0x000001, 0x080000, CRC(e9fd30fc) SHA1(d91ea05d5f574603883336729fb9df705688945d) ) /* Ver: 3.00 Euro 11-25-96 */ | |
| 836 | 828 | |
| 837 | 829 | ROM_REGION( 0x400000, REGION_GFX1, ROMREGION_ERASE ) // Blitter gfx |
| 838 | 830 | ROM_LOAD16_BYTE( "tmaster.u38", 0x100000, 0x080000, CRC(68885ef6) SHA1(010602b59c33c3e490491a296ddaf8952e315b83) ) |
| r2454 | r2455 | |
| 868 | 860 | TM3K_u40.bin 5.0 Video Images & Graphics ccb4 |
| 869 | 861 | TM3K_u41.bin 5.0 Video Images & Graphics 54a7 |
| 870 | 862 | u62 (NOT INCLUDED) N/A Battery Memory Module N/A |
| 871 | J12 DALLAS DS1204V N/A Security Key (required for this Version) - Labeled A-21657-002 | |
| 863 | J12 DALLAS DS1204V N/A Security Key (required for this Version???) - Labeled A-21657-002 | |
| 872 | 864 | ----------------------------------------------------------------------------------- |
| 873 | 865 | |
| 874 | 866 | SCN68681c1n40 |
| r2454 | r2455 | |
| 1084 | 1076 | // RAM, filled by the 68000 and fed to the OKI |
| 1085 | 1077 | ROM_END |
| 1086 | 1078 | |
| 1087 | static DRIVER_INIT( tm3k ) | |
| 1088 | { | |
| 1089 | // try this if you need to calibrate | |
| 1090 | #if 0 | |
| 1091 | UINT16 *ROM = (UINT16 *)memory_region( REGION_CPU1 ); | |
| 1092 | // tscreen test | |
| 1093 | ROM[0x75e3c/2] = 0x4ef9; | |
| 1094 | ROM[0x75e3e/2] = 0x0007; | |
| 1095 | ROM[0x75e40/2] = 0x5e4a; | |
| 1096 | 1079 | |
| 1097 | // tscreen test | |
| 1098 | ROM[0x765ca/2] = 0x7001; | |
| 1099 | #endif | |
| 1100 | } | |
| 1101 | ||
| 1102 | 1080 | static DRIVER_INIT( tm4k ) |
| 1103 | 1081 | { |
| 1104 | 1082 | UINT16 *ROM = (UINT16 *)memory_region( REGION_CPU1 ); |
| r2454 | r2455 | |
| 1176 | 1154 | memory_configure_bank(4, 0, 1, memory_region(REGION_CPU1)+0x200000, 0x40000); |
| 1177 | 1155 | } |
| 1178 | 1156 | |
| 1179 | GAME( 1996, tm, 0, tm, tmaster, 0, ROT0, "Midway", "Touchmaster", GAME_NOT_WORKING ) | |
| 1180 | GAME( 1997, tm3k, 0, tm3k, tmaster, tm3k, ROT0, "Midway", "Touchmaster 3000 (v5.01)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS) // imp. graphics due to bad dump | |
| 1181 | GAME( 1998, tm4k, 0, tm3k, tmaster, tm4k, ROT0, "Midway", "Touchmaster 4000 (v6.02)", GAME_NOT_WORKING ) | |
| 1182 | GAME( 1998, tm5k, 0, tm3k, tmaster, tm5k, ROT0, "Midway", "Touchmaster 5000 (v7.10)", GAME_NOT_WORKING ) | |
| 1183 | GAME( 1999, tm7k, 0, tm3k, tmaster, tm7k, ROT0, "Midway", "Touchmaster 7000 (v8.00)", GAME_NOT_WORKING ) | |
| 1157 | GAME( 1996, tm, 0, tm, tm, 0, ROT0, "Midway", "Touchmaster (v3.00 Euro)", 0 ) | |
| 1158 | GAME( 1997, tm3k, 0, tm3k, tmaster, 0, ROT0, "Midway", "Touchmaster 3000 (v5.01 Standard)", GAME_IMPERFECT_GRAPHICS) // imp. graphics due to bad dump | |
| 1159 | GAME( 1998, tm4k, 0, tm3k, tmaster, tm4k, ROT0, "Midway", "Touchmaster 4000 (v6.02 Standard)", 0 ) | |
| 1160 | GAME( 1998, tm5k, 0, tm3k, tmaster, tm5k, ROT0, "Midway", "Touchmaster 5000 (v7.10 Standard)", 0 ) | |
| 1161 | GAME( 1999, tm7k, 0, tm3k, tmaster, tm7k, ROT0, "Midway", "Touchmaster 7000 (v8.00 Standard)", 0 ) | |
| 1184 | 1162 | GAME( 1998, galgbios, 0, galgames, galgames, galgames, ROT0, "Creative Electonics & Software", "Galaxy Games (BIOS v1.90)", GAME_IS_BIOS_ROOT ) |
| r2454 | r2455 | |
|---|---|---|
| 86 | 86 | GFXDECODE_ENTRY( REGION_GFX2, 0, charlayout2, 0, 16 ) /* wrong */ |
| 87 | 87 | GFXDECODE_END |
| 88 | 88 | |
| 89 | static const ppi8255_interface ppi8255_intf = | |
| 89 | static const ppi8255_interface ppi8255_intf[2] = | |
| 90 | 90 | { |
| 91 | 2, | |
| 92 | { NULL, NULL }, | |
| 93 | { NULL, NULL }, | |
| 94 | { NULL, NULL }, | |
| 95 | { NULL, NULL }, | |
| 96 | { NULL, NULL }, | |
| 97 | { NULL, NULL }, | |
| 91 | { | |
| 92 | NULL, | |
| 93 | NULL, | |
| 94 | NULL, | |
| 95 | NULL, | |
| 96 | NULL, | |
| 97 | NULL | |
| 98 | }, | |
| 99 | { | |
| 100 | NULL, | |
| 101 | NULL, | |
| 102 | NULL, | |
| 103 | NULL, | |
| 104 | NULL, | |
| 105 | NULL | |
| 106 | } | |
| 98 | 107 | }; |
| 99 | 108 | |
| 100 | static MACHINE_RESET( tcl ) | |
| 101 | { | |
| 102 | ppi8255_init(&ppi8255_intf); | |
| 103 | } | |
| 104 | 109 | |
| 105 | ||
| 106 | 110 | static MACHINE_DRIVER_START( tcl ) |
| 107 | 111 | |
| 108 | 112 | /* basic machine hardware */ |
| r2454 | r2455 | |
| 123 | 127 | MDRV_VIDEO_START(tcl) |
| 124 | 128 | MDRV_VIDEO_UPDATE(tcl) |
| 125 | 129 | |
| 126 | MDRV_MACHINE_RESET(tcl) | |
| 130 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 131 | MDRV_DEVICE_CONFIG( ppi8255_intf[0] ) | |
| 127 | 132 | |
| 133 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 134 | MDRV_DEVICE_CONFIG( ppi8255_intf[1] ) | |
| 135 | ||
| 128 | 136 | /* sound hardware */ |
| 129 | 137 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 130 | 138 |
| r2454 | r2455 | |
|---|---|---|
| 221 | 221 | AM_RANGE(0xd000, 0xdfff) AM_READ(SMH_RAM) |
| 222 | 222 | AM_RANGE(0xe000, 0xe7ff) AM_READ(SMH_RAM) // tilemap |
| 223 | 223 | AM_RANGE(0xe800, 0xe8ff) AM_READ(SMH_RAM) // sprites |
| 224 | AM_RANGE(0xec00, 0xec03) AM_READ(ppi8255_0_r) | |
| 225 | AM_RANGE(0xf000, 0xf003) AM_READ(ppi8255_1_r) | |
| 224 | AM_RANGE(0xec00, 0xec03) AM_DEVREAD(PPI8255, "ppi8255_0", ppi8255_r) | |
| 225 | AM_RANGE(0xf000, 0xf003) AM_DEVREAD(PPI8255, "ppi8255_1", ppi8255_r) | |
| 226 | 226 | AM_RANGE(0xf800, 0xf800) AM_READ(input_port_3_r) |
| 227 | 227 | AM_RANGE(0xf801, 0xf801) AM_READ(input_port_4_r) |
| 228 | 228 | AM_RANGE(0xf802, 0xf802) AM_READ(SMH_NOP) //MUST return bit 0 = 0, otherwise game resets |
| r2454 | r2455 | |
| 234 | 234 | AM_RANGE(0xd000, 0xdfff) AM_WRITE(SMH_RAM) |
| 235 | 235 | AM_RANGE(0xe000, 0xe7ff) AM_WRITE(freek_videoram_w) AM_BASE(&freek_videoram) |
| 236 | 236 | AM_RANGE(0xe800, 0xe8ff) AM_WRITE(SMH_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size) |
| 237 | AM_RANGE(0xec00, 0xec03) AM_WRITE(ppi8255_0_w) | |
| 238 | AM_RANGE(0xf000, 0xf003) AM_WRITE(ppi8255_1_w) | |
| 237 | AM_RANGE(0xec00, 0xec03) AM_DEVWRITE(PPI8255, "ppi8255_0", ppi8255_w) | |
| 238 | AM_RANGE(0xf000, 0xf003) AM_DEVWRITE(PPI8255, "ppi8255_1", ppi8255_w) | |
| 239 | 239 | AM_RANGE(0xf800, 0xf801) AM_WRITE(flipscreen_w) |
| 240 | 240 | AM_RANGE(0xf802, 0xf803) AM_WRITE(coin_w) |
| 241 | 241 | AM_RANGE(0xf804, 0xf804) AM_WRITE(nmi_enable_w) |
| r2454 | r2455 | |
| 597 | 597 | return memory_region(REGION_USER1)[romaddr & 0x7fff]; |
| 598 | 598 | } |
| 599 | 599 | |
| 600 | static const ppi8255_interface ppi8255_intf = | |
| 600 | static const ppi8255_interface ppi8255_intf[2] = | |
| 601 | 601 | { |
| 602 | 2, /* 1 chips */ | |
| 603 | { NULL, input_port_0_r }, /* Port A read */ | |
| 604 | { NULL, input_port_1_r }, /* Port B read */ | |
| 605 | { snd_rom_r, input_port_2_r }, /* Port C read */ | |
| 606 | { snd_rom_addr_l_w, NULL }, /* Port A write */ | |
| 607 | { snd_rom_addr_h_w, NULL }, /* Port B write */ | |
| 608 | { NULL, NULL }, /* Port C write */ | |
| 602 | { | |
| 603 | NULL, /* Port A read */ | |
| 604 | NULL, /* Port B read */ | |
| 605 | snd_rom_r, /* Port C read */ | |
| 606 | snd_rom_addr_l_w, /* Port A write */ | |
| 607 | snd_rom_addr_h_w, /* Port B write */ | |
| 608 | NULL /* Port C write */ | |
| 609 | }, | |
| 610 | { | |
| 611 | input_port_0_r, /* Port A read */ | |
| 612 | input_port_1_r, /* Port B read */ | |
| 613 | input_port_2_r, /* Port C read */ | |
| 614 | NULL, /* Port A write */ | |
| 615 | NULL, /* Port B write */ | |
| 616 | NULL /* Port C write */ | |
| 617 | } | |
| 609 | 618 | }; |
| 610 | 619 | |
| 611 | static MACHINE_RESET( freekckb ) | |
| 612 | { | |
| 613 | ppi8255_init(&ppi8255_intf); | |
| 614 | } | |
| 615 | 620 | |
| 616 | 621 | |
| 617 | ||
| 618 | 622 | /************************************* |
| 619 | 623 | * |
| 620 | 624 | * Graphics definitions |
| r2454 | r2455 | |
| 709 | 713 | MDRV_CPU_PROGRAM_MAP(freekckb_readmem,freekckb_writemem) |
| 710 | 714 | MDRV_CPU_IO_MAP(freekckb_readport,freekckb_writeport) |
| 711 | 715 | |
| 712 | MDRV_MACHINE_RESET(freekckb) | |
| 716 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 717 | MDRV_DEVICE_CONFIG( ppi8255_intf[0] ) | |
| 713 | 718 | |
| 719 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 720 | MDRV_DEVICE_CONFIG( ppi8255_intf[1] ) | |
| 721 | ||
| 714 | 722 | MDRV_VIDEO_UPDATE(freekick) |
| 715 | 723 | MACHINE_DRIVER_END |
| 716 | 724 |
| r2454 | r2455 | |
|---|---|---|
| 232 | 232 | int b = pal5bit(((word >> 3 ) & 0x1E ) | ((word >> 1) & 0x01)); |
| 233 | 233 | |
| 234 | 234 | // Scroll 0 |
| 235 | if ( (offset >= 0x0e00/2) && (offset <= 0x0fff/2) ) { palette_set_color( | |
| 235 | if ( (offset >= 0x0e00/2) && (offset <= 0x0fff/2) ) { palette_set_color(machine, 0x000 + offset - 0x0e00/2, MAKE_RGB(r,g,b) ); return;} | |
| 236 | 236 | // Scroll 1 |
| 237 | if ( (offset >= 0x1600/2) && (offset <= 0x17ff/2) ) { palette_set_color( | |
| 237 | if ( (offset >= 0x1600/2) && (offset <= 0x17ff/2) ) { palette_set_color(machine, 0x100 + offset - 0x1600/2, MAKE_RGB(r,g,b) ); return;} | |
| 238 | 238 | // Road 0 |
| 239 | if ( (offset >= 0x1800/2) && (offset <= 0x1fff/2) ) { palette_set_color( | |
| 239 | if ( (offset >= 0x1800/2) && (offset <= 0x1fff/2) ) { palette_set_color(machine, 0x200 + offset - 0x1800/2, MAKE_RGB(r,g,b) ); return;} | |
| 240 | 240 | // Road 1 |
| 241 | if ( (offset >= 0x2000/2) && (offset <= 0x27ff/2) ) { palette_set_color( | |
| 241 | if ( (offset >= 0x2000/2) && (offset <= 0x27ff/2) ) { palette_set_color(machine, 0x600 + offset - 0x2000/2, MAKE_RGB(r,g,b) ); return;} | |
| 242 | 242 | // Sprites |
| 243 | if ( (offset >= 0x2800/2) && (offset <= 0x2fff/2) ) { palette_set_color( | |
| 243 | if ( (offset >= 0x2800/2) && (offset <= 0x2fff/2) ) { palette_set_color(machine, 0xa00 + offset - 0x2800/2, MAKE_RGB(r,g,b) ); return;} | |
| 244 | 244 | // Scroll 2 |
| 245 | if ( (offset >= 0x3600/2) && (offset <= 0x37ff/2) ) { palette_set_color( | |
| 245 | if ( (offset >= 0x3600/2) && (offset <= 0x37ff/2) ) { palette_set_color(machine, 0xe00 + offset - 0x3600/2, MAKE_RGB(r,g,b) ); return;} | |
| 246 | 246 | } |
| 247 | 247 | |
| 248 | 248 | static ADDRESS_MAP_START( bigrun_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| r2454 | r2455 | |
| 304 | 304 | int b = pal5bit(((word >> 3 ) & 0x1E ) | ((word >> 1) & 0x01)); |
| 305 | 305 | |
| 306 | 306 | // Scroll 0 |
| 307 | if ( (offset >= 0x1c00/2) && (offset <= 0x1fff/2) ) { palette_set_color( | |
| 307 | if ( (offset >= 0x1c00/2) && (offset <= 0x1fff/2) ) { palette_set_color(machine, 0x000 + offset - 0x1c00/2, MAKE_RGB(r,g,b) ); return;} | |
| 308 | 308 | // Scroll 1 |
| 309 | if ( (offset >= 0x2c00/2) && (offset <= 0x2fff/2) ) { palette_set_color( | |
| 309 | if ( (offset >= 0x2c00/2) && (offset <= 0x2fff/2) ) { palette_set_color(machine, 0x200 + offset - 0x2c00/2, MAKE_RGB(r,g,b) ); return;} | |
| 310 | 310 | // Scroll 2 |
| 311 | if ( (offset >= 0x6c00/2) && (offset <= 0x6fff/2) ) { palette_set_color( | |
| 311 | if ( (offset >= 0x6c00/2) && (offset <= 0x6fff/2) ) { palette_set_color(machine, 0x400 + offset - 0x6c00/2, MAKE_RGB(r,g,b) ); return;} | |
| 312 | 312 | // Road 0 |
| 313 | if ( (offset >= 0x3800/2) && (offset <= 0x3fff/2) ) { palette_set_color( | |
| 313 | if ( (offset >= 0x3800/2) && (offset <= 0x3fff/2) ) { palette_set_color(machine, 0x600 + offset - 0x3800/2, MAKE_RGB(r,g,b) ); return;} | |
| 314 | 314 | // Road 1 |
| 315 | if ( (offset >= 0x4800/2) && (offset <= 0x4fff/2) ) { palette_set_color( | |
| 315 | if ( (offset >= 0x4800/2) && (offset <= 0x4fff/2) ) { palette_set_color(machine, 0xa00 + offset - 0x4800/2, MAKE_RGB(r,g,b) ); return;} | |
| 316 | 316 | // Sprites |
| 317 | if ( (offset >= 0x5000/2) && (offset <= 0x5fff/2) ) { palette_set_color( | |
| 317 | if ( (offset >= 0x5000/2) && (offset <= 0x5fff/2) ) { palette_set_color(machine, 0xe00 + offset - 0x5000/2, MAKE_RGB(r,g,b) ); return;} | |
| 318 | 318 | } |
| 319 | 319 | |
| 320 | 320 | static ADDRESS_MAP_START( cischeat_readmem, ADDRESS_SPACE_PROGRAM, 16 ) |
| r2454 | r2455 | |
| 372 | 372 | int b = pal5bit(((word >> 3 ) & 0x1E ) | ((word >> 1) & 0x01)); |
| 373 | 373 | |
| 374 | 374 | // Scroll 0 |
| 375 | if ( (offset >= 0x1e00/2) && (offset <= 0x1fff/2) ) { palette_set_color( | |
| 375 | if ( (offset >= 0x1e00/2) && (offset <= 0x1fff/2) ) { palette_set_color(machine, 0x000 + offset - 0x1e00/2, MAKE_RGB(r,g,b) ); return;} | |
| 376 | 376 | // Scroll 1 |
| 377 | if ( (offset >= 0x2e00/2) && (offset <= 0x2fff/2) ) { palette_set_color( | |
| 377 | if ( (offset >= 0x2e00/2) && (offset <= 0x2fff/2) ) { palette_set_color(machine, 0x100 + offset - 0x2e00/2, MAKE_RGB(r,g,b) ); return;} | |
| 378 | 378 | // Scroll 2 |
| 379 | if ( (offset >= 0x6e00/2) && (offset <= 0x6fff/2) ) { palette_set_color( | |
| 379 | if ( (offset >= 0x6e00/2) && (offset <= 0x6fff/2) ) { palette_set_color(machine, 0x200 + offset - 0x6e00/2, MAKE_RGB(r,g,b) ); return;} | |
| 380 | 380 | // Road 0 |
| 381 | if ( (offset >= 0x3800/2) && (offset <= 0x3fff/2) ) { palette_set_color( | |
| 381 | if ( (offset >= 0x3800/2) && (offset <= 0x3fff/2) ) { palette_set_color(machine, 0x300 + offset - 0x3800/2, MAKE_RGB(r,g,b) ); return;} | |
| 382 | 382 | // Road 1 |
| 383 | if ( (offset >= 0x4800/2) && (offset <= 0x4fff/2) ) { palette_set_color( | |
| 383 | if ( (offset >= 0x4800/2) && (offset <= 0x4fff/2) ) { palette_set_color(machine, 0x700 + offset - 0x4800/2, MAKE_RGB(r,g,b) ); return;} | |
| 384 | 384 | // Sprites |
| 385 | if ( (offset >= 0x5000/2) && (offset <= 0x5fff/2) ) { palette_set_color( | |
| 385 | if ( (offset >= 0x5000/2) && (offset <= 0x5fff/2) ) { palette_set_color(machine, 0xb00 + offset - 0x5000/2, MAKE_RGB(r,g,b) ); return;} | |
| 386 | 386 | } |
| 387 | 387 | |
| 388 | 388 | /* F1 GP Star tests: |
| r2454 | r2455 | |
| 485 | 485 | int b = pal5bit(((newword >> 3 ) & 0x1E ) | ((newword >> 1) & 0x01)); |
| 486 | 486 | |
| 487 | 487 | // Scroll 0 |
| 488 | if ( (offset >= 0x1e00/2) && (offset <= 0x1fff/2) ) { palette_set_color( | |
| 488 | if ( (offset >= 0x1e00/2) && (offset <= 0x1fff/2) ) { palette_set_color(machine, 0x000 + offset - 0x1e00/2, MAKE_RGB(r,g,b) ); return;} | |
| 489 | 489 | // Scroll 2 |
| 490 | if ( (offset >= 0x4e00/2) && (offset <= 0x4fff/2) ) { palette_set_color( | |
| 490 | if ( (offset >= 0x4e00/2) && (offset <= 0x4fff/2) ) { palette_set_color(machine, 0x100 + offset - 0x4e00/2, MAKE_RGB(r,g,b) ); return;} | |
| 491 | 491 | // Sprites |
| 492 | if ( (offset >= 0x3000/2) && (offset <= 0x3fff/2) ) { palette_set_color( | |
| 492 | if ( (offset >= 0x3000/2) && (offset <= 0x3fff/2) ) { palette_set_color(machine, 0x200 + offset - 0x3000/2, MAKE_RGB(r,g,b) ); return;} | |
| 493 | 493 | } |
| 494 | 494 | |
| 495 | 495 |
| r2454 | r2455 | |
|---|---|---|
| 1148 | 1148 | int i; |
| 1149 | 1149 | for( i=0; i<4; i++ ) |
| 1150 | 1150 | { |
| 1151 | if( (mask&0xff000000) | |
| 1151 | if( (mask&0xff000000)!=0 ) | |
| 1152 | 1152 | { |
| 1153 | 1153 | int offs = offset*4+i; |
| 1154 | 1154 | if(offs<4 || offs>=8) |
| r2454 | r2455 | |
| 1166 | 1166 | |
| 1167 | 1167 | if( mbSuperSystem22 ) |
| 1168 | 1168 | { |
| 1169 | if (offset == 0x14/4 && mem_mask == 0x | |
| 1169 | if (offset == 0x14/4 && mem_mask == 0x | |
| 1170 | 1170 | { /* SUBCPU enable for Super System 22 */ |
| 1171 | 1171 | if (data) |
| 1172 | 1172 | { |
| r2454 | r2455 | |
| 1180 | 1180 | } |
| 1181 | 1181 | else |
| 1182 | 1182 | { |
| 1183 | if (offset == 0x18/4 && mem_mask == 0x | |
| 1183 | if (offset == 0x18/4 && mem_mask == 0x | |
| 1184 | 1184 | { /* SUBCPU enable on System 22 (guessed, but too early crashes Rave Racer so it's a good test) */ |
| 1185 | 1185 | if (data == 0xff00) |
| 1186 | 1186 | { |
| r2454 | r2455 | |
|---|---|---|
| 21 | 21 | ***************************************************************************/ |
| 22 | 22 | |
| 23 | 23 | #include "driver.h" |
| 24 | #include "deprecat.h" | |
| 25 | 24 | |
| 26 | 25 | |
| 27 | 26 | extern WRITE8_HANDLER( redclash_videoram_w ); |
| r2454 | r2455 | |
| 53 | 52 | |
| 54 | 53 | static WRITE8_HANDLER( irqack_w ) |
| 55 | 54 | { |
| 56 | cpunum_set_input_line( | |
| 55 | cpunum_set_input_line(machine, 0,0,CLEAR_LINE); | |
| 57 | 56 | } |
| 58 | 57 | |
| 59 | 58 |
| r2454 | r2455 | |
|---|---|---|
| 52 | 52 | ****************************************************************************/ |
| 53 | 53 | |
| 54 | 54 | #include "driver.h" |
| 55 | #include "deprecat.h" | |
| 56 | 55 | #include "vicdual.h" |
| 57 | 56 | |
| 58 | 57 | |
| r2454 | r2455 | |
| 68 | 67 | #define COIN_PORT_TAG "COIN" |
| 69 | 68 | |
| 70 | 69 | static UINT32 coin_status; |
| 71 | static UINT32 last_coin_input; | |
| 72 | 70 | |
| 73 | 71 | |
| 74 | 72 | static TIMER_CALLBACK( clear_coin_status ) |
| r2454 | r2455 | |
| 85 | 83 | |
| 86 | 84 | static CUSTOM_INPUT( vicdual_read_coin_status ) |
| 87 | 85 | { |
| 88 | UINT32 coin_input = input_port_read(machine, COIN_PORT_TAG); | |
| 86 | return coin_status; | |
| 87 | } | |
| 89 | 88 | |
| 90 | if (coin_input && !last_coin_input) | |
| 89 | ||
| 90 | static INPUT_CHANGED( coin_changed ) | |
| 91 | { | |
| 92 | if (newval && !oldval) | |
| 91 | 93 | { |
| 92 | 94 | /* increment the coin counter */ |
| 93 | 95 | coin_counter_w(0, 1); |
| r2454 | r2455 | |
| 98 | 100 | /* simulate the coin switch being closed for a while */ |
| 99 | 101 | timer_set(double_to_attotime(4 * attotime_to_double(video_screen_get_frame_period(machine->primary_screen))), NULL, 0, clear_coin_status); |
| 100 | 102 | } |
| 101 | ||
| 102 | last_coin_input = coin_input; | |
| 103 | ||
| 104 | return coin_status; | |
| 105 | 103 | } |
| 106 | 104 | |
| 107 | 105 | |
| 108 | 106 | #define PORT_COIN \ |
| 109 | 107 | PORT_START_TAG(COIN_PORT_TAG) \ |
| 110 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) | |
| 108 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED(coin_changed, NULL) \ | |
| 111 | 109 | PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 112 | 110 | |
| 113 | 111 | |
| r2454 | r2455 | |
| 270 | 268 | { |
| 271 | 269 | UINT8 ret = 0; |
| 272 | 270 | |
| 273 | if (offset & 0x01) ret = input_port_0_r(machine, 0); | |
| 274 | if (offset & 0x08) ret = input_port_1_r(machine, 0); | |
| 271 | if (offset & 0x01) ret = input_port_read_indexed(machine, 0); | |
| 272 | if (offset & 0x08) ret = input_port_read_indexed(machine, 1); | |
| 275 | 273 | |
| 276 | 274 | return ret; |
| 277 | 275 | } |
| r2454 | r2455 | |
| 555 | 553 | { |
| 556 | 554 | UINT8 ret = 0; |
| 557 | 555 | |
| 558 | if (offset & 0x01) ret = input_port_0_r(machine, 0); | |
| 559 | if (offset & 0x04) ret = input_port_1_r(machine, 0); | |
| 560 | if (offset & 0x08) ret = input_port_2_r(machine, 0); | |
| 556 | if (offset & 0x01) ret = input_port_read_indexed(machine,0); | |
| 557 | if (offset & 0x04) ret = input_port_read_indexed(machine,1); | |
| 558 | if (offset & 0x08) ret = input_port_read_indexed(machine,2); | |
| 561 | 559 | |
| 562 | 560 | return ret; |
| 563 | 561 | } |
| r2454 | r2455 | |
| 744 | 742 | { |
| 745 | 743 | UINT8 ret = 0; |
| 746 | 744 | |
| 747 | if (offset & 0x01) ret = input_port_ | |
| 745 | if (offset & 0x01) ret = input_port_ | |
| 748 | 746 | if (offset & 0x02) /* schematics show this as in input port, but never read from */ |
| 749 | if (offset & 0x04) ret = input_port_1_r(machine, 0); | |
| 750 | if (offset & 0x08) ret = input_port_2_r(machine, 0); | |
| 747 | if (offset & 0x04) ret = input_port_read_indexed(machine,1); | |
| 748 | if (offset & 0x08) ret = input_port_read_indexed(machine,2); | |
| 751 | 749 | if (offset & 0x12) logerror("********* Read from port %x\n", offset); |
| 752 | 750 | |
| 753 | 751 | return ret; |
| r2454 | r2455 | |
|---|---|---|
| 348 | 348 | ***************************************************************************/ |
| 349 | 349 | |
| 350 | 350 | #include "driver.h" |
| 351 | #include "deprecat.h" | |
| 352 | 351 | #include "cpu/z80/z80.h" |
| 353 | 352 | #include "cpu/s2650/s2650.h" |
| 354 | 353 | #include "galaxold.h" |
| r2454 | r2455 | |
| 2322 | 2321 | |
| 2323 | 2322 | static const struct AY8910interface checkmaj_ay8910_interface = |
| 2324 | 2323 | { |
| 2325 | soundlatch_r | |
| 2324 | AY8910_LEGACY_OUTPUT, | |
| 2325 | AY8910_DEFAULT_LOADS, | |
| 2326 | soundlatch_r, | |
| 2327 | NULL, | |
| 2328 | NULL, | |
| 2329 | NULL | |
| 2326 | 2330 | }; |
| 2327 | 2331 | |
| 2328 | 2332 | static const struct AY8910interface bongo_ay8910_interface = |
| 2329 | 2333 | { |
| 2330 | input_port_3_r | |
| 2334 | AY8910_LEGACY_OUTPUT, | |
| 2335 | AY8910_DEFAULT_LOADS, | |
| 2336 | input_port_3_r, | |
| 2337 | NULL, | |
| 2338 | NULL, | |
| 2339 | NULL | |
| 2331 | 2340 | }; |
| 2332 | 2341 | |
| 2333 | 2342 |
| r2454 | r2455 | |
|---|---|---|
| 478 | 478 | |
| 479 | 479 | static WRITE8_HANDLER( irq_ack_w ) |
| 480 | 480 | { |
| 481 | cpunum_set_input_line( | |
| 481 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 482 | 482 | } |
| 483 | 483 | |
| 484 | 484 | |
| r2454 | r2455 | |
| 1583 | 1583 | |
| 1584 | 1584 | static const struct AY8910interface centipdb_ay8910_interface = |
| 1585 | 1585 | { |
| 1586 | AY8910_LEGACY_OUTPUT, | |
| 1587 | AY8910_DEFAULT_LOADS, | |
| 1586 | 1588 | caterplr_rand_r |
| 1587 | 1589 | }; |
| 1588 | 1590 |
| r2454 | r2455 | |
|---|---|---|
| 45 | 45 | ***********************************************************************/ |
| 46 | 46 | |
| 47 | 47 | #include "driver.h" |
| 48 | #include "deprecat.h" | |
| 49 | 48 | #include "cpu/m6809/m6809.h" |
| 50 | 49 | |
| 51 | 50 | /* Set to 1 to display test results and skip on errors */ |
| r2454 | r2455 | |
| 126 | 125 | bankaddress = 0x10000 + (data & 0x03) * 0x10000; |
| 127 | 126 | memory_set_bankptr(1,&ROM[bankaddress]); |
| 128 | 127 | |
| 129 | cpunum_set_input_line(Machine, 0, INPUT_LINE_NMI, (data&0x80) ? ASSERT_LINE : CLEAR_LINE); | |
| 130 | cpunum_set_input_line(Machine, 1, INPUT_LINE_NMI, (data&0x80) ? ASSERT_LINE : CLEAR_LINE); | |
| 128 | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, (data&0x80) ? ASSERT_LINE : CLEAR_LINE); | |
| 129 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, (data&0x80) ? ASSERT_LINE : CLEAR_LINE); | |
| 131 | 130 | } |
| 132 | 131 | |
| 133 | 132 | /* |
| r2454 | r2455 | |
| 256 | 255 | */ |
| 257 | 256 | |
| 258 | 257 | static ADDRESS_MAP_START( game_cpu_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 259 | AM_RANGE(0x0000, 0x3fff) AM_RAM AM_SHARE(1) | |
| 260 | AM_RANGE(0x40ff, 0x40ff) AM_RAM /* W */ | |
| 261 | AM_RANGE(0x41ff, 0x41ff) AM_RAM /* W */ | |
| 262 | AM_RANGE(0x42ff, 0x4300) AM_RAM /* W */ | |
| 263 | AM_RANGE(0x4800, 0x4800) AM_READWRITE(G_STATUS_R, G_STATUS_W) /* Status port */ | |
| 264 | AM_RANGE(0x4C00, 0x4C00) AM_RAM /* R/W - An input device? (doesn't enter auto mode depending on read) */ | |
| 265 | AM_RANGE(0x5000, 0x5000) AM_RAM /* Write - related to 4C00. Bit 8 = ? bits0..3 =???? */ | |
| 266 | AM_RANGE(0x5400, 0x54ff) AM_RAM /* UART buffer? */ | |
| 267 | AM_RANGE(0x5c00, 0x5c01) AM_READWRITE(UART_R, UART_W) /* i8251A USART */ | |
| 268 | AM_RANGE(0x6000, 0xdfff) AM_READWRITE(SMH_BANK1, SMH_ROM) /* Bank switched ROMs */ | |
| 269 | AM_RANGE(0xe000, 0xffff) AM_ROM | |
| 258 | AM_RANGE(0x0000, 0x3fff) AM_RAM AM_SHARE(1) | |
| 259 | AM_RANGE(0x40ff, 0x40ff) AM_RAM /* W */ | |
| 260 | AM_RANGE(0x41ff, 0x41ff) AM_RAM /* W */ | |
| 261 | AM_RANGE(0x42ff, 0x4300) AM_RAM /* W */ | |
| 262 | AM_RANGE(0x4800, 0x4800) AM_READWRITE(G_STATUS_R, G_STATUS_W) /* Status port */ | |
| 263 | AM_RANGE(0x4C00, 0x4C00) AM_RAM /* R/W - An input device? (doesn't enter auto mode depending on read) */ | |
| 264 | AM_RANGE(0x5000, 0x5000) AM_RAM /* Write - related to 4C00. Bit 8 = ? bits0..3 =???? */ | |
| 265 | AM_RANGE(0x5400, 0x54ff) AM_RAM /* UART buffer? */ | |
| 266 | AM_RANGE(0x5c00, 0x5c01) AM_READWRITE(UART_R, UART_W) /* i8251A USART */ | |
| 267 | AM_RANGE(0x6000, 0xdfff) AM_READWRITE(SMH_BANK1, SMH_ROM) /* Bank switched ROMs */ | |
| 268 | AM_RANGE(0xe000, 0xffff) AM_ROM | |
| 270 | 269 | ADDRESS_MAP_END |
| 271 | 270 | |
| 272 | 271 | /* |
| r2454 | r2455 | |
| 283 | 282 | */ |
| 284 | 283 | |
| 285 | 284 | static ADDRESS_MAP_START( frame_cpu_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 286 | AM_RANGE(0x0000, 0x3fff) AM_RAM AM_SHARE(1) /* 16kB RAM: Shared with game CPU */ | |
| 287 | AM_RANGE(0x4000, 0x4fff) AM_READWRITE(FDT_R, FDT_W) /* 8kB RAM: Frame Drive Table (banked) */ | |
| 288 | AM_RANGE(0x6000, 0x6000) AM_READWRITE(F_STATUS_R, F_STATUS_W) /* Status port */ | |
| 289 | AM_RANGE(0x8000, 0x8000) AM_WRITE(FRAME) | |
| 285 | AM_RANGE(0x0000, 0x3fff) AM_RAM AM_SHARE(1) /* 16kB RAM: Shared with game CPU */ | |
| 286 | AM_RANGE(0x4000, 0x4fff) AM_READWRITE(FDT_R, FDT_W) /* 8kB RAM: Frame Drive Table (banked) */ | |
| 287 | AM_RANGE(0x6000, 0x6000) AM_READWRITE(F_STATUS_R, F_STATUS_W) /* Status port */ | |
| 288 | AM_RANGE(0x8000, 0x8000) AM_WRITE(FRAME) | |
| 290 | 289 | AM_RANGE(0xc000, 0xffff) AM_ROM |
| 291 | 290 | ADDRESS_MAP_END |
| 292 | 291 | |
| r2454 | r2455 | |
| 312 | 311 | /* Sound CPU */ |
| 313 | 312 | |
| 314 | 313 | static ADDRESS_MAP_START( sound_cpu_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 315 | ||
| 314 | | |
| 316 | 315 | AM_RANGE(0x2008, 0x2008) AM_RAM /* R=status line? D7 0=Ready? 1=Not ready? */ |
| 317 | AM_RANGE(0x2009, 0x2009) AM_RAM /* W (only written once - with value read from 2008) */ | |
| 318 | AM_RANGE(0x200a, 0x200b) AM_RAM /* W 16-bit value during FIRQ */ | |
| 319 | AM_RANGE(0x200c, 0x200c) AM_RAM /* W */ | |
| 320 | AM_RANGE(0x200d, 0x200d) AM_RAM /* W - 03 */ | |
| 321 | AM_RANGE(0x200e, 0x200e) AM_RAM /* R/W - communication with game processor */ | |
| 322 | AM_RANGE(0x200f, 0x200f) AM_RAM /* R/W - communication with game processor */ | |
| 323 | AM_RANGE(0x2020, 0x2020) AM_RAM /* W - 42 */ | |
| 324 | AM_RANGE(0x2021, 0x2021) AM_RAM /* W - 42,1 and R during FIRQ? */ | |
| 325 | AM_RANGE(0x2022, 0x2023) AM_RAM /* R/W rarely */ | |
| 326 | AM_RANGE(0x2024, 0x2025) AM_RAM /* R/W rarely */ | |
| 327 | AM_RANGE(0x8000, 0x8006) AM_RAM /* R */ | |
| 316 | AM_RANGE(0x2009, 0x2009) AM_RAM /* W (only written once - with value read from 2008) */ | |
| 317 | AM_RANGE(0x200a, 0x200b) AM_RAM /* W 16-bit value during FIRQ */ | |
| 318 | AM_RANGE(0x200c, 0x200c) AM_RAM /* W */ | |
| 319 | AM_RANGE(0x200d, 0x200d) AM_RAM /* W - 03 */ | |
| 320 | AM_RANGE(0x200e, 0x200e) AM_RAM /* R/W - communication with game processor */ | |
| 321 | AM_RANGE(0x200f, 0x200f) AM_RAM /* R/W - communication with game processor */ | |
| 322 | AM_RANGE(0x2020, 0x2020) AM_RAM /* W - 42 */ | |
| 323 | AM_RANGE(0x2021, 0x2021) AM_RAM /* W - 42,1 and R during FIRQ? */ | |
| 324 | AM_RANGE(0x2022, 0x2023) AM_RAM /* R/W rarely */ | |
| 325 | AM_RANGE(0x2024, 0x2025) AM_RAM /* R/W rarely */ | |
| 326 | AM_RANGE(0x8000, 0x8006) AM_RAM /* R */ | |
| 328 | 327 | AM_RANGE(0xc000, 0xffff) AM_ROM |
| 329 | 328 | ADDRESS_MAP_END |
| 330 | 329 | |
| r2454 | r2455 | |
| 350 | 349 | MDRV_SCREEN_VISIBLE_AREA(0*8, 34*8-1, 0, 34*8-1) |
| 351 | 350 | |
| 352 | 351 | MDRV_PALETTE_LENGTH(512) |
| 353 | MDRV_MACHINE_RESET( turbosub ) | |
| 354 | MDRV_INTERLEAVE(100) | |
| 352 | MDRV_MACHINE_RESET( turbosub ) | |
| 353 | MDRV_INTERLEAVE(100) | |
| 355 | 354 | |
| 356 | 355 | MDRV_VIDEO_START(turbosub) |
| 357 | 356 | MDRV_VIDEO_UPDATE(turbosub) |
| r2454 | r2455 | |
| 363 | 362 | |
| 364 | 363 | ROM_REGION( 0x48000, REGION_CPU1, 0 ) /* Bankswitched 6809 code */ |
| 365 | 364 | ROM_LOAD( "turbosub.u82", 0x10000, 0x2000, CRC(de32eb6f) SHA1(90bf31a5adf261d47b4f52e93b5e97f343b7ebf0) ) |
| 366 | ||
| 365 | | |
| 367 | 366 | ROM_LOAD( "turbosub.u81", 0x12000, 0x2000, CRC(9ae09613) SHA1(9b5ada4a21473b30be98bcc461129b6ed4e0bb11) ) |
| 368 | ||
| 367 | | |
| 369 | 368 | ROM_LOAD( "turbosub.u87", 0x14000, 0x2000, CRC(ad2284f7) SHA1(8e11b8ad0a98dd1fe6ec8f7ea9e6e4f4a45d8a1b) ) |
| 370 | ||
| 369 | | |
| 371 | 370 | ROM_LOAD( "turbosub.u86", 0x16000, 0x2000, CRC(4f51e6fd) SHA1(8f51ac6412aace29279ce7b02cad45ed681c2065) ) |
| 372 | ||
| 371 | | |
| 373 | 372 | |
| 374 | 373 | ROM_LOAD( "turbosub.u80", 0x30000, 0x2000, CRC(ff2e2870) SHA1(45f91d63ad91585482c9dd05290b204b007e3f44) ) |
| 375 | ROM_CONTINUE( 0x40000, 0x2000 ) | |
| 376 | ROM_LOAD( "turbosub.u79", 0x32000, 0x2000, CRC(13680923) SHA1(14e3daa2178853cef1fd96a68305420c11fceb96) ) | |
| 377 | ROM_CONTINUE( 0x42000, 0x2000 ) | |
| 374 | ROM_CONTINUE( 0x40000, 0x2000 ) | |
| 375 | ROM_LOAD( "turbosub.u79", 0x32000, 0x2000, CRC(13680923) SHA1(14e3daa2178853cef1fd96a68305420c11fceb96) ) | |
| 376 | ROM_CONTINUE( 0x42000, 0x2000 ) | |
| 378 | 377 | ROM_LOAD( "turbosub.u84", 0x34000, 0x2000, CRC(7059842d) SHA1(c20a8accd3fc23bc4476e1d08798d7a80915d37c) ) |
| 379 | ||
| 378 | | |
| 380 | 379 | ROM_LOAD( "turbosub.u83", 0x36000, 0x2000, CRC(31b86fc6) SHA1(8e56e8a75f653c3c4da2c9f31f739894beb194db) ) |
| 381 | ||
| 380 | | |
| 382 | 381 | |
| 383 | ||
| 382 | | |
| 384 | 383 | ROM_COPY( REGION_USER1, 0x18000+0x2000, 0xe000, 0x2000 ) |
| 385 | 384 | |
| 386 | 385 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) |
| r2454 | r2455 | |
| 389 | 388 | ROM_REGION( 0x10000, REGION_CPU3, 0 ) |
| 390 | 389 | ROM_LOAD( "turbosub.u66", 0xc000, 0x4000, CRC(5091bf3d) SHA1(7ab872cef1562a45f7533c16bbbae8772673465b) ) |
| 391 | 390 | |
| 392 | ||
| 391 | ||
| 393 | 392 | ROM_LOAD( "turbosub.u67", 0x00000, 0x4000, CRC(f8ae82e9) SHA1(fd27b9fe7872c3c680a1f71a4a5d5eeaa12e4a19) ) |
| 394 | 393 | ROM_LOAD( "turbosub.u68", 0x04000, 0x4000, CRC(72e3d09b) SHA1(eefdfcd0c4c32e465f18d40f46cb5bc022c22bfd) ) |
| 395 | 394 | ROM_LOAD( "turbosub.u69", 0x00000, 0x4000, CRC(ad04193b) SHA1(2f660302e60a7e68e079a8dd13266a77c077f939) ) |
| r2454 | r2455 | |
|---|---|---|
| 97 | 97 | collision_reset = !(data & 1); |
| 98 | 98 | |
| 99 | 99 | if (collision_reset) |
| 100 | cpunum_set_input_line( | |
| 100 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 |
| r2454 | r2455 | |
|---|---|---|
| 121 | 121 | |
| 122 | 122 | static READ8_HANDLER( port1_r ) |
| 123 | 123 | { |
| 124 | return input_port_ | |
| 124 | return input_port_ | |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | static WRITE8_HANDLER( lamps_w ) |
| r2454 | r2455 | |
| 233 | 233 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 234 | 234 | AM_RANGE(0x2000, 0x3fff) AM_ROMBANK(1) |
| 235 | 235 | AM_RANGE(0x4000, 0x47ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) |
| 236 | AM_RANGE(0x4800, 0x4803) AM_READWRITE(ppi8255_0_r, ppi8255_0_w) | |
| 237 | AM_RANGE(0x5000, 0x5003) AM_READWRITE(ppi8255_1_r, ppi8255_1_w) | |
| 236 | AM_RANGE(0x4800, 0x4803) AM_DEVREADWRITE(PPI8255, "ppi8255_0", ppi8255_r, ppi8255_w) | |
| 237 | AM_RANGE(0x5000, 0x5003) AM_DEVREADWRITE(PPI8255, "ppi8255_1", ppi8255_r, ppi8255_w) | |
| 238 | 238 | AM_RANGE(0x600f, 0x600f) AM_WRITE(banksel_5_1_w) |
| 239 | 239 | AM_RANGE(0x6017, 0x6017) AM_WRITE(banksel_4_1_w) |
| 240 | 240 | AM_RANGE(0x601b, 0x601b) AM_WRITE(banksel_3_1_w) |
| r2454 | r2455 | |
| 259 | 259 | AM_RANGE(0x4401, 0x4401) AM_WRITE(banksel_1_2_w) |
| 260 | 260 | AM_RANGE(0x4402, 0x4402) AM_WRITE(banksel_2_1_w) |
| 261 | 261 | AM_RANGE(0x4403, 0x4403) AM_WRITE(banksel_2_2_w) |
| 262 | AM_RANGE(0x4800, 0x4803) AM_READWRITE(ppi8255_0_r, ppi8255_0_w) | |
| 263 | AM_RANGE(0x5000, 0x5003) AM_READWRITE(ppi8255_1_r, ppi8255_1_w) | |
| 262 | AM_RANGE(0x4800, 0x4803) AM_DEVREADWRITE(PPI8255, "ppi8255_0", ppi8255_r, ppi8255_w) | |
| 263 | AM_RANGE(0x5000, 0x5003) AM_DEVREADWRITE(PPI8255, "ppi8255_1", ppi8255_r, ppi8255_w) | |
| 264 | 264 | AM_RANGE(0x8000, 0x8002) AM_WRITE(SMH_RAM) AM_BASE(&drawctrl) |
| 265 | 265 | AM_RANGE(0xc000, 0xffff) AM_RAM_WRITE(getrivia_bitmap_w) AM_BASE(&videoram) |
| 266 | 266 | ADDRESS_MAP_END |
| r2454 | r2455 | |
| 270 | 270 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 271 | 271 | AM_RANGE(0x2000, 0x3fff) AM_ROMBANK(1) |
| 272 | 272 | AM_RANGE(0x4000, 0x47ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) |
| 273 | AM_RANGE(0x4800, 0x4803) AM_READWRITE(ppi8255_0_r, ppi8255_0_w) | |
| 274 | AM_RANGE(0x5000, 0x5003) AM_READWRITE(ppi8255_1_r, ppi8255_1_w) | |
| 273 | AM_RANGE(0x4800, 0x4803) AM_DEVREADWRITE(PPI8255, "ppi8255_0", ppi8255_r, ppi8255_w) | |
| 274 | AM_RANGE(0x5000, 0x5003) AM_DEVREADWRITE(PPI8255, "ppi8255_1", ppi8255_r, ppi8255_w) | |
| 275 | 275 | AM_RANGE(0x606f, 0x606f) AM_WRITE(banksel_5_1_w) |
| 276 | 276 | AM_RANGE(0x6077, 0x6077) AM_WRITE(banksel_4_1_w) |
| 277 | 277 | AM_RANGE(0x607b, 0x607b) AM_WRITE(banksel_3_1_w) |
| r2454 | r2455 | |
| 286 | 286 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 287 | 287 | AM_RANGE(0x2000, 0x3fff) AM_ROMBANK(1) |
| 288 | 288 | AM_RANGE(0x4000, 0x47ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) |
| 289 | AM_RANGE(0x4800, 0x4803) AM_READWRITE(ppi8255_0_r, ppi8255_0_w) | |
| 290 | AM_RANGE(0x5000, 0x5003) AM_READWRITE(ppi8255_1_r, ppi8255_1_w) | |
| 289 | AM_RANGE(0x4800, 0x4803) AM_DEVREADWRITE(PPI8255, "ppi8255_0", ppi8255_r, ppi8255_w) | |
| 290 | AM_RANGE(0x5000, 0x5003) AM_DEVREADWRITE(PPI8255, "ppi8255_1", ppi8255_r, ppi8255_w) | |
| 291 | 291 | AM_RANGE(0x60ef, 0x60ef) AM_WRITE(banksel_3_1_w) |
| 292 | 292 | AM_RANGE(0x60f7, 0x60f7) AM_WRITE(banksel_2_2_w) |
| 293 | 293 | AM_RANGE(0x60fb, 0x60fb) AM_WRITE(banksel_2_1_w) |
| r2454 | r2455 | |
| 418 | 418 | |
| 419 | 419 | |
| 420 | 420 | |
| 421 | static const ppi8255_interface getrivia_ppi8255_intf = | |
| 421 | static const ppi8255_interface getrivia_ppi8255_intf[2] = | |
| 422 | 422 | { |
| 423 | 2, /* 2 chips */ | |
| 424 | { input_port_0_r, input_port_2_r }, /* Port A read */ | |
| 425 | { port1_r, NULL }, /* Port B read */ | |
| 426 | { NULL, NULL }, /* Port C read */ | |
| 427 | { NULL, NULL }, /* Port A write */ | |
| 428 | { NULL, lamps_w }, /* Port B write */ | |
| 429 | { sound_w, lamps2_w }, /* Port C write */ | |
| 423 | { | |
| 424 | input_port_0_r, /* Port A read */ | |
| 425 | port1_r, /* Port B read */ | |
| 426 | NULL, /* Port C read */ | |
| 427 | NULL, /* Port A write */ | |
| 428 | NULL, /* Port B write */ | |
| 429 | sound_w /* Port C write */ | |
| 430 | }, | |
| 431 | { | |
| 432 | input_port_2_r, /* Port A read */ | |
| 433 | NULL, /* Port B read */ | |
| 434 | NULL, /* Port C read */ | |
| 435 | NULL, /* Port A write */ | |
| 436 | lamps_w, /* Port B write */ | |
| 437 | lamps2_w /* Port C write */ | |
| 438 | } | |
| 430 | 439 | }; |
| 431 | 440 | |
| 432 | static const ppi8255_interface gselect_ppi8255_intf = | |
| 441 | static const ppi8255_interface gselect_ppi8255_intf[2] = | |
| 433 | 442 | { |
| 434 | 2, /* 2 chips */ | |
| 435 | { input_port_0_r, input_port_2_r }, /* Port A read */ | |
| 436 | { input_port_1_r, NULL }, /* Port B read */ | |
| 437 | { NULL, input_port_3_r }, /* Port C read */ | |
| 438 | { NULL, NULL }, /* Port A write */ | |
| 439 | { NULL, lamps_w }, /* Port B write */ | |
| 440 | { sound2_w, nmi_w }, /* Port C write */ | |
| 443 | { | |
| 444 | input_port_0_r, /* Port A read */ | |
| 445 | input_port_1_r, /* Port B read */ | |
| 446 | NULL, /* Port C read */ | |
| 447 | NULL, /* Port A write */ | |
| 448 | NULL, /* Port B write */ | |
| 449 | sound2_w /* Port C write */ | |
| 450 | }, | |
| 451 | { | |
| 452 | input_port_2_r, /* Port A read */ | |
| 453 | NULL, /* Port B read */ | |
| 454 | input_port_3_r, /* Port C read */ | |
| 455 | NULL, /* Port A write */ | |
| 456 | lamps_w, /* Port B write */ | |
| 457 | nmi_w /* Port C write */ | |
| 458 | } | |
| 441 | 459 | }; |
| 442 | 460 | |
| 443 | 461 | static MACHINE_RESET( getrivia ) |
| 444 | 462 | { |
| 445 | ppi8255_init(&getrivia_ppi8255_intf); | |
| 446 | ||
| 447 | 463 | ticket_dispenser_init(100, 1, 1); |
| 448 | 464 | } |
| 449 | 465 | |
| 450 | 466 | static MACHINE_RESET( gselect ) |
| 451 | 467 | { |
| 452 | ppi8255_init(&gselect_ppi8255_intf); | |
| 453 | 468 | } |
| 454 | 469 | |
| 455 | 470 | static MACHINE_DRIVER_START( getrivia ) |
| r2454 | r2455 | |
| 473 | 488 | MDRV_VIDEO_START(generic_bitmapped) |
| 474 | 489 | MDRV_VIDEO_UPDATE(generic_bitmapped) |
| 475 | 490 | |
| 491 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 492 | MDRV_DEVICE_CONFIG( getrivia_ppi8255_intf[0] ) | |
| 493 | ||
| 494 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 495 | MDRV_DEVICE_CONFIG( getrivia_ppi8255_intf[1] ) | |
| 496 | ||
| 476 | 497 | /* sound hardware */ |
| 477 | 498 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 478 | 499 | |
| r2454 | r2455 | |
| 489 | 510 | MDRV_CPU_PROGRAM_MAP(gselect_map,0) |
| 490 | 511 | |
| 491 | 512 | MDRV_MACHINE_RESET(gselect) |
| 513 | ||
| 514 | MDRV_DEVICE_MODIFY( "ppi8255_0", PPI8255 ) | |
| 515 | MDRV_DEVICE_CONFIG( gselect_ppi8255_intf[0] ) | |
| 516 | ||
| 517 | MDRV_DEVICE_MODIFY( "ppi8255_1", PPI8255 ) | |
| 518 | MDRV_DEVICE_CONFIG( gselect_ppi8255_intf[1] ) | |
| 492 | 519 | MACHINE_DRIVER_END |
| 493 | 520 | |
| 494 | 521 | static MACHINE_DRIVER_START( amuse ) |
| r2454 | r2455 | |
|---|---|---|
| 247 | 247 | |
| 248 | 248 | dsp_HOLD_signal = (data & 4) ? CLEAR_LINE : ASSERT_LINE; |
| 249 | 249 | |
| 250 | cpunum_set_input_line( | |
| 250 | cpunum_set_input_line(machine, 2, INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE); | |
| 251 | 251 | |
| 252 | 252 | logerror("68K:%06x writing %04x to TMS32025. %s HOLD , %s RESET\n",activecpu_get_previouspc(),data,((data & 4) ? "Clear" : "Assert"),((data & 1) ? "Clear" : "Assert")); |
| 253 | 253 | } |
| r2454 | r2455 | |
| 295 | 295 | COMBINE_DATA(&paletteram16[offset]); |
| 296 | 296 | |
| 297 | 297 | a = paletteram16[offset]; |
| 298 | palette_set_color_rgb( | |
| 298 | palette_set_color_rgb(machine,offset,pal4bit(a >> 0),pal4bit(a >> 5),pal4bit(a >> 10)); | |
| 299 | 299 | } |
| 300 | 300 | |
| 301 | 301 |
| r2454 | r2455 | |
|---|---|---|
| 50 | 50 | |
| 51 | 51 | ***************************************************************************/ |
| 52 | 52 | #include "driver.h" |
| 53 | #include "deprecat.h" | |
| 54 | 53 | #include "sound/ay8910.h" |
| 55 | 54 | #include "sound/3812intf.h" |
| 56 | 55 |
| r2454 | r2455 | |
|---|---|---|
| 195 | 195 | |
| 196 | 196 | static const struct AY8910interface ay8910_interface = |
| 197 | 197 | { |
| 198 | AY8910_LEGACY_OUTPUT, | |
| 199 | AY8910_DEFAULT_LOADS, | |
| 198 | 200 | input_port_1_r, |
| 199 | 0, | |
| 200 | 0, | |
| 201 | NULL, | |
| 202 | NULL, | |
| 201 | 203 | hanaawas_portB_w |
| 202 | 204 | }; |
| 203 | 205 |
| r2454 | r2455 | |
|---|---|---|
| 1071 | 1071 | col = pal.clut[entry] & 0xfff; |
| 1072 | 1072 | |
| 1073 | 1073 | /* Update the MAME palette */ |
| 1074 | palette_set_color_rgb( | |
| 1074 | palette_set_color_rgb(machine, entry, pal4bit(col >> 0), pal4bit(col >> 4), pal4bit(col >> 8)); | |
| 1075 | 1075 | } |
| 1076 | 1076 | |
| 1077 | 1077 | /* Address register auto-increment */ |
| r2454 | r2455 | |
|---|---|---|
| 87 | 87 | static READ16_HANDLER( aquarium_coins_r ) |
| 88 | 88 | { |
| 89 | 89 | int data; |
| 90 | data = (input_port_ | |
| 90 | data = (input_port_ | |
| 91 | 91 | data |= aquarium_snd_ack; |
| 92 | 92 | aquarium_snd_ack = 0; |
| 93 | 93 | return data; |
| r2454 | r2455 | |
|---|---|---|
| 157 | 157 | { |
| 158 | 158 | /* Get the pending IRQs (only the enabled ones, e.g. where |
| 159 | 159 | irq_enable is *0*) */ |
| 160 | UINT16 irq = metro_irq_cause_r(Machine,0,0) & ~*metro_irq_enable; | |
| 160 | UINT16 irq = metro_irq_cause_r(Machine,0,0xffff) & ~*metro_irq_enable; | |
| 161 | 161 | |
| 162 | 162 | if (irq_line == -1) /* mouja, gakusai, gakusai2, dokyusei, dokyusp */ |
| 163 | 163 | { |
| r2454 | r2455 | |
| 720 | 720 | metro_blitter_regs[ 0x0a / 2 ]; |
| 721 | 721 | |
| 722 | 722 | int shift = (dst_offs & 0x80) ? 0 : 8; |
| 723 | UINT16 mask = (dst_offs & 0x80) ? 0x | |
| 723 | UINT16 mask = (dst_offs & 0x80) ? 0x | |
| 724 | 724 | |
| 725 | 725 | // logerror("CPU #0 PC %06X : Blitter regs %08X, %08X, %08X\n",activecpu_get_pc(),tmap,src_offs,dst_offs); |
| 726 | 726 | |
| r2454 | r2455 | |
| 2151 | 2151 | |
| 2152 | 2152 | static READ8_HANDLER( puzzlet_port7_r ) |
| 2153 | 2153 | { |
| 2154 | return input_port_ | |
| 2154 | return input_port_ | |
| 2155 | 2155 | } |
| 2156 | 2156 | |
| 2157 | 2157 | static READ8_HANDLER( puzzlet_serB_r ) |
| 2158 | 2158 | { |
| 2159 | return input_port_ | |
| 2159 | return input_port_ | |
| 2160 | 2160 | } |
| 2161 | 2161 | |
| 2162 | 2162 | static WRITE8_HANDLER( puzzlet_portb_w ) |
| r2454 | r2455 | |
|---|---|---|
| 540 | 540 | |
| 541 | 541 | static const struct YM2203interface ym2203_interface = |
| 542 | 542 | { |
| 543 | 0, | |
| 544 | 0, | |
| 545 | 0, | |
| 546 | 0, | |
| 543 | { | |
| 544 | AY8910_LEGACY_OUTPUT, | |
| 545 | AY8910_DEFAULT_LOADS, | |
| 546 | NULL, NULL, NULL, NULL | |
| 547 | }, | |
| 547 | 548 | irqhandler |
| 548 | 549 | }; |
| 549 | 550 |
| r2454 | r2455 | |
|---|---|---|
| 99 | 99 | ***************************************************************************/ |
| 100 | 100 | |
| 101 | 101 | #include "driver.h" |
| 102 | #include "deprecat.h" | |
| 103 | 102 | #include "pacman.h" |
| 104 | 103 | #include "sound/namco.h" |
| 105 | 104 | |
| r2454 | r2455 | |
| 107 | 106 | static WRITE8_HANDLER( jrpacman_interrupt_vector_w ) |
| 108 | 107 | { |
| 109 | 108 | cpunum_set_input_line_vector(0, 0, data); |
| 110 | cpunum_set_input_line( | |
| 109 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 111 | 110 | } |
| 112 | 111 | |
| 113 | 112 |
| r2454 | r2455 | |
|---|---|---|
| 14 | 14 | ***************************************************************************/ |
| 15 | 15 | |
| 16 | 16 | #include "driver.h" |
| 17 | #include "deprecat.h" | |
| 18 | 17 | #include "cpu/m6809/m6809.h" |
| 19 | 18 | #include "sound/dac.h" |
| 20 | 19 | #include "sound/sn76496.h" |
| r2454 | r2455 | |
| 71 | 70 | |
| 72 | 71 | static WRITE8_HANDLER( circusc_sh_irqtrigger_w ) |
| 73 | 72 | { |
| 74 | cpunum_set_input_line_and_vector( | |
| 73 | cpunum_set_input_line_and_vector(machine, 1,0,HOLD_LINE,0xff); | |
| 75 | 74 | } |
| 76 | 75 | |
| 77 | 76 | static WRITE8_HANDLER( circusc_coin_counter_w ) |
| r2454 | r2455 | |
|---|---|---|
| 72 | 72 | |
| 73 | 73 | static WRITE8_HANDLER(palette_w) |
| 74 | 74 | { |
| 75 | palette_set_color_rgb( | |
| 75 | palette_set_color_rgb(machine,offset,pal3bit(data>>5),pal3bit(data>>2),pal2bit(data)); | |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | static WRITE8_HANDLER(vrambank_w) |
| r2454 | r2455 | |
|---|---|---|
| 17 | 17 | ***************************************************************************/ |
| 18 | 18 | |
| 19 | 19 | #include "driver.h" |
| 20 | #include "deprecat.h" | |
| 21 | 20 | #include "cpu/m6809/m6809.h" |
| 22 | 21 | #include "sound/sn76496.h" |
| 23 | 22 | |
| r2454 | r2455 | |
| 50 | 49 | if (last == 0 && data == 1) |
| 51 | 50 | { |
| 52 | 51 | // setting bit 0 low then high triggers IRQ on the sound CPU |
| 53 | cpunum_set_input_line_and_vector( | |
| 52 | cpunum_set_input_line_and_vector(machine, 1, 0, HOLD_LINE, 0xff); | |
| 54 | 53 | } |
| 55 | 54 | |
| 56 | 55 | last = data; |
| r2454 | r2455 | |
|---|---|---|
| 19 | 19 | **************************************************************************/ |
| 20 | 20 | |
| 21 | 21 | #include "driver.h" |
| 22 | #include "deprecat.h" | |
| 23 | 22 | #include "cpu/tms32031/tms32031.h" |
| 24 | 23 | #include "cpu/adsp2100/adsp2100.h" |
| 25 | 24 | #include "audio/dcs.h" |
| r2454 | r2455 | |
| 147 | 146 | { |
| 148 | 147 | if (!(control_data & 0x40)) |
| 149 | 148 | { |
| 150 | cpunum_set_input_line( | |
| 149 | cpunum_set_input_line(machine, 0, 3, CLEAR_LINE); | |
| 151 | 150 | return adc_data << adc_shift; |
| 152 | 151 | } |
| 153 | 152 | else |
| r2454 | r2455 | |
|---|---|---|
| 1035 | 1035 | |
| 1036 | 1036 | static const struct AY8910interface bestbest_ay8910_interface = |
| 1037 | 1037 | { |
| 1038 | 0, 0, | |
| 1039 | bestbest_ay8910_port_a_w, 0 | |
| 1038 | AY8910_LEGACY_OUTPUT, | |
| 1039 | AY8910_DEFAULT_LOADS, | |
| 1040 | NULL, NULL, | |
| 1041 | bestbest_ay8910_port_a_w, NULL | |
| 1040 | 1042 | }; |
| 1041 | 1043 | |
| 1042 | 1044 | static MACHINE_DRIVER_START( bestbest ) |
| r2454 | r2455 | |
|---|---|---|
| 232 | 232 | |
| 233 | 233 | static const ppi8255_interface ppi8255_intf = |
| 234 | 234 | { |
| 235 | 1, /* 1 chip */ | |
| 236 | {input_port_3_r}, /* Port A read */ | |
| 237 | {input_port_4_r}, /* Port B read */ | |
| 238 | {input_port_5_r}, /* Port C read */ | |
| 239 | {0}, /* Port A write */ | |
| 240 | {0}, /* Port B write */ | |
| 241 | {zaccaria_dsw_sel_w}, /* Port C write */ | |
| 235 | input_port_3_r, /* Port A read */ | |
| 236 | input_port_4_r, /* Port B read */ | |
| 237 | input_port_5_r, /* Port C read */ | |
| 238 | NULL, /* Port A write */ | |
| 239 | NULL, /* Port B write */ | |
| 240 | zaccaria_dsw_sel_w, /* Port C write */ | |
| 242 | 241 | }; |
| 243 | 242 | |
| 244 | 243 | |
| r2454 | r2455 | |
| 250 | 249 | |
| 251 | 250 | static MACHINE_RESET( zaccaria ) |
| 252 | 251 | { |
| 253 | ppi8255_init(&ppi8255_intf); | |
| 254 | 252 | pia_reset(); |
| 255 | 253 | } |
| 256 | 254 | |
| r2454 | r2455 | |
| 345 | 343 | AM_RANGE(0x6c00, 0x6c07) AM_READ(zaccaria_prot2_r) |
| 346 | 344 | AM_RANGE(0x6e00, 0x6e00) AM_READWRITE(zaccaria_dsw_r, sound_command_w) |
| 347 | 345 | AM_RANGE(0x7000, 0x77ff) AM_RAM |
| 348 | AM_RANGE(0x7800, 0x7803) AM_READWRITE(ppi8255_ | |
| 346 | AM_RANGE(0x7800, 0x7803) AM_DEVREADWRITE(PPI8255, "ppi8255", ppi8255_ | |
| 349 | 347 | AM_RANGE(0x7c00, 0x7c00) AM_READ(watchdog_reset_r) |
| 350 | 348 | AM_RANGE(0x8000, 0xdfff) AM_ROM |
| 351 | 349 | ADDRESS_MAP_END |
| r2454 | r2455 | |
| 622 | 620 | |
| 623 | 621 | static const struct AY8910interface ay8910_interface = |
| 624 | 622 | { |
| 625 | 0, | |
| 623 | AY8910_LEGACY_OUTPUT, | |
| 624 | AY8910_DEFAULT_LOADS, | |
| 625 | NULL, | |
| 626 | 626 | soundlatch2_r, |
| 627 | 627 | ay8910_port0a_w, |
| 628 | | |
| 628 | NULL | |
| 629 | 629 | }; |
| 630 | 630 | |
| 631 | 631 | static const struct TMS5220interface tms5220_interface = |
| r2454 | r2455 | |
| 652 | 652 | MDRV_MACHINE_START(zaccaria) |
| 653 | 653 | MDRV_MACHINE_RESET(zaccaria) |
| 654 | 654 | |
| 655 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 656 | MDRV_DEVICE_CONFIG( ppi8255_intf ) | |
| 657 | ||
| 655 | 658 | /* video hardware */ |
| 656 | 659 | MDRV_SCREEN_ADD("main", RASTER) |
| 657 | 660 | MDRV_SCREEN_REFRESH_RATE(60) |
| r2454 | r2455 | |
|---|---|---|
| 581 | 581 | |
| 582 | 582 | static const struct AY8910interface ay8910_interface = |
| 583 | 583 | { |
| 584 | AY8910_LEGACY_OUTPUT, | |
| 585 | AY8910_DEFAULT_LOADS, | |
| 584 | 586 | keyboard1_r, |
| 585 | 587 | keyboard2_r, |
| 588 | NULL, | |
| 589 | NULL | |
| 586 | 590 | }; |
| 587 | 591 | |
| 588 | 592 | static MACHINE_DRIVER_START( jongkyo ) |
| r2454 | r2455 | |
|---|---|---|
| 1159 | 1159 | { |
| 1160 | 1160 | UINT16 r; |
| 1161 | 1161 | // printf("atapi_command_r: %08X, %08X\n", offset, mem_mask); |
| 1162 | if ( | |
| 1162 | if (ACCESSING_BITS_16_31 | |
| 1163 | 1163 | { |
| 1164 | 1164 | r = atapi_command_reg_r(offset*2); |
| 1165 | 1165 | return ATAPI_ENDIAN(r) << 16; |
| r2454 | r2455 | |
| 1175 | 1175 | { |
| 1176 | 1176 | // printf("atapi_command_w: %08X, %08X, %08X\n", data, offset, mem_mask); |
| 1177 | 1177 | |
| 1178 | if ( | |
| 1178 | if (ACCESSING_BITS_16_31 | |
| 1179 | 1179 | { |
| 1180 | 1180 | atapi_command_reg_w(offset*2, ATAPI_ENDIAN((data >> 16) & 0xffff)); |
| 1181 | 1181 | } |
| r2454 | r2455 | |
| 1191 | 1191 | UINT16 r; |
| 1192 | 1192 | // printf("atapi_control_r: %08X, %08X\n", offset, mem_mask); |
| 1193 | 1193 | |
| 1194 | if ( | |
| 1194 | if (ACCESSING_BITS_16_31 | |
| 1195 | 1195 | { |
| 1196 | 1196 | r = atapi_control_reg_r(offset*2); |
| 1197 | 1197 | return ATAPI_ENDIAN(r) << 16; |
| r2454 | r2455 | |
| 1205 | 1205 | |
| 1206 | 1206 | static WRITE32_HANDLER( atapi_control_w ) |
| 1207 | 1207 | { |
| 1208 | if ( | |
| 1208 | if (ACCESSING_BITS_16_31 | |
| 1209 | 1209 | { |
| 1210 | 1210 | atapi_control_reg_w(offset*2, ATAPI_ENDIAN(data >> 16) & 0xff); |
| 1211 | 1211 | } |
| r2454 | r2455 | |
|---|---|---|
| 132 | 132 | * |
| 133 | 133 | *************************************/ |
| 134 | 134 | |
| 135 | static const ppi8255_interface ppi8255_intf = | |
| 135 | static const ppi8255_interface ppi8255_intf[2] = | |
| 136 | 136 | { |
| 137 | 2, /* 2 chips */ | |
| 138 | { 0, 0 }, /* Port A read */ | |
| 139 | { 0, input_port_r }, /* Port B read */ | |
| 140 | { 0, 0 }, /* Port C read */ | |
| 141 | { 0, input_port_select_w }, /* Port A write */ | |
| 142 | { 0, 0 }, /* Port B write */ | |
| 143 | { 0, 0 /* sound effects */},/* Port C write */ | |
| 137 | { | |
| 138 | NULL, /* Port A read */ | |
| 139 | NULL, /* Port B read */ | |
| 140 | NULL, /* Port C read */ | |
| 141 | NULL, /* Port A write */ | |
| 142 | NULL, /* Port B write */ | |
| 143 | NULL /* Port C write */ | |
| 144 | }, | |
| 145 | { | |
| 146 | NULL, /* Port A read */ | |
| 147 | input_port_r, /* Port B read */ | |
| 148 | NULL, /* Port C read */ | |
| 149 | input_port_select_w, /* Port A write */ | |
| 150 | NULL, /* Port B write */ | |
| 151 | NULL /* sound effects, Port C write */ | |
| 152 | } | |
| 144 | 153 | }; |
| 145 | 154 | |
| 146 | 155 | |
| 147 | 156 | static MACHINE_START( clayshoo ) |
| 148 | 157 | { |
| 149 | ppi8255_init(&ppi8255_intf); | |
| 150 | ||
| 151 | 158 | create_analog_timers(); |
| 152 | 159 | |
| 153 | 160 | /* register for state saving */ |
| r2454 | r2455 | |
| 216 | 223 | static ADDRESS_MAP_START( main_io_map, ADDRESS_SPACE_IO, 8 ) |
| 217 | 224 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 218 | 225 | AM_RANGE(0x00, 0x00) AM_WRITE(watchdog_reset_w) |
| 219 | AM_RANGE(0x20, 0x23) AM_READWRITE(ppi8255_0_r, ppi8255_0_w) | |
| 220 | AM_RANGE(0x30, 0x33) AM_READWRITE(ppi8255_1_r, ppi8255_1_w) | |
| 226 | AM_RANGE(0x20, 0x23) AM_DEVREADWRITE(PPI8255, "ppi8255_0", ppi8255_r, ppi8255_w) | |
| 227 | AM_RANGE(0x30, 0x33) AM_DEVREADWRITE(PPI8255, "ppi8255_1", ppi8255_r, ppi8255_w) | |
| 221 | 228 | ADDRESS_MAP_END |
| 222 | 229 | |
| 223 | 230 | |
| r2454 | r2455 | |
| 313 | 320 | MDRV_SCREEN_REFRESH_RATE(60) |
| 314 | 321 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) |
| 315 | 322 | |
| 323 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 324 | MDRV_DEVICE_CONFIG( ppi8255_intf[0] ) | |
| 325 | ||
| 326 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 327 | MDRV_DEVICE_CONFIG( ppi8255_intf[1] ) | |
| 316 | 328 | MACHINE_DRIVER_END |
| 317 | 329 | |
| 318 | 330 |
| r2454 | r2455 | |
|---|---|---|
| 168 | 168 | sound_nmi_enable = 1; |
| 169 | 169 | if (pending_nmi) |
| 170 | 170 | { |
| 171 | cpunum_set_input_line( | |
| 171 | cpunum_set_input_line(machine, 2,INPUT_LINE_NMI,PULSE_LINE); | |
| 172 | 172 | pending_nmi = 0; |
| 173 | 173 | } |
| 174 | 174 | } |
| r2454 | r2455 | |
|---|---|---|
| 396 | 396 | |
| 397 | 397 | static const struct AY8910interface ay8910_interface = |
| 398 | 398 | { |
| 399 | AY8910_LEGACY_OUTPUT, | |
| 400 | AY8910_DEFAULT_LOADS, | |
| 399 | 401 | input_port_0_r, |
| 400 | 402 | input_port_1_r, |
| 403 | NULL, | |
| 404 | NULL | |
| 401 | 405 | }; |
| 402 | 406 | |
| 403 | 407 | static const struct TMS5110interface tms5110_interface = |
| r2454 | r2455 | |
|---|---|---|
| 603 | 603 | static WRITE32_HANDLER( s23_mcuen_w ) |
| 604 | 604 | { |
| 605 | 605 | mame_printf_debug("mcuen_w: mask %08x, data %08x\n", mem_mask, data); |
| 606 | if (mem_mask == 0x | |
| 606 | if (mem_mask == 0x | |
| 607 | 607 | { |
| 608 | 608 | if (data) |
| 609 | 609 | { |
| r2454 | r2455 | |
|---|---|---|
| 124 | 124 | |
| 125 | 125 | |
| 126 | 126 | #include "driver.h" |
| 127 | #include "deprecat.h" | |
| 128 | 127 | #include "cpu/t11/t11.h" |
| 129 | 128 | #include "machine/atarigen.h" |
| 130 | 129 | #include "slapstic.h" |
| r2454 | r2455 | |
| 361 | 360 | |
| 362 | 361 | static STATE_POSTLOAD( bankselect_postload ) |
| 363 | 362 | { |
| 364 | bankselect_w(Machine, 0, bankselect[0], 0); | |
| 365 | bankselect_w(Machine, 1, bankselect[1], 0); | |
| 363 | bankselect_w(machine, 0, bankselect[0], 0xffff); | |
| 364 | bankselect_w(machine, 1, bankselect[1], 0xffff); | |
| 366 | 365 | } |
| 367 | 366 | |
| 368 | 367 | |
| r2454 | r2455 | |
| 375 | 374 | |
| 376 | 375 | static READ16_HANDLER( switch_r ) |
| 377 | 376 | { |
| 378 | int result = input_port_ | |
| 377 | int result = input_port_ | |
| 379 | 378 | |
| 380 | 379 | if (atarigen_cpu_to_sound_ready) result ^= 0x20; |
| 381 | 380 | if (atarigen_sound_to_cpu_ready) result ^= 0x10; |
| r2454 | r2455 | |
| 386 | 385 | |
| 387 | 386 | static READ8_HANDLER( switch_6502_r ) |
| 388 | 387 | { |
| 389 | int result = input_port_ | |
| 388 | int result = input_port_ | |
| 390 | 389 | |
| 391 | 390 | if (atarigen_cpu_to_sound_ready) result ^= 0x01; |
| 392 | 391 | if (atarigen_sound_to_cpu_ready) result ^= 0x02; |
| 393 | 392 | if (!has_tms5220 || tms5220_ready_r()) result ^= 0x04; |
| 394 | if (!(input_port_ | |
| 393 | if (!(input_port_ | |
| 395 | 394 | |
| 396 | 395 | return result; |
| 397 | 396 | } |
| r2454 | r2455 | |
| 591 | 590 | if (!(data & 0x02)) rbott += 1.0/47; |
| 592 | 591 | if (!(data & 0x04)) rbott += 1.0/22; |
| 593 | 592 | gain = (rbott == 0) ? 1.0 : ((1.0/rbott) / (rtop + (1.0/rbott))); |
| 594 | atarigen_set_ym2151_vol( | |
| 593 | atarigen_set_ym2151_vol(machine, gain * 100); | |
| 595 | 594 | |
| 596 | 595 | /* bits 3-4 control the volume of the POKEYs, using 47k and 100k resistors */ |
| 597 | 596 | rtop = 1.0/(1.0/100 + 1.0/100); |
| r2454 | r2455 | |
| 599 | 598 | if (!(data & 0x08)) rbott += 1.0/47; |
| 600 | 599 | if (!(data & 0x10)) rbott += 1.0/22; |
| 601 | 600 | gain = (rbott == 0) ? 1.0 : ((1.0/rbott) / (rtop + (1.0/rbott))); |
| 602 | atarigen_set_pokey_vol( | |
| 601 | atarigen_set_pokey_vol(machine, gain * 100); | |
| 603 | 602 | |
| 604 | 603 | /* bits 5-7 control the volume of the TMS5220, using 22k, 47k, and 100k resistors */ |
| 605 | 604 | rtop = 1.0/(1.0/100 + 1.0/100); |
| r2454 | r2455 | |
| 608 | 607 | if (!(data & 0x40)) rbott += 1.0/47; |
| 609 | 608 | if (!(data & 0x80)) rbott += 1.0/22; |
| 610 | 609 | gain = (rbott == 0) ? 1.0 : ((1.0/rbott) / (rtop + (1.0/rbott))); |
| 611 | atarigen_set_tms5220_vol( | |
| 610 | atarigen_set_tms5220_vol(machine, gain * 100); | |
| 612 | 611 | } |
| 613 | 612 | |
| 614 | 613 | |
| r2454 | r2455 | |
| 639 | 638 | atarigen_update_interrupts(machine); |
| 640 | 639 | |
| 641 | 640 | /* handle it normally otherwise */ |
| 642 | return atarigen_sound_r(machine,offset,0); | |
| 641 | return atarigen_sound_r(machine,offset,0xffff); | |
| 643 | 642 | } |
| 644 | 643 | |
| 645 | 644 |
| r2454 | r2455 | |
|---|---|---|
| 299 | 299 | |
| 300 | 300 | static const struct AY8910interface ay8910_interface = |
| 301 | 301 | { |
| 302 | AY8910_LEGACY_OUTPUT, | |
| 303 | AY8910_DEFAULT_LOADS, | |
| 302 | 304 | input_port_0_r, |
| 303 | input_port_1_r | |
| 305 | input_port_1_r, | |
| 306 | NULL, | |
| 307 | NULL | |
| 304 | 308 | }; |
| 305 | 309 | |
| 306 | 310 | static MACHINE_DRIVER_START( mjsister ) |
| r2454 | r2455 | |
|---|---|---|
| 191 | 191 | static WRITE8_HANDLER( ninjakd2_soundreset_w ) |
| 192 | 192 | { |
| 193 | 193 | // bit 4 resets sound CPU |
| 194 | cpunum_set_input_line( | |
| 194 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, (data & 0x10) ? ASSERT_LINE : CLEAR_LINE); | |
| 195 | 195 | |
| 196 | 196 | // bit 7 flips screen |
| 197 | 197 | flip_screen_set(data & 0x80); |
| r2454 | r2455 | |
| 904 | 904 | |
| 905 | 905 | static const struct YM2203interface ym2203_interface = |
| 906 | 906 | { |
| 907 | 0, 0, 0, 0, | |
| 907 | { | |
| 908 | AY8910_LEGACY_OUTPUT, | |
| 909 | AY8910_DEFAULT_LOADS, | |
| 910 | NULL, NULL, NULL, NULL | |
| 911 | }, | |
| 908 | 912 | irqhandler |
| 909 | 913 | }; |
| 910 | 914 |
| r2454 | r2455 | |
|---|---|---|
| 127 | 127 | ***************************************************************************/ |
| 128 | 128 | |
| 129 | 129 | #include "driver.h" |
| 130 | #include "deprecat.h" | |
| 131 | 130 | #include "sound/custom.h" |
| 132 | 131 | #include "warpwarp.h" |
| 133 | 132 | #include "geebee.lh" |
| r2454 | r2455 | |
| 289 | 288 | warpwarp_ball_on = data & 1; |
| 290 | 289 | cpu_interrupt_enable(0,data & 1); |
| 291 | 290 | if (~data & 1) |
| 292 | cpunum_set_input_line( | |
| 291 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 293 | 292 | break; |
| 294 | 293 | case 7: |
| 295 | 294 | flip_screen_set(data & 1); |
| r2454 | r2455 | |
|---|---|---|
| 38 | 38 | { |
| 39 | 39 | switch (offset<<1) { |
| 40 | 40 | case 0: /* DMA flag */ |
| 41 | buffer_spriteram16_w(machine,0,0,0); | |
| 41 | buffer_spriteram16_w(machine,0,0,0xffff); | |
| 42 | 42 | return; |
| 43 | 43 | |
| 44 | 44 | case 6: /* IRQ ack */ |
| r2454 | r2455 | |
|---|---|---|
| 50 | 50 | *********************************************************************************************************************/ |
| 51 | 51 | |
| 52 | 52 | #include "driver.h" |
| 53 | #include "deprecat.h" | |
| 54 | 53 | #include "sound/ay8910.h" |
| 55 | 54 | #include "sound/okim6295.h" |
| 56 | 55 | #include "sound/2413intf.h" |
| r2454 | r2455 | |
| 310 | 309 | { |
| 311 | 310 | dunhuang_paldata[dunhuang_paloffs] = data; |
| 312 | 311 | |
| 313 | palette_set_color_rgb( | |
| 312 | palette_set_color_rgb( machine, dunhuang_paloffs/3, | |
| 314 | 313 | pal6bit(dunhuang_paldata[(dunhuang_paloffs/3)*3+0]), |
| 315 | 314 | pal6bit(dunhuang_paldata[(dunhuang_paloffs/3)*3+1]), |
| 316 | 315 | pal6bit(dunhuang_paldata[(dunhuang_paloffs/3)*3+2]) |
| r2454 | r2455 | |
| 666 | 665 | |
| 667 | 666 | static const struct AY8910interface dunhuang_ay8910_interface = |
| 668 | 667 | { |
| 669 | // A B | |
| 670 | 0, dunhuang_dsw_r, // R | |
| 671 | dunhuang_input_w, 0 // W | |
| 668 | AY8910_LEGACY_OUTPUT, | |
| 669 | AY8910_DEFAULT_LOADS, | |
| 670 | // A B | |
| 671 | NULL, dunhuang_dsw_r, // R | |
| 672 | dunhuang_input_w, NULL // W | |
| 672 | 673 | }; |
| 673 | 674 | |
| 674 | 675 | static MACHINE_DRIVER_START( dunhuang ) |
| r2454 | r2455 | |
|---|---|---|
| 494 | 494 | ROM_LOAD( "14.84490.1l", 0x18000, 0x4000, CRC(7780a925) SHA1(3f129ca6d695548b659955fe538584bd9ac2ff17) ) /* sprites 2 Plane 3-4 */ |
| 495 | 495 | ROM_END |
| 496 | 496 | |
| 497 | ROM_START( gngblita ) | |
| 498 | ROM_REGION( 0x18000, REGION_CPU1, 0 ) | |
| 499 | ROM_LOAD( "3", 0x04000, 0x4000, CRC(4859d068) SHA1(8b22772ea383ecaee01da696c0c7b568ab1e4615) ) | |
| 500 | ROM_LOAD( "4-5", 0x08000, 0x8000, CRC(233a4589) SHA1(c95c4dcbf53fac5a0c11466bc27369bf8328bd01) ) | |
| 501 | ROM_LOAD( "1-2", 0x10000, 0x8000, CRC(ed28e86e) SHA1(064871918547a56be330c6994d4db2c9932e14db) ) | |
| 497 | 502 | |
| 503 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) | |
| 504 | ROM_LOAD( "gg2.bin", 0x0000, 0x8000, CRC(615f5b6f) SHA1(7ef9ec5c2072e21c787a6bbf700033f50c759c1d) ) | |
| 505 | ||
| 506 | ROM_REGION( 0x04000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 507 | ROM_LOAD( "gg1.bin", 0x00000, 0x4000, CRC(ecfccf07) SHA1(0a1518e19a2e0a4cc3dde4b9568202ea911b5ece) ) /* characters */ | |
| 508 | ||
| 509 | ROM_REGION( 0x18000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 510 | ROM_LOAD( "gg11.bin", 0x00000, 0x4000, CRC(ddd56fa9) SHA1(f9d77eee5e2738b7e83ba02fcc55dd480391479f) ) /* tiles 0-1 Plane 1*/ | |
| 511 | ROM_LOAD( "gg10.bin", 0x04000, 0x4000, CRC(7302529d) SHA1(8434c994cc55d2586641f3b90b6b15fd65dfb67c) ) /* tiles 2-3 Plane 1*/ | |
| 512 | ROM_LOAD( "gg9.bin", 0x08000, 0x4000, CRC(20035bda) SHA1(bbb1fba0eb19471f66d29526fa8423ccb047bd63) ) /* tiles 0-1 Plane 2*/ | |
| 513 | ROM_LOAD( "gg8.bin", 0x0c000, 0x4000, CRC(f12ba271) SHA1(1c42fa02cb27b35d10c3f7f036005e747f9f6b79) ) /* tiles 2-3 Plane 2*/ | |
| 514 | ROM_LOAD( "gg7.bin", 0x10000, 0x4000, CRC(e525207d) SHA1(1947f159189b3a53f1251d8653b6e7c65c91fc3c) ) /* tiles 0-1 Plane 3*/ | |
| 515 | ROM_LOAD( "gg6.bin", 0x14000, 0x4000, CRC(2d77e9b2) SHA1(944da1ce29a18bf0fc8deff78bceacba0bf23a07) ) /* tiles 2-3 Plane 3*/ | |
| 516 | ||
| 517 | ROM_REGION( 0x20000, REGION_GFX3, ROMREGION_DISPOSE | ROMREGION_ERASEFF ) | |
| 518 | ROM_LOAD( "gg17.bin", 0x00000, 0x4000, CRC(93e50a8f) SHA1(42d367f57bb2fdf60a0445ac1533da99cfeaa617) ) /* sprites 0 Plane 1-2 */ | |
| 519 | ROM_LOAD( "gg16.bin", 0x04000, 0x4000, CRC(06d7e5ca) SHA1(9e06012bcd82f98fad43de666ef9a75979d940ab) ) /* sprites 1 Plane 1-2 */ | |
| 520 | ROM_LOAD( "gg15.bin", 0x08000, 0x4000, CRC(bc1fe02d) SHA1(e3a1421d465b87148ffa94f5673b2307f0246afe) ) /* sprites 2 Plane 1-2 */ | |
| 521 | ROM_LOAD( "gg14.bin", 0x10000, 0x4000, CRC(6aaf12f9) SHA1(207a7407288182a4f3eddaea634c6a6452131182) ) /* sprites 0 Plane 3-4 */ | |
| 522 | ROM_LOAD( "gg13.bin", 0x14000, 0x4000, CRC(e80c3fca) SHA1(cb641c25bb04b970b2cbeca41adb792bbe142fb5) ) /* sprites 1 Plane 3-4 */ | |
| 523 | ROM_LOAD( "gg12.bin", 0x18000, 0x4000, CRC(7780a925) SHA1(3f129ca6d695548b659955fe538584bd9ac2ff17) ) /* sprites 2 Plane 3-4 */ | |
| 524 | ||
| 525 | ROM_REGION( 0x0200, REGION_PROMS, 0 ) | |
| 526 | ROM_LOAD( "tbp24s10.14k", 0x0000, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) ) /* video timing (not used) */ | |
| 527 | ROM_LOAD( "63s141.2e", 0x0100, 0x0100, CRC(4a1285a4) SHA1(5018c3950b675af58db499e2883ecbc55419b491) ) /* priority (not used) */ | |
| 528 | ||
| 529 | ROM_REGION( 0x0100, REGION_PLDS, ROMREGION_DISPOSE ) | |
| 530 | ROM_LOAD( "gg-pal10l8.bin", 0x0000, 0x002c, CRC(87f1b7e0) SHA1(b719c3be7bd4a02660bb0887f752e9769cbd37d2) ) | |
| 531 | ROM_END | |
| 532 | ||
| 498 | 533 | ROM_START( gngt ) |
| 499 | 534 | ROM_REGION( 0x18000, REGION_CPU1, 0 ) |
| 500 | 535 | ROM_LOAD( "mm04", 0x04000, 0x4000, CRC(652406f6) SHA1(3b2bafd31f670ea26c568c48f3bd00597e5a2ed6) ) /* 4000-5fff is page 4 */ |
| r2454 | r2455 | |
| 674 | 709 | GAME( 1985, gng, 0, gng, gng, 0, ROT0, "Capcom", "Ghosts'n Goblins (World? set 1)", GAME_SUPPORTS_SAVE ) |
| 675 | 710 | GAME( 1985, gnga, gng, gng, gng, 0, ROT0, "Capcom", "Ghosts'n Goblins (World? set 2)", GAME_SUPPORTS_SAVE ) |
| 676 | 711 | GAME( 1985, gngbl, gng, gng, gng, 0, ROT0, "Capcom", "Ghosts'n Goblins (bootleg with Cross)", GAME_SUPPORTS_SAVE ) |
| 712 | GAME( 1985, gngblita, gng, gng, gng, 0, ROT0, "Capcom", "Ghosts'n Goblins (Italian bootleg, harder)", GAME_SUPPORTS_SAVE ) | |
| 677 | 713 | GAME( 1985, gngt, gng, gng, gng, 0, ROT0, "Capcom (Taito America license)", "Ghosts'n Goblins (US)", GAME_SUPPORTS_SAVE ) |
| 678 | 714 | GAME( 1985, makaimur, gng, gng, makaimur, 0, ROT0, "Capcom", "Makai-Mura (Japan)", GAME_SUPPORTS_SAVE ) |
| 679 | 715 | GAME( 1985, makaimuc, gng, gng, makaimur, 0, ROT0, "Capcom", "Makai-Mura (Japan Revision C)", GAME_SUPPORTS_SAVE ) |
| r2454 | r2455 | |
|---|---|---|
| 927 | 927 | |
| 928 | 928 | static const struct AY8910interface ojankohs_ay8910_interface = |
| 929 | 929 | { |
| 930 | AY8910_LEGACY_OUTPUT, | |
| 931 | AY8910_DEFAULT_LOADS, | |
| 930 | 932 | ojankohs_ay8910_0_r, /* read port #0 */ |
| 931 | 933 | ojankohs_ay8910_1_r /* read port #1 */ |
| 932 | 934 | }; |
| 933 | 935 | |
| 934 | 936 | static const struct AY8910interface ojankoy_ay8910_interface = |
| 935 | 937 | { |
| 938 | AY8910_LEGACY_OUTPUT, | |
| 939 | AY8910_DEFAULT_LOADS, | |
| 936 | 940 | ojankoy_ay8910_0_r, /* read port #0 */ |
| 937 | 941 | ojankoy_ay8910_1_r, /* read port #1 */ |
| 938 | 942 | }; |
| 939 | 943 | |
| 940 | 944 | static const struct AY8910interface ojankoc_ay8910_interface = |
| 941 | 945 | { |
| 946 | AY8910_LEGACY_OUTPUT, | |
| 947 | AY8910_DEFAULT_LOADS, | |
| 942 | 948 | input_port_0_r, /* read port #0 */ |
| 943 | 949 | input_port_1_r /* read port #1 */ |
| 944 | 950 | }; |
| r2454 | r2455 | |
|---|---|---|
| 3015 | 3015 | |
| 3016 | 3016 | static const struct AY8910interface ay8910_interface = |
| 3017 | 3017 | { |
| 3018 | AY8910_LEGACY_OUTPUT, | |
| 3019 | AY8910_DEFAULT_LOADS, | |
| 3018 | 3020 | input_port_0_r, // DIPSW-A read |
| 3019 | input_port_1_r // DIPSW-B read | |
| 3021 | input_port_1_r, // DIPSW-B read | |
| 3022 | NULL, | |
| 3023 | NULL | |
| 3020 | 3024 | }; |
| 3021 | 3025 | |
| 3022 | 3026 |
| r2454 | r2455 | |
|---|---|---|
| 355 | 355 | |
| 356 | 356 | static const struct YM2203interface ym2203_interface = |
| 357 | 357 | { |
| 358 | 0,0,0,0,irqhandler | |
| 358 | { | |
| 359 | AY8910_LEGACY_OUTPUT, | |
| 360 | AY8910_DEFAULT_LOADS, | |
| 361 | NULL, NULL, NULL, NULL | |
| 362 | }, | |
| 363 | irqhandler | |
| 359 | 364 | }; |
| 360 | 365 | |
| 361 | 366 | static void adpcm_int(int data) |
| r2454 | r2455 | |
|---|---|---|
| 26 | 26 | ***************************************************************************/ |
| 27 | 27 | |
| 28 | 28 | #include "driver.h" |
| 29 | #include "deprecat.h" | |
| 30 | 29 | #include "cpu/m6800/m6800.h" |
| 31 | 30 | #include "sound/ay8910.h" |
| 32 | 31 | #include "sound/sn76496.h" |
| r2454 | r2455 | |
| 112 | 111 | |
| 113 | 112 | static WRITE8_HANDLER( sound_irq_ack_w ) |
| 114 | 113 | { |
| 115 | cpunum_set_input_line( | |
| 114 | cpunum_set_input_line(machine, 1, 0, CLEAR_LINE); | |
| 116 | 115 | } |
| 117 | 116 | |
| 118 | 117 | static WRITE8_HANDLER(unused_w) |
| r2454 | r2455 | |
| 247 | 246 | |
| 248 | 247 | static const struct AY8910interface ay8910_interface = |
| 249 | 248 | { |
| 249 | AY8910_LEGACY_OUTPUT, | |
| 250 | AY8910_DEFAULT_LOADS, | |
| 250 | 251 | soundlatch_r, |
| 251 | 0, | |
| 252 | 0, | |
| 252 | NULL, | |
| 253 | NULL, | |
| 253 | 254 | unused_w |
| 254 | 255 | }; |
| 255 | 256 | |
| 256 | 257 | static INTERRUPT_GEN (sound_nmi) |
| 257 | 258 | { |
| 258 | cpunum_set_input_line( | |
| 259 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, PULSE_LINE); | |
| 259 | 260 | } |
| 260 | 261 | |
| 261 | 262 | static MACHINE_DRIVER_START( kncljoe ) |
| r2454 | r2455 | |
|---|---|---|
| 282 | 282 | |
| 283 | 283 | static const struct AY8910interface ay8910_interface_1 = |
| 284 | 284 | { |
| 285 | AY8910_LEGACY_OUTPUT, | |
| 286 | AY8910_DEFAULT_LOADS, | |
| 285 | 287 | input_port_0_r, |
| 286 | input_port_1_r | |
| 288 | input_port_1_r, | |
| 289 | NULL, | |
| 290 | NULL | |
| 287 | 291 | }; |
| 288 | 292 | |
| 289 | 293 | static const struct AY8910interface ay8910_interface_2 = |
| 290 | 294 | { |
| 295 | AY8910_LEGACY_OUTPUT, | |
| 296 | AY8910_DEFAULT_LOADS, | |
| 291 | 297 | input_port_2_r, |
| 292 | input_port_3_r | |
| 298 | input_port_3_r, | |
| 299 | NULL, | |
| 300 | NULL | |
| 293 | 301 | }; |
| 294 | 302 | |
| 295 | 303 |
| r2454 | r2455 | |
|---|---|---|
| 279 | 279 | /* the lower 4 (or 3?) bits select the port to read */ |
| 280 | 280 | switch (offset & 0x0f) /* might be 0x07 */ |
| 281 | 281 | { |
| 282 | case 0x00: ret = input_port_0_r(machine, 0); break; | |
| 283 | case 0x02: ret = input_port_1_r(machine, 0); break; | |
| 284 | case 0x03: ret = input_port_2_r(machine, 0); break; | |
| 285 | case 0x04: ret = input_port_3_r(machine, 0); break; | |
| 286 | case 0x06: ret = input_port_4_r(machine, 0); break; | |
| 287 | case 0x07: ret = input_port_5_r(machine, 0); break; | |
| 282 | case 0x00: ret = input_port_read_indexed(machine, 0); break; | |
| 283 | case 0x02: ret = input_port_read_indexed(machine, 1); break; | |
| 284 | case 0x03: ret = input_port_read_indexed(machine, 2); break; | |
| 285 | case 0x04: ret = input_port_read_indexed(machine, 3); break; | |
| 286 | case 0x06: ret = input_port_read_indexed(machine, 4); break; | |
| 287 | case 0x07: ret = input_port_read_indexed(machine, 5); break; | |
| 288 | 288 | default: logerror("%04x : CVS: Reading unmapped input port 0x%02x\n", activecpu_get_pc(), offset & 0x0f); break; |
| 289 | 289 | } |
| 290 | 290 |
| r2454 | r2455 | |
|---|---|---|
| 267 | 267 | } |
| 268 | 268 | |
| 269 | 269 | |
| 270 | static const ppi8255_interface turbo_8255_intf[4] = | |
| 271 | { | |
| 272 | { | |
| 273 | NULL, | |
| 274 | NULL, | |
| 275 | NULL, | |
| 276 | turbo_ppi0a_w, | |
| 277 | turbo_ppi0b_w, | |
| 278 | turbo_ppi0c_w | |
| 279 | }, | |
| 280 | { | |
| 281 | NULL, | |
| 282 | NULL, | |
| 283 | NULL, | |
| 284 | turbo_ppi1a_w, | |
| 285 | turbo_ppi1b_w, | |
| 286 | turbo_ppi1c_w | |
| 287 | }, | |
| 288 | { | |
| 289 | NULL, | |
| 290 | NULL, | |
| 291 | NULL, | |
| 292 | turbo_sound_a_w, | |
| 293 | turbo_sound_b_w, | |
| 294 | turbo_sound_c_w | |
| 295 | }, | |
| 296 | { | |
| 297 | turbo_analog_r, | |
| 298 | input_port_2_r, | |
| 299 | NULL, | |
| 300 | NULL, | |
| 301 | NULL, | |
| 302 | turbo_ppi3c_w | |
| 303 | } | |
| 304 | }; | |
| 270 | 305 | |
| 306 | ||
| 307 | ||
| 271 | 308 | /************************************* |
| 272 | 309 | * |
| 273 | 310 | * Subroc 3D PPI handling |
| r2454 | r2455 | |
| 312 | 349 | } |
| 313 | 350 | |
| 314 | 351 | |
| 352 | static const ppi8255_interface subroc3d_8255_intf[2] = | |
| 353 | { | |
| 354 | { | |
| 355 | NULL, | |
| 356 | NULL, | |
| 357 | NULL, | |
| 358 | subroc3d_ppi0a_w, | |
| 359 | subroc3d_ppi0b_w, | |
| 360 | subroc3d_ppi0c_w | |
| 361 | }, | |
| 362 | { | |
| 363 | NULL, | |
| 364 | NULL, | |
| 365 | NULL, | |
| 366 | subroc3d_sound_a_w, | |
| 367 | subroc3d_sound_b_w, | |
| 368 | subroc3d_sound_c_w | |
| 369 | } | |
| 370 | }; | |
| 315 | 371 | |
| 372 | ||
| 373 | ||
| 316 | 374 | /************************************* |
| 317 | 375 | * |
| 318 | 376 | * Buck Rogers PPI handling |
| r2454 | r2455 | |
| 364 | 422 | } |
| 365 | 423 | |
| 366 | 424 | |
| 425 | static const ppi8255_interface buckrog_8255_intf[2] = | |
| 426 | { | |
| 427 | { | |
| 428 | NULL, | |
| 429 | NULL, | |
| 430 | NULL, | |
| 431 | buckrog_ppi0a_w, | |
| 432 | buckrog_ppi0b_w, | |
| 433 | buckrog_ppi0c_w | |
| 434 | }, | |
| 435 | { | |
| 436 | NULL, | |
| 437 | NULL, | |
| 438 | NULL, | |
| 439 | buckrog_sound_a_w, | |
| 440 | buckrog_sound_b_w, | |
| 441 | buckrog_ppi1c_w | |
| 442 | } | |
| 443 | }; | |
| 367 | 444 | |
| 445 | ||
| 446 | ||
| 447 | ||
| 368 | 448 | /************************************* |
| 369 | 449 | * |
| 370 | 450 | * 8279 display/keyboard driver |
| r2454 | r2455 | |
| 599 | 679 | { |
| 600 | 680 | /* assert ACK */ |
| 601 | 681 | turbo_state *state = machine->driver_data; |
| 602 | ppi8255_set_portC(0, 0x00); | |
| 682 | ppi8255_set_portC(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_0" ), 0x00); | |
| 603 | 683 | return state->buckrog_command; |
| 604 | 684 | } |
| 605 | 685 | |
| r2454 | r2455 | |
| 638 | 718 | |
| 639 | 719 | static TIMER_CALLBACK( delayed_ppi8255_w ) |
| 640 | 720 | { |
| 641 | ppi8255_ | |
| 721 | ppi8255_ | |
| 642 | 722 | } |
| 643 | 723 | |
| 644 | 724 | |
| 645 | static WRITE8_HANDLER( buckrog_ppi8255_0_w ) | |
| 725 | static WRITE8_DEVICE_HANDLER( buckrog_ppi8255_0_w ) | |
| 646 | 726 | { |
| 647 | 727 | /* the port C handshaking signals control the sub CPU IRQ, */ |
| 648 | 728 | /* so we have to sync whenever we access this PPI */ |
| r2454 | r2455 | |
| 666 | 746 | AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(turbo_videoram_w) AM_BASE_MEMBER(turbo_state, videoram) |
| 667 | 747 | AM_RANGE(0xe800, 0xefff) AM_WRITE(turbo_collision_clear_w) |
| 668 | 748 | AM_RANGE(0xf000, 0xf7ff) AM_RAM |
| 669 | AM_RANGE(0xf800, 0xf803) AM_MIRROR(0x00fc) AM_READWRITE(ppi8255_0_r, ppi8255_0_w) | |
| 670 | AM_RANGE(0xf900, 0xf903) AM_MIRROR(0x00fc) AM_READWRITE(ppi8255_1_r, ppi8255_1_w) | |
| 671 | AM_RANGE(0xfa00, 0xfa03) AM_MIRROR(0x00fc) AM_READWRITE(ppi8255_2_r, ppi8255_2_w) | |
| 672 | AM_RANGE(0xfb00, 0xfb03) AM_MIRROR(0x00fc) AM_READWRITE(ppi8255_3_r, ppi8255_3_w) | |
| 749 | AM_RANGE(0xf800, 0xf803) AM_MIRROR(0x00fc) AM_DEVREADWRITE(PPI8255, "ppi8255_0", ppi8255_r, ppi8255_w) | |
| 750 | AM_RANGE(0xf900, 0xf903) AM_MIRROR(0x00fc) AM_DEVREADWRITE(PPI8255, "ppi8255_1", ppi8255_r, ppi8255_w) | |
| 751 | AM_RANGE(0xfa00, 0xfa03) AM_MIRROR(0x00fc) AM_DEVREADWRITE(PPI8255, "ppi8255_2", ppi8255_r, ppi8255_w) | |
| 752 | AM_RANGE(0xfb00, 0xfb03) AM_MIRROR(0x00fc) AM_DEVREADWRITE(PPI8255, "ppi8255_3", ppi8255_r, ppi8255_w) | |
| 673 | 753 | AM_RANGE(0xfc00, 0xfc01) AM_MIRROR(0x00fe) AM_READWRITE(turbo_8279_r, turbo_8279_w) |
| 674 | 754 | AM_RANGE(0xfd00, 0xfdff) AM_READ(input_port_0_r) |
| 675 | 755 | AM_RANGE(0xfe00, 0xfeff) AM_READ(turbo_collision_r) |
| r2454 | r2455 | |
| 694 | 774 | AM_RANGE(0xb000, 0xb7ff) AM_RAM // SCRATCH |
| 695 | 775 | AM_RANGE(0xb800, 0xbfff) // HANDLE CL |
| 696 | 776 | AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(turbo_videoram_w) AM_BASE_MEMBER(turbo_state, videoram) // FIX PAGE |
| 697 | AM_RANGE(0xe800, 0xe803) AM_MIRROR(0x07fc) AM_READWRITE(ppi8255_0_r, ppi8255_0_w) | |
| 698 | AM_RANGE(0xf000, 0xf003) AM_MIRROR(0x07fc) AM_READWRITE(ppi8255_1_r, ppi8255_1_w) | |
| 777 | AM_RANGE(0xe800, 0xe803) AM_MIRROR(0x07fc) AM_DEVREADWRITE(PPI8255, "ppi8255_0", ppi8255_r, ppi8255_w) | |
| 778 | AM_RANGE(0xf000, 0xf003) AM_MIRROR(0x07fc) AM_DEVREADWRITE(PPI8255, "ppi8255_1", ppi8255_r, ppi8255_w) | |
| 699 | 779 | AM_RANGE(0xf800, 0xf801) AM_MIRROR(0x07fe) AM_READWRITE(turbo_8279_r, turbo_8279_w) |
| 700 | 780 | ADDRESS_MAP_END |
| 701 | 781 | |
| r2454 | r2455 | |
| 711 | 791 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 712 | 792 | AM_RANGE(0x8000, 0xbfff) AM_ROM |
| 713 | 793 | AM_RANGE(0xc000, 0xc7ff) AM_RAM_WRITE(turbo_videoram_w) AM_BASE_MEMBER(turbo_state, videoram) // FIX PAGE |
| 714 | AM_RANGE(0xc800, 0xc803) AM_MIRROR(0x07fc) AM_READWRITE(ppi8255_0_r, buckrog_ppi8255_0_w) // 8255 | |
| 715 | AM_RANGE(0xd000, 0xd003) AM_MIRROR(0x07fc) AM_READWRITE(ppi8255_1_r, ppi8255_1_w) // 8255 | |
| 794 | AM_RANGE(0xc800, 0xc803) AM_MIRROR(0x07fc) AM_DEVREADWRITE(PPI8255, "ppi8255_0", ppi8255_r, buckrog_ppi8255_0_w) // 8255 | |
| 795 | AM_RANGE(0xd000, 0xd003) AM_MIRROR(0x07fc) AM_DEVREADWRITE(PPI8255, "ppi8255_1", ppi8255_r, ppi8255_w) // 8255 | |
| 716 | 796 | AM_RANGE(0xd800, 0xd801) AM_MIRROR(0x07fe) AM_READWRITE(turbo_8279_r, turbo_8279_w) // 8279 |
| 717 | 797 | AM_RANGE(0xe000, 0xe3ff) AM_RAM AM_BASE_MEMBER(turbo_state, sprite_position) // CONT RAM |
| 718 | 798 | AM_RANGE(0xe400, 0xe7ff) AM_RAM AM_BASE_MEMBER(turbo_state, spriteram) // CONT RAM |
| r2454 | r2455 | |
| 1002 | 1082 | MDRV_CPU_PROGRAM_MAP(turbo_map,0) |
| 1003 | 1083 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 1004 | 1084 | |
| 1085 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 1086 | MDRV_DEVICE_CONFIG( turbo_8255_intf[0] ) | |
| 1087 | ||
| 1088 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 1089 | MDRV_DEVICE_CONFIG( turbo_8255_intf[1] ) | |
| 1090 | ||
| 1091 | MDRV_DEVICE_ADD( "ppi8255_2", PPI8255 ) | |
| 1092 | MDRV_DEVICE_CONFIG( turbo_8255_intf[2] ) | |
| 1093 | ||
| 1094 | MDRV_DEVICE_ADD( "ppi8255_3", PPI8255 ) | |
| 1095 | MDRV_DEVICE_CONFIG( turbo_8255_intf[3] ) | |
| 1096 | ||
| 1005 | 1097 | /* video hardware */ |
| 1006 | 1098 | MDRV_VIDEO_ATTRIBUTES(VIDEO_ALWAYS_UPDATE) |
| 1007 | 1099 | MDRV_GFXDECODE(turbo) |
| r2454 | r2455 | |
| 1028 | 1120 | MDRV_CPU_PROGRAM_MAP(subroc3d_map,0) |
| 1029 | 1121 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 1030 | 1122 | |
| 1123 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 1124 | MDRV_DEVICE_CONFIG( subroc3d_8255_intf[0] ) | |
| 1125 | ||
| 1126 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 1127 | MDRV_DEVICE_CONFIG( subroc3d_8255_intf[1] ) | |
| 1128 | ||
| 1031 | 1129 | /* video hardware */ |
| 1032 | 1130 | MDRV_GFXDECODE(turbo) |
| 1033 | 1131 | MDRV_PALETTE_LENGTH(256) |
| r2454 | r2455 | |
| 1060 | 1158 | MDRV_INTERLEAVE(10) |
| 1061 | 1159 | MDRV_MACHINE_RESET(buckrog) |
| 1062 | 1160 | |
| 1161 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 1162 | MDRV_DEVICE_CONFIG( buckrog_8255_intf[0] ) | |
| 1163 | ||
| 1164 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 1165 | MDRV_DEVICE_CONFIG( buckrog_8255_intf[1] ) | |
| 1166 | ||
| 1063 | 1167 | /* video hardware */ |
| 1064 | 1168 | MDRV_GFXDECODE(turbo) |
| 1065 | 1169 | MDRV_PALETTE_LENGTH(1024) |
| r2454 | r2455 | |
| 1522 | 1626 | * |
| 1523 | 1627 | *************************************/ |
| 1524 | 1628 | |
| 1525 | static DRIVER_INIT( turbo ) | |
| 1526 | { | |
| 1527 | static const ppi8255_interface turbo_8255_intf = | |
| 1528 | { | |
| 1529 | 4, | |
| 1530 | { NULL, NULL, NULL, turbo_analog_r }, | |
| 1531 | { NULL, NULL, NULL, input_port_2_r }, | |
| 1532 | { NULL, NULL, NULL, NULL }, | |
| 1533 | { turbo_ppi0a_w, turbo_ppi1a_w, turbo_sound_a_w, NULL }, | |
| 1534 | { turbo_ppi0b_w, turbo_ppi1b_w, turbo_sound_b_w, NULL }, | |
| 1535 | { turbo_ppi0c_w, turbo_ppi1c_w, turbo_sound_c_w, turbo_ppi3c_w } | |
| 1536 | }; | |
| 1537 | ppi8255_init(&turbo_8255_intf); | |
| 1538 | } | |
| 1539 | ||
| 1540 | 1629 | static DRIVER_INIT( turbo_enc ) |
| 1541 | 1630 | { |
| 1542 | 1631 | turbo_rom_decode(); |
| 1543 | DRIVER_INIT_CALL(turbo); | |
| 1544 | 1632 | } |
| 1545 | 1633 | |
| 1546 | 1634 | |
| 1547 | static DRIVER_INIT( subroc3d ) | |
| 1548 | { | |
| 1549 | static const ppi8255_interface subroc3d_8255_intf = | |
| 1550 | { | |
| 1551 | 2, | |
| 1552 | { NULL, NULL }, | |
| 1553 | { NULL, NULL }, | |
| 1554 | { NULL, NULL }, | |
| 1555 | { subroc3d_ppi0a_w, subroc3d_sound_a_w }, | |
| 1556 | { subroc3d_ppi0b_w, subroc3d_sound_b_w }, | |
| 1557 | { subroc3d_ppi0c_w, subroc3d_sound_c_w } | |
| 1558 | }; | |
| 1559 | ppi8255_init(&subroc3d_8255_intf); | |
| 1560 | } | |
| 1561 | ||
| 1562 | ||
| 1563 | static DRIVER_INIT( buckrog ) | |
| 1564 | { | |
| 1565 | static const ppi8255_interface buckrog_8255_intf = | |
| 1566 | { | |
| 1567 | 2, | |
| 1568 | { NULL, NULL }, | |
| 1569 | { NULL, NULL }, | |
| 1570 | { NULL, NULL }, | |
| 1571 | { buckrog_ppi0a_w, buckrog_sound_a_w }, | |
| 1572 | { buckrog_ppi0b_w, buckrog_sound_b_w }, | |
| 1573 | { buckrog_ppi0c_w, buckrog_ppi1c_w } | |
| 1574 | }; | |
| 1575 | ppi8255_init(&buckrog_8255_intf); | |
| 1576 | } | |
| 1577 | ||
| 1578 | 1635 | static DRIVER_INIT( buckrog_enc ) |
| 1579 | 1636 | { |
| 1580 | 1637 | buckrog_decode(); |
| 1581 | DRIVER_INIT_CALL(buckrog); | |
| 1582 | 1638 | } |
| 1583 | 1639 | |
| 1584 | 1640 | |
| r2454 | r2455 | |
| 1589 | 1645 | * |
| 1590 | 1646 | *************************************/ |
| 1591 | 1647 | |
| 1592 | GAMEL( 1981, turbo, 0, turbo, turbo, | |
| 1648 | GAMEL( 1981, turbo, 0, turbo, turbo, 0 | |
| 1593 | 1649 | GAMEL( 1981, turboa, turbo, turbo, turbo, turbo_enc, ROT270, "Sega", "Turbo (encrypted set 1)", 0, layout_turbo ) |
| 1594 | 1650 | GAMEL( 1981, turbob, turbo, turbo, turbo, turbo_enc, ROT270, "Sega", "Turbo (encrypted set 2)", 0, layout_turbo ) |
| 1595 | GAMEL( 1982, subroc3d, 0, subroc3d, subroc3d, | |
| 1651 | GAMEL( 1982, subroc3d, 0, subroc3d, subroc3d, 0 | |
| 1596 | 1652 | GAMEL( 1982, buckrog, 0, buckrog, buckrog, buckrog_enc, ROT0, "Sega", "Buck Rogers: Planet of Zoom", 0, layout_buckrog ) |
| 1597 | 1653 | GAMEL( 1982, zoom909, buckrog, buckrog, buckrog, buckrog_enc, ROT0, "Sega", "Zoom 909", GAME_IMPERFECT_COLORS, layout_buckrog ) // bad PROM |
| 1598 | GAMEL( 1982, buckrogn, buckrog, buckrog, buckrog, | |
| 1654 | GAMEL( 1982, buckrogn, buckrog, buckrog, buckrog, 0 |
| r2454 | r2455 | |
|---|---|---|
| 1497 | 1497 | if (ACCESSING_BITS_0_7) |
| 1498 | 1498 | { |
| 1499 | 1499 | if ( !(old_data&1) && (data&1) ) |
| 1500 | cpunum_set_input_line( | |
| 1500 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, PULSE_LINE); | |
| 1501 | 1501 | old_data = data; |
| 1502 | 1502 | } |
| 1503 | 1503 | break; |
| r2454 | r2455 | |
| 2594 | 2594 | |
| 2595 | 2595 | static READ16_HANDLER( kiwame_input_r ) |
| 2596 | 2596 | { |
| 2597 | int row_select = kiwame_nvram_r( machine,0x10a/2,0 ) & 0x1f; | |
| 2597 | int row_select = kiwame_nvram_r( machine,0x10a/2,0x00ff ) & 0x1f; | |
| 2598 | 2598 | int i; |
| 2599 | 2599 | |
| 2600 | 2600 | for(i = 0; i < 5; i++) |
| r2454 | r2455 | |
| 2704 | 2704 | static WRITE16_HANDLER( wiggie_soundlatch_w ) |
| 2705 | 2705 | { |
| 2706 | 2706 | wiggie_soundlatch = data >> 8; |
| 2707 | cpunum_set_input_line( | |
| 2707 | cpunum_set_input_line(machine, 1,0, HOLD_LINE); | |
| 2708 | 2708 | } |
| 2709 | 2709 | |
| 2710 | 2710 | |
| r2454 | r2455 | |
| 6674 | 6674 | |
| 6675 | 6675 | static const struct YM2203interface tndrcade_ym2203_interface = |
| 6676 | 6676 | { |
| 6677 | dsw1_r, /* input A: DSW 1 */ | |
| 6678 | dsw2_r /* input B: DSW 2 */ | |
| 6677 | { | |
| 6678 | AY8910_LEGACY_OUTPUT, | |
| 6679 | AY8910_DEFAULT_LOADS, | |
| 6680 | dsw1_r, /* input A: DSW 1 */ | |
| 6681 | dsw2_r, /* input B: DSW 2 */ | |
| 6682 | NULL, | |
| 6683 | NULL | |
| 6684 | }, | |
| 6685 | NULL | |
| 6679 | 6686 | }; |
| 6680 | 6687 | |
| 6681 | 6688 |
| r2454 | r2455 | |
|---|---|---|
| 660 | 660 | |
| 661 | 661 | static const struct AY8910interface ay8910_interface = |
| 662 | 662 | { |
| 663 | 0, | |
| 663 | AY8910_LEGACY_OUTPUT, | |
| 664 | AY8910_DEFAULT_LOADS, | |
| 665 | NULL, | |
| 664 | 666 | soundlatch_r, |
| 665 | 0,//ay8910_port0a_w, | |
| 666 | 0 | |
| 667 | NULL,//ay8910_port0a_w, | |
| 668 | NULL | |
| 667 | 669 | }; |
| 668 | 670 | |
| 669 | 671 | static MACHINE_START( catnmous ) |
| r2454 | r2455 | |
|---|---|---|
| 217 | 217 | |
| 218 | 218 | ***************************************************************************/ |
| 219 | 219 | |
| 220 | /*************************************************************************** | |
| 221 | Jumping Pop | |
| 222 | - added by David Haywood, thanks to Robin Cooper | |
| 223 | ||
| 224 | This is not a Taito board, it's a copy, it contains no original Taito or | |
| 225 | Seta components. | |
| 226 | ||
| 227 | The game is a bootleg of Plump Pop produced by NICs of Korea, it has new | |
| 228 | graphics, sounds etc. | |
| 229 | ||
| 230 | Uses a YM2151 instead of the YM2203, has no MCU | |
| 231 | ||
| 232 | Uses Palette RAM instead of PROMs. | |
| 233 | ||
| 234 | ToDo: | |
| 235 | ||
| 236 | Palette format (or gfx decode?) appears to be incorrect, some colours | |
| 237 | clearly don't match the screenshot. | |
| 238 | ||
| 239 | Frequencies have not been measured | |
| 240 | ||
| 241 | The bar behind the players flickers first boot / first attract levels, bug? | |
| 242 | ||
| 243 | Inputs might be wrong, should be joystick not spinner? (can't select character) | |
| 244 | ||
| 245 | ***************************************************************************/ | |
| 246 | ||
| 247 | ||
| 220 | 248 | #include "driver.h" |
| 221 | 249 | #include "deprecat.h" |
| 222 | 250 | #include "cpu/i8x41/i8x41.h" |
| r2454 | r2455 | |
| 224 | 252 | #include "sound/dac.h" |
| 225 | 253 | #include "sound/samples.h" |
| 226 | 254 | #include "includes/tnzs.h" |
| 255 | #include "sound/2151intf.h" | |
| 227 | 256 | |
| 228 | 257 | UINT8 *tnzs_objram, *tnzs_sharedram; |
| 229 | 258 | UINT8 *tnzs_vdcram, *tnzs_scrollram, *tnzs_objctrl, *tnzs_bg_flag; |
| r2454 | r2455 | |
| 515 | 544 | AM_RANGE(0x02, 0x02) AM_WRITE(tnzs_port2_w) |
| 516 | 545 | ADDRESS_MAP_END |
| 517 | 546 | |
| 547 | ||
| 548 | WRITE8_HANDLER( jpopnics_palette_w ) | |
| 549 | { | |
| 550 | int r,g,b; | |
| 551 | UINT16 paldata; | |
| 552 | paletteram[offset] = data; | |
| 553 | ||
| 554 | offset = offset >> 1; | |
| 555 | ||
| 556 | paldata = (paletteram[offset*2]<<8) | paletteram[(offset*2+1)]; | |
| 557 | ||
| 558 | g = (paldata >> 12) & 0x000f; | |
| 559 | r = (paldata >> 4) & 0x000f; | |
| 560 | b = (paldata >> 8) & 0x000f; | |
| 561 | // the other bits seem to be used, and the colours are wrong.. | |
| 562 | ||
| 563 | palette_set_color_rgb(Machine,offset,r<<4, g<<4, b<<4); | |
| 564 | } | |
| 565 | ||
| 566 | static ADDRESS_MAP_START( jpopnics_main_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 567 | AM_RANGE(0x0000, 0x7fff) AM_ROM | |
| 568 | AM_RANGE(0x8000, 0xbfff) AM_READWRITE(SMH_BANK1, SMH_ROM) | |
| 569 | AM_RANGE(0xc000, 0xdfff) AM_RAM AM_BASE(&tnzs_objram) | |
| 570 | AM_RANGE(0xe000, 0xefff) AM_RAM AM_SHARE(1) /* WORK RAM (shared by the 2 z80's) */ | |
| 571 | AM_RANGE(0xf000, 0xf1ff) AM_RAM AM_BASE(&tnzs_vdcram) /* VDC RAM */ | |
| 572 | AM_RANGE(0xf200, 0xf2ff) AM_RAM AM_BASE(&tnzs_scrollram) /* scrolling info */ | |
| 573 | AM_RANGE(0xf300, 0xf303) AM_MIRROR(0xfc) AM_WRITE(SMH_RAM) AM_BASE(&tnzs_objctrl) /* control registers (0x80 mirror used by Arkanoid 2) */ | |
| 574 | AM_RANGE(0xf400, 0xf400) AM_WRITE(SMH_RAM) AM_BASE(&tnzs_bg_flag) /* enable / disable background transparency */ | |
| 575 | AM_RANGE(0xf600, 0xf600) AM_READWRITE(SMH_NOP, tnzs_bankswitch_w) | |
| 576 | AM_RANGE(0xf800, 0xffff) AM_RAM AM_WRITE(jpopnics_palette_w) AM_BASE(&paletteram) | |
| 577 | ADDRESS_MAP_END | |
| 578 | ||
| 579 | READ8_HANDLER( moo_r ) | |
| 580 | { | |
| 581 | return mame_rand(machine); | |
| 582 | } | |
| 583 | ||
| 584 | READ8_HANDLER( bbb_r ) | |
| 585 | { | |
| 586 | return 0xff; | |
| 587 | } | |
| 588 | ||
| 589 | WRITE8_HANDLER( jpopnics_subbankswitch_w ) | |
| 590 | { | |
| 591 | UINT8 *RAM = memory_region(REGION_CPU2); | |
| 592 | ||
| 593 | /* bits 0-1 select ROM bank */ | |
| 594 | memory_set_bankptr (2, &RAM[0x10000 + 0x2000 * (data & 3)]); | |
| 595 | } | |
| 596 | ||
| 597 | ||
| 598 | static ADDRESS_MAP_START( jpopnics_sub_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 599 | AM_RANGE(0x0000, 0x7fff) AM_ROM | |
| 600 | AM_RANGE(0x8000, 0x9fff) AM_READWRITE(SMH_BANK2, SMH_ROM) | |
| 601 | ||
| 602 | AM_RANGE(0xa000, 0xa000) AM_WRITE(jpopnics_subbankswitch_w) | |
| 603 | AM_RANGE(0xb000, 0xb000) AM_READ(input_port_0_r) AM_WRITE(YM2151_register_port_0_w) | |
| 604 | AM_RANGE(0xb001, 0xb001) AM_READWRITE(YM2151_status_port_0_r, YM2151_data_port_0_w) | |
| 605 | AM_RANGE(0xc000, 0xc000) AM_READ(input_port_1_r) | |
| 606 | AM_RANGE(0xc001, 0xc001) AM_READ(input_port_2_r) | |
| 607 | AM_RANGE(0xc600, 0xc600) AM_READ(input_port_3_r) | |
| 608 | AM_RANGE(0xc601, 0xc601) AM_READ(input_port_4_r) | |
| 609 | ||
| 610 | AM_RANGE(0xd000, 0xdfff) AM_RAM | |
| 611 | AM_RANGE(0xe000, 0xefff) AM_RAM AM_SHARE(1) | |
| 612 | ||
| 613 | AM_RANGE(0xf000, 0xf003) AM_READ(arknoid2_sh_f000_r) | |
| 614 | ADDRESS_MAP_END | |
| 615 | ||
| 518 | 616 | #define TNZS_PLAYER_INPUT(_n_)\ |
| 519 | 617 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(_n_)\ |
| 520 | 618 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(_n_)\ |
| r2454 | r2455 | |
| 775 | 873 | PORT_BIT( 0xffff, 0x0000, IPT_DIAL ) PORT_SENSITIVITY(70) PORT_KEYDELTA(15) PORT_PLAYER(2) |
| 776 | 874 | INPUT_PORTS_END |
| 777 | 875 | |
| 876 | ||
| 877 | static INPUT_PORTS_START( jpopnics ) | |
| 878 | PORT_START | |
| 879 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 880 | ||
| 881 | PORT_START | |
| 882 | PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 883 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 884 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Button 2 (Cheat)") | |
| 885 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) | |
| 886 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) | |
| 887 | ||
| 888 | ||
| 889 | PORT_START | |
| 890 | PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) | |
| 891 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 892 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P2 Button 2 (Cheat)") PORT_PLAYER(2) | |
| 893 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) | |
| 894 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) | |
| 895 | ||
| 896 | PORT_START | |
| 897 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) | |
| 898 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 899 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 900 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) | |
| 901 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) | |
| 902 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 903 | PORT_SERVICE( 0x04, IP_ACTIVE_LOW ) | |
| 904 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) | |
| 905 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 906 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) | |
| 907 | TAITO_COINAGE_JAPAN_8 | |
| 908 | ||
| 909 | PORT_START | |
| 910 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) | |
| 911 | PORT_DIPSETTING( 0x02, DEF_STR( Easy ) ) | |
| 912 | PORT_DIPSETTING( 0x03, DEF_STR( Medium ) ) | |
| 913 | PORT_DIPSETTING( 0x01, DEF_STR( Hard ) ) | |
| 914 | PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) | |
| 915 | PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) | |
| 916 | PORT_DIPSETTING( 0x08, "50k 150k" ) | |
| 917 | PORT_DIPSETTING( 0x0c, "70k 200k" ) | |
| 918 | PORT_DIPSETTING( 0x04, "100k 250k" ) | |
| 919 | PORT_DIPSETTING( 0x00, "200k 300k" ) | |
| 920 | PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) ) | |
| 921 | PORT_DIPSETTING( 0x20, "2" ) | |
| 922 | PORT_DIPSETTING( 0x30, "3" ) | |
| 923 | PORT_DIPSETTING( 0x10, "4" ) | |
| 924 | PORT_DIPSETTING( 0x00, "5" ) | |
| 925 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) | |
| 926 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) | |
| 927 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 928 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Allow_Continue ) ) | |
| 929 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) | |
| 930 | PORT_DIPSETTING( 0x80, DEF_STR( Yes ) ) | |
| 931 | ||
| 932 | PORT_START | |
| 933 | PORT_START | |
| 934 | ||
| 935 | ||
| 936 | PORT_START_TAG("AN1") /* spinner 1 - read at f000/1 */ | |
| 937 | PORT_BIT( 0xffff, 0x0000, IPT_DIAL ) PORT_SENSITIVITY(70) PORT_KEYDELTA(15) | |
| 938 | ||
| 939 | PORT_START_TAG("AN2") /* spinner 2 - read at f002/3 */ | |
| 940 | PORT_BIT( 0xffff, 0x0000, IPT_DIAL ) PORT_SENSITIVITY(70) PORT_KEYDELTA(15) PORT_PLAYER(2) | |
| 941 | INPUT_PORTS_END | |
| 942 | ||
| 943 | ||
| 778 | 944 | #define DRTOPP_COMMON\ |
| 779 | 945 | PORT_START_TAG("DSWB")\ |
| 780 | 946 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )\ |
| r2454 | r2455 | |
| 1249 | 1415 | |
| 1250 | 1416 | static const struct YM2203interface ym2203_interface = |
| 1251 | 1417 | { |
| 1252 | input_port_0_r, /* DSW1 connected to port A */ | |
| 1253 | input_port_1_r /* DSW2 connected to port B */ | |
| 1418 | { | |
| 1419 | AY8910_LEGACY_OUTPUT, | |
| 1420 | AY8910_DEFAULT_LOADS, | |
| 1421 | input_port_0_r, /* DSW1 connected to port A */ | |
| 1422 | input_port_1_r, /* DSW2 connected to port B */ | |
| 1423 | NULL, | |
| 1424 | NULL | |
| 1425 | }, | |
| 1426 | NULL | |
| 1254 | 1427 | }; |
| 1255 | 1428 | |
| 1256 | 1429 | |
| r2454 | r2455 | |
| 1262 | 1435 | |
| 1263 | 1436 | static const struct YM2203interface kageki_ym2203_interface = |
| 1264 | 1437 | { |
| 1265 | kageki_csport_r, | |
| 1266 | 0, | |
| 1267 | 0, | |
| 1268 | kageki_csport_w | |
| 1438 | { | |
| 1439 | AY8910_LEGACY_OUTPUT, | |
| 1440 | AY8910_DEFAULT_LOADS, | |
| 1441 | kageki_csport_r, | |
| 1442 | NULL, | |
| 1443 | NULL, | |
| 1444 | kageki_csport_w | |
| 1445 | }, | |
| 1269 | 1446 | }; |
| 1270 | 1447 | |
| 1271 | 1448 | static const struct YM2203interface ym2203b_interface = |
| 1272 | 1449 | { |
| 1273 | 0,0,0,0, | |
| 1450 | { | |
| 1451 | AY8910_LEGACY_OUTPUT, | |
| 1452 | AY8910_DEFAULT_LOADS, | |
| 1453 | NULL, NULL, NULL, NULL | |
| 1454 | }, | |
| 1274 | 1455 | irqhandler |
| 1275 | 1456 | }; |
| 1276 | 1457 | |
| 1277 | 1458 | static const struct YM2203interface kabukiz_ym2203_interface = |
| 1278 | 1459 | { |
| 1279 | 0,0,kabukiz_sound_bank_w,kabukiz_sample_w, | |
| 1460 | { | |
| 1461 | AY8910_LEGACY_OUTPUT, | |
| 1462 | AY8910_DEFAULT_LOADS, | |
| 1463 | NULL, | |
| 1464 | NULL, | |
| 1465 | kabukiz_sound_bank_w, | |
| 1466 | kabukiz_sample_w, | |
| 1467 | }, | |
| 1280 | 1468 | irqhandler |
| 1281 | 1469 | }; |
| 1282 | 1470 | |
| r2454 | r2455 | |
| 1558 | 1746 | MACHINE_DRIVER_END |
| 1559 | 1747 | |
| 1560 | 1748 | |
| 1749 | static MACHINE_DRIVER_START( jpopnics ) | |
| 1561 | 1750 | |
| 1751 | /* basic machine hardware */ | |
| 1752 | MDRV_CPU_ADD(Z80,XTAL_12MHz/2) /* Not verified - Main board Crystal is 12MHz */ | |
| 1753 | MDRV_CPU_PROGRAM_MAP(jpopnics_main_map,0) | |
| 1754 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) | |
| 1755 | ||
| 1756 | MDRV_CPU_ADD(Z80,XTAL_12MHz/2) /* Not verified - Main board Crystal is 12MHz */ | |
| 1757 | MDRV_CPU_PROGRAM_MAP(jpopnics_sub_map,0) | |
| 1758 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) | |
| 1759 | ||
| 1760 | MDRV_INTERLEAVE(100) | |
| 1761 | ||
| 1762 | /* video hardware */ | |
| 1763 | MDRV_SCREEN_ADD("main", RASTER) | |
| 1764 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 1765 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) | |
| 1766 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 1767 | MDRV_SCREEN_SIZE(32*8, 32*8) | |
| 1768 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) | |
| 1769 | ||
| 1770 | MDRV_GFXDECODE(tnzs) | |
| 1771 | MDRV_PALETTE_LENGTH(1024) | |
| 1772 | ||
| 1773 | MDRV_VIDEO_UPDATE(tnzs) | |
| 1774 | MDRV_VIDEO_EOF(tnzs) | |
| 1775 | ||
| 1776 | /* sound hardware */ | |
| 1777 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 1778 | ||
| 1779 | MDRV_SOUND_ADD(YM2151, XTAL_12MHz/4) /* Not verified - Main board Crystal is 12MHz */ | |
| 1780 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) | |
| 1781 | MACHINE_DRIVER_END | |
| 1782 | ||
| 1783 | ||
| 1562 | 1784 | /*************************************************************************** |
| 1563 | 1785 | |
| 1564 | 1786 | Game driver(s) |
| r2454 | r2455 | |
| 1601 | 1823 | ROM_LOAD( "a98-12.bpr", 0x0200, 0x200, CRC(90dc9da7) SHA1(f719dead7f4597e5ee6f1103599505b98cb58299) ) /* lo bytes, AM27S29 or compatible like MB7124 */ |
| 1602 | 1824 | ROM_END |
| 1603 | 1825 | |
| 1826 | ROM_START( jpopnics ) | |
| 1827 | ROM_REGION( 0x30000, REGION_CPU1, 0 ) /* 64k + bankswitch areas for the first CPU */ | |
| 1828 | ROM_LOAD( "u96cpu2", 0x00000, 0x08000, CRC(649e951c) SHA1(b26bb157da9fcf5d3eddbb637a4cb2cb1b0fedac) ) | |
| 1829 | ROM_CONTINUE( 0x18000, 0x08000 ) /* banked at 8000-bfff */ | |
| 1830 | ROM_CONTINUE( 0x20000, 0x10000 ) /* banked at 8000-bfff */ | |
| 1831 | ||
| 1832 | ROM_REGION( 0x18000, REGION_CPU2, 0 ) /* 64k for the second CPU */ | |
| 1833 | ROM_LOAD( "u124cpu1", 0x00000, 0x08000, CRC(8453e8e4) SHA1(aac1bd501a15f79e3ed566c949504169b2aa762d) ) | |
| 1834 | ROM_CONTINUE( 0x10000, 0x08000 ) /* banked at 8000-9fff */ | |
| 1835 | ||
| 1836 | ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 1837 | ROM_LOAD( "u94gfx", 0x00000, 0x10000, CRC(e49f2fdd) SHA1(6824c6520d0039c062f028e69cbfa7b3790ea756) ) | |
| 1838 | ROM_CONTINUE( 0x20000, 0x10000 ) | |
| 1839 | ROM_LOAD( "u93gfx", 0x40000, 0x10000, CRC(a7791b5b) SHA1(4abfe9b2612ed0d17f1282a60879cf1d0620ae4c) ) | |
| 1840 | ROM_CONTINUE( 0x60000, 0x10000 ) | |
| 1841 | ROM_LOAD( "u92gfx", 0x80000, 0x10000, CRC(b30caac7) SHA1(a434f67e1bec9848d9c3e184734d8cebee048176) ) | |
| 1842 | ROM_CONTINUE( 0xa0000, 0x10000 ) | |
| 1843 | ROM_LOAD( "u91gfx", 0xc0000, 0x10000, CRC(18ada5f2) SHA1(3307dd11e5cd0d0abe8b7751a5fbf54998558b34) ) | |
| 1844 | ROM_CONTINUE( 0xe0000, 0x10000 ) | |
| 1845 | ROM_END | |
| 1846 | ||
| 1604 | 1847 | ROM_START( extrmatn ) |
| 1605 | 1848 | ROM_REGION( 0x30000, REGION_CPU1, 0 ) /* Region 0 - main cpu */ |
| 1606 | 1849 | ROM_LOAD( "b06-20.11c", 0x00000, 0x08000, CRC(04e3fc1f) SHA1(b1cf2f79f43fa33d6175368c897f84ec6aa6e746) ) |
| r2454 | r2455 | |
| 2146 | 2389 | GAME( 1988, kabukiz, 0, kabukiz, kabukiz, kabukiz, ROT0, "Taito Corporation Japan", "Kabuki-Z (World)", 0 ) |
| 2147 | 2390 | GAME( 1988, kabukizj, kabukiz, kabukiz, kabukiz, kabukiz, ROT0, "Taito Corporation", "Kabuki-Z (Japan)", 0 ) |
| 2148 | 2391 | GAME( 1989, insectx, 0, insectx, insectx, insectx, ROT0, "Taito Corporation Japan", "Insector X (World)", 0 ) |
| 2392 | GAME( 1992, jpopnics, 0, jpopnics, jpopnics, 0, ROT0, "Nics", "Jumping Pop (Nics, Korean bootleg of Plump Pop)", GAME_IMPERFECT_GRAPHICS ) |
| r2454 | r2455 | |
|---|---|---|
| 65 | 65 | ***************************************************************************/ |
| 66 | 66 | |
| 67 | 67 | #include "driver.h" |
| 68 | #include "deprecat.h" | |
| 69 | 68 | #include "sound/sn76496.h" |
| 70 | 69 | #include "sound/flt_rc.h" |
| 71 | 70 | |
| r2454 | r2455 | |
| 129 | 128 | |
| 130 | 129 | static WRITE8_HANDLER( tp84_sh_irqtrigger_w ) |
| 131 | 130 | { |
| 132 | cpunum_set_input_line_and_vector( | |
| 131 | cpunum_set_input_line_and_vector(machine, 2,0,HOLD_LINE,0xff); | |
| 133 | 132 | } |
| 134 | 133 | |
| 135 | 134 |
| r2454 | r2455 | |
|---|---|---|
| 187 | 187 | |
| 188 | 188 | static WRITE32_HANDLER( sound_irq_w ) |
| 189 | 189 | { |
| 190 | cpunum_set_input_line( | |
| 190 | cpunum_set_input_line(machine, 2, 0, HOLD_LINE); | |
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | |
| r2454 | r2455 | |
| 216 | 216 | return; |
| 217 | 217 | } |
| 218 | 218 | |
| 219 | if (mem_mask == (0x | |
| 219 | if (mem_mask == (0xffffffff)) | |
| 220 | 220 | { |
| 221 | 221 | /* write the data to the dsp56k as well */ |
| 222 | 222 | dsp56k_shared_ram_16[(offset<<1)] = (dsp_shared_ram[offset] & 0xffff0000) >> 16 ; |
| 223 | 223 | dsp56k_shared_ram_16[(offset<<1)+1] = (dsp_shared_ram[offset] & 0x0000ffff) ; |
| 224 | 224 | } |
| 225 | else if (mem_mask == (0x | |
| 225 | else if (mem_mask == (0x | |
| 226 | 226 | { |
| 227 | 227 | /* write to the 'current' dsp56k byte */ |
| 228 | 228 | dsp56k_shared_ram_16[(offset<<1)] = (dsp_shared_ram[offset] & 0xffff0000) >> 16 ; |
| 229 | 229 | } |
| 230 | else if (mem_mask == (0x | |
| 230 | else if (mem_mask == (0x | |
| 231 | 231 | { |
| 232 | 232 | /* write to the 'next' dsp56k byte */ |
| 233 | 233 | dsp56k_shared_ram_16[(offset<<1)+1] = (dsp_shared_ram[offset] & 0x0000ffff) ; |
| r2454 | r2455 | |
| 267 | 267 | { |
| 268 | 268 | UINT8 hi_addr = offset<<1; |
| 269 | 269 | |
| 270 | if (mem_mask == | |
| 270 | if (mem_mask == | |
| 271 | 271 | hi_addr++; |
| 272 | 272 | |
| 273 | 273 | logerror("CALLING dsp_host_interface_read %x = %x [%x] (@%x)\n", hi_addr, dsp56k_host_interface_read(hi_addr), mem_mask, activecpu_get_pc()); |
| 274 | 274 | |
| 275 | if (mem_mask == | |
| 275 | if (mem_mask == | |
| 276 | 276 | return dsp56k_host_interface_read(hi_addr) << 8; |
| 277 | 277 | else |
| 278 | 278 | return dsp56k_host_interface_read(hi_addr) << 24; |
| r2454 | r2455 | |
| 284 | 284 | UINT8 dsp_data; |
| 285 | 285 | UINT8 hi_addr = offset<<1; |
| 286 | 286 | |
| 287 | if (mem_mask == | |
| 287 | if (mem_mask == | |
| 288 | 288 | { |
| 289 | 289 | hi_addr++; |
| 290 | 290 | dsp_data = data >> 8; |
| r2454 | r2455 | |
|---|---|---|
| 245 | 245 | { |
| 246 | 246 | switch (hcrash_selected_ip & 0xf) |
| 247 | 247 | { // From WEC Le Mans Schems: |
| 248 | case 0xc: return input_port_8_r(machine,offset); // Accel - Schems: Accelevr | |
| 249 | case 0: return input_port_8_r(machine,offset); | |
| 250 | case 0xd: return input_port_9_r(machine,offset); // Wheel - Schems: Handlevr | |
| 251 | case 1: return input_port_9_r(machine,offset); | |
| 248 | case 0xc: return input_port_read_indexed(machine,8); // Accel - Schems: Accelevr | |
| 249 | case 0: return input_port_read_indexed(machine,8); | |
| 250 | case 0xd: return input_port_read_indexed(machine,9); // Wheel - Schems: Handlevr | |
| 251 | case 1: return input_port_read_indexed(machine,9); | |
| 252 | 252 | |
| 253 | 253 | default: return ~0; |
| 254 | 254 | } |
| r2454 | r2455 | |
| 2091 | 2091 | |
| 2092 | 2092 | static const struct AY8910interface ay8910_interface_1 = |
| 2093 | 2093 | { |
| 2094 | nemesis_portA_r | |
| 2094 | AY8910_LEGACY_OUTPUT, | |
| 2095 | AY8910_DEFAULT_LOADS, | |
| 2096 | nemesis_portA_r, | |
| 2097 | NULL, | |
| 2098 | NULL, | |
| 2099 | NULL | |
| 2095 | 2100 | }; |
| 2096 | 2101 | |
| 2097 | 2102 | static const struct AY8910interface ay8910_interface_2 = |
| 2098 | 2103 | { |
| 2099 | 0, | |
| 2100 | 0, | |
| 2104 | AY8910_LEGACY_OUTPUT, | |
| 2105 | AY8910_DEFAULT_LOADS, | |
| 2106 | NULL, | |
| 2107 | NULL, | |
| 2101 | 2108 | k005289_control_A_w, |
| 2102 | 2109 | k005289_control_B_w |
| 2103 | 2110 | }; |
| r2454 | r2455 | |
|---|---|---|
| 9 | 9 | ***************************************************************************/ |
| 10 | 10 | |
| 11 | 11 | #include "driver.h" |
| 12 | #include "deprecat.h" | |
| 13 | 12 | #include "cpu/m68000/m68000.h" |
| 14 | 13 | #include "sound/ay8910.h" |
| 15 | 14 | |
| r2454 | r2455 | |
| 34 | 33 | if (ACCESSING_BITS_0_7) |
| 35 | 34 | { |
| 36 | 35 | sound_latch = (data & 0xff) << 1; |
| 37 | cpunum_set_input_line( | |
| 36 | cpunum_set_input_line(machine, 1, 0, ASSERT_LINE); | |
| 38 | 37 | } |
| 39 | 38 | } |
| 40 | 39 | |
| 41 | 40 | static READ8_HANDLER( magmax_sound_irq_ack ) |
| 42 | 41 | { |
| 43 | cpunum_set_input_line( | |
| 42 | cpunum_set_input_line(machine, 1, 0, CLEAR_LINE); | |
| 44 | 43 | return 0; |
| 45 | 44 | } |
| 46 | 45 | |
| r2454 | r2455 | |
| 353 | 352 | |
| 354 | 353 | static const struct AY8910interface ay8910_interface = |
| 355 | 354 | { |
| 356 | 0, | |
| 357 | 0, | |
| 355 | AY8910_LEGACY_OUTPUT, | |
| 356 | AY8910_DEFAULT_LOADS, | |
| 357 | NULL, | |
| 358 | NULL, | |
| 358 | 359 | ay8910_portA_0_w, /*write port A*/ |
| 359 | 360 | ay8910_portB_0_w /*write port B*/ |
| 360 | 361 | }; |
| r2454 | r2455 | |
|---|---|---|
| 2473 | 2473 | { |
| 2474 | 2474 | COMBINE_DATA(&stv_workram_h[0xffc44/4]); |
| 2475 | 2475 | |
| 2476 | logerror("cpu #%d (PC=%08X): 60ffc44_write write = %08X & %08X\n", cpu_getactivecpu(), activecpu_get_pc(), data, mem_mask | |
| 2476 | logerror("cpu #%d (PC=%08X): 60ffc44_write write = %08X & %08X\n", cpu_getactivecpu(), activecpu_get_pc(), data, mem_mask | |
| 2477 | 2477 | //sinit_w(offset,data,mem_mask); |
| 2478 | 2478 | } |
| 2479 | 2479 | |
| r2454 | r2455 | |
| 2481 | 2481 | { |
| 2482 | 2482 | COMBINE_DATA(&stv_workram_h[0xffc48/4]); |
| 2483 | 2483 | |
| 2484 | logerror("cpu #%d (PC=%08X): 60ffc48_write write = %08X & %08X\n", cpu_getactivecpu(), activecpu_get_pc(), data, mem_mask | |
| 2484 | logerror("cpu #%d (PC=%08X): 60ffc48_write write = %08X & %08X\n", cpu_getactivecpu(), activecpu_get_pc(), data, mem_mask | |
| 2485 | 2485 | //minit_w(offset,data,mem_mask); |
| 2486 | 2486 | } |
| 2487 | 2487 |
| r2454 | r2455 | |
|---|---|---|
| 78 | 78 | |
| 79 | 79 | */ |
| 80 | 80 | #include "driver.h" |
| 81 | #include "deprecat.h" | |
| 82 | 81 | #include "genesis.h" |
| 83 | 82 | #include "rendlay.h" |
| 84 | 83 | #include "megadriv.h" |
| r2454 | r2455 | |
| 443 | 442 | mt_cart_select_reg = data; |
| 444 | 443 | |
| 445 | 444 | |
| 446 | megatech_select_game( | |
| 445 | megatech_select_game(machine, mt_cart_select_reg); | |
| 447 | 446 | |
| 448 | 447 | /* |
| 449 | 448 | if (mt_cart_select_reg==2) |
| r2454 | r2455 | |
|---|---|---|
| 11 | 11 | ***************************************************************************/ |
| 12 | 12 | |
| 13 | 13 | #include "driver.h" |
| 14 | #include "deprecat.h" | |
| 15 | 14 | #include "sound/ay8910.h" |
| 16 | 15 | |
| 17 | 16 | /* from video */ |
| r2454 | r2455 | |
| 50 | 49 | static WRITE8_HANDLER( sound_reset_w ) |
| 51 | 50 | { |
| 52 | 51 | if ( data & 1 ) |
| 53 | cpunum_set_input_line( | |
| 52 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, PULSE_LINE ); | |
| 54 | 53 | } |
| 55 | 54 | |
| 56 | 55 | |
| r2454 | r2455 | |
| 246 | 245 | |
| 247 | 246 | static const struct AY8910interface ay8910_interface = |
| 248 | 247 | { |
| 249 | soundlatch_r | |
| 248 | AY8910_LEGACY_OUTPUT, | |
| 249 | AY8910_DEFAULT_LOADS, | |
| 250 | soundlatch_r, | |
| 251 | NULL, | |
| 252 | NULL, | |
| 253 | NULL | |
| 250 | 254 | }; |
| 251 | 255 | |
| 252 | 256 | static INTERRUPT_GEN( timelimt_irq ) { |
| r2454 | r2455 | |
|---|---|---|
| 357 | 357 | COMBINE_DATA(&paletteram16[offset]); |
| 358 | 358 | |
| 359 | 359 | rgb = (paletteram16[offset & 0x7ff] & 0xff) | ((paletteram16[offset | 0x800] & 0xff) << 8); |
| 360 | palette_set_color_rgb( | |
| 360 | palette_set_color_rgb(machine,offset & 0x7ff,pal5bit(rgb >> 0),pal5bit(rgb >> 5),pal5bit(rgb >> 10)); | |
| 361 | 361 | } |
| 362 | 362 | |
| 363 | 363 |
| r2454 | r2455 | |
|---|---|---|
| 240 | 240 | |
| 241 | 241 | static const struct YM2203interface ym2203_interface = |
| 242 | 242 | { |
| 243 | 0, | |
| 244 | 0, | |
| 245 | 0, | |
| 246 | 0, | |
| 243 | { | |
| 244 | AY8910_LEGACY_OUTPUT, | |
| 245 | AY8910_DEFAULT_LOADS, | |
| 246 | NULL, NULL, NULL, NULL | |
| 247 | }, | |
| 247 | 248 | irqhandler |
| 248 | 249 | }; |
| 249 | 250 |
| r2454 | r2455 | |
|---|---|---|
| 28 | 28 | *********************************************************************/ |
| 29 | 29 | |
| 30 | 30 | #include "driver.h" |
| 31 | #include "deprecat.h" | |
| 32 | 31 | #include "machine/eeprom.h" |
| 33 | 32 | #include "sound/2151intf.h" |
| 34 | 33 | #include "sound/okim6295.h" |
| r2454 | r2455 | |
| 161 | 160 | COMBINE_DATA(&paletteram32[offset]); |
| 162 | 161 | |
| 163 | 162 | paldata = paletteram32[offset] & 0xffff; |
| 164 | palette_set_color_rgb( | |
| 163 | palette_set_color_rgb(machine, offset*2 + 1, pal5bit(paldata >> 10), pal5bit(paldata >> 5), pal5bit(paldata >> 0)); | |
| 165 | 164 | |
| 166 | 165 | paldata = (paletteram32[offset] >> 16) & 0xffff; |
| 167 | palette_set_color_rgb( | |
| 166 | palette_set_color_rgb(machine, offset*2 + 0, pal5bit(paldata >> 10), pal5bit(paldata >> 5), pal5bit(paldata >> 0)); | |
| 168 | 167 | } |
| 169 | 168 | |
| 170 | 169 | static READ32_HANDLER( wyvernwg_prot_r ) |
| r2454 | r2455 | |
|---|---|---|
| 72 | 72 | |
| 73 | 73 | ***************************************************************************/ |
| 74 | 74 | |
| 75 | #define MAIN_CPU_CLOCK (XTAL_12MHz/3) /* 12MHz is the only OSC on the PCB */ | |
| 76 | #define SOUND_CPU_CLOCK (XTAL_12MHz/4) /* 12MHz is the only OSC on the PCB */ | |
| 77 | #define AUDIO_CLOCK (XTAL_12MHz/8) /* 12MHz is the only OSC on the PCB */ | |
| 78 | ||
| 75 | 79 | #include "driver.h" |
| 76 | 80 | #include "deprecat.h" |
| 77 | 81 | #include "sound/ay8910.h" |
| r2454 | r2455 | |
| 266 | 270 | static MACHINE_DRIVER_START( 1942 ) |
| 267 | 271 | |
| 268 | 272 | /* basic machine hardware */ |
| 269 | MDRV_CPU_ADD(Z80, | |
| 273 | MDRV_CPU_ADD(Z80, MAIN_CPU_CLOCK) /* 4 MHz | |
| 270 | 274 | MDRV_CPU_PROGRAM_MAP(c1942_map, 0) |
| 271 | 275 | MDRV_CPU_VBLANK_INT_HACK(c1942_interrupt,2) |
| 272 | 276 | |
| 273 | MDRV_CPU_ADD(Z80, | |
| 277 | MDRV_CPU_ADD(Z80, SOUND_CPU_CLOCK) /* 3 MHz ??? */ | |
| 274 | 278 | MDRV_CPU_PROGRAM_MAP(sound_map, 0) |
| 275 | 279 | MDRV_CPU_VBLANK_INT_HACK(irq0_line_hold,4) |
| 276 | 280 | |
| r2454 | r2455 | |
| 292 | 296 | /* sound hardware */ |
| 293 | 297 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 294 | 298 | |
| 295 | MDRV_SOUND_ADD(AY8910, 15 | |
| 299 | MDRV_SOUND_ADD(AY8910, AUDIO_CLOCK) /* 1.5 MHz */ | |
| 296 | 300 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 297 | MDRV_SOUND_ADD(AY8910, 15 | |
| 301 | MDRV_SOUND_ADD(AY8910, AUDIO_CLOCK) /* 1.5 MHz */ | |
| 298 | 302 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 299 | 303 | MACHINE_DRIVER_END |
| 300 | 304 | |
| r2454 | r2455 | |
| 308 | 312 | |
| 309 | 313 | ROM_START( 1942 ) |
| 310 | 314 | ROM_REGION( 0x1c000, REGION_CPU1, 0 ) /* 64k for code + 3*16k for the banked ROMs images */ |
| 311 | ROM_LOAD( "1-n3a.bin", 0x00000, 0x4000, CRC(40201bab) SHA1(4886c07a4602223c21419118e10aadce9c99fa5a) ) | |
| 312 | ROM_LOAD( "1-n4.bin", 0x04000, 0x4000, CRC(a60ac644) SHA1(f37862db3cf5e6cc9ab3276f3bc45fd629fd70dd) ) | |
| 313 | ROM_LOAD( "1-n5.bin", 0x10000, 0x4000, CRC(835f7b24) SHA1(24b66827f08c43fbf5b9517d638acdfc38e1b1e7) ) | |
| 314 | ROM_LOAD( "1-n6.bin", 0x14000, 0x2000, CRC(821c6481) SHA1(06becb6bf8b4bde3a458098498eecad566a87711) ) | |
| 315 | ROM_LOAD( "1-n7.bin", 0x18000, 0x4000, CRC(5df525e1) SHA1(70cd2910e2945db76bd6ebfa0ff09a5efadc2d0b) ) | |
| 315 | ROM_LOAD( "srb-03.m3", 0x00000, 0x4000, CRC(d9dafcc3) SHA1(a089a9bc55fb7d6d0ac53f91b258396d5d62677a) ) | |
| 316 | ROM_LOAD( "srb-04.m4", 0x04000, 0x4000, CRC(da0cf924) SHA1(856fbb302c9a4ec7850a26ab23dab8467f79bba4) ) | |
| 317 | ROM_LOAD( "srb-05.m5", 0x10000, 0x4000, CRC(d102911c) SHA1(35ba1d82bd901940f61d8619273463d02fc0a952) ) | |
| 318 | ROM_LOAD( "srb-06.m6", 0x14000, 0x2000, CRC(466f8248) SHA1(2ccc8fc59962d3001fbc10e8d2f20a254a74f251) ) | |
| 319 | ROM_LOAD( "srb-07.m7", 0x18000, 0x4000, CRC(0d31038c) SHA1(b588eaf6fddd66ecb2d9832dc197f286f1ccd846) ) | |
| 316 | 320 | |
| 317 | 321 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) |
| 318 | ROM_LOAD( " | |
| 322 | ROM_LOAD( "sr-01.c11 | |
| 319 | 323 | |
| 320 | 324 | ROM_REGION( 0x2000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 321 | ROM_LOAD( " | |
| 325 | ROM_LOAD( "sr-02.f2 | |
| 322 | 326 | |
| 323 | 327 | ROM_REGION( 0xc000, REGION_GFX2, ROMREGION_DISPOSE ) |
| 324 | ROM_LOAD( "2-a1.bin", 0x0000, 0x2000, CRC(3884d9eb) SHA1(5cbd9215fa5ba5a61208b383700adc4428521aed) ) /* tiles */ | |
| 325 | ROM_LOAD( "2-a2.bin", 0x2000, 0x2000, CRC(999cf6e0) SHA1(5b8b685038ec98b781908b92eb7fb9506db68544) ) | |
| 326 | ROM_LOAD( "2-a3.bin", 0x4000, 0x2000, CRC(8edb273a) SHA1(85fdd4c690ed31e6396e3c16aa02140ee7ea2d61) ) | |
| 327 | ROM_LOAD( "2-a4.bin", 0x6000, 0x2000, CRC(3a2726c3) SHA1(187c92ef591febdcbd1d42ab850e0cbb62c00873) ) | |
| 328 | ROM_LOAD( "2-a5.bin", 0x8000, 0x2000, CRC(1bd3d8bb) SHA1(ef4dce605eb4dc8035985a415315ec61c21419c6) ) | |
| 329 | ROM_LOAD( "2-a6.bin", 0xa000, 0x2000, CRC(658f02c4) SHA1(f087d69e49e38cf3107350cde18fcf85a8fa04f0) ) | |
| 328 | ROM_LOAD( "sr-08.a1", 0x0000, 0x2000, CRC(3884d9eb) SHA1(5cbd9215fa5ba5a61208b383700adc4428521aed) ) /* tiles */ | |
| 329 | ROM_LOAD( "sr-08.a2", 0x2000, 0x2000, CRC(999cf6e0) SHA1(5b8b685038ec98b781908b92eb7fb9506db68544) ) | |
| 330 | ROM_LOAD( "sr-08.a3", 0x4000, 0x2000, CRC(8edb273a) SHA1(85fdd4c690ed31e6396e3c16aa02140ee7ea2d61) ) | |
| 331 | ROM_LOAD( "sr-08.a4", 0x6000, 0x2000, CRC(3a2726c3) SHA1(187c92ef591febdcbd1d42ab850e0cbb62c00873) ) | |
| 332 | ROM_LOAD( "sr-08.a5", 0x8000, 0x2000, CRC(1bd3d8bb) SHA1(ef4dce605eb4dc8035985a415315ec61c21419c6) ) | |
| 333 | ROM_LOAD( "sr-08.a6", 0xa000, 0x2000, CRC(658f02c4) SHA1(f087d69e49e38cf3107350cde18fcf85a8fa04f0) ) | |
| 330 | 334 | |
| 331 | 335 | ROM_REGION( 0x10000, REGION_GFX3, ROMREGION_DISPOSE ) |
| 332 | ROM_LOAD( "2-l1.bin", 0x00000, 0x4000, CRC(2528bec6) SHA1(29f7719f18faad6bd1ec6735cc24e69168361470) ) /* sprites */ | |
| 333 | ROM_LOAD( "2-l2.bin", 0x04000, 0x4000, CRC(f89287aa) SHA1(136fff6d2a4f48a488fc7c620213761459c3ada0) ) | |
| 334 | ROM_LOAD( "2-n1.bin", 0x08000, 0x4000, CRC(024418f8) SHA1(145b8d5d6c8654cd090955a98f6dd8c8dbafe7c1) ) | |
| 335 | ROM_LOAD( "2-n2.bin", 0x0c000, 0x4000, CRC(e2c7e489) SHA1(d4b5d575c021f58f6966df189df94e08c5b3621c) ) | |
| 336 | ROM_LOAD( "sr-14.l1", 0x00000, 0x4000, CRC(2528bec6) SHA1(29f7719f18faad6bd1ec6735cc24e69168361470) ) /* sprites */ | |
| 337 | ROM_LOAD( "sr-15.l2", 0x04000, 0x4000, CRC(f89287aa) SHA1(136fff6d2a4f48a488fc7c620213761459c3ada0) ) | |
| 338 | ROM_LOAD( "sr-16.n1", 0x08000, 0x4000, CRC(024418f8) SHA1(145b8d5d6c8654cd090955a98f6dd8c8dbafe7c1) ) | |
| 339 | ROM_LOAD( "sr-17.n2", 0x0c000, 0x4000, CRC(e2c7e489) SHA1(d4b5d575c021f58f6966df189df94e08c5b3621c) ) | |
| 336 | 340 | |
| 337 | 341 | ROM_REGION( 0x0a00, REGION_PROMS, 0 ) |
| 338 | ROM_LOAD( "08e_sb-5.bin", 0x0000, 0x0100, CRC(93ab8153) SHA1(a792f24e5c0c3c4a6b436102e7a98199f878ece1) ) /* red component */ | |
| 339 | ROM_LOAD( "09e_sb-6.bin", 0x0100, 0x0100, CRC(8ab44f7d) SHA1(f74680a6a987d74b3acb32e6396f20e127874149) ) /* green component */ | |
| 340 | ROM_LOAD( "10e_sb-7.bin", 0x0200, 0x0100, CRC(f4ade9a4) SHA1(62ad31d31d183cce213b03168daa035083b2f28e) ) /* blue component */ | |
| 341 | ROM_LOAD( "f01_sb-0.bin", 0x0300, 0x0100, CRC(6047d91b) SHA1(1ce025f9524c1033e48c5294ee7d360f8bfebe8d) ) /* char lookup table */ | |
| 342 | ROM_LOAD( "06d_sb-4.bin", 0x0400, 0x0100, CRC(4858968d) SHA1(20b5dbcaa1a4081b3139e7e2332d8fe3c9e55ed6) ) /* tile lookup table */ | |
| 343 | ROM_LOAD( "03k_sb-8.bin", 0x0500, 0x0100, CRC(f6fad943) SHA1(b0a24ea7805272e8ebf72a99b08907bc00d5f82f) ) /* sprite lookup table */ | |
| 344 | ROM_LOAD( "01d_sb-2.bin", 0x0600, 0x0100, CRC(8bb8b3df) SHA1(49de2819c4c92057fedcb20425282515d85829aa) ) /* tile palette selector? (not used) */ | |
| 345 | ROM_LOAD( "02d_sb-3.bin", 0x0700, 0x0100, CRC(3b0c99af) SHA1(38f30ac1e48632634e409f328ee3051b987de7ad) ) /* tile palette selector? (not used) */ | |
| 346 | ROM_LOAD( "k06_sb-1.bin", 0x0800, 0x0100, CRC(712ac508) SHA1(5349d722ab6733afdda65f6e0a98322f0d515e86) ) /* interrupt timing (not used) */ | |
| 347 | ROM_LOAD( "01m_sb-9.bin", 0x0900, 0x0100, CRC(4921635c) SHA1(aee37d6cdc36acf0f11ff5f93e7b16e4b12f6c39) ) /* video timing? (not used) */ | |
| 342 | ROM_LOAD( "sb-5.e8", 0x0000, 0x0100, CRC(93ab8153) SHA1(a792f24e5c0c3c4a6b436102e7a98199f878ece1) ) /* red component */ | |
| 343 | ROM_LOAD( "sb-6.e9", 0x0100, 0x0100, CRC(8ab44f7d) SHA1(f74680a6a987d74b3acb32e6396f20e127874149) ) /* green component */ | |
| 344 | ROM_LOAD( "sb-7.e10", 0x0200, 0x0100, CRC(f4ade9a4) SHA1(62ad31d31d183cce213b03168daa035083b2f28e) ) /* blue component */ | |
| 345 | ROM_LOAD( "sb-0.f1", 0x0300, 0x0100, CRC(6047d91b) SHA1(1ce025f9524c1033e48c5294ee7d360f8bfebe8d) ) /* char lookup table */ | |
| 346 | ROM_LOAD( "sb-4.d6", 0x0400, 0x0100, CRC(4858968d) SHA1(20b5dbcaa1a4081b3139e7e2332d8fe3c9e55ed6) ) /* tile lookup table */ | |
| 347 | ROM_LOAD( "sb-8.k3", 0x0500, 0x0100, CRC(f6fad943) SHA1(b0a24ea7805272e8ebf72a99b08907bc00d5f82f) ) /* sprite lookup table */ | |
| 348 | ROM_LOAD( "sb-2.d1", 0x0600, 0x0100, CRC(8bb8b3df) SHA1(49de2819c4c92057fedcb20425282515d85829aa) ) /* tile palette selector? (not used) */ | |
| 349 | ROM_LOAD( "sb-3.d2", 0x0700, 0x0100, CRC(3b0c99af) SHA1(38f30ac1e48632634e409f328ee3051b987de7ad) ) /* tile palette selector? (not used) */ | |
| 350 | ROM_LOAD( "sb-1.k6", 0x0800, 0x0100, CRC(712ac508) SHA1(5349d722ab6733afdda65f6e0a98322f0d515e86) ) /* interrupt timing (not used) */ | |
| 351 | ROM_LOAD( "sb-9.m11", 0x0900, 0x0100, CRC(4921635c) SHA1(aee37d6cdc36acf0f11ff5f93e7b16e4b12f6c39) ) /* video timing? (not used) */ | |
| 348 | 352 | ROM_END |
| 349 | 353 | |
| 350 | 354 | ROM_START( 1942a ) |
| 351 | 355 | ROM_REGION( 0x1c000, REGION_CPU1, 0 ) /* 64k for code + 3*16k for the banked ROMs images */ |
| 352 | ROM_LOAD( "1-n3.bin", 0x00000, 0x4000, CRC(612975f2) SHA1(f3744335862dd4c53925cc32792badd4a378c837) ) | |
| 353 | ROM_LOAD( "1-n4.bin", 0x04000, 0x4000, CRC(a60ac644) SHA1(f37862db3cf5e6cc9ab3276f3bc45fd629fd70dd) ) | |
| 354 | ROM_LOAD( "1-n5.bin", 0x10000, 0x4000, CRC(835f7b24) SHA1(24b66827f08c43fbf5b9517d638acdfc38e1b1e7) ) | |
| 355 | ROM_LOAD( "1-n6.bin", 0x14000, 0x2000, CRC(821c6481) SHA1(06becb6bf8b4bde3a458098498eecad566a87711) ) | |
| 356 | ROM_LOAD( "1-n7.bin", 0x18000, 0x4000, CRC(5df525e1) SHA1(70cd2910e2945db76bd6ebfa0ff09a5efadc2d0b) ) | |
| 356 | ROM_LOAD( "sra-03.m3", 0x00000, 0x4000, CRC(40201bab) SHA1(4886c07a4602223c21419118e10aadce9c99fa5a) ) | |
| 357 | ROM_LOAD( "sr-04.m4", 0x04000, 0x4000, CRC(a60ac644) SHA1(f37862db3cf5e6cc9ab3276f3bc45fd629fd70dd) ) | |
| 358 | ROM_LOAD( "sr-05.m5", 0x10000, 0x4000, CRC(835f7b24) SHA1(24b66827f08c43fbf5b9517d638acdfc38e1b1e7) ) | |
| 359 | ROM_LOAD( "sr-06.m6", 0x14000, 0x2000, CRC(821c6481) SHA1(06becb6bf8b4bde3a458098498eecad566a87711) ) | |
| 360 | ROM_LOAD( "sr-07.m7", 0x18000, 0x4000, CRC(5df525e1) SHA1(70cd2910e2945db76bd6ebfa0ff09a5efadc2d0b) ) | |
| 357 | 361 | |
| 358 | 362 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) |
| 359 | ROM_LOAD( " | |
| 363 | ROM_LOAD( "sr-01.c11 | |
| 360 | 364 | |
| 361 | 365 | ROM_REGION( 0x2000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 362 | ROM_LOAD( " | |
| 366 | ROM_LOAD( "sr-02.f2 | |
| 363 | 367 | |
| 364 | 368 | ROM_REGION( 0xc000, REGION_GFX2, ROMREGION_DISPOSE ) |
| 365 | ROM_LOAD( "2-a1.bin", 0x0000, 0x2000, CRC(3884d9eb) SHA1(5cbd9215fa5ba5a61208b383700adc4428521aed) ) /* tiles */ | |
| 366 | ROM_LOAD( "2-a2.bin", 0x2000, 0x2000, CRC(999cf6e0) SHA1(5b8b685038ec98b781908b92eb7fb9506db68544) ) | |
| 367 | ROM_LOAD( "2-a3.bin", 0x4000, 0x2000, CRC(8edb273a) SHA1(85fdd4c690ed31e6396e3c16aa02140ee7ea2d61) ) | |
| 368 | ROM_LOAD( "2-a4.bin", 0x6000, 0x2000, CRC(3a2726c3) SHA1(187c92ef591febdcbd1d42ab850e0cbb62c00873) ) | |
| 369 | ROM_LOAD( "2-a5.bin", 0x8000, 0x2000, CRC(1bd3d8bb) SHA1(ef4dce605eb4dc8035985a415315ec61c21419c6) ) | |
| 370 | ROM_LOAD( "2-a6.bin", 0xa000, 0x2000, CRC(658f02c4) SHA1(f087d69e49e38cf3107350cde18fcf85a8fa04f0) ) | |
| 369 | ROM_LOAD( "sr-08.a1", 0x0000, 0x2000, CRC(3884d9eb) SHA1(5cbd9215fa5ba5a61208b383700adc4428521aed) ) /* tiles */ | |
| 370 | ROM_LOAD( "sr-08.a2", 0x2000, 0x2000, CRC(999cf6e0) SHA1(5b8b685038ec98b781908b92eb7fb9506db68544) ) | |
| 371 | ROM_LOAD( "sr-08.a3", 0x4000, 0x2000, CRC(8edb273a) SHA1(85fdd4c690ed31e6396e3c16aa02140ee7ea2d61) ) | |
| 372 | ROM_LOAD( "sr-08.a4", 0x6000, 0x2000, CRC(3a2726c3) SHA1(187c92ef591febdcbd1d42ab850e0cbb62c00873) ) | |
| 373 | ROM_LOAD( "sr-08.a5", 0x8000, 0x2000, CRC(1bd3d8bb) SHA1(ef4dce605eb4dc8035985a415315ec61c21419c6) ) | |
| 374 | ROM_LOAD( "sr-08.a6", 0xa000, 0x2000, CRC(658f02c4) SHA1(f087d69e49e38cf3107350cde18fcf85a8fa04f0) ) | |
| 371 | 375 | |
| 372 | 376 | ROM_REGION( 0x10000, REGION_GFX3, ROMREGION_DISPOSE ) |
| 373 | ROM_LOAD( "2-l1.bin", 0x00000, 0x4000, CRC(2528bec6) SHA1(29f7719f18faad6bd1ec6735cc24e69168361470) ) /* sprites */ | |
| 374 | ROM_LOAD( "2-l2.bin", 0x04000, 0x4000, CRC(f89287aa) SHA1(136fff6d2a4f48a488fc7c620213761459c3ada0) ) | |
| 375 | ROM_LOAD( "2-n1.bin", 0x08000, 0x4000, CRC(024418f8) SHA1(145b8d5d6c8654cd090955a98f6dd8c8dbafe7c1) ) | |
| 376 | ROM_LOAD( "2-n2.bin", 0x0c000, 0x4000, CRC(e2c7e489) SHA1(d4b5d575c021f58f6966df189df94e08c5b3621c) ) | |
| 377 | ROM_LOAD( "sr-14.l1", 0x00000, 0x4000, CRC(2528bec6) SHA1(29f7719f18faad6bd1ec6735cc24e69168361470) ) /* sprites */ | |
| 378 | ROM_LOAD( "sr-15.l2", 0x04000, 0x4000, CRC(f89287aa) SHA1(136fff6d2a4f48a488fc7c620213761459c3ada0) ) | |
| 379 | ROM_LOAD( "sr-16.n1", 0x08000, 0x4000, CRC(024418f8) SHA1(145b8d5d6c8654cd090955a98f6dd8c8dbafe7c1) ) | |
| 380 | ROM_LOAD( "sr-17.n2", 0x0c000, 0x4000, CRC(e2c7e489) SHA1(d4b5d575c021f58f6966df189df94e08c5b3621c) ) | |
| 377 | 381 | |
| 378 | 382 | ROM_REGION( 0x0a00, REGION_PROMS, 0 ) |
| 379 | ROM_LOAD( "08e_sb-5.bin", 0x0000, 0x0100, CRC(93ab8153) SHA1(a792f24e5c0c3c4a6b436102e7a98199f878ece1) ) /* red component */ | |
| 380 | ROM_LOAD( "09e_sb-6.bin", 0x0100, 0x0100, CRC(8ab44f7d) SHA1(f74680a6a987d74b3acb32e6396f20e127874149) ) /* green component */ | |
| 381 | ROM_LOAD( "10e_sb-7.bin", 0x0200, 0x0100, CRC(f4ade9a4) SHA1(62ad31d31d183cce213b03168daa035083b2f28e) ) /* blue component */ | |
| 382 | ROM_LOAD( "f01_sb-0.bin", 0x0300, 0x0100, CRC(6047d91b) SHA1(1ce025f9524c1033e48c5294ee7d360f8bfebe8d) ) /* char lookup table */ | |
| 383 | ROM_LOAD( "06d_sb-4.bin", 0x0400, 0x0100, CRC(4858968d) SHA1(20b5dbcaa1a4081b3139e7e2332d8fe3c9e55ed6) ) /* tile lookup table */ | |
| 384 | ROM_LOAD( "03k_sb-8.bin", 0x0500, 0x0100, CRC(f6fad943) SHA1(b0a24ea7805272e8ebf72a99b08907bc00d5f82f) ) /* sprite lookup table */ | |
| 385 | ROM_LOAD( "01d_sb-2.bin", 0x0600, 0x0100, CRC(8bb8b3df) SHA1(49de2819c4c92057fedcb20425282515d85829aa) ) /* tile palette selector? (not used) */ | |
| 386 | ROM_LOAD( "02d_sb-3.bin", 0x0700, 0x0100, CRC(3b0c99af) SHA1(38f30ac1e48632634e409f328ee3051b987de7ad) ) /* tile palette selector? (not used) */ | |
| 387 | ROM_LOAD( "k06_sb-1.bin", 0x0800, 0x0100, CRC(712ac508) SHA1(5349d722ab6733afdda65f6e0a98322f0d515e86) ) /* interrupt timing (not used) */ | |
| 388 | ROM_LOAD( "01m_sb-9.bin", 0x0900, 0x0100, CRC(4921635c) SHA1(aee37d6cdc36acf0f11ff5f93e7b16e4b12f6c39) ) /* video timing? (not used) */ | |
| 383 | ROM_LOAD( "sb-5.e8", 0x0000, 0x0100, CRC(93ab8153) SHA1(a792f24e5c0c3c4a6b436102e7a98199f878ece1) ) /* red component */ | |
| 384 | ROM_LOAD( "sb-6.e9", 0x0100, 0x0100, CRC(8ab44f7d) SHA1(f74680a6a987d74b3acb32e6396f20e127874149) ) /* green component */ | |
| 385 | ROM_LOAD( "sb-7.e10", 0x0200, 0x0100, CRC(f4ade9a4) SHA1(62ad31d31d183cce213b03168daa035083b2f28e) ) /* blue component */ | |
| 386 | ROM_LOAD( "sb-0.f1", 0x0300, 0x0100, CRC(6047d91b) SHA1(1ce025f9524c1033e48c5294ee7d360f8bfebe8d) ) /* char lookup table */ | |
| 387 | ROM_LOAD( "sb-4.d6", 0x0400, 0x0100, CRC(4858968d) SHA1(20b5dbcaa1a4081b3139e7e2332d8fe3c9e55ed6) ) /* tile lookup table */ | |
| 388 | ROM_LOAD( "sb-8.k3", 0x0500, 0x0100, CRC(f6fad943) SHA1(b0a24ea7805272e8ebf72a99b08907bc00d5f82f) ) /* sprite lookup table */ | |
| 389 | ROM_LOAD( "sb-2.d1", 0x0600, 0x0100, CRC(8bb8b3df) SHA1(49de2819c4c92057fedcb20425282515d85829aa) ) /* tile palette selector? (not used) */ | |
| 390 | ROM_LOAD( "sb-3.d2", 0x0700, 0x0100, CRC(3b0c99af) SHA1(38f30ac1e48632634e409f328ee3051b987de7ad) ) /* tile palette selector? (not used) */ | |
| 391 | ROM_LOAD( "sb-1.k6", 0x0800, 0x0100, CRC(712ac508) SHA1(5349d722ab6733afdda65f6e0a98322f0d515e86) ) /* interrupt timing (not used) */ | |
| 392 | ROM_LOAD( "sb-9.m11", 0x0900, 0x0100, CRC(4921635c) SHA1(aee37d6cdc36acf0f11ff5f93e7b16e4b12f6c39) ) /* video timing? (not used) */ | |
| 389 | 393 | ROM_END |
| 390 | 394 | |
| 391 | 395 | ROM_START( 1942b ) |
| 392 | 396 | ROM_REGION( 0x1c000, REGION_CPU1, 0 ) /* 64k for code + 3*16k for the banked ROMs images */ |
| 393 | ROM_LOAD( "srb-03.n3", 0x00000, 0x4000, CRC(d9dafcc3) SHA1(a089a9bc55fb7d6d0ac53f91b258396d5d62677a) ) | |
| 394 | ROM_LOAD( "srb-04.n4", 0x04000, 0x4000, CRC(da0cf924) SHA1(856fbb302c9a4ec7850a26ab23dab8467f79bba4) ) | |
| 395 | ROM_LOAD( "srb-05.n5", 0x10000, 0x4000, CRC(d102911c) SHA1(35ba1d82bd901940f61d8619273463d02fc0a952) ) | |
| 396 | ROM_LOAD( "srb-06.n6", 0x14000, 0x2000, CRC(466f8248) SHA1(2ccc8fc59962d3001fbc10e8d2f20a254a74f251) ) | |
| 397 | ROM_LOAD( "srb-07.n7", 0x18000, 0x4000, CRC(0d31038c) SHA1(b588eaf6fddd66ecb2d9832dc197f286f1ccd846) ) | |
| 397 | ROM_LOAD( "sr-03.m3", 0x00000, 0x4000, CRC(612975f2) SHA1(f3744335862dd4c53925cc32792badd4a378c837) ) | |
| 398 | ROM_LOAD( "sr-04.m4", 0x04000, 0x4000, CRC(a60ac644) SHA1(f37862db3cf5e6cc9ab3276f3bc45fd629fd70dd) ) | |
| 399 | ROM_LOAD( "sr-05.m5", 0x10000, 0x4000, CRC(835f7b24) SHA1(24b66827f08c43fbf5b9517d638acdfc38e1b1e7) ) | |
| 400 | ROM_LOAD( "sr-06.m6", 0x14000, 0x2000, CRC(821c6481) SHA1(06becb6bf8b4bde3a458098498eecad566a87711) ) | |
| 401 | ROM_LOAD( "sr-07.m7", 0x18000, 0x4000, CRC(5df525e1) SHA1(70cd2910e2945db76bd6ebfa0ff09a5efadc2d0b) ) | |
| 398 | 402 | |
| 399 | 403 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) |
| 400 | ROM_LOAD( " | |
| 404 | ROM_LOAD( "sr-01.c11 | |
| 401 | 405 | |
| 402 | 406 | ROM_REGION( 0x2000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 403 | ROM_LOAD( " | |
| 407 | ROM_LOAD( "sr-02.f2 | |
| 404 | 408 | |
| 405 | 409 | ROM_REGION( 0xc000, REGION_GFX2, ROMREGION_DISPOSE ) |
| 406 | ROM_LOAD( "2-a1.bin", 0x0000, 0x2000, CRC(3884d9eb) SHA1(5cbd9215fa5ba5a61208b383700adc4428521aed) ) /* tiles */ | |
| 407 | ROM_LOAD( "2-a2.bin", 0x2000, 0x2000, CRC(999cf6e0) SHA1(5b8b685038ec98b781908b92eb7fb9506db68544) ) | |
| 408 | ROM_LOAD( "2-a3.bin", 0x4000, 0x2000, CRC(8edb273a) SHA1(85fdd4c690ed31e6396e3c16aa02140ee7ea2d61) ) | |
| 409 | ROM_LOAD( "2-a4.bin", 0x6000, 0x2000, CRC(3a2726c3) SHA1(187c92ef591febdcbd1d42ab850e0cbb62c00873) ) | |
| 410 | ROM_LOAD( "2-a5.bin", 0x8000, 0x2000, CRC(1bd3d8bb) SHA1(ef4dce605eb4dc8035985a415315ec61c21419c6) ) | |
| 411 | ROM_LOAD( "2-a6.bin", 0xa000, 0x2000, CRC(658f02c4) SHA1(f087d69e49e38cf3107350cde18fcf85a8fa04f0) ) | |
| 410 | ROM_LOAD( "sr-08.a1", 0x0000, 0x2000, CRC(3884d9eb) SHA1(5cbd9215fa5ba5a61208b383700adc4428521aed) ) /* tiles */ | |
| 411 | ROM_LOAD( "sr-08.a2", 0x2000, 0x2000, CRC(999cf6e0) SHA1(5b8b685038ec98b781908b92eb7fb9506db68544) ) | |
| 412 | ROM_LOAD( "sr-08.a3", 0x4000, 0x2000, CRC(8edb273a) SHA1(85fdd4c690ed31e6396e3c16aa02140ee7ea2d61) ) | |
| 413 | ROM_LOAD( "sr-08.a4", 0x6000, 0x2000, CRC(3a2726c3) SHA1(187c92ef591febdcbd1d42ab850e0cbb62c00873) ) | |
| 414 | ROM_LOAD( "sr-08.a5", 0x8000, 0x2000, CRC(1bd3d8bb) SHA1(ef4dce605eb4dc8035985a415315ec61c21419c6) ) | |
| 415 | ROM_LOAD( "sr-08.a6", 0xa000, 0x2000, CRC(658f02c4) SHA1(f087d69e49e38cf3107350cde18fcf85a8fa04f0) ) | |
| 412 | 416 | |
| 413 | 417 | ROM_REGION( 0x10000, REGION_GFX3, ROMREGION_DISPOSE ) |
| 414 | ROM_LOAD( "2-l1.bin", 0x00000, 0x4000, CRC(2528bec6) SHA1(29f7719f18faad6bd1ec6735cc24e69168361470) ) /* sprites */ | |
| 415 | ROM_LOAD( "2-l2.bin", 0x04000, 0x4000, CRC(f89287aa) SHA1(136fff6d2a4f48a488fc7c620213761459c3ada0) ) | |
| 416 | ROM_LOAD( "2-n1.bin", 0x08000, 0x4000, CRC(024418f8) SHA1(145b8d5d6c8654cd090955a98f6dd8c8dbafe7c1) ) | |
| 417 | ROM_LOAD( "2-n2.bin", 0x0c000, 0x4000, CRC(e2c7e489) SHA1(d4b5d575c021f58f6966df189df94e08c5b3621c) ) | |
| 418 | ROM_LOAD( "sr-14.l1", 0x00000, 0x4000, CRC(2528bec6) SHA1(29f7719f18faad6bd1ec6735cc24e69168361470) ) /* sprites */ | |
| 419 | ROM_LOAD( "sr-15.l2", 0x04000, 0x4000, CRC(f89287aa) SHA1(136fff6d2a4f48a488fc7c620213761459c3ada0) ) | |
| 420 | ROM_LOAD( "sr-16.n1", 0x08000, 0x4000, CRC(024418f8) SHA1(145b8d5d6c8654cd090955a98f6dd8c8dbafe7c1) ) | |
| 421 | ROM_LOAD( "sr-17.n2", 0x0c000, 0x4000, CRC(e2c7e489) SHA1(d4b5d575c021f58f6966df189df94e08c5b3621c) ) | |
| 418 | 422 | |
| 419 | 423 | ROM_REGION( 0x0a00, REGION_PROMS, 0 ) |
| 420 | ROM_LOAD( "08e_sb-5.bin", 0x0000, 0x0100, CRC(93ab8153) SHA1(a792f24e5c0c3c4a6b436102e7a98199f878ece1) ) /* red component */ | |
| 421 | ROM_LOAD( "09e_sb-6.bin", 0x0100, 0x0100, CRC(8ab44f7d) SHA1(f74680a6a987d74b3acb32e6396f20e127874149) ) /* green component */ | |
| 422 | ROM_LOAD( "10e_sb-7.bin", 0x0200, 0x0100, CRC(f4ade9a4) SHA1(62ad31d31d183cce213b03168daa035083b2f28e) ) /* blue component */ | |
| 423 | ROM_LOAD( "f01_sb-0.bin", 0x0300, 0x0100, CRC(6047d91b) SHA1(1ce025f9524c1033e48c5294ee7d360f8bfebe8d) ) /* char lookup table */ | |
| 424 | ROM_LOAD( "06d_sb-4.bin", 0x0400, 0x0100, CRC(4858968d) SHA1(20b5dbcaa1a4081b3139e7e2332d8fe3c9e55ed6) ) /* tile lookup table */ | |
| 425 | ROM_LOAD( "03k_sb-8.bin", 0x0500, 0x0100, CRC(f6fad943) SHA1(b0a24ea7805272e8ebf72a99b08907bc00d5f82f) ) /* sprite lookup table */ | |
| 426 | ROM_LOAD( "01d_sb-2.bin", 0x0600, 0x0100, CRC(8bb8b3df) SHA1(49de2819c4c92057fedcb20425282515d85829aa) ) /* tile palette selector? (not used) */ | |
| 427 | ROM_LOAD( "02d_sb-3.bin", 0x0700, 0x0100, CRC(3b0c99af) SHA1(38f30ac1e48632634e409f328ee3051b987de7ad) ) /* tile palette selector? (not used) */ | |
| 428 | ROM_LOAD( "k06_sb-1.bin", 0x0800, 0x0100, CRC(712ac508) SHA1(5349d722ab6733afdda65f6e0a98322f0d515e86) ) /* interrupt timing (not used) */ | |
| 429 | ROM_LOAD( "01m_sb-9.bin", 0x0900, 0x0100, CRC(4921635c) SHA1(aee37d6cdc36acf0f11ff5f93e7b16e4b12f6c39) ) /* video timing? (not used) */ | |
| 424 | ROM_LOAD( "sb-5.e8", 0x0000, 0x0100, CRC(93ab8153) SHA1(a792f24e5c0c3c4a6b436102e7a98199f878ece1) ) /* red component */ | |
| 425 | ROM_LOAD( "sb-6.e9", 0x0100, 0x0100, CRC(8ab44f7d) SHA1(f74680a6a987d74b3acb32e6396f20e127874149) ) /* green component */ | |
| 426 | ROM_LOAD( "sb-7.e10", 0x0200, 0x0100, CRC(f4ade9a4) SHA1(62ad31d31d183cce213b03168daa035083b2f28e) ) /* blue component */ | |
| 427 | ROM_LOAD( "sb-0.f1", 0x0300, 0x0100, CRC(6047d91b) SHA1(1ce025f9524c1033e48c5294ee7d360f8bfebe8d) ) /* char lookup table */ | |
| 428 | ROM_LOAD( "sb-4.d6", 0x0400, 0x0100, CRC(4858968d) SHA1(20b5dbcaa1a4081b3139e7e2332d8fe3c9e55ed6) ) /* tile lookup table */ | |
| 429 | ROM_LOAD( "sb-8.k3", 0x0500, 0x0100, CRC(f6fad943) SHA1(b0a24ea7805272e8ebf72a99b08907bc00d5f82f) ) /* sprite lookup table */ | |
| 430 | ROM_LOAD( "sb-2.d1", 0x0600, 0x0100, CRC(8bb8b3df) SHA1(49de2819c4c92057fedcb20425282515d85829aa) ) /* tile palette selector? (not used) */ | |
| 431 | ROM_LOAD( "sb-3.d2", 0x0700, 0x0100, CRC(3b0c99af) SHA1(38f30ac1e48632634e409f328ee3051b987de7ad) ) /* tile palette selector? (not used) */ | |
| 432 | ROM_LOAD( "sb-1.k6", 0x0800, 0x0100, CRC(712ac508) SHA1(5349d722ab6733afdda65f6e0a98322f0d515e86) ) /* interrupt timing (not used) */ | |
| 433 | ROM_LOAD( "sb-9.m11", 0x0900, 0x0100, CRC(4921635c) SHA1(aee37d6cdc36acf0f11ff5f93e7b16e4b12f6c39) ) /* video timing? (not used) */ | |
| 430 | 434 | ROM_END |
| 431 | 435 | |
| 436 | ROM_START( 1942w ) | |
| 437 | ROM_REGION( 0x1c000, REGION_CPU1, 0 ) /* 64k for code + 3*16k for the banked ROMs images */ | |
| 438 | ROM_LOAD( "sw-03.m3", 0x00000, 0x4000, CRC(afd79770) SHA1(74c7a887fe3d4abfce1dcfec4c75b21ab81adc8c) ) | |
| 439 | ROM_LOAD( "sw-04.m4", 0x04000, 0x4000, CRC(933d9910) SHA1(9c73ef880f56e30a865be959f8bbdbe79c7ef8e2) ) | |
| 440 | ROM_LOAD( "sw-05.m5", 0x10000, 0x4000, CRC(e9a71bb6) SHA1(1f0d52c9282d15f9e4898b3b144ece25d345b71f) ) | |
| 441 | ROM_LOAD( "sw-06.m6", 0x14000, 0x2000, CRC(466f8248) SHA1(2ccc8fc59962d3001fbc10e8d2f20a254a74f251) ) /* matches srb-06.m6 from 1942 (Revision B) */ | |
| 442 | ROM_LOAD( "sw-07.m7", 0x18000, 0x4000, CRC(ec41655e) SHA1(dbe4bb11f2e88574cb43ba5cd216354c3b7f69a6) ) | |
| 432 | 443 | |
| 444 | ROM_REGION( 0x10000, REGION_CPU2, 0 ) | |
| 445 | ROM_LOAD( "sr-01.c11", 0x0000, 0x4000, CRC(bd87f06b) SHA1(821f85cf157f81117eeaba0c3cf0337eac357e58) ) | |
| 446 | ||
| 447 | ROM_REGION( 0x2000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 448 | ROM_LOAD( "sw-02.f2", 0x0000, 0x2000, CRC(f8e9ada2) SHA1(028f554e70425c53faa30a6fe1c45cc16724560a) ) /* characters */ | |
| 449 | ||
| 450 | ROM_REGION( 0xc000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 451 | ROM_LOAD( "sr-08.a1", 0x0000, 0x2000, CRC(3884d9eb) SHA1(5cbd9215fa5ba5a61208b383700adc4428521aed) ) /* tiles */ | |
| 452 | ROM_LOAD( "sr-08.a2", 0x2000, 0x2000, CRC(999cf6e0) SHA1(5b8b685038ec98b781908b92eb7fb9506db68544) ) | |
| 453 | ROM_LOAD( "sr-08.a3", 0x4000, 0x2000, CRC(8edb273a) SHA1(85fdd4c690ed31e6396e3c16aa02140ee7ea2d61) ) | |
| 454 | ROM_LOAD( "sr-08.a4", 0x6000, 0x2000, CRC(3a2726c3) SHA1(187c92ef591febdcbd1d42ab850e0cbb62c00873) ) | |
| 455 | ROM_LOAD( "sr-08.a5", 0x8000, 0x2000, CRC(1bd3d8bb) SHA1(ef4dce605eb4dc8035985a415315ec61c21419c6) ) | |
| 456 | ROM_LOAD( "sr-08.a6", 0xa000, 0x2000, CRC(658f02c4) SHA1(f087d69e49e38cf3107350cde18fcf85a8fa04f0) ) | |
| 457 | ||
| 458 | ROM_REGION( 0x10000, REGION_GFX3, ROMREGION_DISPOSE ) | |
| 459 | ROM_LOAD( "sr-14.l1", 0x00000, 0x4000, CRC(2528bec6) SHA1(29f7719f18faad6bd1ec6735cc24e69168361470) ) /* sprites */ | |
| 460 | ROM_LOAD( "sr-15.l2", 0x04000, 0x4000, CRC(f89287aa) SHA1(136fff6d2a4f48a488fc7c620213761459c3ada0) ) | |
| 461 | ROM_LOAD( "sr-16.n1", 0x08000, 0x4000, CRC(024418f8) SHA1(145b8d5d6c8654cd090955a98f6dd8c8dbafe7c1) ) | |
| 462 | ROM_LOAD( "sr-17.n2", 0x0c000, 0x4000, CRC(e2c7e489) SHA1(d4b5d575c021f58f6966df189df94e08c5b3621c) ) | |
| 463 | ||
| 464 | ROM_REGION( 0x0a00, REGION_PROMS, 0 ) | |
| 465 | ROM_LOAD( "sb-5.e8", 0x0000, 0x0100, CRC(93ab8153) SHA1(a792f24e5c0c3c4a6b436102e7a98199f878ece1) ) /* red component */ | |
| 466 | ROM_LOAD( "sb-6.e9", 0x0100, 0x0100, CRC(8ab44f7d) SHA1(f74680a6a987d74b3acb32e6396f20e127874149) ) /* green component */ | |
| 467 | ROM_LOAD( "sb-7.e10", 0x0200, 0x0100, CRC(f4ade9a4) SHA1(62ad31d31d183cce213b03168daa035083b2f28e) ) /* blue component */ | |
| 468 | ROM_LOAD( "sb-0.f1", 0x0300, 0x0100, CRC(6047d91b) SHA1(1ce025f9524c1033e48c5294ee7d360f8bfebe8d) ) /* char lookup table */ | |
| 469 | ROM_LOAD( "sb-4.d6", 0x0400, 0x0100, CRC(4858968d) SHA1(20b5dbcaa1a4081b3139e7e2332d8fe3c9e55ed6) ) /* tile lookup table */ | |
| 470 | ROM_LOAD( "sb-8.k3", 0x0500, 0x0100, CRC(f6fad943) SHA1(b0a24ea7805272e8ebf72a99b08907bc00d5f82f) ) /* sprite lookup table */ | |
| 471 | ROM_LOAD( "sb-2.d1", 0x0600, 0x0100, CRC(8bb8b3df) SHA1(49de2819c4c92057fedcb20425282515d85829aa) ) /* tile palette selector? (not used) */ | |
| 472 | ROM_LOAD( "sb-3.d2", 0x0700, 0x0100, CRC(3b0c99af) SHA1(38f30ac1e48632634e409f328ee3051b987de7ad) ) /* tile palette selector? (not used) */ | |
| 473 | ROM_LOAD( "sb-1.k6", 0x0800, 0x0100, CRC(712ac508) SHA1(5349d722ab6733afdda65f6e0a98322f0d515e86) ) /* interrupt timing (not used) */ | |
| 474 | ROM_LOAD( "sb-9.m11", 0x0900, 0x0100, CRC(4921635c) SHA1(aee37d6cdc36acf0f11ff5f93e7b16e4b12f6c39) ) /* video timing? (not used) */ | |
| 475 | ROM_END | |
| 476 | ||
| 477 | ||
| 433 | 478 | static DRIVER_INIT( 1942 ) |
| 434 | 479 | { |
| 435 | 480 | UINT8 *ROM = memory_region(REGION_CPU1); |
| r2454 | r2455 | |
| 437 | 482 | } |
| 438 | 483 | |
| 439 | 484 | |
| 440 | GAME( 1984, 1942, 0, 1942, 1942, 1942, ROT270, "Capcom", "1942 (set 1)", GAME_SUPPORTS_SAVE ) | |
| 441 | GAME( 1984, 1942a, 1942, 1942, 1942, 1942, ROT270, "Capcom", "1942 (set 2)", GAME_SUPPORTS_SAVE ) | |
| 442 | GAME( 1984, 1942b, 1942, 1942, 1942, 1942, ROT270, "Capcom", "1942 (set 3)", GAME_SUPPORTS_SAVE ) | |
| 485 | GAME( 1984, 1942, 0, 1942, 1942, 1942, ROT270, "Capcom", "1942 (Revision B)", GAME_SUPPORTS_SAVE ) | |
| 486 | GAME( 1984, 1942a, 1942, 1942, 1942, 1942, ROT270, "Capcom", "1942 (Revision A)", GAME_SUPPORTS_SAVE ) | |
| 487 | GAME( 1984, 1942b, 1942, 1942, 1942, 1942, ROT270, "Capcom", "1942 (First Version)", GAME_SUPPORTS_SAVE ) | |
| 488 | GAME( 1985, 1942w, 1942, 1942, 1942, 1942, ROT270, "Capcom (Williams Electronics license)", "1942 (Williams Electronics license)", GAME_SUPPORTS_SAVE ) /* Based on 1942 (Revision B) */ |
| r2454 | r2455 | |
|---|---|---|
| 263 | 263 | |
| 264 | 264 | static const struct YM2203interface ym2203_interface = |
| 265 | 265 | { |
| 266 | input_port_0_r, | |
| 267 | input_port_1_r | |
| 266 | { | |
| 267 | AY8910_LEGACY_OUTPUT, | |
| 268 | AY8910_DEFAULT_LOADS, | |
| 269 | input_port_0_r, | |
| 270 | input_port_1_r, | |
| 271 | NULL, | |
| 272 | NULL | |
| 273 | }, | |
| 274 | NULL | |
| 268 | 275 | }; |
| 269 | 276 | |
| 270 | 277 | static MACHINE_DRIVER_START( mayumi ) |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "poolshrk.h" |
| 10 | 9 | #include "sound/discrete.h" |
| 11 | 10 | |
| r2454 | r2455 | |
| 91 | 90 | |
| 92 | 91 | static READ8_HANDLER( poolshrk_irq_reset_r ) |
| 93 | 92 | { |
| 94 | cpunum_set_input_line( | |
| 93 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 95 | 94 | |
| 96 | 95 | return 0; |
| 97 | 96 | } |
| r2454 | r2455 | |
|---|---|---|
| 228 | 228 | |
| 229 | 229 | static VIDEO_EOF( raiden ) |
| 230 | 230 | { |
| 231 | buffer_spriteram16_w(machine,0,0,0); /* Could be a memory location instead */ | |
| 231 | buffer_spriteram16_w(machine,0,0,0xffff); /* Could be a memory location instead */ | |
| 232 | 232 | } |
| 233 | 233 | |
| 234 | 234 | static MACHINE_DRIVER_START( raiden ) |
| r2454 | r2455 | |
|---|---|---|
| 25 | 25 | { |
| 26 | 26 | switch(mem_mask) |
| 27 | 27 | { |
| 28 | case 0: | |
| 29 | vega_vram_w(machine,offset,data,0x00ffffff); | |
| 30 | vega_vram_w(machine,offset,data,0xff00ffff); | |
| 31 | vega_vram_w(machine,offset,data,0xffff00ff); | |
| 32 | vega_vram_w(machine,offset,data,0xffffff00); | |
| 28 | case 0xffffffff: | |
| 29 | vega_vram_w(machine,offset,data,0xff000000); | |
| 30 | vega_vram_w(machine,offset,data,0x00ff0000); | |
| 31 | vega_vram_w(machine,offset,data,0x0000ff00); | |
| 32 | vega_vram_w(machine,offset,data,0x000000ff); | |
| 33 | 33 | return; |
| 34 | 34 | |
| 35 | case 0x0000ffff: | |
| 36 | vega_vram_w(machine,offset,data,0x00ffffff); | |
| 37 | vega_vram_w(machine,offset,data,0xff00ffff); | |
| 35 | case 0xffff0000: | |
| 36 | vega_vram_w(machine,offset,data,0xff000000); | |
| 37 | vega_vram_w(machine,offset,data,0x00ff0000); | |
| 38 | 38 | return; |
| 39 | 39 | |
| 40 | case 0xffff0000: | |
| 41 | vega_vram_w(machine,offset,data,0xffff00ff); | |
| 42 | vega_vram_w(machine,offset,data,0xffffff00); | |
| 40 | case 0x0000ffff: | |
| 41 | vega_vram_w(machine,offset,data,0x0000ff00); | |
| 42 | vega_vram_w(machine,offset,data,0x000000ff); | |
| 43 | 43 | return; |
| 44 | 44 | |
| 45 | 45 | default: |
| 46 | 46 | // don't write transparent pen |
| 47 | if((data & | |
| 47 | if((data & | |
| 48 | 48 | return; |
| 49 | 49 | } |
| 50 | 50 | |
| r2454 | r2455 | |
| 63 | 63 | COMBINE_DATA(&paletteram32[offset]); |
| 64 | 64 | |
| 65 | 65 | paldata = paletteram32[offset] & 0x7fff; |
| 66 | palette_set_color_rgb( | |
| 66 | palette_set_color_rgb(machine, offset, pal5bit(paldata >> 10), pal5bit(paldata >> 5), pal5bit(paldata >> 0)); | |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | static WRITE32_HANDLER( vega_misc_w ) |
| r2454 | r2455 | |
|---|---|---|
| 244 | 244 | { |
| 245 | 245 | fromanc2_datalatch1 = data; |
| 246 | 246 | |
| 247 | cpunum_set_input_line( | |
| 247 | cpunum_set_input_line(machine, 2, 0, HOLD_LINE); | |
| 248 | 248 | fromanc2_subcpu_int_flag = 0; |
| 249 | 249 | } |
| 250 | 250 | |
| 251 | 251 | static READ16_HANDLER( fromanc2_subcpu_r ) |
| 252 | 252 | { |
| 253 | cpunum_set_input_line( | |
| 253 | cpunum_set_input_line(machine, 2, INPUT_LINE_NMI, PULSE_LINE); | |
| 254 | 254 | fromanc2_subcpu_nmi_flag = 0; |
| 255 | 255 | |
| 256 | 256 | return (fromanc2_datalatch_2h << 8) | fromanc2_datalatch_2l; |
| r2454 | r2455 | |
|---|---|---|
| 183 | 183 | ***************************************************************************/ |
| 184 | 184 | |
| 185 | 185 | #include "driver.h" |
| 186 | #include "deprecat.h" | |
| 187 | 186 | #include "audio/timeplt.h" |
| 188 | 187 | #include "sound/namco.h" |
| 189 | 188 | #include "sound/samples.h" |
| r2454 | r2455 | |
| 208 | 207 | static WRITE8_HANDLER( rallyx_interrupt_vector_w ) |
| 209 | 208 | { |
| 210 | 209 | cpunum_set_input_line_vector(0, 0, data); |
| 211 | cpunum_set_input_line( | |
| 210 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 212 | 211 | } |
| 213 | 212 | |
| 214 | 213 | |
| r2454 | r2455 | |
| 237 | 236 | case 0x01: /* INT ON */ |
| 238 | 237 | cpu_interrupt_enable(0,bit); |
| 239 | 238 | if (!bit) |
| 240 | cpunum_set_input_line( | |
| 239 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 241 | 240 | break; |
| 242 | 241 | |
| 243 | 242 | case 0x02: /* SOUND ON */ |
| r2454 | r2455 | |
|---|---|---|
| 219 | 219 | static READ32_HANDLER( zeropnt2_dsw2_r ) { return (input_port_read(machine, "DSW2") << 16) | 0xffff; } |
| 220 | 220 | static READ32_HANDLER( zeropnt2_buttons_r ) { return ((input_port_read(machine, "IN7") | ((EEPROM_read_bit() & 0x01) << 7)) << 16) | 0xffff; } |
| 221 | 221 | |
| 222 | static READ32_HANDLER( zeropnt2_gunx_0_msb_r ) { return (unico_gunx_0_msb_r(machine,0,0)-0x0800) << 16; } | |
| 223 | static READ32_HANDLER( zeropnt2_guny_0_msb_r ) { return (unico_guny_0_msb_r(machine,0,0)+0x0800) << 16; } | |
| 224 | static READ32_HANDLER( zeropnt2_gunx_1_msb_r ) { return (unico_gunx_1_msb_r(machine,0,0)-0x0800) << 16; } | |
| 225 | static READ32_HANDLER( zeropnt2_guny_1_msb_r ) { return (unico_guny_1_msb_r(machine,0,0)+0x0800) << 16; } | |
| 222 | static READ32_HANDLER( zeropnt2_gunx_0_msb_r ) { return (unico_gunx_0_msb_r(machine,0,0xffff)-0x0800) << 16; } | |
| 223 | static READ32_HANDLER( zeropnt2_guny_0_msb_r ) { return (unico_guny_0_msb_r(machine,0,0xffff)+0x0800) << 16; } | |
| 224 | static READ32_HANDLER( zeropnt2_gunx_1_msb_r ) { return (unico_gunx_1_msb_r(machine,0,0xffff)-0x0800) << 16; } | |
| 225 | static READ32_HANDLER( zeropnt2_guny_1_msb_r ) { return (unico_guny_1_msb_r(machine,0,0xffff)+0x0800) << 16; } | |
| 226 | 226 | |
| 227 | 227 | static READ32_HANDLER ( zeropnt2_oki0_r ) { return OKIM6295_status_0_r(machine,0) << 16; } |
| 228 | 228 | static READ32_HANDLER ( zeropnt2_oki1_r ) { return OKIM6295_status_1_r(machine,0) << 16; } |
| r2454 | r2455 | |
|---|---|---|
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | |
| 22 | 22 | #include "driver.h" |
| 23 | #include "deprecat.h" | |
| 24 | 23 | #include "cpu/konami/konami.h" /* for the callback and the firq irq definition */ |
| 25 | 24 | #include "video/konamiic.h" |
| 26 | 25 | #include "sound/2151intf.h" |
| r2454 | r2455 | |
| 61 | 60 | |
| 62 | 61 | static WRITE8_HANDLER( blockhl_sh_irqtrigger_w ) |
| 63 | 62 | { |
| 64 | cpunum_set_input_line_and_vector( | |
| 63 | cpunum_set_input_line_and_vector(machine, 1, 0, HOLD_LINE, 0xff); | |
| 65 | 64 | } |
| 66 | 65 | |
| 67 | 66 |
| r2454 | r2455 | |
|---|---|---|
| 81 | 81 | switch (offset) |
| 82 | 82 | { |
| 83 | 83 | case 0x80/2: |
| 84 | return input_port_ | |
| 84 | return input_port_ | |
| 85 | 85 | |
| 86 | 86 | case 0x84/2: |
| 87 | return input_port_ | |
| 87 | return input_port_ | |
| 88 | 88 | |
| 89 | 89 | case 0x86/2: |
| 90 | return input_port_ | |
| 90 | return input_port_ | |
| 91 | 91 | |
| 92 | 92 | case 0x50: |
| 93 | 93 | case 0x51: |
| r2454 | r2455 | |
|---|---|---|
| 73 | 73 | { |
| 74 | 74 | case 0x00/2: return 0xffff; |
| 75 | 75 | case 0x02/2: return 0xffff; |
| 76 | case 0x04/2: return input_port_0_word_r(machine,0,0);/*Service buttons*/ | |
| 77 | case 0x06/2: return input_port_1_word_r(machine,0,0);/*DIP 2*/ | |
| 78 | case 0x08/2: return input_port_2_word_r(machine,0,0);/*DIP 1*/ | |
| 79 | case 0x0a/2: return input_port_3_word_r(machine,0,0);/*DIP 1+2 Hi-Bits*/ | |
| 80 | case 0x0c/2: return input_port_4_word_r(machine,0,0);/*Handle 1p*/ | |
| 81 | case 0x0e/2: return input_port_5_word_r(machine,0,0);/*Buttons 1p*/ | |
| 82 | case 0x10/2: return input_port_6_word_r(machine,0,0);/*Handle 2p*/ | |
| 83 | case 0x12/2: return input_port_7_word_r(machine,0,0);/*Buttons 2p*/ | |
| 76 | case 0x04/2: return input_port_read_indexed(machine,0);/*Service buttons*/ | |
| 77 | case 0x06/2: return input_port_read_indexed(machine,1);/*DIP 2*/ | |
| 78 | case 0x08/2: return input_port_read_indexed(machine,2);/*DIP 1*/ | |
| 79 | case 0x0a/2: return input_port_read_indexed(machine,3);/*DIP 1+2 Hi-Bits*/ | |
| 80 | case 0x0c/2: return input_port_read_indexed(machine,4);/*Handle 1p*/ | |
| 81 | case 0x0e/2: return input_port_read_indexed(machine,5);/*Buttons 1p*/ | |
| 82 | case 0x10/2: return input_port_read_indexed(machine,6);/*Handle 2p*/ | |
| 83 | case 0x12/2: return input_port_read_indexed(machine,7);/*Buttons 2p*/ | |
| 84 | 84 | } |
| 85 | 85 | return 0xffff; |
| 86 | 86 | } |
| r2454 | r2455 | |
| 92 | 92 | switch(offset) |
| 93 | 93 | { |
| 94 | 94 | case 0x00/2: return 0xffff; |
| 95 | case 0x02/2: return input_port_ | |
| 95 | case 0x02/2: return input_port_ | |
| 96 | 96 | /*DSW,same handling as realbrk*/ |
| 97 | 97 | case 0x04/2: |
| 98 | if (sel & 0x01) return (input_port_1_word_r(machine,0,0) & 0x00ff) << 8; // DSW1 low bits | |
| 99 | if (sel & 0x02) return (input_port_2_word_r(machine,0,0) & 0x00ff) << 8; // DSW2 low bits | |
| 100 | if (sel & 0x04) return (input_port_3_word_r(machine,0,0) & 0x00ff) << 8; // DSW3 low bits | |
| 101 | if (sel & 0x08) return (input_port_4_word_r(machine,0,0) & 0x00ff) << 8; // DSW4 low bits | |
| 98 | if (sel & 0x01) return (input_port_read_indexed(machine,1) & 0x00ff) << 8; // DSW1 low bits | |
| 99 | if (sel & 0x02) return (input_port_read_indexed(machine,2) & 0x00ff) << 8; // DSW2 low bits | |
| 100 | if (sel & 0x04) return (input_port_read_indexed(machine,3) & 0x00ff) << 8; // DSW3 low bits | |
| 101 | if (sel & 0x08) return (input_port_read_indexed(machine,4) & 0x00ff) << 8; // DSW4 low bits | |
| 102 | 102 | |
| 103 | if (sel & 0x10) return ((input_port_1_word_r(machine,0,0) & 0x0300) << 0) | // DSWs high 2 bits | |
| 104 | ((input_port_2_word_r(machine,0,0) & 0x0300) << 2) | | |
| 105 | ((input_port_3_word_r(machine,0,0) & 0x0300) << 4) | | |
| 106 | ((input_port_4_word_r(machine,0,0) & 0x0300) << 6) ; | |
| 103 | if (sel & 0x10) return ((input_port_read_indexed(machine,1) & 0x0300) << 0) | // DSWs high 2 bits | |
| 104 | ((input_port_read_indexed(machine,2) & 0x0300) << 2) | | |
| 105 | ((input_port_read_indexed(machine,3) & 0x0300) << 4) | | |
| 106 | ((input_port_read_indexed(machine,4) & 0x0300) << 6) ; | |
| 107 | 107 | |
| 108 | 108 | return 0xffff; |
| 109 | case 0x06/2: return input_port_6_word_r(machine,0,0);/*Buttons+Handle 2p*/ | |
| 110 | case 0x08/2: return input_port_5_word_r(machine,0,0);/*Buttons+Handle 1p*/ | |
| 109 | case 0x06/2: return input_port_read_indexed(machine,6);/*Buttons+Handle 2p*/ | |
| 110 | case 0x08/2: return input_port_read_indexed(machine,5);/*Buttons+Handle 1p*/ | |
| 111 | 111 | case 0x0a/2: return 0xffff; |
| 112 | 112 | case 0x0c/2: return 0xffff; |
| 113 | 113 | case 0x0e/2: return 0xffff; |
| r2454 | r2455 | |
|---|---|---|
| 47 | 47 | */ |
| 48 | 48 | |
| 49 | 49 | #include "driver.h" |
| 50 | #include "deprecat.h" | |
| 51 | 50 | #include "sound/okim6295.h" |
| 52 | 51 | |
| 53 | 52 | extern UINT16 *diverboy_spriteram; |
| r2454 | r2455 | |
|---|---|---|
| 34 | 34 | ***************************************************************************/ |
| 35 | 35 | |
| 36 | 36 | #include "driver.h" |
| 37 | #include "deprecat.h" | |
| 38 | 37 | #include "cpu/m68000/m68000.h" |
| 39 | 38 | #include "video/taitoic.h" |
| 40 | 39 | #include "audio/taitosnd.h" |
| r2454 | r2455 | |
| 88 | 87 | |
| 89 | 88 | if (ACCESSING_BITS_8_15) |
| 90 | 89 | { |
| 91 | cpunum_set_input_line(Machine, 2, INPUT_LINE_RESET, (data &0x200) ? CLEAR_LINE : ASSERT_LINE); | |
| 92 | if (data&0x8000) cpunum_set_input_line(Machine, 0,3,HOLD_LINE); /* Guess */ | |
| 90 | cpunum_set_input_line(machine, 2, INPUT_LINE_RESET, (data &0x200) ? CLEAR_LINE : ASSERT_LINE); | |
| 91 | if (data&0x8000) cpunum_set_input_line(machine, 0,3,HOLD_LINE); /* Guess */ | |
| 93 | 92 | } |
| 94 | 93 | |
| 95 | 94 | if (ACCESSING_BITS_0_7) |
| r2454 | r2455 | |
| 108 | 107 | g = (a &0xff00) >> 8; |
| 109 | 108 | b = (a &0xff); |
| 110 | 109 | |
| 111 | palette_set_color( | |
| 110 | palette_set_color(machine,offset,MAKE_RGB(r,g,b)); | |
| 112 | 111 | } |
| 113 | 112 | |
| 114 | 113 | static READ32_HANDLER( superchs_input_r ) |
| r2454 | r2455 | |
| 116 | 115 | switch (offset) |
| 117 | 116 | { |
| 118 | 117 | case 0x00: |
| 119 | return (input_port_ | |
| 118 | return (input_port_ | |
| 120 | 119 | (EEPROM_read_bit() << 7); |
| 121 | 120 | |
| 122 | 121 | case 0x01: |
| r2454 | r2455 | |
| 177 | 176 | |
| 178 | 177 | static READ32_HANDLER( superchs_stick_r ) |
| 179 | 178 | { |
| 180 | int fake = input_port_ | |
| 179 | int fake = input_port_ | |
| 181 | 180 | int accel; |
| 182 | 181 | |
| 183 | 182 | if (!(fake &0x10)) /* Analogue steer (the real control method) */ |
| 184 | 183 | { |
| 185 | steer = input_port_ | |
| 184 | steer = input_port_ | |
| 186 | 185 | } |
| 187 | 186 | else /* Digital steer, with smoothing - speed depends on how often stick_r is called */ |
| 188 | 187 | { |
| r2454 | r2455 | |
| 207 | 206 | } |
| 208 | 207 | |
| 209 | 208 | /* Accelerator is an analogue input but the game treats it as digital (on/off) */ |
| 210 | if (input_port_ | |
| 209 | if (input_port_ | |
| 211 | 210 | accel = 0x0; |
| 212 | 211 | else |
| 213 | 212 | accel = 0xff; |
| 214 | 213 | |
| 215 | 214 | /* Todo: Verify brake - and figure out other input */ |
| 216 | return (steer << 24) | (accel << 16) | (input_port_ | |
| 215 | return (steer << 24) | (accel << 16) | (input_port_ | |
| 217 | 216 | } |
| 218 | 217 | |
| 219 | 218 | static WRITE32_HANDLER( superchs_stick_w ) |
| r2454 | r2455 | |
| 221 | 220 | /* This is guess work - the interrupts are in groups of 4, with each writing to a |
| 222 | 221 | different byte in this long word before the RTE. I assume all but the last |
| 223 | 222 | (top) byte cause an IRQ with the final one being an ACK. (Total guess but it works). */ |
| 224 | if (mem_mask!=0x00ffffff) | |
| 225 | cpunum_set_input_line(Machine, 0,3,HOLD_LINE); | |
| 223 | if (mem_mask!=0xff000000) | |
| 224 | cpunum_set_input_line(machine, 0,3,HOLD_LINE); | |
| 226 | 225 | } |
| 227 | 226 | |
| 228 | 227 | /*********************************************************** |
| r2454 | r2455 | |
|---|---|---|
| 97 | 97 | |
| 98 | 98 | static WRITE8_HANDLER( bottom9_sh_irqtrigger_w ) |
| 99 | 99 | { |
| 100 | cpunum_set_input_line_and_vector( | |
| 100 | cpunum_set_input_line_and_vector(machine, 1,0,HOLD_LINE,0xff); | |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | static int nmienable; |
| r2454 | r2455 | |
|---|---|---|
| 54 | 54 | |
| 55 | 55 | static WRITE8_HANDLER( flower_irq_ack ) |
| 56 | 56 | { |
| 57 | cpunum_set_input_line( | |
| 57 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | |
| r2454 | r2455 | |
| 64 | 64 | { |
| 65 | 65 | sn_irq_enable = data & 1; |
| 66 | 66 | |
| 67 | cpunum_set_input_line( | |
| 67 | cpunum_set_input_line(machine, 2, 0, CLEAR_LINE); | |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | static INTERRUPT_GEN( sn_irq ) |
| 71 | 71 | { |
| 72 | 72 | if (sn_irq_enable) |
| 73 | cpunum_set_input_line( | |
| 73 | cpunum_set_input_line(machine, 2, 0, ASSERT_LINE); | |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | static WRITE8_HANDLER( sn_nmi_enable_w ) |
| r2454 | r2455 | |
|---|---|---|
| 37 | 37 | */ |
| 38 | 38 | |
| 39 | 39 | #include "driver.h" |
| 40 | #include "deprecat.h" | |
| 41 | 40 | #include "sound/okim6295.h" |
| 42 | 41 | |
| 43 | 42 | #define MASTER_CLOCK 32000000 |
| r2454 | r2455 | |
| 212 | 211 | color = offset*2; |
| 213 | 212 | |
| 214 | 213 | dat = paletteram32[offset]&0x7fff; |
| 215 | palette_set_color_rgb( | |
| 214 | palette_set_color_rgb(machine,color+1,pal5bit(dat >> 10),pal5bit(dat >> 5),pal5bit(dat >> 0)); | |
| 216 | 215 | |
| 217 | 216 | dat = (paletteram32[offset]>>16)&0x7fff; |
| 218 | palette_set_color_rgb( | |
| 217 | palette_set_color_rgb(machine,color,pal5bit(dat >> 10),pal5bit(dat >> 5),pal5bit(dat >> 0)); | |
| 219 | 218 | |
| 220 | 219 | } |
| 221 | 220 |
| r2454 | r2455 | |
|---|---|---|
| 208 | 208 | switch (offset) |
| 209 | 209 | { |
| 210 | 210 | case 0: /* 0x3a09 - NMI clear */ |
| 211 | cpunum_set_input_line( | |
| 211 | cpunum_set_input_line(machine, 0,INPUT_LINE_NMI,CLEAR_LINE); | |
| 212 | 212 | break; |
| 213 | 213 | case 1: /* 0x3a0a - FIRQ clear */ |
| 214 | cpunum_set_input_line( | |
| 214 | cpunum_set_input_line(machine, 0,M6809_FIRQ_LINE,CLEAR_LINE); | |
| 215 | 215 | break; |
| 216 | 216 | case 2: /* 0x3a0b - IRQ clear */ |
| 217 | cpunum_set_input_line( | |
| 217 | cpunum_set_input_line(machine, 0,M6809_IRQ_LINE,CLEAR_LINE); | |
| 218 | 218 | break; |
| 219 | 219 | case 3: /* 0x3a0c - IRQB assert */ |
| 220 | cpunum_set_input_line( | |
| 220 | cpunum_set_input_line(machine, 1,M6809_IRQ_LINE,ASSERT_LINE); | |
| 221 | 221 | break; |
| 222 | 222 | } |
| 223 | 223 | } |
| 224 | 224 | |
| 225 | 225 | static WRITE8_HANDLER( xain_irqA_assert_w ) |
| 226 | 226 | { |
| 227 | cpunum_set_input_line( | |
| 227 | cpunum_set_input_line(machine, 0,M6809_IRQ_LINE,ASSERT_LINE); | |
| 228 | 228 | } |
| 229 | 229 | |
| 230 | 230 | static WRITE8_HANDLER( xain_irqB_clear_w ) |
| 231 | 231 | { |
| 232 | cpunum_set_input_line( | |
| 232 | cpunum_set_input_line(machine, 1,M6809_IRQ_LINE,CLEAR_LINE); | |
| 233 | 233 | } |
| 234 | 234 | |
| 235 | 235 | static READ8_HANDLER( xain_68705_r ) |
| r2454 | r2455 | |
| 439 | 439 | |
| 440 | 440 | static const struct YM2203interface ym2203_interface = |
| 441 | 441 | { |
| 442 | 0,0,0,0,irqhandler | |
| 442 | { | |
| 443 | AY8910_LEGACY_OUTPUT, | |
| 444 | AY8910_DEFAULT_LOADS, | |
| 445 | NULL, NULL, NULL, NULL | |
| 446 | }, | |
| 447 | irqhandler | |
| 443 | 448 | }; |
| 444 | 449 | |
| 445 | 450 |
| r2454 | r2455 | |
|---|---|---|
| 4737 | 4737 | GAME( 1982, amidaro, amidar, turtles, amidaro, turtles, ROT90, "Konami (Olympia license)", "Amidar (Olympia)", GAME_SUPPORTS_SAVE ) |
| 4738 | 4738 | GAME( 1982, amidarb, amidar, turtles, amidaru, turtles, ROT90, "bootleg", "Amidar (Bootleg)", GAME_SUPPORTS_SAVE ) /* Simular to Amigo bootleg */ |
| 4739 | 4739 | GAME( 1982, amigo, amidar, turtles, amidaru, turtles, ROT90, "bootleg", "Amigo", GAME_SUPPORTS_SAVE ) |
| 4740 | GAME( 1982, amidars, amidar, | |
| 4740 | GAME( 1982, amidars, amidar, scramble | |
| 4741 | 4741 | |
| 4742 | 4742 | |
| 4743 | 4743 | /* The End/Scramble based hardware */ |
| 4744 | 4744 | GAME( 1980, theend, 0, theend, theend, theend, ROT90, "Konami", "The End", GAME_SUPPORTS_SAVE ) |
| 4745 | 4745 | GAME( 1980, theends, theend, theend, theend, theend, ROT90, "[Konami] (Stern license)", "The End (Stern)", GAME_SUPPORTS_SAVE ) |
| 4746 | 4746 | |
| 4747 | GAME( 1981, scramble, 0, theend, scramble, scramble, ROT90, "Konami", "Scramble", GAME_SUPPORTS_SAVE ) | |
| 4748 | GAME( 1981, scrambls, scramble, theend, scramble, scramble, ROT90, "[Konami] (Stern license)", "Scramble (Stern)", GAME_SUPPORTS_SAVE ) | |
| 4749 | GAME( 1981, strfbomb, scramble, theend, strfbomb, scramble, ROT90, "Omni", "Strafe Bomb", GAME_SUPPORTS_SAVE ) | |
| 4747 | GAME( 1981, scramble, 0, scramble, scramble, scramble, ROT90, "Konami", "Scramble", GAME_SUPPORTS_SAVE ) | |
| 4748 | GAME( 1981, scrambls, scramble, scramble, scramble, scramble, ROT90, "[Konami] (Stern license)", "Scramble (Stern)", GAME_SUPPORTS_SAVE ) | |
| 4749 | GAME( 1981, strfbomb, scramble, scramble, strfbomb, scramble, ROT90, "Omni", "Strafe Bomb", GAME_SUPPORTS_SAVE ) | |
| 4750 | 4750 | GAME( 1981, explorer, scramble, explorer, explorer, explorer, ROT90, "bootleg", "Explorer", GAME_SUPPORTS_SAVE ) |
| 4751 | 4751 | |
| 4752 | 4752 | GAME( 1981, atlantis, 0, theend, atlantis, atlantis, ROT90, "Comsoft", "Battle of Atlantis (set 1)", GAME_SUPPORTS_SAVE ) |
| r2454 | r2455 | |
|---|---|---|
| 395 | 395 | |
| 396 | 396 | static WRITE8_HANDLER( namcos1_sub_firq_w ) |
| 397 | 397 | { |
| 398 | cpunum_set_input_line( | |
| 398 | cpunum_set_input_line(machine, 1, M6809_FIRQ_LINE, ASSERT_LINE); | |
| 399 | 399 | } |
| 400 | 400 | |
| 401 | 401 | static WRITE8_HANDLER( irq_ack_w ) |
| 402 | 402 | { |
| 403 | cpunum_set_input_line( | |
| 403 | cpunum_set_input_line(machine, cpu_getactivecpu(), 0, CLEAR_LINE); | |
| 404 | 404 | } |
| 405 | 405 | |
| 406 | 406 | static WRITE8_HANDLER( firq_ack_w ) |
| 407 | 407 | { |
| 408 | cpunum_set_input_line( | |
| 408 | cpunum_set_input_line(machine, cpu_getactivecpu(), M6809_FIRQ_LINE, CLEAR_LINE); | |
| 409 | 409 | } |
| 410 | 410 | |
| 411 | 411 |
| r2454 | r2455 | |
|---|---|---|
| 89 | 89 | |
| 90 | 90 | static WRITE8_HANDLER( mainevt_sh_irqtrigger_w ) |
| 91 | 91 | { |
| 92 | cpunum_set_input_line_and_vector( | |
| 92 | cpunum_set_input_line_and_vector(machine, 1,0,HOLD_LINE,0xff); | |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | static WRITE8_HANDLER( mainevt_sh_irqcontrol_w ) |
| r2454 | r2455 | |
|---|---|---|
| 281 | 281 | AM_RANGE(0x00, 0x00) AM_WRITE(irem_sound_cmd_w) |
| 282 | 282 | AM_RANGE(0x01, 0x01) AM_WRITE(m62_flipscreen_w) /* + coin counters */ |
| 283 | 283 | AM_RANGE(0x80, 0x80) AM_WRITE(m62_vscroll_low_w) |
| 284 | | |
| 284 | AM_RANGE(0x81, 0x81) AM_WRITE(ldrun3_topbo | |
| 285 | 285 | ADDRESS_MAP_END |
| 286 | 286 | |
| 287 | 287 | |
| r2454 | r2455 | |
| 1391 | 1391 | /* video hardware */ |
| 1392 | 1392 | MDRV_GFXDECODE(ldrun3) |
| 1393 | 1393 | MDRV_VIDEO_START(ldrun2) |
| 1394 | MDRV_VIDEO_UPDATE(ldrun) | |
| 1394 | MDRV_VIDEO_UPDATE(ldrun3) | |
| 1395 | 1395 | MACHINE_DRIVER_END |
| 1396 | 1396 | |
| 1397 | 1397 |
| r2454 | r2455 | |
|---|---|---|
| 449 | 449 | |
| 450 | 450 | static STATE_POSTLOAD( profbank_banksw_restore ) |
| 451 | 451 | { |
| 452 | profpac_banksw_w( | |
| 452 | profpac_banksw_w(machine, 0, profpac_bank); | |
| 453 | 453 | } |
| 454 | 454 | |
| 455 | 455 | |
| r2454 | r2455 | |
| 510 | 510 | |
| 511 | 511 | static const struct AY8910interface ay8912_interface = |
| 512 | 512 | { |
| 513 | input_port_5_r | |
| 513 | AY8910_LEGACY_OUTPUT, | |
| 514 | AY8910_DEFAULT_LOADS, | |
| 515 | input_port_5_r, | |
| 516 | NULL, | |
| 517 | NULL, | |
| 518 | NULL | |
| 514 | 519 | }; |
| 515 | 520 | |
| 516 | 521 |
| r2454 | r2455 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "deprecat.h" | |
| 11 | 10 | #include "cpu/m6809/m6809.h" |
| 12 | 11 | #include "cpu/i8039/i8039.h" |
| 13 | 12 | #include "cpu/z80/z80.h" |
| r2454 | r2455 | |
| 76 | 75 | |
| 77 | 76 | static WRITE8_HANDLER( megazone_i8039_irq_w ) |
| 78 | 77 | { |
| 79 | cpunum_set_input_line( | |
| 78 | cpunum_set_input_line(machine, 2, 0, ASSERT_LINE); | |
| 80 | 79 | } |
| 81 | 80 | |
| 82 | 81 | static WRITE8_HANDLER( i8039_irqen_and_status_w ) |
| 83 | 82 | { |
| 84 | 83 | if ((data & 0x80) == 0) |
| 85 | cpunum_set_input_line( | |
| 84 | cpunum_set_input_line(machine, 2, 0, CLEAR_LINE); | |
| 86 | 85 | i8039_status = (data & 0x70) >> 4; |
| 87 | 86 | } |
| 88 | 87 | |
| r2454 | r2455 | |
| 303 | 302 | |
| 304 | 303 | static const struct AY8910interface ay8910_interface = |
| 305 | 304 | { |
| 305 | AY8910_LEGACY_OUTPUT, | |
| 306 | AY8910_DEFAULT_LOADS, | |
| 306 | 307 | megazone_portA_r, |
| 307 | 0, | |
| 308 | 0, | |
| 308 | NULL, | |
| 309 | NULL, | |
| 309 | 310 | megazone_portB_w |
| 310 | 311 | }; |
| 311 | 312 |
| r2454 | r2455 | |
|---|---|---|
| 16 | 16 | extern void decrypt156(void); |
| 17 | 17 | |
| 18 | 18 | #include "driver.h" |
| 19 | #include "deprecat.h" | |
| 20 | 19 | #include "decocrpt.h" |
| 21 | 20 | #include "deco32.h" |
| 22 | 21 | #include "machine/eeprom.h" |
| r2454 | r2455 | |
|---|---|---|
| 677 | 677 | |
| 678 | 678 | static const struct AY8910interface ay8910_interface = |
| 679 | 679 | { |
| 680 | AY8910_LEGACY_OUTPUT, | |
| 681 | AY8910_DEFAULT_LOADS, | |
| 680 | 682 | input_port_3_r, |
| 681 | 683 | input_port_2_r, |
| 684 | NULL, | |
| 685 | NULL | |
| 682 | 686 | }; |
| 683 | 687 | |
| 684 | 688 |
| r2454 | r2455 | |
|---|---|---|
| 280 | 280 | sound_nmi_enable = 1; |
| 281 | 281 | if (pending_nmi) |
| 282 | 282 | { |
| 283 | cpunum_set_input_line( | |
| 283 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, PULSE_LINE); | |
| 284 | 284 | pending_nmi = 0; |
| 285 | 285 | } |
| 286 | 286 | } |
| r2454 | r2455 | |
| 1019 | 1019 | |
| 1020 | 1020 | static const struct AY8910interface ay8910_interface = |
| 1021 | 1021 | { |
| 1022 | 0, | |
| 1023 | 0, | |
| 1022 | AY8910_LEGACY_OUTPUT, | |
| 1023 | AY8910_DEFAULT_LOADS, | |
| 1024 | NULL, | |
| 1025 | NULL, | |
| 1024 | 1026 | sound_control_2_w, |
| 1025 | 1027 | sound_control_3_w |
| 1026 | 1028 | }; |
| r2454 | r2455 | |
|---|---|---|
| 78 | 78 | |
| 79 | 79 | |
| 80 | 80 | #include "driver.h" |
| 81 | #include "deprecat.h" | |
| 82 | 81 | #include "tutankhm.h" |
| 83 | 82 | #include "cpu/m6809/m6809.h" |
| 84 | 83 | #include "cpu/i8039/i8039.h" |
| r2454 | r2455 | |
| 145 | 144 | if (last == 0 && data == 1) |
| 146 | 145 | { |
| 147 | 146 | /* setting bit 0 low then high triggers IRQ on the sound CPU */ |
| 148 | cpunum_set_input_line_and_vector( | |
| 147 | cpunum_set_input_line_and_vector(machine, 1,0,HOLD_LINE,0xff); | |
| 149 | 148 | } |
| 150 | 149 | |
| 151 | 150 | last = data; |
| r2454 | r2455 | |
| 154 | 153 | |
| 155 | 154 | static WRITE8_HANDLER( junofrst_i8039_irq_w ) |
| 156 | 155 | { |
| 157 | cpunum_set_input_line( | |
| 156 | cpunum_set_input_line(machine, 2, 0, ASSERT_LINE); | |
| 158 | 157 | } |
| 159 | 158 | |
| 160 | 159 | |
| 161 | 160 | static WRITE8_HANDLER( i8039_irqen_and_status_w ) |
| 162 | 161 | { |
| 163 | 162 | if ((data & 0x80) == 0) |
| 164 | cpunum_set_input_line( | |
| 163 | cpunum_set_input_line(machine, 2, 0, CLEAR_LINE); | |
| 165 | 164 | i8039_status = (data & 0x70) >> 4; |
| 166 | 165 | } |
| 167 | 166 | |
| r2454 | r2455 | |
| 325 | 324 | |
| 326 | 325 | static const struct AY8910interface ay8910_interface = |
| 327 | 326 | { |
| 327 | AY8910_LEGACY_OUTPUT, | |
| 328 | AY8910_DEFAULT_LOADS, | |
| 328 | 329 | junofrst_portA_r, |
| 329 | 0, | |
| 330 | 0, | |
| 330 | NULL, | |
| 331 | NULL, | |
| 331 | 332 | junofrst_portB_w |
| 332 | 333 | }; |
| 333 | 334 |
| r2454 | r2455 | |
|---|---|---|
| 22 | 22 | */ |
| 23 | 23 | |
| 24 | 24 | #include "driver.h" |
| 25 | #include "deprecat.h" | |
| 26 | 25 | #include "render.h" |
| 27 | 26 | #include "machine/laserdsc.h" |
| 28 | 27 | |
| r2454 | r2455 | |
| 102 | 101 | if (z80_2_nmi_enable) |
| 103 | 102 | { |
| 104 | 103 | logerror("Executing an NMI on CPU2\n"); |
| 105 | cpunum_set_input_line( | |
| 104 | cpunum_set_input_line(machine, 2, INPUT_LINE_NMI, PULSE_LINE); /* Maybe this is a ASSERT_LINE, CLEAR_LINE combo? */ | |
| 106 | 105 | z80_2_nmi_enable = 0; |
| 107 | 106 | } |
| 108 | 107 | } |
| r2454 | r2455 | |
|---|---|---|
| 28 | 28 | ***************************************************************************/ |
| 29 | 29 | |
| 30 | 30 | #include "driver.h" |
| 31 | #include "deprecat.h" | |
| 32 | 31 | #include "cpu/z80/z80.h" |
| 33 | 32 | #include "lasso.h" |
| 34 | 33 | #include "sound/dac.h" |
| r2454 | r2455 | |
|---|---|---|
| 3128 | 3128 | |
| 3129 | 3129 | static const struct AY8910interface ay8910_interface = |
| 3130 | 3130 | { |
| 3131 | AY8910_LEGACY_OUTPUT, | |
| 3132 | AY8910_DEFAULT_LOADS, | |
| 3131 | 3133 | nb1413m3_dipsw1_r, // DIPSW-A read |
| 3132 | nb1413m3_dipsw2_r // DIPSW-B read | |
| 3134 | nb1413m3_dipsw2_r, // DIPSW-B read | |
| 3135 | NULL, | |
| 3136 | NULL | |
| 3133 | 3137 | }; |
| 3134 | 3138 | |
| 3135 | 3139 |
| r2454 | r2455 | |
|---|---|---|
| 542 | 542 | |
| 543 | 543 | static const struct YM2203interface ym2203_interface = |
| 544 | 544 | { |
| 545 | 0,0,0,0,irqhandler | |
| 545 | { | |
| 546 | AY8910_LEGACY_OUTPUT, | |
| 547 | AY8910_DEFAULT_LOADS, | |
| 548 | NULL, NULL, NULL, NULL | |
| 549 | }, | |
| 550 | irqhandler | |
| 546 | 551 | }; |
| 547 | 552 | |
| 548 | 553 | static MACHINE_DRIVER_START( psychic5 ) |
| r2454 | r2455 | |
|---|---|---|
| 328 | 328 | if (MC6809_CTR > S_TEMPO) |
| 329 | 329 | { |
| 330 | 330 | MC6809_CTR = 0; |
| 331 | cpunum_set_input_line( | |
| 331 | cpunum_set_input_line(machine, 1, 0, HOLD_LINE); | |
| 332 | 332 | } |
| 333 | 333 | else |
| 334 | 334 | { |
| r2454 | r2455 | |
|---|---|---|
| 252 | 252 | |
| 253 | 253 | static const struct YM2608interface ym2608_interface = |
| 254 | 254 | { |
| 255 | 0, | |
| 256 | 0, | |
| 257 | 0, | |
| 258 | sound_bankswitch_w, | |
| 255 | { | |
| 256 | AY8910_LEGACY_OUTPUT, | |
| 257 | AY8910_DEFAULT_LOADS, | |
| 258 | NULL, | |
| 259 | NULL, | |
| 260 | NULL, | |
| 261 | sound_bankswitch_w, | |
| 262 | }, | |
| 259 | 263 | irqhandler, |
| 260 | 264 | REGION_SOUND1 |
| 261 | 265 | }; |
| r2454 | r2455 | |
|---|---|---|
| 112 | 112 | { |
| 113 | 113 | UINT8 ans = 0; |
| 114 | 114 | |
| 115 | if (IOpage == 0) ans = input_port_0_r(machine, 0); | |
| 116 | if (IOpage == 1) ans = input_port_1_r(machine, 0); | |
| 117 | if (IOpage == 2) ans = input_port_2_r(machine, 0); | |
| 118 | if (IOpage == 3) ans = input_port_3_r(machine, 0); | |
| 115 | if (IOpage == 0) ans = input_port_read_indexed(machine,0); | |
| 116 | if (IOpage == 1) ans = input_port_read_indexed(machine,1); | |
| 117 | if (IOpage == 2) ans = input_port_read_indexed(machine,2); | |
| 118 | if (IOpage == 3) ans = input_port_read_indexed(machine,3); | |
| 119 | 119 | |
| 120 | 120 | return ans; |
| 121 | 121 | } |
| r2454 | r2455 | |
| 147 | 147 | Quasar_T1 = 0; |
| 148 | 148 | |
| 149 | 149 | // Testing ... |
| 150 | // return input_port_ | |
| 150 | // return input_port_ | |
| 151 | 151 | |
| 152 | 152 | // Add in sound DIP switch |
| 153 | return (Quasar_Command) + (input_port_ | |
| 153 | return (Quasar_Command) + (input_port_ | |
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | static READ8_HANDLER( Quasar_T1_r ) |
| r2454 | r2455 | |
|---|---|---|
| 46 | 46 | - blinking on Meagtouch title screen is probably incorrect |
| 47 | 47 | - clean up V9938 interrupt implementation |
| 48 | 48 | - finish inputs, dsw, outputs (lamps) |
| 49 | - calibration mode in Microtouch emulation (command CX) | |
| 50 | 49 | - problem with registering touches on the bottom of the screen (currently hacked to work) |
| 51 | 50 | - megat3: u37 has bad size, should be 8MBit |
| 52 | 51 | - megat4: rom u32 was bad, currently using u32 from megat4te |
| r2454 | r2455 | |
| 62 | 61 | #include "machine/8255ppi.h" |
| 63 | 62 | #include "machine/z80pio.h" |
| 64 | 63 | #include "machine/pc16552d.h" |
| 64 | #include "machine/microtch.h" | |
| 65 | 65 | |
| 66 | 66 | /************************************* |
| 67 | 67 | * |
| r2454 | r2455 | |
| 201 | 201 | |
| 202 | 202 | /************************************* |
| 203 | 203 | * |
| 204 | * Microtouch touch screen controller | |
| 205 | * | |
| 206 | *************************************/ | |
| 207 | ||
| 208 | static struct | |
| 209 | { | |
| 210 | UINT8 tx_buffer[16]; | |
| 211 | int tx_buffer_ptr; | |
| 212 | emu_timer* timer; | |
| 213 | int reset_done; | |
| 214 | int format_tablet; | |
| 215 | int mode_inactive; | |
| 216 | int mode_stream; | |
| 217 | int last_touch_state; | |
| 218 | int last_x; | |
| 219 | int last_y; | |
| 220 | void (*tx_callback)(UINT8 data); | |
| 221 | int (*touch_callback)(int *touch_x, int *touch_y); | |
| 222 | } microtouch; | |
| 223 | ||
| 224 | ||
| 225 | static int microtouch_check_command( const char* commandtocheck, int command_len, UINT8* command_data ) | |
| 226 | { | |
| 227 | if ( (command_len == (strlen(commandtocheck) + 2)) && | |
| 228 | (command_data[0] == 0x01) && | |
| 229 | (strncmp(commandtocheck, (const char*)command_data + 1, strlen(commandtocheck)) == 0) && | |
| 230 | (command_data[command_len-1] == 0x0d) ) | |
| 231 | { | |
| 232 | return 1; | |
| 233 | } | |
| 234 | else | |
| 235 | { | |
| 236 | return 0; | |
| 237 | } | |
| 238 | } | |
| 239 | ||
| 240 | static void microtouch_send_format_table_packet(UINT8 flag, int x, int y) | |
| 241 | { | |
| 242 | microtouch.tx_callback(flag); | |
| 243 | // lower byte (7bits) of x coordinate | |
| 244 | microtouch.tx_callback(x & 0x7f); | |
| 245 | // higher byte (7bits) of x coordinate | |
| 246 | microtouch.tx_callback((x >> 7) & 0x7f); | |
| 247 | // lower byte (7bits) of y coordinate | |
| 248 | microtouch.tx_callback(y & 0x7f); | |
| 249 | // higher byte (7bits) of y coordinate | |
| 250 | microtouch.tx_callback((y >> 7) & 0x7f); | |
| 251 | }; | |
| 252 | ||
| 253 | static TIMER_CALLBACK(microtouch_timer_callback) | |
| 254 | { | |
| 255 | if ( (microtouch.reset_done == 0) || | |
| 256 | (microtouch.format_tablet == 0) || | |
| 257 | (microtouch.mode_inactive == 1) || | |
| 258 | (microtouch.mode_stream == 0) ) | |
| 259 | { | |
| 260 | return; | |
| 261 | } | |
| 262 | ||
| 263 | // send format tablet packet | |
| 264 | if ( input_port_read(machine, "TOUCH") & 0x01 ) | |
| 265 | { | |
| 266 | int tx = input_port_read(machine, "TOUCH_X"); | |
| 267 | int ty = input_port_read(machine, "TOUCH_Y"); | |
| 268 | ||
| 269 | if ( microtouch.touch_callback == NULL || | |
| 270 | microtouch.touch_callback( &tx, &ty ) != 0 ) | |
| 271 | { | |
| 272 | ty = 0x4000 - ty; | |
| 273 | ||
| 274 | microtouch_send_format_table_packet(0xc0, tx, ty); | |
| 275 | microtouch.last_touch_state = 1; | |
| 276 | microtouch.last_x = tx; | |
| 277 | microtouch.last_y = ty; | |
| 278 | } | |
| 279 | } | |
| 280 | else | |
| 281 | { | |
| 282 | if ( microtouch.last_touch_state == 1 ) | |
| 283 | { | |
| 284 | microtouch.last_touch_state = 0; | |
| 285 | microtouch_send_format_table_packet(0x80, microtouch.last_x, microtouch.last_y); | |
| 286 | } | |
| 287 | } | |
| 288 | }; | |
| 289 | ||
| 290 | static void microtouch_init(void (*tx_cb)(UINT8 data), | |
| 291 | int (*touch_cb)(int *touch_x, int *touch_y)) | |
| 292 | { | |
| 293 | memset(µtouch, 0, sizeof(microtouch)); | |
| 294 | ||
| 295 | microtouch.last_touch_state = -1; | |
| 296 | microtouch.tx_callback = tx_cb; | |
| 297 | microtouch.touch_callback = touch_cb; | |
| 298 | ||
| 299 | microtouch.timer = timer_alloc(microtouch_timer_callback, NULL); | |
| 300 | timer_adjust_periodic(microtouch.timer, ATTOTIME_IN_HZ(167), 0, ATTOTIME_IN_HZ(167)); | |
| 301 | ||
| 302 | state_save_register_item("microtouch", 0, microtouch.reset_done); | |
| 303 | state_save_register_item("microtouch", 0, microtouch.format_tablet); | |
| 304 | state_save_register_item("microtouch", 0, microtouch.mode_inactive); | |
| 305 | state_save_register_item("microtouch", 0, microtouch.mode_stream); | |
| 306 | state_save_register_item("microtouch", 0, microtouch.last_touch_state); | |
| 307 | state_save_register_item("microtouch", 0, microtouch.last_x); | |
| 308 | state_save_register_item("microtouch", 0, microtouch.last_y); | |
| 309 | state_save_register_item_array("microtouch", 0, microtouch.tx_buffer); | |
| 310 | state_save_register_item("microtouch", 0, microtouch.tx_buffer_ptr); | |
| 311 | ||
| 312 | }; | |
| 313 | ||
| 314 | ||
| 315 | static void microtouch_rx(int count, UINT8* data) | |
| 316 | { | |
| 317 | int i; | |
| 318 | ||
| 319 | for ( i = 0; (i < count) && ((microtouch.tx_buffer_ptr + i) < 16); i++ ) | |
| 320 | { | |
| 321 | microtouch.tx_buffer[i+microtouch.tx_buffer_ptr] = data[i]; | |
| 322 | microtouch.tx_buffer_ptr++; | |
| 323 | } | |
| 324 | ||
| 325 | if (microtouch.tx_buffer_ptr > 0 && (microtouch.tx_buffer[microtouch.tx_buffer_ptr-1] == 0x0d)) | |
| 326 | { | |
| 327 | // check command | |
| 328 | if ( microtouch_check_command( "MS", microtouch.tx_buffer_ptr, microtouch.tx_buffer ) ) | |
| 329 | { | |
| 330 | microtouch.mode_stream = 1; | |
| 331 | microtouch.mode_inactive = 0; | |
| 332 | } | |
| 333 | else if ( microtouch_check_command( "MI", microtouch.tx_buffer_ptr, microtouch.tx_buffer ) ) | |
| 334 | { | |
| 335 | microtouch.mode_inactive = 1; | |
| 336 | } | |
| 337 | else if ( microtouch_check_command( "R", microtouch.tx_buffer_ptr, microtouch.tx_buffer ) ) | |
| 338 | { | |
| 339 | microtouch.reset_done = 1; | |
| 340 | } | |
| 341 | else if ( microtouch_check_command( "FT", microtouch.tx_buffer_ptr, microtouch.tx_buffer ) ) | |
| 342 | { | |
| 343 | microtouch.format_tablet = 1; | |
| 344 | } | |
| 345 | // send response | |
| 346 | microtouch.tx_callback(0x01); | |
| 347 | microtouch.tx_callback(0x30); | |
| 348 | microtouch.tx_callback(0x0d); | |
| 349 | microtouch.tx_buffer_ptr = 0; | |
| 350 | } | |
| 351 | }; | |
| 352 | ||
| 353 | static INPUT_PORTS_START(microtouch) | |
| 354 | PORT_START_TAG("TOUCH") | |
| 355 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_IMPULSE(10) PORT_NAME( "Touch screen" ) | |
| 356 | PORT_START_TAG("TOUCH_X") | |
| 357 | PORT_BIT( 0x3fff, 0x2000, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(45) PORT_KEYDELTA(15) | |
| 358 | PORT_START_TAG("TOUCH_Y") | |
| 359 | PORT_BIT( 0x3fff, 0x2000, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(45) PORT_KEYDELTA(15) | |
| 360 | INPUT_PORTS_END | |
| 361 | ||
| 362 | /************************************* | |
| 363 | * | |
| 364 | 204 | * Microtouch <-> pc16650 interface |
| 365 | 205 | * |
| 366 | 206 | *************************************/ |
| r2454 | r2455 | |
| 696 | 536 | AM_RANGE(0x21, 0x21) AM_READWRITE(v9938_1_status_r, v9938_1_command_w) |
| 697 | 537 | AM_RANGE(0x22, 0x22) AM_WRITE(v9938_1_palette_w) |
| 698 | 538 | AM_RANGE(0x23, 0x23) AM_WRITE(v9938_1_register_w) |
| 699 | AM_RANGE(0x30, 0x33) AM_READWRITE(ppi8255_ | |
| 539 | AM_RANGE(0x30, 0x33) AM_DEVREADWRITE(PPI8255, "ppi8255", ppi8255_ | |
| 700 | 540 | AM_RANGE(0x40, 0x43) AM_READWRITE(z80pio_0_r, z80pio_0_w) |
| 701 | 541 | AM_RANGE(0x50, 0x53) AM_READWRITE(z80pio_1_r, z80pio_1_w) |
| 702 | 542 | AM_RANGE(0x80, 0x80) AM_READWRITE(AY8910_read_port_0_r, AY8910_control_port_0_w) |
| r2454 | r2455 | |
| 722 | 562 | AM_RANGE(0x21, 0x21) AM_READWRITE(v9938_1_status_r, v9938_1_command_w) |
| 723 | 563 | AM_RANGE(0x22, 0x22) AM_WRITE(v9938_1_palette_w) |
| 724 | 564 | AM_RANGE(0x23, 0x23) AM_WRITE(v9938_1_register_w) |
| 725 | AM_RANGE(0x30, 0x33) AM_READWRITE(ppi8255_ | |
| 565 | AM_RANGE(0x30, 0x33) AM_DEVREADWRITE(PPI8255, "ppi8255", ppi8255_ | |
| 726 | 566 | AM_RANGE(0x40, 0x43) AM_READWRITE(z80pio_0_r, z80pio_0_w) |
| 727 | 567 | AM_RANGE(0x50, 0x53) AM_READWRITE(z80pio_1_r, z80pio_1_w) |
| 728 | 568 | AM_RANGE(0x60, 0x67) AM_READWRITE(pc16552d_0_r,pc16552d_0_w) |
| r2454 | r2455 | |
| 831 | 671 | |
| 832 | 672 | static const ppi8255_interface crt260_ppi8255_intf = |
| 833 | 673 | { |
| 834 | 1, | |
| 835 | { 0 }, /* Port A read */ | |
| 836 | { 0 }, /* Port B read */ | |
| 837 | { meritm_8255_port_c_r }, /* Port C read */ | |
| 838 | { 0 }, /* Port A write (used) */ | |
| 839 | { 0 }, /* Port B write (used LMP x DRIVE) */ | |
| 840 | { 0 } /* Port C write */ | |
| 674 | NULL, /* Port A read */ | |
| 675 | NULL, /* Port B read */ | |
| 676 | meritm_8255_port_c_r, /* Port C read */ | |
| 677 | NULL, /* Port A write (used) */ | |
| 678 | NULL, /* Port B write (used LMP x DRIVE) */ | |
| 679 | NULL /* Port C write */ | |
| 841 | 680 | }; |
| 842 | 681 | |
| 843 | 682 | static const ppi8255_interface crt250_ppi8255_intf = |
| 844 | 683 | { |
| 845 | 1, | |
| 846 | { 0 }, /* Port A read */ | |
| 847 | { 0 }, /* Port B read */ | |
| 848 | { meritm_8255_port_c_r }, /* Port C read */ | |
| 849 | { 0 }, /* Port A write (used) */ | |
| 850 | { meritm_crt250_port_b_w }, /* Port B write (used LMP x DRIVE) */ | |
| 851 | { 0 } /* Port C write */ | |
| 684 | NULL, /* Port A read */ | |
| 685 | NULL, /* Port B read */ | |
| 686 | meritm_8255_port_c_r, /* Port C read */ | |
| 687 | NULL, /* Port A write (used) */ | |
| 688 | meritm_crt250_port_b_w, /* Port B write (used LMP x DRIVE) */ | |
| 689 | NULL /* Port C write */ | |
| 852 | 690 | }; |
| 853 | 691 | |
| 854 | 692 | /************************************* |
| r2454 | r2455 | |
| 874 | 712 | |
| 875 | 713 | static const struct AY8910interface ay8910_interface = |
| 876 | 714 | { |
| 715 | AY8910_LEGACY_OUTPUT, | |
| 716 | AY8910_DEFAULT_LOADS, | |
| 877 | 717 | meritm_ay8930_port_a_r, /* Port A read */ |
| 878 | 0, /* Port B read */ | |
| 879 | 0, /* Port A write */ | |
| 718 | NULL, /* Port B read */ | |
| 719 | NULL, /* Port A write */ | |
| 880 | 720 | meritm_ay8930_port_b_w /* Port B write */ |
| 881 | 721 | }; |
| 882 | 722 | |
| r2454 | r2455 | |
| 984 | 824 | |
| 985 | 825 | static MACHINE_START(meritm_crt250) |
| 986 | 826 | { |
| 987 | ppi8255_init(&crt250_ppi8255_intf); | |
| 988 | 827 | memory_configure_bank(1, 0, 8, memory_region(REGION_CPU1), 0x10000); |
| 989 | 828 | meritm_bank = 0xff; |
| 990 | 829 | meritm_crt250_switch_banks(); |
| r2454 | r2455 | |
| 1001 | 840 | |
| 1002 | 841 | static MACHINE_START(meritm_crt260) |
| 1003 | 842 | { |
| 1004 | ppi8255_init(&crt260_ppi8255_intf); | |
| 1005 | 843 | meritm_ram = auto_malloc( 0x8000 ); |
| 1006 | 844 | memset( meritm_ram, 0x8000, 0x00 ); |
| 1007 | 845 | memory_configure_bank(1, 0, 128, memory_region(REGION_CPU1), 0x8000); |
| r2454 | r2455 | |
| 1047 | 885 | |
| 1048 | 886 | MDRV_MACHINE_START(meritm_crt250) |
| 1049 | 887 | |
| 888 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 889 | MDRV_DEVICE_CONFIG( crt250_ppi8255_intf ) | |
| 890 | ||
| 1050 | 891 | MDRV_NVRAM_HANDLER(generic_0fill) |
| 1051 | 892 | |
| 1052 | 893 | MDRV_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) |
| r2454 | r2455 | |
| 1085 | 926 | MDRV_CPU_PROGRAM_MAP(meritm_map,0) |
| 1086 | 927 | MDRV_CPU_IO_MAP(meritm_io_map,0) |
| 1087 | 928 | |
| 929 | MDRV_DEVICE_MODIFY( "ppi8255", PPI8255 ) | |
| 930 | MDRV_DEVICE_CONFIG( crt260_ppi8255_intf ) | |
| 931 | ||
| 1088 | 932 | MDRV_WATCHDOG_TIME_INIT(UINT64_ATTOTIME_IN_MSEC(1200)) // DS1232, TD connected to VCC |
| 1089 | 933 | MDRV_MACHINE_START(meritm_crt260) |
| 1090 | 934 |
| r2454 | r2455 | |
|---|---|---|
| 171 | 171 | g = (color_ram[offset] &0xff00) >> 8; |
| 172 | 172 | b = (color_ram[offset] &0xff); |
| 173 | 173 | |
| 174 | palette_set_color( | |
| 174 | palette_set_color(machine,offset/2,MAKE_RGB(r,g,b)); | |
| 175 | 175 | } |
| 176 | 176 | } |
| 177 | 177 | |
| r2454 | r2455 | |
| 202 | 202 | switch (offset) |
| 203 | 203 | { |
| 204 | 204 | case 0x03: |
| 205 | return ((input_port_3_word_r(machine,0,0) & 0xef) | | |
| 206 | (input_port_5_word_r(machine,0,0) & 0x10)) << 8; /* IN3 + service switch */ | |
| 205 | return ((input_port_read_indexed(machine,3) & 0xef) | | |
| 206 | (input_port_read_indexed(machine,5) & 0x10)) << 8; /* IN3 + service switch */ | |
| 207 | 207 | |
| 208 | 208 | default: |
| 209 | 209 | return TC0640FIO_r(machine,offset) << 8; |
| r2454 | r2455 | |
| 218 | 218 | static WRITE16_HANDLER( opwolf3_adc_req_w ) |
| 219 | 219 | { |
| 220 | 220 | /* 4 writes a frame - one for each analogue port */ |
| 221 | cpunum_set_input_line( | |
| 221 | cpunum_set_input_line(machine, 0,3,HOLD_LINE); | |
| 222 | 222 | } |
| 223 | 223 | |
| 224 | 224 | /***************************************************** |
| r2454 | r2455 | |
|---|---|---|
| 20 | 20 | ******************************************************************************/ |
| 21 | 21 | |
| 22 | 22 | #include "driver.h" |
| 23 | #include "deprecat.h" | |
| 24 | 23 | #include "cpu/z80/z80.h" |
| 25 | 24 | #include "sound/sn76496.h" |
| 26 | 25 | |
| r2454 | r2455 | |
| 35 | 34 | |
| 36 | 35 | static WRITE8_HANDLER( xyonix_irqack_w ) |
| 37 | 36 | { |
| 38 | cpunum_set_input_line( | |
| 37 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 39 | 38 | } |
| 40 | 39 | |
| 41 | 40 |
| r2454 | r2455 | |
|---|---|---|
| 96 | 96 | return cninja_scanline; |
| 97 | 97 | |
| 98 | 98 | case 2: /* Raster IRQ ACK - value read is not used */ |
| 99 | cpunum_set_input_line(Machine, 0, 3, CLEAR_LINE); | |
| 100 | cpunum_set_input_line(Machine, 0, 4, CLEAR_LINE); | |
| 99 | cpunum_set_input_line(machine, 0, 3, CLEAR_LINE); | |
| 100 | cpunum_set_input_line(machine, 0, 4, CLEAR_LINE); | |
| 101 | 101 | return 0; |
| 102 | 102 | } |
| 103 | 103 |
| r2454 | r2455 | |
|---|---|---|
| 173 | 173 | ***************************************************************************/ |
| 174 | 174 | |
| 175 | 175 | #include "driver.h" |
| 176 | #include "deprecat.h" | |
| 177 | 176 | #include "cpu/m6800/m6800.h" |
| 178 | 177 | #include "sound/namco.h" |
| 179 | 178 | |
| r2454 | r2455 | |
| 194 | 193 | static WRITE8_HANDLER( pacland_subreset_w ) |
| 195 | 194 | { |
| 196 | 195 | int bit = !BIT(offset,11); |
| 197 | cpunum_set_input_line( | |
| 196 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, bit ? CLEAR_LINE : ASSERT_LINE); | |
| 198 | 197 | } |
| 199 | 198 | |
| 200 | 199 | static WRITE8_HANDLER( pacland_flipscreen_w ) |
| r2454 | r2455 | |
| 233 | 232 | int bit = !BIT(offset,11); |
| 234 | 233 | cpu_interrupt_enable(0,bit); |
| 235 | 234 | if (!bit) |
| 236 | cpunum_set_input_line( | |
| 235 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 237 | 236 | } |
| 238 | 237 | |
| 239 | 238 | static WRITE8_HANDLER( pacland_irq_2_ctrl_w ) |
| r2454 | r2455 | |
| 241 | 240 | int bit = !BIT(offset,13); |
| 242 | 241 | cpu_interrupt_enable(1,bit); |
| 243 | 242 | if (!bit) |
| 244 | cpunum_set_input_line( | |
| 243 | cpunum_set_input_line(machine, 1, 0, CLEAR_LINE); | |
| 245 | 244 | } |
| 246 | 245 | |
| 247 | 246 |
| r2454 | r2455 | |
|---|---|---|
| 256 | 256 | g = ((paletteram32[offset] & 0x00ff0000) >>16); |
| 257 | 257 | r = ((paletteram32[offset] & 0xff000000) >>24); |
| 258 | 258 | |
| 259 | palette_set_color(Machine,offset,MAKE_RGB(r,g,b)); | |
| 260 | palette_set_color(Machine,offset+0x800,MAKE_RGB(r,g,b)); // For screen 2 | |
| 259 | palette_set_color(machine,offset,MAKE_RGB(r,g,b)); | |
| 260 | palette_set_color(machine,offset+0x800,MAKE_RGB(r,g,b)); // For screen 2 | |
| 261 | 261 | } |
| 262 | 262 | |
| 263 | 263 | static WRITE32_HANDLER( ps4_bgpen_1_dword_w ) |
| r2454 | r2455 | |
| 269 | 269 | g = ((bgpen_1[0] & 0x00ff0000) >>16); |
| 270 | 270 | r = ((bgpen_1[0] & 0xff000000) >>24); |
| 271 | 271 | |
| 272 | palette_set_color( | |
| 272 | palette_set_color(machine,0x1000,MAKE_RGB(r,g,b)); // Clear colour for screen 1 | |
| 273 | 273 | } |
| 274 | 274 | |
| 275 | 275 | static WRITE32_HANDLER( ps4_bgpen_2_dword_w ) |
| r2454 | r2455 | |
| 281 | 281 | g = ((bgpen_2[0] & 0x00ff0000) >>16); |
| 282 | 282 | r = ((bgpen_2[0] & 0xff000000) >>24); |
| 283 | 283 | |
| 284 | palette_set_color( | |
| 284 | palette_set_color(machine,0x1001,MAKE_RGB(r,g,b)); // Clear colour for screen 2 | |
| 285 | 285 | } |
| 286 | 286 | |
| 287 | 287 | static WRITE32_HANDLER( ps4_screen1_brt_w ) |
| r2454 | r2455 | |
| 299 | 299 | int i; |
| 300 | 300 | |
| 301 | 301 | for (i = 0; i < 0x800; i++) |
| 302 | palette_set_brightness( | |
| 302 | palette_set_brightness(machine,i,brt1); | |
| 303 | 303 | |
| 304 | 304 | oldbrt1 = brt1; |
| 305 | 305 | } |
| 306 | 306 | } else { |
| 307 | 307 | /* I believe this to be seperate rgb brightness due to strings in hotdebut, unused in 4 dumped games */ |
| 308 | if((data & | |
| 308 | if((data & | |
| 309 | 309 | logerror("Unk Scr 1 rgb? brt write %08x mask %08x\n", data, mem_mask); |
| 310 | 310 | } |
| 311 | 311 | } |
| r2454 | r2455 | |
| 326 | 326 | int i; |
| 327 | 327 | |
| 328 | 328 | for (i = 0x800; i < 0x1000; i++) |
| 329 | palette_set_brightness( | |
| 329 | palette_set_brightness(machine,i,brt2); | |
| 330 | 330 | |
| 331 | 331 | oldbrt2 = brt2; |
| 332 | 332 | } |
| 333 | 333 | } else { |
| 334 | 334 | /* I believe this to be seperate rgb brightness due to strings in hotdebut, unused in 4 dumped games */ |
| 335 | if((data & | |
| 335 | if((data & | |
| 336 | 336 | logerror("Unk Scr 2 rgb? brt write %08x mask %08x\n", data, mem_mask); |
| 337 | 337 | } |
| 338 | 338 | } |
| r2454 | r2455 | |
|---|---|---|
| 174 | 174 | |
| 175 | 175 | STATE_POSTLOAD( wardner_restore_bank ) |
| 176 | 176 | { |
| 177 | wardner_ramrom_bank_sw(Machine,0,1); /* Dummy value to ensure restoration */ | |
| 178 | wardner_ramrom_bank_sw(Machine,0,wardner_membank); | |
| 177 | wardner_ramrom_bank_sw(machine,0,1); /* Dummy value to ensure restoration */ | |
| 178 | wardner_ramrom_bank_sw(machine,0,wardner_membank); | |
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 |
| r2454 | r2455 | |
|---|---|---|
| 17 | 17 | */ |
| 18 | 18 | |
| 19 | 19 | #include "driver.h" |
| 20 | #include "deprecat.h" | |
| 21 | 20 | #include "cpu/z80/z80.h" |
| 22 | 21 | #include "snk.h" |
| 23 | 22 | #include "sound/ay8910.h" |
| r2454 | r2455 | |
| 67 | 66 | |
| 68 | 67 | static READ8_HANDLER( sound_nmi_ack_r ) |
| 69 | 68 | { |
| 70 | cpunum_set_input_line( | |
| 69 | cpunum_set_input_line(machine, 2, INPUT_LINE_NMI, CLEAR_LINE); | |
| 71 | 70 | return 0; |
| 72 | 71 | } |
| 73 | 72 |
| r2454 | r2455 | |
|---|---|---|
| 607 | 607 | |
| 608 | 608 | /* color RAM */ |
| 609 | 609 | else if (offset >= 0x4b00 && offset < 0x4c00) |
| 610 | palette_set_color_rgb( | |
| 610 | palette_set_color_rgb(machine, offset & 7, pal1bit(~data >> 3), pal1bit(~data >> 2), pal1bit(~data >> 1)); | |
| 611 | 611 | |
| 612 | 612 | /* watchdog */ |
| 613 | 613 | else if (offset >= 0x4c00 && offset < 0x4d00) |
| r2454 | r2455 | |
| 618 | 618 | { |
| 619 | 619 | if (irq_state) |
| 620 | 620 | { |
| 621 | cpunum_set_input_line( | |
| 621 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 622 | 622 | irq_state = 0; |
| 623 | 623 | } |
| 624 | 624 | } |
| r2454 | r2455 | |
|---|---|---|
| 328 | 328 | |
| 329 | 329 | static const struct YM2203interface ym2203_interface = |
| 330 | 330 | { |
| 331 | 0, | |
| 332 | ddrible_vlm5030_busy_r, | |
| 333 | ddrible_vlm5030_ctrl_w, | |
| 334 | 0 | |
| 331 | { | |
| 332 | AY8910_LEGACY_OUTPUT, | |
| 333 | AY8910_DEFAULT_LOADS, | |
| 334 | NULL, | |
| 335 | ddrible_vlm5030_busy_r, | |
| 336 | ddrible_vlm5030_ctrl_w, | |
| 337 | NULL | |
| 338 | }, | |
| 339 | NULL | |
| 335 | 340 | }; |
| 336 | 341 | |
| 337 | 342 | static const struct VLM5030interface vlm5030_interface = |
| r2454 | r2455 | |
|---|---|---|
| 150 | 150 | |
| 151 | 151 | static READ8_HANDLER( popper_soundcpu_nmi_r ) |
| 152 | 152 | { |
| 153 | cpunum_set_input_line( | |
| 153 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, PULSE_LINE); | |
| 154 | 154 | return 0; |
| 155 | 155 | } |
| 156 | 156 |
| r2454 | r2455 | |
|---|---|---|
| 86 | 86 | |
| 87 | 87 | static WRITE8_HANDLER( sound_cpu_reset_w ) |
| 88 | 88 | { |
| 89 | cpunum_set_input_line( | |
| 89 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, (data&1 )? ASSERT_LINE : CLEAR_LINE); | |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | static TIMER_CALLBACK( nmi_callback ) |
| r2454 | r2455 | |
| 111 | 111 | sound_nmi_enable = 1; |
| 112 | 112 | if (pending_nmi) |
| 113 | 113 | { |
| 114 | cpunum_set_input_line( | |
| 114 | cpunum_set_input_line(machine, 1,INPUT_LINE_NMI,PULSE_LINE); | |
| 115 | 115 | pending_nmi = 0; |
| 116 | 116 | } |
| 117 | 117 | } |
| r2454 | r2455 | |
| 123 | 123 | |
| 124 | 124 | static const struct AY8910interface ay8910_interface = |
| 125 | 125 | { |
| 126 | 0, | |
| 127 | 0, | |
| 126 | AY8910_LEGACY_OUTPUT, | |
| 127 | AY8910_DEFAULT_LOADS, | |
| 128 | NULL, | |
| 129 | NULL, | |
| 128 | 130 | unk_w, |
| 129 | 131 | unk_w |
| 130 | 132 | }; |
| r2454 | r2455 | |
|---|---|---|
| 657 | 657 | |
| 658 | 658 | static WRITE8_HANDLER( trigger_nmi_on_cpu0 ) |
| 659 | 659 | { |
| 660 | cpunum_set_input_line( | |
| 660 | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, PULSE_LINE); | |
| 661 | 661 | } |
| 662 | 662 | |
| 663 | 663 | static WRITE8_HANDLER( cpu0_bankswitch_w ) |
| r2454 | r2455 | |
|---|---|---|
| 705 | 705 | |
| 706 | 706 | static const struct YM2203interface ym2203_interface = |
| 707 | 707 | { |
| 708 | 0,0,0,0,irqhandler | |
| 708 | { | |
| 709 | AY8910_LEGACY_OUTPUT, | |
| 710 | AY8910_DEFAULT_LOADS, | |
| 711 | NULL, NULL, NULL, NULL, | |
| 712 | }, | |
| 713 | irqhandler | |
| 709 | 714 | }; |
| 710 | 715 | |
| 711 | 716 | static const struct YM2151interface whizz_ym2151_interface = |
| r2454 | r2455 | |
|---|---|---|
| 865 | 865 | |
| 866 | 866 | static const struct AY8910interface ay8910_interface = |
| 867 | 867 | { |
| 868 | AY8910_LEGACY_OUTPUT, | |
| 869 | AY8910_DEFAULT_LOADS, | |
| 868 | 870 | soundlatch_r, |
| 869 | 871 | timer_r |
| 870 | 872 | }; |
| r2454 | r2455 | |
|---|---|---|
| 31 | 31 | /* bit 0 used but unknown */ |
| 32 | 32 | |
| 33 | 33 | if (data & 0x04) |
| 34 | cpunum_set_input_line( | |
| 34 | cpunum_set_input_line(machine, 1,0,ASSERT_LINE); | |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | static WRITE8_HANDLER( sub_irqack_w ) |
| 38 | 38 | { |
| 39 | cpunum_set_input_line( | |
| 39 | cpunum_set_input_line(machine, 1,0,CLEAR_LINE); | |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 |
| r2454 | r2455 | |
|---|---|---|
| 164 | 164 | ***************************************************************************/ |
| 165 | 165 | |
| 166 | 166 | #include "driver.h" |
| 167 | #include "deprecat.h" | |
| 168 | 167 | #include "cpu/z80/z80.h" |
| 169 | 168 | #include "cpu/m6805/m6805.h" |
| 170 | 169 | #include "sound/ay8910.h" |
| r2454 | r2455 | |
| 1826 | 1825 | |
| 1827 | 1826 | static const struct AY8910interface ay8910_interface_1 = |
| 1828 | 1827 | { |
| 1828 | AY8910_LEGACY_OUTPUT, | |
| 1829 | AY8910_DEFAULT_LOADS, | |
| 1829 | 1830 | input_port_6_r, |
| 1830 | input_port_7_r | |
| 1831 | input_port_7_r, | |
| 1832 | NULL, | |
| 1833 | NULL | |
| 1831 | 1834 | }; |
| 1832 | 1835 | |
| 1833 | 1836 | static const struct AY8910interface ay8910_interface_2 = |
| 1834 | 1837 | { |
| 1835 | 0, | |
| 1836 | 0, | |
| 1838 | AY8910_LEGACY_OUTPUT, | |
| 1839 | AY8910_DEFAULT_LOADS, | |
| 1840 | NULL, | |
| 1841 | NULL, | |
| 1837 | 1842 | dac_out_w, /* port Awrite */ |
| 1838 | 1843 | dac_vol_w /* port Bwrite */ |
| 1839 | 1844 | }; |
| 1840 | 1845 | |
| 1841 | 1846 | static const struct AY8910interface ay8910_interface_3 = |
| 1842 | 1847 | { |
| 1843 | 0, | |
| 1844 | 0, | |
| 1848 | AY8910_LEGACY_OUTPUT, | |
| 1849 | AY8910_DEFAULT_LOADS, | |
| 1850 | NULL, | |
| 1851 | NULL, | |
| 1845 | 1852 | input_port_4_f0_w, |
| 1846 | | |
| 1853 | NULL | |
| 1847 | 1854 | }; |
| 1848 | 1855 | |
| 1849 | 1856 | static const struct AY8910interface ay8910_interface_4 = |
| 1850 | 1857 | { |
| 1851 | 0, | |
| 1852 | 0, | |
| 1853 | 0, | |
| 1858 | AY8910_LEGACY_OUTPUT, | |
| 1859 | AY8910_DEFAULT_LOADS, | |
| 1860 | NULL, | |
| 1861 | NULL, | |
| 1862 | NULL, | |
| 1854 | 1863 | taitosj_sndnmi_msk_w /* port Bwrite */ |
| 1855 | 1864 | }; |
| 1856 | 1865 |
| r2454 | r2455 | |
|---|---|---|
| 516 | 516 | |
| 517 | 517 | static const struct YM2203interface ym2203_interface = |
| 518 | 518 | { |
| 519 | 0,0,0,0,m72_ym2151_irq_handler | |
| 519 | { | |
| 520 | AY8910_LEGACY_OUTPUT, | |
| 521 | AY8910_DEFAULT_LOADS, | |
| 522 | NULL, NULL, NULL, NULL | |
| 523 | }, | |
| 524 | m72_ym2151_irq_handler | |
| 520 | 525 | }; |
| 521 | 526 | |
| 522 | 527 |
| r2454 | r2455 | |
|---|---|---|
| 16 | 16 | ***************************************************************************/ |
| 17 | 17 | |
| 18 | 18 | #include "driver.h" |
| 19 | #include "deprecat.h" | |
| 20 | 19 | #include "sound/ay8910.h" |
| 21 | 20 | #include "sound/dac.h" |
| 22 | 21 | |
| r2454 | r2455 | |
| 539 | 538 | |
| 540 | 539 | static const struct AY8910interface ay8910_interface = |
| 541 | 540 | { |
| 541 | AY8910_LEGACY_OUTPUT, | |
| 542 | AY8910_DEFAULT_LOADS, | |
| 542 | 543 | soundlatch_r |
| 543 | 544 | }; |
| 544 | 545 |
| r2454 | r2455 | |
|---|---|---|
| 1749 | 1749 | |
| 1750 | 1750 | static const struct AY8910interface ay8910_interface = |
| 1751 | 1751 | { |
| 1752 | AY8910_LEGACY_OUTPUT, | |
| 1753 | AY8910_DEFAULT_LOADS, | |
| 1752 | 1754 | input_port_0_r, // DIPSW-A read |
| 1753 | input_port_1_r // DIPSW-B read | |
| 1755 | input_port_1_r, // DIPSW-B read | |
| 1756 | NULL, | |
| 1757 | NULL | |
| 1754 | 1758 | }; |
| 1755 | 1759 | |
| 1756 | 1760 |
| r2454 | r2455 | |
|---|---|---|
| 209 | 209 | |
| 210 | 210 | static const struct AY8910interface ay8912_interface_2 = |
| 211 | 211 | { |
| 212 | input_port_1_r | |
| 212 | AY8910_LEGACY_OUTPUT, | |
| 213 | AY8910_DEFAULT_LOADS, | |
| 214 | input_port_1_r, | |
| 215 | NULL, | |
| 216 | NULL, | |
| 217 | NULL | |
| 213 | 218 | }; |
| 214 | 219 | |
| 215 | 220 | static const struct AY8910interface ay8912_interface_3 = |
| 216 | 221 | { |
| 217 | input_port_0_r | |
| 222 | AY8910_LEGACY_OUTPUT, | |
| 223 | AY8910_DEFAULT_LOADS, | |
| 224 | input_port_0_r, | |
| 225 | NULL, | |
| 226 | NULL, | |
| 227 | NULL | |
| 218 | 228 | }; |
| 219 | 229 | |
| 220 | 230 |
| r2454 | r2455 | |
|---|---|---|
| 474 | 474 | |
| 475 | 475 | static const struct YM2203interface ym2203_interface = |
| 476 | 476 | { |
| 477 | 0,0,0,0,ym_irq | |
| 477 | { | |
| 478 | AY8910_LEGACY_OUTPUT, | |
| 479 | AY8910_DEFAULT_LOADS, | |
| 480 | NULL, NULL, NULL, NULL | |
| 481 | }, | |
| 482 | ym_irq | |
| 478 | 483 | }; |
| 479 | 484 | |
| 480 | 485 | static MACHINE_DRIVER_START( roldfrog ) |
| r2454 | r2455 | |
|---|---|---|
| 202 | 202 | { |
| 203 | 203 | static UINT16 prg_prot; |
| 204 | 204 | |
| 205 | if((0xffff - input_port_ | |
| 205 | if((0xffff - input_port_ | |
| 206 | 206 | { |
| 207 | jm_regs[0x000/2] = input_port_2_word_r(machine,0,0); | |
| 208 | jm_regs[0x002/2] = input_port_3_word_r(machine,0,0); | |
| 209 | jm_regs[0x004/2] = input_port_4_word_r(machine,0,0); | |
| 210 | jm_regs[0x006/2] = input_port_5_word_r(machine,0,0); | |
| 211 | jm_regs[0x008/2] = input_port_6_word_r(machine,0,0); | |
| 212 | jm_regs[0x00a/2] = input_port_7_word_r(machine,0,0); | |
| 207 | jm_regs[0x000/2] = input_port_read_indexed(machine,2); | |
| 208 | jm_regs[0x002/2] = input_port_read_indexed(machine,3); | |
| 209 | jm_regs[0x004/2] = input_port_read_indexed(machine,4); | |
| 210 | jm_regs[0x006/2] = input_port_read_indexed(machine,5); | |
| 211 | jm_regs[0x008/2] = input_port_read_indexed(machine,6); | |
| 212 | jm_regs[0x00a/2] = input_port_read_indexed(machine,7); | |
| 213 | 213 | } |
| 214 | 214 | else |
| 215 | 215 | { |
| r2454 | r2455 | |
| 247 | 247 | { |
| 248 | 248 | static UINT16 prg_prot; |
| 249 | 249 | |
| 250 | if((0xffff - input_port_ | |
| 250 | if((0xffff - input_port_ | |
| 251 | 251 | { |
| 252 | jm_regs[0x300/2] = input_port_2_word_r(machine,0,0); | |
| 253 | jm_regs[0x302/2] = input_port_3_word_r(machine,0,0); | |
| 254 | jm_regs[0x304/2] = input_port_4_word_r(machine,0,0); | |
| 255 | jm_regs[0x306/2] = input_port_5_word_r(machine,0,0); | |
| 256 | jm_regs[0x308/2] = input_port_6_word_r(machine,0,0); | |
| 257 | jm_regs[0x30a/2] = input_port_7_word_r(machine,0,0); | |
| 252 | jm_regs[0x300/2] = input_port_read_indexed(machine,2); | |
| 253 | jm_regs[0x302/2] = input_port_read_indexed(machine,3); | |
| 254 | jm_regs[0x304/2] = input_port_read_indexed(machine,4); | |
| 255 | jm_regs[0x306/2] = input_port_read_indexed(machine,5); | |
| 256 | jm_regs[0x308/2] = input_port_read_indexed(machine,6); | |
| 257 | jm_regs[0x30a/2] = input_port_read_indexed(machine,7); | |
| 258 | 258 | } |
| 259 | 259 | else |
| 260 | 260 | { |
| r2454 | r2455 | |
| 289 | 289 | |
| 290 | 290 | static void second_mcu_run(running_machine *machine) |
| 291 | 291 | { |
| 292 | if((0xffff - input_port_ | |
| 292 | if((0xffff - input_port_ | |
| 293 | 293 | { |
| 294 | jm_regs[0x200/2] = input_port_2_word_r(machine,0,0); | |
| 295 | jm_regs[0x202/2] = input_port_3_word_r(machine,0,0); | |
| 296 | jm_regs[0x204/2] = input_port_4_word_r(machine,0,0); | |
| 294 | jm_regs[0x200/2] = input_port_read_indexed(machine,2); | |
| 295 | jm_regs[0x202/2] = input_port_read_indexed(machine,3); | |
| 296 | jm_regs[0x204/2] = input_port_read_indexed(machine,4); | |
| 297 | 297 | } |
| 298 | 298 | else |
| 299 | 299 | { |
| r2454 | r2455 | |
|---|---|---|
| 458 | 458 | |
| 459 | 459 | static const struct AY8910interface lcay8910_interface = |
| 460 | 460 | { |
| 461 | AY8910_LEGACY_OUTPUT, | |
| 462 | AY8910_DEFAULT_LOADS, | |
| 461 | 463 | input_port_3_r, //DSW0 |
| 462 | input_port_4_r //DSW1 | |
| 464 | input_port_4_r, //DSW1 | |
| 465 | NULL, | |
| 466 | NULL | |
| 463 | 467 | }; |
| 464 | 468 | |
| 465 | 469 |
| r2454 | r2455 | |
|---|---|---|
| 569 | 569 | |
| 570 | 570 | static const struct AY8910interface stratvox_ay8910_interface = |
| 571 | 571 | { |
| 572 | 0, | |
| 573 | 0, | |
| 572 | AY8910_LEGACY_OUTPUT, | |
| 573 | AY8910_DEFAULT_LOADS, | |
| 574 | NULL, | |
| 575 | NULL, | |
| 574 | 576 | stratvox_sn76477_w, /* SN76477 commands (not used in Route 16?) */ |
| 575 | | |
| 577 | NULL | |
| 576 | 578 | }; |
| 577 | 579 | |
| 578 | 580 |
| r2454 | r2455 | |
|---|---|---|
| 132 | 132 | |
| 133 | 133 | static WRITE8_HANDLER( exzisus_cpub_reset_w ) |
| 134 | 134 | { |
| 135 | cpunum_set_input_line( | |
| 135 | cpunum_set_input_line(machine, 3, INPUT_LINE_RESET, PULSE_LINE); | |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | #if 0 |
| r2454 | r2455 | |
|---|---|---|
| 434 | 434 | |
| 435 | 435 | static READ8_HANDLER( topsecex_input_port_5_r ) |
| 436 | 436 | { |
| 437 | return (input_port_ | |
| 437 | return (input_port_ | |
| 438 | 438 | } |
| 439 | 439 | |
| 440 | 440 |
| r2454 | r2455 | |
|---|---|---|
| 41 | 41 | ***************************************************************************/ |
| 42 | 42 | |
| 43 | 43 | #include "driver.h" |
| 44 | #include "deprecat.h" | |
| 45 | 44 | #include "sound/ay8910.h" |
| 46 | 45 | #include "sound/custom.h" |
| 47 | 46 | #include "cpu/i86/i86.h" |
| r2454 | r2455 | |
| 63 | 62 | /* Main CPU and Z80 synchronisation */ |
| 64 | 63 | static WRITE16_HANDLER( z80_busreq_w ) |
| 65 | 64 | { |
| 66 | cpunum_set_input_line( | |
| 65 | cpunum_set_input_line(machine, 2, INPUT_LINE_HALT, (data & 1) ? CLEAR_LINE : ASSERT_LINE); | |
| 67 | 66 | } |
| 68 | 67 | |
| 69 | 68 | static WRITE16_HANDLER( resume_math_w ) |
| 70 | 69 | { |
| 71 | cpunum_set_input_line( | |
| 70 | cpunum_set_input_line(machine, 1, INPUT_LINE_TEST, ASSERT_LINE); | |
| 72 | 71 | } |
| 73 | 72 | |
| 74 | 73 | static WRITE16_HANDLER( halt_math_w ) |
| 75 | 74 | { |
| 76 | cpunum_set_input_line( | |
| 75 | cpunum_set_input_line(machine, 1, INPUT_LINE_TEST, CLEAR_LINE); | |
| 77 | 76 | } |
| 78 | 77 | |
| 79 | 78 | /* Z80 can trigger an interrupt itself */ |
| 80 | 79 | static WRITE8_HANDLER( z80_intreq_w ) |
| 81 | 80 | { |
| 82 | cpunum_set_input_line( | |
| 81 | cpunum_set_input_line(machine, 2, 0, HOLD_LINE); | |
| 83 | 82 | } |
| 84 | 83 | |
| 85 | 84 | /* Periodic Z80 interrupt */ |
| r2454 | r2455 | |
| 466 | 465 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 467 | 466 | AM_RANGE(0x3000, 0x37ff) AM_RAM AM_MIRROR(0x800) AM_BASE(&z80_ram) |
| 468 | 467 | AM_RANGE(0x4000, 0x4000) AM_WRITE(z80_intreq_w) |
| 469 | AM_RANGE(0x5000, 0x5003) AM_READWRITE(ppi8255_ | |
| 468 | AM_RANGE(0x5000, 0x5003) AM_DEVREADWRITE(PPI8255, "ppi8255", ppi8255_ | |
| 470 | 469 | AM_RANGE(0x6000, 0x6003) AM_READWRITE(tx1_pit8253_r, tx1_pit8253_w) |
| 471 | 470 | AM_RANGE(0x7000, 0x7fff) AM_WRITE(tx1_ppi_latch_w) |
| 472 | 471 | AM_RANGE(0xb000, 0xbfff) AM_READWRITE(ts_r, ts_w) |
| r2454 | r2455 | |
| 560 | 559 | AM_RANGE(0x0000, 0x3fff) AM_ROM |
| 561 | 560 | AM_RANGE(0x4000, 0x47ff) AM_RAM AM_BASE(&z80_ram) |
| 562 | 561 | AM_RANGE(0x6000, 0x6001) AM_READ(bb_analog_r) |
| 563 | AM_RANGE(0x6800, 0x6803) AM_READWRITE(ppi8255_ | |
| 562 | AM_RANGE(0x6800, 0x6803) AM_DEVREADWRITE(PPI8255, "ppi8255", ppi8255_ | |
| 564 | 563 | AM_RANGE(0x7000, 0x7003) AM_RAM |
| 565 | 564 | AM_RANGE(0x7800, 0x7800) AM_WRITE(z80_intreq_w) |
| 566 | 565 | AM_RANGE(0xc000, 0xc7ff) AM_READWRITE(ts_r, ts_w) |
| r2454 | r2455 | |
| 620 | 619 | |
| 621 | 620 | static const struct AY8910interface tx1_ay8910_interface = |
| 622 | 621 | { |
| 623 | 0, | |
| 624 | 0, | |
| 622 | AY8910_LEGACY_OUTPUT, | |
| 623 | AY8910_DEFAULT_LOADS, | |
| 624 | NULL, | |
| 625 | NULL, | |
| 625 | 626 | tx1_ay8910_a_w, |
| 626 | 627 | tx1_ay8910_b_w, |
| 627 | 628 | }; |
| r2454 | r2455 | |
| 630 | 631 | /* YM2149 IC19 */ |
| 631 | 632 | static const struct AY8910interface buggyboy_ym2149_interface_1 = |
| 632 | 633 | { |
| 634 | AY8910_LEGACY_OUTPUT, | |
| 635 | AY8910_DEFAULT_LOADS, | |
| 633 | 636 | input_port_1_r, |
| 634 | 637 | input_port_2_r, |
| 635 | 0, | |
| 636 | 0, | |
| 638 | NULL, | |
| 639 | NULL, | |
| 637 | 640 | }; |
| 638 | 641 | |
| 639 | 642 | /* YM2149 IC24 */ |
| 640 | 643 | static const struct AY8910interface buggyboy_ym2149_interface_2 = |
| 641 | 644 | { |
| 642 | 0, | |
| 643 | 0, | |
| 645 | AY8910_LEGACY_OUTPUT, | |
| 646 | AY8910_DEFAULT_LOADS, | |
| 647 | NULL, | |
| 648 | NULL, | |
| 644 | 649 | bb_ym1_a_w, |
| 645 | 650 | bb_ym1_b_w, |
| 646 | 651 | }; |
| r2454 | r2455 | |
| 651 | 656 | coin_counter_w(1, data & 0x40); |
| 652 | 657 | } |
| 653 | 658 | |
| 654 | const ppi8255_interface tx1_ppi8255_intf = | |
| 659 | static const ppi8255_interface tx1_ppi8255_intf = | |
| 655 | 660 | { |
| 656 | 1, | |
| 657 | { tx1_ppi_porta_r }, | |
| 658 | { tx1_ppi_portb_r }, | |
| 659 | { input_port_4_r }, | |
| 660 | { 0 }, | |
| 661 | { 0 }, | |
| 662 | { tx1_coin_cnt }, | |
| 661 | tx1_ppi_porta_r, | |
| 662 | tx1_ppi_portb_r, | |
| 663 | input_port_4_r, | |
| 664 | NULL, | |
| 665 | NULL, | |
| 666 | tx1_coin_cnt | |
| 663 | 667 | }; |
| 664 | 668 | |
| 665 | 669 | static const struct CustomSound_interface tx1_custom_interface = |
| r2454 | r2455 | |
| 670 | 674 | }; |
| 671 | 675 | |
| 672 | 676 | /* Buggy Boy uses an 8255 PPI instead of YM2149 ports for inputs! */ |
| 673 | const ppi8255_interface buggyboy_ppi8255_intf = | |
| 677 | static const ppi8255_interface buggyboy_ppi8255_intf = | |
| 674 | 678 | { |
| 675 | 1, | |
| 676 | { input_port_1_r }, | |
| 677 | { 0 }, | |
| 678 | { input_port_2_r }, | |
| 679 | { 0 }, | |
| 680 | { 0 }, | |
| 681 | { 0 }, | |
| 679 | input_port_1_r, | |
| 680 | NULL, | |
| 681 | input_port_2_r, | |
| 682 | NULL, | |
| 683 | NULL, | |
| 684 | NULL | |
| 682 | 685 | }; |
| 683 | 686 | |
| 684 | 687 | static const struct CustomSound_interface bb_custom_interface = |
| r2454 | r2455 | |
| 711 | 714 | MDRV_MACHINE_START(tx1) |
| 712 | 715 | MDRV_NVRAM_HANDLER(generic_0fill) |
| 713 | 716 | |
| 717 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 718 | MDRV_DEVICE_CONFIG( tx1_ppi8255_intf ) | |
| 719 | ||
| 714 | 720 | MDRV_GFXDECODE(tx1) |
| 715 | 721 | MDRV_PALETTE_LENGTH(256+(256*4)+(2048*4)) |
| 716 | 722 | MDRV_PALETTE_INIT(tx1) |
| r2454 | r2455 | |
| 766 | 772 | MDRV_MACHINE_START(buggyboy) |
| 767 | 773 | MDRV_NVRAM_HANDLER(generic_0fill) |
| 768 | 774 | |
| 775 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 776 | MDRV_DEVICE_CONFIG( buggyboy_ppi8255_intf ) | |
| 777 | ||
| 769 | 778 | MDRV_GFXDECODE(buggyboy) |
| 770 | 779 | MDRV_DEFAULT_LAYOUT(layout_triphsxs) |
| 771 | 780 |
| r2454 | r2455 | |
|---|---|---|
| 15 | 15 | |
| 16 | 16 | #include "driver.h" |
| 17 | 17 | #include "render.h" |
| 18 | #include "deprecat.h" | |
| 19 | 18 | #include "machine/laserdsc.h" |
| 20 | 19 | #include "cpu/cop400/cop400.h" |
| 21 | 20 | |
| r2454 | r2455 | |
| 156 | 155 | |
| 157 | 156 | static WRITE8_HANDLER(intrq_w) |
| 158 | 157 | { |
| 159 | cpunum_set_input_line( | |
| 158 | cpunum_set_input_line(machine, 0, 0, ASSERT_LINE); | |
| 160 | 159 | } |
| 161 | 160 | |
| 162 | 161 | static WRITE8_HANDLER(sc01_register_w) |
| r2454 | r2455 | |
| 181 | 180 | SET_Z80_SSI_REQUEST(); |
| 182 | 181 | if (!(Z80_SSI_REQUEST())) |
| 183 | 182 | logerror("SETTING IRQ LINE sc01\n"); |
| 184 | cpunum_set_input_line( | |
| 183 | cpunum_set_input_line(machine, 0, 0, ASSERT_LINE); | |
| 185 | 184 | break; |
| 186 | 185 | |
| 187 | 186 | default: |
| r2454 | r2455 | |
| 290 | 289 | /* Assert the Z80's interrupt line if necessary */ |
| 291 | 290 | if (irq_flag) |
| 292 | 291 | { |
| 293 | cpunum_set_input_line( | |
| 292 | cpunum_set_input_line(machine, 0, 0, ASSERT_LINE); | |
| 294 | 293 | } |
| 295 | 294 | } |
| 296 | 295 |
| r2454 | r2455 | |
|---|---|---|
| 31 | 31 | */ |
| 32 | 32 | |
| 33 | 33 | #include "driver.h" |
| 34 | #include "deprecat.h" | |
| 35 | 34 | #include "machine/8255ppi.h" |
| 36 | 35 | #include "sound/ay8910.h" |
| 37 | 36 | |
| r2454 | r2455 | |
| 137 | 136 | // int bit = (i & 0x300)>>8; |
| 138 | 137 | offset = ((i & 0x7f)<<3) | ((i & 0x80) >> 5); |
| 139 | 138 | |
| 140 | palette_set_color_rgb( | |
| 139 | palette_set_color_rgb(machine,i, | |
| 141 | 140 | pal4bit(BIT(paletteram[offset],0)*0x1 + BIT(paletteram[offset+1],0)*0x2 + BIT(paletteram[offset+2],0)*0x4 + BIT(paletteram[offset+3],0)*0x8), |
| 142 | 141 | pal4bit(BIT(paletteram[offset],1)*0x1 + BIT(paletteram[offset+1],1)*0x2 + BIT(paletteram[offset+2],1)*0x4 + BIT(paletteram[offset+3],1)*0x8), |
| 143 | 142 | pal4bit(BIT(paletteram[offset],2)*0x1 + BIT(paletteram[offset+1],2)*0x2 + BIT(paletteram[offset+2],2)*0x4 + BIT(paletteram[offset+3],2)*0x8)); |
| r2454 | r2455 | |
| 191 | 190 | static ADDRESS_MAP_START( bigappg_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 192 | 191 | AM_RANGE(0x0000, 0x5fff) AM_ROM |
| 193 | 192 | AM_RANGE(0xa000, 0xafff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) |
| 194 | AM_RANGE(0xc004, 0xc007) AM_READWRITE(ppi8255_0_r, ppi8255_0_w) | |
| 195 | AM_RANGE(0xc008, 0xc00b) AM_READWRITE(ppi8255_1_r, ppi8255_1_w) | |
| 193 | AM_RANGE(0xc004, 0xc007) AM_DEVREADWRITE(PPI8255, "ppi8255_0", ppi8255_r, ppi8255_w) | |
| 194 | AM_RANGE(0xc008, 0xc00b) AM_DEVREADWRITE(PPI8255, "ppi8255_1", ppi8255_r, ppi8255_w) | |
| 196 | 195 | AM_RANGE(0xe000, 0xe001) AM_WRITENOP // 6845 crt |
| 197 | 196 | AM_RANGE(0xe800, 0xefff) AM_RAM_WRITE(phrcraze_attr_w) AM_BASE(&phrcraze_attr) |
| 198 | 197 | AM_RANGE(0xf000, 0xf7ff) AM_RAM_WRITE(phrcraze_bg_w) AM_BASE(&videoram) |
| r2454 | r2455 | |
| 206 | 205 | AM_RANGE(0x5400, 0x54ff) AM_WRITE(low_offset_w) |
| 207 | 206 | AM_RANGE(0x5800, 0x58ff) AM_WRITE(med_offset_w) |
| 208 | 207 | AM_RANGE(0x6000, 0x67ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) |
| 209 | AM_RANGE(0xa000, 0xa003) AM_READWRITE(ppi8255_0_r, ppi8255_0_w) | |
| 210 | AM_RANGE(0xc000, 0xc003) AM_READWRITE(ppi8255_1_r, ppi8255_1_w) | |
| 208 | AM_RANGE(0xa000, 0xa003) AM_DEVREADWRITE(PPI8255, "ppi8255_0", ppi8255_r, ppi8255_w) | |
| 209 | AM_RANGE(0xc000, 0xc003) AM_DEVREADWRITE(PPI8255, "ppi8255_1", ppi8255_r, ppi8255_w) | |
| 211 | 210 | AM_RANGE(0xe000, 0xe001) AM_WRITENOP // 6845 crt |
| 212 | 211 | AM_RANGE(0xe800, 0xefff) AM_RAM_WRITE(phrcraze_attr_w) AM_BASE(&phrcraze_attr) |
| 213 | 212 | AM_RANGE(0xf000, 0xf7ff) AM_RAM_WRITE(phrcraze_bg_w) AM_BASE(&videoram) |
| r2454 | r2455 | |
| 223 | 222 | static ADDRESS_MAP_START( phrcraze_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 224 | 223 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 225 | 224 | AM_RANGE(0xa000, 0xbfff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) |
| 226 | AM_RANGE(0xc008, 0xc00b) AM_READWRITE(ppi8255_1_r, ppi8255_1_w) | |
| 227 | AM_RANGE(0xc00c, 0xc00f) AM_READWRITE(ppi8255_0_r, ppi8255_0_w) | |
| 225 | AM_RANGE(0xc008, 0xc00b) AM_DEVREADWRITE(PPI8255, "ppi8255_1", ppi8255_r, ppi8255_w) | |
| 226 | AM_RANGE(0xc00c, 0xc00f) AM_DEVREADWRITE(PPI8255, "ppi8255_0", ppi8255_r, ppi8255_w) | |
| 228 | 227 | AM_RANGE(0xce00, 0xceff) AM_READWRITE(questions_r, high_offset_w) |
| 229 | 228 | AM_RANGE(0xd600, 0xd6ff) AM_WRITE(low_offset_w) |
| 230 | 229 | AM_RANGE(0xda00, 0xdaff) AM_WRITE(med_offset_w) |
| r2454 | r2455 | |
| 243 | 242 | static ADDRESS_MAP_START( tictac_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 244 | 243 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 245 | 244 | AM_RANGE(0x8000, 0x9fff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) |
| 246 | AM_RANGE(0xc004, 0xc007) AM_READWRITE(ppi8255_0_r, ppi8255_0_w) | |
| 247 | AM_RANGE(0xc008, 0xc00b) AM_READWRITE(ppi8255_1_r, ppi8255_1_w) | |
| 245 | AM_RANGE(0xc004, 0xc007) AM_DEVREADWRITE(PPI8255, "ppi8255_0", ppi8255_r, ppi8255_w) | |
| 246 | AM_RANGE(0xc008, 0xc00b) AM_DEVREADWRITE(PPI8255, "ppi8255_1", ppi8255_r, ppi8255_w) | |
| 248 | 247 | AM_RANGE(0xce00, 0xceff) AM_READWRITE(questions_r, high_offset_w) |
| 249 | 248 | AM_RANGE(0xd600, 0xd6ff) AM_WRITE(low_offset_w) |
| 250 | 249 | AM_RANGE(0xda00, 0xdaff) AM_WRITE(med_offset_w) |
| r2454 | r2455 | |
| 263 | 262 | static ADDRESS_MAP_START( trvwhziv_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 264 | 263 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 265 | 264 | AM_RANGE(0xa000, 0xbfff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) |
| 266 | AM_RANGE(0xc004, 0xc007) AM_READWRITE(ppi8255_0_r, ppi8255_0_w) | |
| 267 | AM_RANGE(0xc008, 0xc00b) AM_READWRITE(ppi8255_1_r, ppi8255_1_w) | |
| 265 | AM_RANGE(0xc004, 0xc007) AM_DEVREADWRITE(PPI8255, "ppi8255_0", ppi8255_r, ppi8255_w) | |
| 266 | AM_RANGE(0xc008, 0xc00b) AM_DEVREADWRITE(PPI8255, "ppi8255_1", ppi8255_r, ppi8255_w) | |
| 268 | 267 | AM_RANGE(0xce00, 0xceff) AM_READWRITE(questions_r, high_offset_w) |
| 269 | 268 | AM_RANGE(0xd600, 0xd6ff) AM_WRITE(low_offset_w) |
| 270 | 269 | AM_RANGE(0xda00, 0xdaff) AM_WRITE(med_offset_w) |
| r2454 | r2455 | |
| 770 | 769 | GFXDECODE_ENTRY( REGION_GFX2, 8, tiles8x8x1_layout, 0, 128 ) // flipped tiles |
| 771 | 770 | GFXDECODE_END |
| 772 | 771 | |
| 773 | static const ppi8255_interface ppi8255_intf = | |
| 772 | static const ppi8255_interface ppi8255_intf[2] = | |
| 774 | 773 | { |
| 775 | 2, /* 2 chips */ | |
| 776 | { input_port_0_r, input_port_3_r }, /* Port A read */ | |
| 777 | { input_port_1_r, NULL }, /* Port B read */ | |
| 778 | { input_port_2_r, NULL }, /* Port C read */ | |
| 779 | { NULL, NULL }, /* Port A write */ | |
| 780 | { NULL, led1_w }, /* Port B write */ | |
| 781 | { NULL, misc_w }, /* Port C write */ | |
| 774 | { | |
| 775 | input_port_0_r, /* Port A read */ | |
| 776 | input_port_1_r, /* Port B read */ | |
| 777 | input_port_2_r, /* Port C read */ | |
| 778 | NULL, /* Port A write */ | |
| 779 | NULL, /* Port B write */ | |
| 780 | NULL /* Port C write */ | |
| 781 | }, | |
| 782 | { | |
| 783 | input_port_3_r, /* Port A read */ | |
| 784 | NULL, /* Port B read */ | |
| 785 | NULL, /* Port C read */ | |
| 786 | NULL, /* Port A write */ | |
| 787 | led1_w, /* Port B write */ | |
| 788 | misc_w /* Port C write */ | |
| 789 | } | |
| 782 | 790 | }; |
| 783 | 791 | |
| 784 | 792 | static const struct AY8910interface merit_ay8912_interface = |
| 785 | 793 | { |
| 786 | 0,0, | |
| 787 | led2_w,0 | |
| 794 | AY8910_LEGACY_OUTPUT, | |
| 795 | AY8910_DEFAULT_LOADS, | |
| 796 | NULL, NULL, | |
| 797 | led2_w, NULL | |
| 788 | 798 | }; |
| 789 | 799 | |
| 790 | static MACHINE_RESET( merit ) | |
| 791 | { | |
| 792 | ppi8255_init(&ppi8255_intf); | |
| 793 | } | |
| 794 | 800 | |
| 795 | ||
| 796 | 801 | static MACHINE_DRIVER_START( pitboss ) |
| 797 | 802 | MDRV_CPU_ADD_TAG("main",Z80,2500000) /* ?? */ |
| 798 | 803 | MDRV_CPU_PROGRAM_MAP(pitboss_map,0) |
| r2454 | r2455 | |
| 800 | 805 | MDRV_CPU_VBLANK_INT("main", irq0_line_hold) |
| 801 | 806 | |
| 802 | 807 | MDRV_NVRAM_HANDLER(generic_0fill) |
| 803 | MDRV_MACHINE_RESET(merit) | |
| 804 | 808 | |
| 809 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 810 | MDRV_DEVICE_CONFIG( ppi8255_intf[0] ) | |
| 811 | ||
| 812 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 813 | MDRV_DEVICE_CONFIG( ppi8255_intf[1] ) | |
| 814 | ||
| 805 | 815 | /* video hardware */ |
| 806 | 816 | MDRV_SCREEN_ADD("main", RASTER) |
| 807 | 817 | MDRV_SCREEN_REFRESH_RATE(60) |
| r2454 | r2455 | |
|---|---|---|
| 178 | 178 | static READ16_HANDLER( dassault_irq_r ) |
| 179 | 179 | { |
| 180 | 180 | switch (offset) { |
| 181 | case 0: cpunum_set_input_line(Machine, 0, 5, CLEAR_LINE); break; | |
| 182 | case 1: cpunum_set_input_line(Machine, 1, 6, CLEAR_LINE); break; | |
| 181 | case 0: cpunum_set_input_line(machine, 0, 5, CLEAR_LINE); break; | |
| 182 | case 1: cpunum_set_input_line(machine, 1, 6, CLEAR_LINE); break; | |
| 183 | 183 | } |
| 184 | 184 | return shared_ram[(0xffc/2)+offset]; /* The values probably don't matter */ |
| 185 | 185 | } |
| r2454 | r2455 | |
| 187 | 187 | static WRITE16_HANDLER( dassault_irq_w ) |
| 188 | 188 | { |
| 189 | 189 | switch (offset) { |
| 190 | case 0: cpunum_set_input_line(Machine, 0, 5, ASSERT_LINE); break; | |
| 191 | case 1: cpunum_set_input_line(Machine, 1, 6, ASSERT_LINE); break; | |
| 190 | case 0: cpunum_set_input_line(machine, 0, 5, ASSERT_LINE); break; | |
| 191 | case 1: cpunum_set_input_line(machine, 1, 6, ASSERT_LINE); break; | |
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | COMBINE_DATA(&shared_ram[(0xffc/2)+offset]); /* The values probably don't matter */ |
| r2454 | r2455 | |
|---|---|---|
| 163 | 163 | |
| 164 | 164 | static const struct AY8910interface ay8910_interface = |
| 165 | 165 | { |
| 166 | 0, /* not used ? */ | |
| 166 | AY8910_LEGACY_OUTPUT, | |
| 167 | AY8910_DEFAULT_LOADS, | |
| 168 | NULL, /* not used ? */ | |
| 167 | 169 | input_port_3_r, |
| 170 | NULL, | |
| 171 | NULL | |
| 168 | 172 | }; |
| 169 | 173 | |
| 170 | 174 |
| r2454 | r2455 | |
|---|---|---|
| 60 | 60 | |
| 61 | 61 | static READ16_HANDLER( joystick_r ) |
| 62 | 62 | { |
| 63 | return (((input_port_0_r (machine,offset) - 0xf) << 8) | | |
| 64 | ((input_port_1_r (machine,offset) - 0xf) & 0xff)); | |
| 63 | return (((input_port_read_indexed(machine, 0) - 0xf) << 8) | | |
| 64 | ((input_port_read_indexed(machine, 1) - 0xf) & 0xff)); | |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 |
| r2454 | r2455 | |
|---|---|---|
| 140 | 140 | if (timer & 0x100) popmessage("watchdog!"); |
| 141 | 141 | |
| 142 | 142 | |
| 143 | if (last != (input_port_ | |
| 143 | if (last != (input_port_ | |
| 144 | 144 | { |
| 145 | last = input_port_ | |
| 145 | last = input_port_ | |
| 146 | 146 | cpunum_set_input_line(machine, 0, 0, PULSE_LINE); |
| 147 | 147 | } |
| 148 | pia_set_input_a(0, input_port_ | |
| 148 | pia_set_input_a(0, input_port_ | |
| 149 | 149 | |
| 150 | pia_set_input_ca1(0, input_port_ | |
| 150 | pia_set_input_ca1(0, input_port_ | |
| 151 | 151 | |
| 152 | pia_set_input_ca2(0, input_port_ | |
| 152 | pia_set_input_ca2(0, input_port_ | |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | static READ8_HANDLER( timer_r ) |
| r2454 | r2455 | |
|---|---|---|
| 66 | 66 | |
| 67 | 67 | static WRITE8_HANDLER( cpu1_reset_w ) |
| 68 | 68 | { |
| 69 | cpunum_set_input_line( | |
| 69 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, data ? CLEAR_LINE : ASSERT_LINE); | |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | static WRITE8_HANDLER( cpu2_reset_w ) |
| 73 | 73 | { |
| 74 | cpunum_set_input_line( | |
| 74 | cpunum_set_input_line(machine, 2, INPUT_LINE_RESET, data ? CLEAR_LINE : ASSERT_LINE); | |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | static WRITE8_HANDLER( mcu_reset_w ) |
| 78 | 78 | { |
| 79 | 79 | /* the bootlegs don't have a MCU, so make sure it's there before trying to reset it */ |
| 80 | 80 | if (cpu_gettotalcpu() >= 4) |
| 81 | cpunum_set_input_line( | |
| 81 | cpunum_set_input_line(machine, 3, INPUT_LINE_RESET, data ? CLEAR_LINE : ASSERT_LINE); | |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | static WRITE8_HANDLER( cpu2_m6000_w ) |
| r2454 | r2455 | |
| 103 | 103 | |
| 104 | 104 | cpu_interrupt_enable(0,bit); |
| 105 | 105 | if (!bit) |
| 106 | cpunum_set_input_line( | |
| 106 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | static WRITE8_HANDLER( irq1_ack_w ) |
| r2454 | r2455 | |
| 112 | 112 | |
| 113 | 113 | cpu_interrupt_enable(1,bit); |
| 114 | 114 | if (!bit) |
| 115 | cpunum_set_input_line( | |
| 115 | cpunum_set_input_line(machine, 1, 0, CLEAR_LINE); | |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | static WRITE8_HANDLER( coincounter_w ) |
| r2454 | r2455 | |
|---|---|---|
| 8 | 8 | ***************************************************************************/ |
| 9 | 9 | |
| 10 | 10 | #include "driver.h" |
| 11 | #include "deprecat.h" | |
| 12 | 11 | #include "cpu/konami/konami.h" /* for the callback and the firq irq definition */ |
| 13 | 12 | #include "video/konamiic.h" |
| 14 | 13 | #include "sound/2151intf.h" |
| r2454 | r2455 | |
| 101 | 100 | |
| 102 | 101 | static WRITE8_HANDLER( gbusters_sh_irqtrigger_w ) |
| 103 | 102 | { |
| 104 | cpunum_set_input_line_and_vector( | |
| 103 | cpunum_set_input_line_and_vector(machine, 1,0,HOLD_LINE,0xff); | |
| 105 | 104 | } |
| 106 | 105 | |
| 107 | 106 | static WRITE8_HANDLER( gbusters_snd_bankswitch_w ) |
| r2454 | r2455 | |
|---|---|---|
| 512 | 512 | static WRITE8_HANDLER( megaplay_bios_6404_w ) |
| 513 | 513 | { |
| 514 | 514 | if(((bios_6404 & 0x0c) == 0x00) && ((data & 0x0c) == 0x0c)) |
| 515 | cpunum_set_input_line( | |
| 515 | cpunum_set_input_line(machine, 0, INPUT_LINE_RESET, PULSE_LINE); | |
| 516 | 516 | bios_6404 = data; |
| 517 | 517 | |
| 518 | 518 | // logerror("BIOS: 0x6404 write: 0x%02x\n",data); |
| r2454 | r2455 | |
|---|---|---|
| 1038 | 1038 | |
| 1039 | 1039 | static const struct AY8910interface srmp2_ay8910_interface = |
| 1040 | 1040 | { |
| 1041 | AY8910_LEGACY_OUTPUT, | |
| 1042 | AY8910_DEFAULT_LOADS, | |
| 1041 | 1043 | input_port_2_r, /* Input A: DSW 2 */ |
| 1042 | 1044 | input_port_1_r, /* Input B: DSW 1 */ |
| 1045 | NULL, | |
| 1046 | NULL | |
| 1043 | 1047 | }; |
| 1044 | 1048 | |
| 1045 | 1049 |
| r2454 | r2455 | |
|---|---|---|
| 192 | 192 | |
| 193 | 193 | static const struct AY8910interface ay8910_1_interface = |
| 194 | 194 | { |
| 195 | AY8910_LEGACY_OUTPUT, | |
| 196 | AY8910_DEFAULT_LOADS, | |
| 195 | 197 | input_port_3_r, |
| 196 | 0 | |
| 198 | NULL, | |
| 199 | NULL, | |
| 200 | NULL | |
| 197 | 201 | }; |
| 198 | 202 | |
| 199 | 203 | |
| 200 | 204 | static const struct AY8910interface ay8910_2_interface = |
| 201 | 205 | { |
| 206 | AY8910_LEGACY_OUTPUT, | |
| 207 | AY8910_DEFAULT_LOADS, | |
| 202 | 208 | input_port_1_r, |
| 203 | input_port_2_r | |
| 209 | input_port_2_r, | |
| 210 | NULL, | |
| 211 | NULL | |
| 204 | 212 | }; |
| 205 | 213 | |
| 206 | 214 |
| r2454 | r2455 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "deprecat.h" | |
| 11 | 10 | #include "sound/ay8910.h" |
| 12 | 11 | #include "video/mc6845.h" |
| 13 | 12 | #include "madalien.h" |
| r2454 | r2455 | |
| 164 | 163 | |
| 165 | 164 | static const struct AY8910interface ay8910_interface = |
| 166 | 165 | { |
| 166 | AY8910_LEGACY_OUTPUT, | |
| 167 | AY8910_DEFAULT_LOADS, | |
| 167 | 168 | NULL, |
| 168 | 169 | NULL, |
| 169 | 170 | madalien_portA_w, |
| r2454 | r2455 | |
|---|---|---|
| 1 | /* Some IGS games with a HD64180 */ | |
| 2 | /* also see iqblock.c and tarzan.c */ | |
| 1 | /*************************************************************************** | |
| 3 | 2 | |
| 3 | -= IGS017 Based Hardware =- | |
| 4 | ||
| 5 | driver by Pierpaolo Prazzoli, Luca Elia (l.elia@tin.it) | |
| 6 | ||
| 7 | CPU: Z180 (HD64180) | |
| 8 | GFX: IGS017 (2 tilemaps, variable size sprites, protection) | |
| 9 | SOUND: M6295, YM2413 | |
| 10 | OTHER: IGS025 | |
| 11 | ||
| 12 | To Do: | |
| 13 | ||
| 14 | - Protection emulation, instead of patching the roms. | |
| 15 | - tjsb: finish sprites decryption (data lines scrambling), protection, inputs. | |
| 16 | - iqblocka: NVRAM. | |
| 17 | - iqblockf: protection. | |
| 18 | ||
| 19 | Notes: | |
| 20 | ||
| 21 | - iqblocka: keep start or test pressed during boot to enter test mode A or B. | |
| 22 | ||
| 23 | ***************************************************************************/ | |
| 24 | ||
| 4 | 25 | #include "driver.h" |
| 5 | 26 | #include "deprecat.h" |
| 6 | 27 | #include "cpu/z180/z180.h" |
| 28 | #include "machine/8255ppi.h" | |
| 7 | 29 | #include "sound/2413intf.h" |
| 8 | 30 | #include "sound/okim6295.h" |
| 9 | 31 | |
| 10 | static UINT8 *fg_videoram; | |
| 11 | static tilemap *fg_tilemap; | |
| 32 | /*************************************************************************** | |
| 33 | Video Hardware | |
| 34 | ***************************************************************************/ | |
| 12 | 35 | |
| 36 | static UINT8 *fg_videoram, *bg_videoram; | |
| 37 | static tilemap *fg_tilemap, *bg_tilemap; | |
| 38 | ||
| 39 | #define COLOR(_X) (((_X)>>2)) | |
| 40 | ||
| 13 | 41 | static TILE_GET_INFO( get_fg_tile_info ) |
| 14 | 42 | { |
| 15 | int code = fg_videoram[tile_index*4+0] + ((fg_videoram[tile_index*4+1] & 0xf) << 8); | |
| 16 | SET_TILE_INFO(1, code, 0, 0); | |
| 43 | int code = fg_videoram[tile_index*4+0] + (fg_videoram[tile_index*4+1] << 8); | |
| 44 | int attr = fg_videoram[tile_index*4+2] + (fg_videoram[tile_index*4+3] << 8); | |
| 45 | SET_TILE_INFO(0, code, COLOR(attr), 0); | |
| 17 | 46 | } |
| 47 | static TILE_GET_INFO( get_bg_tile_info ) | |
| 48 | { | |
| 49 | int code = bg_videoram[tile_index*4+0] + (bg_videoram[tile_index*4+1] << 8); | |
| 50 | int attr = bg_videoram[tile_index*4+2] + (bg_videoram[tile_index*4+3] << 8); | |
| 51 | SET_TILE_INFO(0, code, COLOR(attr)+8, 0); | |
| 52 | } | |
| 18 | 53 | |
| 54 | static WRITE8_HANDLER( fg_w ) | |
| 55 | { | |
| 56 | fg_videoram[offset] = data; | |
| 57 | tilemap_mark_tile_dirty(fg_tilemap,offset/4); | |
| 58 | } | |
| 59 | static WRITE8_HANDLER( bg_w ) | |
| 60 | { | |
| 61 | bg_videoram[offset] = data; | |
| 62 | tilemap_mark_tile_dirty(bg_tilemap,offset/4); | |
| 63 | } | |
| 64 | ||
| 19 | 65 | static VIDEO_START(igs_180) |
| 20 | 66 | { |
| 21 | 67 | fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,8,8,64,32); |
| 68 | bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,8,8,64,32); | |
| 69 | ||
| 70 | tilemap_set_transparent_pen(fg_tilemap,0xf); | |
| 71 | tilemap_set_transparent_pen(bg_tilemap,0xf); | |
| 22 | 72 | } |
| 23 | 73 | |
| 74 | ||
| 75 | static UINT8 *sprites_gfx; | |
| 76 | int sprites_gfx_size; | |
| 77 | ||
| 78 | // Eeach 16 bit word in the sprites gfx roms contains three 5 bit pens: x-22222-11111-00000. | |
| 79 | // This routine expands each word into three bytes. | |
| 80 | static void expand_sprites(void) | |
| 81 | { | |
| 82 | UINT8 *rom = memory_region(REGION_GFX1); | |
| 83 | int size = memory_region_length(REGION_GFX1); | |
| 84 | int i; | |
| 85 | ||
| 86 | sprites_gfx_size = size / 2 * 3; | |
| 87 | sprites_gfx = auto_malloc(sprites_gfx_size); | |
| 88 | ||
| 89 | for (i = 0; i < size / 2 ; i++) | |
| 90 | { | |
| 91 | UINT16 pens = (rom[i*2+1] << 8) | rom[i*2]; | |
| 92 | ||
| 93 | sprites_gfx[i * 3 + 0] = (pens >> 0) & 0x1f; | |
| 94 | sprites_gfx[i * 3 + 1] = (pens >> 5) & 0x1f; | |
| 95 | sprites_gfx[i * 3 + 2] = (pens >> 10) & 0x1f; | |
| 96 | } | |
| 97 | } | |
| 98 | ||
| 99 | /*************************************************************************** | |
| 100 | Sprites Format | |
| 101 | ||
| 102 | Offset: Bits: Value: | |
| 103 | ||
| 104 | 0.b Y (low) | |
| 105 | ||
| 106 | 1.b 7654 32-- Size Y (low) | |
| 107 | ---- --10 Y (high) | |
| 108 | ||
| 109 | 2.b 7654 3--- X (low) | |
| 110 | ---- -210 Size Y (high) | |
| 111 | ||
| 112 | 3.b 76-- ---- Size X (low) | |
| 113 | --5- ---- | |
| 114 | ---4 3210 X (high) | |
| 115 | ||
| 116 | 4.b 76-- ---- Code (low) | |
| 117 | --54 3210 Size X (high) | |
| 118 | ||
| 119 | 5.b Code (mid low) | |
| 120 | ||
| 121 | 6.b Code (mid high) | |
| 122 | ||
| 123 | 7.b 765- ---- Color | |
| 124 | ---4 ---- Flip X | |
| 125 | ---- 3210 Code (high) | |
| 126 | ||
| 127 | Code = ROM Address / 2 = Pixel / 3 | |
| 128 | ||
| 129 | ***************************************************************************/ | |
| 130 | ||
| 131 | static void draw_sprite(bitmap_t *bitmap,const rectangle *cliprect, int sx, int sy, int dimx, int dimy, int flipx, int flipy, int color, int addr) | |
| 132 | { | |
| 133 | // prepare GfxElement on the fly | |
| 134 | gfx_element gfx; | |
| 135 | ||
| 136 | gfx.width = dimx; | |
| 137 | gfx.height = dimy; | |
| 138 | gfx.total_elements = 1; | |
| 139 | gfx.color_depth = 32; | |
| 140 | gfx.color_granularity = 32; | |
| 141 | gfx.color_base = 0x100; | |
| 142 | gfx.total_colors = 8; | |
| 143 | gfx.pen_usage = NULL; | |
| 144 | gfx.gfxdata = sprites_gfx + addr; | |
| 145 | gfx.line_modulo = dimx; | |
| 146 | gfx.char_modulo = 0; // doesn't matter | |
| 147 | gfx.flags = 0; | |
| 148 | ||
| 149 | // Bounds checking | |
| 150 | if ( addr + dimx * dimy >= sprites_gfx_size ) | |
| 151 | return; | |
| 152 | ||
| 153 | drawgfx( bitmap,&gfx, | |
| 154 | 0, color, | |
| 155 | flipx, flipy, | |
| 156 | sx, sy, | |
| 157 | cliprect, TRANSPARENCY_PEN, 0x1f ); | |
| 158 | } | |
| 159 | ||
| 160 | static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect) | |
| 161 | { | |
| 162 | UINT8 *s = spriteram; | |
| 163 | UINT8 *end = spriteram + 0x800; | |
| 164 | ||
| 165 | for ( ; s < end; s += 8 ) | |
| 166 | { | |
| 167 | int x,y, sx,sy, dimx,dimy, flipx,flipy, addr,color; | |
| 168 | ||
| 169 | y = s[0] + (s[1] << 8); | |
| 170 | x = s[2] + (s[3] << 8); | |
| 171 | addr = (s[4] >> 6) | (s[5] << 2) | (s[6] << 10) | ((s[7] & 0x03) << 18); | |
| 172 | addr *= 3; | |
| 173 | ||
| 174 | flipx = s[7] & 0x10; | |
| 175 | flipy = 0; | |
| 176 | ||
| 177 | dimx = ((((s[4] & 0x3f)<<2) | ((s[3] & 0xc0)>>6))+1) * 3; | |
| 178 | dimy = ((y >> 10) | ((x & 0x03)<<6))+1; | |
| 179 | ||
| 180 | x >>= 3; | |
| 181 | sx = (x & 0x1ff) - (x & 0x200); | |
| 182 | sy = (y & 0x1ff) - (y & 0x200); | |
| 183 | ||
| 184 | color = (s[7] & 0xe0) >> 5; | |
| 185 | ||
| 186 | draw_sprite(bitmap, cliprect, sx, sy, dimx, dimy, flipx, flipy, color, addr); | |
| 187 | } | |
| 188 | } | |
| 189 | ||
| 190 | // A simple gfx viewer (toggle with T) | |
| 191 | static int debug_viewer(bitmap_t *bitmap,const rectangle *cliprect) | |
| 192 | { | |
| 193 | #ifdef MAME_DEBUG | |
| 194 | static int toggle = 0; | |
| 195 | if (input_code_pressed_once(KEYCODE_T)) toggle = 1-toggle; | |
| 196 | if (toggle) { | |
| 197 | static int a = 0, w = 512; | |
| 198 | int h = 256; | |
| 199 | ||
| 200 | if (input_code_pressed(KEYCODE_O)) w += 1; | |
| 201 | if (input_code_pressed(KEYCODE_I)) w -= 1; | |
| 202 | ||
| 203 | if (input_code_pressed(KEYCODE_U)) w += 8; | |
| 204 | if (input_code_pressed(KEYCODE_Y)) w -= 8; | |
| 205 | ||
| 206 | if (input_code_pressed(KEYCODE_RIGHT)) a += 1; | |
| 207 | if (input_code_pressed(KEYCODE_LEFT)) a -= 1; | |
| 208 | ||
| 209 | if (input_code_pressed(KEYCODE_DOWN)) a += w; | |
| 210 | if (input_code_pressed(KEYCODE_UP)) a -= w; | |
| 211 | ||
| 212 | if (input_code_pressed(KEYCODE_PGDN)) a += w * h; | |
| 213 | if (input_code_pressed(KEYCODE_PGUP)) a -= w * h; | |
| 214 | ||
| 215 | if (a < 0) a = 0; | |
| 216 | if (a > sprites_gfx_size) a = sprites_gfx_size; | |
| 217 | ||
| 218 | if (w <= 0) w = 0; | |
| 219 | if (w > 1024) w = 1024; | |
| 220 | ||
| 221 | fillbitmap(bitmap,0,cliprect); | |
| 222 | ||
| 223 | draw_sprite(bitmap, cliprect, 0,0, w,h, 0,0, 0, a); | |
| 224 | ||
| 225 | popmessage("a: %08X w: %03X p: %02X-%02x-%02x",a,w,sprites_gfx[a/3*3+0],sprites_gfx[a/3*3+1],sprites_gfx[a/3*3+2]); | |
| 226 | osd_sleep(200000); | |
| 227 | return 1; | |
| 228 | } | |
| 229 | #endif | |
| 230 | return 0; | |
| 231 | } | |
| 232 | ||
| 24 | 233 | static VIDEO_UPDATE(igs_180) |
| 25 | 234 | { |
| 26 | tilemap_mark_all_tiles_dirty(fg_tilemap); | |
| 27 | tilemap_draw(bitmap,cliprect,fg_tilemap,0,0); | |
| 235 | int layers_ctrl = -1; | |
| 28 | 236 | |
| 237 | #ifdef MAME_DEBUG | |
| 238 | if (input_code_pressed(KEYCODE_Z)) | |
| 239 | { | |
| 240 | int mask = 0; | |
| 241 | if (input_code_pressed(KEYCODE_Q)) mask |= 1; | |
| 242 | if (input_code_pressed(KEYCODE_W)) mask |= 2; | |
| 243 | if (input_code_pressed(KEYCODE_A)) mask |= 4; | |
| 244 | if (mask != 0) layers_ctrl &= mask; | |
| 245 | } | |
| 246 | #endif | |
| 247 | ||
| 248 | if (debug_viewer(bitmap,cliprect)) | |
| 249 | return 0; | |
| 250 | ||
| 251 | if (layers_ctrl & 1) tilemap_draw(bitmap,cliprect,bg_tilemap,TILEMAP_DRAW_OPAQUE,0); | |
| 252 | else fillbitmap(bitmap,get_black_pen(screen->machine),cliprect); | |
| 253 | ||
| 254 | if (layers_ctrl & 4) draw_sprites(screen->machine,bitmap,cliprect); | |
| 255 | ||
| 256 | if (layers_ctrl & 2) tilemap_draw(bitmap,cliprect,fg_tilemap,0,0); | |
| 257 | ||
| 29 | 258 | return 0; |
| 30 | 259 | } |
| 31 | 260 | |
| 32 | static INPUT_PORTS_START( igs_180 ) | |
| 33 | INPUT_PORTS_END | |
| 261 | /*************************************************************************** | |
| 262 | Decryption | |
| 263 | ***************************************************************************/ | |
| 34 | 264 | |
| 265 | static void decrypt_program_rom(int mask, int a7, int a6, int a5, int a4, int a3, int a2, int a1, int a0) | |
| 266 | { | |
| 267 | int length = memory_region_length(REGION_CPU1); | |
| 268 | UINT8 *rom = memory_region(REGION_CPU1); | |
| 269 | UINT8 *tmp = auto_malloc(length); | |
| 270 | int i; | |
| 271 | ||
| 272 | // decrypt the program ROM | |
| 273 | ||
| 274 | // XOR layer | |
| 275 | for (i = 0;i < length;i++) | |
| 276 | { | |
| 277 | if(i & 0x2000) | |
| 278 | { | |
| 279 | if((i & mask) == mask) | |
| 280 | rom[i] ^= 0x01; | |
| 281 | } | |
| 282 | else | |
| 283 | { | |
| 284 | if(i & 0x0100) | |
| 285 | { | |
| 286 | if((i & mask) == mask) | |
| 287 | rom[i] ^= 0x01; | |
| 288 | } | |
| 289 | else | |
| 290 | { | |
| 291 | if(i & 0x0080) | |
| 292 | { | |
| 293 | if((i & mask) == mask) | |
| 294 | rom[i] ^= 0x01; | |
| 295 | } | |
| 296 | else | |
| 297 | { | |
| 298 | if((i & mask) != mask) | |
| 299 | rom[i] ^= 0x01; | |
| 300 | } | |
| 301 | } | |
| 302 | } | |
| 303 | } | |
| 304 | ||
| 305 | memcpy(tmp,rom,length); | |
| 306 | ||
| 307 | // address lines swap | |
| 308 | for (i = 0;i < length;i++) | |
| 309 | { | |
| 310 | int addr = (i & ~0xff) | BITSWAP8(i,a7,a6,a5,a4,a3,a2,a1,a0); | |
| 311 | rom[i] = tmp[addr]; | |
| 312 | } | |
| 313 | } | |
| 314 | ||
| 315 | ||
| 316 | // iqblocka | |
| 317 | ||
| 318 | static void iqblocka_patch_rom(void) | |
| 319 | { | |
| 320 | UINT8 *rom = memory_region(REGION_CPU1); | |
| 321 | ||
| 322 | // rom[0x7b64] = 0xc9; | |
| 323 | ||
| 324 | rom[0x010c7] = 0x18; | |
| 325 | ||
| 326 | // CBEF bank 0a | |
| 327 | rom[0x16bef] = 0x18; | |
| 328 | ||
| 329 | // C1BD bank 24 | |
| 330 | rom[0x301bd] = 0x18; | |
| 331 | ||
| 332 | // C21B bank 2e | |
| 333 | rom[0x3a21b] = 0x18; | |
| 334 | ||
| 335 | // DCA9 bank 2e | |
| 336 | rom[0x3bca9] = 0x18; | |
| 337 | ||
| 338 | // maybe | |
| 339 | // rom[0x18893] = 0x18; | |
| 340 | // rom[0x385b1] = 0x18; | |
| 341 | } | |
| 342 | ||
| 343 | static DRIVER_INIT( iqblocka ) | |
| 344 | { | |
| 345 | decrypt_program_rom(0x11, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 346 | iqblocka_patch_rom(); | |
| 347 | ||
| 348 | expand_sprites(); | |
| 349 | } | |
| 350 | ||
| 351 | // iqblockf | |
| 352 | ||
| 353 | static DRIVER_INIT( iqblockf ) | |
| 354 | { | |
| 355 | decrypt_program_rom(0x11, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 356 | // iqblockf_patch_rom(); | |
| 357 | ||
| 358 | expand_sprites(); | |
| 359 | } | |
| 360 | ||
| 361 | // tjsb | |
| 362 | ||
| 363 | static void tjsb_decrypt_sprites(void) | |
| 364 | { | |
| 365 | int length = memory_region_length(REGION_GFX1); | |
| 366 | UINT8 *rom = memory_region(REGION_GFX1); | |
| 367 | UINT8 *tmp = auto_malloc(length); | |
| 368 | int i; | |
| 369 | ||
| 370 | // address lines swap (to do: collapse into one bitswap) | |
| 371 | memcpy(tmp,rom,length); | |
| 372 | for (i = 0;i < length;i++) | |
| 373 | { | |
| 374 | int addr = (i & ~0xff) | BITSWAP8(i,7,6,5,4,1,2,3,0); | |
| 375 | rom[i] = tmp[addr]; | |
| 376 | } | |
| 377 | ||
| 378 | memcpy(tmp,rom,length); | |
| 379 | for (i = 0;i < length;i++) | |
| 380 | { | |
| 381 | int addr = (i & ~0xff) | BITSWAP8(i,7,6,5,2,4,3,1,0); | |
| 382 | rom[i] = tmp[addr]; | |
| 383 | } | |
| 384 | ||
| 385 | memcpy(tmp,rom,length); | |
| 386 | for (i = 0;i < length;i++) | |
| 387 | { | |
| 388 | int addr = (i & ~0xff) | BITSWAP8(i,7,6,5,3,4,2,1,0); | |
| 389 | rom[i] = BITSWAP8(tmp[addr],7,6,5,4,3,2,1,0); | |
| 390 | } | |
| 391 | } | |
| 392 | ||
| 393 | static void tjsb_patch_rom(void) | |
| 394 | { | |
| 395 | UINT8 *rom = memory_region(REGION_CPU1); | |
| 396 | rom[0x011df] = 0x18; | |
| 397 | } | |
| 398 | ||
| 399 | static DRIVER_INIT( tjsb ) | |
| 400 | { | |
| 401 | decrypt_program_rom(0x05, 7, 6, 3, 2, 5, 4, 1, 0); | |
| 402 | tjsb_patch_rom(); | |
| 403 | ||
| 404 | tjsb_decrypt_sprites(); | |
| 405 | expand_sprites(); | |
| 406 | } | |
| 407 | ||
| 408 | /*************************************************************************** | |
| 409 | Memory Maps | |
| 410 | ***************************************************************************/ | |
| 411 | ||
| 35 | 412 | static ADDRESS_MAP_START( igs_180_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 36 | AM_RANGE(0x00000, 0x0dfff) AM_ROM | |
| 37 | AM_RANGE(0x0e000, 0x0efff) AM_RAM | |
| 38 | AM_RANGE(0x0f000, 0x0ffff) AM_RAM | |
| 39 | AM_RANGE(0x10000, 0x3ffff) AM_ROM | |
| 413 | AM_RANGE( 0x00000, 0x0dfff ) AM_ROM | |
| 414 | AM_RANGE( 0x0e000, 0x0efff ) AM_RAM | |
| 415 | AM_RANGE( 0x0f000, 0x0ffff ) AM_RAM | |
| 416 | AM_RANGE( 0x10000, 0x3ffff ) AM_ROM | |
| 40 | 417 | ADDRESS_MAP_END |
| 41 | 418 | |
| 42 | /* | |
| 43 | #define W(n) \ | |
| 44 | static WRITE8_HANDLER( w##n )\ | |
| 45 | {\ | |
| 46 | static int old = -1;\ | |
| 47 | if(data != old)\ | |
| 48 | printf("w"#n" = %02X\n",old=data);\ | |
| 49 | }\ | |
| 419 | static int nmi_enable; | |
| 420 | static WRITE8_HANDLER( nmi_enable_w ) | |
| 421 | { | |
| 422 | nmi_enable = data & 1; | |
| 423 | if (data & (~1)) | |
| 424 | logerror("PC %06X: nmi_enable = %02x\n",activecpu_get_pc(),data); | |
| 425 | } | |
| 50 | 426 | |
| 51 | W(1) | |
| 52 | W(2) | |
| 53 | W(3) | |
| 54 | W(4) | |
| 55 | W(5) | |
| 56 | W(6) | |
| 57 | W(7) | |
| 58 | W(8) | |
| 59 | */ | |
| 60 | ||
| 61 | static WRITE8_HANDLER( nmi_ack_w ) | |
| 427 | static int irq_enable; | |
| 428 | static WRITE8_HANDLER( irq_enable_w ) | |
| 62 | 429 | { |
| 63 | // cpunum_set_input_line(Machine, 0, INPUT_LINE_NMI, CLEAR_LINE); | |
| 430 | irq_enable = data & 1; | |
| 431 | if (data & (~1)) | |
| 432 | logerror("PC %06X: irq_enable = %02x\n",activecpu_get_pc(),data); | |
| 64 | 433 | } |
| 65 | 434 | |
| 66 | static WRITE8_HANDLER( irq0_ack_w ) | |
| 435 | static UINT8 input_select; | |
| 436 | static WRITE8_HANDLER( input_select_w ) | |
| 67 | 437 | { |
| 68 | ||
| 438 | | |
| 69 | 439 | } |
| 70 | 440 | |
| 71 | static READ8_HANDLER( | |
| 441 | static READ8_HANDLER( input_r ) | |
| 72 | 442 | { |
| 73 | return 0xff; | |
| 443 | switch (input_select) | |
| 444 | { | |
| 445 | case 0x00: return input_port_read(machine, "PLAYER1"); | |
| 446 | case 0x01: return input_port_read(machine, "PLAYER2"); | |
| 447 | case 0x02: return input_port_read(machine, "COINS"); | |
| 448 | ||
| 449 | case 0x03: return 01; | |
| 450 | ||
| 451 | case 0x20: return 0x49; | |
| 452 | case 0x21: return 0x47; | |
| 453 | case 0x22: return 0x53; | |
| 454 | ||
| 455 | case 0x24: return 0x41; | |
| 456 | case 0x25: return 0x41; | |
| 457 | case 0x26: return 0x7f; | |
| 458 | case 0x27: return 0x41; | |
| 459 | case 0x28: return 0x41; | |
| 460 | ||
| 461 | case 0x2a: return 0x3e; | |
| 462 | case 0x2b: return 0x41; | |
| 463 | case 0x2c: return 0x49; | |
| 464 | case 0x2d: return 0xf9; | |
| 465 | case 0x2e: return 0x0a; | |
| 466 | ||
| 467 | case 0x30: return 0x26; | |
| 468 | case 0x31: return 0x49; | |
| 469 | case 0x32: return 0x49; | |
| 470 | case 0x33: return 0x49; | |
| 471 | case 0x34: return 0x32; | |
| 472 | ||
| 473 | default: | |
| 474 | logerror("PC %06X: input %02x read\n",activecpu_get_pc(),input_select); | |
| 475 | return 0xff; | |
| 476 | } | |
| 74 | 477 | } |
| 75 | 478 | |
| 76 | 479 | static ADDRESS_MAP_START( igs_180_portmap, ADDRESS_SPACE_IO, 8 ) |
| 77 | AM_RANGE(0x0000, 0x003f) AM_RAM // internal regs | |
| 480 | AM_RANGE( 0x0000, 0x003f ) AM_RAM // internal regs | |
| 78 | 481 | |
| 79 | AM_RANGE(0x1000, 0x17ff) AM_RAM | |
| 80 | AM_RANGE(0x1800, 0x19ff) AM_RAM | |
| 81 | AM_RANGE(0x1a00, 0x1bff) AM_RAM | |
| 82 | AM_RANGE(0x1c00, 0x1fff) AM_RAM | |
| 83 | AM_RANGE(0x200a, 0x200a) AM_WRITENOP | |
| 84 | AM_RANGE(0x2010, 0x2010) AM_READ(ff_r) AM_WRITENOP | |
| 85 | AM_RANGE(0x2011, 0x2011) AM_READ(ff_r) AM_WRITENOP | |
| 86 | AM_RANGE(0x2012, 0x2012) AM_READ(ff_r) AM_WRITENOP | |
| 87 | AM_RANGE(0x2014, 0x2014) AM_WRITE(nmi_ack_w) | |
| 88 | AM_RANGE(0x2015, 0x2015) AM_WRITE(irq0_ack_w) | |
| 482 | AM_RANGE( 0x1000, 0x17ff ) AM_RAM AM_BASE( &spriteram ) | |
| 483 | AM_RANGE( 0x1800, 0x1bff ) AM_READWRITE( SMH_RAM, paletteram_xRRRRRGGGGGBBBBB_le_w ) AM_BASE(&paletteram) | |
| 484 | AM_RANGE( 0x1c00, 0x1fff ) AM_RAM | |
| 89 | 485 | |
| 90 | AM_RANGE(0x4000, 0x4fff) AM_RAM AM_BASE(&fg_videoram) | |
| 91 | AM_RANGE(0x5000, 0x5fff) AM_RAM | |
| 92 | AM_RANGE(0x6000, 0x7fff) AM_RAM | |
| 486 | // AM_RANGE(0x200a, 0x200a) AM_WRITENOP | |
| 93 | 487 | |
| 94 | AM_RANGE(0x8000, 0x8000) AM_WRITE(YM2413_register_port_0_w) | |
| 95 | AM_RANGE(0x8001, 0x8001) AM_READ(ff_r) AM_WRITE(YM2413_data_port_0_w) | |
| 96 | AM_RANGE(0xa000, 0xa000) AM_READ(ff_r) | |
| 97 | AM_RANGE(0xb000, 0xb000) AM_WRITENOP | |
| 98 | AM_RANGE(0xb001, 0xb001) AM_WRITENOP | |
| 488 | AM_RANGE( 0x2010, 0x2013 ) AM_DEVREADWRITE(PPI8255, "ppi8255", ppi8255_r, ppi8255_w) | |
| 489 | ||
| 490 | AM_RANGE( 0x2014, 0x2014 ) AM_WRITE( nmi_enable_w ) | |
| 491 | AM_RANGE( 0x2015, 0x2015 ) AM_WRITE( irq_enable_w ) | |
| 492 | ||
| 493 | AM_RANGE( 0x4000, 0x5fff ) AM_READWRITE( SMH_RAM, fg_w ) AM_BASE( &fg_videoram ) | |
| 494 | AM_RANGE( 0x6000, 0x7fff ) AM_READWRITE( SMH_RAM, bg_w ) AM_BASE( &bg_videoram ) | |
| 495 | ||
| 496 | AM_RANGE( 0x8000, 0x8000 ) AM_WRITE( input_select_w ) | |
| 497 | AM_RANGE( 0x8001, 0x8001 ) AM_READ ( input_r ) | |
| 498 | ||
| 499 | AM_RANGE( 0x9000, 0x9000 ) AM_READWRITE( OKIM6295_status_0_r, OKIM6295_data_0_w ) | |
| 500 | ||
| 501 | AM_RANGE( 0xa000, 0xa000 ) AM_READ_PORT( "BUTTONS" ) | |
| 502 | ||
| 503 | AM_RANGE( 0xb000, 0xb000 ) AM_WRITE( YM2413_register_port_0_w ) | |
| 504 | AM_RANGE( 0xb001, 0xb001 ) AM_WRITE( YM2413_data_port_0_w ) | |
| 99 | 505 | ADDRESS_MAP_END |
| 100 | 506 | |
| 101 | static const gfx_layout tilelayout = | |
| 507 | ||
| 508 | /*************************************************************************** | |
| 509 | Input Ports | |
| 510 | ***************************************************************************/ | |
| 511 | ||
| 512 | static INPUT_PORTS_START( iqblocka ) | |
| 513 | ||
| 514 | PORT_START_TAG("DSW0") // IN0 | |
| 515 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) | |
| 516 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) | |
| 517 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 518 | PORT_DIPNAME( 0x02, 0x02, "Hold Mode" ) | |
| 519 | PORT_DIPSETTING( 0x02, "In Win" ) | |
| 520 | PORT_DIPSETTING( 0x00, "Always" ) | |
| 521 | PORT_DIPNAME( 0x04, 0x04, "Max Credit" ) | |
| 522 | PORT_DIPSETTING( 0x04, "4000" ) | |
| 523 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) | |
| 524 | PORT_DIPNAME( 0x38, 0x38, "Cigarette Bet" ) | |
| 525 | PORT_DIPSETTING( 0x38, "1" ) | |
| 526 | PORT_DIPSETTING( 0x30, "10" ) | |
| 527 | PORT_DIPSETTING( 0x28, "20" ) | |
| 528 | PORT_DIPSETTING( 0x20, "50" ) | |
| 529 | PORT_DIPSETTING( 0x18, "80" ) | |
| 530 | PORT_DIPSETTING( 0x10, "100" ) | |
| 531 | PORT_DIPSETTING( 0x08, "120" ) | |
| 532 | PORT_DIPSETTING( 0x00, "150" ) | |
| 533 | PORT_DIPNAME( 0xc0, 0xc0, "Min Bet" ) | |
| 534 | PORT_DIPSETTING( 0xc0, "1" ) | |
| 535 | PORT_DIPSETTING( 0x80, "10" ) | |
| 536 | PORT_DIPSETTING( 0x40, "20" ) | |
| 537 | PORT_DIPSETTING( 0x00, "50" ) | |
| 538 | ||
| 539 | PORT_START_TAG("DSW1") // IN1 | |
| 540 | PORT_DIPNAME( 0x07, 0x07, "Key In" ) | |
| 541 | PORT_DIPSETTING( 0x07, "10" ) | |
| 542 | PORT_DIPSETTING( 0x06, "20" ) | |
| 543 | PORT_DIPSETTING( 0x05, "40" ) | |
| 544 | PORT_DIPSETTING( 0x04, "50" ) | |
| 545 | PORT_DIPSETTING( 0x03, "100" ) | |
| 546 | PORT_DIPSETTING( 0x02, "200" ) | |
| 547 | PORT_DIPSETTING( 0x01, "250" ) | |
| 548 | PORT_DIPSETTING( 0x00, "500" ) | |
| 549 | PORT_DIPNAME( 0x08, 0x08, "Key Out" ) | |
| 550 | PORT_DIPSETTING( 0x08, "10" ) | |
| 551 | PORT_DIPSETTING( 0x00, "100" ) | |
| 552 | PORT_DIPNAME( 0x10, 0x10, "Open Mode" ) | |
| 553 | PORT_DIPSETTING( 0x10, "Gaming" ) | |
| 554 | PORT_DIPSETTING( 0x00, "Amuse" ) | |
| 555 | PORT_DIPNAME( 0x20, 0x20, "Demo Game" ) | |
| 556 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) | |
| 557 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) | |
| 558 | PORT_DIPNAME( 0xc0, 0xc0, "Bonus Base" ) | |
| 559 | PORT_DIPSETTING( 0xc0, "100" ) | |
| 560 | PORT_DIPSETTING( 0x80, "200" ) | |
| 561 | PORT_DIPSETTING( 0x40, "300" ) | |
| 562 | PORT_DIPSETTING( 0x00, "400" ) | |
| 563 | ||
| 564 | PORT_START_TAG("DSW2") // IN2 | |
| 565 | PORT_DIPNAME( 0x03, 0x03, "Win Up Pool" ) | |
| 566 | PORT_DIPSETTING( 0x03, "300" ) | |
| 567 | PORT_DIPSETTING( 0x02, "500" ) | |
| 568 | PORT_DIPSETTING( 0x01, "800" ) | |
| 569 | PORT_DIPSETTING( 0x00, "1000" ) | |
| 570 | PORT_DIPNAME( 0x0c, 0x0c, "Max Double Up" ) | |
| 571 | PORT_DIPSETTING( 0x0c, "20000" ) | |
| 572 | PORT_DIPSETTING( 0x08, "30000" ) | |
| 573 | PORT_DIPSETTING( 0x04, "40000" ) | |
| 574 | PORT_DIPSETTING( 0x00, "50000" ) | |
| 575 | PORT_DIPNAME( 0x10, 0x10, "Cards" ) | |
| 576 | PORT_DIPSETTING( 0x10, "A,J,Q,K" ) | |
| 577 | PORT_DIPSETTING( 0x00, "Number" ) | |
| 578 | PORT_DIPNAME( 0x20, 0x20, "Title Name" ) | |
| 579 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 580 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) | |
| 581 | PORT_DIPNAME( 0x40, 0x40, "Double" ) | |
| 582 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) | |
| 583 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) | |
| 584 | PORT_DIPNAME( 0x80, 0x80, "CG Select" ) | |
| 585 | PORT_DIPSETTING( 0x80, DEF_STR( Low ) ) | |
| 586 | PORT_DIPSETTING( 0x00, DEF_STR( High ) ) | |
| 587 | ||
| 588 | PORT_START_TAG("PLAYER1") | |
| 589 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME( "Start / Test" ) // keep pressed while booting | |
| 590 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) | |
| 591 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) | |
| 592 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) | |
| 593 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) | |
| 594 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "Help / Big" ) | |
| 595 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) | |
| 596 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 597 | ||
| 598 | PORT_START_TAG("PLAYER2") | |
| 599 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START2 ) PORT_NAME( "Bet" ) | |
| 600 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) | |
| 601 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) | |
| 602 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) | |
| 603 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) | |
| 604 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) | |
| 605 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) | |
| 606 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 607 | ||
| 608 | PORT_START_TAG("COINS") | |
| 609 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) | |
| 610 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) | |
| 611 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 612 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 613 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 614 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 615 | PORT_SERVICE_NO_TOGGLE( 0x40, IP_ACTIVE_LOW ) // keep pressed while booting | |
| 616 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SERVICE1 ) // this seems to toggle between videogame and gambling | |
| 617 | ||
| 618 | PORT_START_TAG("BUTTONS") | |
| 619 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME( "Small" ) | |
| 620 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_IMPULSE(2) // coin error | |
| 621 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) | |
| 622 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_NAME( "Score -> Time" ) // converts score into time | |
| 623 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) | |
| 624 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2) | |
| 625 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 626 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 627 | ||
| 628 | INPUT_PORTS_END | |
| 629 | ||
| 630 | ||
| 631 | /*************************************************************************** | |
| 632 | Graphics Layout | |
| 633 | ***************************************************************************/ | |
| 634 | ||
| 635 | static const gfx_layout layout_8x8x4 = | |
| 102 | 636 | { |
| 103 | 637 | 8,8, |
| 104 | RGN_FRAC(1,4), //? | |
| 105 | 6, //? | |
| 106 | { 8, RGN_FRAC(0,4), RGN_FRAC(1,4)+8, RGN_FRAC(1,4), RGN_FRAC(2,4)+8, RGN_FRAC(2,4) }, //? | |
| 107 | { 0, 1, 2, 3, 4, 5, 6, 7 }, | |
| 108 | { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 }, | |
| 109 | 32*8 | |
| 638 | RGN_FRAC(1,1), | |
| 639 | 4, | |
| 640 | { 8*3,8*2,8*1,8*0 }, | |
| 641 | { STEP8(0, 1) }, | |
| 642 | { STEP8(0, 8*4) }, | |
| 643 | 8*8*4 | |
| 110 | 644 | }; |
| 111 | 645 | |
| 112 | 646 | static GFXDECODE_START( igs_180 ) |
| 113 | GFXDECODE_ENTRY( REGION_GFX1, 0, tilelayout, 0, 1 ) | |
| 114 | GFXDECODE_ENTRY( REGION_GFX2, 0, tilelayout, 0, 1 ) | |
| 647 | GFXDECODE_ENTRY( REGION_GFX2, 0, layout_8x8x4, 0, 16 ) | |
| 115 | 648 | GFXDECODE_END |
| 116 | 649 | |
| 117 | 650 | |
| 651 | /*************************************************************************** | |
| 652 | Machine Drivers | |
| 653 | ***************************************************************************/ | |
| 654 | ||
| 118 | 655 | static INTERRUPT_GEN( igs_180_interrupt ) |
| 119 | 656 | { |
| 120 | 657 | if (cpu_getiloops() & 1) |
| 121 | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, PULSE_LINE);//ASSERT_LINE); /* ???? */ | |
| 658 | { | |
| 659 | if (nmi_enable) | |
| 660 | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, PULSE_LINE); | |
| 661 | } | |
| 122 | 662 | else |
| 123 | cpunum_set_input_line(machine, 0, 0, HOLD_LINE);//ASSERT_LINE); /* ???? */ | |
| 663 | { | |
| 664 | if (irq_enable) | |
| 665 | cpunum_set_input_line(machine, 0, 0, HOLD_LINE); | |
| 666 | } | |
| 124 | 667 | } |
| 125 | 668 | |
| 669 | // Dips are read through the 8255 | |
| 670 | static const ppi8255_interface ppi8255_intf = | |
| 671 | { | |
| 672 | input_port_0_r, // Port A read | |
| 673 | input_port_1_r, // Port B read | |
| 674 | input_port_2_r, // Port C read | |
| 675 | 0, // Port A write | |
| 676 | 0, // Port B write | |
| 677 | 0, // Port C write | |
| 678 | }; | |
| 679 | ||
| 680 | static MACHINE_RESET( igs_180 ) | |
| 681 | { | |
| 682 | nmi_enable = 0; | |
| 683 | irq_enable = 0; | |
| 684 | } | |
| 685 | ||
| 126 | 686 | static MACHINE_DRIVER_START( igs_180 ) |
| 127 | 687 | |
| 128 | 688 | /* basic machine hardware */ |
| 129 | MDRV_CPU_ADD(Z180, | |
| 689 | MDRV_CPU_ADD(Z180, | |
| 130 | 690 | MDRV_CPU_PROGRAM_MAP(igs_180_map,0) |
| 131 | 691 | MDRV_CPU_IO_MAP(igs_180_portmap,0) |
| 132 | 692 | MDRV_CPU_VBLANK_INT_HACK(igs_180_interrupt,2) |
| 133 | //MDRV_CPU_VBLANK_INT("main", irq0_line_hold) | |
| 134 | 693 | |
| 694 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 695 | MDRV_DEVICE_CONFIG( ppi8255_intf ) | |
| 696 | ||
| 697 | MDRV_MACHINE_RESET(igs_180) | |
| 698 | ||
| 135 | 699 | /* video hardware */ |
| 136 | 700 | MDRV_SCREEN_ADD("main", RASTER) |
| 137 | 701 | MDRV_SCREEN_REFRESH_RATE(60) |
| 138 | 702 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 139 | 703 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 140 | MDRV_SCREEN_SIZE(64*8, 32*8) | |
| 141 | MDRV_SCREEN_VISIBLE_AREA(0*8, 64*8-1, 0*8, 32*8-1) | |
| 704 | MDRV_SCREEN_SIZE(512, 256) | |
| 705 | MDRV_SCREEN_VISIBLE_AREA(0, 512-1, 0, 240-1) | |
| 142 | 706 | |
| 143 | 707 | MDRV_GFXDECODE(igs_180) |
| 144 | MDRV_PALETTE_LENGTH(102 | |
| 708 | MDRV_PALETTE_LENGTH(0x100*2 | |
| 145 | 709 | |
| 146 | 710 | MDRV_VIDEO_START(igs_180) |
| 147 | 711 | MDRV_VIDEO_UPDATE(igs_180) |
| 148 | 712 | |
| 149 | 713 | /* sound hardware */ |
| 150 | 714 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 151 | MDRV_SOUND_ADD(YM2413, 3579545) | |
| 715 | MDRV_SOUND_ADD(YM2413, XTAL_3_579545MHz) | |
| 152 | 716 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5) |
| 153 | 717 | |
| 154 | MDRV_SOUND_ADD(OKIM6295, 16 | |
| 718 | MDRV_SOUND_ADD(OKIM6295, XTAL_16MHz | |
| 155 | 719 | MDRV_SOUND_CONFIG(okim6295_interface_region_1_pin7high) |
| 156 | 720 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5) |
| 157 | 721 | MACHINE_DRIVER_END |
| r2454 | r2455 | |
| 199 | 763 | VSync - 60Hz |
| 200 | 764 | HSync - 15.31kHz |
| 201 | 765 | |
| 202 | ||
| 766 | ||
| 203 | 767 | |
| 204 | 768 | ROM_START( iqblocka ) |
| 205 | ROM_REGION( 0x40000, REGION_CPU1, 0 ) | |
| 769 | ROM_REGION( 0x40000, REGION_CPU1, 0 ) | |
| 206 | 770 | ROM_LOAD( "v.u18", 0x00000, 0x40000, CRC(2e2b7d43) SHA1(cc73f4c8f9a6e2219ee04c9910725558a80b4eb2) ) |
| 207 | 771 | |
| 208 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ | |
| 209 | ROM_LOAD( "speech.u17", 0x00000, 0x40000, CRC(d9e3d39f) SHA1(bec85d1ac2dfca77453cbca0e7dd53fee8fb438b) ) | |
| 772 | ROM_REGION( 0x80000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 773 | ROM_LOAD( "cg.u7", 0x000000, 0x080000, CRC(cb48a66e) SHA1(6d597193d1333a97957d5ceec8179a24bedfd928) ) // FIXED BITS (xxxxxxxx0xxxxxxx) | |
| 210 | 774 | |
| 211 | ROM_REGION( 0x80000, REGION_GFX1, ROMREGION_INVERT ) | |
| 212 | ROM_LOAD( "cg.u7", 0x000000, 0x080000, CRC(cb48a66e) SHA1(6d597193d1333a97957d5ceec8179a24bedfd928) ) | |
| 775 | ROM_REGION( 0x80000, REGION_GFX2, ROMREGION_DISPOSE) | |
| 776 | ROM_LOAD( "text.u8", 0x000000, 0x080000, CRC(48c4f4e6) SHA1(b1e1ca62cf6a99c11a5cc56705eef7e22a3b2740) ) | |
| 213 | 777 | |
| 214 | ROM_REGION( 0x80000, REGION_GFX2, ROMREGION_INVERT ) | |
| 215 | ROM_LOAD( "text.u8", 0x000000, 0x080000, CRC(48c4f4e6) SHA1(b1e1ca62cf6a99c11a5cc56705eef7e22a3b2740) ) | |
| 778 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) | |
| 779 | ROM_LOAD( "speech.u17", 0x00000, 0x40000, CRC(d9e3d39f) SHA1(bec85d1ac2dfca77453cbca0e7dd53fee8fb438b) ) | |
| 216 | 780 | ROM_END |
| 217 | 781 | |
| 218 | 782 | ROM_START( iqblockf ) |
| 219 | ROM_REGION( 0x40000, REGION_CPU1, 0 ) | |
| 783 | ROM_REGION( 0x40000, REGION_CPU1, 0 ) | |
| 220 | 784 | ROM_LOAD( "v113fr.u18", 0x00000, 0x40000, CRC(346c68af) SHA1(ceae4c0143c288dc9c1dd1e8a51f1e3371ffa439) ) |
| 221 | 785 | |
| 222 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) /* Samples */ | |
| 223 | ROM_LOAD( "sp.u17", 0x00000, 0x40000, CRC(71357845) SHA1(25f4f7aebdcc0706018f041d3696322df569b0a3) ) | |
| 786 | ROM_REGION( 0x80000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 787 | ROM_LOAD( "cg.u7", 0x000000, 0x080000, CRC(cb48a66e) SHA1(6d597193d1333a97957d5ceec8179a24bedfd928) ) // FIXED BITS (xxxxxxxx0xxxxxxx) | |
| 224 | 788 | |
| 225 | ROM_REGION( 0x80000, REGION_GFX1, ROMREGION_INVERT ) | |
| 226 | ROM_LOAD( "cg.u7", 0x000000, 0x080000, CRC(cb48a66e) SHA1(6d597193d1333a97957d5ceec8179a24bedfd928) ) | |
| 789 | ROM_REGION( 0x80000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 790 | ROM_LOAD( "text.u8", 0x000000, 0x080000, CRC(48c4f4e6) SHA1(b1e1ca62cf6a99c11a5cc56705eef7e22a3b2740) ) | |
| 227 | 791 | |
| 228 | ROM_REGION( 0x80000, REGION_GFX2, ROMREGION_INVERT ) | |
| 229 | ROM_LOAD( "text.u8", 0x000000, 0x080000, CRC(48c4f4e6) SHA1(b1e1ca62cf6a99c11a5cc56705eef7e22a3b2740) ) | |
| 792 | ROM_REGION( 0x40000, REGION_SOUND1, 0 ) | |
| 793 | ROM_LOAD( "sp.u17", 0x00000, 0x40000, CRC(71357845) SHA1(25f4f7aebdcc0706018f041d3696322df569b0a3) ) | |
| 230 | 794 | ROM_END |
| 231 | 795 | |
| 232 | 796 | /* |
| r2454 | r2455 | |
| 278 | 842 | */ |
| 279 | 843 | |
| 280 | 844 | ROM_START( tjsb ) |
| 281 | ROM_REGION( 0x40000, REGION_CPU1, 0 ) | |
| 845 | ROM_REGION( 0x40000, REGION_CPU1, 0 ) | |
| 282 | 846 | ROM_LOAD( "p0700.u16", 0x00000, 0x40000,CRC(1b2a50df) SHA1(95a272e624f727df9523667864f933118d9e633c) ) |
| 283 | 847 | |
| 284 | ROM_REGION( 0x80000, REGION_SOUND1, 0 ) /* Samples */ | |
| 285 | ROM_LOAD( "s0703.u15", 0x00000, 0x80000, CRC(c6f94d29) SHA1(ec413580240711fc4977dd3c96c288501aa7ef6c) ) | |
| 848 | ROM_REGION( 0x200000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 849 | ROM_LOAD( "a0701.u3", 0x000000, 0x200000, CRC(aa182140) SHA1(37c2053386c183ff726ba417d13f2063cf9a22df) ) // FIXED BITS (xxxxxxxx0xxxxxxx) | |
| 286 | 850 | |
| 287 | ROM_REGION( 0x200000, REGION_GFX1, ROMREGION_INVERT ) | |
| 288 | ROM_LOAD( "a0701.u3", 0x000000, 0x200000, CRC(aa182140) SHA1(37c2053386c183ff726ba417d13f2063cf9a22df) ) | |
| 851 | ROM_REGION( 0x80000, REGION_GFX2, ROMREGION_DISPOSE ) | |
| 852 | ROM_LOAD( "text.u6", 0x000000, 0x080000, CRC(3be886b8) SHA1(15b3624ed076640c1828d065b01306a8656f5a9b) ) // BADADDR --xxxxxxxxxxxxxxxxx | |
| 289 | 853 | |
| 290 | ROM_REGION( 0x80000, REGION_GFX2, ROMREGION_INVERT ) | |
| 291 | ROM_LOAD( "text.u6", 0x000000, 0x080000, CRC(3be886b8) SHA1(15b3624ed076640c1828d065b01306a8656f5a9b) ) | |
| 854 | ROM_REGION( 0x80000, REGION_SOUND1, 0 ) | |
| 855 | ROM_LOAD( "s0703.u15", 0x00000, 0x80000, CRC(c6f94d29) SHA1(ec413580240711fc4977dd3c96c288501aa7ef6c) ) | |
| 292 | 856 | ROM_END |
| 293 | 857 | |
| 294 | static void decrypt_program_rom(int mask, int a7, int a6, int a5, int a4, int a3, int a2, int a1, int a0) | |
| 295 | { | |
| 296 | int length = memory_region_length(REGION_CPU1); | |
| 297 | UINT8 *rom = memory_region(REGION_CPU1); | |
| 298 | UINT8 *tmp = auto_malloc(length); | |
| 299 | int i; | |
| 300 | 858 | |
| 301 | /* decrypt the program ROM */ | |
| 302 | ||
| 303 | /* XOR layer */ | |
| 304 | for (i = 0;i < length;i++) | |
| 305 | { | |
| 306 | if(i & 0x2000) | |
| 307 | { | |
| 308 | if((i & mask) == mask) | |
| 309 | rom[i] ^= 0x01; | |
| 310 | } | |
| 311 | else | |
| 312 | { | |
| 313 | if(i & 0x0100) | |
| 314 | { | |
| 315 | if((i & mask) == mask) | |
| 316 | rom[i] ^= 0x01; | |
| 317 | } | |
| 318 | else | |
| 319 | { | |
| 320 | if(i & 0x0080) | |
| 321 | { | |
| 322 | if((i & mask) == mask) | |
| 323 | rom[i] ^= 0x01; | |
| 324 | } | |
| 325 | else | |
| 326 | { | |
| 327 | if((i & mask) != mask) | |
| 328 | rom[i] ^= 0x01; | |
| 329 | } | |
| 330 | } | |
| 331 | } | |
| 332 | } | |
| 333 | ||
| 334 | memcpy(tmp,rom,length); | |
| 335 | ||
| 336 | /* address line swap */ | |
| 337 | for (i = 0;i < length;i++) | |
| 338 | { | |
| 339 | int addr = (i & ~0xff) | BITSWAP8(i,a7,a6,a5,a4,a3,a2,a1,a0); | |
| 340 | rom[i] = tmp[addr]; | |
| 341 | } | |
| 342 | } | |
| 343 | ||
| 344 | static DRIVER_INIT( iqblock ) | |
| 345 | { | |
| 346 | ||
| 347 | decrypt_program_rom(0x11, 7, 6, 5, 4, 3, 2, 1, 0); | |
| 348 | } | |
| 349 | ||
| 350 | static DRIVER_INIT( tjsb ) | |
| 351 | { | |
| 352 | decrypt_program_rom(0x05, 7, 6, 3, 2, 5, 4, 1, 0); | |
| 353 | } | |
| 354 | ||
| 355 | GAME( 1996, iqblocka, iqblock, igs_180, igs_180, iqblock, ROT0, "IGS", "IQ-Block (V127M)", GAME_NOT_WORKING ) | |
| 356 | GAME( 1996, iqblockf, iqblock, igs_180, igs_180, iqblock, ROT0, "IGS", "IQ-Block (V113FR)", GAME_NOT_WORKING ) | |
| 357 | GAME( 1997, tjsb, 0, igs_180, igs_180, tjsb, ROT0, "IGS", "Mahjong Tian Jiang Shen Bing", GAME_NOT_WORKING ) | |
| 859 | GAME( 1996, iqblocka, iqblock, igs_180, iqblocka, iqblocka, ROT0, "IGS", "Shu Zi Le Yuan (V127M)", GAME_NOT_WORKING ) | |
| 860 | GAME( 1996, iqblockf, iqblock, igs_180, iqblocka, iqblockf, ROT0, "IGS", "Shu Zi Le Yuan (V113FR)", GAME_NOT_WORKING ) | |
| 861 | GAME( 1997, tjsb, 0, igs_180, iqblocka, tjsb, ROT0, "IGS", "Mahjong Tian Jiang Shen Bing", GAME_NOT_WORKING ) |
| r2454 | r2455 | |
|---|---|---|
| 220 | 220 | |
| 221 | 221 | static const struct AY8910interface ay8910_interface = |
| 222 | 222 | { |
| 223 | AY8910_LEGACY_OUTPUT, | |
| 224 | AY8910_DEFAULT_LOADS, | |
| 223 | 225 | soundlatch_r, |
| 224 | soundlatch2_r | |
| 226 | soundlatch2_r, | |
| 227 | NULL, | |
| 228 | NULL | |
| 225 | 229 | }; |
| 226 | 230 | |
| 227 | 231 | static MACHINE_DRIVER_START( formatz ) |
| r2454 | r2455 | |
|---|---|---|
| 456 | 456 | int reg = offset*2; |
| 457 | 457 | int shift = 0; |
| 458 | 458 | |
| 459 | if (mem_mask == 0x | |
| 459 | if (mem_mask == 0x | |
| 460 | 460 | { |
| 461 | 461 | reg++; |
| 462 | 462 | shift = 16; |
| r2454 | r2455 | |
| 486 | 486 | int reg = offset*2; |
| 487 | 487 | int chip; |
| 488 | 488 | |
| 489 | if (mem_mask == 0x | |
| 489 | if (mem_mask == 0x | |
| 490 | 490 | { |
| 491 | 491 | reg++; |
| 492 | 492 | data>>= 16; |
| r2454 | r2455 | |
| 517 | 517 | |
| 518 | 518 | static READ32_HANDLER( trackball_r ) |
| 519 | 519 | { |
| 520 | if( offset == 0 && mem_mask == 0x | |
| 520 | if( offset == 0 && mem_mask == 0x | |
| 521 | 521 | { |
| 522 | 522 | int axis; |
| 523 | 523 | UINT16 diff; |
| r2454 | r2455 | |
| 573 | 573 | |
| 574 | 574 | static READ32_HANDLER( btcflash_r ) |
| 575 | 575 | { |
| 576 | if (mem_mask == 0x | |
| 576 | if (mem_mask == 0x | |
| 577 | 577 | { |
| 578 | 578 | return intelflash_read(0, offset*2); |
| 579 | 579 | } |
| 580 | else if (mem_mask == 0x | |
| 580 | else if (mem_mask == 0x | |
| 581 | 581 | { |
| 582 | 582 | return intelflash_read(0, (offset*2)+1)<<16; |
| 583 | 583 | } |
| r2454 | r2455 | |
| 587 | 587 | |
| 588 | 588 | static WRITE32_HANDLER( btcflash_w ) |
| 589 | 589 | { |
| 590 | if (mem_mask == 0x | |
| 590 | if (mem_mask == 0x | |
| 591 | 591 | { |
| 592 | 592 | intelflash_write(0, offset*2, data&0xffff); |
| 593 | 593 | } |
| 594 | else if (mem_mask == 0x | |
| 594 | else if (mem_mask == 0x | |
| 595 | 595 | { |
| 596 | 596 | intelflash_write(0, (offset*2)+1, (data>>16)&0xffff); |
| 597 | 597 | } |
| r2454 | r2455 | |
| 601 | 601 | { |
| 602 | 602 | // mame_printf_debug( "r %08x %08x %08x\n", activecpu_get_pc(), offset, mem_mask ); |
| 603 | 603 | |
| 604 | if( offset == 1 && mem_mask == 0x | |
| 604 | if( offset == 1 && mem_mask == 0x | |
| 605 | 605 | { |
| 606 | 606 | int axis; |
| 607 | 607 | UINT16 diff; |
| r2454 | r2455 | |
| 674 | 674 | static WRITE32_HANDLER( tokimeki_serial_w ) |
| 675 | 675 | { |
| 676 | 676 | /* |
| 677 | serial EEPROM-like device here: when mem_mask == 0x | |
| 677 | serial EEPROM-like device here: when mem_mask == 0x | |
| 678 | 678 | |
| 679 | 679 | 0x40 = chip enable |
| 680 | 680 | 0x20 = clock |
| r2454 | r2455 | |
|---|---|---|
| 146 | 146 | if (data==0x26) { |
| 147 | 147 | i8751_current_command=0; |
| 148 | 148 | i8751_return=0xff; /* This value is XOR'd and must equal 0 */ |
| 149 | cpunum_set_input_line_and_vector( | |
| 149 | cpunum_set_input_line_and_vector(machine, 0,0,HOLD_LINE,0xff); | |
| 150 | 150 | return; |
| 151 | 151 | } |
| 152 | 152 | |
| r2454 | r2455 | |
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | /* Signal main cpu task is complete */ |
| 196 | cpunum_set_input_line_and_vector( | |
| 196 | cpunum_set_input_line_and_vector(machine, 0,0,HOLD_LINE,0xff); | |
| 197 | 197 | i8751_current_command=data; |
| 198 | 198 | } |
| 199 | 199 |
| r2454 | r2455 | |
|---|---|---|
| 27 | 27 | ***************************************************************************/ |
| 28 | 28 | |
| 29 | 29 | #include "driver.h" |
| 30 | #include "deprecat.h" | |
| 31 | 30 | #include "crgolf.h" |
| 32 | 31 | #include "sound/ay8910.h" |
| 33 | 32 | #include "sound/msm5205.h" |
| r2454 | r2455 | |
| 131 | 130 | |
| 132 | 131 | static READ8_HANDLER( main_to_sound_r ) |
| 133 | 132 | { |
| 134 | cpunum_set_input_line( | |
| 133 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, CLEAR_LINE); | |
| 135 | 134 | return main_to_sound_data; |
| 136 | 135 | } |
| 137 | 136 | |
| r2454 | r2455 | |
| 158 | 157 | |
| 159 | 158 | static READ8_HANDLER( sound_to_main_r ) |
| 160 | 159 | { |
| 161 | cpunum_set_input_line( | |
| 160 | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, CLEAR_LINE); | |
| 162 | 161 | return sound_to_main_data; |
| 163 | 162 | } |
| 164 | 163 |
| r2454 | r2455 | |
|---|---|---|
| 328 | 328 | |
| 329 | 329 | static const struct YM2203interface thedeep_ym2203_intf = |
| 330 | 330 | { |
| 331 | 0,0,0,0, | |
| 331 | { | |
| 332 | AY8910_LEGACY_OUTPUT, | |
| 333 | AY8910_DEFAULT_LOADS, | |
| 334 | NULL, NULL, NULL, NULL | |
| 335 | }, | |
| 332 | 336 | irqhandler |
| 333 | 337 | }; |
| 334 | 338 |
| r2454 | r2455 | |
|---|---|---|
| 496 | 496 | |
| 497 | 497 | static const struct AY8910interface ay8910_interface = |
| 498 | 498 | { |
| 499 | AY8910_LEGACY_OUTPUT, | |
| 500 | AY8910_DEFAULT_LOADS, | |
| 499 | 501 | input_port_0_r, |
| 500 | 502 | input_port_1_r |
| 501 | 503 | }; |
| r2454 | r2455 | |
|---|---|---|
| 114 | 114 | { |
| 115 | 115 | COMBINE_DATA(&paletteram32[offset]); |
| 116 | 116 | data = paletteram32[offset]; |
| 117 | palette_set_color_rgb(Machine, (offset * 2) + 0, pal5bit(data >> 26), pal5bit(data >> 21), pal5bit(data >> 16)); | |
| 118 | palette_set_color_rgb(Machine, (offset * 2) + 1, pal5bit(data >> 10), pal5bit(data >> 5), pal5bit(data >> 0)); | |
| 117 | palette_set_color_rgb(machine, (offset * 2) + 0, pal5bit(data >> 26), pal5bit(data >> 21), pal5bit(data >> 16)); | |
| 118 | palette_set_color_rgb(machine, (offset * 2) + 1, pal5bit(data >> 10), pal5bit(data >> 5), pal5bit(data >> 0)); | |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | #define NUM_LAYERS 2 |
| r2454 | r2455 | |
| 217 | 217 | EEPROM_set_cs_line((data & 0x4) ? CLEAR_LINE : ASSERT_LINE); |
| 218 | 218 | |
| 219 | 219 | if (data & 0x10) |
| 220 | cpunum_set_input_line( | |
| 220 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, CLEAR_LINE); | |
| 221 | 221 | else |
| 222 | cpunum_set_input_line( | |
| 222 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, ASSERT_LINE); | |
| 223 | 223 | } |
| 224 | 224 | return; |
| 225 | 225 | } |
| r2454 | r2455 | |
| 228 | 228 | if (ACCESSING_BITS_24_31) |
| 229 | 229 | { |
| 230 | 230 | if (data & 0x80000000) /* CG Board 1 IRQ Ack */ |
| 231 | cpunum_set_input_line( | |
| 231 | cpunum_set_input_line(machine, 0, INPUT_LINE_IRQ1, CLEAR_LINE); | |
| 232 | 232 | |
| 233 | 233 | if (data & 0x40000000) /* CG Board 0 IRQ Ack */ |
| 234 | cpunum_set_input_line( | |
| 234 | cpunum_set_input_line(machine, 0, INPUT_LINE_IRQ0, CLEAR_LINE); | |
| 235 | 235 | |
| 236 | 236 | set_cgboard_id((data >> 28) & 0x3); |
| 237 | 237 | |
| r2454 | r2455 | |
| 325 | 325 | { |
| 326 | 326 | COMBINE_DATA(&paletteram32[offset]); |
| 327 | 327 | data = paletteram32[offset]; |
| 328 | palette_set_color_rgb( | |
| 328 | palette_set_color_rgb(machine, offset, pal5bit(data >> 10), pal5bit(data >> 5), pal5bit(data >> 0)); | |
| 329 | 329 | } |
| 330 | 330 | |
| 331 | 331 | static ADDRESS_MAP_START( jetwave_map, ADDRESS_SPACE_PROGRAM, 32 ) |
| r2454 | r2455 | |
|---|---|---|
| 124 | 124 | |
| 125 | 125 | static READ8_HANDLER( dominob_input_2_r ) |
| 126 | 126 | { |
| 127 | return input_port_ | |
| 127 | return input_port_ | |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | |
| r2454 | r2455 | |
| 243 | 243 | |
| 244 | 244 | static const struct AY8910interface ay8910_interface = |
| 245 | 245 | { |
| 246 | AY8910_LEGACY_OUTPUT, | |
| 247 | AY8910_DEFAULT_LOADS, | |
| 246 | 248 | input_port_5_r, |
| 247 | input_port_4_r | |
| 249 | input_port_4_r, | |
| 250 | NULL, | |
| 251 | NULL | |
| 248 | 252 | }; |
| 249 | 253 | |
| 250 | 254 |
| r2454 | r2455 | |
|---|---|---|
| 527 | 527 | { |
| 528 | 528 | int reg, data; |
| 529 | 529 | |
| 530 | if (mem_mask == 0x | |
| 530 | if (mem_mask == 0x | |
| 531 | 531 | { |
| 532 | 532 | // mame_printf_debug("ATAPI: packet read = %04x\n", atapi_data[atapi_data_ptr]); |
| 533 | 533 | |
| r2454 | r2455 | |
| 599 | 599 | int shift; |
| 600 | 600 | reg = offset<<1; |
| 601 | 601 | shift = 0; |
| 602 | if (mem_mask == 0x | |
| 602 | if (mem_mask == 0x | |
| 603 | 603 | { |
| 604 | 604 | reg += 1; |
| 605 | 605 | shift = 16; |
| r2454 | r2455 | |
| 650 | 650 | |
| 651 | 651 | verboselog( 2, "atapi_w( %08x, %08x, %08x )\n", offset, mem_mask, data ); |
| 652 | 652 | |
| 653 | if (mem_mask == 0x | |
| 653 | if (mem_mask == 0x | |
| 654 | 654 | { |
| 655 | 655 | verboselog( 2, "atapi_w: data=%04x\n", data ); |
| 656 | 656 | |
| r2454 | r2455 | |
| 756 | 756 | else |
| 757 | 757 | { |
| 758 | 758 | reg = offset<<1; |
| 759 | if (mem_mask == 0x | |
| 759 | if (mem_mask == 0x | |
| 760 | 760 | { |
| 761 | 761 | reg += 1; |
| 762 | 762 | data >>= 16; |
| r2454 | r2455 | |
|---|---|---|
| 139 | 139 | |
| 140 | 140 | static WRITE8_HANDLER( irq_ack_w ) |
| 141 | 141 | { |
| 142 | cpunum_set_input_line( | |
| 142 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 |
| r2454 | r2455 | |
|---|---|---|
| 319 | 319 | |
| 320 | 320 | static const struct YM2203interface ym2203_interface = |
| 321 | 321 | { |
| 322 | 0, | |
| 323 | 0, | |
| 324 | upd7759_0_port_w, | |
| 325 | bladestl_port_B_w | |
| 322 | { | |
| 323 | AY8910_LEGACY_OUTPUT, | |
| 324 | AY8910_DEFAULT_LOADS, | |
| 325 | NULL, | |
| 326 | NULL, | |
| 327 | upd7759_0_port_w, | |
| 328 | bladestl_port_B_w | |
| 329 | }, | |
| 330 | NULL | |
| 326 | 331 | }; |
| 327 | 332 | |
| 328 | 333 | static const struct upd7759_interface upd7759_interface = |
| r2454 | r2455 | |
|---|---|---|
| 214 | 214 | ***************************************************************************/ |
| 215 | 215 | |
| 216 | 216 | #include "driver.h" |
| 217 | #include "deprecat.h" | |
| 218 | 217 | #include "video/vector.h" |
| 219 | 218 | #include "video/avgdvg.h" |
| 220 | 219 | #include "machine/atari_vg.h" |
| r2454 | r2455 | |
| 327 | 326 | |
| 328 | 327 | static WRITE8_HANDLER( irq_ack_w ) |
| 329 | 328 | { |
| 330 | cpunum_set_input_line( | |
| 329 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 331 | 330 | } |
| 332 | 331 | |
| 333 | 332 |
| r2454 | r2455 | |
|---|---|---|
| 73 | 73 | ***************************************************************************/ |
| 74 | 74 | |
| 75 | 75 | #include "driver.h" |
| 76 | #include "deprecat.h" | |
| 77 | 76 | #include "cpu/z80/z80.h" |
| 78 | 77 | #include "audio/seibu.h" |
| 79 | 78 | #include "sound/3812intf.h" |
| r2454 | r2455 | |
|---|---|---|
| 92 | 92 | /* make this happen, we must assume that reads from the */ |
| 93 | 93 | /* 6840 take 14 additional cycles */ |
| 94 | 94 | activecpu_adjust_icount(-14); |
| 95 | return mcr68_6840_upper_r(machine,offset,0); | |
| 95 | return mcr68_6840_upper_r(machine,offset,0xffff); | |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 |
| r2454 | r2455 | |
|---|---|---|
| 46 | 46 | * Joker Card (Ver.A267BC, encrypted), Vesely Svet, 1993. |
| 47 | 47 | * Mongolfier New (italian), bootleg, 199?. |
| 48 | 48 | * Soccer New (italian), bootleg, 199?. |
| 49 | * Snooker 10 (Ver 1.11), Sandii', 1998. | |
| 50 | 49 | * Saloon (french, encrypted), unknown, 199?. |
| 51 | 50 | |
| 52 | 51 | |
| r2454 | r2455 | |
| 145 | 144 | |
| 146 | 145 | NOTES BY GAME/SET: |
| 147 | 146 | |
| 148 | - Pool 10 | |
| 149 | - Cuore 1 | |
| 150 | - Elephant Family | |
| 151 | - Tortuga Family | |
| 152 | - Pot Game | |
| 147 | * Pool 10 | |
| 148 | * Cuore 1 | |
| 149 | * Elephant Family | |
| 150 | * Tortuga Family | |
| 151 | * Pot Game | |
| 153 | 152 | |
| 154 | 153 | In Italy many people became addicted to videopokers. They put so much money on them, |
| 155 | 154 | and they had to sell the house. Also some engineers modified videopokers to do less |
| r2454 | r2455 | |
| 174 | 173 | the supported set is the program rom that is double sized, having identical halves. |
| 175 | 174 | |
| 176 | 175 | |
| 177 | | |
| 176 | * Jolly Card (austrian, Funworld, bootleg) | |
| 178 | 177 | |
| 179 | 178 | This one seems to have normal RAM instead of NVRAM. |
| 180 | 179 | Going through the code, there's not any NVRAM initialization routine through service 1 & 2. |
| 181 | 180 | |
| 182 | 181 | |
| 183 | | |
| 182 | * Jolly Card Professional 2.0 (Spale-Soft) | |
| 184 | 183 | |
| 185 | 184 | Each 1st boot, this game show a generated code. You must enter this code in a DOS program to |
| 186 | 185 | get the input codes necessary to allow boot the game. |
| 187 | 186 | |
| 187 | This set is one of the most wanted for customers because is a real SCAM. | |
| 188 | The program has 2 hidden menues that allow change parameters without knowledge of the players. | |
| 188 | 189 | |
| 189 | - Jolly Card (croatian sets) and Jolly Card Professional 2.0 | |
| 190 | 190 | |
| 191 | * Jolly Card (croatian sets) and Jolly Card Professional 2.0 | |
| 192 | ||
| 191 | 193 | These games don't operate with regular coins/tokens. Only remote credits are allowed. |
| 192 | 194 | |
| 193 | 195 | |
| 194 | | |
| 196 | * Magic Card II (Impera) | |
| 195 | 197 | |
| 196 | 198 | Impera made 2 graphics sets for this game. One of them is encrypted, and meant for the TAB blue board. |
| 197 | 199 | This board has two HY18CV85 (electrically-erasable PLD) that handle the encryption. |
| 198 | 200 | In another hand, the sound has some weird things, but is confirmed that happen in the real thing. |
| 199 | 201 | |
| 202 | The game resolution seems to change 'on the fly' when entering the input test mode. | |
| 203 | There aren't any writes to the m6845 registers to manage these changes. | |
| 200 | 204 | |
| 201 | - Jolly Joker (Impera, 50bet) | |
| 205 | Regarding the CPU, it seems to be a custom one, or a daughterboard with a 65c02 + PLDs/TTLs. | |
| 206 | Some CPU instructions seems to be changed. The following piece of code at $C1A8 is very clear: | |
| 202 | 207 | |
| 208 | C1A8: A0 00 ldy #$00 ; clear Y register to use as counter. | |
| 209 | ||
| 210 | C1AA: B9 9D C1 lda $C19D,y ; load PIA port address | |
| 211 | C1AD: 85 06 sta $06 ; into $06-$07 ZP vector. | |
| 212 | C1AF: B9 92 C1 lda $C192,y ; | |
| 213 | C1B2: 85 07 sta $07 ; | |
| 214 | C1B4: C0 0B cpy #$0B | |
| 215 | C1B6: B0 0C bcs $C1C4 | |
| 216 | ||
| 217 | ... load values to store into Accumulator... | |
| 218 | ... | |
| 219 | C1C6: 91 06 sta ($06),y ; store value in PIA port, indexed (Y). | |
| 220 | C1C8: C8 iny ; increment Y | |
| 221 | C1C9: C0 0C cpy #$0C ; finish? | |
| 222 | C1CB: D0 DD bne $C1AA ; if not, branch to load a new PIA adress. | |
| 223 | ||
| 224 | In this example, as soon as Y register increments, the indexed writes go out of range. | |
| 225 | To get this piece of code working and initialize the PIAs properly, the instruction 0x91 should be | |
| 226 | "sta ($ZP)" instead of Y indexed. (like instruction 0x92 in stock 65c02's). | |
| 227 | ||
| 228 | ||
| 229 | * Jolly Joker (Impera, 50bet) | |
| 230 | ||
| 203 | 231 | To boot this game for 1st time, DSW should be in the following position: |
| 204 | 232 | 1=ON 2=OFF 3=ON 4=OFF 5=OFF 6=ON 7=ON 8=OFF |
| 205 | 233 | |
| r2454 | r2455 | |
| 207 | 235 | When numbers start to fill the screen, press RESET (key F3) again to start the game. |
| 208 | 236 | |
| 209 | 237 | |
| 210 | - Mongolfier New | |
| 211 | - Soccer New | |
| 238 | * Mongolfier New | |
| 239 | * Soccer New | |
| 212 | 240 | |
| 213 | 241 | These games are based in Royal Card. They are running in a heavely modified Royal Card |
| 214 | 242 | hardware with a microcontroller as an extra (protection?) component and a TDA2003 as |
| r2454 | r2455 | |
| 224 | 252 | about them and start to implement the missing pieces for an accurate emulation. |
| 225 | 253 | |
| 226 | 254 | |
| 227 | | |
| 255 | * Saloon | |
| 228 | 256 | |
| 229 | This game is running in a complete different hardware. | |
| 230 | 2x MACH231-15, an AD-65 (equivalent to OKI6295), no AY-8910, no NVRAM, no PIAs, no CRTC, | |
| 231 | different memory map, and an unknown DIP40 IC, that could be an extra CPU or MCU. | |
| 232 | Tiles are flipped in X-axis respect to the normal funworld games, so need it's own GFX decode. | |
| 233 | Also palette is stored in a normal 27C256 ROM, repeated 64 times. | |
| 234 | ||
| 235 | This game should be moved to a new driver in a near future, as soon as we know a bit more | |
| 236 | about it and start to implement the missing pieces for an accurate emulation. | |
| 237 | ||
| 238 | ||
| 239 | - Saloon | |
| 240 | ||
| 241 | 257 | This game is totally encrypted. No PIAs to drive I/O. The PCB has printed "LEOPARDO 5", so we |
| 242 | 258 | can expect a game called the same way to appear. |
| 243 | 259 | |
| r2454 | r2455 | |
| 628 | 644 | - 1x green led |
| 629 | 645 | |
| 630 | 646 | |
| 631 | Snooker 10 (Ver 1.11) | |
| 632 | --------------------- | |
| 633 | ||
| 634 | - 1x Unknown DIP40 (main) | |
| 635 | - 1x AD-65 (equivalent to OKI6295) | |
| 636 | - 1x LM358N (sound) | |
| 637 | - 1x TDA2003 (sound) | |
| 638 | - 2x MACH231-15-JC/1-18JI/1 | |
| 639 | - 1x oscillator 16.00MHz | |
| 640 | ||
| 641 | - 2x TMS27C256 (1,2) | |
| 642 | - 2x M27C256 (3,5) | |
| 643 | - 1x M27C2001 (4) | |
| 644 | ||
| 645 | - 1x JAMMA edge connector | |
| 646 | - 1x 15 legs connector | |
| 647 | - 1x trimmer (volume) | |
| 648 | - 1x 8 DIP switches | |
| 649 | - 1x battery | |
| 650 | ||
| 651 | ||
| 652 | 647 | Saloon (France, encrypted) |
| 653 | 648 | -------------------------- |
| 654 | 649 | |
| r2454 | r2455 | |
| 829 | 824 | - Added new game: Pot Game (italian). |
| 830 | 825 | - Updated technical notes. |
| 831 | 826 | |
| 827 | 2008/04/18 | |
| 828 | - Removed the temporary hack to jolyc980. | |
| 829 | - Updated technical notes regarding Magic Card II & Jolly Card Professional 2.0. | |
| 830 | - Moved snookr10 to its own driver. | |
| 831 | - Minor clean-up. | |
| 832 | 832 | |
| 833 | ||
| 833 | 834 | *** TO DO *** |
| 834 | 835 | |
| 835 | 836 | - Figure out the royalcdc, jokercrd and saloon encryption. |
| r2454 | r2455 | |
| 859 | 860 | PALETTE_INIT( funworld ); |
| 860 | 861 | VIDEO_START( funworld ); |
| 861 | 862 | VIDEO_START( magiccrd ); |
| 862 | VIDEO_START( snookr10 ); | |
| 863 | 863 | VIDEO_UPDATE( funworld ); |
| 864 | 864 | |
| 865 | 865 | |
| r2454 | r2455 | |
| 869 | 869 | |
| 870 | 870 | static WRITE8_HANDLER(funworld_lamp_a_w) |
| 871 | 871 | { |
| 872 | coin_counter_w(0, data & 0x01); / | |
| 872 | coin_counter_w(0, data & 0x01); /* credit in counter */ | |
| 873 | 873 | |
| 874 | output_set_lamp_value(0, 1-((data >> 1) & 1)); // button hold1 and | |
| 875 | output_set_lamp_value(2, 1-((data >> 1) & 1)); // hold3 (see pinouts) | |
| 874 | output_set_lamp_value(0, 1-((data >> 1) & 1)); /* button hold1 and */ | |
| 875 | output_set_lamp_value(2, 1-((data >> 1) & 1)); /* hold3 (see pinouts) */ | |
| 876 | 876 | |
| 877 | coin_counter_w(7, data & 0x04); / | |
| 877 | coin_counter_w(7, data & 0x04); /* credit out counter, mapped as coin 8 */ | |
| 878 | 878 | |
| 879 | output_set_lamp_value(1, 1-((data >> 3) & 1)); // button hold2/low | |
| 880 | output_set_lamp_value(5, 1-((data >> 5) & 1)); // button 6 (collect/cancel) | |
| 881 | output_set_lamp_value(3, (data >> 7) & 1); // button hold4/high | |
| 879 | output_set_lamp_value(1, 1-((data >> 3) & 1)); /* button hold2/low */ | |
| 880 | output_set_lamp_value(5, 1-((data >> 5) & 1)); /* button 6 (collect/cancel) */ | |
| 881 | output_set_lamp_value(3, (data >> 7) & 1); /* button hold4/high */ | |
| 882 | 882 | } |
| 883 | 883 | |
| 884 | 884 | static WRITE8_HANDLER(funworld_lamp_b_w) |
| 885 | 885 | { |
| 886 | output_set_lamp_value(4, (data >> 0) & 1); // button hold5/bet | |
| 887 | output_set_lamp_value(6, (data >> 1) & 1); // button 7 (start/play) | |
| 886 | output_set_lamp_value(4, (data >> 0) & 1); /* button hold5/bet */ | |
| 887 | output_set_lamp_value(6, (data >> 1) & 1); /* button 7 (start/play) */ | |
| 888 | 888 | } |
| 889 | 889 | |
| 890 | 890 | |
| r2454 | r2455 | |
| 915 | 915 | AM_RANGE(0x0c01, 0x0c01) AM_WRITE(AY8910_write_port_0_w) |
| 916 | 916 | AM_RANGE(0x0e00, 0x0e00) AM_DEVWRITE(MC6845, "crtc", mc6845_address_w) |
| 917 | 917 | AM_RANGE(0x0e01, 0x0e01) AM_DEVREADWRITE(MC6845, "crtc", mc6845_register_r, mc6845_register_w) |
| 918 | AM_RANGE(0x3600, 0x36ff) AM_RAM // some games use $3603-05 range for protection. | |
| 918 | AM_RANGE(0x2c00, 0x2cff) AM_RAM /* range for protection */ | |
| 919 | AM_RANGE(0x3600, 0x36ff) AM_RAM /* some games use $3603-05 range for protection */ | |
| 920 | AM_RANGE(0x3c00, 0x3cff) AM_RAM /* range for protection */ | |
| 919 | 921 | AM_RANGE(0x4000, 0x4fff) AM_RAM_WRITE(funworld_videoram_w) AM_BASE(&videoram) |
| 920 | 922 | AM_RANGE(0x5000, 0x5fff) AM_RAM AM_WRITE(funworld_colorram_w) AM_BASE(&colorram) |
| 921 | 923 | AM_RANGE(0x6000, 0xffff) AM_ROM |
| r2454 | r2455 | |
| 929 | 931 | AM_RANGE(0x0c01, 0x0c01) AM_WRITE(AY8910_write_port_0_w) |
| 930 | 932 | AM_RANGE(0x0e00, 0x0e00) AM_DEVWRITE(MC6845, "crtc", mc6845_address_w) |
| 931 | 933 | AM_RANGE(0x0e01, 0x0e01) AM_DEVREADWRITE(MC6845, "crtc", mc6845_register_r, mc6845_register_w) |
| 932 | AM_RANGE(0x2000, 0x2000) AM_READNOP // some unknown reads | |
| 933 | AM_RANGE(0x3e00, 0x3fff) AM_RAM // some games use $3e03-05 range for protection. | |
| 934 | AM_RANGE(0x2000, 0x2000) AM_READNOP /* some unknown reads */ | |
| 935 | AM_RANGE(0x3e00, 0x3fff) AM_RAM /* some games use $3e03-05 range for protection */ | |
| 934 | 936 | AM_RANGE(0x6000, 0x6fff) AM_RAM_WRITE(funworld_videoram_w) AM_BASE(&videoram) |
| 935 | 937 | AM_RANGE(0x7000, 0x7fff) AM_RAM AM_WRITE(funworld_colorram_w) AM_BASE(&colorram) |
| 936 | 938 | AM_RANGE(0x8000, 0xffff) AM_ROM |
| r2454 | r2455 | |
| 949 | 951 | AM_RANGE(0x6000, 0xffff) AM_ROM |
| 950 | 952 | ADDRESS_MAP_END |
| 951 | 953 | |
| 952 | static ADDRESS_MAP_START( snookr10_map, ADDRESS_SPACE_PROGRAM, 8 ) // RAM 64K (8K x 8), | |
| 953 | AM_RANGE(0x0000, 0x0fff) AM_RAM | |
| 954 | AM_RANGE(0x1000, 0x1000) AM_READNOP // input port? | |
| 955 | AM_RANGE(0x3000, 0x3004) AM_READNOP // input port? | |
| 956 | AM_RANGE(0x5000, 0x5001) AM_READNOP // input port? | |
| 957 | AM_RANGE(0x6000, 0x6fff) AM_RAM_WRITE(funworld_videoram_w) AM_BASE(&videoram) | |
| 958 | AM_RANGE(0x7000, 0x7fff) AM_RAM AM_WRITE(funworld_colorram_w) AM_BASE(&colorram) | |
| 959 | AM_RANGE(0x8000, 0xffff) AM_ROM | |
| 960 | ADDRESS_MAP_END | |
| 961 | 954 | |
| 962 | ||
| 963 | 955 | /************************* |
| 964 | 956 | * Input ports * |
| 965 | 957 | *************************/ |
| r2454 | r2455 | |
| 983 | 975 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Hoppersch") PORT_CODE(KEYCODE_W) |
| 984 | 976 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 985 | 977 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 986 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Abschreib (Payout)") PORT_CODE(KEYCODE_M) | |
| 978 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Abschreib (Payout)") PORT_CODE(KEYCODE_M) | |
| 987 | 979 | |
| 988 | 980 | PORT_START_TAG("IN2") |
| 989 | 981 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r2454 | r2455 | |
| 1012 | 1004 | PORT_DIPSETTING( 0x00, "Dattl Insert" ) |
| 1013 | 1005 | PORT_DIPSETTING( 0x10, "TAB Insert" ) |
| 1014 | 1006 | PORT_DIPNAME( 0x20, 0x00, "Joker" ) PORT_DIPLOCATION("SW1:3") |
| 1015 | PORT_DIPSETTING( 0x00, "With Joker" ) / | |
| 1007 | PORT_DIPSETTING( 0x00, "With Joker" ) /* also enable Five of a Kind */ | |
| 1016 | 1008 | PORT_DIPSETTING( 0x20, "Without Joker" ) |
| 1017 | 1009 | PORT_DIPNAME( 0x40, 0x00, "Hold" ) PORT_DIPLOCATION("SW1:2") |
| 1018 | 1010 | PORT_DIPSETTING( 0x00, "Auto Hold" ) |
| r2454 | r2455 | |
| 1045 | 1037 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1046 | 1038 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1047 | 1039 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1048 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Vratiti Nazad (Payout)") PORT_CODE(KEYCODE_M) | |
| 1040 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Vratiti Nazad (Payout)") PORT_CODE(KEYCODE_M) | |
| 1049 | 1041 | |
| 1050 | 1042 | PORT_START_TAG("IN2") |
| 1051 | 1043 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2454 | r2455 | |
| 1074 | 1066 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1075 | 1067 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) |
| 1076 | 1068 | PORT_DIPNAME( 0x20, 0x00, "Joker" ) PORT_DIPLOCATION("SW1:3") |
| 1077 | PORT_DIPSETTING( 0x00, "With Joker" ) / | |
| 1069 | PORT_DIPSETTING( 0x00, "With Joker" ) /* also enable Five of a Kind */ | |
| 1078 | 1070 | PORT_DIPSETTING( 0x20, "Without Joker" ) |
| 1079 | 1071 | PORT_DIPNAME( 0x40, 0x00, "Hold" ) PORT_DIPLOCATION("SW1:2") |
| 1080 | 1072 | PORT_DIPSETTING( 0x00, "Auto Hold" ) |
| r2454 | r2455 | |
| 1135 | 1127 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) |
| 1136 | 1128 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1137 | 1129 | PORT_DIPNAME( 0x20, 0x00, "Joker" ) PORT_DIPLOCATION("SW1:3") |
| 1138 | PORT_DIPSETTING( 0x00, "With Joker" ) / | |
| 1130 | PORT_DIPSETTING( 0x00, "With Joker" ) /* also enable Five of a Kind */ | |
| 1139 | 1131 | PORT_DIPSETTING( 0x20, "Without Joker" ) |
| 1140 | 1132 | PORT_DIPNAME( 0x40, 0x00, "Hold" ) PORT_DIPLOCATION("SW1:2") |
| 1141 | 1133 | PORT_DIPSETTING( 0x00, "Auto Hold" ) |
| r2454 | r2455 | |
| 1168 | 1160 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1169 | 1161 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1170 | 1162 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1171 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Vratiti Nazad (Payout)") PORT_CODE(KEYCODE_M) | |
| 1163 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Vratiti Nazad (Payout)") PORT_CODE(KEYCODE_M) | |
| 1172 | 1164 | |
| 1173 | 1165 | PORT_START_TAG("IN2") |
| 1174 | 1166 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2454 | r2455 | |
| 1197 | 1189 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) |
| 1198 | 1190 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1199 | 1191 | PORT_DIPNAME( 0x20, 0x00, "Joker" ) PORT_DIPLOCATION("SW1:3") |
| 1200 | PORT_DIPSETTING( 0x00, "With Joker" ) / | |
| 1192 | PORT_DIPSETTING( 0x00, "With Joker" ) /* also enable Five of a Kind */ | |
| 1201 | 1193 | PORT_DIPSETTING( 0x20, "Without Joker" ) |
| 1202 | 1194 | PORT_DIPNAME( 0x40, 0x00, "Hold" ) PORT_DIPLOCATION("SW1:2") |
| 1203 | 1195 | PORT_DIPSETTING( 0x00, "Auto Hold" ) |
| r2454 | r2455 | |
| 1305 | 1297 | PORT_DIPNAME( 0x01, 0x01, "State" ) PORT_DIPLOCATION("SW1:8") |
| 1306 | 1298 | PORT_DIPSETTING( 0x00, "Keyboard Test" ) |
| 1307 | 1299 | PORT_DIPSETTING( 0x01, "Play" ) |
| 1308 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:7") / | |
| 1300 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:7") /* remote credits settings are always 10 points/pulse */ | |
| 1309 | 1301 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 1310 | 1302 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) |
| 1311 | 1303 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:6") |
| r2454 | r2455 | |
| 1351 | 1343 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Hoppersch") PORT_CODE(KEYCODE_W) |
| 1352 | 1344 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1353 | 1345 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1354 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Abschreib (Payout)") PORT_CODE(KEYCODE_M) | |
| 1346 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Abschreib (Payout)") PORT_CODE(KEYCODE_M) | |
| 1355 | 1347 | |
| 1356 | 1348 | PORT_START_TAG("IN2") |
| 1357 | 1349 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r2454 | r2455 | |
| 1367 | 1359 | PORT_DIPNAME( 0x01, 0x01, "State" ) PORT_DIPLOCATION("SW1:8") |
| 1368 | 1360 | PORT_DIPSETTING( 0x00, "Keyboard Test" ) |
| 1369 | 1361 | PORT_DIPSETTING( 0x01, "Play" ) |
| 1370 | PORT_DIPNAME( 0x02, 0x00, "Remote" ) PORT_DIPLOCATION("SW1:7") / | |
| 1362 | PORT_DIPNAME( 0x02, 0x00, "Remote" ) PORT_DIPLOCATION("SW1:7") /* | |
| 1371 | 1363 | PORT_DIPSETTING( 0x00, "10 Points/Pulse" ) |
| 1372 | 1364 | PORT_DIPSETTING( 0x02, "50 Points/Pulse" ) |
| 1373 | 1365 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:6") |
| r2454 | r2455 | |
| 1380 | 1372 | PORT_DIPSETTING( 0x00, "Dattl Insert" ) |
| 1381 | 1373 | PORT_DIPSETTING( 0x10, "TAB Insert" ) |
| 1382 | 1374 | PORT_DIPNAME( 0x20, 0x00, "Joker" ) PORT_DIPLOCATION("SW1:3") |
| 1383 | PORT_DIPSETTING( 0x00, "With Joker" ) / | |
| 1375 | PORT_DIPSETTING( 0x00, "With Joker" ) /* also enable Five of a Kind */ | |
| 1384 | 1376 | PORT_DIPSETTING( 0x20, "Without Joker" ) |
| 1385 | 1377 | PORT_DIPNAME( 0x40, 0x00, "Hold" ) PORT_DIPLOCATION("SW1:2") |
| 1386 | 1378 | PORT_DIPSETTING( 0x00, "Auto Hold" ) |
| r2454 | r2455 | |
| 1413 | 1405 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1414 | 1406 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1415 | 1407 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1416 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Payout") PORT_CODE(KEYCODE_M) | |
| 1408 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Payout") PORT_CODE(KEYCODE_M) | |
| 1417 | 1409 | |
| 1418 | 1410 | PORT_START_TAG("IN2") |
| 1419 | 1411 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r2454 | r2455 | |
| 1475 | 1467 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Hoppersch") PORT_CODE(KEYCODE_W) |
| 1476 | 1468 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1477 | 1469 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1478 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Abschreib (Payout)") PORT_CODE(KEYCODE_M) | |
| 1470 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Abschreib (Payout)") PORT_CODE(KEYCODE_M) | |
| 1479 | 1471 | |
| 1480 | 1472 | PORT_START_TAG("IN2") |
| 1481 | 1473 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r2454 | r2455 | |
| 1504 | 1496 | PORT_DIPSETTING( 0x00, "disabled" ) |
| 1505 | 1497 | PORT_DIPSETTING( 0x10, "enabled" ) |
| 1506 | 1498 | PORT_DIPNAME( 0x20, 0x00, "Joker" ) PORT_DIPLOCATION("SW1:3") |
| 1507 | PORT_DIPSETTING( 0x00, "With Joker" ) / | |
| 1499 | PORT_DIPSETTING( 0x00, "With Joker" ) /* also enable Five of a Kind */ | |
| 1508 | 1500 | PORT_DIPSETTING( 0x20, "Without Joker" ) |
| 1509 | 1501 | PORT_DIPNAME( 0x40, 0x40, "Hold" ) PORT_DIPLOCATION("SW1:2") |
| 1510 | 1502 | PORT_DIPSETTING( 0x00, "Auto Hold" ) |
| r2454 | r2455 | |
| 1518 | 1510 | PORT_DIPSETTING( 0x80, "Manual Payout SW" ) |
| 1519 | 1511 | INPUT_PORTS_END |
| 1520 | 1512 | |
| 1521 | static INPUT_PORTS_START( snookr10 ) | |
| 1522 | INPUT_PORTS_END | |
| 1523 | 1513 | |
| 1524 | ||
| 1525 | 1514 | /************************* |
| 1526 | 1515 | * Graphics Layouts * |
| 1527 | 1516 | *************************/ |
| r2454 | r2455 | |
| 1543 | 1532 | 8*4*2 |
| 1544 | 1533 | }; |
| 1545 | 1534 | |
| 1546 | static const gfx_layout sn10_charlayout = | |
| 1547 | { | |
| 1548 | 4,8, | |
| 1549 | RGN_FRAC(1,2), | |
| 1550 | 4, | |
| 1551 | { RGN_FRAC(0,2), RGN_FRAC(0,2) + 4, RGN_FRAC(1,2), RGN_FRAC(1,2) + 4 }, | |
| 1552 | { 0, 1, 2, 3 }, | |
| 1553 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, | |
| 1554 | 8*4*2 | |
| 1555 | }; | |
| 1556 | 1535 | |
| 1557 | ||
| 1558 | 1536 | /****************************** |
| 1559 | 1537 | * Graphics Decode Information * |
| 1560 | 1538 | ******************************/ |
| r2454 | r2455 | |
| 1563 | 1541 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, charlayout, 0, 16 ) |
| 1564 | 1542 | GFXDECODE_END |
| 1565 | 1543 | |
| 1566 | static GFXDECODE_START( sn10 ) | |
| 1567 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, sn10_charlayout, 0, 16 ) | |
| 1568 | GFXDECODE_END | |
| 1569 | 1544 | |
| 1570 | ||
| 1571 | 1545 | /*********************** |
| 1572 | 1546 | * PIA Interfaces * |
| 1573 | 1547 | ***********************/ |
| r2454 | r2455 | |
| 1603 | 1577 | |
| 1604 | 1578 | static const struct AY8910interface ay8910_intf = |
| 1605 | 1579 | { |
| 1606 | 0, // portA in | |
| 1607 | 0, // portB in | |
| 1608 | funworld_lamp_a_w, // portA out | |
| 1609 | funworld_lamp_b_w // portB out | |
| 1580 | AY8910_LEGACY_OUTPUT, | |
| 1581 | AY8910_DEFAULT_LOADS, | |
| 1582 | NULL, /* portA in */ | |
| 1583 | NULL, /* portB in */ | |
| 1584 | funworld_lamp_a_w, /* portA out */ | |
| 1585 | funworld_lamp_b_w /* portB out */ | |
| 1610 | 1586 | }; |
| 1611 | 1587 | |
| 1612 | 1588 | |
| r2454 | r2455 | |
| 1615 | 1591 | **************************/ |
| 1616 | 1592 | |
| 1617 | 1593 | static MACHINE_DRIVER_START( funworld ) |
| 1618 | // basic machine hardware | |
| 1619 | MDRV_CPU_ADD_TAG("main", M65SC02, MASTER_CLOCK/8) // 2MHz | |
| 1594 | /* basic machine hardware */ | |
| 1595 | MDRV_CPU_ADD_TAG("main", M65SC02, MASTER_CLOCK/8) /* 2MHz */ | |
| 1620 | 1596 | MDRV_CPU_PROGRAM_MAP(funworld_map, 0) |
| 1621 | 1597 | MDRV_CPU_VBLANK_INT("main", nmi_line_pulse) |
| 1622 | 1598 | |
| 1623 | 1599 | MDRV_NVRAM_HANDLER(generic_0fill) |
| 1624 | 1600 | |
| 1625 | ||
| 1601 | /* video hardware */ | |
| 1626 | 1602 | |
| 1627 | 1603 | MDRV_SCREEN_ADD("main", RASTER) |
| 1628 | 1604 | MDRV_SCREEN_REFRESH_RATE(60) |
| 1629 | 1605 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 1630 | 1606 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 1631 | MDRV_SCREEN_SIZE((124+1)*4, (30+1)*8) // Taken from MC6845 init, registers 00 & 04. Normally programmed with (value-1). | |
| 1632 | MDRV_SCREEN_VISIBLE_AREA(0*4, 96*4-1, 0*8, 29*8-1) // Taken from MC6845 init, registers 01 & 06. | |
| 1607 | MDRV_SCREEN_SIZE((124+1)*4, (30+1)*8) /* Taken from MC6845 init, registers 00 & 04. Normally programmed with (value-1) */ | |
| 1608 | MDRV_SCREEN_VISIBLE_AREA(0*4, 96*4-1, 0*8, 29*8-1) /* Taken from MC6845 init, registers 01 & 06 */ | |
| 1633 | 1609 | |
| 1634 | 1610 | MDRV_GFXDECODE(funworld) |
| 1635 | 1611 | |
| r2454 | r2455 | |
| 1642 | 1618 | |
| 1643 | 1619 | MDRV_DEVICE_ADD("crtc", MC6845) |
| 1644 | 1620 | |
| 1645 | ||
| 1621 | /* sound hardware */ | |
| 1646 | 1622 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 1647 | 1623 | |
| 1648 | MDRV_SOUND_ADD_TAG("ay8910", AY8910, MASTER_CLOCK/8) / | |
| 1624 | MDRV_SOUND_ADD_TAG("ay8910", AY8910, MASTER_CLOCK/8) /* 2MHz */ | |
| 1649 | 1625 | MDRV_SOUND_CONFIG(ay8910_intf) |
| 1650 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 8.0) / | |
| 1626 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 8.0) /* analyzed to avoid clips */ | |
| 1651 | 1627 | MACHINE_DRIVER_END |
| 1652 | 1628 | |
| 1653 | 1629 | static MACHINE_DRIVER_START( bigdeal ) |
| 1654 | 1630 | MDRV_IMPORT_FROM(funworld) |
| 1655 | 1631 | |
| 1656 | MDRV_SOUND_REPLACE("ay8910", AY8910, MASTER_CLOCK/8) / | |
| 1632 | MDRV_SOUND_REPLACE("ay8910", AY8910, MASTER_CLOCK/8) /* 2MHz */ | |
| 1657 | 1633 | MDRV_SOUND_CONFIG(ay8910_intf) |
| 1658 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 5.0) / | |
| 1634 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 5.0) /* analyzed to avoid clips */ | |
| 1659 | 1635 | MACHINE_DRIVER_END |
| 1660 | 1636 | |
| 1661 | 1637 | static MACHINE_DRIVER_START( magiccrd ) |
| 1662 | 1638 | MDRV_IMPORT_FROM(funworld) |
| 1663 | 1639 | |
| 1664 | MDRV_CPU_REPLACE("main", M65C02, MASTER_CLOCK/8) / | |
| 1640 | MDRV_CPU_REPLACE("main", M65C02, MASTER_CLOCK/8) /* 2MHz */ | |
| 1665 | 1641 | MDRV_CPU_PROGRAM_MAP(magiccrd_map, 0) |
| 1666 | 1642 | |
| 1667 | 1643 | MDRV_SCREEN_MODIFY("main") |
| 1668 | MDRV_SCREEN_SIZE((123+1)*4, (36+1)*8) // Taken from MC6845 init, registers 00 & 04. Normally programmed with (value-1). | |
| 1669 | // MDRV_SCREEN_VISIBLE_AREA(0*4, 112*4-1, 0*8, 34*8-1) // Taken from MC6845 init, registers 01 & 06. | |
| 1670 | MDRV_SCREEN_VISIBLE_AREA(0*4, 98*4-1, 0*8, 32*8-1) // adjusted to screen for testing purposes. | |
| 1644 | MDRV_SCREEN_SIZE((123+1)*4, (36+1)*8) /* Taken from MC6845 init, registers 00 & 04. Normally programmed with (value-1) */ | |
| 1645 | // MDRV_SCREEN_VISIBLE_AREA(0*4, 112*4-1, 0*8, 34*8-1) /* Taken from MC6845 init, registers 01 & 06 */ | |
| 1646 | MDRV_SCREEN_VISIBLE_AREA(0*4, 98*4-1, 0*8, 32*8-1) /* adjusted to screen for testing purposes */ | |
| 1671 | 1647 | |
| 1672 | 1648 | MDRV_GFXDECODE(funworld) |
| 1673 | 1649 | MDRV_VIDEO_START(magiccrd) |
| 1674 | 1650 | |
| 1675 | MDRV_SOUND_REPLACE("ay8910", AY8910, MASTER_CLOCK/8) / | |
| 1651 | MDRV_SOUND_REPLACE("ay8910", AY8910, MASTER_CLOCK/8) /* 2MHz */ | |
| 1676 | 1652 | MDRV_SOUND_CONFIG(ay8910_intf) |
| 1677 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.6) / | |
| 1653 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.6) /* analyzed to avoid clips */ | |
| 1678 | 1654 | MACHINE_DRIVER_END |
| 1679 | 1655 | |
| 1680 | 1656 | static MACHINE_DRIVER_START( royalcrd ) |
| 1681 | 1657 | MDRV_IMPORT_FROM(funworld) |
| 1682 | 1658 | |
| 1683 | MDRV_CPU_REPLACE("main", M65C02, MASTER_CLOCK/8) / | |
| 1659 | MDRV_CPU_REPLACE("main", M65C02, MASTER_CLOCK/8) /* | |
| 1684 | 1660 | MDRV_CPU_PROGRAM_MAP(magiccrd_map, 0) |
| 1685 | 1661 | MACHINE_DRIVER_END |
| 1686 | 1662 | |
| 1687 | 1663 | static MACHINE_DRIVER_START( cuoreuno ) |
| 1688 | 1664 | MDRV_IMPORT_FROM(funworld) |
| 1689 | 1665 | |
| 1690 | MDRV_CPU_REPLACE("main", M65C02, MASTER_CLOCK/8) / | |
| 1666 | MDRV_CPU_REPLACE("main", M65C02, MASTER_CLOCK/8) /* | |
| 1691 | 1667 | MDRV_CPU_PROGRAM_MAP(cuoreuno_map, 0) |
| 1692 | 1668 | MACHINE_DRIVER_END |
| 1693 | 1669 | |
| 1694 | 1670 | static MACHINE_DRIVER_START( royalmcu ) |
| 1695 | 1671 | MDRV_IMPORT_FROM(funworld) |
| 1696 | 1672 | |
| 1697 | MDRV_CPU_REPLACE("main", M65SC02, MASTER_CLOCK/8) / | |
| 1673 | MDRV_CPU_REPLACE("main", M65SC02, MASTER_CLOCK/8) /* | |
| 1698 | 1674 | MDRV_CPU_PROGRAM_MAP(royalmcu_map, 0) |
| 1699 | 1675 | MACHINE_DRIVER_END |
| 1700 | 1676 | |
| 1701 | static MACHINE_DRIVER_START( snookr10 ) | |
| 1702 | MDRV_CPU_ADD_TAG("main", M65SC02, MASTER_CLOCK/8) // 2MHz | |
| 1703 | MDRV_CPU_PROGRAM_MAP(snookr10_map, 0) | |
| 1704 | MDRV_CPU_VBLANK_INT("main", nmi_line_pulse) | |
| 1705 | 1677 | |
| 1706 | // video hardware | |
| 1707 | ||
| 1708 | MDRV_SCREEN_ADD("main", RASTER) | |
| 1709 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 1710 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) | |
| 1711 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 1712 | MDRV_SCREEN_SIZE((128+1)*4, (30+1)*8) | |
| 1713 | MDRV_SCREEN_VISIBLE_AREA(0*4, 96*4-1, 0*8, 30*8-1) | |
| 1714 | // MDRV_SCREEN_SIZE((124+1)*4, (30+1)*8) | |
| 1715 | // MDRV_SCREEN_VISIBLE_AREA(0*4, 96*4-1, 0*8, 29*8-1) | |
| 1716 | ||
| 1717 | // MDRV_DEVICE_ADD("crtc", MC6845) | |
| 1718 | ||
| 1719 | MDRV_GFXDECODE(sn10) | |
| 1720 | ||
| 1721 | // MDRV_DEFAULT_LAYOUT(layout_funworld) | |
| 1722 | ||
| 1723 | MDRV_PALETTE_LENGTH(0x200) | |
| 1724 | MDRV_PALETTE_INIT(funworld) | |
| 1725 | MDRV_VIDEO_START(snookr10) | |
| 1726 | MDRV_VIDEO_UPDATE(funworld) | |
| 1727 | MACHINE_DRIVER_END | |
| 1728 | ||
| 1729 | 1678 | /************************* |
| 1730 | 1679 | * Rom Load * |
| 1731 | 1680 | *************************/ |
| r2454 | r2455 | |
| 1742 | 1691 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) |
| 1743 | 1692 | ROM_END |
| 1744 | 1693 | |
| 1745 | ROM_START( jolycdae ) / | |
| 1694 | ROM_START( jolycdae ) /* encrypted roms...*/ | |
| 1746 | 1695 | ROM_REGION( 0x18000, REGION_CPU1, 0 ) |
| 1747 | 1696 | ROM_LOAD( "pokeru0.bin", 0x8000, 0x10000, CRC(7732f177) SHA1(b75fca596a7315d1379fa5bcf07c449ec32c90f5) ) |
| 1748 | 1697 | |
| 1749 | 1698 | ROM_REGION( 0x20000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 1750 | 1699 | ROM_LOAD( "pokeru1.bin", 0x00000, 0x10000, CRC(878d695b) SHA1(0e1ea455e991e591316a340c56b23fa26764988d) ) |
| 1751 | 1700 | ROM_LOAD( "pokeru2.bin", 0x10000, 0x10000, CRC(b7b2946a) SHA1(25b15296b32bf88db6d60991105bba667f7940cc) ) |
| 1752 | ROM_COPY( REGION_GFX1, 0x10000, 0x00000, 0x8000 ) / | |
| 1701 | ROM_COPY( REGION_GFX1, 0x10000, 0x00000, 0x8000 ) /* rgn, srcoffset, offset, length */ | |
| 1753 | 1702 | |
| 1754 | 1703 | ROM_REGION( 0x0200, REGION_PROMS, 0 ) |
| 1755 | 1704 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) |
| r2454 | r2455 | |
| 1818 | 1767 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) |
| 1819 | 1768 | ROM_END |
| 1820 | 1769 | |
| 1821 | ROM_START( jolycdit ) / | |
| 1770 | ROM_START( jolycdit ) /* encrypted graphics */ | |
| 1822 | 1771 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 1823 | 1772 | ROM_LOAD( "jn.bin", 0x8000, 0x8000, CRC(6ae00ed0) SHA1(5921c2882aeb5eadd0e04a477fa505ad35e9d98c) ) |
| 1824 | 1773 | |
| r2454 | r2455 | |
| 1849 | 1798 | ROM_END |
| 1850 | 1799 | |
| 1851 | 1800 | ROM_START( jolycdab ) |
| 1852 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) / | |
| 1801 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) /* program is testing/writting RAM in offset $8800-$BFFF (ROM)...?? */ | |
| 1853 | 1802 | ROM_LOAD( "ig1poker.run", 0x8000, 0x8000, CRC(c96e6542) SHA1(ed6c0cf9fe8597dba9149b2225320d8d9c39219a) ) |
| 1854 | 1803 | // ROM_RELOAD( 0x4000, 0x4000 ) |
| 1855 | 1804 | |
| r2454 | r2455 | |
| 1869 | 1818 | ROM_LOAD( "poker4.003", 0x0000, 0x8000, CRC(8c33a15f) SHA1(a1c8451c99a23eeffaedb21d1a1b69f54629f8ab) ) |
| 1870 | 1819 | ROM_LOAD( "poker4.002", 0x8000, 0x8000, CRC(5f4e12d8) SHA1(014b2364879faaf4922cdb82ee07692389f20c2d) ) |
| 1871 | 1820 | |
| 1872 | ROM_REGION( 0x0200, REGION_PROMS, 0 ) | |
| 1873 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) // jollycrd palette till a dump appear. | |
| 1821 | ROM_REGION( 0x0200, REGION_PROMS, 0 ) /* using jollycrd palette till a correct dump appear */ | |
| 1822 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) | |
| 1874 | 1823 | ROM_END |
| 1875 | 1824 | |
| 1876 | 1825 | ROM_START( bigdealb ) |
| r2454 | r2455 | |
| 1881 | 1830 | ROM_LOAD( "poker4.003", 0x0000, 0x8000, CRC(8c33a15f) SHA1(a1c8451c99a23eeffaedb21d1a1b69f54629f8ab) ) |
| 1882 | 1831 | ROM_LOAD( "poker4.002", 0x8000, 0x8000, CRC(5f4e12d8) SHA1(014b2364879faaf4922cdb82ee07692389f20c2d) ) |
| 1883 | 1832 | |
| 1884 | ROM_REGION( 0x0200, REGION_PROMS, 0 ) | |
| 1885 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) // jollycrd palette till a dump appear. | |
| 1833 | ROM_REGION( 0x0200, REGION_PROMS, 0 ) /* using jollycrd palette till a correct dump appear */ | |
| 1834 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) | |
| 1886 | 1835 | ROM_END |
| 1887 | 1836 | |
| 1888 | ROM_START( jolycdat ) / | |
| 1837 | ROM_START( jolycdat ) /* there are unused pieces of code that compare or jumps within $4000-$5000 range */ | |
| 1889 | 1838 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 1890 | 1839 | ROM_LOAD( "bonucard.cpu", 0x8000, 0x4000, CRC(da342100) SHA1(451fa6074aad19e9efd148c3d18115a20a3d344a) ) |
| 1891 | 1840 | ROM_CONTINUE( 0xc000, 0x4000 ) |
| r2454 | r2455 | |
| 1894 | 1843 | ROM_LOAD( "jolycard.ch2", 0x0000, 0x8000, CRC(c512b103) SHA1(1f4e78e97855afaf0332fb75e1b5571aafd01c29) ) |
| 1895 | 1844 | ROM_LOAD( "jolycard.ch1", 0x8000, 0x8000, CRC(0f24f39d) SHA1(ac1f6a8a4a2a37cbc0d45c15187b33c25371bffb) ) |
| 1896 | 1845 | |
| 1897 | ROM_REGION( 0x0200, REGION_PROMS, 0 ) | |
| 1898 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) // jollycrd palette till a dump appear. | |
| 1846 | ROM_REGION( 0x0200, REGION_PROMS, 0 ) /* using jollycrd palette till a correct dump appear */ | |
| 1847 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(5ebc5659) SHA1(8d59011a181399682ab6e8ed14f83101e9bfa0c6) ) | |
| 1899 | 1848 | ROM_END |
| 1900 | 1849 | |
| 1901 | 1850 | ROM_START( cuoreuno ) |
| r2454 | r2455 | |
| 1922 | 1871 | ROM_REGION( 0x20000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 1923 | 1872 | ROM_LOAD( "eleph_c.u22", 0x00000, 0x10000, CRC(4b909bf3) SHA1(a822b12126bc58af6d3f999ab2117370015a039b) ) |
| 1924 | 1873 | ROM_LOAD( "eleph_b.u21", 0x10000, 0x10000, CRC(e3612670) SHA1(beb65f7d2bd6d7bc68cfd876af51910cf6417bd0) ) |
| 1925 | ROM_COPY( REGION_GFX1, 0x10000, 0x00000, 0x8000 ) / | |
| 1874 | ROM_COPY( REGION_GFX1, 0x10000, 0x00000, 0x8000 ) /* rgn, srcoffset, offset, length */ | |
| 1926 | 1875 | |
| 1927 | 1876 | ROM_REGION( 0x0200, REGION_PROMS, 0 ) |
| 1928 | 1877 | ROM_LOAD( "am27s29_ef.u25", 0x0000, 0x0200, CRC(bca8b82a) SHA1(4aa19f5ecd9953bf8792dceb075a746f77c01cfc) ) |
| r2454 | r2455 | |
| 1975 | 1924 | ROM_REGION( 0x20000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 1976 | 1925 | ROM_LOAD( "u20.bin", 0x00000, 0x10000, CRC(3bdf1106) SHA1(fa21cbd49bb27ea4a784cf4e4b3fbd52650a285b) ) |
| 1977 | 1926 | ROM_LOAD( "u21.bin", 0x10000, 0x10000, CRC(581c4878) SHA1(5ae61af090feea1745e22f46b33b2c01e6013fbe) ) |
| 1978 | ROM_COPY( REGION_GFX1, 0x10000, 0x00000, 0x8000 ) / | |
| 1927 | ROM_COPY( REGION_GFX1, 0x10000, 0x00000, 0x8000 ) /* rgn, srcoffset, offset, length */ | |
| 1979 | 1928 | |
| 1980 | 1929 | ROM_REGION( 0x0200, REGION_PROMS, 0 ) |
| 1981 | 1930 | ROM_LOAD( "n82s147an_p10.u25", 0x0000, 0x0200, CRC(1de03d14) SHA1(d8eda20865c1d885a428931f4380032e103b252c) ) |
| r2454 | r2455 | |
| 2037 | 1986 | ROM_LOAD( "2-peel18cv8.bin", 0x0400, 0x0155, CRC(8fdafd55) SHA1(fbb187ba682111648ea1586f400990cb81a3077a) ) |
| 2038 | 1987 | ROM_END |
| 2039 | 1988 | |
| 2040 | ROM_START( royalcdb ) // both halves have different program. we're using the 2nd one. | |
| 2041 | ROM_REGION( 0x20000, REGION_CPU1, 0 ) // 1st half prg is testing RAM in offset $8600-$BF00...?? | |
| 1989 | ROM_START( royalcdb ) /* both halves have different programs. we're using the 2nd one */ | |
| 1990 | ROM_REGION( 0x20000, REGION_CPU1, 0 ) /* 1st half prg is testing RAM in offset $8600-$BF00...?? */ | |
| 2042 | 1991 | ROM_LOAD( "rc.bin", 0x10000, 0x10000, CRC(8a9a6dd6) SHA1(04c3f9f17d5404ac1414c51ef8f930df54530e72) ) |
| 2043 | 1992 | ROM_COPY( REGION_CPU1, 0x18000, 0x8000, 0x8000 ) |
| 2044 | 1993 | |
| 2045 | 1994 | ROM_REGION( 0x20000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 2046 | 1995 | ROM_LOAD( "1a.bin", 0x0000, 0x10000, CRC(8a66f22c) SHA1(67d6e8f8f5a0fd979dc498ba2cc67cf707ccdf95) ) |
| 2047 | 1996 | ROM_LOAD( "2a.bin", 0x10000, 0x10000, CRC(3af71cf8) SHA1(3a0ce0d0abebf386573c5936545dada1d3558e55) ) |
| 2048 | ROM_COPY( REGION_GFX1, 0x10000, 0x00000, 0x8000 ) | |
| 1997 | ROM_COPY( REGION_GFX1, 0x10000, 0x00000, 0x8000 ) /* rgn, srcoffset, offset, length */ | |
| 2049 | 1998 | |
| 2050 | 1999 | ROM_REGION( 0x0200, REGION_PROMS, 0 ) |
| 2051 | 2000 | ROM_LOAD( "n82s147.bin", 0x0000, 0x0200, CRC(8bc86f48) SHA1(4c677ab9314a1f571e35104b22659e6811aeb194) ) |
| r2454 | r2455 | |
| 2054 | 2003 | ROM_LOAD( "palce16v8h-4.bin", 0x0000, 0x0117, NO_DUMP ) /* PAL is read protected */ |
| 2055 | 2004 | ROM_END |
| 2056 | 2005 | |
| 2057 | ROM_START( royalcdc ) / | |
| 2006 | ROM_START( royalcdc ) /* encrypted program rom */ | |
| 2058 | 2007 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 2059 | 2008 | ROM_LOAD( "rc_1.bin", 0x8000, 0x8000, CRC(8cdcc978) SHA1(489b58760a7c8646399c8cdfb86ec4341823e7dd) ) |
| 2060 | 2009 | |
| r2454 | r2455 | |
| 2066 | 2015 | ROM_LOAD( "82s147.bin", 0x0000, 0x0200, CRC(44dbf086) SHA1(43a2d615c00605db75a4fd4d57d9e056c0356f10) ) |
| 2067 | 2016 | |
| 2068 | 2017 | ROM_REGION( 0x0600, REGION_PLDS, 0 ) |
| 2069 | ROM_LOAD( "palce16v8.bin", 0x0000, 0x0117, NO_DUMP ) // not present in the set. | |
| 2070 | ROM_LOAD( "1-peel18cv8p.bin", 0x0200, 0x0155, NO_DUMP ) // not present in the set. | |
| 2071 | ROM_LOAD( "2-peel18cv8p.bin", 0x0400, 0x0155, NO_DUMP ) // not present in the set. | |
| 2018 | ROM_LOAD( "palce16v8.bin", 0x0000, 0x0117, NO_DUMP ) /* not present in the set */ | |
| 2019 | ROM_LOAD( "1-peel18cv8p.bin", 0x0200, 0x0155, NO_DUMP ) /* not present in the set */ | |
| 2020 | ROM_LOAD( "2-peel18cv8p.bin", 0x0400, 0x0155, NO_DUMP ) /* not present in the set */ | |
| 2072 | 2021 | ROM_END |
| 2073 | 2022 | |
| 2074 | 2023 | ROM_START( lluck3x3 ) |
| r2454 | r2455 | |
| 2097 | 2046 | |
| 2098 | 2047 | ROM_START( magiccrd ) /* Impera */ |
| 2099 | 2048 | ROM_REGION( 0x18000, REGION_CPU1, 0 ) |
| 2100 | ROM_LOAD( "magicard.004", 0x0000, 0x8000, CRC(f6e948b8) SHA1(7d5983015a508ab135ccbf69b7f3c526c229e3ef) ) // only last 16kbyte visible? | |
| 2101 | ROM_LOAD( "magicard.01", 0x8000, 0x10000, CRC(c94767d4) SHA1(171ac946bdf2575f9e4a31e534a8e641597af519) ) // 1ST AND 2ND HALF IDENTICAL | |
| 2049 | ROM_LOAD( "magicard.004", 0x0000, 0x8000, CRC(f6e948b8) SHA1(7d5983015a508ab135ccbf69b7f3c526c229e3ef) ) /* only last 16kbyte visible? */ | |
| 2050 | ROM_LOAD( "magicard.01", 0x8000, 0x10000, CRC(c94767d4) SHA1(171ac946bdf2575f9e4a31e534a8e641597af519) ) /* 1st and 2nd half identical */ | |
| 2102 | 2051 | |
| 2103 | 2052 | ROM_REGION( 0x10000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 2104 | 2053 | ROM_LOAD( "mc2gr2.bin", 0x0000, 0x8000, CRC(733da697) SHA1(45122c64d5a371ec91cecc67b7faf179078e714d) ) |
| r2454 | r2455 | |
| 2209 | 2158 | Seems to be a Big Deal clone. |
| 2210 | 2159 | */ |
| 2211 | 2160 | ROM_REGION( 0x18000, REGION_CPU1, 0 ) |
| 2212 | ROM_LOAD( "ic41.bin", 0x8000, 0x8000, CRC(d36188b3) SHA1(3fb848fabbbde9fbb70875b3dfef62bfb3a8cbcb) ) // only last 16kbyte visible? | |
| 2213 | ROM_LOAD( "ic37.bin", 0x10000, 0x8000, CRC(8e0d70c4) SHA1(018f92631acbe98e5826a41698f0e07b4b46cd71) ) // 1ST AND 2ND HALF IDENTICAL | |
| 2214 | ROM_COPY( REGION_CPU1, 0x10000, 0xc000, 0x4000 ) // rgn,srcoffset,offset,length. | |
| 2161 | ROM_LOAD( "ic41.bin", 0x8000, 0x8000, CRC(d36188b3) SHA1(3fb848fabbbde9fbb70875b3dfef62bfb3a8cbcb) ) /* only last 16kbyte visible? */ | |
| 2162 | ROM_LOAD( "ic37.bin", 0x10000, 0x8000, CRC(8e0d70c4) SHA1(018f92631acbe98e5826a41698f0e07b4b46cd71) ) /* 1st and 2nd half identical */ | |
| 2163 | ROM_COPY( REGION_CPU1, 0x10000, 0xc000, 0x4000 ) /* rgn, srcoffset, offset, length */ | |
| 2215 | 2164 | |
| 2216 | 2165 | ROM_REGION( 0x10000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 2217 | 2166 | ROM_LOAD( "ic10.bin", 0x0000, 0x8000, CRC(2bbd27ad) SHA1(37d37899398d95beac5f3cbffc4277c97aca1a23) ) |
| 2218 | ROM_LOAD( "ic11.bin", 0x8000, 0x8000, CRC(21d05a57) SHA1(156c18ec31b08e4c4af6f73b49cb5d5c68d1670f) ) / | |
| 2167 | ROM_LOAD( "ic11.bin", 0x8000, 0x8000, CRC(21d05a57) SHA1(156c18ec31b08e4c4af6f73b49cb5d5c68d1670f) ) /* bad dump?, or sprite plane */ | |
| 2219 | 2168 | |
| 2220 | 2169 | ROM_REGION( 0x0200, REGION_PROMS, 0 ) |
| 2221 | 2170 | ROM_LOAD( "ic13.bin", 0x0000, 0x0200, CRC(e59fc06e) SHA1(88a3bb89f020fe2b20f768ca010a082e0b974831) ) |
| r2454 | r2455 | |
| 2232 | 2181 | ROM_REGION( 0x20000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 2233 | 2182 | ROM_LOAD( "mong.rc.b2.u3", 0x00000, 0x10000, CRC(5e019b73) SHA1(63a544dccb9589e5a6b938e604c09d4d8fc060fc) ) |
| 2234 | 2183 | ROM_LOAD( "mong.rc.c1.u2", 0x10000, 0x10000, CRC(e3fc24c4) SHA1(ea4e67ace63b55a76365f7e11a67c7d420a52dd7) ) |
| 2235 | ROM_COPY( REGION_GFX1, 0x10000, 0x8000, 0x8000 ) / | |
| 2184 | ROM_COPY( REGION_GFX1, 0x10000, 0x8000, 0x8000 ) /* rgn, srcoffset, offset, length */ | |
| 2236 | 2185 | |
| 2237 | 2186 | ROM_REGION( 0x0200, REGION_PROMS, 0 ) |
| 2238 | 2187 | ROM_LOAD( "am27s29pc_mf.u24", 0x0000, 0x0200, CRC(da9181af) SHA1(1b30d992f3b2a4b3bd81e3f99632311988e2e8d1) ) |
| r2454 | r2455 | |
| 2252 | 2201 | ROM_REGION( 0x20000, REGION_GFX1, ROMREGION_DISPOSE ) |
| 2253 | 2202 | ROM_LOAD( "soccer2.u3", 0x00000, 0x10000, CRC(db09b5bb) SHA1(a12bf2938f5482ea5ebc0db6fd6594e1beb97017) ) |
| 2254 | 2203 | ROM_LOAD( "soccer1.u2", 0x10000, 0x10000, CRC(564cc467) SHA1(8f90c4bacd97484623666b25dae77e628908e243) ) |
| 2255 | ROM_COPY( REGION_GFX1, 0x10000, 0x8000, 0x8000 ) / | |
| 2204 | ROM_COPY( REGION_GFX1, 0x10000, 0x8000, 0x8000 ) /* rgn, srcoffset, offset, length */ | |
| 2256 | 2205 | |
| 2257 | 2206 | ROM_REGION( 0x0200, REGION_PROMS, 0 ) |
| 2258 | 2207 | ROM_LOAD( "am27s29pc_sn.u24", 0x0000, 0x0200, CRC(d02894fc) SHA1(adcdc912cc0b7a7f67b122fa94fca921c957b282) ) |
| r2454 | r2455 | |
| 2261 | 2210 | ROM_LOAD( "palce16v8h_sn.u5", 0x0000, 0x0117, NO_DUMP ) /* PAL is read protected */ |
| 2262 | 2211 | ROM_END |
| 2263 | 2212 | |
| 2264 | ROM_START( snookr10 ) | |
| 2265 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 2266 | ROM_LOAD( "1.u2", 0x8000, 0x8000, CRC(216ccb2d) SHA1(d86270cd03a08f6fd3e7b327b8173f66da28e5e8) ) | |
| 2267 | ||
| 2268 | /* the first 256 bytes looks as a color palette. | |
| 2269 | unknown code starting at 0x0400 */ | |
| 2270 | ROM_REGION( 0x40000, REGION_CPU2, 0 ) | |
| 2271 | ROM_LOAD( "4.u18", 0x00000, 0x40000 , CRC(17090d56) SHA1(3a4c247f96c80f8cf4c1389b273880c5ea6fc39d) ) | |
| 2272 | ||
| 2273 | ROM_REGION( 0x10000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 2274 | ROM_LOAD( "2.u22", 0x0000, 0x8000, CRC(a70d9c48) SHA1(3fa90190323526553866662afda4dbe1c94abeff) ) | |
| 2275 | ROM_LOAD( "3.u25", 0x8000, 0x8000, CRC(3009faaa) SHA1(d1cda455b270cb9afa65b9701735a3a1f2a48df2) ) | |
| 2276 | ||
| 2277 | /* This should be changed because the palette is stored in a normal ROM instead of a color PROM */ | |
| 2278 | ROM_REGION( 0x8000, REGION_PROMS, 0 ) | |
| 2279 | ROM_LOAD( "5.u27", 0x0000, 0x8000, CRC(f3d7d640) SHA1(f78060f4603e316fa3c2ec4ba6d7edf261cf6d8a) ) | |
| 2280 | ROM_END | |
| 2281 | ||
| 2282 | 2213 | ROM_START( saloon ) |
| 2283 | 2214 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 2284 | 2215 | ROM_LOAD( "1s.bin", 0x8000, 0x8000, CRC(66938330) SHA1(09118d607eff7121472db7d2cc24079e063dc7cf) ) |
| r2454 | r2455 | |
| 2333 | 2264 | |
| 2334 | 2265 | for (x=0x0000;x<0x10000;x++) |
| 2335 | 2266 | { |
| 2336 | na = src[x] & 0xf0; // nibble a | |
| 2337 | nb = src[x] & 0x0f; // nibble b | |
| 2267 | na = src[x] & 0xf0; /* nibble a */ | |
| 2268 | nb = src[x] & 0x0f; /* nibble b */ | |
| 2338 | 2269 | |
| 2339 | 2270 | switch (na) |
| 2340 | 2271 | { |
| r2454 | r2455 | |
| 2374 | 2305 | default: nbd = nb; break; |
| 2375 | 2306 | } |
| 2376 | 2307 | |
| 2377 | src[x] = nad + nbd; / | |
| 2308 | src[x] = nad + nbd; /* decrypted value */ | |
| 2378 | 2309 | } |
| 2379 | 2310 | |
| 2380 | 2311 | /* Initializing PIAs... */ |
| r2454 | r2455 | |
| 2384 | 2315 | |
| 2385 | 2316 | static DRIVER_INIT( jolycdae ) |
| 2386 | 2317 | { |
| 2387 | /* | |
| 2318 | /* Decrypting roms... */ | |
| 2388 | 2319 | |
| 2389 | 2320 | int x; |
| 2390 | 2321 | UINT8 *srcp = memory_region( REGION_CPU1 ); |
| r2454 | r2455 | |
| 2392 | 2323 | |
| 2393 | 2324 | for (x=0x8000;x<0x18000;x++) |
| 2394 | 2325 | { |
| 2395 | srcp[x] = srcp[x] ^ 0x56; / | |
| 2326 | srcp[x] = srcp[x] ^ 0x56; /* simple XOR with 0x56 */ | |
| 2396 | 2327 | } |
| 2397 | 2328 | |
| 2398 | 2329 | for (x=0x0000;x<0x20000;x++) |
| 2399 | 2330 | { |
| 2400 | srcg[x] = srcg[x] ^ 0x56; / | |
| 2331 | srcg[x] = srcg[x] ^ 0x56; /* simple XOR with 0x56 */ | |
| 2401 | 2332 | } |
| 2402 | 2333 | |
| 2403 | 2334 | /* Initializing PIAs... */ |
| r2454 | r2455 | |
| 2420 | 2351 | |
| 2421 | 2352 | *************************************************************************************************/ |
| 2422 | 2353 | |
| 2354 | // UINT8 *ROM = memory_region(REGION_CPU1); | |
| 2355 | ||
| 2356 | // ROM[0xc1fc] = 0x4c; | |
| 2357 | // ROM[0xc1fd] = 0x1c; | |
| 2358 | // ROM[0xc1fe] = 0x80; | |
| 2359 | ||
| 2360 | /* Initializing PIAs... */ | |
| 2361 | pia_config(0, &pia0_intf); | |
| 2362 | pia_config(1, &pia1_intf); | |
| 2363 | } | |
| 2364 | ||
| 2365 | static DRIVER_INIT( magiccda ) | |
| 2366 | /***************************************************************** | |
| 2367 | ||
| 2368 | For a serie of Mexican Rockwell's 65c02 | |
| 2369 | seems that opcode 0x91 is STA ($zp) instead of STA ($zp),y | |
| 2370 | ...or is patched with the correct opcode (0x92) by PLDs... | |
| 2371 | ||
| 2372 | In offset $C1C4, the code is trying to initialize both PIAs | |
| 2373 | putting value 0x34 in $0800-$0803 & $0A00-$0A03. | |
| 2374 | ||
| 2375 | The code use STA ($zp),y (opcode 0x91). As soon as register 'y' | |
| 2376 | increments, almost all writes goes out of range. | |
| 2377 | ||
| 2378 | ******************************************************************/ | |
| 2379 | { | |
| 2423 | 2380 | UINT8 *ROM = memory_region(REGION_CPU1); |
| 2424 | 2381 | |
| 2425 | ROM[0xc1fc] = 0x4c; | |
| 2426 | ROM[0xc1fd] = 0x1c; | |
| 2427 | ROM[0xc1fe] = 0x80; | |
| 2382 | ROM[0xc1c6] = 0x92; | |
| 2428 | 2383 | |
| 2429 | 2384 | /* Initializing PIAs... */ |
| 2430 | 2385 | pia_config(0, &pia0_intf); |
| 2431 | 2386 | pia_config(1, &pia1_intf); |
| 2432 | 2387 | } |
| 2433 | 2388 | |
| 2389 | static DRIVER_INIT( magiccdb ) | |
| 2390 | /*** same as blue TAB pcb, with the magiccda patch ***/ | |
| 2391 | { | |
| 2392 | int x, na, nb, nad, nbd; | |
| 2393 | UINT8 *src = memory_region( REGION_GFX1 ); | |
| 2394 | UINT8 *ROM = memory_region( REGION_CPU1 ); | |
| 2395 | ||
| 2396 | for (x=0x0000;x<0x10000;x++) | |
| 2397 | { | |
| 2398 | na = src[x] & 0xf0; /* nibble a */ | |
| 2399 | nb = src[x] & 0x0f; /* nibble b */ | |
| 2400 | ||
| 2401 | switch (na) | |
| 2402 | { | |
| 2403 | case 0x10: nad = 0x30; break; | |
| 2404 | case 0x20: nad = 0x60; break; | |
| 2405 | case 0x30: nad = 0x50; break; | |
| 2406 | case 0x40: nad = 0xc0; break; | |
| 2407 | case 0x50: nad = 0xf0; break; | |
| 2408 | case 0x60: nad = 0xa0; break; | |
| 2409 | case 0x70: nad = 0x90; break; | |
| 2410 | case 0x90: nad = 0xb0; break; | |
| 2411 | case 0xa0: nad = 0xe0; break; | |
| 2412 | case 0xb0: nad = 0xd0; break; | |
| 2413 | case 0xc0: nad = 0x40; break; | |
| 2414 | case 0xd0: nad = 0x70; break; | |
| 2415 | case 0xe0: nad = 0x20; break; | |
| 2416 | case 0xf0: nad = 0x10; break; | |
| 2417 | default: nad = na; break; | |
| 2418 | } | |
| 2419 | ||
| 2420 | switch (nb) | |
| 2421 | { | |
| 2422 | case 0x01: nbd = 0x03; break; | |
| 2423 | case 0x02: nbd = 0x06; break; | |
| 2424 | case 0x03: nbd = 0x05; break; | |
| 2425 | case 0x04: nbd = 0x0c; break; | |
| 2426 | case 0x05: nbd = 0x0f; break; | |
| 2427 | case 0x06: nbd = 0x0a; break; | |
| 2428 | case 0x07: nbd = 0x09; break; | |
| 2429 | case 0x09: nbd = 0x0b; break; | |
| 2430 | case 0x0a: nbd = 0x0e; break; | |
| 2431 | case 0x0b: nbd = 0x0d; break; | |
| 2432 | case 0x0c: nbd = 0x04; break; | |
| 2433 | case 0x0d: nbd = 0x07; break; | |
| 2434 | case 0x0e: nbd = 0x02; break; | |
| 2435 | case 0x0f: nbd = 0x01; break; | |
| 2436 | default: nbd = nb; break; | |
| 2437 | } | |
| 2438 | ||
| 2439 | src[x] = nad + nbd; /* decrypted value */ | |
| 2440 | } | |
| 2441 | ||
| 2442 | ROM[0xc1c6] = 0x92; | |
| 2443 | ||
| 2444 | /* Initializing PIAs... */ | |
| 2445 | pia_config(0, &pia0_intf); | |
| 2446 | pia_config(1, &pia1_intf); | |
| 2447 | } | |
| 2448 | ||
| 2434 | 2449 | static DRIVER_INIT( soccernw ) |
| 2435 | 2450 | { |
| 2436 | 2451 | /* temporary patch to avoid hardware errors for debug purposes */ |
| r2454 | r2455 | |
| 2483 | 2498 | GAME( 1991, lluck3x3, royalcrd, cuoreuno, royalcrd, funworld, ROT0, "TAB-Austria", "Lucky Lady (3x3 deal)", 0 ) |
| 2484 | 2499 | GAME( 1991, lluck4x1, royalcrd, royalcrd, royalcrd, funworld, ROT0, "TAB-Austria", "Lucky Lady (4x1 aces)", 0 ) |
| 2485 | 2500 | GAME( 1996, magiccrd, 0, magiccrd, magiccrd, funworld, ROT0, "Impera", "Magic Card II (bulgarian)", GAME_IMPERFECT_SOUND ) |
| 2486 | GAME( 1996, magiccda, magiccrd, magiccrd, magiccrd, funworld, ROT0, "Impera", "Magic Card II (green TAB or Impera board)", GAME_NOT_WORKING ) | |
| 2487 | GAME( 1996, magiccdb, magiccrd, magiccrd, magiccrd, tabblue, ROT0, "Impera", "Magic Card II (blue TAB board, encrypted)", GAME_NOT_WORKING ) | |
| 2501 | GAME( 1996, magiccda, magiccrd, magiccrd, magiccrd, magiccda, ROT0, "Impera", "Magic Card II (green TAB or Impera board)", GAME_NOT_WORKING ) | |
| 2502 | GAME( 1996, magiccdb, magiccrd, magiccrd, magiccrd, magiccdb, ROT0, "Impera", "Magic Card II (blue TAB board, encrypted)", GAME_NOT_WORKING ) | |
| 2488 | 2503 | GAME( 1993, vegasslw, 0, funworld, funworld, funworld, ROT0, "Funworld", "Royal Vegas Joker Card (slow deal)", 0 ) |
| 2489 | 2504 | GAME( 1993, vegasfst, vegasslw, funworld, funworld, funworld, ROT0, "Soft Design", "Royal Vegas Joker Card (fast deal)", 0 ) |
| 2490 | 2505 | GAME( 1993, vegasfte, vegasslw, funworld, funworld, funworld, ROT0, "Soft Design", "Royal Vegas Joker Card (fast deal, english gfx)", 0 ) |
| r2454 | r2455 | |
| 2493 | 2508 | GAME( 1993, jokercrd, 0, funworld, funworld, funworld, ROT0, "Vesely Svet", "Joker Card (Ver.A267BC, encrypted)", GAME_WRONG_COLORS | GAME_NOT_WORKING ) |
| 2494 | 2509 | GAME( 199?, mongolnw, 0, royalmcu, royalcrd, funworld, ROT0, "bootleg", "Mongolfier New (italian)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) |
| 2495 | 2510 | GAME( 199?, soccernw, 0, royalcrd, royalcrd, soccernw, ROT0, "bootleg", "Soccer New (italian)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) |
| 2496 | GAME( 1998, snookr10, 0, snookr10, snookr10, 0, ROT0, "Sandii'", "Snooker 10 (Ver 1.11)", GAME_NO_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) | |
| 2497 | 2511 | GAME( 198?, saloon, 0, funworld, funworld, funworld, ROT0, "Unknown", "Saloon (french, encrypted)", GAME_NO_SOUND | GAME_WRONG_COLORS | GAME_IMPERFECT_GRAPHICS | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) |
| r2454 | r2455 | |
|---|---|---|
| 129 | 129 | |
| 130 | 130 | //logerror("%06x eeprom_r\n",activecpu_get_pc()); |
| 131 | 131 | /* bit 6 is EEPROM data */ |
| 132 | res = (EEPROM_read_bit() << 6) | input_port_ | |
| 132 | res = (EEPROM_read_bit() << 6) | input_port_ | |
| 133 | 133 | |
| 134 | 134 | return res; |
| 135 | 135 | } |
| r2454 | r2455 | |
| 175 | 175 | if (ACCESSING_BITS_0_7) |
| 176 | 176 | { |
| 177 | 177 | /* bit 0 probably enables the second 68000 */ |
| 178 | cpunum_set_input_line( | |
| 178 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE); | |
| 179 | 179 | |
| 180 | 180 | /* bit 1 is clear during service mode - function unknown */ |
| 181 | 181 | |
| r2454 | r2455 | |
| 237 | 237 | |
| 238 | 238 | static WRITE16_HANDLER( overdriv_soundirq_w ) |
| 239 | 239 | { |
| 240 | cpunum_set_input_line( | |
| 240 | cpunum_set_input_line(machine, 2,M6809_IRQ_LINE,HOLD_LINE); | |
| 241 | 241 | } |
| 242 | 242 | |
| 243 | 243 | static WRITE16_HANDLER( overdriv_cpuB_irq5_w ) |
| 244 | 244 | { |
| 245 | cpunum_set_input_line( | |
| 245 | cpunum_set_input_line(machine, 1,5,HOLD_LINE); | |
| 246 | 246 | } |
| 247 | 247 | |
| 248 | 248 | static WRITE16_HANDLER( overdriv_cpuB_irq6_w ) |
| 249 | 249 | { |
| 250 | cpunum_set_input_line( | |
| 250 | cpunum_set_input_line(machine, 1,6,HOLD_LINE); | |
| 251 | 251 | } |
| 252 | 252 | |
| 253 | 253 |
| r2454 | r2455 | |
|---|---|---|
| 9 | 9 | ***************************************************************************/ |
| 10 | 10 | |
| 11 | 11 | #include "driver.h" |
| 12 | #include "deprecat.h" | |
| 13 | 12 | #include "cpu/konami/konami.h" /* for the callback and the firq irq definition */ |
| 14 | 13 | #include "video/konamiic.h" |
| 15 | 14 | #include "sound/2151intf.h" |
| r2454 | r2455 | |
| 355 | 354 | |
| 356 | 355 | static WRITE8_HANDLER( thunderx_sh_irqtrigger_w ) |
| 357 | 356 | { |
| 358 | cpunum_set_input_line_and_vector( | |
| 357 | cpunum_set_input_line_and_vector(machine, 1,0,HOLD_LINE,0xff); | |
| 359 | 358 | } |
| 360 | 359 | |
| 361 | 360 | static WRITE8_HANDLER( scontra_snd_bankswitch_w ) |
| r2454 | r2455 | |
|---|---|---|
| 75 | 75 | |
| 76 | 76 | static WRITE8_HANDLER( spcforce_soundtrigger_w ) |
| 77 | 77 | { |
| 78 | cpunum_set_input_line( | |
| 78 | cpunum_set_input_line(machine, 1, 0, (~data & 0x08) ? ASSERT_LINE : CLEAR_LINE); | |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 |
| r2454 | r2455 | |
|---|---|---|
| 673 | 673 | |
| 674 | 674 | static const struct AY8910interface ay8910_interface = |
| 675 | 675 | { |
| 676 | 0, | |
| 677 | 0, | |
| 676 | AY8910_LEGACY_OUTPUT, | |
| 677 | AY8910_DEFAULT_LOADS, | |
| 678 | NULL, | |
| 679 | NULL, | |
| 678 | 680 | gsword_nmi_set_w, /* portA write */ |
| 679 | | |
| 681 | NULL | |
| 680 | 682 | }; |
| 681 | 683 | |
| 682 | 684 | static const struct MSM5205interface msm5205_interface = |
| r2454 | r2455 | |
|---|---|---|
| 76 | 76 | /* bit 6 is EEPROM data */ |
| 77 | 77 | /* bit 7 is EEPROM ready */ |
| 78 | 78 | /* bit 14 is service button */ |
| 79 | res = (EEPROM_read_bit() << 6) | input_port_ | |
| 79 | res = (EEPROM_read_bit() << 6) | input_port_ | |
| 80 | 80 | if (init_eeprom_count) |
| 81 | 81 | { |
| 82 | 82 | init_eeprom_count--; |
| r2454 | r2455 | |
| 93 | 93 | /* bit 6 is EEPROM data */ |
| 94 | 94 | /* bit 7 is EEPROM ready */ |
| 95 | 95 | /* bit 14 is service button */ |
| 96 | res = (EEPROM_read_bit() << 6) | input_port_ | |
| 96 | res = (EEPROM_read_bit() << 6) | input_port_ | |
| 97 | 97 | if (init_eeprom_count) |
| 98 | 98 | { |
| 99 | 99 | init_eeprom_count--; |
| r2454 | r2455 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | #include "deprecat.h" | |
| 3 | 2 | #include "sound/2151intf.h" |
| 4 | 3 | #include "sound/okim6295.h" |
| 5 | 4 | |
| r2454 | r2455 | |
| 142 | 141 | static WRITE32_HANDLER( paletteram32_xRRRRRGGGGGBBBBB_dword_w ) |
| 143 | 142 | { |
| 144 | 143 | COMBINE_DATA(&paletteram32[offset]); |
| 145 | palette_set_color_rgb( | |
| 144 | palette_set_color_rgb(machine,offset,pal5bit(paletteram32[offset] >> (10+16)),pal5bit(paletteram32[offset] >> (5+16)),pal5bit(paletteram32[offset] >> (0+16))); | |
| 146 | 145 | } |
| 147 | 146 | |
| 148 | 147 | /* player inputs */ |
| r2454 | r2455 | |
|---|---|---|
| 12 | 12 | */ |
| 13 | 13 | |
| 14 | 14 | #include "driver.h" |
| 15 | #include "deprecat.h" | |
| 16 | 15 | #include "sound/ay8910.h" |
| 17 | 16 | |
| 18 | 17 | static tilemap *bg_tilemap; |
| r2454 | r2455 | |
| 56 | 55 | |
| 57 | 56 | static WRITE8_HANDLER( sound_irq_w ) |
| 58 | 57 | { |
| 59 | cpunum_set_input_line( | |
| 58 | cpunum_set_input_line(machine, 1,0,HOLD_LINE); | |
| 60 | 59 | //sync with sound cpu (but it still loses some soundlatches...) |
| 61 | 60 | //timer_call_after_resynch(NULL, 0, NULL); |
| 62 | 61 | } |
| r2454 | r2455 | |
| 301 | 300 | |
| 302 | 301 | static const struct AY8910interface ay8912_interface = |
| 303 | 302 | { |
| 304 | sound_r | |
| 303 | AY8910_LEGACY_OUTPUT, | |
| 304 | AY8910_DEFAULT_LOADS, | |
| 305 | sound_r, | |
| 306 | NULL, | |
| 307 | NULL, | |
| 308 | NULL | |
| 305 | 309 | }; |
| 306 | 310 | |
| 307 | 311 | //AY portA is fed by an input clock at 15625 Hz |
| r2454 | r2455 | |
|---|---|---|
| 262 | 262 | |
| 263 | 263 | static WRITE8_HANDLER( sound_irq_w ) |
| 264 | 264 | { |
| 265 | cpunum_set_input_line( | |
| 265 | cpunum_set_input_line(machine, 1, 0, HOLD_LINE); | |
| 266 | 266 | } |
| 267 | 267 | |
| 268 | 268 | static READ8_HANDLER( sound_status_r ) |
| r2454 | r2455 | |
|---|---|---|
| 11 | 11 | ****************************************************************************/ |
| 12 | 12 | |
| 13 | 13 | #include "driver.h" |
| 14 | #include "deprecat.h" | |
| 15 | 14 | #include "machine/atari_vg.h" |
| 16 | 15 | #include "sound/pokey.h" |
| 17 | 16 | |
| r2454 | r2455 | |
| 81 | 80 | |
| 82 | 81 | static WRITE8_HANDLER( runaway_irq_ack_w ) |
| 83 | 82 | { |
| 84 | cpunum_set_input_line( | |
| 83 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 85 | 84 | } |
| 86 | 85 | |
| 87 | 86 |
| r2454 | r2455 | |
|---|---|---|
| 30 | 30 | ****************************************/ |
| 31 | 31 | |
| 32 | 32 | #include "driver.h" |
| 33 | #include "deprecat.h" | |
| 34 | 33 | #include "machine/namcoio.h" |
| 35 | 34 | #include "sound/namco.h" |
| 36 | 35 | |
| r2454 | r2455 | |
| 162 | 161 | static WRITE8_HANDLER( toypop_main_interrupt_enable_w ) |
| 163 | 162 | { |
| 164 | 163 | cpu_interrupt_enable(0,1); |
| 165 | cpunum_set_input_line( | |
| 164 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 166 | 165 | } |
| 167 | 166 | |
| 168 | 167 | static WRITE8_HANDLER( toypop_main_interrupt_disable_w ) |
| r2454 | r2455 | |
| 173 | 172 | static WRITE8_HANDLER( toypop_sound_interrupt_enable_acknowledge_w ) |
| 174 | 173 | { |
| 175 | 174 | cpu_interrupt_enable(1,1); |
| 176 | cpunum_set_input_line( | |
| 175 | cpunum_set_input_line(machine, 1, 0, CLEAR_LINE); | |
| 177 | 176 | } |
| 178 | 177 | |
| 179 | 178 | static WRITE8_HANDLER( toypop_sound_interrupt_disable_w ) |
| r2454 | r2455 | |
| 193 | 192 | |
| 194 | 193 | static WRITE8_HANDLER( toypop_sound_clear_w ) |
| 195 | 194 | { |
| 196 | cpunum_set_input_line( | |
| 195 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, CLEAR_LINE); | |
| 197 | 196 | } |
| 198 | 197 | |
| 199 | 198 | static WRITE8_HANDLER( toypop_sound_assert_w ) |
| 200 | 199 | { |
| 201 | cpunum_set_input_line( | |
| 200 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, ASSERT_LINE); | |
| 202 | 201 | } |
| 203 | 202 | |
| 204 | 203 | static WRITE8_HANDLER( toypop_m68000_clear_w ) |
| 205 | 204 | { |
| 206 | cpunum_set_input_line( | |
| 205 | cpunum_set_input_line(machine, 2, INPUT_LINE_RESET, CLEAR_LINE); | |
| 207 | 206 | } |
| 208 | 207 | |
| 209 | 208 | static WRITE8_HANDLER( toypop_m68000_assert_w ) |
| 210 | 209 | { |
| 211 | cpunum_set_input_line( | |
| 210 | cpunum_set_input_line(machine, 2, INPUT_LINE_RESET, ASSERT_LINE); | |
| 212 | 211 | } |
| 213 | 212 | |
| 214 | 213 | static TIMER_CALLBACK( disable_interrupts ) |
| r2454 | r2455 | |
|---|---|---|
| 316 | 316 | |
| 317 | 317 | static WRITE16_HANDLER( tumblepb_oki_w ) |
| 318 | 318 | { |
| 319 | if (mem_mask==0x | |
| 319 | if (mem_mask==0xffff) | |
| 320 | 320 | { |
| 321 | 321 | OKIM6295_data_0_w(machine,0,data&0xff); |
| 322 | 322 | //printf("tumbleb_oki_w %04x %04x\n",data,mem_mask); |
| r2454 | r2455 | |
|---|---|---|
| 513 | 513 | |
| 514 | 514 | case 0x03: M68681.TBA = value; // Fill transmit buffer |
| 515 | 515 | M68681.SRA |=0x0400; // Data has been sent - TX ready for more. |
| 516 | if(M68681.IMR & 1) cpunum_set_input_line_and_vector( | |
| 516 | if(M68681.IMR & 1) cpunum_set_input_line_and_vector(machine, 0,3, HOLD_LINE, M68681.IVR); // Generate an interrupt, if allowed. | |
| 517 | 517 | |
| 518 | 518 | #if HOST_MONITOR_DISPLAY |
| 519 | 519 | mame_printf_debug("%c",value); // Port A - Monitor |
| r2454 | r2455 | |
| 541 | 541 | // Write to sound board |
| 542 | 542 | if(M68681.IMR & 0x1000) |
| 543 | 543 | { |
| 544 | cpunum_set_input_line_and_vector( | |
| 544 | cpunum_set_input_line_and_vector(machine, 0,3, HOLD_LINE, M68681.IVR); // Generate an interrupt, if allowed. | |
| 545 | 545 | } |
| 546 | cpunum_set_input_line( | |
| 546 | cpunum_set_input_line(machine, 2, I8051_RX_LINE, ASSERT_LINE); // Generate 8031 interrupt | |
| 547 | 547 | mame_printf_debug("Sound board TX: %4X at PC=%4X\n",value,activecpu_get_pc()); |
| 548 | 548 | break; |
| 549 | 549 |
| r2454 | r2455 | |
|---|---|---|
| 245 | 245 | |
| 246 | 246 | static const struct YM2203interface ym2203_interface = |
| 247 | 247 | { |
| 248 | soundlatch_r | |
| 248 | { | |
| 249 | AY8910_LEGACY_OUTPUT, | |
| 250 | AY8910_DEFAULT_LOADS, | |
| 251 | soundlatch_r, | |
| 252 | NULL, | |
| 253 | NULL, | |
| 254 | NULL | |
| 255 | }, | |
| 256 | NULL | |
| 249 | 257 | }; |
| 250 | 258 | |
| 251 | 259 | static MACHINE_DRIVER_START( momoko ) |
| r2454 | r2455 | |
|---|---|---|
| 119 | 119 | |
| 120 | 120 | static WRITE8_HANDLER( sound_reset_w ) { |
| 121 | 121 | if ( !( data & 1 ) ) |
| 122 | cpunum_set_input_line( | |
| 122 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, PULSE_LINE); | |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | static WRITE8_HANDLER( sound_control_w ) { |
| r2454 | r2455 | |
| 204 | 204 | ADDRESS_MAP_END |
| 205 | 205 | |
| 206 | 206 | static READ8_HANDLER( sound_reset_r ) { |
| 207 | cpunum_set_input_line( | |
| 207 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, PULSE_LINE); | |
| 208 | 208 | return 0; |
| 209 | 209 | } |
| 210 | 210 |
| r2454 | r2455 | |
|---|---|---|
| 45 | 45 | ***************************************************************************/ |
| 46 | 46 | |
| 47 | 47 | #include "driver.h" |
| 48 | #include "deprecat.h" | |
| 49 | 48 | #include "cpu/m68000/m68000.h" |
| 50 | 49 | #include "video/taitoic.h" |
| 51 | 50 | #include "audio/taitosnd.h" |
| r2454 | r2455 | |
| 80 | 79 | COMBINE_DATA(&paletteram32[offset]); |
| 81 | 80 | |
| 82 | 81 | a = paletteram32[offset] >> 16; |
| 83 | palette_set_color_rgb( | |
| 82 | palette_set_color_rgb(machine,offset*2,pal5bit(a >> 10),pal5bit(a >> 5),pal5bit(a >> 0)); | |
| 84 | 83 | |
| 85 | 84 | a = paletteram32[offset] &0xffff; |
| 86 | palette_set_color_rgb( | |
| 85 | palette_set_color_rgb(machine,offset*2+1,pal5bit(a >> 10),pal5bit(a >> 5),pal5bit(a >> 0)); | |
| 87 | 86 | } |
| 88 | 87 | |
| 89 | 88 | static READ32_HANDLER( gunbustr_input_r ) |
| r2454 | r2455 | |
| 92 | 91 | { |
| 93 | 92 | case 0x00: |
| 94 | 93 | { |
| 95 | return (input_port_ | |
| 94 | return (input_port_ | |
| 96 | 95 | (EEPROM_read_bit() << 7); |
| 97 | 96 | } |
| 98 | 97 | |
| 99 | 98 | case 0x01: |
| 100 | 99 | { |
| 101 | return input_port_ | |
| 100 | return input_port_ | |
| 102 | 101 | } |
| 103 | 102 | } |
| 104 | 103 | logerror("CPU #0 PC %06x: read input %06x\n",activecpu_get_pc(),offset); |
| r2454 | r2455 | |
| 175 | 174 | |
| 176 | 175 | static READ32_HANDLER( gunbustr_gun_r ) |
| 177 | 176 | { |
| 178 | return ( input_port_3_word_r(machine,0,0) << 24) | (input_port_4_word_r(machine,0,0) << 16) | | |
| 179 | ( input_port_5_word_r(machine,0,0) << 8) | input_port_6_word_r(machine,0,0); | |
| 177 | return ( input_port_read_indexed(machine,3) << 24) | (input_port_read_indexed(machine,4) << 16) | | |
| 178 | ( input_port_read_indexed(machine,5) << 8) | input_port_read_indexed(machine,6); | |
| 180 | 179 | } |
| 181 | 180 | |
| 182 | 181 | static WRITE32_HANDLER( gunbustr_gun_w ) |
| r2454 | r2455 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "deprecat.h" | |
| 11 | 10 | #include "sound/2203intf.h" |
| 12 | 11 | |
| 13 | 12 | extern UINT8 *scotrsht_scroll; |
| r2454 | r2455 | |
|---|---|---|
| 1029 | 1029 | |
| 1030 | 1030 | UINT8 port = TC0220IOC_port_r(machine,0); /* read port number */ |
| 1031 | 1031 | int steer = 0; |
| 1032 | int fake = input_port_ | |
| 1032 | int fake = input_port_ | |
| 1033 | 1033 | |
| 1034 | 1034 | if (!(fake &0x10)) /* Analogue steer (the real control method) */ |
| 1035 | 1035 | { |
| 1036 | 1036 | /* center around zero and reduce span to 0xc0 */ |
| 1037 | steer = ((input_port_ | |
| 1037 | steer = ((input_port_ | |
| 1038 | 1038 | |
| 1039 | 1039 | } |
| 1040 | 1040 | else /* Digital steer */ |
| r2454 | r2455 | |
| 1069 | 1069 | |
| 1070 | 1070 | UINT8 port = TC0220IOC_port_r(machine,0); /* read port number */ |
| 1071 | 1071 | int steer = 0; |
| 1072 | int fake = input_port_ | |
| 1072 | int fake = input_port_ | |
| 1073 | 1073 | |
| 1074 | 1074 | if (!(fake &0x10)) /* Analogue steer (the real control method) */ |
| 1075 | 1075 | { |
| 1076 | 1076 | /* center around zero */ |
| 1077 | steer = input_port_ | |
| 1077 | steer = input_port_ | |
| 1078 | 1078 | } |
| 1079 | 1079 | else /* Digital steer */ |
| 1080 | 1080 | { |
| r2454 | r2455 | |
| 1091 | 1091 | switch (port) |
| 1092 | 1092 | { |
| 1093 | 1093 | case 0x08: |
| 1094 | return input_port_ | |
| 1094 | return input_port_ | |
| 1095 | 1095 | |
| 1096 | 1096 | case 0x09: |
| 1097 | return input_port_ | |
| 1097 | return input_port_ | |
| 1098 | 1098 | |
| 1099 | 1099 | case 0x0a: |
| 1100 | return input_port_ | |
| 1100 | return input_port_ | |
| 1101 | 1101 | |
| 1102 | 1102 | case 0x0b: |
| 1103 | return input_port_ | |
| 1103 | return input_port_ | |
| 1104 | 1104 | |
| 1105 | 1105 | case 0x0c: |
| 1106 | 1106 | return steer &0xff; |
| r2454 | r2455 | |
| 1119 | 1119 | switch (offset) |
| 1120 | 1120 | { |
| 1121 | 1121 | case 0x00: |
| 1122 | return input_port_ | |
| 1122 | return input_port_ | |
| 1123 | 1123 | |
| 1124 | 1124 | case 0x01: |
| 1125 | return input_port_ | |
| 1125 | return input_port_ | |
| 1126 | 1126 | |
| 1127 | 1127 | case 0x02: |
| 1128 | return input_port_ | |
| 1128 | return input_port_ | |
| 1129 | 1129 | |
| 1130 | 1130 | case 0x03: |
| 1131 | return input_port_ | |
| 1131 | return input_port_ | |
| 1132 | 1132 | } |
| 1133 | 1133 | |
| 1134 | 1134 | logerror("CPU #0 PC %06x: warning - read unmapped stick offset %06x\n",activecpu_get_pc(),offset); |
| r2454 | r2455 | |
| 1152 | 1152 | switch (offset) |
| 1153 | 1153 | { |
| 1154 | 1154 | case 0x00: |
| 1155 | return nightstr_stick[(input_port_ | |
| 1155 | return nightstr_stick[(input_port_ | |
| 1156 | 1156 | |
| 1157 | 1157 | case 0x01: |
| 1158 | return nightstr_stick[(input_port_ | |
| 1158 | return nightstr_stick[(input_port_ | |
| 1159 | 1159 | |
| 1160 | 1160 | case 0x02: |
| 1161 | return input_port_ | |
| 1161 | return input_port_ | |
| 1162 | 1162 | |
| 1163 | 1163 | case 0x03: |
| 1164 | return input_port_ | |
| 1164 | return input_port_ | |
| 1165 | 1165 | } |
| 1166 | 1166 | |
| 1167 | 1167 | logerror("CPU #0 PC %06x: warning - read unmapped stick offset %06x\n",activecpu_get_pc(),offset); |
| r2454 | r2455 | |
| 1184 | 1184 | static READ16_HANDLER( sci_steer_input_r ) |
| 1185 | 1185 | { |
| 1186 | 1186 | int steer = 0; |
| 1187 | int fake = input_port_ | |
| 1187 | int fake = input_port_ | |
| 1188 | 1188 | |
| 1189 | 1189 | if (!(fake &0x10)) /* Analogue steer (the real control method) */ |
| 1190 | 1190 | { |
| 1191 | 1191 | /* center around zero and reduce span to 0xc0 */ |
| 1192 | steer = ((input_port_ | |
| 1192 | steer = ((input_port_ | |
| 1193 | 1193 | } |
| 1194 | 1194 | else /* Digital steer */ |
| 1195 | 1195 | { |
| r2454 | r2455 | |
| 1235 | 1235 | switch (offset) |
| 1236 | 1236 | { |
| 1237 | 1237 | case 0x00: |
| 1238 | return input_port_ | |
| 1238 | return input_port_ | |
| 1239 | 1239 | |
| 1240 | 1240 | case 0x01: |
| 1241 | return input_port_ | |
| 1241 | return input_port_ | |
| 1242 | 1242 | |
| 1243 | 1243 | case 0x02: |
| 1244 | return input_port_ | |
| 1244 | return input_port_ | |
| 1245 | 1245 | |
| 1246 | 1246 | case 0x03: |
| 1247 | return input_port_ | |
| 1247 | return input_port_ | |
| 1248 | 1248 | } |
| 1249 | 1249 | |
| 1250 | 1250 | return 0x0; |
| r2454 | r2455 | |
| 1267 | 1267 | static READ16_HANDLER( dblaxle_steer_input_r ) |
| 1268 | 1268 | { |
| 1269 | 1269 | int steer = 0; |
| 1270 | int fake = input_port_ | |
| 1270 | int fake = input_port_ | |
| 1271 | 1271 | |
| 1272 | 1272 | if (!(fake &0x10)) /* Analogue steer (the real control method) */ |
| 1273 | 1273 | { |
| 1274 | 1274 | /* center around zero and reduce span to 0x80 */ |
| 1275 | steer = ((input_port_ | |
| 1275 | steer = ((input_port_ | |
| 1276 | 1276 | } |
| 1277 | 1277 | else /* Digital steer */ |
| 1278 | 1278 | { |
| r2454 | r2455 | |
|---|---|---|
| 428 | 428 | |
| 429 | 429 | static const struct AY8910interface survival_ay8910_interface = |
| 430 | 430 | { |
| 431 | 0, | |
| 432 | survival_protection_r | |
| 431 | AY8910_LEGACY_OUTPUT, | |
| 432 | AY8910_DEFAULT_LOADS, | |
| 433 | NULL, | |
| 434 | survival_protection_r, | |
| 435 | NULL, | |
| 436 | NULL | |
| 433 | 437 | }; |
| 434 | 438 | |
| 435 | 439 |
| r2454 | r2455 | |
|---|---|---|
| 132 | 132 | if (ACCESSING_BITS_0_7) |
| 133 | 133 | { |
| 134 | 134 | colorram[clr_offset] = data; |
| 135 | palette_set_color_rgb( | |
| 135 | palette_set_color_rgb(machine, clr_offset/3, | |
| 136 | 136 | pal6bit(colorram[(clr_offset/3)*3+0]), |
| 137 | 137 | pal6bit(colorram[(clr_offset/3)*3+1]), |
| 138 | 138 | pal6bit(colorram[(clr_offset/3)*3+2]) |
| r2454 | r2455 | |
|---|---|---|
| 7 | 7 | ****************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "deprecat.h" | |
| 11 | 10 | #include "cpu/z80/z80.h" |
| 12 | 11 | #include "cpu/m6805/m6805.h" |
| 13 | 12 | #include "sound/ay8910.h" |
| r2454 | r2455 | |
| 83 | 82 | sound_nmi_enable = 1; |
| 84 | 83 | if (pending_nmi) |
| 85 | 84 | { |
| 86 | cpunum_set_input_line( | |
| 85 | cpunum_set_input_line(machine, 1,INPUT_LINE_NMI,PULSE_LINE); | |
| 87 | 86 | pending_nmi = 0; |
| 88 | 87 | } |
| 89 | 88 | } |
| r2454 | r2455 | |
|---|---|---|
| 291 | 291 | |
| 292 | 292 | static READ8_HANDLER( nmi_ack_r ) |
| 293 | 293 | { |
| 294 | cpunum_set_input_line( | |
| 294 | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, CLEAR_LINE); | |
| 295 | 295 | return 0; |
| 296 | 296 | } |
| 297 | 297 | |
| r2454 | r2455 | |
| 905 | 905 | |
| 906 | 906 | static const struct AY8910interface pbillian_ay8910_interface = |
| 907 | 907 | { |
| 908 | AY8910_LEGACY_OUTPUT, | |
| 909 | AY8910_DEFAULT_LOADS, | |
| 908 | 910 | pbillian_ay_port_a_r, /* port Aread */ |
| 909 | input_port_2_r /* port Bread */ | |
| 911 | input_port_2_r, /* port Bread */ | |
| 912 | NULL, | |
| 913 | NULL | |
| 910 | 914 | }; |
| 911 | 915 | |
| 912 | 916 | static const struct AY8910interface hotsmash_ay8910_interface = |
| 913 | 917 | { |
| 918 | AY8910_LEGACY_OUTPUT, | |
| 919 | AY8910_DEFAULT_LOADS, | |
| 914 | 920 | hotsmash_ay_port_a_r, /* port Aread */ |
| 915 | input_port_2_r /* port Bread */ | |
| 921 | input_port_2_r, /* port Bread */ | |
| 922 | NULL, | |
| 923 | NULL | |
| 916 | 924 | }; |
| 917 | 925 | |
| 918 | 926 | static const struct AY8910interface sqix_ay8910_interface_1 = |
| 919 | 927 | { |
| 928 | AY8910_LEGACY_OUTPUT, | |
| 929 | AY8910_DEFAULT_LOADS, | |
| 920 | 930 | input_port_3_r, /* port Aread */ |
| 921 | 931 | in4_mcu_r, /* port Bread */ |
| 932 | NULL, | |
| 933 | NULL | |
| 922 | 934 | }; |
| 923 | 935 | |
| 924 | 936 | static const struct AY8910interface sqix_ay8910_interface_2 = |
| 925 | 937 | { |
| 926 | input_port_1_r, /* port Aread */ | |
| 927 | sqix_from_mcu_r, /* port Bread */ | |
| 928 | 0, /* port Awrite */ | |
| 929 | sqix_z80_mcu_w /* port Bwrite */ | |
| 938 | AY8910_LEGACY_OUTPUT, | |
| 939 | AY8910_DEFAULT_LOADS, | |
| 940 | input_port_1_r, /* port Aread */ | |
| 941 | sqix_from_mcu_r, /* port Bread */ | |
| 942 | NULL, /* port Awrite */ | |
| 943 | sqix_z80_mcu_w /* port Bwrite */ | |
| 930 | 944 | }; |
| 931 | 945 | |
| 932 | 946 | static const struct AY8910interface bootleg_ay8910_interface_1 = |
| 933 | 947 | { |
| 934 | input_port_3_r, /* port Aread */ | |
| 935 | input_port_4_r /* port Bread */ | |
| 948 | AY8910_LEGACY_OUTPUT, | |
| 949 | AY8910_DEFAULT_LOADS, | |
| 950 | input_port_3_r, /* port Aread */ | |
| 951 | input_port_4_r, /* port Bread */ | |
| 952 | NULL, | |
| 953 | NULL | |
| 936 | 954 | }; |
| 937 | 955 | |
| 938 | 956 | static const struct AY8910interface bootleg_ay8910_interface_2 = |
| 939 | 957 | { |
| 940 | input_port_1_r, /* port Aread */ | |
| 941 | bootleg_in0_r /* port Bread */ | |
| 958 | AY8910_LEGACY_OUTPUT, | |
| 959 | AY8910_DEFAULT_LOADS, | |
| 960 | input_port_1_r, /* port Aread */ | |
| 961 | bootleg_in0_r, /* port Bread */ | |
| 962 | NULL, | |
| 963 | NULL | |
| 942 | 964 | }; |
| 943 | 965 | |
| 944 | 966 |
| r2454 | r2455 | |
|---|---|---|
| 247 | 247 | jaguar_dsp_resume(); |
| 248 | 248 | |
| 249 | 249 | /* halt the CPUs */ |
| 250 | jaguargpu_ctrl_w(1, G_CTRL, 0, 0); | |
| 251 | jaguardsp_ctrl_w(2, D_CTRL, 0, 0); | |
| 250 | jaguargpu_ctrl_w(1, G_CTRL, 0, 0xffffffff); | |
| 251 | jaguardsp_ctrl_w(2, D_CTRL, 0, 0xffffffff); | |
| 252 | 252 | |
| 253 | 253 | /* init the sound system */ |
| 254 | 254 | cojag_sound_reset(); |
| r2454 | r2455 | |
| 297 | 297 | jaguar_dsp_resume(); |
| 298 | 298 | |
| 299 | 299 | /* halt the CPUs */ |
| 300 | jaguargpu_ctrl_w(1, G_CTRL, 0, 0); | |
| 301 | jaguardsp_ctrl_w(2, D_CTRL, 0, 0); | |
| 300 | jaguargpu_ctrl_w(1, G_CTRL, 0, 0xffffffff); | |
| 301 | jaguardsp_ctrl_w(2, D_CTRL, 0, 0xffffffff); | |
| 302 | 302 | } |
| 303 | 303 | |
| 304 | 304 | /* adjust banking */ |
| r2454 | r2455 | |
|---|---|---|
| 65 | 65 | lockon_ctrl_reg = data & 0xff; |
| 66 | 66 | |
| 67 | 67 | /* Bus mastering for shared access */ |
| 68 | cpunum_set_input_line(Machine, GROUND_CPU, INPUT_LINE_HALT, data & 0x04 ? ASSERT_LINE : CLEAR_LINE); | |
| 69 | cpunum_set_input_line(Machine, OBJECT_CPU, INPUT_LINE_HALT, data & 0x20 ? ASSERT_LINE : CLEAR_LINE); | |
| 70 | cpunum_set_input_line(Machine, SOUND_CPU, INPUT_LINE_HALT, data & 0x40 ? CLEAR_LINE : ASSERT_LINE); | |
| 68 | cpunum_set_input_line(machine, GROUND_CPU, INPUT_LINE_HALT, data & 0x04 ? ASSERT_LINE : CLEAR_LINE); | |
| 69 | cpunum_set_input_line(machine, OBJECT_CPU, INPUT_LINE_HALT, data & 0x20 ? ASSERT_LINE : CLEAR_LINE); | |
| 70 | cpunum_set_input_line(machine, SOUND_CPU, INPUT_LINE_HALT, data & 0x40 ? CLEAR_LINE : ASSERT_LINE); | |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | static READ16_HANDLER( main_gnd_r ) |
| r2454 | r2455 | |
| 458 | 458 | |
| 459 | 459 | static const struct YM2203interface ym2203_interface = |
| 460 | 460 | { |
| 461 | input_port_1_r, | |
| 462 | 0, | |
| 463 | 0, | |
| 464 | ym2203_out_b, | |
| 461 | { | |
| 462 | AY8910_LEGACY_OUTPUT, | |
| 463 | AY8910_DEFAULT_LOADS, | |
| 464 | input_port_1_r, | |
| 465 | NULL, | |
| 466 | NULL, | |
| 467 | ym2203_out_b, | |
| 468 | }, | |
| 465 | 469 | ym2203_irq |
| 466 | 470 | }; |
| 467 | 471 |
| r2454 | r2455 | |
|---|---|---|
| 547 | 547 | ***************************************************************************/ |
| 548 | 548 | |
| 549 | 549 | #include "driver.h" |
| 550 | #include "deprecat.h" | |
| 551 | 550 | #include "machine/namcoio.h" |
| 552 | 551 | #include "sound/dac.h" |
| 553 | 552 | #include "sound/namco.h" |
| r2454 | r2455 | |
| 705 | 704 | case 0x00: /* INT ON 2 */ |
| 706 | 705 | cpu_interrupt_enable(1,bit); |
| 707 | 706 | if (!bit) |
| 708 | cpunum_set_input_line( | |
| 707 | cpunum_set_input_line(machine, 1, 0, CLEAR_LINE); | |
| 709 | 708 | break; |
| 710 | 709 | |
| 711 | 710 | case 0x02: /* INT ON */ |
| 712 | 711 | cpu_interrupt_enable(0,bit); |
| 713 | 712 | if (!bit) |
| 714 | cpunum_set_input_line( | |
| 713 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 715 | 714 | break; |
| 716 | 715 | |
| 717 | 716 | case 0x04: /* n.c. */ |
| r2454 | r2455 | |
| 727 | 726 | break; |
| 728 | 727 | |
| 729 | 728 | case 0x0a: /* SUB RESET */ |
| 730 | cpunum_set_input_line( | |
| 729 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, bit ? CLEAR_LINE : ASSERT_LINE); | |
| 731 | 730 | break; |
| 732 | 731 | |
| 733 | 732 | case 0x0c: /* n.c. */ |
| r2454 | r2455 | |
| 747 | 746 | case 0x00: |
| 748 | 747 | cpu_interrupt_enable(1,bit); |
| 749 | 748 | if (!bit) |
| 750 | cpunum_set_input_line( | |
| 749 | cpunum_set_input_line(machine, 1, 0, CLEAR_LINE); | |
| 751 | 750 | break; |
| 752 | 751 | |
| 753 | 752 | case 0x02: |
| 754 | 753 | cpu_interrupt_enable(0,bit); |
| 755 | 754 | if (!bit) |
| 756 | cpunum_set_input_line( | |
| 755 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 757 | 756 | break; |
| 758 | 757 | |
| 759 | 758 | case 0x04: |
| 760 | 759 | cpu_interrupt_enable(2,bit); |
| 761 | 760 | if (!bit) |
| 762 | cpunum_set_input_line( | |
| 761 | cpunum_set_input_line(machine, 2, 0, CLEAR_LINE); | |
| 763 | 762 | break; |
| 764 | 763 | |
| 765 | 764 | case 0x06: |
| r2454 | r2455 | |
| 772 | 771 | break; |
| 773 | 772 | |
| 774 | 773 | case 0x0a: |
| 775 | cpunum_set_input_line( | |
| 774 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, bit ? CLEAR_LINE : ASSERT_LINE); | |
| 776 | 775 | break; |
| 777 | 776 | |
| 778 | 777 | case 0x0c: |
| 779 | cpunum_set_input_line( | |
| 778 | cpunum_set_input_line(machine, 2, INPUT_LINE_RESET, bit ? CLEAR_LINE : ASSERT_LINE); | |
| 780 | 779 | break; |
| 781 | 780 | |
| 782 | 781 | case 0x0e: |
| r2454 | r2455 | |
| 793 | 792 | case 0x00: /* INT ON 2 */ |
| 794 | 793 | cpu_interrupt_enable(1,bit); |
| 795 | 794 | if (!bit) |
| 796 | cpunum_set_input_line( | |
| 795 | cpunum_set_input_line(machine, 1, 0, CLEAR_LINE); | |
| 797 | 796 | break; |
| 798 | 797 | |
| 799 | 798 | case 0x02: /* INT ON */ |
| 800 | 799 | cpu_interrupt_enable(0,bit); |
| 801 | 800 | if (!bit) |
| 802 | cpunum_set_input_line( | |
| 801 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 803 | 802 | break; |
| 804 | 803 | |
| 805 | 804 | case 0x04: /* FLIP */ |
| r2454 | r2455 | |
| 816 | 815 | break; |
| 817 | 816 | |
| 818 | 817 | case 0x0a: /* SUB RESET */ |
| 819 | cpunum_set_input_line( | |
| 818 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, bit ? CLEAR_LINE : ASSERT_LINE); | |
| 820 | 819 | break; |
| 821 | 820 | |
| 822 | 821 | case 0x0c: /* n.c. */ |
| r2454 | r2455 | |
|---|---|---|
| 263 | 263 | rgb[sub++] = data & 0xff; |
| 264 | 264 | if (sub == 3) |
| 265 | 265 | { |
| 266 | palette_set_color_rgb( | |
| 266 | palette_set_color_rgb(machine,indx++,pal6bit(rgb[0]),pal6bit(rgb[1]),pal6bit(rgb[2])); | |
| 267 | 267 | sub = 0; |
| 268 | 268 | if (indx == 256) indx = 0; |
| 269 | 269 | } |
| r2454 | r2455 | |
|---|---|---|
| 97 | 97 | /* bit 8 is EEPROM data */ |
| 98 | 98 | /* bit 9 is EEPROM ready */ |
| 99 | 99 | /* bit 11 is service button */ |
| 100 | res = (EEPROM_read_bit()<<8) | input_port_ | |
| 100 | res = (EEPROM_read_bit()<<8) | input_port_ | |
| 101 | 101 | |
| 102 | 102 | if (init_eeprom_count) |
| 103 | 103 | { |
| r2454 | r2455 | |
|---|---|---|
| 41 | 41 | |
| 42 | 42 | if ( diff & 0x40 ) |
| 43 | 43 | { |
| 44 | cpunum_set_input_line( | |
| 44 | cpunum_set_input_line(machine, 0, INPUT_LINE_RESET, (data & 0x40) ? CLEAR_LINE : ASSERT_LINE); | |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | // bit 3 - enable 752 Hz (D-3) square wave output |
| r2454 | r2455 | |
|---|---|---|
| 534 | 534 | |
| 535 | 535 | static const struct YM2203interface ym2203_interface = |
| 536 | 536 | { |
| 537 | 0,0,0,0,irqhandler | |
| 537 | { | |
| 538 | AY8910_LEGACY_OUTPUT, | |
| 539 | AY8910_DEFAULT_LOADS, | |
| 540 | NULL, NULL, NULL, NULL, | |
| 541 | }, | |
| 542 | irqhandler | |
| 538 | 543 | }; |
| 539 | 544 | |
| 540 | 545 | static const struct MSM5205interface msm5205_interface = |
| r2454 | r2455 | |
|---|---|---|
| 25 | 25 | ***************************************************************************/ |
| 26 | 26 | |
| 27 | 27 | #include "driver.h" |
| 28 | #include "deprecat.h" | |
| 29 | 28 | #include "cpu/i8039/i8039.h" |
| 30 | 29 | #include "sound/ay8910.h" |
| 31 | 30 | #include "sound/samples.h" |
| r2454 | r2455 | |
| 221 | 220 | |
| 222 | 221 | static WRITE8_HANDLER( snd_irq_w ) |
| 223 | 222 | { |
| 224 | cpunum_set_input_line( | |
| 223 | cpunum_set_input_line(machine, 1, 0, PULSE_LINE); | |
| 225 | 224 | } |
| 226 | 225 | |
| 227 | 226 |
| r2454 | r2455 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | #include "deprecat.h" | |
| 3 | 2 | #include "cpu/z80/z80.h" |
| 4 | 3 | #include "sound/dac.h" |
| 5 | 4 | #include "sound/sn76496.h" |
| r2454 | r2455 | |
| 256 | 255 | { |
| 257 | 256 | /* palette 1 */ |
| 258 | 257 | int col_ind = offset & 0x1f; |
| 259 | palette_set_color_rgb( | |
| 258 | palette_set_color_rgb(machine, 0x10 + 0x00 + col_ind, pal3bit(rgbcolor >> 0), pal3bit(rgbcolor >> 6), pal3bit(rgbcolor >> 3)); | |
| 260 | 259 | } |
| 261 | 260 | else |
| 262 | 261 | if ((offset>=0x300) && (offset<0x320)) /* 0xa300- 0xa31f */ |
| 263 | 262 | { |
| 264 | 263 | /* palette 2 */ |
| 265 | 264 | int col_ind = offset & 0x1f; |
| 266 | palette_set_color_rgb( | |
| 265 | palette_set_color_rgb(machine, 0x10 + 0x00 + col_ind, pal3bit(rgbcolor >> 0), pal3bit(rgbcolor >> 6), pal3bit(rgbcolor >> 3)); | |
| 267 | 266 | } |
| 268 | 267 | else |
| 269 | 268 | logerror("palette? read from unkram offset = %04x\n",offset); |
| r2454 | r2455 | |
|---|---|---|
| 563 | 563 | |
| 564 | 564 | static const struct AY8910interface ay8910_interface = |
| 565 | 565 | { |
| 566 | soundlatch_r | |
| 566 | AY8910_LEGACY_OUTPUT, | |
| 567 | AY8910_DEFAULT_LOADS, | |
| 568 | soundlatch_r, | |
| 569 | NULL, | |
| 570 | NULL, | |
| 571 | NULL | |
| 567 | 572 | }; |
| 568 | 573 | |
| 569 | 574 |
| r2454 | r2455 | |
|---|---|---|
| 854 | 854 | analog_value[offset & 3] <<= 1; |
| 855 | 855 | return result; |
| 856 | 856 | } |
| 857 | logerror("%06X:unknown analog_custom_io_r(%X) & %04X\n", activecpu_get_pc(), offset*2, mem_mask | |
| 857 | logerror("%06X:unknown analog_custom_io_r(%X) & %04X\n", activecpu_get_pc(), offset*2, mem_mask | |
| 858 | 858 | return 0xffff; |
| 859 | 859 | } |
| 860 | 860 | |
| r2454 | r2455 | |
| 871 | 871 | analog_value[offset & 3] = input_port_read_safe(machine, names[offset & 3], 0); |
| 872 | 872 | return; |
| 873 | 873 | } |
| 874 | logerror("%06X:unknown analog_custom_io_w(%X) = %04X & %04X\n", activecpu_get_pc(), offset*2, data, mem_mask | |
| 874 | logerror("%06X:unknown analog_custom_io_w(%X) = %04X & %04X\n", activecpu_get_pc(), offset*2, data, mem_mask | |
| 875 | 875 | } |
| 876 | 876 | |
| 877 | 877 | |
| r2454 | r2455 | |
| 887 | 887 | return input_port_read_safe(machine, names[offset & 3], 0xffff); |
| 888 | 888 | } |
| 889 | 889 | |
| 890 | logerror("%06X:unknown extra_custom_io_r(%X) & %04X\n", activecpu_get_pc(), offset*2, mem_mask | |
| 890 | logerror("%06X:unknown extra_custom_io_r(%X) & %04X\n", activecpu_get_pc(), offset*2, mem_mask | |
| 891 | 891 | return 0xffff; |
| 892 | 892 | } |
| 893 | 893 | |
| r2454 | r2455 | |
| 908 | 908 | analog_bank = data & 1; |
| 909 | 909 | return; |
| 910 | 910 | } |
| 911 | logerror("%06X:unknown orunners_custom_io_w(%X) = %04X & %04X\n", activecpu_get_pc(), offset*2, data, mem_mask | |
| 911 | logerror("%06X:unknown orunners_custom_io_w(%X) = %04X & %04X\n", activecpu_get_pc(), offset*2, data, mem_mask | |
| 912 | 912 | } |
| 913 | 913 | |
| 914 | 914 | |
| r2454 | r2455 | |
| 927 | 927 | return (UINT8)(input_port_read(machine, names[offset/2]) - sonic_last[offset/2]); |
| 928 | 928 | } |
| 929 | 929 | |
| 930 | logerror("%06X:unknown sonic_custom_io_r(%X) & %04X\n", activecpu_get_pc(), offset*2, mem_mask | |
| 930 | logerror("%06X:unknown sonic_custom_io_r(%X) & %04X\n", activecpu_get_pc(), offset*2, mem_mask | |
| 931 | 931 | return 0xffff; |
| 932 | 932 | } |
| 933 | 933 | |
| r2454 | r2455 | |
| 946 | 946 | return; |
| 947 | 947 | } |
| 948 | 948 | |
| 949 | logerror("%06X:unknown sonic_custom_io_w(%X) = %04X & %04X\n", activecpu_get_pc(), offset*2, data, mem_mask | |
| 949 | logerror("%06X:unknown sonic_custom_io_w(%X) = %04X & %04X\n", activecpu_get_pc(), offset*2, data, mem_mask | |
| 950 | 950 | } |
| 951 | 951 | |
| 952 | 952 | |
| r2454 | r2455 | |
| 959 | 959 | |
| 960 | 960 | static WRITE16_HANDLER( random_number_16_w ) |
| 961 | 961 | { |
| 962 | // mame_printf_debug("%06X:random_seed_w(%04X) = %04X & %04X\n", activecpu_get_pc(), offset*2, data, mem_mask | |
| 962 | // mame_printf_debug("%06X:random_seed_w(%04X) = %04X & %04X\n", activecpu_get_pc(), offset*2, data, mem_mask | |
| 963 | 963 | } |
| 964 | 964 | |
| 965 | 965 | static READ16_HANDLER( random_number_16_r ) |
| r2454 | r2455 | |
| 969 | 969 | |
| 970 | 970 | static WRITE32_HANDLER( random_number_32_w ) |
| 971 | 971 | { |
| 972 | // mame_printf_debug("%06X:random_seed_w(%04X) = %04X & %04X\n", activecpu_get_pc(), offset*2, data, mem_mask | |
| 972 | // mame_printf_debug("%06X:random_seed_w(%04X) = %04X & %04X\n", activecpu_get_pc(), offset*2, data, mem_mask | |
| 973 | 973 | } |
| 974 | 974 | |
| 975 | 975 | static READ32_HANDLER( random_number_32_r ) |
| r2454 | r2455 | |
|---|---|---|
| 166 | 166 | |
| 167 | 167 | static INTERRUPT_GEN( vblank_int ) |
| 168 | 168 | { |
| 169 | int pedal_state = input_port_ | |
| 169 | int pedal_state = input_port_ | |
| 170 | 170 | int i; |
| 171 | 171 | |
| 172 | 172 | /* update the pedals once per frame */ |
| r2454 | r2455 | |
|---|---|---|
| 822 | 822 | |
| 823 | 823 | static const struct AY8910interface ay8910_interface_1 = |
| 824 | 824 | { |
| 825 | AY8910_LEGACY_OUTPUT, | |
| 826 | AY8910_DEFAULT_LOADS, | |
| 825 | 827 | input_port_0_r, |
| 826 | input_port_1_r | |
| 828 | input_port_1_r, | |
| 829 | NULL, | |
| 830 | NULL | |
| 827 | 831 | }; |
| 828 | 832 | |
| 829 | 833 | static const struct AY8910interface ay8910_interface_2 = |
| 830 | 834 | { |
| 835 | AY8910_LEGACY_OUTPUT, | |
| 836 | AY8910_DEFAULT_LOADS, | |
| 831 | 837 | input_port_2_r, |
| 832 | input_port_3_r | |
| 838 | input_port_3_r, | |
| 839 | NULL, | |
| 840 | NULL | |
| 833 | 841 | }; |
| 834 | 842 | |
| 835 | 843 | static VIDEO_EOF( perfrman ) |
| r2454 | r2455 | |
|---|---|---|
| 65 | 65 | static WRITE8_HANDLER( astinvad_sound1_w ); |
| 66 | 66 | static WRITE8_HANDLER( astinvad_sound2_w ); |
| 67 | 67 | |
| 68 | static const ppi8255_interface ppi8255_intf = | |
| 68 | static const ppi8255_interface ppi8255_intf[2] = | |
| 69 | 69 | { |
| 70 | 2, | |
| 71 | { input_port_0_r, NULL }, | |
| 72 | { input_port_1_r, input_port_3_r }, | |
| 73 | { input_port_2_r, NULL }, | |
| 74 | { NULL, astinvad_sound1_w }, | |
| 75 | { NULL, astinvad_sound2_w }, | |
| 76 | { NULL, NULL }, | |
| 70 | { | |
| 71 | input_port_0_r, | |
| 72 | input_port_1_r, | |
| 73 | input_port_2_r, | |
| 74 | NULL, | |
| 75 | NULL, | |
| 76 | NULL | |
| 77 | }, | |
| 78 | { | |
| 79 | NULL, | |
| 80 | input_port_3_r, | |
| 81 | NULL, | |
| 82 | astinvad_sound1_w, | |
| 83 | astinvad_sound2_w, | |
| 84 | NULL | |
| 85 | } | |
| 77 | 86 | }; |
| 78 | 87 | |
| 79 | 88 | |
| r2454 | r2455 | |
| 195 | 204 | |
| 196 | 205 | static MACHINE_START( kamikaze ) |
| 197 | 206 | { |
| 198 | ppi8255_init(&ppi8255_intf); | |
| 199 | 207 | int_timer = timer_alloc(kamizake_int_gen, NULL); |
| 200 | 208 | timer_adjust_oneshot(int_timer, video_screen_get_time_until_pos(machine->primary_screen, 128, 0), 128); |
| 201 | 209 | } |
| r2454 | r2455 | |
| 221 | 229 | |
| 222 | 230 | /* the address lines are used for /CS; yes, they can overlap! */ |
| 223 | 231 | if (!(offset & 4)) |
| 224 | result &= ppi8255_ | |
| 232 | result &= ppi8255_ | |
| 225 | 233 | if (!(offset & 8)) |
| 226 | result &= ppi8255_ | |
| 234 | result &= ppi8255_ | |
| 227 | 235 | return result; |
| 228 | 236 | } |
| 229 | 237 | |
| r2454 | r2455 | |
| 232 | 240 | { |
| 233 | 241 | /* the address lines are used for /CS; yes, they can overlap! */ |
| 234 | 242 | if (!(offset & 4)) |
| 235 | ppi8255_ | |
| 243 | ppi8255_ | |
| 236 | 244 | if (!(offset & 8)) |
| 237 | ppi8255_ | |
| 245 | ppi8255_ | |
| 238 | 246 | } |
| 239 | 247 | |
| 240 | 248 | |
| r2454 | r2455 | |
| 505 | 513 | |
| 506 | 514 | MDRV_MACHINE_START(kamikaze) |
| 507 | 515 | |
| 516 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 517 | MDRV_DEVICE_CONFIG( ppi8255_intf[0] ) | |
| 518 | ||
| 519 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 520 | MDRV_DEVICE_CONFIG( ppi8255_intf[1] ) | |
| 521 | ||
| 508 | 522 | /* video hardware */ |
| 509 | 523 | MDRV_VIDEO_UPDATE(astinvad) |
| 510 | 524 |
| r2454 | r2455 | |
|---|---|---|
| 431 | 431 | g = ((paletteram32[offset] & 0x00ff0000) >>16); |
| 432 | 432 | r = ((paletteram32[offset] & 0xff000000) >>24); |
| 433 | 433 | |
| 434 | palette_set_color( | |
| 434 | palette_set_color(machine,offset,MAKE_RGB(r,g,b)); | |
| 435 | 435 | } |
| 436 | 436 | |
| 437 | 437 | static WRITE32_HANDLER( psikyosh_vidregs_w ) |
| r2454 | r2455 | |
|---|---|---|
| 445 | 445 | |
| 446 | 446 | static const struct YM2203interface ym2203_interface = |
| 447 | 447 | { |
| 448 | input_port_1_r, | |
| 449 | input_port_0_r | |
| 448 | { | |
| 449 | AY8910_LEGACY_OUTPUT, | |
| 450 | AY8910_DEFAULT_LOADS, | |
| 451 | input_port_1_r, | |
| 452 | input_port_0_r, | |
| 453 | NULL, | |
| 454 | NULL | |
| 455 | }, | |
| 456 | NULL | |
| 450 | 457 | }; |
| 451 | 458 | |
| 452 | 459 |
| r2454 | r2455 | |
|---|---|---|
| 96 | 96 | |
| 97 | 97 | |
| 98 | 98 | #include "driver.h" |
| 99 | #include "deprecat.h" | |
| 100 | 99 | #include "sound/ay8910.h" |
| 101 | 100 | |
| 102 | 101 | |
| r2454 | r2455 | |
| 159 | 158 | |
| 160 | 159 | static WRITE8_HANDLER( supertnk_interrupt_ack_w ) |
| 161 | 160 | { |
| 162 | cpunum_set_input_line( | |
| 161 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 163 | 162 | } |
| 164 | 163 | |
| 165 | 164 |
| r2454 | r2455 | |
|---|---|---|
| 125 | 125 | if (ACCESSING_BITS_0_7) |
| 126 | 126 | { |
| 127 | 127 | colorram[clr_offset] = data; |
| 128 | palette_set_color_rgb( | |
| 128 | palette_set_color_rgb(machine, clr_offset/3, | |
| 129 | 129 | pal6bit(colorram[(clr_offset/3)*3+0]), |
| 130 | 130 | pal6bit(colorram[(clr_offset/3)*3+1]), |
| 131 | 131 | pal6bit(colorram[(clr_offset/3)*3+2]) |
| r2454 | r2455 | |
|---|---|---|
| 1119 | 1119 | |
| 1120 | 1120 | static const struct AY8910interface equites_8910intf = |
| 1121 | 1121 | { |
| 1122 | AY8910_LEGACY_OUTPUT, | |
| 1123 | AY8910_DEFAULT_LOADS, | |
| 1122 | 1124 | 0, |
| 1123 | 1125 | 0, |
| 1124 | 1126 | equites_8910porta_w, |
| r2454 | r2455 | |
|---|---|---|
| 23 | 23 | */ |
| 24 | 24 | |
| 25 | 25 | #include "driver.h" |
| 26 | #include "deprecat.h" | |
| 27 | 26 | #include "machine/laserdsc.h" |
| 28 | 27 | |
| 29 | 28 | /* From daphne */ |
| r2454 | r2455 | |
| 134 | 133 | static WRITE8_HANDLER(nmi_line_w) |
| 135 | 134 | { |
| 136 | 135 | if (data == 0x00) |
| 137 | cpunum_set_input_line( | |
| 136 | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, ASSERT_LINE); | |
| 138 | 137 | if (data == 0x01) |
| 139 | cpunum_set_input_line( | |
| 138 | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, CLEAR_LINE); | |
| 140 | 139 | |
| 141 | 140 | if (data != 0x00 && data != 0x01) |
| 142 | 141 | logerror("NMI line got a weird value!\n"); |
| r2454 | r2455 | |
|---|---|---|
| 98 | 98 | gradius3_priority = data & 0x04; |
| 99 | 99 | |
| 100 | 100 | /* bit 3 enables cpu B */ |
| 101 | cpunum_set_input_line( | |
| 101 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, (data & 0x08) ? CLEAR_LINE : ASSERT_LINE); | |
| 102 | 102 | |
| 103 | 103 | /* bit 5 enables irq */ |
| 104 | 104 | irqAen = data & 0x20; |
| r2454 | r2455 | |
| 153 | 153 | |
| 154 | 154 | static WRITE16_HANDLER( sound_irq_w ) |
| 155 | 155 | { |
| 156 | cpunum_set_input_line_and_vector( | |
| 156 | cpunum_set_input_line_and_vector(machine, 2,0,HOLD_LINE,0xff); | |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | static WRITE8_HANDLER( sound_bank_w ) |
| r2454 | r2455 | |
|---|---|---|
| 217 | 217 | ***************************************************************************/ |
| 218 | 218 | |
| 219 | 219 | #include "driver.h" |
| 220 | #include "deprecat.h" | |
| 221 | 220 | #include "video/vector.h" |
| 222 | 221 | #include "video/avgdvg.h" |
| 223 | 222 | #include "sound/ay8910.h" |
| r2454 | r2455 | |
|---|---|---|
| 787 | 787 | |
| 788 | 788 | static const struct AY8910interface ay8910_interface = |
| 789 | 789 | { |
| 790 | AY8910_LEGACY_OUTPUT, | |
| 791 | AY8910_DEFAULT_LOADS, | |
| 790 | 792 | input_port_0_r, |
| 791 | 793 | input_port_1_r |
| 792 | 794 | }; |
| r2454 | r2455 | |
|---|---|---|
| 75 | 75 | ****************************************************************************/ |
| 76 | 76 | |
| 77 | 77 | #include "driver.h" |
| 78 | #include "deprecat.h" | |
| 79 | 78 | #include "cpu/m6809/m6809.h" |
| 80 | 79 | #include "sound/pokey.h" |
| 81 | 80 | #include "irobot.h" |
| r2454 | r2455 | |
| 103 | 102 | |
| 104 | 103 | static WRITE8_HANDLER( irobot_clearirq_w ) |
| 105 | 104 | { |
| 106 | cpunum_set_input_line( | |
| 105 | cpunum_set_input_line(machine, 0, M6809_IRQ_LINE ,CLEAR_LINE); | |
| 107 | 106 | } |
| 108 | 107 | |
| 109 | 108 | |
| 110 | 109 | static WRITE8_HANDLER( irobot_clearfirq_w ) |
| 111 | 110 | { |
| 112 | cpunum_set_input_line( | |
| 111 | cpunum_set_input_line(machine, 0, M6809_FIRQ_LINE ,CLEAR_LINE); | |
| 113 | 112 | } |
| 114 | 113 | |
| 115 | 114 |
| r2454 | r2455 | |
|---|---|---|
| 14 | 14 | ***************************************************************************/ |
| 15 | 15 | |
| 16 | 16 | #include "driver.h" |
| 17 | #include "deprecat.h" | |
| 18 | 17 | #include "cpu/m6800/m6800.h" |
| 19 | 18 | #include "sound/namco.h" |
| 20 | 19 | |
| r2454 | r2455 | |
| 80 | 79 | static WRITE8_HANDLER( skykid_subreset_w ) |
| 81 | 80 | { |
| 82 | 81 | int bit = !BIT(offset,11); |
| 83 | cpunum_set_input_line( | |
| 82 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, bit ? CLEAR_LINE : ASSERT_LINE); | |
| 84 | 83 | } |
| 85 | 84 | |
| 86 | 85 | static WRITE8_HANDLER( skykid_bankswitch_w ) |
| r2454 | r2455 | |
| 93 | 92 | int bit = !BIT(offset,11); |
| 94 | 93 | cpu_interrupt_enable(0,bit); |
| 95 | 94 | if (!bit) |
| 96 | cpunum_set_input_line( | |
| 95 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 97 | 96 | } |
| 98 | 97 | |
| 99 | 98 | static WRITE8_HANDLER( skykid_irq_2_ctrl_w ) |
| r2454 | r2455 | |
| 101 | 100 | int bit = !BIT(offset,13); |
| 102 | 101 | cpu_interrupt_enable(1,bit); |
| 103 | 102 | if (!bit) |
| 104 | cpunum_set_input_line( | |
| 103 | cpunum_set_input_line(machine, 1, 0, CLEAR_LINE); | |
| 105 | 104 | } |
| 106 | 105 | |
| 107 | 106 | static MACHINE_START( skykid ) |
| r2454 | r2455 | |
|---|---|---|
| 1002 | 1002 | if (i==0 || (i==4 && !data)) |
| 1003 | 1003 | { |
| 1004 | 1004 | blitter_busy = 0; |
| 1005 | if (firq_level) cpunum_set_input_line( | |
| 1005 | if (firq_level) cpunum_set_input_line(machine, 0, M6809_FIRQ_LINE, ASSERT_LINE); // make up delayed FIRQ's | |
| 1006 | 1006 | } |
| 1007 | 1007 | else |
| 1008 | 1008 | { |
| r2454 | r2455 | |
| 1163 | 1163 | g = d & 0x0c; g |= i; g = g<<4 | g; |
| 1164 | 1164 | b = d<<2 & 0x0c; b |= i; b = b<<4 | b; |
| 1165 | 1165 | |
| 1166 | palette_set_color(Machine, offset, MAKE_RGB(r, g, b)); | |
| 1167 | palette_set_color(Machine, offset+SP_2BACK, MAKE_RGB(r, g, b)); | |
| 1168 | palette_set_color(Machine, offset+SP_ALPHA, MAKE_RGB(r, g, b)); | |
| 1169 | palette_set_color(Machine, offset+SP_COLLD, MAKE_RGB(r, g, b)); | |
| 1166 | palette_set_color(machine, offset, MAKE_RGB(r, g, b)); | |
| 1167 | palette_set_color(machine, offset+SP_2BACK, MAKE_RGB(r, g, b)); | |
| 1168 | palette_set_color(machine, offset+SP_ALPHA, MAKE_RGB(r, g, b)); | |
| 1169 | palette_set_color(machine, offset+SP_COLLD, MAKE_RGB(r, g, b)); | |
| 1170 | 1170 | |
| 1171 | 1171 | halleys_decode_rgb(&r, &g, &b, offset, 0); |
| 1172 | palette_set_color( | |
| 1172 | palette_set_color(machine, offset+0x20, MAKE_RGB(r, g, b)); | |
| 1173 | 1173 | } |
| 1174 | 1174 | |
| 1175 | 1175 | |
| r2454 | r2455 | |
| 1568 | 1568 | io_ram[0x9c] = data; |
| 1569 | 1569 | |
| 1570 | 1570 | if (firq_level) firq_level--; |
| 1571 | cpunum_set_input_line( | |
| 1571 | cpunum_set_input_line(machine, 0, M6809_FIRQ_LINE, CLEAR_LINE); | |
| 1572 | 1572 | } |
| 1573 | 1573 | |
| 1574 | 1574 | |
| r2454 | r2455 | |
| 1940 | 1940 | |
| 1941 | 1941 | static const struct AY8910interface ay8910_interface = |
| 1942 | 1942 | { |
| 1943 | 0, | |
| 1944 | 0, | |
| 1945 | 0, | |
| 1943 | AY8910_LEGACY_OUTPUT, | |
| 1944 | AY8910_DEFAULT_LOADS, | |
| 1945 | NULL, | |
| 1946 | NULL, | |
| 1947 | NULL, | |
| 1946 | 1948 | sndnmi_msk_w // port Bwrite |
| 1947 | 1949 | }; |
| 1948 | 1950 |
| r2454 | r2455 | |
|---|---|---|
| 86 | 86 | g = (data >> 8) & 0xff; |
| 87 | 87 | b = (data >> 16) & 0xff; |
| 88 | 88 | |
| 89 | palette_set_color( | |
| 89 | palette_set_color(machine, offset, MAKE_RGB(r, g, b)); | |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | |
| r2454 | r2455 | |
| 212 | 212 | if (ACCESSING_BITS_0_15) |
| 213 | 213 | offset += 2; |
| 214 | 214 | |
| 215 | if ( | |
| 215 | if ( | |
| 216 | 216 | offset++; |
| 217 | 217 | |
| 218 | 218 | return mem8[offset] * 0x01010101; |
| r2454 | r2455 | |
| 232 | 232 | if (pending_vb_int && !DISABLE_VB_INT) |
| 233 | 233 | { |
| 234 | 234 | pending_vb_int = 0; |
| 235 | cpunum_set_input_line( | |
| 235 | cpunum_set_input_line(machine, 0, MC68000_IRQ_4, HOLD_LINE); | |
| 236 | 236 | } |
| 237 | 237 | } |
| 238 | 238 | } |
| r2454 | r2455 | |
| 310 | 310 | static READ32_DEVICE_HANDLER( ide_std_r ) |
| 311 | 311 | { |
| 312 | 312 | if (ACCESSING_BITS_0_7) |
| 313 | return ide_controller16_r(device, IDE_STD_OFFSET + offset, 0x | |
| 313 | return ide_controller16_r(device, IDE_STD_OFFSET + offset, 0x | |
| 314 | 314 | else |
| 315 | return ide_controller16_r(device, IDE_STD_OFFSET + offset, 0x | |
| 315 | return ide_controller16_r(device, IDE_STD_OFFSET + offset, 0xffff) << 16; | |
| 316 | 316 | } |
| 317 | 317 | |
| 318 | 318 | static WRITE32_DEVICE_HANDLER( ide_std_w ) |
| 319 | 319 | { |
| 320 | 320 | if (ACCESSING_BITS_0_7) |
| 321 | ide_controller16_w(device, IDE_STD_OFFSET + offset, data << 8, 0x | |
| 321 | ide_controller16_w(device, IDE_STD_OFFSET + offset, data << 8, 0x | |
| 322 | 322 | else |
| 323 | ide_controller16_w(device, IDE_STD_OFFSET + offset, data >> 16, 0x | |
| 323 | ide_controller16_w(device, IDE_STD_OFFSET + offset, data >> 16, 0xffff); | |
| 324 | 324 | } |
| 325 | 325 | |
| 326 | 326 | |
| 327 | 327 | static READ32_DEVICE_HANDLER( ide_alt_r ) |
| 328 | 328 | { |
| 329 | 329 | if (offset == 0) |
| 330 | return ide_controller16_r(device, IDE_ALT_OFFSET, 0x | |
| 330 | return ide_controller16_r(device, IDE_ALT_OFFSET, 0x | |
| 331 | 331 | |
| 332 | 332 | return 0; |
| 333 | 333 | } |
| r2454 | r2455 | |
| 335 | 335 | static WRITE32_DEVICE_HANDLER( ide_alt_w ) |
| 336 | 336 | { |
| 337 | 337 | if (offset == 0 && ACCESSING_BITS_16_23) |
| 338 | ide_controller16_w(device, IDE_ALT_OFFSET, data >> 24, 0x | |
| 338 | ide_controller16_w(device, IDE_ALT_OFFSET, data >> 24, 0x | |
| 339 | 339 | } |
| 340 | 340 | |
| 341 | 341 | |
| r2454 | r2455 | |
| 402 | 402 | |
| 403 | 403 | static WRITE32_HANDLER( unknown590000_w ) |
| 404 | 404 | { |
| 405 | //logerror("%08X: unknown 590000 write %08X: %08X & %08X\n", activecpu_get_previouspc(), offset, data, | |
| 405 | //logerror("%08X: unknown 590000 write %08X: %08X & %08X\n", activecpu_get_previouspc(), offset, data, | |
| 406 | 406 | } |
| 407 | 407 | |
| 408 | 408 | static WRITE32_HANDLER( unknown802000_w ) |
| 409 | 409 | { |
| 410 | //logerror("%08X: unknown 802000 write %08X: %08X & %08X\n", activecpu_get_previouspc(), offset, data, | |
| 410 | //logerror("%08X: unknown 802000 write %08X: %08X & %08X\n", activecpu_get_previouspc(), offset, data, | |
| 411 | 411 | } |
| 412 | 412 | |
| 413 | 413 | static WRITE32_HANDLER( unknownc02000_w ) |
| 414 | 414 | { |
| 415 | //logerror("%08X: unknown c02000 write %08X: %08X & %08X\n", activecpu_get_previouspc(), offset, data, | |
| 415 | //logerror("%08X: unknown c02000 write %08X: %08X & %08X\n", activecpu_get_previouspc(), offset, data, | |
| 416 | 416 | } |
| 417 | 417 | |
| 418 | 418 |
| r2454 | r2455 | |
|---|---|---|
| 250 | 250 | |
| 251 | 251 | if(!(data>>28)) |
| 252 | 252 | { |
| 253 | palette_set_color_rgb( | |
| 253 | palette_set_color_rgb(machine, PS7500_FIFO[1]&0xff, data&0xff,(data>>8)&0xff,(data>>16)&0xff); | |
| 254 | 254 | PS7500_FIFO[1]++; //autoinc |
| 255 | 255 | } |
| 256 | 256 | } |
| r2454 | r2455 | |
|---|---|---|
| 151 | 151 | ***********************************************************************************/ |
| 152 | 152 | |
| 153 | 153 | #include "driver.h" |
| 154 | #include "deprecat.h" | |
| 155 | 154 | #include "sound/ay8910.h" |
| 156 | 155 | #include "cpu/i8051/i8051.h" |
| 157 | 156 | #include "machine/i2cmem.h" |
| r2454 | r2455 | |
| 258 | 257 | bit2 = 0; |
| 259 | 258 | b = 0x21 * bit2 + 0x47 * bit1 + 0x97 * bit0; |
| 260 | 259 | |
| 261 | palette_set_color( | |
| 260 | palette_set_color(machine, (15 + (i*16)), MAKE_RGB(r, g, b)); | |
| 262 | 261 | } |
| 263 | 262 | } |
| 264 | 263 | |
| r2454 | r2455 | |
| 494 | 493 | /* Last Color in Every Palette is bgcolor */ |
| 495 | 494 | static READ8_HANDLER( peplus_bgcolor_r ) |
| 496 | 495 | { |
| 497 | return palette_get_color( | |
| 496 | return palette_get_color(machine, 15); // Return bgcolor from First Palette | |
| 498 | 497 | } |
| 499 | 498 | |
| 500 | 499 | static READ8_HANDLER( peplus_dropdoor_r ) |
| r2454 | r2455 | |
|---|---|---|
| 52 | 52 | */ |
| 53 | 53 | |
| 54 | 54 | #include "driver.h" |
| 55 | #include "deprecat.h" | |
| 56 | 55 | #include "sound/ay8910.h" |
| 57 | 56 | |
| 58 | 57 | static INT32 char_bank = 0; |
| r2454 | r2455 | |
| 381 | 380 | |
| 382 | 381 | static const struct AY8910interface ay8910_interface = |
| 383 | 382 | { |
| 384 | soundlatch_r | |
| 383 | AY8910_LEGACY_OUTPUT, | |
| 384 | AY8910_DEFAULT_LOADS, | |
| 385 | soundlatch_r, | |
| 386 | NULL, | |
| 387 | NULL, | |
| 388 | NULL | |
| 385 | 389 | }; |
| 386 | 390 | |
| 387 | 391 | static INTERRUPT_GEN( ddayjlc_interrupt ) |
| r2454 | r2455 | |
|---|---|---|
| 144 | 144 | */ |
| 145 | 145 | |
| 146 | 146 | #include "driver.h" |
| 147 | #include "deprecat.h" | |
| 148 | 147 | #include "system16.h" |
| 149 | 148 | #include "machine/8255ppi.h" |
| 150 | 149 | #include "cpu/i8039/i8039.h" |
| r2454 | r2455 | |
| 198 | 197 | |
| 199 | 198 | static const ppi8255_interface single_ppi_intf = |
| 200 | 199 | { |
| 201 | 1, | |
| 202 | { NULL }, | |
| 203 | { NULL }, | |
| 204 | { NULL }, | |
| 205 | { soundlatch_w }, | |
| 206 | { video_control_w }, | |
| 207 | { tilemap_sound_w } | |
| 200 | NULL, | |
| 201 | NULL, | |
| 202 | NULL, | |
| 203 | soundlatch_w, | |
| 204 | video_control_w, | |
| 205 | tilemap_sound_w | |
| 208 | 206 | }; |
| 209 | 207 | |
| 210 | 208 | |
| r2454 | r2455 | |
| 228 | 226 | custom_io_w = NULL; |
| 229 | 227 | lamp_changed_w = NULL; |
| 230 | 228 | i8751_vblank_hook = NULL; |
| 231 | ||
| 232 | /* configure the 8255 interface */ | |
| 233 | ppi8255_init(&single_ppi_intf); | |
| 234 | 229 | } |
| 235 | 230 | |
| 236 | 231 | |
| r2454 | r2455 | |
| 266 | 261 | |
| 267 | 262 | static TIMER_CALLBACK( delayed_ppi8255_w ) |
| 268 | 263 | { |
| 269 | ppi8255_ | |
| 264 | ppi8255_ | |
| 270 | 265 | } |
| 271 | 266 | |
| 272 | 267 | |
| r2454 | r2455 | |
| 276 | 271 | switch (offset & (0x3000/2)) |
| 277 | 272 | { |
| 278 | 273 | case 0x0000/2: |
| 279 | return ppi8255_ | |
| 274 | return ppi8255_ | |
| 280 | 275 | |
| 281 | 276 | case 0x1000/2: |
| 282 | 277 | return input_port_read_indexed(machine, offset & 3); |
| r2454 | r2455 | |
| 301 | 296 | timer_call_after_resynch(NULL, ((offset & 3) << 8) | (data & 0xff), delayed_ppi8255_w); |
| 302 | 297 | return; |
| 303 | 298 | } |
| 304 | logerror("%06X:standard_io_w - unknown write access to address %04X = %04X & %04X\n", activecpu_get_pc(), offset * 2, data, mem_mask | |
| 299 | logerror("%06X:standard_io_w - unknown write access to address %04X = %04X & %04X\n", activecpu_get_pc(), offset * 2, data, mem_mask | |
| 305 | 300 | } |
| 306 | 301 | |
| 307 | 302 | |
| r2454 | r2455 | |
| 380 | 375 | 0= Sound is disabled |
| 381 | 376 | 1= sound is enabled |
| 382 | 377 | */ |
| 383 | cpunum_set_input_line( | |
| 378 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE); | |
| 384 | 379 | segaic16_tilemap_set_colscroll(0, ~data & 0x04); |
| 385 | 380 | segaic16_tilemap_set_rowscroll(0, ~data & 0x02); |
| 386 | 381 | } |
| r2454 | r2455 | |
| 396 | 391 | static READ8_HANDLER( sound_data_r ) |
| 397 | 392 | { |
| 398 | 393 | /* assert ACK */ |
| 399 | ppi8255_set_portC( | |
| 394 | ppi8255_set_portC(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255" ), 0x00); | |
| 400 | 395 | return soundlatch_r(machine, offset); |
| 401 | 396 | } |
| 402 | 397 | |
| r2454 | r2455 | |
| 432 | 427 | D1 = /RESET line on 7751 |
| 433 | 428 | D0 = /IRQ line on 7751 |
| 434 | 429 | */ |
| 435 | cpunum_set_input_line(Machine, 2, INPUT_LINE_RESET, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE); | |
| 436 | cpunum_set_input_line(Machine, 2, 0, (data & 0x02) ? CLEAR_LINE : ASSERT_LINE); | |
| 430 | cpunum_set_input_line(machine, 2, INPUT_LINE_RESET, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE); | |
| 431 | cpunum_set_input_line(machine, 2, 0, (data & 0x02) ? CLEAR_LINE : ASSERT_LINE); | |
| 437 | 432 | cpu_boost_interleave(attotime_zero, ATTOTIME_IN_USEC(100)); |
| 438 | 433 | } |
| 439 | 434 | |
| r2454 | r2455 | |
| 553 | 548 | cpunum_set_input_line(machine, 0, 4, HOLD_LINE); |
| 554 | 549 | |
| 555 | 550 | /* X scroll values */ |
| 556 | segaic16_textram_0_w(machine, 0xff8/2, workram[0x0d14/2], 0); | |
| 557 | segaic16_textram_0_w(machine, 0xffa/2, workram[0x0d18/2], 0); | |
| 551 | segaic16_textram_0_w(machine, 0xff8/2, workram[0x0d14/2], 0xffff); | |
| 552 | segaic16_textram_0_w(machine, 0xffa/2, workram[0x0d18/2], 0xffff); | |
| 558 | 553 | |
| 559 | 554 | /* page values */ |
| 560 | segaic16_textram_0_w(machine, 0xe9e/2, workram[0x0d1c/2], 0); | |
| 561 | segaic16_textram_0_w(machine, 0xe9c/2, workram[0x0d1e/2], 0); | |
| 555 | segaic16_textram_0_w(machine, 0xe9e/2, workram[0x0d1c/2], 0xffff); | |
| 556 | segaic16_textram_0_w(machine, 0xe9c/2, workram[0x0d1e/2], 0xffff); | |
| 562 | 557 | } |
| 563 | 558 | |
| 564 | 559 | |
| r2454 | r2455 | |
| 1792 | 1787 | MDRV_MACHINE_RESET(system16a) |
| 1793 | 1788 | MDRV_NVRAM_HANDLER(system16a) |
| 1794 | 1789 | |
| 1790 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 1791 | MDRV_DEVICE_CONFIG( single_ppi_intf ) | |
| 1792 | ||
| 1795 | 1793 | /* video hardware */ |
| 1796 | 1794 | MDRV_SCREEN_ADD("main", RASTER) |
| 1797 | 1795 | MDRV_SCREEN_REFRESH_RATE(60) |
| r2454 | r2455 | |
|---|---|---|
| 309 | 309 | |
| 310 | 310 | static WRITE8_HANDLER( audio_cpu_clear_nmi_w ) |
| 311 | 311 | { |
| 312 | cpunum_set_input_line( | |
| 312 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, CLEAR_LINE); | |
| 313 | 313 | } |
| 314 | 314 | |
| 315 | 315 | |
| r2454 | r2455 | |
| 562 | 562 | static WRITE16_HANDLER( audio_command_w ) |
| 563 | 563 | { |
| 564 | 564 | /* accessing the LSB only is not mapped */ |
| 565 | if (mem_mask != 0x | |
| 565 | if (mem_mask != 0x | |
| 566 | 566 | { |
| 567 | 567 | soundlatch_w(machine, 0, data >> 8); |
| 568 | 568 | |
| r2454 | r2455 | |
| 1013 | 1013 | |
| 1014 | 1014 | /* reset system control registers */ |
| 1015 | 1015 | for (offs = 0; offs < 8; offs++) |
| 1016 | system_control_w(machine, offs, 0, 0x | |
| 1016 | system_control_w(machine, offs, 0, 0x | |
| 1017 | 1017 | |
| 1018 | 1018 | neogeo_reset_rng(); |
| 1019 | 1019 |
| r0 | r2455 | |
|---|---|---|
| 1 | /********************************************************************************** | |
| 2 | ||
| 3 | ||
| 4 | SNOOKER 10 / SANDII' | |
| 5 | ||
| 6 | Driver by Roberto Fresca. | |
| 7 | ||
| 8 | ||
| 9 | Games running on this hardware: | |
| 10 | ||
| 11 | * Snooker 10 (Ver 1.11), Sandii', 1998. | |
| 12 | * Apple 10 (Ver 1.21), Sandii', 1998. | |
| 13 | * Ten Balls (Ver 1.05), unknown, 1997. | |
| 14 | ||
| 15 | ||
| 16 | *********************************************************************************** | |
| 17 | ||
| 18 | ||
| 19 | The hardware is generally composed by: | |
| 20 | ||
| 21 | ||
| 22 | CPU: 1x 65SC02 at 2MHz. | |
| 23 | ||
| 24 | Sound: 1x OKI6295 | |
| 25 | 1x LM358N | |
| 26 | 1x TDA2003 | |
| 27 | ||
| 28 | HD-PLD: 2x AMD MACH231-15-JC/1-18JI/1 | |
| 29 | (2x Lattice ispLSI1024-60LJ for earlier revisions) | |
| 30 | ||
| 31 | RAM: 1x 76C88AL-15, SRAM 8Kx8 | |
| 32 | NVRAM: 1x 76C88AL-15, SRAM 8Kx8 (battery backed) | |
| 33 | ROMs: 4x 27C256 | |
| 34 | (3x 27C256 for earlier revisions) | |
| 35 | 1x 27C020 | |
| 36 | ||
| 37 | PROMs: 1x 82S147 or similar. (512 bytes) | |
| 38 | ||
| 39 | Clock: 1x Crystal: 16MHz. | |
| 40 | ||
| 41 | Other: 1x 28x2 edge connector. | |
| 42 | 1x 15 legs connector. | |
| 43 | 1x trimmer (volume). | |
| 44 | 1x 8 DIP switches. | |
| 45 | 1x 3.5 Volt, 55-80 mAh battery. | |
| 46 | ||
| 47 | ||
| 48 | *************************************************************************************** | |
| 49 | ||
| 50 | ||
| 51 | All the supported games have been coded using some Funworld games as point to start, | |
| 52 | changing hardware accesses, program logics, graphics, plus protection and some I/O | |
| 53 | through the 2x high density PLDs. | |
| 54 | ||
| 55 | ||
| 56 | Color palettes are normally stored in format RRRBBBGG inside a bipolar color PROM | |
| 57 | (old hardware), or repeated 64 times inside a regular 27c256 ROM (new hardware). | |
| 58 | ||
| 59 | - bits - | |
| 60 | 7654 3210 | |
| 61 | ---- -xxx Red component. | |
| 62 | --xx x--- Blue component. | |
| 63 | xx-- ---- Green component. | |
| 64 | ||
| 65 | ||
| 66 | Same as Funworld video hardware, this one was designed to manage 4096 tiles with a | |
| 67 | size of 8x4 pixels each. Also support 4bpp graphics and the palette limitation is | |
| 68 | 8 bits for color codes (256 x 16 colors). It means the hardware was designed for more | |
| 69 | elaborated graphics than these games... | |
| 70 | ||
| 71 | Color PROMs from current games are 512 bytes lenght, but they only use the first 256 bytes. | |
| 72 | ||
| 73 | Normal hardware capabilities: | |
| 74 | ||
| 75 | - bits - | |
| 76 | 7654 3210 | |
| 77 | xxxx xx-- tiles color (game tiles) ;codes 0x00-0xdc | |
| 78 | xxx- x-xx tiles color (title). :codes 0xe9-0xeb | |
| 79 | xxxx -xxx tiles color (background). ;codes 0xf1-0xf7 | |
| 80 | ||
| 81 | ||
| 82 | --- Issues / Protection --- | |
| 83 | ||
| 84 | * Apple 10 | |
| 85 | ||
| 86 | - Tiles and color palette are totally scrambled. | |
| 87 | ||
| 88 | ||
| 89 | ||
| 90 | *********************************************************************************** | |
| 91 | ||
| 92 | ||
| 93 | Memory Map | |
| 94 | ---------- | |
| 95 | ||
| 96 | ||
| 97 | $0000 - $0FFF NVRAM ;All registers and settings. | |
| 98 | ||
| 99 | $1000 - $1000 ??? ;R/W | |
| 100 | $3000 - $3004 Input Ports ;Reads | |
| 101 | $5000 - $5001 ??? ;Writes | |
| 102 | ||
| 103 | $6000 - $6FFF VideoRAM | |
| 104 | $7000 - $7FFF ColorRAM | |
| 105 | ||
| 106 | $8000 - $FFFF ROM Space | |
| 107 | ||
| 108 | ||
| 109 | ||
| 110 | *********************************************************************************** | |
| 111 | ||
| 112 | ||
| 113 | *** Driver Updates *** | |
| 114 | ||
| 115 | ||
| 116 | [2008/04/18] | |
| 117 | - Initial release. Support for snookr10, apple10 and tenballs. | |
| 118 | - Added technical/general notes. | |
| 119 | ||
| 120 | ||
| 121 | *** TO DO *** | |
| 122 | ||
| 123 | - Inputs. | |
| 124 | - Figure out the high-density PLDs, or get a dump of them. | |
| 125 | - Figure out the sound. | |
| 126 | ||
| 127 | ||
| 128 | ***********************************************************************************/ | |
| 129 | ||
| 130 | ||
| 131 | #define MASTER_CLOCK XTAL_16MHz | |
| 132 | ||
| 133 | #include "driver.h" | |
| 134 | ||
| 135 | ||
| 136 | /* from video */ | |
| 137 | WRITE8_HANDLER( snookr10_videoram_w ); | |
| 138 | WRITE8_HANDLER( snookr10_colorram_w ); | |
| 139 | PALETTE_INIT( snookr10 ); | |
| 140 | VIDEO_START( snookr10 ); | |
| 141 | VIDEO_UPDATE( snookr10 ); | |
| 142 | ||
| 143 | ||
| 144 | /************************* | |
| 145 | * Memory map information * | |
| 146 | *************************/ | |
| 147 | ||
| 148 | static ADDRESS_MAP_START( snookr10_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 149 | AM_RANGE(0x0000, 0x0fff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) | |
| 150 | // AM_RANGE(0x1000, 0x1000) AM_READNOP /* R/W */ | |
| 151 | // AM_RANGE(0x3000, 0x3004) AM_READNOP /* reads (input port) */ | |
| 152 | // AM_RANGE(0x5000, 0x5001) AM_READNOP /* writes */ | |
| 153 | AM_RANGE(0x6000, 0x6fff) AM_RAM_WRITE(snookr10_videoram_w) AM_BASE(&videoram) | |
| 154 | AM_RANGE(0x7000, 0x7fff) AM_RAM AM_WRITE(snookr10_colorram_w) AM_BASE(&colorram) | |
| 155 | AM_RANGE(0x8000, 0xffff) AM_ROM | |
| 156 | ADDRESS_MAP_END | |
| 157 | ||
| 158 | ||
| 159 | /************************* | |
| 160 | * Input ports * | |
| 161 | *************************/ | |
| 162 | ||
| 163 | static INPUT_PORTS_START( snookr10 ) | |
| 164 | INPUT_PORTS_END | |
| 165 | ||
| 166 | ||
| 167 | /************************* | |
| 168 | * Graphics Layouts * | |
| 169 | *************************/ | |
| 170 | ||
| 171 | static const gfx_layout charlayout = | |
| 172 | { | |
| 173 | 4,8, | |
| 174 | RGN_FRAC(1,2), | |
| 175 | 4, | |
| 176 | { RGN_FRAC(0,2), RGN_FRAC(0,2) + 4, RGN_FRAC(1,2), RGN_FRAC(1,2) + 4 }, | |
| 177 | { 0, 1, 2, 3 }, | |
| 178 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, | |
| 179 | 8*4*2 | |
| 180 | }; | |
| 181 | ||
| 182 | ||
| 183 | /****************************** | |
| 184 | * Graphics Decode Information * | |
| 185 | ******************************/ | |
| 186 | ||
| 187 | static GFXDECODE_START( snookr10 ) | |
| 188 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, charlayout, 0, 16 ) | |
| 189 | GFXDECODE_END | |
| 190 | ||
| 191 | ||
| 192 | /************************** | |
| 193 | * Machine Drivers * | |
| 194 | **************************/ | |
| 195 | ||
| 196 | static MACHINE_DRIVER_START( snookr10 ) | |
| 197 | /* basic machine hardware */ | |
| 198 | MDRV_CPU_ADD_TAG("main", M65SC02, MASTER_CLOCK/8) /* 2MHz */ | |
| 199 | MDRV_CPU_PROGRAM_MAP(snookr10_map, 0) | |
| 200 | MDRV_CPU_VBLANK_INT("main", nmi_line_pulse) | |
| 201 | ||
| 202 | MDRV_NVRAM_HANDLER(generic_0fill) | |
| 203 | ||
| 204 | /* video hardware */ | |
| 205 | ||
| 206 | MDRV_SCREEN_ADD("main", RASTER) | |
| 207 | MDRV_SCREEN_REFRESH_RATE(60) | |
| 208 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) | |
| 209 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 210 | MDRV_SCREEN_SIZE((128+1)*4, (30+1)*8) | |
| 211 | MDRV_SCREEN_VISIBLE_AREA(0*4, 96*4-1, 0*8, 30*8-1) | |
| 212 | ||
| 213 | MDRV_GFXDECODE(snookr10) | |
| 214 | ||
| 215 | MDRV_PALETTE_LENGTH(0x200) | |
| 216 | MDRV_PALETTE_INIT(snookr10) | |
| 217 | MDRV_VIDEO_START(snookr10) | |
| 218 | MDRV_VIDEO_UPDATE(snookr10) | |
| 219 | ||
| 220 | MACHINE_DRIVER_END | |
| 221 | ||
| 222 | ||
| 223 | /************************* | |
| 224 | * Rom Load * | |
| 225 | *************************/ | |
| 226 | ||
| 227 | ROM_START( snookr10 ) | |
| 228 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 229 | ROM_LOAD( "1.u2", 0x8000, 0x8000, CRC(216ccb2d) SHA1(d86270cd03a08f6fd3e7b327b8173f66da28e5e8) ) | |
| 230 | ||
| 231 | /* the first 256 bytes looks as a samples table */ | |
| 232 | ROM_REGION( 0x40000, REGION_CPU2, 0 ) | |
| 233 | ROM_LOAD( "4.u18", 0x00000, 0x40000 , CRC(17090d56) SHA1(3a4c247f96c80f8cf4c1389b273880c5ea6fc39d) ) | |
| 234 | ||
| 235 | ROM_REGION( 0x10000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 236 | ROM_LOAD( "2.u22", 0x0000, 0x8000, CRC(a70d9c48) SHA1(3fa90190323526553866662afda4dbe1c94abeff) ) | |
| 237 | ROM_LOAD( "3.u25", 0x8000, 0x8000, CRC(3009faaa) SHA1(d1cda455b270cb9afa65b9701735a3a1f2a48df2) ) | |
| 238 | ||
| 239 | /* this should be changed because the palette is stored in a normal ROM instead of a color PROM */ | |
| 240 | ROM_REGION( 0x8000, REGION_PROMS, 0 ) | |
| 241 | ROM_LOAD( "5.u27", 0x0000, 0x8000, CRC(f3d7d640) SHA1(f78060f4603e316fa3c2ec4ba6d7edf261cf6d8a) ) | |
| 242 | ROM_END | |
| 243 | ||
| 244 | ROM_START( apple10 ) | |
| 245 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 246 | ROM_LOAD( "1.u2", 0x8000, 0x8000, CRC(7d538566) SHA1(2e805157010c366ab1f2313a2bedb071c1dde733) ) | |
| 247 | ||
| 248 | /* the first 256 bytes looks as a samples table */ | |
| 249 | ROM_REGION( 0x40000, REGION_CPU2, 0 ) | |
| 250 | ROM_LOAD( "4.u18", 0x00000, 0x40000 , CRC(17090d56) SHA1(3a4c247f96c80f8cf4c1389b273880c5ea6fc39d) ) | |
| 251 | ||
| 252 | ROM_REGION( 0x10000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 253 | ROM_LOAD( "2.u22", 0x0000, 0x8000, CRC(42b016f4) SHA1(59d1b77f8cb706a3878813111c6a71514c413784) ) | |
| 254 | ROM_LOAD( "3.u25", 0x8000, 0x8000, CRC(afc535dc) SHA1(ed2d65f3154c6d80b7b22bfef1f30232e4496128) ) | |
| 255 | ||
| 256 | /* this should be changed because the palette is stored in a normal ROM instead of a color PROM */ | |
| 257 | ROM_REGION( 0x8000, REGION_PROMS, 0 ) | |
| 258 | ROM_LOAD( "5.u27", 0x0000, 0x8000, CRC(3510d705) SHA1(2190c8199d29bf89e3007eb771cc6b0e2b58f6cd) ) | |
| 259 | ROM_END | |
| 260 | ||
| 261 | ROM_START( tenballs ) | |
| 262 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) | |
| 263 | ROM_LOAD( "4.u2", 0x8000, 0x8000, CRC(2f334862) SHA1(61d57995451b6bc7de23900c460c3e073993899c) ) | |
| 264 | ||
| 265 | /* the first 256 bytes looks as a samples table */ | |
| 266 | ROM_REGION( 0x40000, REGION_CPU2, 0 ) | |
| 267 | ROM_LOAD( "1.u28", 0x00000, 0x40000 , CRC(17090d56) SHA1(3a4c247f96c80f8cf4c1389b273880c5ea6fc39d) ) | |
| 268 | ||
| 269 | ROM_REGION( 0x10000, REGION_GFX1, ROMREGION_DISPOSE ) | |
| 270 | ROM_LOAD( "3.u16", 0x0000, 0x8000, CRC(9eb88a08) SHA1(ab52924103e2b14c598a21c3d77b053da37a0212) ) | |
| 271 | ROM_LOAD( "2.u15", 0x8000, 0x8000, CRC(a5091583) SHA1(c0775d9b77cb634d3702b6c08cdf73c867b6169a) ) | |
| 272 | ||
| 273 | ROM_REGION( 0x0200, REGION_PROMS, 0 ) | |
| 274 | ROM_LOAD( "82s147.u17", 0x0000, 0x0200, CRC(20234dcc) SHA1(197937bbec0201888467e250bdba49e39aa4204a) ) | |
| 275 | ROM_END | |
| 276 | ||
| 277 | ||
| 278 | /************************* | |
| 279 | * Game Drivers * | |
| 280 | *************************/ | |
| 281 | ||
| 282 | /* YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS */ | |
| 283 | GAME( 1998, snookr10, 0, snookr10, snookr10, 0, ROT0, "Sandii'", "Snooker 10 (Ver 1.11)", GAME_NO_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) | |
| 284 | GAME( 1998, apple10, 0, snookr10, snookr10, 0, ROT0, "Sandii'", "Apple 10 (Ver 1.21)", GAME_NO_SOUND | GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_GRAPHICS | GAME_WRONG_COLORS | GAME_NOT_WORKING ) | |
| 285 | GAME( 1997, tenballs, 0, snookr10, snookr10, 0, ROT0, "unknown", "Ten Balls (Ver 1.05)", GAME_NO_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) |
| r2454 | r2455 | |
|---|---|---|
| 440 | 440 | if (konamigx_wrport1_1 & 0x10) |
| 441 | 441 | { |
| 442 | 442 | gx_rdport1_3 &= ~8; |
| 443 | cpunum_set_input_line( | |
| 443 | cpunum_set_input_line(machine, 0, 4, HOLD_LINE); | |
| 444 | 444 | } |
| 445 | 445 | } |
| 446 | 446 | else |
| r2454 | r2455 | |
| 559 | 559 | { |
| 560 | 560 | // enable 68k |
| 561 | 561 | // clear the halt condition and reset the 68000 |
| 562 | cpunum_set_input_line(Machine, 1, INPUT_LINE_HALT, CLEAR_LINE); | |
| 563 | cpunum_set_input_line(Machine, 1, INPUT_LINE_RESET, PULSE_LINE); | |
| 562 | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, CLEAR_LINE); | |
| 563 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, PULSE_LINE); | |
| 564 | 564 | } |
| 565 | 565 | else |
| 566 | 566 | { |
| 567 | 567 | // disable 68k |
| 568 | cpunum_set_input_line( | |
| 568 | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, ASSERT_LINE); | |
| 569 | 569 | } |
| 570 | 570 | |
| 571 | 571 | K053246_set_OBJCHA_line((data&0x100000) ? ASSERT_LINE : CLEAR_LINE); |
| r2454 | r2455 | |
| 594 | 594 | static READ32_HANDLER(waitskip_r) |
| 595 | 595 | { |
| 596 | 596 | UINT32 data = gx_workram[waitskip.offs+offset]; |
| 597 | mem_mask = ~mem_mask; | |
| 598 | 597 | |
| 599 | 598 | if (activecpu_get_pc() == waitskip.pc && (data & mem_mask) == (waitskip.data & mem_mask)) |
| 600 | 599 | { |
| r2454 | r2455 | |
| 629 | 628 | // vblank interrupt ACK |
| 630 | 629 | if (ACCESSING_BITS_24_31) |
| 631 | 630 | { |
| 632 | cpunum_set_input_line( | |
| 631 | cpunum_set_input_line(machine, 0, 1, CLEAR_LINE); | |
| 633 | 632 | gx_syncen |= 0x20; |
| 634 | 633 | } |
| 635 | 634 | |
| 636 | 635 | // hblank interrupt ACK |
| 637 | 636 | if (ACCESSING_BITS_8_15) |
| 638 | 637 | { |
| 639 | cpunum_set_input_line( | |
| 638 | cpunum_set_input_line(machine, 0, 2, CLEAR_LINE); | |
| 640 | 639 | gx_syncen |= 0x40; |
| 641 | 640 | } |
| 642 | 641 | } |
| r2454 | r2455 | |
| 1097 | 1096 | if (konamigx_wrport1_1 & 0x10) |
| 1098 | 1097 | { |
| 1099 | 1098 | gx_rdport1_3 &= ~8; |
| 1100 | cpunum_set_input_line( | |
| 1099 | cpunum_set_input_line(machine, 0, 4, HOLD_LINE); | |
| 1101 | 1100 | } |
| 1102 | 1101 | |
| 1103 | 1102 | // don't accidentally do a phony command |
| r2454 | r2455 | |
|---|---|---|
| 63 | 63 | * |
| 64 | 64 | *************************************/ |
| 65 | 65 | |
| 66 | static const ppi8255_interface hangon_ppi_intf = | |
| 66 | static const ppi8255_interface hangon_ppi_intf[2] = | |
| 67 | 67 | { |
| 68 | 2, | |
| 69 | { NULL, NULL }, | |
| 70 | { NULL, NULL }, | |
| 71 | { NULL, adc_status_r }, | |
| 72 | { soundlatch_w, sub_control_adc_w }, | |
| 73 | { video_lamps_w, NULL }, | |
| 74 | { tilemap_sound_w, NULL } | |
| 68 | { | |
| 69 | NULL, | |
| 70 | NULL, | |
| 71 | NULL, | |
| 72 | soundlatch_w, | |
| 73 | video_lamps_w, | |
| 74 | tilemap_sound_w | |
| 75 | }, | |
| 76 | { | |
| 77 | NULL, | |
| 78 | NULL, | |
| 79 | adc_status_r, | |
| 80 | sub_control_adc_w, | |
| 81 | NULL, | |
| 82 | NULL | |
| 83 | } | |
| 75 | 84 | }; |
| 76 | 85 | |
| 77 | 86 | |
| r2454 | r2455 | |
| 84 | 93 | |
| 85 | 94 | static void hangon_generic_init(void) |
| 86 | 95 | { |
| 87 | /* configure the 8255 interface */ | |
| 88 | ppi8255_init(&hangon_ppi_intf); | |
| 89 | ||
| 90 | 96 | /* reset the custom handlers and other pointers */ |
| 91 | 97 | i8751_vblank_hook = NULL; |
| 92 | 98 | } |
| r2454 | r2455 | |
| 138 | 144 | |
| 139 | 145 | static TIMER_CALLBACK( delayed_ppi8255_w ) |
| 140 | 146 | { |
| 141 | ppi8255_ | |
| 147 | ppi8255_ | |
| 142 | 148 | } |
| 143 | 149 | |
| 144 | 150 | |
| r2454 | r2455 | |
| 147 | 153 | switch (offset & 0x3020/2) |
| 148 | 154 | { |
| 149 | 155 | case 0x0000/2: /* PPI @ 4B */ |
| 150 | return ppi8255_ | |
| 156 | return ppi8255_ | |
| 151 | 157 | |
| 152 | 158 | case 0x1000/2: /* Input ports and DIP switches */ |
| 153 | 159 | return input_port_read_indexed(machine, offset & 3); |
| 154 | 160 | |
| 155 | 161 | case 0x3000/2: /* PPI @ 4C */ |
| 156 | return ppi8255_ | |
| 162 | return ppi8255_ | |
| 157 | 163 | |
| 158 | 164 | case 0x3020/2: /* ADC0804 data output */ |
| 159 | 165 | return input_port_read_indexed(machine, 4 + adc_select); |
| 160 | 166 | } |
| 161 | 167 | |
| 162 | 168 | logerror("%06X:hangon_io_r - unknown read access to address %04X\n", activecpu_get_pc(), offset * 2); |
| 163 | return segaic16_open_bus_r(machine,0, | |
| 169 | return segaic16_open_bus_r(machine,0,mem_mask); | |
| 164 | 170 | } |
| 165 | 171 | |
| 166 | 172 | |
| r2454 | r2455 | |
| 176 | 182 | return; |
| 177 | 183 | |
| 178 | 184 | case 0x3000/2: /* PPI @ 4C */ |
| 179 | ppi8255_ | |
| 185 | ppi8255_ | |
| 180 | 186 | return; |
| 181 | 187 | |
| 182 | 188 | case 0x3020/2: /* ADC0804 */ |
| 183 | 189 | return; |
| 184 | 190 | } |
| 185 | 191 | |
| 186 | logerror("%06X:hangon_io_w - unknown write access to address %04X = %04X & %04X\n", activecpu_get_pc(), offset * 2, data, mem_mask | |
| 192 | logerror("%06X:hangon_io_w - unknown write access to address %04X = %04X & %04X\n", activecpu_get_pc(), offset * 2, data, mem_mask | |
| 187 | 193 | } |
| 188 | 194 | |
| 189 | 195 | |
| r2454 | r2455 | |
| 192 | 198 | switch (offset & 0x0030/2) |
| 193 | 199 | { |
| 194 | 200 | case 0x0000/2: |
| 195 | return ppi8255_ | |
| 201 | return ppi8255_ | |
| 196 | 202 | |
| 197 | 203 | case 0x0010/2: /* Input ports and DIP switches */ |
| 198 | 204 | return input_port_read_indexed(machine, offset & 3); |
| 199 | 205 | |
| 200 | 206 | case 0x0020/2: /* PPI @ 4C */ |
| 201 | 207 | if (offset == 2) return 0; |
| 202 | return ppi8255_ | |
| 208 | return ppi8255_ | |
| 203 | 209 | |
| 204 | 210 | case 0x0030/2: /* ADC0804 data output */ |
| 205 | 211 | return input_port_read_indexed(machine, 4 + adc_select); |
| 206 | 212 | } |
| 207 | 213 | |
| 208 | 214 | logerror("%06X:sharrier_io_r - unknown read access to address %04X\n", activecpu_get_pc(), offset * 2); |
| 209 | return segaic16_open_bus_r(machine,0, | |
| 215 | return segaic16_open_bus_r(machine,0,mem_mask); | |
| 210 | 216 | } |
| 211 | 217 | |
| 212 | 218 | |
| r2454 | r2455 | |
| 222 | 228 | return; |
| 223 | 229 | |
| 224 | 230 | case 0x0020/2: /* PPI @ 4C */ |
| 225 | ppi8255_ | |
| 231 | ppi8255_ | |
| 226 | 232 | return; |
| 227 | 233 | |
| 228 | 234 | case 0x0030/2: /* ADC0804 */ |
| 229 | 235 | return; |
| 230 | 236 | } |
| 231 | 237 | |
| 232 | logerror("%06X:sharrier_io_w - unknown write access to address %04X = %04X & %04X\n", activecpu_get_pc(), offset * 2, data, mem_mask | |
| 238 | logerror("%06X:sharrier_io_w - unknown write access to address %04X = %04X & %04X\n", activecpu_get_pc(), offset * 2, data, mem_mask | |
| 233 | 239 | } |
| 234 | 240 | |
| 235 | 241 | |
| r2454 | r2455 | |
| 272 | 278 | /* D2 : SCONT1 - Tilemap origin bit 1 */ |
| 273 | 279 | /* D1 : SCONT0 - Tilemap origin bit 0 */ |
| 274 | 280 | /* D0 : MUTE (1= audio on, 0= audio off) */ |
| 275 | cpunum_set_input_line( | |
| 281 | cpunum_set_input_line(machine, 2, INPUT_LINE_NMI, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE); | |
| 276 | 282 | segaic16_tilemap_set_colscroll(0, ~data & 0x04); |
| 277 | 283 | segaic16_tilemap_set_rowscroll(0, ~data & 0x02); |
| 278 | 284 | sound_global_enable(data & 0x01); |
| r2454 | r2455 | |
| 285 | 291 | /* D6 : INTR line on second CPU */ |
| 286 | 292 | /* D5 : RESET line on second CPU */ |
| 287 | 293 | /* D3-D2 : ADC_SELECT */ |
| 288 | cpunum_set_input_line(Machine, 1, 4, (data & 0x40) ? CLEAR_LINE : ASSERT_LINE); | |
| 289 | cpunum_set_input_line(Machine, 1, INPUT_LINE_RESET, (data & 0x20) ? ASSERT_LINE : CLEAR_LINE); | |
| 294 | cpunum_set_input_line(machine, 1, 4, (data & 0x40) ? CLEAR_LINE : ASSERT_LINE); | |
| 295 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, (data & 0x20) ? ASSERT_LINE : CLEAR_LINE); | |
| 290 | 296 | adc_select = (data >> 2) & 3; |
| 291 | 297 | } |
| 292 | 298 | |
| r2454 | r2455 | |
| 346 | 352 | static READ8_HANDLER( sound_data_r ) |
| 347 | 353 | { |
| 348 | 354 | /* assert ACK */ |
| 349 | ppi8255_set_portC(0, 0x00); | |
| 355 | ppi8255_set_portC(device_list_find_by_tag( machine->config->devicelist, PPI8255, "ppi8255_0" ), 0x00); | |
| 350 | 356 | return soundlatch_r(machine, offset); |
| 351 | 357 | } |
| 352 | 358 | |
| r2454 | r2455 | |
| 796 | 802 | |
| 797 | 803 | static const struct YM2203interface ym2203_interface = |
| 798 | 804 | { |
| 799 | 0,0,0,0,sound_irq | |
| 805 | { | |
| 806 | AY8910_LEGACY_OUTPUT, | |
| 807 | AY8910_DEFAULT_LOADS, | |
| 808 | NULL, NULL, NULL, NULL | |
| 809 | }, | |
| 810 | sound_irq | |
| 800 | 811 | }; |
| 801 | 812 | |
| 802 | 813 | |
| r2454 | r2455 | |
| 857 | 868 | MDRV_MACHINE_RESET(hangon) |
| 858 | 869 | MDRV_INTERLEAVE(100) |
| 859 | 870 | |
| 871 | MDRV_DEVICE_ADD( "ppi8255_0", PPI8255 ) | |
| 872 | MDRV_DEVICE_CONFIG( hangon_ppi_intf[0] ) | |
| 873 | ||
| 874 | MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 ) | |
| 875 | MDRV_DEVICE_CONFIG( hangon_ppi_intf[1] ) | |
| 876 | ||
| 860 | 877 | /* video hardware */ |
| 861 | 878 | MDRV_GFXDECODE(segahang) |
| 862 | 879 | MDRV_PALETTE_LENGTH(2048*3) |
| r2454 | r2455 | |
|---|---|---|
| 272 | 272 | /* these are set as input, but I have no idea which input port it uses is for the AY */ |
| 273 | 273 | static const struct AY8910interface ay8910_interface = |
| 274 | 274 | { |
| 275 | AY8910_LEGACY_OUTPUT, | |
| 276 | AY8910_DEFAULT_LOADS, | |
| 275 | 277 | unknown_r, |
| 276 | 278 | unknown_r, |
| 279 | NULL, | |
| 280 | NULL | |
| 277 | 281 | }; |
| 278 | 282 | |
| 279 | 283 | static PALETTE_INIT(carrera) |
| r2454 | r2455 | |
|---|---|---|
| 129 | 129 | UINT16 result = shared_ram[offset]; |
| 130 | 130 | |
| 131 | 131 | /* look for a byte access, and then check for the high bit and a TAS opcode */ |
| 132 | if (mem_mask != 0 && (result & | |
| 132 | if (mem_mask != 0xffff && (result & | |
| 133 | 133 | { |
| 134 | 134 | offs_t ppc = activecpu_get_previouspc(); |
| 135 | 135 | if (ppc < 0xa0000) |
| r2454 | r2455 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "deprecat.h" | |
| 11 | 10 | #include "cpu/z80/z80.h" |
| 12 | 11 | #include "cpu/m68000/m68000.h" |
| 13 | 12 | #include "video/konamiic.h" |
| r2454 | r2455 | |
| 105 | 104 | static WRITE16_HANDLER( sound_irq_trigger_w ) |
| 106 | 105 | { |
| 107 | 106 | if (ACCESSING_BITS_0_7) |
| 108 | cpunum_set_input_line( | |
| 107 | cpunum_set_input_line(machine, 1,INPUT_LINE_NMI,PULSE_LINE); | |
| 109 | 108 | } |
| 110 | 109 | |
| 111 | 110 |
| r2454 | r2455 | |
|---|---|---|
| 100 | 100 | |
| 101 | 101 | static WRITE8_HANDLER( parodius_sh_irqtrigger_w ) |
| 102 | 102 | { |
| 103 | cpunum_set_input_line_and_vector( | |
| 103 | cpunum_set_input_line_and_vector(machine, 1,0,HOLD_LINE,0xff); | |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | #if 0 |
| r2454 | r2455 | |
| 122 | 122 | static WRITE8_HANDLER( sound_arm_nmi_w ) |
| 123 | 123 | { |
| 124 | 124 | // sound_nmi_enabled = 1; |
| 125 | cpunum_set_input_line( | |
| 125 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, CLEAR_LINE); | |
| 126 | 126 | timer_set(ATTOTIME_IN_USEC(50), NULL,0,nmi_callback); /* kludge until the K053260 is emulated correctly */ |
| 127 | 127 | } |
| 128 | 128 |
| r2454 | r2455 | |
|---|---|---|
| 250 | 250 | |
| 251 | 251 | static const struct AY8910interface ay8910_interface_1 = |
| 252 | 252 | { |
| 253 | 0, | |
| 253 | AY8910_LEGACY_OUTPUT, | |
| 254 | AY8910_DEFAULT_LOADS, | |
| 255 | NULL, | |
| 254 | 256 | soundlatch_r, |
| 255 | 257 | dipsw_w, |
| 256 | | |
| 258 | NULL | |
| 257 | 259 | }; |
| 258 | 260 | |
| 259 | 261 | static const struct AY8910interface ay8910_interface_2 = |
| 260 | 262 | { |
| 263 | AY8910_LEGACY_OUTPUT, | |
| 264 | AY8910_DEFAULT_LOADS, | |
| 261 | 265 | input_port_2_r, |
| 262 | input_port_3_r | |
| 266 | input_port_3_r, | |
| 267 | NULL, | |
| 268 | NULL | |
| 263 | 269 | }; |
| 264 | 270 | |
| 265 | 271 | /* Machine Driver */ |
| r2454 | r2455 | |
|---|---|---|
| 118 | 118 | ***************************************************************************/ |
| 119 | 119 | |
| 120 | 120 | #include "driver.h" |
| 121 | #include "deprecat.h" | |
| 122 | 121 | #include "cpu/z80/z80.h" |
| 123 | 122 | #include "sound/2203intf.h" |
| 124 | 123 | #include "sound/upd7759.h" |
| r2454 | r2455 | |
| 214 | 213 | |
| 215 | 214 | static WRITE8_HANDLER( combasc_sh_irqtrigger_w ) |
| 216 | 215 | { |
| 217 | cpunum_set_input_line_and_vector( | |
| 216 | cpunum_set_input_line_and_vector(machine, 1,0,HOLD_LINE,0xff); | |
| 218 | 217 | } |
| 219 | 218 | |
| 220 | 219 | static WRITE8_HANDLER( combasc_play_w ) |
| r2454 | r2455 | |
| 642 | 641 | |
| 643 | 642 | static const struct YM2203interface ym2203_interface = |
| 644 | 643 | { |
| 645 | 0, | |
| 646 | 0, | |
| 647 | combasc_portA_w, | |
| 648 | 0 | |
| 644 | { | |
| 645 | AY8910_LEGACY_OUTPUT, | |
| 646 | AY8910_DEFAULT_LOADS, | |
| 647 | NULL, | |
| 648 | NULL, | |
| 649 | combasc_portA_w, | |
| 650 | NULL | |
| 651 | }, | |
| 652 | NULL | |
| 649 | 653 | }; |
| 650 | 654 | |
| 651 | 655 | static const struct upd7759_interface upd7759_interface = |
| r2454 | r2455 | |
|---|---|---|
| 48 | 48 | ***************************************************************************/ |
| 49 | 49 | |
| 50 | 50 | #include "driver.h" |
| 51 | #include "deprecat.h" | |
| 52 | 51 | #include "cpu/m6809/m6809.h" |
| 53 | 52 | #include "cpu/hd6309/hd6309.h" |
| 54 | 53 | #include "video/konamiic.h" |
| r2454 | r2455 | |
|---|---|---|
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | 8 | #include "driver.h" |
| 9 | #include "deprecat.h" | |
| 10 | 9 | #include "machine/eeprom.h" |
| 11 | 10 | #include "cpu/sh2/sh2.h" |
| 12 | 11 | #include "machine/stvprot.h" |
| r2454 | r2455 | |
| 273 | 272 | static READ32_HANDLER( hanagumi_slave_off ) |
| 274 | 273 | { |
| 275 | 274 | /* just turn the slave off, i don't think the game needs it */ |
| 276 | cpunum_set_input_line( | |
| 275 | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, ASSERT_LINE); | |
| 277 | 276 | |
| 278 | 277 | return stv_workram_h[0x015438/4]; |
| 279 | 278 | } |
| r2454 | r2455 | |
| 464 | 463 | |
| 465 | 464 | if ( data != 0 ) dnmtdeka_pending_commands++; |
| 466 | 465 | //logerror( "CMD: Written by cpu=%d, at = %08X, offset = %08X, data = %08X, commands = %d\n", cpu_getactivecpu(), activecpu_get_pc(), offset, data, dnmtdeka_pending_commands ); |
| 467 | cpu_trigger( | |
| 466 | cpu_trigger(machine, 1000); | |
| 468 | 467 | } |
| 469 | 468 | |
| 470 | 469 | static READ32_HANDLER(dnmtdeka_cmd_read) |
| r2454 | r2455 | |
| 513 | 512 | |
| 514 | 513 | if ( data != 0 ) diehard_pending_commands++; |
| 515 | 514 | //logerror( "CMD: Written by cpu=%d, at = %08X, offset = %08X, data = %08X, commands = %d\n", cpu_getactivecpu(), activecpu_get_pc(), offset, data, diehard_pending_commands ); |
| 516 | cpu_trigger( | |
| 515 | cpu_trigger(machine, 1000); | |
| 517 | 516 | } |
| 518 | 517 | |
| 519 | 518 | static READ32_HANDLER(diehard_cmd_read) |
| r2454 | r2455 | |
| 537 | 536 | if ( (stv_workram_h[0x000e0dd8/4] & 0xff000000) == 0 && |
| 538 | 537 | diehard_pending_commands == 0 ) |
| 539 | 538 | { |
| 540 | cpu_trigger( | |
| 539 | cpu_trigger(machine, 1000); | |
| 541 | 540 | } |
| 542 | 541 | return stv_workram_h[0x000e0dd8/4]; |
| 543 | 542 | } |
| r2454 | r2455 | |
| 556 | 555 | { |
| 557 | 556 | //logerror( "CMDACK: Write by cpu=%d, at = %08X, offset = %08X, data = %08X, commands = %d\n", cpu_getactivecpu(), activecpu_get_pc(), offset, data, diehard_pending_commands ); |
| 558 | 557 | COMBINE_DATA(&stv_workram_h[0x000e0dd8/4]); |
| 559 | cpu_trigger( | |
| 558 | cpu_trigger(machine, 1000); | |
| 560 | 559 | } |
| 561 | 560 | |
| 562 | 561 | DRIVER_INIT(diehard) |
| r2454 | r2455 | |
| 566 | 565 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x060986ac, 0x060986af, 0, 0, diehard_speedup_r ); |
| 567 | 566 | memory_install_write32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x060e0bd0, 0x060e0dcf, 0, 0, diehard_cmd_write ); |
| 568 | 567 | memory_install_read32_handler(machine, 1, ADDRESS_SPACE_PROGRAM, 0x060e0bd0, 0x060e0dcf, 0, 0, diehard_cmd_read ); |
| 569 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x060e0dd8, 0x060e0dd8, 0, 0, diehard_cmd_ack_read ); | |
| 570 | memory_install_write32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x060e0dd8, 0x060e0dd8, 0, 0, diehard_cmd_ack_write_cpu0 ); | |
| 571 | memory_install_write32_handler(machine, 1, ADDRESS_SPACE_PROGRAM, 0x060e0dd8, 0x060e0dd8, 0, 0, diehard_cmd_ack_write ); | |
| 568 | memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x060e0dd8, 0x060e0ddb, 0, 0, diehard_cmd_ack_read ); | |
| 569 | memory_install_write32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x060e0dd8, 0x060e0ddb, 0, 0, diehard_cmd_ack_write_cpu0 ); | |
| 570 | memory_install_write32_handler(machine, 1, ADDRESS_SPACE_PROGRAM, 0x060e0dd8, 0x060e0ddb, 0, 0, diehard_cmd_ack_write ); | |
| 572 | 571 | |
| 573 | 572 | |
| 574 | 573 | DRIVER_INIT_CALL(ic13); |
| r2454 | r2455 | |
| 617 | 616 | |
| 618 | 617 | static READ32_HANDLER( bakubaku_speedup2_r ) |
| 619 | 618 | { |
| 620 | if (activecpu_get_pc()==0x06033762) cpunum_set_input_line( | |
| 619 | if (activecpu_get_pc()==0x06033762) cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, ASSERT_LINE); | |
| 621 | 620 | |
| 622 | 621 | return stv_workram_h[0x0033762/4]; |
| 623 | 622 | } |
| r2454 | r2455 | |
| 669 | 668 | /* |
| 670 | 669 | static READ32_HANDLER( groovef_second_cpu_off_r ) |
| 671 | 670 | { |
| 672 | if (activecpu_get_pc()==0x060060c2) cpunum_set_input_line( | |
| 671 | if (activecpu_get_pc()==0x060060c2) cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, ASSERT_LINE); | |
| 673 | 672 | return 0; |
| 674 | 673 | } |
| 675 | 674 | */ |
| r2454 | r2455 | |
|---|---|---|
| 105 | 105 | |
| 106 | 106 | static WRITE16_HANDLER( paldat_w ) |
| 107 | 107 | { |
| 108 | palette_set_color_rgb( | |
| 108 | palette_set_color_rgb(machine,paloff & 0x7fff,pal5bit(data>>0),pal5bit(data>>5),pal5bit(data>>10)); | |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | static READ16_HANDLER( peno_rand ) |
| r2454 | r2455 | |
|---|---|---|
| 42 | 42 | */ |
| 43 | 43 | |
| 44 | 44 | #include "driver.h" |
| 45 | #include "deprecat.h" | |
| 46 | 45 | #include "sound/okim6295.h" |
| 47 | 46 | |
| 48 | 47 | static UINT8 *egghunt_bgram; |
| r2454 | r2455 | |
|---|---|---|
| 147 | 147 | sound_nmi_enable = 1; |
| 148 | 148 | if (pending_nmi) |
| 149 | 149 | { |
| 150 | cpunum_set_input_line( | |
| 150 | cpunum_set_input_line(machine, 1,INPUT_LINE_NMI,PULSE_LINE); | |
| 151 | 151 | pending_nmi = 0; |
| 152 | 152 | } |
| 153 | 153 | } |
| r2454 | r2455 | |
| 407 | 407 | |
| 408 | 408 | static const struct AY8910interface ay8910_interface_1 = |
| 409 | 409 | { |
| 410 | 0, | |
| 411 | 0, | |
| 410 | AY8910_LEGACY_OUTPUT, | |
| 411 | AY8910_DEFAULT_LOADS, | |
| 412 | NULL, | |
| 413 | NULL, | |
| 412 | 414 | portA_0_w, |
| 413 | 415 | portB_0_w |
| 414 | 416 | }; |
| 415 | 417 | |
| 416 | 418 | static const struct AY8910interface ay8910_interface_2 = |
| 417 | 419 | { |
| 418 | 0, | |
| 419 | 0, | |
| 420 | AY8910_LEGACY_OUTPUT, | |
| 421 | AY8910_DEFAULT_LOADS, | |
| 422 | NULL, | |
| 423 | NULL, | |
| 420 | 424 | portA_1_w, |
| 421 | 425 | portB_1_w |
| 422 | 426 | }; |
| r2454 | r2455 | |
|---|---|---|
| 81 | 81 | |
| 82 | 82 | |
| 83 | 83 | #include "driver.h" |
| 84 | #include "deprecat.h" | |
| 85 | 84 | #include "cpu/m68000/m68000.h" |
| 86 | 85 | #include "genesis.h" |
| 87 | 86 | |
| r2454 | r2455 | |
| 280 | 279 | b = ((newword >> 7) & 0x1e) | ((newword >> 14) & 0x01); |
| 281 | 280 | |
| 282 | 281 | /* set the color */ |
| 283 | palette_set_color_rgb( | |
| 282 | palette_set_color_rgb(machine, offset, pal5bit(r), pal5bit(g), pal5bit(b)); | |
| 284 | 283 | } |
| 285 | 284 | |
| 286 | 285 |
| r2454 | r2455 | |
|---|---|---|
| 14 | 14 | ***************************************************************************/ |
| 15 | 15 | |
| 16 | 16 | #include "driver.h" |
| 17 | #include "deprecat.h" | |
| 18 | 17 | #include "cpu/m6809/m6809.h" |
| 19 | 18 | #include "cpu/z80/z80.h" |
| 20 | 19 | #include "cpu/i8039/i8039.h" |
| r2454 | r2455 | |
| 55 | 54 | other bytes unknown */ |
| 56 | 55 | |
| 57 | 56 | switch (offset){ |
| 58 | case 0x00: if (!data) cpunum_set_input_line( | |
| 57 | case 0x00: if (!data) cpunum_set_input_line(machine, 0, M6809_IRQ_LINE, CLEAR_LINE); | |
| 59 | 58 | irq_enable_a = data; |
| 60 | 59 | break; |
| 61 | 60 | case 0x02: coin_counter_w(0,data & 0x01); |
| r2454 | r2455 | |
| 64 | 63 | break; |
| 65 | 64 | case 0x05: pandoras_flipscreen_w(machine, 0, data); |
| 66 | 65 | break; |
| 67 | case 0x06: if (!data) cpunum_set_input_line( | |
| 66 | case 0x06: if (!data) cpunum_set_input_line(machine, 1, M6809_IRQ_LINE, CLEAR_LINE); | |
| 68 | 67 | irq_enable_b = data; |
| 69 | 68 | break; |
| 70 | case 0x07: cpunum_set_input_line( | |
| 69 | case 0x07: cpunum_set_input_line(machine, 1,INPUT_LINE_NMI,PULSE_LINE); | |
| 71 | 70 | break; |
| 72 | 71 | |
| 73 | 72 | default: |
| r2454 | r2455 | |
| 77 | 76 | |
| 78 | 77 | static WRITE8_HANDLER( pandoras_cpua_irqtrigger_w ){ |
| 79 | 78 | if (!firq_old_data_a && data){ |
| 80 | cpunum_set_input_line( | |
| 79 | cpunum_set_input_line(machine, 0,M6809_FIRQ_LINE,HOLD_LINE); | |
| 81 | 80 | } |
| 82 | 81 | |
| 83 | 82 | firq_old_data_a = data; |
| r2454 | r2455 | |
| 85 | 84 | |
| 86 | 85 | static WRITE8_HANDLER( pandoras_cpub_irqtrigger_w ){ |
| 87 | 86 | if (!firq_old_data_b && data){ |
| 88 | cpunum_set_input_line( | |
| 87 | cpunum_set_input_line(machine, 1,M6809_FIRQ_LINE,HOLD_LINE); | |
| 89 | 88 | } |
| 90 | 89 | |
| 91 | 90 | firq_old_data_b = data; |
| r2454 | r2455 | |
| 93 | 92 | |
| 94 | 93 | static WRITE8_HANDLER( pandoras_i8039_irqtrigger_w ) |
| 95 | 94 | { |
| 96 | cpunum_set_input_line( | |
| 95 | cpunum_set_input_line(machine, 3, 0, ASSERT_LINE); | |
| 97 | 96 | } |
| 98 | 97 | |
| 99 | 98 | static WRITE8_HANDLER( i8039_irqen_and_status_w ) |
| 100 | 99 | { |
| 101 | 100 | /* bit 7 enables IRQ */ |
| 102 | 101 | if ((data & 0x80) == 0) |
| 103 | cpunum_set_input_line( | |
| 102 | cpunum_set_input_line(machine, 3, 0, CLEAR_LINE); | |
| 104 | 103 | |
| 105 | 104 | /* bit 5 goes to 8910 port A */ |
| 106 | 105 | i8039_status = (data & 0x20) >> 5; |
| r2454 | r2455 | |
| 108 | 107 | |
| 109 | 108 | static WRITE8_HANDLER( pandoras_z80_irqtrigger_w ) |
| 110 | 109 | { |
| 111 | cpunum_set_input_line_and_vector( | |
| 110 | cpunum_set_input_line_and_vector(machine, 2,0,HOLD_LINE,0xff); | |
| 112 | 111 | } |
| 113 | 112 | |
| 114 | 113 | |
| r2454 | r2455 | |
| 370 | 369 | |
| 371 | 370 | static const struct AY8910interface ay8910_interface = |
| 372 | 371 | { |
| 372 | AY8910_LEGACY_OUTPUT, | |
| 373 | AY8910_DEFAULT_LOADS, | |
| 373 | 374 | pandoras_portA_r, // not used |
| 374 | pandoras_portB_r | |
| 375 | pandoras_portB_r, | |
| 376 | NULL, | |
| 377 | NULL | |
| 375 | 378 | }; |
| 376 | 379 | |
| 377 | 380 | static MACHINE_DRIVER_START( pandoras ) |
| r2454 | r2455 | |
|---|---|---|
| 359 | 359 | switch (offset) |
| 360 | 360 | { |
| 361 | 361 | case 0x00: |
| 362 | return input_port_ | |
| 362 | return input_port_ | |
| 363 | 363 | |
| 364 | 364 | case 0x01: |
| 365 | return input_port_ | |
| 365 | return input_port_ | |
| 366 | 366 | } |
| 367 | 367 | |
| 368 | 368 | logerror("CPU #0 PC %06x: warning - read unmapped dsw_r offset %06x\n",activecpu_get_pc(),offset); |
| r2454 | r2455 | |
| 375 | 375 | switch (offset) |
| 376 | 376 | { |
| 377 | 377 | case 0x00: |
| 378 | return input_port_ | |
| 378 | return input_port_ | |
| 379 | 379 | |
| 380 | 380 | case 0x01: |
| 381 | return input_port_ | |
| 381 | return input_port_ | |
| 382 | 382 | |
| 383 | 383 | case 0x02: |
| 384 | return input_port_ | |
| 384 | return input_port_ | |
| 385 | 385 | |
| 386 | 386 | } |
| 387 | 387 | |
| r2454 | r2455 | |
| 395 | 395 | switch (offset) |
| 396 | 396 | { |
| 397 | 397 | case 0x00: |
| 398 | return input_port_ | |
| 398 | return input_port_ | |
| 399 | 399 | |
| 400 | 400 | case 0x01: |
| 401 | return input_port_ | |
| 401 | return input_port_ | |
| 402 | 402 | |
| 403 | 403 | case 0x02: |
| 404 | return input_port_ | |
| 404 | return input_port_ | |
| 405 | 405 | |
| 406 | 406 | // case 0x03: |
| 407 | // return (coin_word & | |
| 407 | // return (coin_word & | |
| 408 | 408 | |
| 409 | 409 | case 0x05: |
| 410 | return input_port_ | |
| 410 | return input_port_ | |
| 411 | 411 | |
| 412 | 412 | case 0x06: |
| 413 | return input_port_ | |
| 413 | return input_port_ | |
| 414 | 414 | |
| 415 | 415 | case 0x07: |
| 416 | return input_port_ | |
| 416 | return input_port_ | |
| 417 | 417 | |
| 418 | 418 | case 0x08: |
| 419 | return input_port_ | |
| 419 | return input_port_ | |
| 420 | 420 | } |
| 421 | 421 | |
| 422 | 422 | logerror("CPU #0 PC %06x: warning - read unmapped input offset %06x\n",activecpu_get_pc(),offset); |
| r2454 | r2455 | |
| 429 | 429 | switch (offset) |
| 430 | 430 | { |
| 431 | 431 | case 0x00: |
| 432 | return (input_port_ | |
| 432 | return (input_port_ | |
| 433 | 433 | |
| 434 | 434 | case 0x01: |
| 435 | return (input_port_ | |
| 435 | return (input_port_ | |
| 436 | 436 | |
| 437 | 437 | case 0x02: |
| 438 | return (input_port_ | |
| 438 | return (input_port_ | |
| 439 | 439 | |
| 440 | 440 | case 0x03: |
| 441 | return (input_port_ | |
| 441 | return (input_port_ | |
| 442 | 442 | |
| 443 | 443 | case 0x04: |
| 444 | return (input_port_ | |
| 444 | return (input_port_ | |
| 445 | 445 | |
| 446 | 446 | case 0x05: |
| 447 | return (input_port_ | |
| 447 | return (input_port_ | |
| 448 | 448 | |
| 449 | 449 | case 0x06: |
| 450 | return (input_port_ | |
| 450 | return (input_port_ | |
| 451 | 451 | |
| 452 | 452 | // case 0x07: |
| 453 | // return (coin_word & | |
| 453 | // return (coin_word & | |
| 454 | 454 | } |
| 455 | 455 | |
| 456 | 456 | logerror("CPU #0 PC %06x: warning - read unmapped input offset %06x\n",activecpu_get_pc(),offset); |
| r2454 | r2455 | |
| 466 | 466 | switch (offset) |
| 467 | 467 | { |
| 468 | 468 | case 0x00: |
| 469 | curr = input_port_ | |
| 469 | curr = input_port_ | |
| 470 | 470 | res = curr - last[0]; |
| 471 | 471 | last[0] = curr; |
| 472 | 472 | return res; |
| 473 | 473 | |
| 474 | 474 | case 0x02: |
| 475 | curr = input_port_ | |
| 475 | curr = input_port_ | |
| 476 | 476 | res = curr - last[1]; |
| 477 | 477 | last[1] = curr; |
| 478 | 478 | return res; |
| r2454 | r2455 | |
| 488 | 488 | switch (offset) |
| 489 | 489 | { |
| 490 | 490 | case 0x00: |
| 491 | return input_port_ | |
| 491 | return input_port_ | |
| 492 | 492 | |
| 493 | 493 | case 0x01: |
| 494 | return input_port_ | |
| 494 | return input_port_ | |
| 495 | 495 | } |
| 496 | 496 | |
| 497 | 497 | logerror("CPU #0 PC %06x: warning - read unmapped paddle offset %06x\n",activecpu_get_pc(),offset); |
| r2454 | r2455 | |
| 504 | 504 | switch (offset) |
| 505 | 505 | { |
| 506 | 506 | case 0x00: |
| 507 | return input_port_ | |
| 507 | return input_port_ | |
| 508 | 508 | |
| 509 | 509 | case 0x01: |
| 510 | return input_port_ | |
| 510 | return input_port_ | |
| 511 | 511 | |
| 512 | 512 | case 0x02: |
| 513 | return input_port_ | |
| 513 | return input_port_ | |
| 514 | 514 | |
| 515 | 515 | // case 0x03: |
| 516 | // return (coin_word & | |
| 516 | // return (coin_word & | |
| 517 | 517 | |
| 518 | 518 | case 0x05: |
| 519 | return input_port_ | |
| 519 | return input_port_ | |
| 520 | 520 | |
| 521 | 521 | case 0x06: |
| 522 | return input_port_ | |
| 522 | return input_port_ | |
| 523 | 523 | } |
| 524 | 524 | |
| 525 | 525 | logerror("CPU #0 PC %06x: warning - read unmapped input offset %06x\n",activecpu_get_pc(),offset); |
| r2454 | r2455 | |
| 533 | 533 | { |
| 534 | 534 | case 0x00: |
| 535 | 535 | { |
| 536 | return (input_port_ | |
| 536 | return (input_port_ | |
| 537 | 537 | } |
| 538 | 538 | |
| 539 | 539 | case 0x01: |
| 540 | 540 | { |
| 541 | return (input_port_ | |
| 541 | return (input_port_ | |
| 542 | 542 | } |
| 543 | 543 | } |
| 544 | 544 | |
| r2454 | r2455 | |
| 552 | 552 | switch (mjnquest_input) |
| 553 | 553 | { |
| 554 | 554 | case 0x01: |
| 555 | return input_port_ | |
| 555 | return input_port_ | |
| 556 | 556 | |
| 557 | 557 | case 0x02: |
| 558 | return input_port_ | |
| 558 | return input_port_ | |
| 559 | 559 | |
| 560 | 560 | case 0x04: |
| 561 | return input_port_ | |
| 561 | return input_port_ | |
| 562 | 562 | |
| 563 | 563 | case 0x08: |
| 564 | return input_port_ | |
| 564 | return input_port_ | |
| 565 | 565 | |
| 566 | 566 | case 0x10: |
| 567 | return input_port_ | |
| 567 | return input_port_ | |
| 568 | 568 | |
| 569 | 569 | } |
| 570 | 570 | |
| r2454 | r2455 | |
| 583 | 583 | switch (offset) |
| 584 | 584 | { |
| 585 | 585 | case 0x00: |
| 586 | return input_port_ | |
| 586 | return input_port_ | |
| 587 | 587 | |
| 588 | 588 | case 0x01: |
| 589 | return input_port_ | |
| 589 | return input_port_ | |
| 590 | 590 | } |
| 591 | 591 | |
| 592 | 592 | logerror("CPU #0 PC %06x: warning - read unmapped input_r offset %06x\n",activecpu_get_pc(),offset); |
| r2454 | r2455 | |
| 599 | 599 | switch (offset) |
| 600 | 600 | { |
| 601 | 601 | case 0x00: |
| 602 | return input_port_ | |
| 602 | return input_port_ | |
| 603 | 603 | |
| 604 | 604 | case 0x01: |
| 605 | return input_port_ | |
| 605 | return input_port_ | |
| 606 | 606 | |
| 607 | 607 | case 0x02: |
| 608 | return input_port_ | |
| 608 | return input_port_ | |
| 609 | 609 | } |
| 610 | 610 | |
| 611 | 611 | logerror("CPU #0 PC %06x: warning - read unmapped input_r offset %06x\n",activecpu_get_pc(),offset); |
| r2454 | r2455 | |
| 618 | 618 | switch (offset) |
| 619 | 619 | { |
| 620 | 620 | case 0x00: |
| 621 | return input_port_ | |
| 621 | return input_port_ | |
| 622 | 622 | |
| 623 | 623 | /* case 0x01 only used if "printer" DSW is on, and appears to |
| 624 | 624 | be printer status byte */ |
| 625 | 625 | |
| 626 | 626 | case 0x02: |
| 627 | return input_port_ | |
| 627 | return input_port_ | |
| 628 | 628 | } |
| 629 | 629 | |
| 630 | 630 | logerror("CPU #0 PC %06x: warning - read unmapped input_r offset %06x\n",activecpu_get_pc(),offset); |
| r2454 | r2455 | |
| 642 | 642 | |
| 643 | 643 | if (yesnoj_dsw) |
| 644 | 644 | { |
| 645 | return input_port_ | |
| 645 | return input_port_ | |
| 646 | 646 | } |
| 647 | 647 | else |
| 648 | 648 | { |
| 649 | return input_port_ | |
| 649 | return input_port_ | |
| 650 | 650 | } |
| 651 | 651 | } |
| 652 | 652 | |
| r2454 | r2455 | |
| 846 | 846 | |
| 847 | 847 | static READ8_HANDLER( driveout_sound_command_r) |
| 848 | 848 | { |
| 849 | cpunum_set_input_line( | |
| 849 | cpunum_set_input_line(machine, 1,0,CLEAR_LINE); | |
| 850 | 850 | // logerror("sound IRQ OFF (sound command=%02x)\n",driveout_sound_latch); |
| 851 | 851 | return driveout_sound_latch; |
| 852 | 852 | } |
| r2454 | r2455 | |
| 887 | 887 | else |
| 888 | 888 | { |
| 889 | 889 | driveout_sound_latch = ((data<<4) & 0xf0) | (driveout_sound_latch & 0x0f); |
| 890 | cpunum_set_input_line ( | |
| 890 | cpunum_set_input_line (machine, 1, 0, ASSERT_LINE); | |
| 891 | 891 | } |
| 892 | 892 | } |
| 893 | 893 | } |
| r2454 | r2455 | |
| 3839 | 3839 | |
| 3840 | 3840 | static const struct YM2203interface ym2203_interface = |
| 3841 | 3841 | { |
| 3842 | 0, /* portA read */ | |
| 3843 | 0, | |
| 3844 | camltrya_porta_w, /* portA write - not implemented */ | |
| 3845 | 0, /* portB write */ | |
| 3842 | { | |
| 3843 | AY8910_LEGACY_OUTPUT, | |
| 3844 | AY8910_DEFAULT_LOADS, | |
| 3845 | NULL, /* portA read */ | |
| 3846 | NULL, | |
| 3847 | camltrya_porta_w, /* portA write - not implemented */ | |
| 3848 | NULL, /* portB write */ | |
| 3849 | }, | |
| 3846 | 3850 | irq_handler |
| 3847 | 3851 | }; |
| 3848 | 3852 |
| r2454 | r2455 | |
|---|---|---|
| 197 | 197 | |
| 198 | 198 | static READ8_HANDLER( gottlieb_track_0_r ) |
| 199 | 199 | { |
| 200 | return input_port_ | |
| 200 | return input_port_ | |
| 201 | 201 | } |
| 202 | 202 | |
| 203 | 203 | static READ8_HANDLER( gottlieb_track_1_r ) |
| 204 | 204 | { |
| 205 | return input_port_ | |
| 205 | return input_port_ | |
| 206 | 206 | } |
| 207 | 207 | |
| 208 | 208 | static WRITE8_HANDLER( gottlieb_track_reset_w ) |
| 209 | 209 | { |
| 210 | 210 | /* reset the trackball counters */ |
| 211 | track[0] = input_port_2_r(machine, offset); | |
| 212 | track[1] = input_port_3_r(machine, offset); | |
| 211 | track[0] = input_port_read_indexed(machine, 2); | |
| 212 | track[1] = input_port_read_indexed(machine, 3); | |
| 213 | 213 | } |
| 214 | 214 | |
| 215 | 215 | static int joympx; |
| r2454 | r2455 | |
|---|---|---|
| 422 | 422 | |
| 423 | 423 | static const struct YM2203interface ym2203_intf_sandscrp = |
| 424 | 424 | { |
| 425 | input_port_4_r, /* Port A Read - DSW 1 */ | |
| 426 | input_port_5_r, /* Port B Read - DSW 2 */ | |
| 427 | 0, /* Port A Write */ | |
| 428 | 0, /* Port B Write */ | |
| 425 | { | |
| 426 | AY8910_LEGACY_OUTPUT, | |
| 427 | AY8910_DEFAULT_LOADS, | |
| 428 | input_port_4_r, /* Port A Read - DSW 1 */ | |
| 429 | input_port_5_r, /* Port B Read - DSW 2 */ | |
| 430 | NULL, /* Port A Write */ | |
| 431 | NULL, /* Port B Write */ | |
| 432 | }, | |
| 429 | 433 | irq_handler /* IRQ handler */ |
| 430 | 434 | }; |
| 431 | 435 |
| r2454 | r2455 | |
|---|---|---|
| 257 | 257 | |
| 258 | 258 | /* logerror("PAL WRITE index : %x rgb : %d %d %d (real %x) at %x\n", pal_index, r,g,b, data, offset); */ |
| 259 | 259 | |
| 260 | palette_set_color( | |
| 260 | palette_set_color(machine, pal_index, MAKE_RGB(r, g, b)); | |
| 261 | 261 | } |
| 262 | 262 | |
| 263 | 263 | /* PROGRAM MAP */ |
| r2454 | r2455 | |
|---|---|---|
| 281 | 281 | ---- ---- ---- --x- (Activate Test) |
| 282 | 282 | ---- ---- ---- ---x (Advance Thru Tests) |
| 283 | 283 | */ |
| 284 | return input_port_ | |
| 284 | return input_port_ | |
| 285 | 285 | case 0x0014/2: |
| 286 | 286 | /* |
| 287 | 287 | write 0x40,read (~0x08) |
| r2454 | r2455 | |
| 315 | 315 | xxxx xxxx ---- ---- DIPSW4 |
| 316 | 316 | ---- ---- xxxx xxxx DIPSW3 |
| 317 | 317 | */ |
| 318 | return input_port_ | |
| 318 | return input_port_ | |
| 319 | 319 | } |
| 320 | 320 | return ac_devram[offset]; |
| 321 | 321 | } |
| r2454 | r2455 | |
|---|---|---|
| 10 | 10 | ***************************************************************************/ |
| 11 | 11 | |
| 12 | 12 | #include "driver.h" |
| 13 | #include "deprecat.h" | |
| 14 | 13 | #include "video/konamiic.h" |
| 15 | 14 | #include "cpu/z80/z80.h" |
| 16 | 15 | #include "machine/eeprom.h" |
| r2454 | r2455 | |
| 68 | 67 | /* bit 8 is EEPROM data */ |
| 69 | 68 | /* bit 9 is EEPROM ready */ |
| 70 | 69 | /* bit 10 is service button */ |
| 71 | res = (EEPROM_read_bit()<<8) | input_port_ | |
| 70 | res = (EEPROM_read_bit()<<8) | input_port_ | |
| 72 | 71 | |
| 73 | 72 | if (init_eeprom_count) |
| 74 | 73 | { |
| r2454 | r2455 | |
|---|---|---|
| 168 | 168 | |
| 169 | 169 | static WRITE8_HANDLER( main_cpu_irq_line_clear_w ) |
| 170 | 170 | { |
| 171 | cpunum_set_input_line( | |
| 171 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 172 | 172 | logerror("CPU#0 VBLANK int clear at scanline=%3i\n", curr_scanline); |
| 173 | 173 | return; |
| 174 | 174 | } |
| r2454 | r2455 | |
| 204 | 204 | |
| 205 | 205 | static WRITE8_HANDLER( second_cpu_irq_line_clear_w ) |
| 206 | 206 | { |
| 207 | cpunum_set_input_line( | |
| 207 | cpunum_set_input_line(machine, 1, 0, CLEAR_LINE); | |
| 208 | 208 | logerror("CPU#1 VBLANK int clear at scanline=%3i\n", curr_scanline); |
| 209 | 209 | return; |
| 210 | 210 | } |
| r2454 | r2455 | |
| 239 | 239 | |
| 240 | 240 | static READ8_HANDLER( tubep_sound_irq_ack ) |
| 241 | 241 | { |
| 242 | cpunum_set_input_line( | |
| 242 | cpunum_set_input_line(machine, 2, 0, CLEAR_LINE); | |
| 243 | 243 | return 0; |
| 244 | 244 | } |
| 245 | 245 | |
| r2454 | r2455 | |
| 409 | 409 | static WRITE8_HANDLER( rjammer_soundlatch_w ) |
| 410 | 410 | { |
| 411 | 411 | sound_latch = data; |
| 412 | cpunum_set_input_line( | |
| 412 | cpunum_set_input_line(machine, 2, INPUT_LINE_NMI, PULSE_LINE); | |
| 413 | 413 | } |
| 414 | 414 | |
| 415 | 415 | |
| r2454 | r2455 | |
| 594 | 594 | I do it here because this port (0x80) is first one accessed |
| 595 | 595 | in the interrupt routine. |
| 596 | 596 | */ |
| 597 | cpunum_set_input_line( | |
| 597 | cpunum_set_input_line(machine, 2, 0, CLEAR_LINE ); | |
| 598 | 598 | return; |
| 599 | 599 | } |
| 600 | 600 | |
| r2454 | r2455 | |
| 858 | 858 | |
| 859 | 859 | static const struct AY8910interface ay8910_interface_1 = |
| 860 | 860 | { |
| 861 | 0, | |
| 862 | 0, | |
| 861 | AY8910_LEGACY_OUTPUT, | |
| 862 | AY8910_DEFAULT_LOADS, | |
| 863 | NULL, | |
| 864 | NULL, | |
| 863 | 865 | ay8910_portA_0_w, /* write port A */ |
| 864 | 866 | ay8910_portB_0_w /* write port B */ |
| 865 | 867 | }; |
| 866 | 868 | |
| 867 | 869 | static const struct AY8910interface ay8910_interface_2 = |
| 868 | 870 | { |
| 869 | 0, | |
| 870 | 0, | |
| 871 | AY8910_LEGACY_OUTPUT, | |
| 872 | AY8910_DEFAULT_LOADS, | |
| 873 | NULL, | |
| 874 | NULL, | |
| 871 | 875 | ay8910_portA_1_w, /* write port A */ |
| 872 | 876 | ay8910_portB_1_w /* write port B */ |
| 873 | 877 | }; |
| 874 | 878 | |
| 875 | 879 | static const struct AY8910interface ay8910_interface_3 = |
| 876 | 880 | { |
| 877 | 0, | |
| 878 | 0, | |
| 881 | AY8910_LEGACY_OUTPUT, | |
| 882 | AY8910_DEFAULT_LOADS, | |
| 883 | NULL, | |
| 884 | NULL, | |
| 879 | 885 | ay8910_portA_2_w, /* write port A */ |
| 880 | 886 | ay8910_portB_2_w /* write port B */ |
| 881 | 887 | }; |
| r2454 | r2455 | |
|---|---|---|
| 217 | 217 | ***************************************************************************/ |
| 218 | 218 | |
| 219 | 219 | #include "driver.h" |
| 220 | #include "deprecat.h" | |
| 221 | 220 | #include "cpu/m6809/m6809.h" |
| 222 | 221 | #include "cpu/upd7810/upd7810.h" |
| 223 | 222 | #include "homedata.h" |
| r2454 | r2455 | |
| 1302 | 1301 | |
| 1303 | 1302 | static const struct YM2203interface ym2203_interface = |
| 1304 | 1303 | { |
| 1305 | input_port_3_r, | |
| 1306 | input_port_4_r | |
| 1304 | { | |
| 1305 | AY8910_LEGACY_OUTPUT, | |
| 1306 | AY8910_DEFAULT_LOADS, | |
| 1307 | input_port_3_r, | |
| 1308 | input_port_4_r, | |
| 1309 | NULL, | |
| 1310 | NULL | |
| 1311 | }, | |
| 1312 | NULL | |
| 1307 | 1313 | }; |
| 1308 | 1314 | |
| 1309 | 1315 |
| r2454 | r2455 | |
|---|---|---|
| 52 | 52 | |
| 53 | 53 | case 0x40: |
| 54 | 54 | xxmissio_status &= ~0x08; |
| 55 | cpunum_set_input_line_and_vector( | |
| 55 | cpunum_set_input_line_and_vector(machine, 1,0,HOLD_LINE,0x10); | |
| 56 | 56 | break; |
| 57 | 57 | |
| 58 | 58 | case 0x80: |
| r2454 | r2455 | |
| 75 | 75 | |
| 76 | 76 | case 0x80: |
| 77 | 77 | xxmissio_status &= ~0x04; |
| 78 | cpunum_set_input_line_and_vector( | |
| 78 | cpunum_set_input_line_and_vector(machine, 0,0,HOLD_LINE,0x10); | |
| 79 | 79 | break; |
| 80 | 80 | } |
| 81 | 81 | } |
| r2454 | r2455 | |
| 275 | 275 | |
| 276 | 276 | static const struct YM2203interface ym2203_interface_1 = |
| 277 | 277 | { |
| 278 | input_port_2_r, | |
| 279 | input_port_3_r | |
| 278 | { | |
| 279 | AY8910_LEGACY_OUTPUT, | |
| 280 | AY8910_DEFAULT_LOADS, | |
| 281 | input_port_2_r, | |
| 282 | input_port_3_r, | |
| 283 | NULL, | |
| 284 | NULL | |
| 285 | }, | |
| 286 | NULL | |
| 280 | 287 | }; |
| 281 | 288 | |
| 282 | 289 | static const struct YM2203interface ym2203_interface_2 = |
| 283 | 290 | { |
| 284 | 0, | |
| 285 | 0, | |
| 286 | xxmissio_scroll_x_w, | |
| 287 | xxmissio_scroll_y_w | |
| 291 | { | |
| 292 | AY8910_LEGACY_OUTPUT, | |
| 293 | AY8910_DEFAULT_LOADS, | |
| 294 | NULL, | |
| 295 | NULL, | |
| 296 | xxmissio_scroll_x_w, | |
| 297 | xxmissio_scroll_y_w | |
| 298 | }, | |
| 299 | NULL | |
| 288 | 300 | }; |
| 289 | 301 | |
| 290 | 302 | static MACHINE_DRIVER_START( xxmissio ) |
| r2454 | r2455 | |
|---|---|---|
| 257 | 257 | |
| 258 | 258 | static const struct AY8910interface ay8910_interface = |
| 259 | 259 | { |
| 260 | AY8910_LEGACY_OUTPUT, | |
| 261 | AY8910_DEFAULT_LOADS, | |
| 260 | 262 | input_port_0_r, // DIPSW-A read |
| 261 | input_port_1_r // DIPSW-B read | |
| 263 | input_port_1_r, // DIPSW-B read | |
| 264 | NULL, | |
| 265 | NULL | |
| 262 | 266 | }; |
| 263 | 267 | |
| 264 | 268 |
| r2454 | r2455 | |
|---|---|---|
| 571 | 571 | |
| 572 | 572 | static READ32_HANDLER( hng64_com_r ) |
| 573 | 573 | { |
| 574 | logerror("com read (PC=%08x): %08x %08x = %08x\n", activecpu_get_pc(), (offset*4)+0xc0000000, | |
| 574 | logerror("com read (PC=%08x): %08x %08x = %08x\n", activecpu_get_pc(), (offset*4)+0xc0000000, | |
| 575 | 575 | return hng64_com_ram[offset] ; |
| 576 | 576 | } |
| 577 | 577 | |
| 578 | 578 | |
| 579 | 579 | static WRITE32_HANDLER( hng64_com_w ) |
| 580 | 580 | { |
| 581 | logerror("com write (PC=%08x): %08x %08x = %08x\n", activecpu_get_pc(), (offset*4)+0xc0000000, | |
| 581 | logerror("com write (PC=%08x): %08x %08x = %08x\n", activecpu_get_pc(), (offset*4)+0xc0000000, | |
| 582 | 582 | COMBINE_DATA(&hng64_com_ram[offset]); |
| 583 | 583 | } |
| 584 | 584 | |
| r2454 | r2455 | |
| 588 | 588 | |
| 589 | 589 | static WRITE32_HANDLER( hng64_com_share_w ) |
| 590 | 590 | { |
| 591 | logerror("commw (PC=%08x): %08x %08x %08x\n", activecpu_get_pc(), data, (offset*4)+0xc0001000, | |
| 591 | logerror("commw (PC=%08x): %08x %08x %08x\n", activecpu_get_pc(), data, (offset*4)+0xc0001000, | |
| 592 | 592 | |
| 593 | 593 | if (offset==0x0) COMBINE_DATA(&hng64_com_shared_a); |
| 594 | 594 | if (offset==0x1) COMBINE_DATA(&hng64_com_shared_b); |
| r2454 | r2455 | |
| 596 | 596 | |
| 597 | 597 | static READ32_HANDLER( hng64_com_share_r ) |
| 598 | 598 | { |
| 599 | logerror("commr (PC=%08x): %08x %08x\n", activecpu_get_pc(), (offset*4)+0xc0001000, | |
| 599 | logerror("commr (PC=%08x): %08x %08x\n", activecpu_get_pc(), (offset*4)+0xc0001000, | |
| 600 | 600 | |
| 601 | 601 | // if(offset==0x0) return hng64_com_shared_a; |
| 602 | 602 | // if(offset==0x1) return hng64_com_shared_b; |
| r2454 | r2455 | |
| 626 | 626 | //if (a != 0) |
| 627 | 627 | // popmessage("Alpha is not zero!") ; |
| 628 | 628 | |
| 629 | palette_set_color( | |
| 629 | palette_set_color(machine,offset,MAKE_RGB(r,g,b)); | |
| 630 | 630 | } |
| 631 | 631 | |
| 632 | 632 | static READ32_HANDLER( hng64_port_read ) |
| r2454 | r2455 | |
| 709 | 709 | |
| 710 | 710 | static WRITE32_HANDLER( hng64_sram_w ) |
| 711 | 711 | { |
| 712 | logerror("HNG64 writing to SRAM 0x%08x == 0x%08x & 0x%08x. (PC=%08x)\n", offset*4, data, | |
| 712 | logerror("HNG64 writing to SRAM 0x%08x == 0x%08x & 0x%08x. (PC=%08x)\n", offset*4, data, | |
| 713 | 713 | COMBINE_DATA (&hng64_sram[offset]); |
| 714 | 714 | } |
| 715 | 715 |
| r2454 | r2455 | |
|---|---|---|
| 253 | 253 | g = ((paletteram32[offset] & 0x00ff0000) >>16); |
| 254 | 254 | r = ((paletteram32[offset] & 0xff000000) >>24); |
| 255 | 255 | |
| 256 | palette_set_color( | |
| 256 | palette_set_color(machine,offset,MAKE_RGB(r,g,b)); | |
| 257 | 257 | } |
| 258 | 258 | |
| 259 | 259 | |
| r2454 | r2455 | |
| 278 | 278 | if (ACCESSING_BITS_16_31) |
| 279 | 279 | { |
| 280 | 280 | //logerror("%08x write soundcmd %08x (%08x)\n",activecpu_get_pc(),data,mem_mask); |
| 281 | soundlatch_word_w(machine,0,data >> 16,0); | |
| 281 | soundlatch_word_w(machine,0,data >> 16,0xffff); | |
| 282 | 282 | sndpending = 1; |
| 283 | cpunum_set_input_line( | |
| 283 | cpunum_set_input_line(machine, 1,2,HOLD_LINE); | |
| 284 | 284 | /* spin for a while to let the sound CPU read the command */ |
| 285 | 285 | cpu_spinuntil_time(ATTOTIME_IN_USEC(50)); |
| 286 | 286 | } |
| r2454 | r2455 | |
|---|---|---|
| 329 | 329 | /* !!!!! patch to IRQ timming for 2nd CPU !!!!! */ |
| 330 | 330 | static WRITE8_HANDLER( gladiatr_irq_patch_w ) |
| 331 | 331 | { |
| 332 | cpunum_set_input_line( | |
| 332 | cpunum_set_input_line(machine, 1,0,HOLD_LINE); | |
| 333 | 333 | } |
| 334 | 334 | #endif |
| 335 | 335 | |
| r2454 | r2455 | |
| 656 | 656 | |
| 657 | 657 | static const struct YM2203interface ppking_ym2203_interface = |
| 658 | 658 | { |
| 659 | f1_r, | |
| 660 | f1_r | |
| 659 | { | |
| 660 | AY8910_LEGACY_OUTPUT, | |
| 661 | AY8910_DEFAULT_LOADS, | |
| 662 | f1_r, | |
| 663 | f1_r, | |
| 664 | NULL, | |
| 665 | NULL | |
| 666 | }, | |
| 667 | NULL | |
| 661 | 668 | }; |
| 662 | 669 | |
| 663 | 670 | static const struct YM2203interface gladiatr_ym2203_interface = |
| 664 | 671 | { |
| 665 | 0, | |
| 666 | gladiator_dsw3_r, /* port B read */ | |
| 667 | gladiator_int_control_w, /* port A write */ | |
| 668 | 0, | |
| 672 | { | |
| 673 | AY8910_LEGACY_OUTPUT, | |
| 674 | AY8910_DEFAULT_LOADS, | |
| 675 | NULL, | |
| 676 | gladiator_dsw3_r, /* port B read */ | |
| 677 | gladiator_int_control_w, /* port A write */ | |
| 678 | NULL, | |
| 679 | }, | |
| 669 | 680 | gladiator_ym_irq /* NMI request for 2nd cpu */ |
| 670 | 681 | }; |
| 671 | 682 |
| r2454 | r2455 | |
|---|---|---|
| 113 | 113 | } |
| 114 | 114 | static READ8_HANDLER( trigger_slave_nmi_r ) |
| 115 | 115 | { |
| 116 | cpunum_set_input_line( | |
| 116 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, PULSE_LINE); | |
| 117 | 117 | return 0; |
| 118 | 118 | } |
| 119 | 119 | |
| r2454 | r2455 | |
| 392 | 392 | } |
| 393 | 393 | } /* master_interrupt */ |
| 394 | 394 | |
| 395 | ||
| 396 | static const ppi8255_interface ppi8255_intf = | |
| 397 | { | |
| 398 | NULL, /* Port A read */ | |
| 399 | NULL, /* Port B read */ | |
| 400 | NULL, /* Port C read */ | |
| 401 | NULL, /* Port A write */ | |
| 402 | NULL, /* Port B write */ | |
| 403 | NULL /* Port C write */ | |
| 404 | }; | |
| 405 | ||
| 406 | ||
| 395 | 407 | static MACHINE_DRIVER_START( imolagp ) |
| 396 | 408 | MDRV_CPU_ADD(Z80,8000000) /* ? */ |
| 397 | 409 | MDRV_CPU_PROGRAM_MAP(imolagp_master,0) |
| r2454 | r2455 | |
| 405 | 417 | |
| 406 | 418 | MDRV_INTERLEAVE(100) |
| 407 | 419 | |
| 420 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 421 | MDRV_DEVICE_CONFIG( ppi8255_intf ) | |
| 422 | ||
| 408 | 423 | MDRV_SCREEN_ADD("main", RASTER) |
| 409 | 424 | MDRV_SCREEN_REFRESH_RATE(60) |
| 410 | 425 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) |
| r2454 | r2455 | |
| 513 | 528 | ROM_LOAD( "xe.bin", 0x3c00, 0x400, CRC(e0e81120) SHA1(14a77dfd069be342df4dbb1b747443c6d121d3fe) ) // ? car+misc |
| 514 | 529 | ROM_END |
| 515 | 530 | |
| 516 | static const ppi8255_interface ppi8255_intf = | |
| 517 | { | |
| 518 | 1, /* 1 chips */ | |
| 519 | {0}, /* Port A read */ | |
| 520 | {0}, /* Port B read */ | |
| 521 | {0}, /* Port C read */ | |
| 522 | {0}, /* Port A write */ | |
| 523 | {0}, /* Port B write */ | |
| 524 | {0}, /* Port C write */ | |
| 525 | }; | |
| 526 | 531 | |
| 527 | static DRIVER_INIT( imolagp ) | |
| 528 | { | |
| 529 | ppi8255_init(&ppi8255_intf); | |
| 530 | } | |
| 531 | ||
| 532 | 532 | /* YEAR, NAME, PARENT, MACHINE, INPUT, INIT, MONITOR, COMPANY, FULLNAME */ |
| 533 | GAME( 1981,imolagp, 0, imolagp, imolagp, | |
| 533 | GAME( 1981,imolagp, 0, imolagp, imolagp, 0 |
| r2454 | r2455 | |
|---|---|---|
| 42 | 42 | ***************************************************************************/ |
| 43 | 43 | |
| 44 | 44 | #include "driver.h" |
| 45 | #include "deprecat.h" | |
| 46 | 45 | #include "video/konamiic.h" |
| 47 | 46 | #include "cpu/m68000/m68000.h" |
| 48 | 47 | #include "cpu/z80/z80.h" |
| r2454 | r2455 | |
|---|---|---|
| 312 | 312 | |
| 313 | 313 | // fix Plotting test mode |
| 314 | 314 | if ((irq_enable & (1 << last_irq_level)) == 0) |
| 315 | cpunum_set_input_line( | |
| 315 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 316 | 316 | } |
| 317 | 317 | |
| 318 | 318 | static READ8_HANDLER( irq_enable_r ) |
| r2454 | r2455 | |
| 1050 | 1050 | static WRITE8_HANDLER (evilston_snd_w) |
| 1051 | 1051 | { |
| 1052 | 1052 | shared_ram[0x7fe]=data&0x7f; |
| 1053 | cpunum_set_input_line( | |
| 1053 | cpunum_set_input_line(machine, 1,INPUT_LINE_NMI,PULSE_LINE); | |
| 1054 | 1054 | } |
| 1055 | 1055 | |
| 1056 | 1056 | |
| r2454 | r2455 | |
| 2269 | 2269 | |
| 2270 | 2270 | static const struct YM2203interface ym2203_interface_triple = |
| 2271 | 2271 | { |
| 2272 | 0, | |
| 2273 | 0, | |
| 2274 | portA_w, | |
| 2275 | 0, | |
| 2272 | { | |
| 2273 | AY8910_LEGACY_OUTPUT, | |
| 2274 | AY8910_DEFAULT_LOADS, | |
| 2275 | NULL, | |
| 2276 | NULL, | |
| 2277 | portA_w, | |
| 2278 | NULL, | |
| 2279 | }, | |
| 2276 | 2280 | irqhandler |
| 2277 | 2281 | }; |
| 2278 | 2282 | |
| 2279 | 2283 | static const struct YM2203interface ym2203_interface_champwr = |
| 2280 | 2284 | { |
| 2281 | 0, | |
| 2282 | 0, | |
| 2283 | portA_w, | |
| 2284 | champwr_msm5205_volume_w, | |
| 2285 | { | |
| 2286 | AY8910_LEGACY_OUTPUT, | |
| 2287 | AY8910_DEFAULT_LOADS, | |
| 2288 | NULL, | |
| 2289 | NULL, | |
| 2290 | portA_w, | |
| 2291 | champwr_msm5205_volume_w, | |
| 2292 | }, | |
| 2285 | 2293 | irqhandler |
| 2286 | 2294 | }; |
| 2287 | 2295 | |
| r2454 | r2455 | |
| 2301 | 2309 | |
| 2302 | 2310 | static const struct YM2203interface ym2203_interface_single = |
| 2303 | 2311 | { |
| 2304 | portA_r, | |
| 2305 | portB_r | |
| 2312 | { | |
| 2313 | AY8910_LEGACY_OUTPUT, | |
| 2314 | AY8910_DEFAULT_LOADS, | |
| 2315 | portA_r, | |
| 2316 | portB_r, | |
| 2317 | NULL, | |
| 2318 | NULL | |
| 2319 | }, | |
| 2320 | NULL | |
| 2306 | 2321 | }; |
| 2307 | 2322 | |
| 2308 | 2323 |
| r2454 | r2455 | |
|---|---|---|
| 58 | 58 | #include "driver.h" |
| 59 | 59 | #include "cpu/i8039/i8039.h" |
| 60 | 60 | #include "sound/ay8910.h" |
| 61 | #include "sound/d | |
| 61 | #include "sound/discrete.h" | |
| 62 | 62 | |
| 63 | ||
| 64 | 63 | extern UINT8 *gyruss_videoram; |
| 65 | 64 | extern UINT8 *gyruss_colorram; |
| 66 | 65 | extern UINT8 *gyruss_spriteram; |
| r2454 | r2455 | |
| 73 | 72 | PALETTE_INIT( gyruss ); |
| 74 | 73 | VIDEO_UPDATE( gyruss ); |
| 75 | 74 | |
| 76 | READ8_HANDLER( gyruss_portA_r ); | |
| 77 | WRITE8_HANDLER( gyruss_filter0_w ); | |
| 78 | WRITE8_HANDLER( gyruss_filter1_w ); | |
| 79 | WRITE8_HANDLER( gyruss_sh_irqtrigger_w ); | |
| 80 | WRITE8_HANDLER( gyruss_i8039_irq_w ); | |
| 75 | /* The timer clock which feeds the upper 4 bits of */ | |
| 76 | /* AY-3-8910 port A is based on the same clock */ | |
| 77 | /* feeding the sound CPU Z80. It is a divide by */ | |
| 78 | /* 10240, formed by a standard divide by 1024, */ | |
| 79 | /* followed by a divide by 10 using a 4 bit */ | |
| 80 | /* bi-quinary count sequence. (See LS90 data sheet */ | |
| 81 | /* for an example). */ | |
| 82 | /* */ | |
| 83 | /* Bit 0 comes from the output of the divide by 1024 */ | |
| 84 | /* 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 */ | |
| 85 | /* Bit 1 comes from the QC output of the LS90 producing a sequence of */ | |
| 86 | /* 0, 0, 1, 1, 0, 0, 1, 1, 1, 0 */ | |
| 87 | /* Bit 2 comes from the QD output of the LS90 producing a sequence of */ | |
| 88 | /* 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 */ | |
| 89 | /* Bit 3 comes from the QA output of the LS90 producing a sequence of */ | |
| 90 | /* 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 */ | |
| 81 | 91 | |
| 92 | static const int gyruss_timer[10] = | |
| 93 | { | |
| 94 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x09, 0x0a, 0x0b, 0x0a, 0x0d | |
| 95 | }; | |
| 82 | 96 | |
| 97 | static READ8_HANDLER( gyruss_portA_r ) | |
| 98 | { | |
| 99 | return gyruss_timer[(activecpu_gettotalcycles()/1024) % 10]; | |
| 100 | } | |
| 101 | ||
| 102 | ||
| 103 | static WRITE8_HANDLER(gyruss_dac_w) | |
| 104 | { | |
| 105 | discrete_sound_w(machine, NODE(16), data); | |
| 106 | } | |
| 107 | ||
| 108 | static void filter_w(running_machine *machine, int chip, int data) | |
| 109 | { | |
| 110 | int i; | |
| 111 | ||
| 112 | //printf("chip %d - %02x\n", chip, data); | |
| 113 | for (i = 0;i < 3;i++) | |
| 114 | { | |
| 115 | /* low bit: 47000pF = 0.047uF */ | |
| 116 | /* high bit: 220000pF = 0.22uF */ | |
| 117 | discrete_sound_w(machine, NODE(3 * chip + i + 21), data & 3); | |
| 118 | data >>= 2; | |
| 119 | } | |
| 120 | } | |
| 121 | ||
| 122 | static WRITE8_HANDLER( gyruss_filter0_w ) | |
| 123 | { | |
| 124 | filter_w(machine, 0,data); | |
| 125 | } | |
| 126 | ||
| 127 | static WRITE8_HANDLER( gyruss_filter1_w ) | |
| 128 | { | |
| 129 | filter_w(machine, 1,data); | |
| 130 | } | |
| 131 | ||
| 132 | ||
| 133 | static WRITE8_HANDLER( gyruss_sh_irqtrigger_w ) | |
| 134 | { | |
| 135 | /* writing to this register triggers IRQ on the sound CPU */ | |
| 136 | cpunum_set_input_line_and_vector(machine, 2,0,HOLD_LINE,0xff); | |
| 137 | } | |
| 138 | ||
| 139 | static WRITE8_HANDLER( gyruss_i8039_irq_w ) | |
| 140 | { | |
| 141 | cpunum_set_input_line(machine, 3, 0, PULSE_LINE); | |
| 142 | } | |
| 143 | ||
| 144 | ||
| 83 | 145 | static ADDRESS_MAP_START( main_cpu1_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 84 | 146 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 85 | 147 | AM_RANGE(0x8000, 0x83ff) AM_RAM AM_BASE(&gyruss_colorram) |
| r2454 | r2455 | |
| 139 | 201 | |
| 140 | 202 | static ADDRESS_MAP_START( audio_cpu2_io_map, ADDRESS_SPACE_IO, 8 ) |
| 141 | 203 | AM_RANGE(0x00, 0xff) AM_READ(soundlatch2_r) |
| 142 | AM_RANGE(I8039_p1, I8039_p1) AM_WRITE( | |
| 204 | AM_RANGE(I8039_p1, I8039_p1) AM_WRITE(gyruss_ | |
| 143 | 205 | AM_RANGE(I8039_p2, I8039_p2) AM_WRITE(SMH_NOP) |
| 144 | 206 | ADDRESS_MAP_END |
| 145 | 207 | |
| r2454 | r2455 | |
| 311 | 373 | |
| 312 | 374 | static const struct AY8910interface ay8910_interface_1 = |
| 313 | 375 | { |
| 314 | 0, | |
| 315 | 0, | |
| 316 | 0, | |
| 376 | AY8910_DISCRETE_OUTPUT, | |
| 377 | { RES_K(3.3), RES_K(3.3), RES_K(3.3) }, | |
| 378 | NULL, | |
| 379 | NULL, | |
| 380 | NULL, | |
| 317 | 381 | gyruss_filter0_w |
| 318 | 382 | }; |
| 319 | 383 | |
| 320 | 384 | static const struct AY8910interface ay8910_interface_2 = |
| 321 | 385 | { |
| 322 | 0, | |
| 323 | 0, | |
| 324 | 0, | |
| 386 | AY8910_DISCRETE_OUTPUT, | |
| 387 | { RES_K(3.3), RES_K(3.3), RES_K(3.3) }, | |
| 388 | NULL, | |
| 389 | NULL, | |
| 390 | NULL, | |
| 325 | 391 | gyruss_filter1_w |
| 326 | 392 | }; |
| 327 | 393 | |
| 328 | 394 | static const struct AY8910interface ay8910_interface_3 = |
| 329 | 395 | { |
| 330 | gyruss_portA_r | |
| 396 | AY8910_DISCRETE_OUTPUT, | |
| 397 | { RES_K(3.3), RES_K(3.3), RES_K(3.3) }, | |
| 398 | gyruss_portA_r, | |
| 399 | NULL, | |
| 400 | NULL, | |
| 401 | NULL | |
| 331 | 402 | }; |
| 332 | 403 | |
| 404 | static const struct AY8910interface ay8910_interface_4 = | |
| 405 | { | |
| 406 | AY8910_DISCRETE_OUTPUT, | |
| 407 | { RES_K(3.3), RES_K(3.3), RES_K(3.3) }, | |
| 408 | NULL, | |
| 409 | NULL, | |
| 410 | NULL, | |
| 411 | NULL | |
| 412 | }; | |
| 333 | 413 | |
| 414 | static const struct AY8910interface ay8910_interface_5 = | |
| 415 | { | |
| 416 | AY8910_DISCRETE_OUTPUT, | |
| 417 | { RES_K(3.3), RES_K(3.3), RES_K(3.3) }, | |
| 418 | NULL, | |
| 419 | NULL, | |
| 420 | NULL, | |
| 421 | NULL | |
| 422 | }; | |
| 334 | 423 | |
| 424 | static const discrete_mixer_desc konami_right_mixer_desc = | |
| 425 | {DISC_MIXER_IS_RESISTOR, | |
| 426 | {RES_K(2.2), RES_K(2.2), RES_K(2.2), RES_K(3.3)/3, RES_K(3.3)/3 }, | |
| 427 | {0,0,0,0,0,0}, /* no variable resistors */ | |
| 428 | {0,0,0,0,0,0}, /* no node capacitors */ | |
| 429 | 0, 200, | |
| 430 | CAP_U(0.1), | |
| 431 | 0, | |
| 432 | 0, 1}; | |
| 433 | ||
| 434 | static const discrete_mixer_desc konami_left_mixer_desc = | |
| 435 | {DISC_MIXER_IS_RESISTOR, | |
| 436 | {RES_K(2.2), RES_K(2.2), RES_K(2.2), RES_K(3.3)/3, RES_K(4.7) }, | |
| 437 | {0,0,0,0,0,0}, /* no variable resistors */ | |
| 438 | {0,0,0,0,0,0}, /* no node capacitors */ | |
| 439 | 0, 200, | |
| 440 | CAP_U(0.1), | |
| 441 | 0, | |
| 442 | 0, 1}; | |
| 443 | ||
| 444 | static DISCRETE_SOUND_START( gyruss_sound ) | |
| 445 | ||
| 446 | /* Chip 1 right */ | |
| 447 | DISCRETE_INPUTX_STREAM(NODE_01, 0, 1.0, 0) | |
| 448 | DISCRETE_INPUTX_STREAM(NODE_02, 1, 1.0, 0) | |
| 449 | DISCRETE_INPUTX_STREAM(NODE_03, 2, 1.0, 0) | |
| 450 | ||
| 451 | /* Chip 2 left */ | |
| 452 | DISCRETE_INPUTX_STREAM(NODE_04, 3, 1.0, 0) | |
| 453 | DISCRETE_INPUTX_STREAM(NODE_05, 4, 1.0, 0) | |
| 454 | DISCRETE_INPUTX_STREAM(NODE_06, 5, 1.0, 0) | |
| 455 | ||
| 456 | /* Chip 3 right */ | |
| 457 | /* Outputs are tied together after 3.3k resistor on each channel. | |
| 458 | * A/R + B/R + C/R = (A + B + C) / 3 * (1/(R/3)) | |
| 459 | */ | |
| 460 | DISCRETE_INPUTX_STREAM(NODE_07, 6, 0.33, 0) | |
| 461 | DISCRETE_INPUTX_STREAM(NODE_08, 7, 0.33, 0) | |
| 462 | DISCRETE_INPUTX_STREAM(NODE_09, 8, 0.33, 0) | |
| 463 | ||
| 464 | /* Chip 4 right */ | |
| 465 | DISCRETE_INPUTX_STREAM(NODE_10, 9, 0.33, 0) | |
| 466 | DISCRETE_INPUTX_STREAM(NODE_11,10, 0.33, 0) | |
| 467 | DISCRETE_INPUTX_STREAM(NODE_12,11, 0.33, 0) | |
| 468 | ||
| 469 | /* Chip 5 left */ | |
| 470 | DISCRETE_INPUTX_STREAM(NODE_13,12, 0.33, 0) | |
| 471 | DISCRETE_INPUTX_STREAM(NODE_14,13, 0.33, 0) | |
| 472 | DISCRETE_INPUTX_STREAM(NODE_15,14, 0.33, 0) | |
| 473 | ||
| 474 | /* DAC left */ | |
| 475 | /* Output voltage depends on load. Datasheet gives 2.4 as minimum. | |
| 476 | * This is in line with TTL, so 4V with no load seems adequate */ | |
| 477 | DISCRETE_INPUTX_DATA(NODE_16, 256.0 * 4.0 / 5.0, 0.0, 0.0) | |
| 478 | ||
| 479 | /* Chip 1 Filter enable */ | |
| 480 | DISCRETE_INPUT_DATA(NODE_21) | |
| 481 | DISCRETE_INPUT_DATA(NODE_22) | |
| 482 | DISCRETE_INPUT_DATA(NODE_23) | |
| 483 | ||
| 484 | /* Chip 2 Filter enable */ | |
| 485 | DISCRETE_INPUT_DATA(NODE_24) | |
| 486 | DISCRETE_INPUT_DATA(NODE_25) | |
| 487 | DISCRETE_INPUT_DATA(NODE_26) | |
| 488 | ||
| 489 | /* Chip 1 Filter */ | |
| 490 | DISCRETE_RCFILTER_SW(NODE_31, 1, NODE_01, NODE_21, AY8910_INTERNAL_RESISTANCE+1000, CAP_U(0.047), CAP_U(0.22), 0, 0) | |
| 491 | DISCRETE_RCFILTER_SW(NODE_32, 1, NODE_02, NODE_22, AY8910_INTERNAL_RESISTANCE+1000, CAP_U(0.047), CAP_U(0.22), 0, 0) | |
| 492 | DISCRETE_RCFILTER_SW(NODE_33, 1, NODE_03, NODE_23, AY8910_INTERNAL_RESISTANCE+1000, CAP_U(0.047), CAP_U(0.22), 0, 0) | |
| 493 | ||
| 494 | /* Chip 2 Filter */ | |
| 495 | DISCRETE_RCFILTER_SW(NODE_34, 1, NODE_04, NODE_24, AY8910_INTERNAL_RESISTANCE+1000, CAP_U(0.047), CAP_U(0.22), 0, 0) | |
| 496 | DISCRETE_RCFILTER_SW(NODE_35, 1, NODE_05, NODE_25, AY8910_INTERNAL_RESISTANCE+1000, CAP_U(0.047), CAP_U(0.22), 0, 0) | |
| 497 | DISCRETE_RCFILTER_SW(NODE_36, 1, NODE_06, NODE_26, AY8910_INTERNAL_RESISTANCE+1000, CAP_U(0.047), CAP_U(0.22), 0, 0) | |
| 498 | ||
| 499 | /* Chip 3 */ | |
| 500 | DISCRETE_ADDER3(NODE_40, 1, NODE_07, NODE_08, NODE_09) | |
| 501 | /* Chip 4 */ | |
| 502 | DISCRETE_ADDER3(NODE_41, 1, NODE_10, NODE_11, NODE_12) | |
| 503 | /* Chip 5 */ | |
| 504 | DISCRETE_ADDER3(NODE_42, 1, NODE_13, NODE_14, NODE_15) | |
| 505 | ||
| 506 | /* right channel */ | |
| 507 | DISCRETE_MIXER5(NODE_50, 1, NODE_31, NODE_32, NODE_33, NODE_40, NODE_41, &konami_right_mixer_desc) | |
| 508 | /* left channel */ | |
| 509 | DISCRETE_MIXER5(NODE_51, 1, NODE_34, NODE_35, NODE_36, NODE_42, NODE_16, &konami_left_mixer_desc) | |
| 510 | ||
| 511 | DISCRETE_OUTPUT(NODE_50, 6.0) | |
| 512 | DISCRETE_OUTPUT(NODE_51, 6.0) | |
| 513 | ||
| 514 | DISCRETE_SOUND_END | |
| 515 | ||
| 516 | ||
| 335 | 517 | static MACHINE_DRIVER_START( gyruss ) |
| 336 | 518 | |
| 337 | 519 | /* basic machine hardware */ |
| r2454 | r2455 | |
| 375 | 557 | |
| 376 | 558 | MDRV_SOUND_ADD(AY8910, 14318180/8) |
| 377 | 559 | MDRV_SOUND_CONFIG(ay8910_interface_1) |
| 378 | MDRV_SOUND_ROUTE(0, "filter.0.0", 0.22) | |
| 379 | MDRV_SOUND_ROUTE(1, "filter.0.1", 0.22) | |
| 380 | MDRV_SOUND_ROUTE(2, "filter.0.2", 0.22) | |
| 560 | MDRV_SOUND_ROUTE_EX(0, "konami", 1.0, 0) | |
| 561 | MDRV_SOUND_ROUTE_EX(1, "konami", 1.0, 1) | |
| 562 | MDRV_SOUND_ROUTE_EX(2, "konami", 1.0, 2) | |
| 381 | 563 | |
| 382 | 564 | MDRV_SOUND_ADD(AY8910, 14318180/8) |
| 383 | 565 | MDRV_SOUND_CONFIG(ay8910_interface_2) |
| 384 | MDRV_SOUND_ROUTE(0, "filter.1.0", 0.22) | |
| 385 | MDRV_SOUND_ROUTE(1, "filter.1.1", 0.22) | |
| 386 | MDRV_SOUND_ROUTE(2, "filter.1.2", 0.22) | |
| 566 | MDRV_SOUND_ROUTE_EX(0, "konami", 1.0, 3) | |
| 567 | MDRV_SOUND_ROUTE_EX(1, "konami", 1.0, 4) | |
| 568 | MDRV_SOUND_ROUTE_EX(2, "konami", 1.0, 5) | |
| 387 | 569 | |
| 388 | 570 | MDRV_SOUND_ADD(AY8910, 14318180/8) |
| 389 | 571 | MDRV_SOUND_CONFIG(ay8910_interface_3) |
| 390 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "right", 0.44) | |
| 572 | MDRV_SOUND_ROUTE_EX(0, "konami", 1.0, 6) | |
| 573 | MDRV_SOUND_ROUTE_EX(1, "konami", 1.0, 7) | |
| 574 | MDRV_SOUND_ROUTE_EX(2, "konami", 1.0, 8) | |
| 391 | 575 | |
| 392 | 576 | MDRV_SOUND_ADD(AY8910, 14318180/8) |
| 393 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "right", 0.44) | |
| 577 | MDRV_SOUND_CONFIG(ay8910_interface_4) | |
| 578 | MDRV_SOUND_ROUTE_EX(0, "konami", 1.0, 9) | |
| 579 | MDRV_SOUND_ROUTE_EX(1, "konami", 1.0, 10) | |
| 580 | MDRV_SOUND_ROUTE_EX(2, "konami", 1.0, 11) | |
| 394 | 581 | |
| 395 | 582 | MDRV_SOUND_ADD(AY8910, 14318180/8) |
| 396 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "left", 0.44) | |
| 583 | MDRV_SOUND_CONFIG(ay8910_interface_5) | |
| 584 | MDRV_SOUND_ROUTE_EX(0, "konami", 1.0, 12) | |
| 585 | MDRV_SOUND_ROUTE_EX(1, "konami", 1.0, 13) | |
| 586 | MDRV_SOUND_ROUTE_EX(2, "konami", 1.0, 14) | |
| 397 | 587 | |
| 398 | MDRV_SOUND_ADD(DAC, 0) | |
| 399 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "left", 0.28) | |
| 400 | ||
| 401 | MDRV_SOUND_ADD_TAG("filter.0.0", FILTER_RC, 0) | |
| 402 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "right", 1.0) | |
| 403 | MDRV_SOUND_ADD_TAG("filter.0.1", FILTER_RC, 0) | |
| 404 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "right", 1.0) | |
| 405 | MDRV_SOUND_ADD_TAG("filter.0.2", FILTER_RC, 0) | |
| 406 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "right", 1.0) | |
| 407 | ||
| 408 | MDRV_SOUND_ADD_TAG("filter.1.0", FILTER_RC, 0) | |
| 409 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "left", 1.0) | |
| 410 | MDRV_SOUND_ADD_TAG("filter.1.1", FILTER_RC, 0) | |
| 411 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "left", 1.0) | |
| 412 | MDRV_SOUND_ADD_TAG("filter.1.2", FILTER_RC, 0) | |
| 413 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "left", 1.0) | |
| 588 | MDRV_SOUND_ADD_TAG("konami", DISCRETE, 0) | |
| 589 | MDRV_SOUND_CONFIG_DISCRETE(gyruss_sound) | |
| 590 | MDRV_SOUND_ROUTE(0, "right", 3.0) | |
| 591 | MDRV_SOUND_ROUTE(1, "left", 3.0) | |
| 414 | 592 | MACHINE_DRIVER_END |
| 415 | 593 | |
| 416 | 594 |
| r2454 | r2455 | |
|---|---|---|
| 63 | 63 | ***************************************************************************/ |
| 64 | 64 | |
| 65 | 65 | #include "driver.h" |
| 66 | #include "deprecat.h" | |
| 67 | 66 | #include "cpu/m68000/m68000.h" |
| 68 | 67 | #include "video/taitoic.h" |
| 69 | 68 | #include "machine/eeprom.h" |
| r2454 | r2455 | |
| 97 | 96 | g = (a &0xff00) >> 8; |
| 98 | 97 | b = (a &0xff); |
| 99 | 98 | |
| 100 | palette_set_color( | |
| 99 | palette_set_color(machine,offset,MAKE_RGB(r,g,b)); | |
| 101 | 100 | } |
| 102 | 101 | } |
| 103 | 102 | |
| r2454 | r2455 | |
| 164 | 163 | { |
| 165 | 164 | case 0x00: |
| 166 | 165 | { |
| 167 | return (input_port_ | |
| 166 | return (input_port_ | |
| 168 | 167 | (EEPROM_read_bit() << 7) | frame_counter; |
| 169 | 168 | } |
| 170 | 169 | |
| 171 | 170 | case 0x01: |
| 172 | 171 | { |
| 173 | return input_port_ | |
| 172 | return input_port_ | |
| 174 | 173 | } |
| 175 | 174 | } |
| 176 | 175 | |
| r2454 | r2455 | |
| 215 | 214 | |
| 216 | 215 | static READ32_HANDLER( groundfx_adc_r ) |
| 217 | 216 | { |
| 218 | return (input_port_ | |
| 217 | return (input_port_ | |
| 219 | 218 | } |
| 220 | 219 | |
| 221 | 220 | static WRITE32_HANDLER( groundfx_adc_w ) |
| r2454 | r2455 | |
|---|---|---|
| 196 | 196 | g = (lowBits & 0xf0) >> 4; |
| 197 | 197 | b = (highBits & 0x0f); |
| 198 | 198 | |
| 199 | /* palette_set_color( | |
| 199 | /* palette_set_color(machine, palIndex, r, g, b); */ | |
| 200 | 200 | logerror("COLOR write : 0x%04x @ 0x%04x [0x%x]\n", data, offset, activecpu_get_pc()); |
| 201 | 201 | } |
| 202 | 202 |
| r2454 | r2455 | |
|---|---|---|
| 113 | 113 | |
| 114 | 114 | static WRITE16_HANDLER( cabalbl_sound_irq_trigger_word_w ) |
| 115 | 115 | { |
| 116 | cpunum_set_input_line( | |
| 116 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, PULSE_LINE ); | |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 |
| r2454 | r2455 | |
|---|---|---|
| 161 | 161 | |
| 162 | 162 | static const struct AY8910interface ay8910_interface = |
| 163 | 163 | { |
| 164 | 0, | |
| 165 | 0, | |
| 164 | AY8910_LEGACY_OUTPUT, | |
| 165 | AY8910_DEFAULT_LOADS, | |
| 166 | NULL, | |
| 167 | NULL, | |
| 166 | 168 | draco_ay8910_port_a_w, |
| 167 | 169 | draco_ay8910_port_b_w |
| 168 | 170 | }; |
| r2454 | r2455 | |
|---|---|---|
| 161 | 161 | |
| 162 | 162 | static READ8_HANDLER( port1_r ) |
| 163 | 163 | { |
| 164 | return input_port_ | |
| 164 | return input_port_ | |
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | static READ8_HANDLER( port2_r ) |
| 168 | 168 | { |
| 169 | return input_port_ | |
| 169 | return input_port_ | |
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | |
| r2454 | r2455 | |
| 376 | 376 | |
| 377 | 377 | static const struct AY8910interface ay8910_interface_1 = |
| 378 | 378 | { |
| 379 | AY8910_LEGACY_OUTPUT, | |
| 380 | AY8910_DEFAULT_LOADS, | |
| 379 | 381 | input_port_0_r, |
| 380 | input_port_2_r | |
| 382 | input_port_2_r, | |
| 383 | NULL, | |
| 384 | NULL | |
| 381 | 385 | }; |
| 382 | 386 | |
| 383 | 387 | static const struct AY8910interface ay8910_interface_2 = |
| 384 | 388 | { |
| 389 | AY8910_LEGACY_OUTPUT, | |
| 390 | AY8910_DEFAULT_LOADS, | |
| 385 | 391 | port1_r, |
| 386 | port2_r | |
| 392 | port2_r, | |
| 393 | NULL, | |
| 394 | NULL | |
| 387 | 395 | }; |
| 388 | 396 | |
| 389 | 397 |
| r2454 | r2455 | |
|---|---|---|
| 178 | 178 | |
| 179 | 179 | static const struct AY8910interface ay8910_interface = |
| 180 | 180 | { |
| 181 | AY8910_LEGACY_OUTPUT, | |
| 182 | AY8910_DEFAULT_LOADS, | |
| 181 | 183 | input_port_0_r, |
| 182 | 184 | input_port_1_r, |
| 185 | NULL, | |
| 186 | NULL | |
| 183 | 187 | }; |
| 184 | 188 | |
| 185 | 189 |
| r2454 | r2455 | |
|---|---|---|
| 360 | 360 | static WRITE16_HANDLER( m92_sound_status_w ) |
| 361 | 361 | { |
| 362 | 362 | COMBINE_DATA(&sound_status); |
| 363 | cpunum_set_input_line_and_vector( | |
| 363 | cpunum_set_input_line_and_vector(machine, 0, 0, HOLD_LINE, M92_IRQ_3); | |
| 364 | 364 | } |
| 365 | 365 | |
| 366 | 366 | /*****************************************************************************/ |
| r2454 | r2455 | |
|---|---|---|
| 53 | 53 | */ |
| 54 | 54 | |
| 55 | 55 | #include "driver.h" |
| 56 | #include "deprecat.h" | |
| 57 | 56 | #include "cpu/z80/z80.h" |
| 58 | 57 | #include "snk.h" |
| 59 | 58 | #include "sound/ay8910.h" |
| r2454 | r2455 | |
|---|---|---|
| 87 | 87 | ***************************************************************************/ |
| 88 | 88 | |
| 89 | 89 | #include "driver.h" |
| 90 | #include "deprecat.h" | |
| 91 | 90 | #include "video/konamiic.h" |
| 92 | 91 | #include "cpu/konami/konami.h" /* for the callback and the firq irq definition */ |
| 93 | 92 | #include "machine/eeprom.h" |
| r2454 | r2455 | |
|---|---|---|
| 146 | 146 | static READ8_HANDLER( fcombat_port01_r ) |
| 147 | 147 | { |
| 148 | 148 | /* the cocktail flip bit muxes between ports 0 and 1 */ |
| 149 | return fcombat_cocktail_flip ? input_port_ | |
| 149 | return fcombat_cocktail_flip ? input_port_ | |
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 |
| r2454 | r2455 | |
|---|---|---|
| 87 | 87 | |
| 88 | 88 | static WRITE8_HANDLER( destroyr_interrupt_ack_w ) |
| 89 | 89 | { |
| 90 | cpunum_set_input_line( | |
| 90 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 |
| r2454 | r2455 | |
|---|---|---|
| 1126 | 1126 | return input_port_read_indexed(machine, 4 + (offset & 1)); |
| 1127 | 1127 | } |
| 1128 | 1128 | logerror("%06X:standard_io_r - unknown read access to address %04X\n", activecpu_get_pc(), offset * 2); |
| 1129 | return segaic16_open_bus_r(machine,0, | |
| 1129 | return segaic16_open_bus_r(machine,0,mem_mask); | |
| 1130 | 1130 | } |
| 1131 | 1131 | |
| 1132 | 1132 | |
| r2454 | r2455 | |
| 1156 | 1156 | coin_counter_w(0, data & 0x01); |
| 1157 | 1157 | return; |
| 1158 | 1158 | } |
| 1159 | logerror("%06X:standard_io_w - unknown write access to address %04X = %04X & %04X\n", activecpu_get_pc(), offset * 2, data, mem_mask | |
| 1159 | logerror("%06X:standard_io_w - unknown write access to address %04X = %04X & %04X\n", activecpu_get_pc(), offset * 2, data, mem_mask | |
| 1160 | 1160 | } |
| 1161 | 1161 | |
| 1162 | 1162 | |
| r2454 | r2455 | |
| 1205 | 1205 | /* compare registers */ |
| 1206 | 1206 | return segaic16_compare_timer_0_r(machine, offset & 7, mem_mask); |
| 1207 | 1207 | } |
| 1208 | return segaic16_open_bus_r(machine,0, | |
| 1208 | return segaic16_open_bus_r(machine,0,mem_mask); | |
| 1209 | 1209 | } |
| 1210 | 1210 | |
| 1211 | 1211 | |
| r2454 | r2455 | |
| 1241 | 1241 | |
| 1242 | 1242 | static WRITE16_HANDLER( unknown_rgn2_w ) |
| 1243 | 1243 | { |
| 1244 | logerror("Region 2: write to %04X = %04X & %04X\n", offset * 2, data, mem_mask | |
| 1244 | logerror("Region 2: write to %04X = %04X & %04X\n", offset * 2, data, mem_mask | |
| 1245 | 1245 | segaic16_compare_timer_1_w(machine, offset & 7, data, mem_mask); |
| 1246 | 1246 | } |
| 1247 | 1247 | |
| r2454 | r2455 | |
| 1334 | 1334 | static WRITE8_HANDLER( mcu_data_w ) |
| 1335 | 1335 | { |
| 1336 | 1336 | mcu_data = data; |
| 1337 | cpunum_set_input_line( | |
| 1337 | cpunum_set_input_line(machine, 2, 1, PULSE_LINE); | |
| 1338 | 1338 | } |
| 1339 | 1339 | #endif |
| 1340 | 1340 | |
| r2454 | r2455 | |
| 1368 | 1368 | cpunum_set_input_line(machine, 0, 4, HOLD_LINE); |
| 1369 | 1369 | |
| 1370 | 1370 | /* set tile banks */ |
| 1371 | rom_5704_bank_w(machine, 1, workram[0x3094/2] & 0x00ff, 0x | |
| 1371 | rom_5704_bank_w(machine, 1, workram[0x3094/2] & 0x00ff, 0x | |
| 1372 | 1372 | |
| 1373 | 1373 | /* process any new sound data */ |
| 1374 | 1374 | temp = workram[soundoffs]; |
| r2454 | r2455 | |
|---|---|---|
| 376 | 376 | |
| 377 | 377 | static VIDEO_EOF( wwfwfest ) |
| 378 | 378 | { |
| 379 | buffer_spriteram16_w(machine,0,0,0); | |
| 379 | buffer_spriteram16_w(machine,0,0,0xffff); | |
| 380 | 380 | } |
| 381 | 381 | |
| 382 | 382 | /******************************************************************************* |
| r2454 | r2455 | |
|---|---|---|
| 54 | 54 | */ |
| 55 | 55 | |
| 56 | 56 | #include "driver.h" |
| 57 | #include "deprecat.h" | |
| 58 | 57 | #include "decocrpt.h" |
| 59 | 58 | #include "decoprot.h" |
| 60 | 59 | #include "deco16ic.h" |
| r2454 | r2455 | |
| 125 | 124 | g = ((paldat & 0x0000ff00) >>8); |
| 126 | 125 | b = ((paldat & 0x00ff0000) >>16); |
| 127 | 126 | |
| 128 | palette_set_color( | |
| 127 | palette_set_color(machine,pen,MAKE_RGB(r,g,b)); | |
| 129 | 128 | } |
| 130 | 129 | |
| 131 | 130 | static READ16_HANDLER( pckgaldx_protection_r ) |
| r2454 | r2455 | |
|---|---|---|
| 133 | 133 | D0 = CC.R |
| 134 | 134 | */ |
| 135 | 135 | |
| 136 | logerror("latch_w(%08X) & %08X\n", data, | |
| 136 | logerror("latch_w(%08X) & %08X\n", data, | |
| 137 | 137 | |
| 138 | 138 | /* upper byte */ |
| 139 | 139 | if (ACCESSING_BITS_24_31) |
| r2454 | r2455 | |
|---|---|---|
| 479 | 479 | |
| 480 | 480 | static const struct AY8910interface ay8910_interface = |
| 481 | 481 | { |
| 482 | AY8910_LEGACY_OUTPUT, | |
| 483 | AY8910_DEFAULT_LOADS, | |
| 482 | 484 | input_port_3_r, |
| 483 | input_port_2_r | |
| 485 | input_port_2_r, | |
| 486 | NULL, | |
| 487 | NULL | |
| 484 | 488 | }; |
| 485 | 489 | |
| 486 | 490 | static void irqhandler(int linestate) |
| r2454 | r2455 | |
|---|---|---|
| 87 | 87 | |
| 88 | 88 | if (!(out & 0x2000) && interrupt_line_active) |
| 89 | 89 | { |
| 90 | cpunum_set_input_line( | |
| 90 | cpunum_set_input_line(machine, 0, 1, CLEAR_LINE); | |
| 91 | 91 | interrupt_line_active = 0; |
| 92 | 92 | } |
| 93 | 93 | |
| r2454 | r2455 | |
| 266 | 266 | |
| 267 | 267 | static const struct YM2203interface ym2203_interface = |
| 268 | 268 | { |
| 269 | 0,0,0,0, | |
| 269 | { | |
| 270 | AY8910_LEGACY_OUTPUT, | |
| 271 | AY8910_DEFAULT_LOADS, | |
| 272 | NULL, NULL, NULL, NULL | |
| 273 | }, | |
| 270 | 274 | irqhandler |
| 271 | 275 | }; |
| 272 | 276 |
| r2454 | r2455 | |
|---|---|---|
| 92 | 92 | { |
| 93 | 93 | /* I'm not sure that this works exactly like this */ |
| 94 | 94 | if (data & 1) |
| 95 | cpunum_set_input_line( | |
| 95 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, CLEAR_LINE); | |
| 96 | 96 | else |
| 97 | cpunum_set_input_line( | |
| 97 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, ASSERT_LINE); | |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | static READ8_HANDLER( vastar_sharedram_r ) |
| r2454 | r2455 | |
| 294 | 294 | |
| 295 | 295 | static const struct AY8910interface ay8910_interface = |
| 296 | 296 | { |
| 297 | AY8910_LEGACY_OUTPUT, | |
| 298 | AY8910_DEFAULT_LOADS, | |
| 297 | 299 | input_port_3_r, |
| 298 | input_port_4_r | |
| 300 | input_port_4_r, | |
| 301 | NULL, | |
| 302 | NULL | |
| 299 | 303 | }; |
| 300 | 304 | |
| 301 | 305 |
| r2454 | r2455 | |
|---|---|---|
| 36 | 36 | ***************************************************************************/ |
| 37 | 37 | |
| 38 | 38 | #include "driver.h" |
| 39 | #include "deprecat.h" | |
| 40 | 39 | #include "machine/eeprom.h" |
| 41 | 40 | #include "taito_f3.h" |
| 42 | 41 | #include "sound/es5506.h" |
| r2454 | r2455 | |
| 119 | 118 | |
| 120 | 119 | static WRITE32_HANDLER( f3_sound_reset_0_w ) |
| 121 | 120 | { |
| 122 | cpunum_set_input_line( | |
| 121 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, CLEAR_LINE); | |
| 123 | 122 | } |
| 124 | 123 | |
| 125 | 124 | static WRITE32_HANDLER( f3_sound_reset_1_w ) |
| 126 | 125 | { |
| 127 | cpunum_set_input_line( | |
| 126 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, ASSERT_LINE); | |
| 128 | 127 | } |
| 129 | 128 | |
| 130 | 129 | static WRITE32_HANDLER( f3_sound_bankswitch_w ) |
| r2454 | r2455 | |
|---|---|---|
| 36 | 36 | |
| 37 | 37 | static const ppi8255_interface ppi8255_intf = |
| 38 | 38 | { |
| 39 | 1, | |
| 40 | { 0 }, | |
| 41 | { 0 }, | |
| 42 | { 0 }, | |
| 43 | { pa_w }, | |
| 44 | { pb_w }, | |
| 45 | { pc_w }, | |
| 39 | NULL, | |
| 40 | NULL, | |
| 41 | NULL, | |
| 42 | pa_w, | |
| 43 | pb_w, | |
| 44 | pc_w | |
| 46 | 45 | }; |
| 47 | 46 | |
| 48 | 47 | |
| 49 | 48 | static MACHINE_RESET( homerun ) |
| 50 | 49 | { |
| 51 | ppi8255_init(&ppi8255_intf); | |
| 52 | 50 | } |
| 53 | 51 | |
| 54 | 52 | static const gfx_layout gfxlayout = |
| r2454 | r2455 | |
| 101 | 99 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 102 | 100 | AM_RANGE(0x10, 0x10) AM_WRITE(SMH_NOP) /* ?? */ |
| 103 | 101 | AM_RANGE(0x20, 0x20) AM_WRITE(SMH_NOP) /* ?? */ |
| 104 | AM_RANGE(0x30, 0x33) AM_READWRITE(ppi8255_ | |
| 102 | AM_RANGE(0x30, 0x33) AM_DEVREADWRITE(PPI8255, "ppi8255", ppi8255_ | |
| 105 | 103 | AM_RANGE(0x40, 0x40) AM_READ(homerun_40_r) |
| 106 | 104 | AM_RANGE(0x50, 0x50) AM_READ(input_port_2_r) |
| 107 | 105 | AM_RANGE(0x60, 0x60) AM_READ(input_port_1_r) |
| r2454 | r2455 | |
| 111 | 109 | |
| 112 | 110 | static const struct YM2203interface ym2203_interface = |
| 113 | 111 | { |
| 114 | input_port_3_r, | |
| 115 | 0, | |
| 116 | 0, | |
| 117 | homerun_banking_w | |
| 112 | { | |
| 113 | AY8910_LEGACY_OUTPUT, | |
| 114 | AY8910_DEFAULT_LOADS, | |
| 115 | input_port_3_r, | |
| 116 | NULL, | |
| 117 | NULL, | |
| 118 | homerun_banking_w | |
| 119 | }, | |
| 120 | NULL | |
| 118 | 121 | }; |
| 119 | 122 | |
| 120 | 123 | |
| r2454 | r2455 | |
| 193 | 196 | |
| 194 | 197 | MDRV_MACHINE_RESET(homerun) |
| 195 | 198 | |
| 199 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) | |
| 200 | MDRV_DEVICE_CONFIG( ppi8255_intf ) | |
| 201 | ||
| 196 | 202 | /* video hardware */ |
| 197 | 203 | MDRV_SCREEN_ADD("main", RASTER) |
| 198 | 204 | MDRV_SCREEN_REFRESH_RATE(60) |
| r2454 | r2455 | |
|---|---|---|
| 181 | 181 | col = pal.clut[entry] & 0xfff; |
| 182 | 182 | |
| 183 | 183 | /* Update the MAME palette */ |
| 184 | palette_set_color_rgb( | |
| 184 | palette_set_color_rgb(machine, entry, pal4bit(col >> 0), pal4bit(col >> 4), pal4bit(col >> 8)); | |
| 185 | 185 | } |
| 186 | 186 | |
| 187 | 187 | /* Address register auto-increment */ |
| r2454 | r2455 | |
|---|---|---|
| 66 | 66 | ***************************************************************************/ |
| 67 | 67 | |
| 68 | 68 | #include "driver.h" |
| 69 | #include "deprecat.h" | |
| 70 | 69 | #include "sound/ay8910.h" |
| 71 | 70 | #include "sound/dac.h" |
| 72 | 71 | |
| r2454 | r2455 | |
| 108 | 107 | |
| 109 | 108 | static WRITE8_HANDLER( irq_ack_w ) |
| 110 | 109 | { |
| 111 | cpunum_set_input_line( | |
| 110 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 112 | 111 | } |
| 113 | 112 | |
| 114 | 113 | |
| r2454 | r2455 | |
| 129 | 128 | |
| 130 | 129 | static WRITE8_HANDLER( champbas_mcu_halt_w ) |
| 131 | 130 | { |
| 132 | int cpunum = mame_find_cpu_index( | |
| 131 | int cpunum = mame_find_cpu_index(machine, CPUTAG_MCU); | |
| 133 | 132 | |
| 134 | 133 | // MCU not present/not used in champbas |
| 135 | 134 | if (cpunum == -1) |
| 136 | 135 | return; |
| 137 | 136 | |
| 138 | 137 | data &= 1; |
| 139 | cpunum_set_input_line( | |
| 138 | cpunum_set_input_line(machine, cpunum, INPUT_LINE_HALT, data ? ASSERT_LINE : CLEAR_LINE); | |
| 140 | 139 | } |
| 141 | 140 | |
| 142 | 141 | /* champbja another protection */ |
| r2454 | r2455 | |
|---|---|---|
| 105 | 105 | ***************************************************************************/ |
| 106 | 106 | |
| 107 | 107 | #include "driver.h" |
| 108 | #include "deprecat.h" | |
| 109 | 108 | #include "cpu/m6800/m6800.h" |
| 110 | 109 | #include "sound/namco.h" |
| 111 | 110 | |
| r2454 | r2455 | |
| 170 | 169 | |
| 171 | 170 | static WRITE8_HANDLER( baraduke_irq_ack_w ) |
| 172 | 171 | { |
| 173 | cpunum_set_input_line( | |
| 172 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 174 | 173 | } |
| 175 | 174 | |
| 176 | 175 |
| r2454 | r2455 | |
|---|---|---|
| 14 | 14 | *******************************************************************************/ |
| 15 | 15 | |
| 16 | 16 | #include "driver.h" |
| 17 | #include "deprecat.h" | |
| 18 | 17 | #include "m107.h" |
| 19 | 18 | #include "machine/irem_cpu.h" |
| 20 | 19 | #include "sound/2151intf.h" |
| r2454 | r2455 | |
| 146 | 145 | static WRITE16_HANDLER( m107_sound_status_w ) |
| 147 | 146 | { |
| 148 | 147 | COMBINE_DATA(&sound_status); |
| 149 | cpunum_set_input_line_and_vector( | |
| 148 | cpunum_set_input_line_and_vector(machine, 0, 0, HOLD_LINE, M107_IRQ_3); | |
| 150 | 149 | } |
| 151 | 150 | |
| 152 | 151 | /*****************************************************************************/ |
| r2454 | r2455 | |
|---|---|---|
| 736 | 736 | |
| 737 | 737 | static const struct AY8910interface ay8910_interface = |
| 738 | 738 | { |
| 739 | AY8910_LEGACY_OUTPUT, | |
| 740 | AY8910_DEFAULT_LOADS, | |
| 739 | 741 | input_port_5_r, |
| 740 | input_port_4_r | |
| 742 | input_port_4_r, | |
| 743 | NULL, | |
| 744 | NULL | |
| 741 | 745 | }; |
| 742 | 746 | |
| 743 | 747 | /* Machine Drivers */ |
| r2454 | r2455 | |
|---|---|---|
| 53 | 53 | */ |
| 54 | 54 | |
| 55 | 55 | #include "driver.h" |
| 56 | #include "deprecat.h" | |
| 57 | 56 | #include "cpu/m68000/m68000.h" |
| 58 | 57 | #include "cpu/z80/z80.h" |
| 59 | 58 | #include "sound/2151intf.h" |
| r2454 | r2455 | |
| 171 | 170 | if( twin16_CPUA_register!=old ) |
| 172 | 171 | { |
| 173 | 172 | if( (old&0x08)==0 && (twin16_CPUA_register&0x08) ) |
| 174 | cpunum_set_input_line_and_vector( | |
| 173 | cpunum_set_input_line_and_vector(machine, CPU_SOUND, 0, HOLD_LINE, 0xff ); | |
| 175 | 174 | |
| 176 | 175 | if( (old&0x40) && (twin16_CPUA_register&0x40)==0 ) |
| 177 | 176 | twin16_spriteram_process(); |
| 178 | 177 | |
| 179 | 178 | if( (old&0x10)==0 && (twin16_CPUA_register&0x10) ) |
| 180 | cpunum_set_input_line( | |
| 179 | cpunum_set_input_line(machine, CPU_B, MC68000_IRQ_6, HOLD_LINE ); | |
| 181 | 180 | |
| 182 | 181 | coin_counter_w( 0, twin16_CPUA_register&0x01 ); |
| 183 | 182 | coin_counter_w( 1, twin16_CPUA_register&0x02 ); |
| r2454 | r2455 | |
| 199 | 198 | { |
| 200 | 199 | if( (old&0x01)==0 && (twin16_CPUB_register&0x1) ) |
| 201 | 200 | { |
| 202 | cpunum_set_input_line( | |
| 201 | cpunum_set_input_line(machine, CPU_A, MC68000_IRQ_6, HOLD_LINE ); | |
| 203 | 202 | } |
| 204 | 203 | } |
| 205 | 204 | } |
| r2454 | r2455 | |
| 211 | 210 | if( twin16_CPUA_register!=old ) |
| 212 | 211 | { |
| 213 | 212 | if( (old&0x08)==0 && (twin16_CPUA_register&0x08) ) |
| 214 | cpunum_set_input_line_and_vector( | |
| 213 | cpunum_set_input_line_and_vector(machine, CPU_SOUND, 0, HOLD_LINE, 0xff ); // trigger IRQ on sound CPU | |
| 215 | 214 | } |
| 216 | 215 | } |
| 217 | 216 | |
| r2454 | r2455 | |
| 259 | 258 | |
| 260 | 259 | /* Memory Maps */ |
| 261 | 260 | |
| 262 | static ADDRESS_MAP_START( readmem_sound, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 263 | AM_RANGE(0x0000, 0x7fff) AM_READ(SMH_ROM) | |
| 264 | AM_RANGE(0x8000, 0x8fff) AM_READ(SMH_RAM) | |
| 265 | AM_RANGE(0x9000, 0x9000) AM_READ(twin16_sres_r) | |
| 261 | static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 262 | AM_RANGE(0x0000, 0x7fff) AM_ROM | |
| 263 | AM_RANGE(0x8000, 0x8fff) AM_RAM | |
| 264 | AM_RANGE(0x9000, 0x9000) AM_READWRITE(twin16_sres_r, twin16_sres_w) | |
| 266 | 265 | AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) |
| 267 | AM_RANGE(0xb000, 0xb00d) AM_READ(K007232_read_port_0_r) | |
| 268 | AM_RANGE(0xc001, 0xc001) AM_READ(YM2151_status_port_0_r) | |
| 269 | AM_RANGE(0xf000, 0xf000) AM_READ(upd7759_0_busy_r) | |
| 270 | ADDRESS_MAP_END | |
| 271 | ||
| 272 | static ADDRESS_MAP_START( writemem_sound, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 273 | AM_RANGE(0x0000, 0x7fff) AM_WRITE(SMH_ROM) | |
| 274 | AM_RANGE(0x8000, 0x8fff) AM_WRITE(SMH_RAM) | |
| 275 | AM_RANGE(0x9000, 0x9000) AM_WRITE(twin16_sres_w) | |
| 276 | AM_RANGE(0xb000, 0xb00d) AM_WRITE(K007232_write_port_0_w) | |
| 266 | AM_RANGE(0xb000, 0xb00d) AM_READWRITE(K007232_read_port_0_r, K007232_write_port_0_w) | |
| 277 | 267 | AM_RANGE(0xc000, 0xc000) AM_WRITE(YM2151_register_port_0_w) |
| 278 | AM_RANGE(0xc001, 0xc001) AM_WRITE(YM2151_data_port_0_w) | |
| 268 | AM_RANGE(0xc001, 0xc001) AM_READWRITE(YM2151_status_port_0_r, YM2151_data_port_0_w) | |
| 279 | 269 | AM_RANGE(0xd000, 0xd000) AM_WRITE(upd7759_0_port_w) |
| 280 | 270 | AM_RANGE(0xe000, 0xe000) AM_WRITE(upd7759_0_start_w) |
| 281 | AM_RANGE(0xf000, 0xf000) AM_WRITE(SMH_NOP) // ??? | |
| 282 | ADDRESS_MAP_END | |
| 271 | AM_RANGE(0xf000, 0xf000) AM_READWRITE(upd7759_0_busy_r, SMH_NOP) // ??? write ??? | |
| 272 | ADDRESS_MAP_END | |
| 283 | 273 | |
| 284 | static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 285 | AM_RANGE(0x000000, 0x03ffff) AM_READ(SMH_ROM) | |
| 286 | AM_RANGE(0x040000, 0x043fff) AM_READ(COMRAM_r) | |
| 287 | AM_RANGE(0x044000, 0x04ffff) AM_READ(SMH_RAM) // miaj | |
| 288 | AM_RANGE(0x060000, 0x063fff) AM_READ(SMH_RAM) | |
| 289 | AM_RANGE(0x080000, 0x080fff) AM_READ(SMH_RAM) | |
| 290 | AM_RANGE(0x0a0000, 0x0a001b) AM_READ(twin16_input_r) | |
| 291 | AM_RANGE(0x0b0000, 0x0b03ff) AM_READ(cuebrckj_nvram_r) | |
| 292 | AM_RANGE(0x0c000e, 0x0c000f) AM_READ(twin16_sprite_status_r) | |
| 293 | AM_RANGE(0x100000, 0x103fff) AM_READ(SMH_RAM) | |
| 294 | AM_RANGE(0x104000, 0x105fff) AM_READ(SMH_RAM) // miaj | |
| 295 | AM_RANGE(0x120000, 0x123fff) AM_READ(SMH_RAM) | |
| 296 | ADDRESS_MAP_END | |
| 297 | ||
| 298 | static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 299 | AM_RANGE(0x000000, 0x03ffff) AM_WRITE(SMH_ROM) | |
| 300 | AM_RANGE(0x040000, 0x043fff) AM_WRITE(COMRAM_w) | |
| 301 | AM_RANGE(0x044000, 0x04ffff) AM_WRITE(SMH_RAM) // miaj | |
| 302 | AM_RANGE(0x060000, 0x063fff) AM_WRITE(SMH_RAM) | |
| 303 | AM_RANGE(0x080000, 0x080fff) AM_WRITE(twin16_paletteram_word_w) AM_BASE(&paletteram16) | |
| 274 | static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 275 | AM_RANGE(0x000000, 0x03ffff) AM_ROM | |
| 276 | AM_RANGE(0x040000, 0x043fff) AM_READWRITE(COMRAM_r, COMRAM_w) | |
| 277 | AM_RANGE(0x044000, 0x04ffff) AM_RAM // miaj | |
| 278 | AM_RANGE(0x060000, 0x063fff) AM_RAM | |
| 279 | AM_RANGE(0x080000, 0x080fff) AM_RAM_WRITE(twin16_paletteram_word_w) AM_BASE(&paletteram16) | |
| 304 | 280 | AM_RANGE(0x081000, 0x081fff) AM_WRITE(SMH_NOP) |
| 281 | AM_RANGE(0x0a0000, 0x0a001b) AM_READ(twin16_input_r) | |
| 305 | 282 | AM_RANGE(0x0a0000, 0x0a0001) AM_WRITE(twin16_CPUA_register_w) |
| 306 | 283 | AM_RANGE(0x0a0008, 0x0a0009) AM_WRITE(sound_command_w) |
| 307 | 284 | AM_RANGE(0x0a0010, 0x0a0011) AM_WRITE(watchdog_reset16_w) |
| 308 | AM_RANGE(0x0b0000, 0x0b03ff) AM_WRITE(cuebrckj_nvram_w) | |
| 285 | AM_RANGE(0x0b0000, 0x0b03ff) AM_READWRITE(cuebrckj_nvram_r, cuebrckj_nvram_w) | |
| 309 | 286 | AM_RANGE(0x0b0400, 0x0b0401) AM_WRITE(cuebrckj_nvram_bank_w) |
| 310 | 287 | AM_RANGE(0x0c0000, 0x0c000f) AM_WRITE(twin16_video_register_w) |
| 311 | AM_RANGE(0x100000, 0x103fff) AM_WRITE(twin16_videoram2_w) AM_BASE(&twin16_videoram2) | |
| 312 | AM_RANGE(0x104000, 0x105fff) AM_WRITE(SMH_RAM) // miaj | |
| 313 | AM_RANGE(0x120000, 0x123fff) AM_WRITE(SMH_RAM) AM_BASE(&videoram16) | |
| 288 | AM_RANGE(0x0c000e, 0x0c000f) AM_READ(twin16_sprite_status_r) | |
| 289 | AM_RANGE(0x100000, 0x103fff) AM_RAM_WRITE(twin16_videoram2_w) AM_BASE(&twin16_videoram2) | |
| 290 | AM_RANGE(0x104000, 0x105fff) AM_RAM // miaj | |
| 291 | AM_RANGE(0x120000, 0x123fff) AM_RAM AM_BASE(&videoram16) | |
| 314 | 292 | AM_RANGE(0x140000, 0x143fff) AM_RAM AM_SHARE(1) AM_BASE(&spriteram16) AM_SIZE(&spriteram_size) |
| 315 | 293 | ADDRESS_MAP_END |
| 316 | 294 | |
| 317 | static ADDRESS_MAP_START( readmem_sub, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 318 | AM_RANGE(0x000000, 0x03ffff) AM_READ(SMH_ROM) | |
| 319 | AM_RANGE(0x040000, 0x043fff) AM_READ(COMRAM_r) | |
| 320 | AM_RANGE(0x044000, 0x04ffff) AM_READ(SMH_RAM) // miaj | |
| 321 | AM_RANGE(0x060000, 0x063fff) AM_READ(SMH_RAM) | |
| 295 | static ADDRESS_MAP_START( sub_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 296 | AM_RANGE(0x000000, 0x03ffff) AM_ROM | |
| 297 | AM_RANGE(0x040000, 0x043fff) AM_READWRITE(COMRAM_r, COMRAM_w) | |
| 298 | AM_RANGE(0x044000, 0x04ffff) AM_RAM // miaj | |
| 299 | AM_RANGE(0x060000, 0x063fff) AM_RAM | |
| 322 | 300 | AM_RANGE(0x080000, 0x09ffff) AM_READ(extra_rom_r) |
| 323 | AM_RANGE(0x480000, 0x483fff) AM_READ(videoram16_r) | |
| 324 | AM_RANGE(0x500000, 0x53ffff) AM_READ(SMH_RAM) | |
| 301 | AM_RANGE(0x0a0000, 0x0a0001) AM_WRITE(twin16_CPUB_register_w) | |
| 302 | AM_RANGE(0x400000, 0x403fff) AM_RAM AM_SHARE(1) | |
| 303 | AM_RANGE(0x480000, 0x483fff) AM_READWRITE(videoram16_r, videoram16_w) | |
| 304 | AM_RANGE(0x500000, 0x53ffff) AM_RAM AM_BASE(&twin16_tile_gfx_ram) | |
| 325 | 305 | AM_RANGE(0x600000, 0x6fffff) AM_READ(twin16_gfx_rom1_r) |
| 326 | 306 | AM_RANGE(0x700000, 0x77ffff) AM_READ(twin16_gfx_rom2_r) |
| 327 | AM_RANGE(0x780000, 0x79ffff) AM_R | |
| 307 | AM_RANGE(0x780000, 0x79ffff) AM_R | |
| 328 | 308 | ADDRESS_MAP_END |
| 329 | 309 | |
| 330 | static ADDRESS_MAP_START( writemem_sub, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 331 | AM_RANGE(0x000000, 0x03ffff) AM_WRITE(SMH_ROM) | |
| 332 | AM_RANGE(0x040000, 0x043fff) AM_WRITE(COMRAM_w) | |
| 333 | AM_RANGE(0x044000, 0x04ffff) AM_WRITE(SMH_RAM) // miaj | |
| 334 | AM_RANGE(0x060000, 0x063fff) AM_WRITE(SMH_RAM) | |
| 335 | AM_RANGE(0x0a0000, 0x0a0001) AM_WRITE(twin16_CPUB_register_w) | |
| 336 | AM_RANGE(0x400000, 0x403fff) AM_RAM AM_SHARE(1) | |
| 337 | AM_RANGE(0x480000, 0x483fff) AM_WRITE(videoram16_w) | |
| 338 | AM_RANGE(0x500000, 0x53ffff) AM_WRITE(SMH_RAM) AM_BASE(&twin16_tile_gfx_ram) | |
| 339 | AM_RANGE(0x780000, 0x79ffff) AM_WRITE(SMH_RAM) AM_BASE(&twin16_sprite_gfx_ram) | |
| 340 | ADDRESS_MAP_END | |
| 341 | ||
| 342 | static ADDRESS_MAP_START( fround_readmem, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 343 | AM_RANGE(0x000000, 0x03ffff) AM_READ(SMH_ROM) | |
| 344 | AM_RANGE(0x040000, 0x043fff) AM_READ(COMRAM_r) | |
| 345 | AM_RANGE(0x060000, 0x063fff) AM_READ(SMH_RAM) | |
| 346 | AM_RANGE(0x080000, 0x080fff) AM_READ(SMH_RAM) | |
| 310 | static ADDRESS_MAP_START( fround_map, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 311 | AM_RANGE(0x000000, 0x03ffff) AM_ROM | |
| 312 | AM_RANGE(0x040000, 0x043fff) AM_READWRITE(COMRAM_r, COMRAM_w) | |
| 313 | AM_RANGE(0x060000, 0x063fff) AM_RAM | |
| 314 | AM_RANGE(0x080000, 0x080fff) AM_RAM_WRITE(twin16_paletteram_word_w) AM_BASE(&paletteram16) | |
| 347 | 315 | AM_RANGE(0x0a0000, 0x0a001b) AM_READ(twin16_input_r) |
| 348 | AM_RANGE(0x0c000e, 0x0c000f) AM_READ(twin16_sprite_status_r) | |
| 349 | AM_RANGE(0x100000, 0x103fff) AM_READ(SMH_RAM) | |
| 350 | AM_RANGE(0x120000, 0x123fff) AM_READ(SMH_RAM) | |
| 351 | AM_RANGE(0x140000, 0x143fff) AM_READ(SMH_RAM) | |
| 352 | AM_RANGE(0x500000, 0x6fffff) AM_READ(twin16_gfx_rom1_r) | |
| 353 | ADDRESS_MAP_END | |
| 354 | ||
| 355 | static ADDRESS_MAP_START( fround_writemem, ADDRESS_SPACE_PROGRAM, 16 ) | |
| 356 | AM_RANGE(0x000000, 0x03ffff) AM_WRITE(SMH_ROM) | |
| 357 | AM_RANGE(0x040000, 0x043fff) AM_WRITE(COMRAM_w) | |
| 358 | AM_RANGE(0x060000, 0x063fff) AM_WRITE(SMH_RAM) | |
| 359 | AM_RANGE(0x080000, 0x080fff) AM_WRITE(twin16_paletteram_word_w) AM_BASE(&paletteram16) | |
| 360 | 316 | AM_RANGE(0x0a0000, 0x0a0001) AM_WRITE(fround_CPU_register_w) |
| 361 | 317 | AM_RANGE(0x0a0008, 0x0a0009) AM_WRITE(sound_command_w) |
| 362 | 318 | AM_RANGE(0x0a0010, 0x0a0011) AM_WRITE(watchdog_reset16_w) |
| 363 | 319 | AM_RANGE(0x0c0000, 0x0c000f) AM_WRITE(twin16_video_register_w) |
| 320 | AM_RANGE(0x0c000e, 0x0c000f) AM_READ(twin16_sprite_status_r) | |
| 364 | 321 | AM_RANGE(0x0e0000, 0x0e0001) AM_WRITE(fround_gfx_bank_w) |
| 365 | AM_RANGE(0x100000, 0x103fff) AM_WRITE(twin16_videoram2_w) AM_BASE(&twin16_videoram2) | |
| 366 | AM_RANGE(0x120000, 0x123fff) AM_WRITE(SMH_RAM) AM_BASE(&videoram16) | |
| 367 | AM_RANGE(0x140000, 0x143fff) AM_WRITE(SMH_RAM) AM_BASE(&spriteram16) AM_SIZE(&spriteram_size) | |
| 322 | AM_RANGE(0x100000, 0x103fff) AM_RAM_WRITE(twin16_videoram2_w) AM_BASE(&twin16_videoram2) | |
| 323 | AM_RANGE(0x120000, 0x123fff) AM_RAM AM_BASE(&videoram16) | |
| 324 | AM_RANGE(0x140000, 0x143fff) AM_RAM AM_BASE(&spriteram16) AM_SIZE(&spriteram_size) | |
| 325 | AM_RANGE(0x500000, 0x6fffff) AM_READ(twin16_gfx_rom1_r) | |
| 368 | 326 | ADDRESS_MAP_END |
| 369 | 327 | |
| 370 | 328 | /* Input Ports */ |
| r2454 | r2455 | |
| 957 | 915 | // basic machine hardware |
| 958 | 916 | MDRV_CPU_ADD(Z80, 3579545) |
| 959 | 917 | /* audio CPU */ |
| 960 | MDRV_CPU_PROGRAM_MAP( | |
| 918 | MDRV_CPU_PROGRAM_MAP( | |
| 961 | 919 | |
| 962 | 920 | MDRV_CPU_ADD(M68000, XTAL_18_432MHz/2) |
| 963 | MDRV_CPU_PROGRAM_MAP( | |
| 921 | MDRV_CPU_PROGRAM_MAP( | |
| 964 | 922 | MDRV_CPU_VBLANK_INT("main", CPUB_interrupt) |
| 965 | 923 | |
| 966 | 924 | MDRV_CPU_ADD(M68000, XTAL_18_432MHz/2) |
| 967 | MDRV_CPU_PROGRAM_MAP( | |
| 925 | MDRV_CPU_PROGRAM_MAP( | |
| 968 | 926 | MDRV_CPU_VBLANK_INT("main", CPUA_interrupt) |
| 969 | 927 | |
| 970 | 928 | MDRV_INTERLEAVE(100) |
| r2454 | r2455 | |
| 1015 | 973 | /* basic machine hardware */ |
| 1016 | 974 | MDRV_CPU_ADD(Z80, 3579545) |
| 1017 | 975 | /* audio CPU */ |
| 1018 | MDRV_CPU_PROGRAM_MAP( | |
| 976 | MDRV_CPU_PROGRAM_MAP( | |
| 1019 | 977 | |
| 1020 | 978 | MDRV_CPU_ADD(M68000, 10000000) |
| 1021 | MDRV_CPU_PROGRAM_MAP(fround_ | |
| 979 | MDRV_CPU_PROGRAM_MAP(fround_ | |
| 1022 | 980 | MDRV_CPU_VBLANK_INT("main", CPUA_interrupt) |
| 1023 | 981 | |
| 1024 | 982 | MDRV_INTERLEAVE(100) |
| r2454 | r2455 | |
|---|---|---|
| 274 | 274 | |
| 275 | 275 | switch (i) |
| 276 | 276 | { |
| 277 | case 0 : return coins_r(machine,0,0); break; | |
| 278 | case 1 : return player1_r(machine,0,0); break; | |
| 279 | case 2 : return player2_r(machine,0,0); break; | |
| 280 | case 3 : return dsw1_r(machine,0,0); break; | |
| 281 | case 4 : return dsw2_r(machine,0,0); break; | |
| 277 | case 0 : return coins_r(machine,0,0xffff); break; | |
| 278 | case 1 : return player1_r(machine,0,0xffff); break; | |
| 279 | case 2 : return player2_r(machine,0,0xffff); break; | |
| 280 | case 3 : return dsw1_r(machine,0,0xffff); break; | |
| 281 | case 4 : return dsw2_r(machine,0,0xffff); break; | |
| 282 | 282 | default : return 0x0006; |
| 283 | 283 | } |
| 284 | 284 | } |
| r2454 | r2455 | |
| 286 | 286 | static WRITE16_HANDLER( ip_select_w ) |
| 287 | 287 | { |
| 288 | 288 | COMBINE_DATA(&ip_select); |
| 289 | cpunum_set_input_line( | |
| 289 | cpunum_set_input_line(machine, 0,2,HOLD_LINE); | |
| 290 | 290 | } |
| 291 | 291 | |
| 292 | 292 | |
| r2454 | r2455 | |
| 795 | 795 | |
| 796 | 796 | static const struct YM2203interface ym2203_interface = |
| 797 | 797 | { |
| 798 | 0, | |
| 799 | 0, | |
| 800 | 0, | |
| 801 | 0, | |
| 798 | { | |
| 799 | AY8910_LEGACY_OUTPUT, | |
| 800 | AY8910_DEFAULT_LOADS, | |
| 801 | NULL, NULL, NULL, NULL | |
| 802 | }, | |
| 802 | 803 | irq_handler |
| 803 | 804 | }; |
| 804 | 805 | |
| r2454 | r2455 | |
| 2931 | 2932 | switch (protection_val) |
| 2932 | 2933 | { |
| 2933 | 2934 | case 0x02: return 0x03; |
| 2934 | case 0x51: return player1_r(machine,0,0); | |
| 2935 | case 0x52: return player2_r(machine,0,0); | |
| 2935 | case 0x51: return player1_r(machine,0,0xffff); | |
| 2936 | case 0x52: return player2_r(machine,0,0xffff); | |
| 2936 | 2937 | default: return protection_val; |
| 2937 | 2938 | } |
| 2938 | 2939 | } |
| r2454 | r2455 | |
| 2955 | 2956 | } |
| 2956 | 2957 | } |
| 2957 | 2958 | |
| 2958 | cpunum_set_input_line( | |
| 2959 | cpunum_set_input_line(machine, 0,4,HOLD_LINE); | |
| 2959 | 2960 | } |
| 2960 | 2961 | |
| 2961 | 2962 |
| r2454 | r2455 | |
|---|---|---|
| 275 | 275 | |
| 276 | 276 | static WRITE8_HANDLER( master_nmi_trigger_w ) |
| 277 | 277 | { |
| 278 | cpunum_set_input_line( | |
| 278 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, PULSE_LINE); | |
| 279 | 279 | } |
| 280 | 280 | |
| 281 | 281 | static void airbustr_bankswitch(int cpunum, int data) |
| r2454 | r2455 | |
| 352 | 352 | paletteram[offset] = data; |
| 353 | 353 | val = (paletteram[offset | 1] << 8) | paletteram[offset & ~1]; |
| 354 | 354 | |
| 355 | palette_set_color_rgb( | |
| 355 | palette_set_color_rgb(machine, offset/2, pal5bit(val >> 5), pal5bit(val >> 10), pal5bit(val >> 0)); | |
| 356 | 356 | } |
| 357 | 357 | |
| 358 | 358 | static WRITE8_HANDLER( airbustr_coin_counter_w ) |
| r2454 | r2455 | |
| 560 | 560 | |
| 561 | 561 | static const struct YM2203interface ym2203_interface = |
| 562 | 562 | { |
| 563 | input_port_3_r, // DSW-1 connected to port A | |
| 564 | input_port_4_r // DSW-2 connected to port B | |
| 563 | { | |
| 564 | AY8910_LEGACY_OUTPUT, | |
| 565 | AY8910_DEFAULT_LOADS, | |
| 566 | input_port_3_r, // DSW-1 connected to port A | |
| 567 | input_port_4_r, // DSW-2 connected to port B | |
| 568 | NULL, | |
| 569 | NULL | |
| 570 | }, | |
| 571 | NULL | |
| 565 | 572 | }; |
| 566 | 573 | |
| 567 | 574 | /* Interrupt Generators */ |
| r2454 | r2455 | |
|---|---|---|
| 388 | 388 | static WRITE8_HANDLER( pacman_interrupt_vector_w ) |
| 389 | 389 | { |
| 390 | 390 | cpunum_set_input_line_vector(0, 0, data); |
| 391 | cpunum_set_input_line( | |
| 391 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 392 | 392 | } |
| 393 | 393 | |
| 394 | 394 | |
| r2454 | r2455 | |
| 557 | 557 | |
| 558 | 558 | static READ8_HANDLER( maketrax_special_port2_r ) |
| 559 | 559 | { |
| 560 | int data = input_port_ | |
| 560 | int data = input_port_ | |
| 561 | 561 | int pc = activecpu_get_previouspc(); |
| 562 | 562 | |
| 563 | 563 | if ((pc == 0x1973) || (pc == 0x2389)) return data | 0x40; |
| r2454 | r2455 | |
| 600 | 600 | |
| 601 | 601 | static READ8_HANDLER( korosuke_special_port2_r ) |
| 602 | 602 | { |
| 603 | int data = input_port_ | |
| 603 | int data = input_port_ | |
| 604 | 604 | int pc = activecpu_get_previouspc(); |
| 605 | 605 | |
| 606 | 606 | if ((pc == 0x196e) || (pc == 0x2387)) return data | 0x40; |
| r2454 | r2455 | |
| 3326 | 3326 | |
| 3327 | 3327 | static const struct AY8910interface crushs_ay8910_interface = |
| 3328 | 3328 | { |
| 3329 | AY8910_LEGACY_OUTPUT, | |
| 3330 | AY8910_DEFAULT_LOADS, | |
| 3331 | NULL, | |
| 3332 | NULL, | |
| 3333 | NULL, | |
| 3329 | 3334 | NULL |
| 3330 | 3335 | }; |
| 3331 | 3336 |
| r2454 | r2455 | |
|---|---|---|
| 207 | 207 | if (offset % 2 == 0) |
| 208 | 208 | sound_msb_latch = data; |
| 209 | 209 | else |
| 210 | BSMT2000_data_0_w(machine, offset/2, (sound_msb_latch << 8) | data, 0); | |
| 210 | BSMT2000_data_0_w(machine, offset/2, (sound_msb_latch << 8) | data, 0xffff); | |
| 211 | 211 | } |
| 212 | 212 | |
| 213 | 213 |
| r2454 | r2455 | |
|---|---|---|
| 77 | 77 | coin_counter_w(0,data & 0x02); |
| 78 | 78 | |
| 79 | 79 | /* bit 4 = enable rom reading thru K051316 #1 & #2 */ |
| 80 | if ((K051316_readroms = (data & 0x10))){ | |
| 80 | K051316_readroms = (data & 0x10); | |
| 81 | if (K051316_readroms) | |
| 81 | 82 | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x2800, 0x2fff, 0, 0, K051316_rom_1_r); /* 051316 (ROM test) */ |
| 82 | } | |
| 83 | else{ | |
| 83 | else | |
| 84 | 84 | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x2800, 0x2fff, 0, 0, K051316_1_r); /* 051316 */ |
| 85 | } | |
| 86 | 85 | |
| 87 | 86 | /* Bits 3-7 probably control palette dimming in a similar way to TMNT2/Saunset Riders, */ |
| 88 | 87 | /* however I don't have enough evidence to determine the exact behaviour. */ |
| r2454 | r2455 | |
| 90 | 89 | /* the headlight (which have the shadow bit set) become highlights */ |
| 91 | 90 | /* Maybe one of the bits inverts the SHAD line while the other darkens the background. */ |
| 92 | 91 | if (data & 0x08) |
| 93 | palette_set_shadow_factor( | |
| 92 | palette_set_shadow_factor(machine,1/PALETTE_DEFAULT_SHADOW_FACTOR); | |
| 94 | 93 | else |
| 95 | palette_set_shadow_factor( | |
| 94 | palette_set_shadow_factor(machine,PALETTE_DEFAULT_SHADOW_FACTOR); | |
| 96 | 95 | |
| 97 | 96 | if ((data & 0x80) != last) |
| 98 | 97 | { |
| r2454 | r2455 | |
| 103 | 102 | |
| 104 | 103 | /* only affect the background */ |
| 105 | 104 | for (i = 512;i < 1024;i++) |
| 106 | palette_set_brightness( | |
| 105 | palette_set_brightness(machine,i,brt); | |
| 107 | 106 | } |
| 108 | 107 | |
| 109 | 108 | //if ((data & 0xf8) && (data & 0xf8) != 0x88) |
| r2454 | r2455 | |
| 136 | 135 | |
| 137 | 136 | static WRITE8_HANDLER( chqflag_sh_irqtrigger_w ) |
| 138 | 137 | { |
| 139 | cpunum_set_input_line( | |
| 138 | cpunum_set_input_line(machine, 1,0,HOLD_LINE); | |
| 140 | 139 | } |
| 141 | 140 | |
| 142 | 141 |
| r2454 | r2455 | |
|---|---|---|
| 119 | 119 | switch (offset) |
| 120 | 120 | { |
| 121 | 121 | // MSSTB |
| 122 | case 0: cpunum_set_input_line( | |
| 122 | case 0: cpunum_set_input_line(machine, 1, M6809_IRQ_LINE, ASSERT_LINE); break; | |
| 123 | 123 | |
| 124 | 124 | // IRQACK |
| 125 | case 1: cpunum_set_input_line( | |
| 125 | case 1: cpunum_set_input_line(machine, 0, M6809_IRQ_LINE, CLEAR_LINE); break; | |
| 126 | 126 | |
| 127 | 127 | // FIRQACK |
| 128 | case 2: cpunum_set_input_line( | |
| 128 | case 2: cpunum_set_input_line(machine, 0, M6809_FIRQ_LINE, CLEAR_LINE); break; | |
| 129 | 129 | |
| 130 | 130 | // NMIACK |
| 131 | case 3: cpunum_set_input_line( | |
| 131 | case 3: cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, CLEAR_LINE); break; | |
| 132 | 132 | |
| 133 | 133 | // SWAP(bank-swaps sprite RAM between 1800 & 1900; ignored bc. they're treated as a single chunk.) |
| 134 | 134 | case 4: break; |
| r2454 | r2455 | |
| 136 | 136 | // SNDREQ |
| 137 | 137 | case 5: |
| 138 | 138 | if (data == 0x80) // protection trick to screw CPU1 & 3 |
| 139 | cpunum_set_input_line( | |
| 139 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, ASSERT_LINE); // SNMI | |
| 140 | 140 | else |
| 141 | 141 | if (ffcount < MAX_SOUNDS) |
| 142 | 142 | { |
| r2454 | r2455 | |
| 163 | 163 | { |
| 164 | 164 | switch (offset) |
| 165 | 165 | { |
| 166 | case 0: cpunum_set_input_line( | |
| 166 | case 0: cpunum_set_input_line(machine, 0, M6809_IRQ_LINE, ASSERT_LINE); break; // SMSTB | |
| 167 | 167 | |
| 168 | case 1: cpunum_set_input_line( | |
| 168 | case 1: cpunum_set_input_line(machine, 1, M6809_FIRQ_LINE, CLEAR_LINE); break; | |
| 169 | 169 | |
| 170 | case 2: cpunum_set_input_line( | |
| 170 | case 2: cpunum_set_input_line(machine, 1, M6809_IRQ_LINE, CLEAR_LINE); break; | |
| 171 | 171 | |
| 172 | case 3: cpunum_set_input_line( | |
| 172 | case 3: cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, CLEAR_LINE); break; | |
| 173 | 173 | } |
| 174 | 174 | |
| 175 | 175 | #if BW_DEBUG |
| r2454 | r2455 | |
|---|---|---|
| 569 | 569 | if(b > 0x1F) b = 0x1F; |
| 570 | 570 | } |
| 571 | 571 | |
| 572 | palette_set_color( | |
| 572 | palette_set_color(machine, offset, MAKE_RGB(r << 3, g << 3, b << 3)); | |
| 573 | 573 | } |
| 574 | 574 | } |
| 575 | 575 |
| r2454 | r2455 | |
|---|---|---|
| 123 | 123 | program_write_word(0xffc00c, 0xc0); |
| 124 | 124 | program_write_word(0xffc00e, 0); |
| 125 | 125 | |
| 126 | sf_fg_scroll_w(machine, 0, d1, 0); | |
| 127 | sf_bg_scroll_w(machine, 0, d2, 0); | |
| 126 | sf_fg_scroll_w(machine, 0, d1, 0xffff); | |
| 127 | sf_bg_scroll_w(machine, 0, d2, 0xffff); | |
| 128 | 128 | break; |
| 129 | 129 | } |
| 130 | 130 | case 4: |
| r2454 | r2455 | |
| 144 | 144 | } |
| 145 | 145 | program_write_word(0xffc682, d1); |
| 146 | 146 | program_write_word(0xffc00e, off); |
| 147 | sf_bg_scroll_w(machine, 0, d1, 0); | |
| 147 | sf_bg_scroll_w(machine, 0, d1, 0xffff); | |
| 148 | 148 | } |
| 149 | 149 | break; |
| 150 | 150 | } |
| r2454 | r2455 | |
|---|---|---|
| 578 | 578 | |
| 579 | 579 | static const struct YM2203interface ym2203_interface = |
| 580 | 580 | { |
| 581 | 0, | |
| 582 | 0, | |
| 583 | unk, | |
| 584 | unk, | |
| 581 | { | |
| 582 | AY8910_LEGACY_OUTPUT, | |
| 583 | AY8910_DEFAULT_LOADS, | |
| 584 | NULL, | |
| 585 | NULL, | |
| 586 | unk, | |
| 587 | unk, | |
| 588 | }, | |
| 585 | 589 | irqhandler |
| 586 | 590 | }; |
| 587 | 591 |
| r2454 | r2455 | |
|---|---|---|
| 96 | 96 | */ |
| 97 | 97 | |
| 98 | 98 | #include "driver.h" |
| 99 | #include "deprecat.h" | |
| 100 | 99 | #include "cdrom.h" |
| 101 | 100 | #include "cpu/powerpc/ppc.h" |
| 102 | 101 | |
| r2454 | r2455 | |
| 228 | 227 | if (data & 0x800000) |
| 229 | 228 | { |
| 230 | 229 | mame_printf_debug("CPU%d: CPU1 IRQ at %08X\n", cpu_getactivecpu(), activecpu_get_pc()); |
| 231 | cpunum_set_input_line( | |
| 230 | cpunum_set_input_line(machine, 1, INPUT_LINE_IRQ0, ASSERT_LINE); | |
| 232 | 231 | } |
| 233 | 232 | |
| 234 | 233 | unk20004 = (UINT32)(data); |
| r2454 | r2455 | |
| 323 | 322 | { |
| 324 | 323 | if (data & U64(0x100000000)) |
| 325 | 324 | { |
| 326 | cpunum_set_input_line( | |
| 325 | cpunum_set_input_line(machine, 0, INPUT_LINE_RESET, PULSE_LINE); | |
| 327 | 326 | unk3 = 0; |
| 328 | 327 | } |
| 329 | 328 | } |
| r2454 | r2455 | |
|---|---|---|
| 222 | 222 | // sound_flag1 = 1; |
| 223 | 223 | // sound_flag2 = 1; |
| 224 | 224 | soundlatch_word_w(machine,offset,data,mem_mask); |
| 225 | cpunum_set_input_line( | |
| 225 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, PULSE_LINE); | |
| 226 | 226 | cpu_spinuntil_time(ATTOTIME_IN_USEC(50)); // Allow the other cpu to reply |
| 227 | 227 | } |
| 228 | 228 | |
| r2454 | r2455 | |
| 230 | 230 | static READ8_HANDLER( soundlatch_lo_r ) |
| 231 | 231 | { |
| 232 | 232 | // sound_flag1 = 0; |
| 233 | return soundlatch_word_r(machine,offset,0) & 0xff; | |
| 233 | return soundlatch_word_r(machine,offset,0x00ff) & 0xff; | |
| 234 | 234 | } |
| 235 | 235 | |
| 236 | 236 | /* Sound CPU: read the high 8 bits of the 16 bit sound latch */ |
| 237 | 237 | static READ8_HANDLER( soundlatch_hi_r ) |
| 238 | 238 | { |
| 239 | 239 | // sound_flag2 = 0; |
| 240 | return soundlatch_word_r(machine,offset,0) >> 8; | |
| 240 | return soundlatch_word_r(machine,offset,0xff00) >> 8; | |
| 241 | 241 | } |
| 242 | 242 | |
| 243 | 243 | /* Main CPU: read the latch written by the sound CPU (acknowledge) */ |
| r2454 | r2455 | |
| 578 | 578 | case 0: |
| 579 | 579 | case 1: |
| 580 | 580 | case 2: |
| 581 | case 3: return cave_irq_cause_r(machine,offset,0); | |
| 581 | case 3: return cave_irq_cause_r(machine,offset,0xffff); | |
| 582 | 582 | |
| 583 | 583 | default: return 0x0000; |
| 584 | 584 | } |
| r2454 | r2455 | |
| 2005 | 2005 | |
| 2006 | 2006 | static const struct YM2203interface ym2203_interface = |
| 2007 | 2007 | { |
| 2008 | 0,0,0,0,irqhandler | |
| 2008 | { | |
| 2009 | AY8910_LEGACY_OUTPUT, | |
| 2010 | AY8910_DEFAULT_LOADS, | |
| 2011 | NULL, NULL, NULL, NULL | |
| 2012 | }, | |
| 2013 | irqhandler | |
| 2009 | 2014 | }; |
| 2010 | 2015 | |
| 2011 | 2016 |
| r2454 | r2455 | |
|---|---|---|
| 910 | 910 | |
| 911 | 911 | static const struct YM2203interface ym2203_interface_1 = |
| 912 | 912 | { |
| 913 | unk_r, | |
| 914 | 0, | |
| 915 | 0, | |
| 916 | 0, | |
| 913 | { | |
| 914 | AY8910_LEGACY_OUTPUT, | |
| 915 | AY8910_DEFAULT_LOADS, | |
| 916 | unk_r, NULL, NULL, NULL | |
| 917 | }, | |
| 917 | 918 | irqhandler |
| 918 | 919 | }; |
| 919 | 920 | |
| 920 | 921 | static const struct YM2203interface ym2203_interface_2 = |
| 921 | 922 | { |
| 922 | unk_r | |
| 923 | { | |
| 924 | AY8910_LEGACY_OUTPUT, | |
| 925 | AY8910_DEFAULT_LOADS, | |
| 926 | unk_r, NULL, NULL, NULL | |
| 927 | }, | |
| 928 | NULL | |
| 923 | 929 | }; |
| 924 | 930 | |
| 925 | 931 | static const struct YM2151interface ym2151_interface = |
| r2454 | r2455 | |
|---|---|---|
| 195 | 195 | g = (paletteram32[offset] & 0x03e00000) >> (5+16); |
| 196 | 196 | b = (paletteram32[offset] & 0x001f0000) >> (0+16); |
| 197 | 197 | |
| 198 | palette_set_color_rgb( | |
| 198 | palette_set_color_rgb(machine,offset*2,pal5bit(r),pal5bit(g),pal5bit(b)); | |
| 199 | 199 | } |
| 200 | 200 | |
| 201 | 201 | if(ACCESSING_BITS_0_15) |
| r2454 | r2455 | |
| 207 | 207 | g = (paletteram32[offset] & 0x000003e0) >> (5); |
| 208 | 208 | b = (paletteram32[offset] & 0x0000001f) >> (0); |
| 209 | 209 | |
| 210 | palette_set_color_rgb( | |
| 210 | palette_set_color_rgb(machine,offset*2+1,pal5bit(r),pal5bit(g),pal5bit(b)); | |
| 211 | 211 | } |
| 212 | 212 | } |
| 213 | 213 |
| r2454 | r2455 | |
|---|---|---|
| 238 | 238 | switch (offset) { |
| 239 | 239 | case 0: /* High byte */ |
| 240 | 240 | i8751_value=(i8751_value&0xff) | (data<<8); |
| 241 | if (int_enable) cpunum_set_input_line ( | |
| 241 | if (int_enable) cpunum_set_input_line (machine, 0, M6809_IRQ_LINE, HOLD_LINE); /* IRQ on *high* byte only */ | |
| 242 | 242 | break; |
| 243 | 243 | case 1: /* Low byte */ |
| 244 | 244 | i8751_value=(i8751_value&0xff00) | data; |
| r2454 | r2455 | |
| 271 | 271 | switch (offset) { |
| 272 | 272 | case 0: /* High byte */ |
| 273 | 273 | i8751_value=(i8751_value&0xff) | (data<<8); |
| 274 | cpunum_set_input_line ( | |
| 274 | cpunum_set_input_line (machine, 1, M6809_FIRQ_LINE, HOLD_LINE); /* Signal main cpu */ | |
| 275 | 275 | break; |
| 276 | 276 | case 1: /* Low byte */ |
| 277 | 277 | i8751_value=(i8751_value&0xff00) | data; |
| r2454 | r2455 | |
| 299 | 299 | switch (offset) { |
| 300 | 300 | case 0: /* High byte */ |
| 301 | 301 | i8751_value=(i8751_value&0xff) | (data<<8); |
| 302 | cpunum_set_input_line ( | |
| 302 | cpunum_set_input_line (machine, 0, M6809_FIRQ_LINE, HOLD_LINE); /* Signal main cpu */ | |
| 303 | 303 | break; |
| 304 | 304 | case 1: /* Low byte */ |
| 305 | 305 | i8751_value=(i8751_value&0xff00) | data; |
| r2454 | r2455 | |
| 330 | 330 | switch (offset) { |
| 331 | 331 | case 0: /* High byte */ |
| 332 | 332 | i8751_value=(i8751_value&0xff) | (data<<8); |
| 333 | cpunum_set_input_line ( | |
| 333 | cpunum_set_input_line (machine, 0, M6809_FIRQ_LINE, HOLD_LINE); /* Signal main cpu */ | |
| 334 | 334 | break; |
| 335 | 335 | case 1: /* Low byte */ |
| 336 | 336 | i8751_value=(i8751_value&0xff00) | data; |
| r2454 | r2455 | |
| 474 | 474 | /* Deal with interrupts, coins also generate NMI to CPU 0 */ |
| 475 | 475 | switch (offset) { |
| 476 | 476 | case 0: /* IRQ2 */ |
| 477 | cpunum_set_input_line( | |
| 477 | cpunum_set_input_line(machine, 1,M6809_IRQ_LINE,ASSERT_LINE); | |
| 478 | 478 | return; |
| 479 | 479 | case 1: /* IRC 1 */ |
| 480 | cpunum_set_input_line( | |
| 480 | cpunum_set_input_line(machine, 0,M6809_IRQ_LINE,CLEAR_LINE); | |
| 481 | 481 | return; |
| 482 | 482 | case 2: /* IRQ 1 */ |
| 483 | cpunum_set_input_line( | |
| 483 | cpunum_set_input_line(machine, 0,M6809_IRQ_LINE,ASSERT_LINE); | |
| 484 | 484 | return; |
| 485 | 485 | case 3: /* IRC 2 */ |
| 486 | cpunum_set_input_line( | |
| 486 | cpunum_set_input_line(machine, 1,M6809_IRQ_LINE,CLEAR_LINE); | |
| 487 | 487 | return; |
| 488 | 488 | } |
| 489 | 489 | } |
| r2454 | r2455 | |
| 497 | 497 | (The last interrupt has not finished and been ack'd when the new one occurs */ |
| 498 | 498 | switch (offset) { |
| 499 | 499 | case 0: /* CPU 2 - IRQ acknowledge */ |
| 500 | cpunum_set_input_line( | |
| 500 | cpunum_set_input_line(machine, 1,M6809_IRQ_LINE,CLEAR_LINE); | |
| 501 | 501 | return; |
| 502 | 502 | case 1: /* CPU 1 - IRQ acknowledge */ |
| 503 | cpunum_set_input_line( | |
| 503 | cpunum_set_input_line(machine, 0,M6809_IRQ_LINE,CLEAR_LINE); | |
| 504 | 504 | return; |
| 505 | 505 | case 2: /* i8751 - FIRQ acknowledge */ |
| 506 | 506 | return; |
| 507 | 507 | case 3: /* IRQ 1 */ |
| 508 | cpunum_set_input_line( | |
| 508 | cpunum_set_input_line(machine, 0,M6809_IRQ_LINE,ASSERT_LINE); | |
| 509 | 509 | return; |
| 510 | 510 | case 4: /* IRQ 2 */ |
| 511 | cpunum_set_input_line( | |
| 511 | cpunum_set_input_line(machine, 1,M6809_IRQ_LINE,ASSERT_LINE); | |
| 512 | 512 | return; |
| 513 | 513 | } |
| 514 | 514 | #endif |
| r2454 | r2455 | |
| 521 | 521 | case 2: /* i8751 - FIRQ acknowledge */ |
| 522 | 522 | return; |
| 523 | 523 | case 3: /* IRQ 1 */ |
| 524 | cpunum_set_input_line ( | |
| 524 | cpunum_set_input_line (machine, 0, M6809_IRQ_LINE, HOLD_LINE); | |
| 525 | 525 | return; |
| 526 | 526 | case 4: /* IRQ 2 */ |
| 527 | cpunum_set_input_line ( | |
| 527 | cpunum_set_input_line (machine, 1, M6809_IRQ_LINE, HOLD_LINE); | |
| 528 | 528 | return; |
| 529 | 529 | } |
| 530 | 530 | } |
| r2454 | r2455 | |
|---|---|---|
| 152 | 152 | static WRITE8_HANDLER ( tbowl_trigger_nmi ) |
| 153 | 153 | { |
| 154 | 154 | /* trigger NMI on 6206B's Cpu? (guess but seems to work..) */ |
| 155 | cpunum_set_input_line( | |
| 155 | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, PULSE_LINE); | |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | static ADDRESS_MAP_START( readmem_6206C, ADDRESS_SPACE_PROGRAM, 8 ) |
| r2454 | r2455 | |
|---|---|---|
| 60 | 60 | /* |
| 61 | 61 | if (~battlane_cpu_control & 0x08) |
| 62 | 62 | { |
| 63 | cpunum_set_input_line(Machine, 0, INPUT_LINE_NMI, PULSE_LINE); | |
| 64 | cpunum_set_input_line(Machine, 1, INPUT_LINE_NMI, PULSE_LINE); | |
| 63 | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, PULSE_LINE); | |
| 64 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, PULSE_LINE); | |
| 65 | 65 | } |
| 66 | 66 | */ |
| 67 | 67 | |
| r2454 | r2455 | |
| 69 | 69 | CPU2's SWI will trigger an 6809 IRQ on the master by resetting 0x04 |
| 70 | 70 | Master will respond by setting the bit back again |
| 71 | 71 | */ |
| 72 | cpunum_set_input_line( | |
| 72 | cpunum_set_input_line(machine, 0, M6809_IRQ_LINE, data & 0x04 ? CLEAR_LINE : HOLD_LINE); | |
| 73 | 73 | |
| 74 | 74 | /* |
| 75 | 75 | Slave function call (e.g. ROM test): |
| r2454 | r2455 | |
| 87 | 87 | FA96: 27 FA BEQ $FA92 ; Wait for bit to be set |
| 88 | 88 | */ |
| 89 | 89 | |
| 90 | cpunum_set_input_line( | |
| 90 | cpunum_set_input_line(machine, 1, M6809_IRQ_LINE, data & 0x02 ? CLEAR_LINE : HOLD_LINE); | |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | static ADDRESS_MAP_START( battlane_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| r2454 | r2455 | |
|---|---|---|
| 93 | 93 | if (reason) |
| 94 | 94 | atarigen_sound_int_gen(Machine, 0); |
| 95 | 95 | else |
| 96 | atarigen_sound_int_ack_w(Machine,0,0,0); | |
| 96 | atarigen_sound_int_ack_w(Machine,0,0,0xffff); | |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | |
| r2454 | r2455 | |
| 231 | 231 | |
| 232 | 232 | static WRITE32_HANDLER( led_w ) |
| 233 | 233 | { |
| 234 | // logerror("LED = %08X & %08X\n", data, | |
| 234 | // logerror("LED = %08X & %08X\n", data, | |
| 235 | 235 | } |
| 236 | 236 | |
| 237 | 237 | |
| r2454 | r2455 | |
| 1078 | 1078 | /* protected version */ |
| 1079 | 1079 | if (pc == 0x2EB3C || pc == 0x2EB48) |
| 1080 | 1080 | { |
| 1081 | logerror("%06X:PFW@%06X = %08X & %08X (src=%06X)\n", activecpu_get_pc(), 0xd72000 + offset*4, data, | |
| 1081 | logerror("%06X:PFW@%06X = %08X & %08X (src=%06X)\n", activecpu_get_pc(), 0xd72000 + offset*4, data, | |
| 1082 | 1082 | /* skip these writes to make more stuff visible */ |
| 1083 | 1083 | return; |
| 1084 | 1084 | } |
| 1085 | 1085 | |
| 1086 | 1086 | /* unprotected version */ |
| 1087 | 1087 | if (pc == 0x25834 || pc == 0x25860) |
| 1088 | logerror("%06X:PFW@%06X = %08X & %08X (src=%06X)\n", activecpu_get_pc(), 0xd72000 + offset*4, data, | |
| 1088 | logerror("%06X:PFW@%06X = %08X & %08X (src=%06X)\n", activecpu_get_pc(), 0xd72000 + offset*4, data, | |
| 1089 | 1089 | |
| 1090 | 1090 | atarigen_playfield32_w(machine, offset, data, mem_mask); |
| 1091 | 1091 | } |
| r2454 | r2455 | |
|---|---|---|
| 343 | 343 | |
| 344 | 344 | static const struct AY8910interface ay8910_interface = |
| 345 | 345 | { |
| 346 | AY8910_LEGACY_OUTPUT, | |
| 347 | AY8910_DEFAULT_LOADS, | |
| 346 | 348 | input_port_6_r, // |
| 347 | 349 | input_port_7_r, // |
| 348 | 350 | 0, |
| r2454 | r2455 | |
|---|---|---|
| 88 | 88 | |
| 89 | 89 | static READ16_HANDLER( eeprom_r ) |
| 90 | 90 | { |
| 91 | return (EEPROM_read_bit() << 15)|(input_port_ | |
| 91 | return (EEPROM_read_bit() << 15)|(input_port_ | |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | static WRITE16_HANDLER( eeprom_w ) |
| r2454 | r2455 | |
|---|---|---|
| 272 | 272 | |
| 273 | 273 | static VIDEO_EOF( bigfghtr ) |
| 274 | 274 | { |
| 275 | buffer_spriteram16_w(machine,0,0,0); | |
| 275 | buffer_spriteram16_w(machine,0,0,0xffff); | |
| 276 | 276 | } |
| 277 | 277 | |
| 278 | 278 | |
| r2454 | r2455 | |
| 317 | 317 | break; |
| 318 | 318 | |
| 319 | 319 | case 0x46/2: |
| 320 | return (input_port_ | |
| 320 | return (input_port_ | |
| 321 | 321 | |
| 322 | 322 | |
| 323 | 323 | } |
| r2454 | r2455 | |
|---|---|---|
| 204 | 204 | /* from MESS */ |
| 205 | 205 | WRITE16_HANDLER(genesis_ctrl_w) |
| 206 | 206 | { |
| 207 | data &= | |
| 207 | data &= | |
| 208 | 208 | |
| 209 | 209 | /* logerror("genesis_ctrl_w %x, %x\n", offset, data); */ |
| 210 | 210 | |
| r2454 | r2455 | |
| 217 | 217 | if (data == 0x100) |
| 218 | 218 | { |
| 219 | 219 | z80running = 0; |
| 220 | cpunum_set_input_line( | |
| 220 | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, ASSERT_LINE); /* halt Z80 */ | |
| 221 | 221 | /* logerror("z80 stopped by 68k BusReq\n"); */ |
| 222 | 222 | } |
| 223 | 223 | else |
| r2454 | r2455 | |
| 225 | 225 | z80running = 1; |
| 226 | 226 | // memory_set_bankptr(1, &genesis_z80_ram[0]); |
| 227 | 227 | |
| 228 | cpunum_set_input_line( | |
| 228 | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, CLEAR_LINE); | |
| 229 | 229 | /* logerror("z80 started, BusReq ends\n"); */ |
| 230 | 230 | } |
| 231 | 231 | return; |
| r2454 | r2455 | |
| 233 | 233 | case 0x100: /* Z80 CPU Reset */ |
| 234 | 234 | if (data == 0x00) |
| 235 | 235 | { |
| 236 | cpunum_set_input_line(Machine, 1, INPUT_LINE_HALT, ASSERT_LINE); | |
| 237 | cpunum_set_input_line(Machine, 1, INPUT_LINE_RESET, PULSE_LINE); | |
| 236 | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, ASSERT_LINE); | |
| 237 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, PULSE_LINE); | |
| 238 | 238 | |
| 239 | cpunum_set_input_line( | |
| 239 | cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, ASSERT_LINE); | |
| 240 | 240 | /* logerror("z80 reset, ram is %p\n", &genesis_z80_ram[0]); */ |
| 241 | 241 | z80running = 0; |
| 242 | 242 | return; |
| r2454 | r2455 | |
|---|---|---|
| 635 | 635 | |
| 636 | 636 | static const struct AY8910interface ay8910_interface = |
| 637 | 637 | { |
| 638 | soundlatch_r | |
| 638 | AY8910_LEGACY_OUTPUT, | |
| 639 | AY8910_DEFAULT_LOADS, | |
| 640 | soundlatch_r, | |
| 641 | NULL, | |
| 642 | NULL, | |
| 643 | NULL | |
| 639 | 644 | }; |
| 640 | 645 | |
| 641 | 646 |
| r2454 | r2455 | |
|---|---|---|
| 91 | 91 | ***************************************************************************/ |
| 92 | 92 | |
| 93 | 93 | #include "driver.h" |
| 94 | #include "deprecat.h" | |
| 95 | 94 | #include "sound/pokey.h" |
| 96 | 95 | #include "cloud9.h" |
| 97 | 96 | |
| r2454 | r2455 | |
| 228 | 227 | { |
| 229 | 228 | if (irq_state) |
| 230 | 229 | { |
| 231 | cpunum_set_input_line( | |
| 230 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 232 | 231 | irq_state = 0; |
| 233 | 232 | } |
| 234 | 233 | } |
| r2454 | r2455 | |
|---|---|---|
| 194 | 194 | static READ8_HANDLER( sound_command_r ) |
| 195 | 195 | { |
| 196 | 196 | sound_busy = 0; |
| 197 | cpunum_set_input_line( | |
| 197 | cpunum_set_input_line(machine, 1, 0, (ym2151_irq | sound_busy) ? ASSERT_LINE : CLEAR_LINE); | |
| 198 | 198 | return sound_data; |
| 199 | 199 | } |
| 200 | 200 |
| r2454 | r2455 | |
|---|---|---|
| 449 | 449 | INPUT_PORTS_END |
| 450 | 450 | |
| 451 | 451 | |
| 452 | static const struct AY8910interface ay8910_interface_1 = { | |
| 452 | static const struct AY8910interface ay8910_interface_1 = | |
| 453 | { | |
| 454 | AY8910_LEGACY_OUTPUT, | |
| 455 | AY8910_DEFAULT_LOADS, | |
| 453 | 456 | input_port_0_r, |
| 454 | input_port_1_r | |
| 457 | input_port_1_r, | |
| 458 | NULL, | |
| 459 | NULL | |
| 455 | 460 | }; |
| 456 | 461 | |
| 457 | static const struct AY8910interface ay8910_interface_2 = { | |
| 462 | static const struct AY8910interface ay8910_interface_2 = | |
| 463 | { | |
| 464 | AY8910_LEGACY_OUTPUT, | |
| 465 | AY8910_DEFAULT_LOADS, | |
| 458 | 466 | input_port_2_r, |
| 459 | input_port_3_r | |
| 467 | input_port_3_r, | |
| 468 | NULL, | |
| 469 | NULL | |
| 460 | 470 | }; |
| 461 | 471 | |
| 462 | 472 |
| r2454 | r2455 | |
|---|---|---|
| 473 | 473 | r = ((paletteram32[offset] & 0x0000ff00) >>8); |
| 474 | 474 | g = ((paletteram32[offset] & 0x00ff0000) >>16); |
| 475 | 475 | |
| 476 | palette_set_color( | |
| 476 | palette_set_color(machine,offset^0xff,MAKE_RGB(r,g,b)); | |
| 477 | 477 | } |
| 478 | 478 | |
| 479 | 479 | static READ32_HANDLER( rabbit_tilemap0_r ) |
| r2454 | r2455 | |
| 553 | 553 | #if VERBOSE_AUDIO_LOG |
| 554 | 554 | int reg, voice, base, i; |
| 555 | 555 | |
| 556 | if (mem_mask == 0x | |
| 556 | if (mem_mask == 0x | |
| 557 | 557 | { |
| 558 | 558 | reg = offset*2; |
| 559 | 559 | data >>= 16; |
| 560 | 560 | } |
| 561 | else if (mem_mask == 0x | |
| 561 | else if (mem_mask == 0x | |
| 562 | 562 | { |
| 563 | 563 | reg = (offset*2)+1; |
| 564 | 564 | data &= 0xffff; |
| r2454 | r2455 | |
| 722 | 722 | { |
| 723 | 723 | // don't disturb the EEPROM if we're not actually writing to it |
| 724 | 724 | // (in particular, data & 0x100 here with mask = ffff00ff looks to be the watchdog) |
| 725 | if (mem_mask == 0x | |
| 725 | if (mem_mask == 0x | |
| 726 | 726 | { |
| 727 | 727 | // latch the bit |
| 728 | 728 | EEPROM_write_bit(data & 0x01000000); |
| r2454 | r2455 | |
| 792 | 792 | r = ((paletteram32[offset] & 0x0000ff00) >>8); |
| 793 | 793 | g = ((paletteram32[offset] & 0x00ff0000) >>16); |
| 794 | 794 | |
| 795 | palette_set_color( | |
| 795 | palette_set_color(machine,(offset^0xff)+0x2000,MAKE_RGB(r,g,b)); | |
| 796 | 796 | } |
| 797 | 797 | |
| 798 | 798 |
| r2454 | r2455 | |
|---|---|---|
| 9 | 9 | ***************************************************************************/ |
| 10 | 10 | |
| 11 | 11 | #include "driver.h" |
| 12 | #include "deprecat.h" | |
| 13 | 12 | #include "pooyan.h" |
| 14 | 13 | #include "audio/timeplt.h" |
| 15 | 14 | |
| r2454 | r2455 | |
| 44 | 43 | { |
| 45 | 44 | irq_enable = data & 1; |
| 46 | 45 | if (!irq_enable) |
| 47 | cpunum_set_input_line( | |
| 46 | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, CLEAR_LINE); | |
| 48 | 47 | } |
| 49 | 48 | |
| 50 | 49 |
| r2454 | r2455 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "deprecat.h" | |
| 11 | 10 | #include "video/konamiic.h" |
| 12 | 11 | #include "cpu/konami/konami.h" /* for the callback and the firq irq definition */ |
| 13 | 12 | #include "machine/eeprom.h" |
| r2454 | r2455 | |
| 57 | 56 | |
| 58 | 57 | static WRITE8_HANDLER( soundirq_w ) |
| 59 | 58 | { |
| 60 | cpunum_set_input_line_and_vector( | |
| 59 | cpunum_set_input_line_and_vector(machine, 1,0,HOLD_LINE,0xff); | |
| 61 | 60 | } |
| 62 | 61 | |
| 63 | 62 | static TIMER_CALLBACK( nmi_callback ) |
| r2454 | r2455 | |
| 67 | 66 | |
| 68 | 67 | static WRITE8_HANDLER( sound_arm_nmi_w ) |
| 69 | 68 | { |
| 70 | cpunum_set_input_line( | |
| 69 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, CLEAR_LINE); | |
| 71 | 70 | timer_set(ATTOTIME_IN_USEC(50), NULL,0,nmi_callback); /* kludge until the K053260 is emulated correctly */ |
| 72 | 71 | } |
| 73 | 72 |
| r2454 | r2455 | |
|---|---|---|
| 49 | 49 | static const int table_3[]={0xbd,0x73,0x80,0xbd,0x73,0xa7,0xbd,0x73,0xe0,0x7e,0x72,0x56,0xff,0xff,0xff,0xff}; |
| 50 | 50 | static int current_ptr=0,current_table=0,in_math=0,math_param; |
| 51 | 51 | |
| 52 | cpunum_set_input_line( | |
| 52 | cpunum_set_input_line(machine, 0,M6809_FIRQ_LINE,HOLD_LINE); /* i8751 triggers FIRQ on main cpu */ | |
| 53 | 53 | |
| 54 | 54 | /* This function takes multiple parameters */ |
| 55 | 55 | if (in_math==1) { |
| r2454 | r2455 | |
| 90 | 90 | static const int table_3[]={0xbd,0x71,0xc8,0xbd,0x71,0xef,0xbd,0x72,0x28,0x7e,0x70,0x9e,0xff,0xff,0xff,0xff}; |
| 91 | 91 | static int current_ptr=0,current_table=0,in_math,math_param; |
| 92 | 92 | |
| 93 | cpunum_set_input_line( | |
| 93 | cpunum_set_input_line(machine, 0,M6809_FIRQ_LINE,HOLD_LINE); /* i8751 triggers FIRQ on main cpu */ | |
| 94 | 94 | |
| 95 | 95 | /* This function takes multiple parameters */ |
| 96 | 96 | if (in_math==1) { |
| r2454 | r2455 | |
|---|---|---|
| 170 | 170 | bit = 1; |
| 171 | 171 | |
| 172 | 172 | /* bit 4 is EEPROM data, bit 7 is protection */ |
| 173 | return input_port_ | |
| 173 | return input_port_ | |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 |
| r2454 | r2455 | |
|---|---|---|
| 56 | 56 | ***************************************************************************/ |
| 57 | 57 | |
| 58 | 58 | #include "driver.h" |
| 59 | #include "deprecat.h" | |
| 60 | 59 | #include "cpu/m6502/m6502.h" |
| 61 | 60 | #include "sound/samples.h" |
| 62 | 61 | |
| r2454 | r2455 | |
| 107 | 106 | tankbatt_sound_enable = !data; |
| 108 | 107 | if (data != 0) |
| 109 | 108 | { |
| 110 | cpunum_set_input_line(Machine, 0, 0, CLEAR_LINE); | |
| 111 | cpunum_set_input_line(Machine, 0, INPUT_LINE_NMI, CLEAR_LINE); | |
| 109 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 110 | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, CLEAR_LINE); | |
| 112 | 111 | } |
| 113 | 112 | /* hack - turn off the engine noise if the normal game nmi's are disabled */ |
| 114 | 113 | if (data) sample_stop (2); |
| r2454 | r2455 | |
| 120 | 119 | tankbatt_nmi_enable = data; |
| 121 | 120 | if (data != 0) |
| 122 | 121 | { |
| 123 | cpunum_set_input_line(Machine, 0, 0, CLEAR_LINE); | |
| 124 | cpunum_set_input_line(Machine, 0, INPUT_LINE_NMI, CLEAR_LINE); | |
| 122 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 123 | cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, CLEAR_LINE); | |
| 125 | 124 | } |
| 126 | 125 | // interrupt_enable_w (offset, data); |
| 127 | 126 | } |
| r2454 | r2455 | |
|---|---|---|
| 363 | 363 | |
| 364 | 364 | static const struct AY8910interface ay8910_interface = |
| 365 | 365 | { |
| 366 | AY8910_LEGACY_OUTPUT, | |
| 367 | AY8910_DEFAULT_LOADS, | |
| 366 | 368 | input_port_6_r, // |
| 367 | 369 | input_port_7_r, // |
| 368 | 0, | |
| 369 | 0 | |
| 370 | NULL, | |
| 371 | NULL | |
| 370 | 372 | }; |
| 371 | 373 | |
| 372 | 374 | static MACHINE_DRIVER_START( cmv801 ) |
| r2454 | r2455 | |
|---|---|---|
| 31 | 31 | static READ8_HANDLER( exerion_port01_r ) |
| 32 | 32 | { |
| 33 | 33 | /* the cocktail flip bit muxes between ports 0 and 1 */ |
| 34 | return exerion_cocktail_flip ? input_port_ | |
| 34 | return exerion_cocktail_flip ? input_port_ | |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | |
| r2454 | r2455 | |
| 260 | 260 | |
| 261 | 261 | static const struct AY8910interface ay8910_interface = |
| 262 | 262 | { |
| 263 | AY8910_LEGACY_OUTPUT, | |
| 264 | AY8910_DEFAULT_LOADS, | |
| 263 | 265 | exerion_porta_r, |
| 264 | 0, | |
| 265 | 0, | |
| 266 | NULL, | |
| 267 | NULL, | |
| 266 | 268 | exerion_portb_w |
| 267 | 269 | }; |
| 268 | 270 |
| r2454 | r2455 | |
|---|---|---|
| 276 | 276 | |
| 277 | 277 | static const struct YM2203interface ym2203_interface = |
| 278 | 278 | { |
| 279 | input_port_2_r | |
| 279 | { | |
| 280 | AY8910_LEGACY_OUTPUT, | |
| 281 | AY8910_DEFAULT_LOADS, | |
| 282 | input_port_2_r, | |
| 283 | NULL, | |
| 284 | NULL, | |
| 285 | NULL | |
| 286 | }, | |
| 287 | NULL | |
| 280 | 288 | }; |
| 281 | 289 | |
| 282 | 290 |
| r2454 | r2455 | |
|---|---|---|
| 335 | 335 | if (custom_io_r) |
| 336 | 336 | return custom_io_r(machine, offset, mem_mask); |
| 337 | 337 | logerror("%06X:misc_io_r - unknown read access to address %04X\n", activecpu_get_pc(), offset * 2); |
| 338 | return segaic16_open_bus_r(machine,0, | |
| 338 | return segaic16_open_bus_r(machine,0,mem_mask); | |
| 339 | 339 | } |
| 340 | 340 | |
| 341 | 341 | |
| r2454 | r2455 | |
| 368 | 368 | custom_io_w(machine, offset, data, mem_mask); |
| 369 | 369 | return; |
| 370 | 370 | } |
| 371 | logerror("%06X:misc_io_w - unknown write access to address %04X = %04X & %04X\n", activecpu_get_pc(), offset * 2, data, mem_mask | |
| 371 | logerror("%06X:misc_io_w - unknown write access to address %04X = %04X & %04X\n", activecpu_get_pc(), offset * 2, data, mem_mask | |
| 372 | 372 | } |
| 373 | 373 | |
| 374 | 374 | |
| r2454 | r2455 | |
| 427 | 427 | case 0x3024/2: |
| 428 | 428 | return input_port_read(machine, "P34START"); |
| 429 | 429 | } |
| 430 | return segaic16_open_bus_r(machine,0, | |
| 430 | return segaic16_open_bus_r(machine,0,mem_mask); | |
| 431 | 431 | } |
| 432 | 432 | |
| 433 | 433 | |
| r2454 | r2455 | |
| 451 | 451 | lghost_value <<= 1; |
| 452 | 452 | return result; |
| 453 | 453 | } |
| 454 | return segaic16_open_bus_r(machine,0, | |
| 454 | return segaic16_open_bus_r(machine,0,mem_mask); | |
| 455 | 455 | } |
| 456 | 456 | |
| 457 | 457 | |
| r2454 | r2455 | |
| 511 | 511 | case 0x3014/2: |
| 512 | 512 | return (input_port_read(machine, "TRACKY3") - wwally_last_y[2]) & 0xff; |
| 513 | 513 | } |
| 514 | return segaic16_open_bus_r(machine,0, | |
| 514 | return segaic16_open_bus_r(machine,0,mem_mask); | |
| 515 | 515 | } |
| 516 | 516 | |
| 517 | 517 |
| r2454 | r2455 | |
|---|---|---|
| 291 | 291 | |
| 292 | 292 | static const struct AY8910interface ay8910_interface = |
| 293 | 293 | { |
| 294 | AY8910_LEGACY_OUTPUT, | |
| 295 | AY8910_DEFAULT_LOADS, | |
| 294 | 296 | soundlatch_r |
| 295 | 297 | }; |
| 296 | 298 |
| r2454 | r2455 | |
|---|---|---|
| 221 | 221 | |
| 222 | 222 | static READ8_HANDLER( royalmah_player_1_port_r ) |
| 223 | 223 | { |
| 224 | int ret = (input_port_ | |
| 224 | int ret = (input_port_ | |
| 225 | 225 | |
| 226 | if ((input_port_select & 0x01) == 0) ret &= input_port_0_r(machine,offset); | |
| 227 | if ((input_port_select & 0x02) == 0) ret &= input_port_1_r(machine,offset); | |
| 228 | if ((input_port_select & 0x04) == 0) ret &= input_port_2_r(machine,offset); | |
| 229 | if ((input_port_select & 0x08) == 0) ret &= input_port_3_r(machine,offset); | |
| 230 | if ((input_port_select & 0x10) == 0) ret &= input_port_4_r(machine,offset); | |
| 226 | if ((input_port_select & 0x01) == 0) ret &= input_port_read_indexed(machine,0); | |
| 227 | if ((input_port_select & 0x02) == 0) ret &= input_port_read_indexed(machine,1); | |
| 228 | if ((input_port_select & 0x04) == 0) ret &= input_port_read_indexed(machine,2); | |
| 229 | if ((input_port_select & 0x08) == 0) ret &= input_port_read_indexed(machine,3); | |
| 230 | if ((input_port_select & 0x10) == 0) ret &= input_port_read_indexed(machine,4); | |
| 231 | 231 | |
| 232 | 232 | return ret; |
| 233 | 233 | } |
| 234 | 234 | |
| 235 | 235 | static READ8_HANDLER( royalmah_player_2_port_r ) |
| 236 | 236 | { |
| 237 | int ret = (input_port_ | |
| 237 | int ret = (input_port_ | |
| 238 | 238 | |
| 239 | if ((input_port_select & 0x01) == 0) ret &= input_port_5_r(machine,offset); | |
| 240 | if ((input_port_select & 0x02) == 0) ret &= input_port_6_r(machine,offset); | |
| 241 | if ((input_port_select & 0x04) == 0) ret &= input_port_7_r(machine,offset); | |
| 242 | if ((input_port_select & 0x08) == 0) ret &= input_port_8_r(machine,offset); | |
| 243 | if ((input_port_select & 0x10) == 0) ret &= input_port_9_r(machine,offset); | |
| 239 | if ((input_port_select & 0x01) == 0) ret &= input_port_read_indexed(machine,5); | |
| 240 | if ((input_port_select & 0x02) == 0) ret &= input_port_read_indexed(machine,6); | |
| 241 | if ((input_port_select & 0x04) == 0) ret &= input_port_read_indexed(machine,7); | |
| 242 | if ((input_port_select & 0x08) == 0) ret &= input_port_read_indexed(machine,8); | |
| 243 | if ((input_port_select & 0x10) == 0) ret &= input_port_read_indexed(machine,9); | |
| 244 | 244 | |
| 245 | 245 | return ret; |
| 246 | 246 | } |
| r2454 | r2455 | |
| 3305 | 3305 | |
| 3306 | 3306 | static const struct AY8910interface ay8910_interface = |
| 3307 | 3307 | { |
| 3308 | AY8910_LEGACY_OUTPUT, | |
| 3309 | AY8910_DEFAULT_LOADS, | |
| 3308 | 3310 | royalmah_player_1_port_r, |
| 3309 | 3311 | royalmah_player_2_port_r |
| 3310 | 3312 | }; |
| r2454 | r2455 | |
|---|---|---|
| 48 | 48 | ***************************************************************************/ |
| 49 | 49 | |
| 50 | 50 | #include "driver.h" |
| 51 | #include "deprecat.h" | |
| 52 | 51 | #include "sound/ay8910.h" |
| 53 | 52 | #include "sound/dac.h" |
| 54 | 53 | |
| r2454 | r2455 | |
| 83 | 82 | |
| 84 | 83 | static WRITE8_HANDLER( exctsccr_mcu_halt_w ) |
| 85 | 84 | { |
| 86 | cpunum_set_input_line( | |
| 85 | cpunum_set_input_line(machine, 2, INPUT_LINE_HALT, (data & 1) ? ASSERT_LINE : CLEAR_LINE); | |
| 87 | 86 | } |
| 88 | 87 | |
| 89 | 88 | /*************************************************************************** |
| r2454 | r2455 | |
|---|---|---|
| 126 | 126 | { |
| 127 | 127 | if (offset == 1) |
| 128 | 128 | return input_port_read(machine, "COINCHIP"); |
| 129 | logerror("%06x:coin_chip_r(%02x) & %04x\n", activecpu_get_pc(), offset, mem_mask | |
| 129 | logerror("%06x:coin_chip_r(%02x) & %04x\n", activecpu_get_pc(), offset, mem_mask | |
| 130 | 130 | return 0xffff; |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | static WRITE16_HANDLER( coin_chip_w ) |
| 134 | 134 | { |
| 135 | logerror("%06x:coin_chip_w(%02x) = %04x & %04x\n", activecpu_get_pc(), offset, data, mem_mask | |
| 135 | logerror("%06x:coin_chip_w(%02x) = %04x & %04x\n", activecpu_get_pc(), offset, data, mem_mask | |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | // inputs at 282000, 282002 (full word) |
| r2454 | r2455 | |
|---|---|---|
| 49 | 49 | |
| 50 | 50 | |
| 51 | 51 | #include "driver.h" |
| 52 | #include "deprecat.h" | |
| 53 | 52 | #include "sound/okim6295.h" |
| 54 | 53 | |
| 55 | 54 | /* video/funybubl.c */ |
| r2454 | r2455 | |
|---|---|---|
| 20 | 20 | |
| 21 | 21 | static READ8_HANDLER( sichuan2_dsw1_r ) |
| 22 | 22 | { |
| 23 | int ret = input_port_ | |
| 23 | int ret = input_port_ | |
| 24 | 24 | |
| 25 | 25 | /* Based on the coin mode fill in the upper bits */ |
| 26 | if (input_port_ | |
| 26 | if (input_port_ | |
| 27 | 27 | { |
| 28 | 28 | /* Mode 1 */ |
| 29 | ret |= (input_port_ | |
| 29 | ret |= (input_port_ | |
| 30 | 30 | } |
| 31 | 31 | else |
| 32 | 32 | { |
| 33 | 33 | /* Mode 2 */ |
| 34 | ret |= (input_port_ | |
| 34 | ret |= (input_port_ | |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | return ret; |
| r2454 | r2455 | |
|---|---|---|
| 13 | 13 | ***************************************************************************/ |
| 14 | 14 | |
| 15 | 15 | #include "driver.h" |
| 16 | #include "deprecat.h" | |
| 17 | 16 | #include "tutankhm.h" |
| 18 | 17 | #include "cpu/m6809/m6809.h" |
| 19 | 18 | #include "audio/timeplt.h" |
| r2454 | r2455 | |
| 44 | 43 | { |
| 45 | 44 | irq_enable = data & 1; |
| 46 | 45 | if (!irq_enable) |
| 47 | cpunum_set_input_line( | |
| 46 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 48 | 47 | } |
| 49 | 48 | |
| 50 | 49 |
| r2454 | r2455 | |
|---|---|---|
| 335 | 335 | return res << 8; |
| 336 | 336 | } |
| 337 | 337 | else |
| 338 | return ~input_port_ | |
| 338 | return ~input_port_ | |
| 339 | 339 | } |
| 340 | 340 | |
| 341 | 341 | static WRITE16_HANDLER( macross2_sound_command_w ) |
| r2454 | r2455 | |
| 3676 | 3676 | |
| 3677 | 3677 | static const struct YM2203interface ym2203_nmk004_interface = |
| 3678 | 3678 | { |
| 3679 | 0,0,0,0,NMK004_irq | |
| 3679 | { | |
| 3680 | AY8910_LEGACY_OUTPUT, | |
| 3681 | AY8910_DEFAULT_LOADS, | |
| 3682 | NULL, NULL, NULL, NULL | |
| 3683 | }, | |
| 3684 | NMK004_irq | |
| 3680 | 3685 | }; |
| 3681 | 3686 | |
| 3682 | 3687 | static void ym2203_irqhandler(int irq) |
| r2454 | r2455 | |
| 3686 | 3691 | |
| 3687 | 3692 | static const struct YM2203interface ym2203_interface = |
| 3688 | 3693 | { |
| 3689 | 0,0,0,0,ym2203_irqhandler | |
| 3694 | { | |
| 3695 | AY8910_LEGACY_OUTPUT, | |
| 3696 | AY8910_DEFAULT_LOADS, | |
| 3697 | NULL, NULL, NULL, NULL | |
| 3698 | }, | |
| 3699 | ym2203_irqhandler | |
| 3690 | 3700 | }; |
| 3691 | 3701 | |
| 3692 | 3702 | static INTERRUPT_GEN( nmk_interrupt ) |
| r2454 | r2455 | |
|---|---|---|
| 65 | 65 | int _CRT_glob = 0; |
| 66 | 66 | |
| 67 | 67 | |
| 68 | ||
| 69 | 68 | //============================================================ |
| 70 | 69 | // LOCAL VARIABLES |
| 71 | 70 | //============================================================ |
| r2454 | r2455 | |
| 79 | 78 | static char mapfile_name[MAX_PATH]; |
| 80 | 79 | static LPTOP_LEVEL_EXCEPTION_FILTER pass_thru_filter; |
| 81 | 80 | |
| 81 | static HANDLE watchdog_exit_event; | |
| 82 | static HANDLE watchdog_thread; | |
| 83 | ||
| 84 | ||
| 82 | 85 | #ifndef MESS |
| 83 | 86 | static const TCHAR helpfile[] = TEXT("docs\\windows.txt"); |
| 84 | 87 | #else |
| r2454 | r2455 | |
| 101 | 104 | |
| 102 | 105 | static void soft_link_functions(void); |
| 103 | 106 | static int is_double_click_start(int argc); |
| 107 | static DWORD WINAPI watchdog_thread_entry(LPVOID lpParameter); | |
| 104 | 108 | static LONG CALLBACK exception_filter(struct _EXCEPTION_POINTERS *info); |
| 105 | 109 | static const char *lookup_symbol(UINT32 address); |
| 106 | 110 | static int get_code_base_size(UINT32 *base, UINT32 *size); |
| r2454 | r2455 | |
| 120 | 124 | // debugging options |
| 121 | 125 | { NULL, NULL, OPTION_HEADER, "WINDOWS DEBUGGING OPTIONS" }, |
| 122 | 126 | { "oslog", "0", OPTION_BOOLEAN, "output error.log data to the system debugger" }, |
| 127 | { "watchdog;wdog", "0", 0, "force the program to terminate if no updates within specified number of seconds" }, | |
| 123 | 128 | |
| 124 | 129 | // performance options |
| 125 | 130 | { NULL, NULL, OPTION_HEADER, "WINDOWS PERFORMANCE OPTIONS" }, |
| r2454 | r2455 | |
| 239 | 244 | // soft-link optional functions |
| 240 | 245 | soft_link_functions(); |
| 241 | 246 | |
| 247 | // compute the name of the mapfile | |
| 242 | 248 | strcpy(mapfile_name, argv[0]); |
| 243 | 249 | ext = strchr(mapfile_name, '.'); |
| 244 | if (ext) | |
| 250 | if (ext != NULL) | |
| 245 | 251 | strcpy(ext, ".map"); |
| 246 | 252 | else |
| 247 | 253 | strcat(mapfile_name, ".map"); |
| r2454 | r2455 | |
| 267 | 273 | |
| 268 | 274 | void osd_init(running_machine *machine) |
| 269 | 275 | { |
| 276 | int watchdog = options_get_int(mame_options(), WINOPTION_WATCHDOG); | |
| 277 | ||
| 270 | 278 | // thread priority |
| 271 | 279 | if (!options_get_bool(mame_options(), OPTION_DEBUG)) |
| 272 | 280 | SetThreadPriority(GetCurrentThread(), options_get_int(mame_options(), WINOPTION_PRIORITY)); |
| r2454 | r2455 | |
| 295 | 303 | // mm_task = (*av_set_mm_thread_characteristics)(TEXT("Playback"), &task_index); |
| 296 | 304 | |
| 297 | 305 | start_profiler(); |
| 306 | ||
| 307 | // if a watchdog thread is requested, create one | |
| 308 | if (watchdog != 0) | |
| 309 | { | |
| 310 | watchdog_exit_event = CreateEvent(NULL, TRUE, FALSE, NULL); | |
| 311 | assert_always(watchdog_exit_event != NULL, "Failed to create watchdog event"); | |
| 312 | watchdog_thread = CreateThread(NULL, 0, watchdog_thread_entry, (LPVOID)watchdog, 0, NULL); | |
| 313 | assert_always(watchdog_thread != NULL, "Failed to create watchdog thread"); | |
| 314 | } | |
| 298 | 315 | } |
| 299 | 316 | |
| 300 | 317 | |
| 318 | //============================================================ | |
| 319 | // osd_exit | |
| 320 | //============================================================ | |
| 321 | ||
| 301 | 322 | static void osd_exit(running_machine *machine) |
| 302 | 323 | { |
| 324 | // take down the watchdog thread if it exists | |
| 325 | if (watchdog_thread != NULL) | |
| 326 | { | |
| 327 | SetEvent(watchdog_exit_event); | |
| 328 | WaitForSingleObject(watchdog_thread, INFINITE); | |
| 329 | watchdog_exit_event = NULL; | |
| 330 | watchdog_thread = NULL; | |
| 331 | } | |
| 332 | ||
| 303 | 333 | stop_profiler(); |
| 304 | 334 | |
| 305 | 335 | // turn off our multimedia tasks |
| r2454 | r2455 | |
| 361 | 391 | |
| 362 | 392 | |
| 363 | 393 | //============================================================ |
| 394 | // watchdog_thread_entry | |
| 395 | //============================================================ | |
| 396 | ||
| 397 | static DWORD WINAPI watchdog_thread_entry(LPVOID lpParameter) | |
| 398 | { | |
| 399 | DWORD timeout = (int)(FPTR)lpParameter * 1000; | |
| 400 | DWORD wait_result; | |
| 401 | ||
| 402 | wait_result = WaitForSingleObject(watchdog_exit_event, timeout); | |
| 403 | if (wait_result == WAIT_TIMEOUT) | |
| 404 | TerminateProcess(GetCurrentProcess(), -1); | |
| 405 | return 0; | |
| 406 | } | |
| 407 | ||
| 408 | ||
| 409 | //============================================================ | |
| 364 | 410 | // exception_filter |
| 365 | 411 | //============================================================ |
| 366 | 412 | |
| r2454 | r2455 | |
| 550 | 596 | |
| 551 | 597 | // parse the file, looking for map entries |
| 552 | 598 | while (fgets(line, sizeof(line) - 1, map)) |
| 553 | if ( | |
| 599 | if ( | |
| 554 | 600 | if (sscanf(line, " 0x%08x %s", &addr, symbol) == 2) |
| 555 | 601 | if (addr <= address && addr > best_addr) |
| 556 | 602 | { |
| 557 | 603 | best_addr = addr; |
| 558 | 604 | strcpy(best_symbol, symbol); |
| 559 | 605 | } |
| 606 | fclose(map); | |
| 560 | 607 | |
| 561 | 608 | // create the final result |
| 562 | 609 | if (address - best_addr > 0x10000) |
| r2454 | r2455 | |
| 575 | 622 | { |
| 576 | 623 | FILE * map = fopen(mapfile_name, "r"); |
| 577 | 624 | char line[1024]; |
| 625 | int result = 0; | |
| 578 | 626 | |
| 579 | 627 | // if no file, return nothing |
| 580 | 628 | if (map == NULL) |
| r2454 | r2455 | |
| 584 | 632 | while (fgets(line, sizeof(line) - 1, map)) |
| 585 | 633 | if (!strncmp(line, ".text 0x", 18)) |
| 586 | 634 | if (sscanf(line, ".text 0x%08x 0x%x", base, size) == 2) |
| 587 | return 1; | |
| 635 | { | |
| 636 | result = 1; | |
| 637 | break; | |
| 638 | } | |
| 588 | 639 | |
| 640 | fclose(map); | |
| 589 | 641 | return 0; |
| 590 | 642 | } |
| 591 | 643 | |
| r2454 | r2455 | |
| 625 | 677 | static DWORD profiler_thread_id; |
| 626 | 678 | static volatile UINT8 profiler_thread_exit; |
| 627 | 679 | |
| 680 | ||
| 681 | ||
| 628 | 682 | //============================================================ |
| 629 | 683 | // compare_base |
| 630 | 684 | // compare_hits -- qsort callbacks to sort on |
| r2454 | r2455 | |
|---|---|---|
| 48 | 48 | #define WINOPTION_AUDIO_LATENCY "audio_latency" |
| 49 | 49 | #define WINOPTION_PRIORITY "priority" |
| 50 | 50 | #define WINOPTION_MULTITHREADING "multithreading" |
| 51 | #define WINOPTION_WATCHDOG "watchdog" | |
| 51 | 52 | #define WINOPTION_OSLOG "oslog" |
| 52 | 53 | |
| 53 | 54 |
| r2454 | r2455 | |
|---|---|---|
| 1320 | 1320 | within_debugger_code = TRUE; |
| 1321 | 1321 | |
| 1322 | 1322 | /* adjust address, size & value_to_write based on mem_mask. */ |
| 1323 | if | |
| 1323 | if | |
| 1324 | 1324 | { |
| 1325 | 1325 | const debug_cpu_info *info = &debug_cpuinfo[cpunum]; |
| 1326 | 1326 | int address_offset = 0; |
| r2454 | r2455 | |
| 1340 | 1340 | } |
| 1341 | 1341 | |
| 1342 | 1342 | if (info->endianness == CPU_IS_LE) |
| 1343 | { | |
| 1344 | 1343 | address += address_offset; |
| 1345 | } | |
| 1346 | 1344 | else |
| 1347 | { | |
| 1348 | 1345 | address += bus_size - size - address_offset; |
| 1349 | } | |
| 1350 | 1346 | } |
| 1351 | 1347 | |
| 1352 | 1348 | /* if we are a write watchpoint, stash the value that will be written */ |
| r2454 | r2455 | |
|---|---|---|
| 32 | 32 | |
| 33 | 33 | |
| 34 | 34 | #include "debugger.h" |
| 35 | #include "deprecat.h" | |
| 36 | 35 | #include "m6805.h" |
| 37 | 36 | |
| 38 | 37 | #define IRQ_LEVEL_DETECT 0 |
| r2454 | r2455 | |
|---|---|---|
| 41 | 41 | ****************************************************************************/ |
| 42 | 42 | |
| 43 | 43 | #include "debugger.h" |
| 44 | #include "deprecat.h" | |
| 45 | 44 | |
| 46 | 45 | typedef UINT8 BOOLEAN; |
| 47 | 46 | typedef UINT8 BYTE; |
| r2454 | r2455 | |
|---|---|---|
| 18 | 18 | * |
| 19 | 19 | *****************************************************************************/ |
| 20 | 20 | #include "debugger.h" |
| 21 | #include "deprecat.h" | |
| 22 | 21 | |
| 23 | 22 | #include "lh5801.h" |
| 24 | 23 |
| r2454 | r2455 | |
|---|---|---|
| 71 | 71 | *****************************************************************************/ |
| 72 | 72 | |
| 73 | 73 | #include "debugger.h" |
| 74 | #include "deprecat.h" | |
| 75 | 74 | #include "m6809.h" |
| 76 | 75 | |
| 77 | 76 | /* Enable big switch statement for the main opcodes */ |
| r2454 | r2455 | |
|---|---|---|
| 3941 | 3941 | |
| 3942 | 3942 | static READ16_HANDLER( h8_itu_r ) |
| 3943 | 3943 | { |
| 3944 | if (mem_mask == 0) | |
| 3944 | if (mem_mask == 0xffff) | |
| 3945 | 3945 | { |
| 3946 | 3946 | // 16-bit read |
| 3947 | 3947 | return h8_register_read8(offset*2 + 0xffff10)<<8 | h8_register_read8((offset*2) + 1 + 0xffff10); |
| 3948 | 3948 | } |
| 3949 | else if (mem_mask == 0xff) | |
| 3949 | else if (mem_mask == 0xff00) | |
| 3950 | 3950 | { |
| 3951 | 3951 | return h8_register_read8(offset*2 + 0xffff10)<<8; |
| 3952 | 3952 | } |
| 3953 | else if (mem_mask == 0x | |
| 3953 | else if (mem_mask == 0x | |
| 3954 | 3954 | { |
| 3955 | 3955 | return h8_register_read8((offset*2) + 1 + 0xffff10); |
| 3956 | 3956 | } |
| r2454 | r2455 | |
| 3960 | 3960 | |
| 3961 | 3961 | static WRITE16_HANDLER( h8_itu_w ) |
| 3962 | 3962 | { |
| 3963 | if (mem_mask == 0) | |
| 3963 | if (mem_mask == 0xffff) | |
| 3964 | 3964 | { |
| 3965 | 3965 | // 16-bit write |
| 3966 | 3966 | h8_register_write8(offset*2 + 0xffff10, data>>8); |
| 3967 | 3967 | h8_register_write8((offset*2) + 1 + 0xffff10, data&0xff); |
| 3968 | 3968 | } |
| 3969 | else if (mem_mask == 0xff) | |
| 3969 | else if (mem_mask == 0xff00) | |
| 3970 | 3970 | { |
| 3971 | 3971 | h8_register_write8(offset*2 + 0xffff10, data>>8); |
| 3972 | 3972 | } |
| 3973 | else if (mem_mask == 0x | |
| 3973 | else if (mem_mask == 0x | |
| 3974 | 3974 | { |
| 3975 | 3975 | h8_register_write8((offset*2) + 1 + 0xffff10, data&0xff); |
| 3976 | 3976 | } |
| r2454 | r2455 | |
| 3978 | 3978 | |
| 3979 | 3979 | static READ16_HANDLER( h8_3007_itu_r ) |
| 3980 | 3980 | { |
| 3981 | if (mem_mask == 0) | |
| 3981 | if (mem_mask == 0xffff) | |
| 3982 | 3982 | { |
| 3983 | 3983 | // 16-bit read |
| 3984 | 3984 | return h8_3007_register_read8(offset*2 + 0xffff20)<<8 | h8_3007_register_read8((offset*2) + 1 + 0xffff20); |
| 3985 | 3985 | } |
| 3986 | else if (mem_mask == 0xff) | |
| 3986 | else if (mem_mask == 0xff00) | |
| 3987 | 3987 | { |
| 3988 | 3988 | return h8_3007_register_read8(offset*2 + 0xffff20)<<8; |
| 3989 | 3989 | } |
| 3990 | else if (mem_mask == 0x | |
| 3990 | else if (mem_mask == 0x | |
| 3991 | 3991 | { |
| 3992 | 3992 | return h8_3007_register_read8((offset*2) + 1 + 0xffff20); |
| 3993 | 3993 | } |
| r2454 | r2455 | |
| 3996 | 3996 | } |
| 3997 | 3997 | static WRITE16_HANDLER( h8_3007_itu_w ) |
| 3998 | 3998 | { |
| 3999 | if (mem_mask == 0) | |
| 3999 | if (mem_mask == 0xffff) | |
| 4000 | 4000 | { |
| 4001 | 4001 | // 16-bit write |
| 4002 | 4002 | h8_3007_register_write8(offset*2 + 0xffff20, data>>8); |
| 4003 | 4003 | h8_3007_register_write8((offset*2) + 1 + 0xffff20, data&0xff); |
| 4004 | 4004 | } |
| 4005 | else if (mem_mask == 0xff) | |
| 4005 | else if (mem_mask == 0xff00) | |
| 4006 | 4006 | { |
| 4007 | 4007 | h8_3007_register_write8(offset*2 + 0xffff20, data>>8); |
| 4008 | 4008 | } |
| 4009 | else if (mem_mask == 0x | |
| 4009 | else if (mem_mask == 0x | |
| 4010 | 4010 | { |
| 4011 | 4011 | h8_3007_register_write8((offset*2) + 1 + 0xffff20, data&0xff); |
| 4012 | 4012 | } |
| r2454 | r2455 | |
| 4014 | 4014 | |
| 4015 | 4015 | static READ16_HANDLER( h8_3007_itu1_r ) |
| 4016 | 4016 | { |
| 4017 | if (mem_mask == 0) | |
| 4017 | if (mem_mask == 0xffff) | |
| 4018 | 4018 | { |
| 4019 | 4019 | // 16-bit read |
| 4020 | 4020 | return h8_3007_register1_read8(offset*2 + 0xfee000)<<8 | h8_3007_register1_read8((offset*2) + 1 + 0xfee000); |
| 4021 | 4021 | } |
| 4022 | else if (mem_mask == 0xff) | |
| 4022 | else if (mem_mask == 0xff00) | |
| 4023 | 4023 | { |
| 4024 | 4024 | return h8_3007_register1_read8(offset*2 + 0xfee000)<<8; |
| 4025 | 4025 | } |
| 4026 | else if (mem_mask == 0x | |
| 4026 | else if (mem_mask == 0x | |
| 4027 | 4027 | { |
| 4028 | 4028 | return h8_3007_register1_read8((offset*2) + 1 + 0xfee000); |
| 4029 | 4029 | } |
| r2454 | r2455 | |
| 4032 | 4032 | } |
| 4033 | 4033 | static WRITE16_HANDLER( h8_3007_itu1_w ) |
| 4034 | 4034 | { |
| 4035 | if (mem_mask == 0) | |
| 4035 | if (mem_mask == 0xffff) | |
| 4036 | 4036 | { |
| 4037 | 4037 | // 16-bit write |
| 4038 | 4038 | h8_3007_register1_write8(offset*2 + 0xfee000, data>>8); |
| 4039 | 4039 | h8_3007_register1_write8((offset*2) + 1 + 0xfee000, data&0xff); |
| 4040 | 4040 | } |
| 4041 | else if (mem_mask == 0xff) | |
| 4041 | else if (mem_mask == 0xff00) | |
| 4042 | 4042 | { |
| 4043 | 4043 | h8_3007_register1_write8(offset*2 + 0xfee000, data>>8); |
| 4044 | 4044 | } |
| 4045 | else if (mem_mask == 0x | |
| 4045 | else if (mem_mask == 0x | |
| 4046 | 4046 | { |
| 4047 | 4047 | h8_3007_register1_write8((offset*2) + 1 + 0xfee000, data&0xff); |
| 4048 | 4048 | } |
| r2454 | r2455 | |
|---|---|---|
| 6 | 6 | /* ======================================================================== */ |
| 7 | 7 | |
| 8 | 8 | #include "debugger.h" |
| 9 | #include "deprecat.h" | |
| 10 | 9 | #include "m68000.h" |
| 11 | 10 | |
| 12 | 11 | /* Configuration switches (see m68kconf.h for explanation) */ |
| r2454 | r2455 | |
|---|---|---|
| 9 | 9 | ***************************************************************************/ |
| 10 | 10 | |
| 11 | 11 | #include "debugger.h" |
| 12 | #include "deprecat.h" | |
| 13 | 12 | #include "ccpu.h" |
| 14 | 13 | |
| 15 | 14 |
| r2454 | r2455 | |
|---|---|---|
| 37 | 37 | /** **/ |
| 38 | 38 | /*************************************************************/ |
| 39 | 39 | #include "debugger.h" |
| 40 | #include "deprecat.h" | |
| 41 | 40 | #include "z80gb.h" |
| 42 | 41 | |
| 43 | 42 | #define FLAG_Z 0x80 |
| r2454 | r2455 | |
|---|---|---|
| 701 | 701 | /* the first time we are run */ |
| 702 | 702 | state.reset_deferred = state.config->halt_on_reset; |
| 703 | 703 | if (state.config->halt_on_reset) |
| 704 | tms34010_io_register_w(Machine, REG_HSTCTLH, 0x8000, 0); | |
| 704 | tms34010_io_register_w(Machine, REG_HSTCTLH, 0x8000, 0xffff); | |
| 705 | 705 | } |
| 706 | 706 | |
| 707 | 707 | #if (HAS_TMS34020) |
| r2454 | r2455 | |
| 1672 | 1672 | /* control register */ |
| 1673 | 1673 | case TMS34010_HOST_CONTROL: |
| 1674 | 1674 | external_host_access = TRUE; |
| 1675 | tms34010_io_register_w(state.screen->machine, REG_HSTCTLH, data & 0xff00, 0); | |
| 1676 | tms34010_io_register_w(state.screen->machine, REG_HSTCTLL, data & 0x00ff, 0); | |
| 1675 | tms34010_io_register_w(state.screen->machine, REG_HSTCTLH, data & 0xff00, 0xffff); | |
| 1676 | tms34010_io_register_w(state.screen->machine, REG_HSTCTLL, data & 0x00ff, 0xffff); | |
| 1677 | 1677 | external_host_access = FALSE; |
| 1678 | 1678 | break; |
| 1679 | 1679 |
| r2454 | r2455 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "debugger.h" |
| 10 | #include "deprecat.h" | |
| 11 | 10 | #include "tms32031.h" |
| 12 | 11 | #include "eminline.h" |
| 13 | 12 |
| r2454 | r2455 | |
|---|---|---|
| 669 | 669 | |
| 670 | 670 | static WRITE16_HANDLER( m37710_internal_word_w ) |
| 671 | 671 | { |
| 672 | if (mem_mask == 0) | |
| 672 | if (mem_mask == 0xffff) | |
| 673 | 673 | { |
| 674 | 674 | m37710_internal_w((offset*2), data & 0xff); |
| 675 | 675 | m37710_internal_w((offset*2)+1, data>>8); |
| 676 | 676 | } |
| 677 | else if (mem_mask == 0xff) | |
| 677 | else if (mem_mask == 0xff00) | |
| 678 | 678 | { |
| 679 | 679 | m37710_internal_w((offset*2)+1, data>>8); |
| 680 | 680 | } |
| 681 | else if (mem_mask == 0x | |
| 681 | else if (mem_mask == 0x | |
| 682 | 682 | { |
| 683 | 683 | m37710_internal_w((offset*2), data & 0xff); |
| 684 | 684 | } |
| r2454 | r2455 | |
|---|---|---|
| 12 | 12 | #include <limits.h> |
| 13 | 13 | #include "cpuintrf.h" |
| 14 | 14 | #include "debugger.h" |
| 15 | #include "deprecat.h" | |
| 16 | 15 | #include "m37710.h" |
| 17 | 16 | |
| 18 | 17 |
| r2454 | r2455 | |
|---|---|---|
| 4 | 4 | */ |
| 5 | 5 | |
| 6 | 6 | #include "sharc.h" |
| 7 | #include "deprecat.h" | |
| 8 | 7 | #include "debugger.h" |
| 9 | 8 | |
| 10 | 9 | #ifdef ENABLE_DEBUGGER |
| r2454 | r2455 | |
|---|---|---|
| 77 | 77 | *****************************************************************************/ |
| 78 | 78 | |
| 79 | 79 | #include "debugger.h" |
| 80 | #include "deprecat.h" | |
| 81 | 80 | #include "z180.h" |
| 82 | 81 | #include "cpu/z80/z80daisy.h" |
| 83 | 82 |
| r2454 | r2455 | |
|---|---|---|
| 6 | 6 | |
| 7 | 7 | #include "debugger.h" |
| 8 | 8 | #include "cpuintrf.h" |
| 9 | #include "deprecat.h" | |
| 10 | 9 | |
| 11 | 10 | #include "host.h" |
| 12 | 11 | #include "i86.h" |
| r2454 | r2455 | |
|---|---|---|
| 4 | 4 | ****************************************************************************/ |
| 5 | 5 | |
| 6 | 6 | #include "debugger.h" |
| 7 | #include "deprecat.h" | |
| 8 | 7 | #include "host.h" |
| 9 | 8 | |
| 10 | 9 |
| r2454 | r2455 | |
|---|---|---|
| 407 | 407 | |
| 408 | 408 | #include "debugger.h" |
| 409 | 409 | #include "upd7810.h" |
| 410 | #include "deprecat.h" | |
| 411 | 410 | |
| 412 | 411 | static UPD7810 upd7810; |
| 413 | 412 | static int upd7810_icount; |
| r2454 | r2455 | |
|---|---|---|
| 28 | 28 | *****************************************************************************/ |
| 29 | 29 | |
| 30 | 30 | #include "debugger.h" |
| 31 | #include "deprecat.h" | |
| 32 | 31 | |
| 33 | 32 | #include "sc61860.h" |
| 34 | 33 | #include "sc.h" |
| r2454 | r2455 | |
|---|---|---|
| 47 | 47 | |
| 48 | 48 | #include "minx.h" |
| 49 | 49 | #include "debugger.h" |
| 50 | #include "deprecat.h" | |
| 51 | 50 | |
| 52 | 51 | #define FLAG_I 0x80 |
| 53 | 52 | #define FLAG_D 0x40 |
| r2454 | r2455 | |
|---|---|---|
| 4 | 4 | // Portability fixes by Richter Belmont |
| 5 | 5 | |
| 6 | 6 | #include "debugger.h" |
| 7 | #include "deprecat.h" | |
| 8 | 7 | #include "v60.h" |
| 9 | 8 | |
| 10 | 9 | // memory accessors |
| r2454 | r2455 | |
|---|---|---|
| 62 | 62 | |
| 63 | 63 | #include <limits.h> |
| 64 | 64 | #include "debugger.h" |
| 65 | #include "deprecat.h" | |
| 66 | 65 | #include "spc700.h" |
| 67 | 66 | |
| 68 | 67 | /* ======================================================================== */ |
| r2454 | r2455 | |
|---|---|---|
| 19 | 19 | ***************************************************************************/ |
| 20 | 20 | |
| 21 | 21 | #include "debugger.h" |
| 22 | #include "deprecat.h" | |
| 23 | 22 | #include "dsp56k.h" |
| 24 | 23 | |
| 25 | 24 | // #define PC_E000 |
| r2454 | r2455 | |
|---|---|---|
| 35 | 35 | |
| 36 | 36 | |
| 37 | 37 | #include "debugger.h" |
| 38 | #include "deprecat.h" | |
| 39 | 38 | #include "i8039.h" |
| 40 | 39 | |
| 41 | 40 |
| r2454 | r2455 | |
|---|---|---|
| 18 | 18 | */ |
| 19 | 19 | |
| 20 | 20 | #include "debugger.h" |
| 21 | #include "deprecat.h" | |
| 22 | 21 | #include "ssp1601.h" |
| 23 | 22 | |
| 24 | 23 |
| r2454 | r2455 | |
|---|---|---|
| 7 | 7 | *************************************************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "debugger.h" |
| 10 | #include "deprecat.h" | |
| 11 | 10 | #include "tlcs90.h" |
| 12 | 11 | |
| 13 | 12 | typedef struct |
| r2454 | r2455 | |
|---|---|---|
| 13 | 13 | *************************************************************************/ |
| 14 | 14 | |
| 15 | 15 | #include "debugger.h" |
| 16 | #include "deprecat.h" | |
| 17 | 16 | #include "s2650.h" |
| 18 | 17 | #include "s2650cpu.h" |
| 19 | 18 |
| r2454 | r2455 | |
|---|---|---|
| 1 | 1 | #include "debugger.h" |
| 2 | #include "deprecat.h" | |
| 3 | 2 | #include "se3208.h" |
| 4 | 3 | |
| 5 | 4 | /* |
| r2454 | r2455 | |
|---|---|---|
| 212 | 212 | *********************************************************************/ |
| 213 | 213 | |
| 214 | 214 | #include "debugger.h" |
| 215 | #include "deprecat.h" | |
| 216 | 215 | #include "eminline.h" |
| 217 | 216 | #include "e132xs.h" |
| 218 | 217 | #include "osd_cpu.h" |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | 7 | #include "debugger.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "mc68hc11.h" |
| 10 | 9 | |
| 11 | 10 | enum { |
| r2454 | r2455 | |
|---|---|---|
| 96 | 96 | ***************************************************************************/ |
| 97 | 97 | |
| 98 | 98 | #include "debugger.h" |
| 99 | #include "deprecat.h" | |
| 100 | 99 | #include "adsp2100.h" |
| 101 | 100 | |
| 102 | 101 |
| r2454 | r2455 | |
|---|---|---|
| 28 | 28 | ***************************************************************************/ |
| 29 | 29 | |
| 30 | 30 | #include "debugger.h" |
| 31 | #include "deprecat.h" | |
| 32 | 31 | #include "dsp32.h" |
| 33 | 32 | |
| 34 | 33 |
| r2454 | r2455 | |
|---|---|---|
| 20 | 20 | |
| 21 | 21 | #include "cpuintrf.h" |
| 22 | 22 | #include "debugger.h" |
| 23 | #include "deprecat.h" | |
| 24 | 23 | #include "cop400.h" |
| 25 | 24 | |
| 26 | 25 | /* The opcode table now is a combination of cycle counts and function pointers */ |
| r2454 | r2455 | |
|---|---|---|
| 20 | 20 | |
| 21 | 21 | #include "cpuintrf.h" |
| 22 | 22 | #include "debugger.h" |
| 23 | #include "deprecat.h" | |
| 24 | 23 | #include "cop400.h" |
| 25 | 24 | |
| 26 | 25 | /* The opcode table now is a combination of cycle counts and function pointers */ |
| r2454 | r2455 | |
|---|---|---|
| 24 | 24 | /* 4. February 2000 PeT ply inw dew */ |
| 25 | 25 | /* 4. February 2000 PeT fixed relative word operand */ |
| 26 | 26 | /* 9. May 2000 PeT added m4510 */ |
| 27 | /* 18.April 2008 Roberto Fresca fixed bbr, bbs, rmb & smb displayment, | |
| 28 | showing the correct bit to operate */ | |
| 27 | 29 | |
| 28 | 30 | #include "debugger.h" |
| 29 | 31 | #include "m6502.h" |
| r2454 | r2455 | |
| 589 | 591 | |
| 590 | 592 | dst += sprintf(dst, "%-5s", token[opc]); |
| 591 | 593 | if( opc == bbr || opc == bbs || opc == rmb || opc == smb ) |
| 592 | dst += sprintf(dst, "%d,", (op >> | |
| 594 | dst += sprintf(dst, "%d,", (op >> 4) & 7); | |
| 593 | 595 | |
| 594 | 596 | switch(arg) |
| 595 | 597 | { |
| r2454 | r2455 | |
|---|---|---|
| 101 | 101 | */ |
| 102 | 102 | |
| 103 | 103 | #include "debugger.h" |
| 104 | #include "deprecat.h" | |
| 105 | 104 | #include "m6502.h" |
| 106 | 105 | #include "m4510.h" |
| 107 | 106 |
| r2454 | r2455 | |
|---|---|---|
| 30 | 30 | #endif |
| 31 | 31 | |
| 32 | 32 | #include "debugger.h" |
| 33 | #include "deprecat.h" | |
| 34 | 33 | #include "m6502.h" |
| 35 | 34 | #include "ops02.h" |
| 36 | 35 | #include "ill02.h" |
| r2454 | r2455 | |
|---|---|---|
| 38 | 38 | */ |
| 39 | 39 | |
| 40 | 40 | #include "debugger.h" |
| 41 | #include "deprecat.h" | |
| 42 | 41 | #include "m6509.h" |
| 43 | 42 | |
| 44 | 43 | #include "ops02.h" |
| r2454 | r2455 | |
|---|---|---|
| 38 | 38 | */ |
| 39 | 39 | |
| 40 | 40 | #include "debugger.h" |
| 41 | #include "deprecat.h" | |
| 42 | 41 | #include "m65ce02.h" |
| 43 | 42 | |
| 44 | 43 | #include "mincce02.h" |
| r2454 | r2455 | |
|---|---|---|
| 121 | 121 | /*int survival_prot = 0; */ |
| 122 | 122 | |
| 123 | 123 | #include "debugger.h" |
| 124 | #include "deprecat.h" | |
| 125 | 124 | #include "i8085.h" |
| 126 | 125 | #include "i8085cpu.h" |
| 127 | 126 | #include "i8085daa.h" |
| r2454 | r2455 | |
|---|---|---|
| 3 | 3 | #include <setjmp.h> |
| 4 | 4 | #include "ppc.h" |
| 5 | 5 | #include "debugger.h" |
| 6 | #include "deprecat.h" | |
| 7 | 6 | |
| 8 | 7 | #if (HAS_PPC603 || HAS_PPC601 || HAS_PPC604) |
| 9 | 8 | static void ppc603_exception(int exception); |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | 7 | #include "debugger.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "ppc.h" |
| 10 | 9 | #include "cpu/x86drc.h" |
| 11 | 10 |
| r2454 | r2455 | |
|---|---|---|
| 16 | 16 | */ |
| 17 | 17 | |
| 18 | 18 | #include "arm.h" |
| 19 | #include "deprecat.h" | |
| 20 | 19 | #include "debugger.h" |
| 21 | 20 | |
| 22 | 21 | #define READ8(addr) cpu_read8(addr) |
| r2454 | r2455 | |
|---|---|---|
| 44 | 44 | *****************************************************************************/ |
| 45 | 45 | |
| 46 | 46 | #include "debugger.h" |
| 47 | #include "deprecat.h" | |
| 48 | 47 | #include "z8000.h" |
| 49 | 48 | #include "z8000cpu.h" |
| 50 | 49 | #include "osd_cpu.h" |
| r2454 | r2455 | |
|---|---|---|
| 54 | 54 | |
| 55 | 55 | |
| 56 | 56 | #include "debugger.h" |
| 57 | #include "deprecat.h" | |
| 58 | 57 | #include "tms32010.h" |
| 59 | 58 | |
| 60 | 59 |
| r2454 | r2455 | |
|---|---|---|
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | 12 | #include "debugger.h" |
| 13 | #include "deprecat.h" | |
| 14 | 13 | #include "sm8500.h" |
| 15 | 14 | |
| 16 | 15 | #define FLAG_C 0x80 |
| r2454 | r2455 | |
|---|---|---|
| 189 | 189 | INLINE UINT8 RB(offs_t A) |
| 190 | 190 | { |
| 191 | 191 | if (A >= 0xe0000000) |
| 192 | return sh2_internal_r(Machine, (A & 0x1fc)>>2, | |
| 192 | return sh2_internal_r(Machine, (A & 0x1fc)>>2, | |
| 193 | 193 | |
| 194 | 194 | if (A >= 0xc0000000) |
| 195 | 195 | return program_read_byte_32be(A); |
| r2454 | r2455 | |
| 203 | 203 | INLINE UINT16 RW(offs_t A) |
| 204 | 204 | { |
| 205 | 205 | if (A >= 0xe0000000) |
| 206 | return sh2_internal_r(Machine, (A & 0x1fc)>>2, | |
| 206 | return sh2_internal_r(Machine, (A & 0x1fc)>>2, | |
| 207 | 207 | |
| 208 | 208 | if (A >= 0xc0000000) |
| 209 | 209 | return program_read_word_32be(A); |
| r2454 | r2455 | |
| 217 | 217 | INLINE UINT32 RL(offs_t A) |
| 218 | 218 | { |
| 219 | 219 | if (A >= 0xe0000000) |
| 220 | return sh2_internal_r(Machine, (A & 0x1fc)>>2, 0); | |
| 220 | return sh2_internal_r(Machine, (A & 0x1fc)>>2, 0xffffffff); | |
| 221 | 221 | |
| 222 | 222 | if (A >= 0xc0000000) |
| 223 | 223 | return program_read_dword_32be(A); |
| r2454 | r2455 | |
| 233 | 233 | |
| 234 | 234 | if (A >= 0xe0000000) |
| 235 | 235 | { |
| 236 | sh2_internal_w(Machine, (A & 0x1fc)>>2, V << (((~A) & 3)*8), | |
| 236 | sh2_internal_w(Machine, (A & 0x1fc)>>2, V << (((~A) & 3)*8), | |
| 237 | 237 | return; |
| 238 | 238 | } |
| 239 | 239 | |
| r2454 | r2455 | |
| 253 | 253 | { |
| 254 | 254 | if (A >= 0xe0000000) |
| 255 | 255 | { |
| 256 | sh2_internal_w(Machine, (A & 0x1fc)>>2, V << (((~A) & 2)*8), | |
| 256 | sh2_internal_w(Machine, (A & 0x1fc)>>2, V << (((~A) & 2)*8), | |
| 257 | 257 | return; |
| 258 | 258 | } |
| 259 | 259 | |
| r2454 | r2455 | |
| 273 | 273 | { |
| 274 | 274 | if (A >= 0xe0000000) |
| 275 | 275 | { |
| 276 | sh2_internal_w(Machine, (A & 0x1fc)>>2, V, 0); | |
| 276 | sh2_internal_w(Machine, (A & 0x1fc)>>2, V, 0xffffffff); | |
| 277 | 277 | return; |
| 278 | 278 | } |
| 279 | 279 | |
| r2454 | r2455 | |
| 2651 | 2651 | { |
| 2652 | 2652 | // Timers |
| 2653 | 2653 | case 0x04: // TIER, FTCSR, FRC |
| 2654 | if((mem_mask & 0x00ffffff) != 0 | |
| 2654 | if((mem_mask & 0x00ffffff) != 0 | |
| 2655 | 2655 | sh2_timer_resync(); |
| 2656 | 2656 | logerror("SH2.%d: TIER write %04x @ %04x\n", sh2.cpu_number, data >> 16, mem_mask>>16); |
| 2657 | 2657 | sh2.m[4] = (sh2.m[4] & ~(ICF|OCFA|OCFB|OVF)) | (old & sh2.m[4] & (ICF|OCFA|OCFB|OVF)); |
| 2658 | 2658 | COMBINE_DATA(&sh2.frc); |
| 2659 | if((mem_mask & 0x00ffffff) != 0 | |
| 2659 | if((mem_mask & 0x00ffffff) != 0 | |
| 2660 | 2660 | sh2_timer_activate(); |
| 2661 | 2661 | sh2_recalc_irq(); |
| 2662 | 2662 | break; |
| r2454 | r2455 | |
| 2664 | 2664 | logerror("SH2.%d: TCR write %08x @ %08x\n", sh2.cpu_number, data, mem_mask); |
| 2665 | 2665 | sh2_timer_resync(); |
| 2666 | 2666 | if(sh2.m[5] & 0x10) |
| 2667 | sh2.ocrb = (sh2.ocrb & (mem_mask >> 16)) | ((data & | |
| 2667 | sh2.ocrb = (sh2.ocrb & (~mem_mask >> 16)) | ((data & | |
| 2668 | 2668 | else |
| 2669 | sh2.ocra = (sh2.ocra & (mem_mask >> 16)) | ((data & | |
| 2669 | sh2.ocra = (sh2.ocra & (~mem_mask >> 16)) | ((data & | |
| 2670 | 2670 | sh2_timer_activate(); |
| 2671 | 2671 | break; |
| 2672 | 2672 | |
| r2454 | r2455 | |
| 2813 | 2813 | switch( offset ) |
| 2814 | 2814 | { |
| 2815 | 2815 | case 0x04: // TIER, FTCSR, FRC |
| 2816 | if ( mem_mask == 0x | |
| 2816 | if ( mem_mask == 0x | |
| 2817 | 2817 | if ( sh2.ftcsr_read_callback != NULL ) |
| 2818 | 2818 | sh2.ftcsr_read_callback( (sh2.m[4] & 0xffff0000) | sh2.frc ); |
| 2819 | 2819 | sh2_timer_resync(); |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | 7 | #include "debugger.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "cpuintrf.h" |
| 10 | 9 | #include "tms32051.h" |
| 11 | 10 |
| r2454 | r2455 | |
|---|---|---|
| 239 | 239 | INLINE UINT8 RB(offs_t A) |
| 240 | 240 | { |
| 241 | 241 | if (A >= 0xfe000000) |
| 242 | return sh4_internal_r(Machine, ((A & 0x0fc) >> 2) | ((A & 0x1fe0000) >> 11), | |
| 242 | return sh4_internal_r(Machine, ((A & 0x0fc) >> 2) | ((A & 0x1fe0000) >> 11), | |
| 243 | 243 | |
| 244 | 244 | if (A >= 0xe0000000) |
| 245 | 245 | return program_read_byte_64le(A); |
| r2454 | r2455 | |
| 253 | 253 | INLINE UINT16 RW(offs_t A) |
| 254 | 254 | { |
| 255 | 255 | if (A >= 0xfe000000) |
| 256 | return sh4_internal_r(Machine, ((A & 0x0fc) >> 2) | ((A & 0x1fe0000) >> 11), | |
| 256 | return sh4_internal_r(Machine, ((A & 0x0fc) >> 2) | ((A & 0x1fe0000) >> 11), | |
| 257 | 257 | |
| 258 | 258 | if (A >= 0xe0000000) |
| 259 | 259 | return program_read_word_64le(A); |
| r2454 | r2455 | |
| 267 | 267 | INLINE UINT32 RL(offs_t A) |
| 268 | 268 | { |
| 269 | 269 | if (A >= 0xfe000000) |
| 270 | return sh4_internal_r(Machine, ((A & 0x0fc) >> 2) | ((A & 0x1fe0000) >> 11), 0); | |
| 270 | return sh4_internal_r(Machine, ((A & 0x0fc) >> 2) | ((A & 0x1fe0000) >> 11), 0xffffffff); | |
| 271 | 271 | |
| 272 | 272 | if (A >= 0xe0000000) |
| 273 | 273 | return program_read_dword_64le(A); |
| r2454 | r2455 | |
| 283 | 283 | |
| 284 | 284 | if (A >= 0xfe000000) |
| 285 | 285 | { |
| 286 | sh4_internal_w(Machine, ((A & 0x0fc) >> 2) | ((A & 0x1fe0000) >> 11), V << ((A & 3)*8), | |
| 286 | sh4_internal_w(Machine, ((A & 0x0fc) >> 2) | ((A & 0x1fe0000) >> 11), V << ((A & 3)*8), | |
| 287 | 287 | return; |
| 288 | 288 | } |
| 289 | 289 | |
| r2454 | r2455 | |
| 303 | 303 | { |
| 304 | 304 | if (A >= 0xfe000000) |
| 305 | 305 | { |
| 306 | sh4_internal_w(Machine, ((A & 0x0fc) >> 2) | ((A & 0x1fe0000) >> 11), V << ((A & 2)*8), | |
| 306 | sh4_internal_w(Machine, ((A & 0x0fc) >> 2) | ((A & 0x1fe0000) >> 11), V << ((A & 2)*8), | |
| 307 | 307 | return; |
| 308 | 308 | } |
| 309 | 309 | |
| r2454 | r2455 | |
| 323 | 323 | { |
| 324 | 324 | if (A >= 0xfe000000) |
| 325 | 325 | { |
| 326 | sh4_internal_w(Machine, ((A & 0x0fc) >> 2) | ((A & 0x1fe0000) >> 11), V, 0); | |
| 326 | sh4_internal_w(Machine, ((A & 0x0fc) >> 2) | ((A & 0x1fe0000) >> 11), V, 0xffffffff); | |
| 327 | 327 | return; |
| 328 | 328 | } |
| 329 | 329 |
| r2454 | r2455 | |
|---|---|---|
| 14 | 14 | ***************************************************************************/ |
| 15 | 15 | |
| 16 | 16 | #include "debugger.h" |
| 17 | #include "deprecat.h" | |
| 18 | 17 | #include "mb88xx.h" |
| 19 | 18 | |
| 20 | 19 | /*************************************************************************** |
| r2454 | r2455 | |
|---|---|---|
| 201 | 201 | pdown = 0; |
| 202 | 202 | type = 0; |
| 203 | 203 | bit = 7; |
| 204 | while ( (chr=*p) && bit >= 0) { | |
| 205 | p++; | |
| 204 | while (*p && bit >= 0) { | |
| 205 | chr = *p++; | |
| 206 | 206 | switch (chr) { |
| 207 | 207 | case '1': bits |= 1<<bit; |
| 208 | 208 | case '0': mask |= 1<<bit; bit--; break; |
| 209 | /* | |
| 210 | case 'b': | |
| 211 | type |= 0x80; | |
| 212 | */ | |
| 209 | #if 0 | |
| 210 | case 'b': | |
| 211 | type |= 0x80; | |
| 212 | #endif | |
| 213 | 213 | case 'a': |
| 214 | 214 | pmask |= 1<<bit; |
| 215 | 215 | pdown = bit; |
| r2454 | r2455 | |
|---|---|---|
| 144 | 144 | ****************************************************************************/ |
| 145 | 145 | |
| 146 | 146 | #include "debugger.h" |
| 147 | #include "deprecat.h" | |
| 148 | 147 | #include "alph8201.h" |
| 149 | 148 | |
| 150 | 149 | /* instruction cycle count */ |
| r2454 | r2455 | |
|---|---|---|
| 325 | 325 | |
| 326 | 326 | #include "cpuintrf.h" |
| 327 | 327 | #include "debugger.h" |
| 328 | #include "deprecat.h" | |
| 329 | 328 | #include "apexc.h" |
| 330 | 329 | |
| 331 | 330 | typedef struct |
| r2454 | r2455 | |
|---|---|---|
| 10 | 10 | /* ======================================================================== */ |
| 11 | 11 | |
| 12 | 12 | #include "g65816.h" |
| 13 | #include "deprecat.h" | |
| 14 | 13 | #include <limits.h> |
| 15 | 14 | |
| 16 | 15 |
| r2454 | r2455 | |
|---|---|---|
| 104 | 104 | ****************************************************************************/ |
| 105 | 105 | |
| 106 | 106 | #include "debugger.h" |
| 107 | #include "deprecat.h" | |
| 108 | 107 | |
| 109 | 108 | typedef UINT8 BOOLEAN; |
| 110 | 109 | typedef UINT8 BYTE; |
| r2454 | r2455 | |
|---|---|---|
| 1785 | 1785 | /* Different chip types handle differently, for speed, simply call the chip's handler */ |
| 1786 | 1786 | static READ8_HANDLER(internal_ram_iread) |
| 1787 | 1787 | { |
| 1788 | return i8051.iram_iread( | |
| 1788 | return i8051.iram_iread(machine,offset); | |
| 1789 | 1789 | } |
| 1790 | 1790 | |
| 1791 | 1791 | /* Writes the contents of the Internal RAM memory (BUT CALLED FROM AN INDIRECT ADDRESSING MODE) */ |
| 1792 | 1792 | /* Different chip types handle differently, for speed, simply call the chip's handler */ |
| 1793 | 1793 | static WRITE8_HANDLER(internal_ram_iwrite) |
| 1794 | 1794 | { |
| 1795 | i8051.iram_iwrite( | |
| 1795 | i8051.iram_iwrite(machine,offset,data); | |
| 1796 | 1796 | } |
| 1797 | 1797 | |
| 1798 | 1798 | /*Generate an external ram address for read/writing using indirect addressing mode */ |
| r2454 | r2455 | |
| 1804 | 1804 | static READ32_HANDLER(external_ram_iaddr) |
| 1805 | 1805 | { |
| 1806 | 1806 | if(i8051.eram_iaddr_callback) |
| 1807 | return i8051.eram_iaddr_callback( | |
| 1807 | return i8051.eram_iaddr_callback(machine,offset,mem_mask); | |
| 1808 | 1808 | else |
| 1809 | 1809 | LOG(("i8051 #%d: external ram address requested (8 bit offset=%02x), but no callback available! at PC:%04x\n", cpu_getactivecpu(), offset, PC)); |
| 1810 | 1810 |
| r2454 | r2455 | |
|---|---|---|
| 1538 | 1538 | else |
| 1539 | 1539 | { |
| 1540 | 1540 | emit_mov_r32_r32(DRCTOP, REG_P4, REG_P3); // mov p4,p3 |
| 1541 | emit_not_r32(DRCTOP, REG_P3); // not p3 | |
| 1542 | emit_and_r32_r32(DRCTOP, REG_P4, REG_P2); // and p4,p2 | |
| 1541 | 1543 | if (raxrel) |
| 1542 | 1544 | emit_and_r32_m32(DRCTOP, REG_P3, MBISD(REG_RAX, REG_P1, 1, 0)); // and p3,[p1 + rax] |
| 1543 | 1545 | else |
| 1544 | 1546 | emit_and_r32_m32(DRCTOP, REG_P3, MDRCISD(adjbase, REG_P1, 1, 0)); // and p3,[p1 + adjbase] |
| 1545 | emit_not_r32(DRCTOP, REG_P4); // not p4 | |
| 1546 | emit_and_r32_r32(DRCTOP, REG_P4, REG_P2); // and p4,p2 | |
| 1547 | 1547 | emit_or_r32_r32(DRCTOP, REG_P4, REG_P3); // or p4,p3 |
| 1548 | 1548 | if (raxrel) |
| 1549 | 1549 | emit_mov_m32_r32(DRCTOP, MBISD(REG_RAX, REG_P1, 1, 0), REG_P4); // mov [p1 + rax],p4 |
| r2454 | r2455 | |
| 1574 | 1574 | if (mips3.core->bigendian) |
| 1575 | 1575 | emit_ror_r64_imm(DRCTOP, REG_P3, 32); // ror p3,32 |
| 1576 | 1576 | emit_mov_r64_r64(DRCTOP, REG_P4, REG_P3); // mov p4,p3 |
| 1577 | emit_not_r64(DRCTOP, REG_P3); // not p3 | |
| 1578 | emit_and_r64_r64(DRCTOP, REG_P4, REG_P2); // and p4,p2 | |
| 1577 | 1579 | if (raxrel) |
| 1578 | 1580 | emit_and_r64_m64(DRCTOP, REG_P3, MBISD(REG_RAX, REG_P1, 1, 0)); // and p3,[p1 + rax] |
| 1579 | 1581 | else |
| 1580 | 1582 | emit_and_r64_m64(DRCTOP, REG_P3, MDRCISD(adjbase, REG_P1, 1, 0)); // and p3,[p1 + adjbase] |
| 1581 | emit_not_r64(DRCTOP, REG_P4); // not p4 | |
| 1582 | emit_and_r64_r64(DRCTOP, REG_P4, REG_P2); // and p4,p2 | |
| 1583 | 1583 | emit_or_r64_r64(DRCTOP, REG_P4, REG_P3); // or p4,p3 |
| 1584 | 1584 | if (raxrel) |
| 1585 | 1585 | emit_mov_m64_r64(DRCTOP, MBISD(REG_RAX, REG_P1, 1, 0), REG_P4); // mov [p1 + rax],p4 |
| r2454 | r2455 | |
| 2130 | 2130 | if (fastram == NULL) |
| 2131 | 2131 | { |
| 2132 | 2132 | emit_mov_r32_imm(DRCTOP, REG_P1, address & ~3); // mov p1,address & ~3 |
| 2133 | if (mask != 0) | |
| 2133 | if (mask != 0xffffffff) | |
| 2134 | 2134 | { |
| 2135 | 2135 | emit_mov_r32_imm(DRCTOP, REG_P2, (INT32)mask); // mov p2,mask |
| 2136 | 2136 | emit_call(DRCTOP, mips3.drcdata->general.read_word_masked); // call read_word_masked |
| r2454 | r2455 | |
| 2187 | 2187 | if (fastram == NULL) |
| 2188 | 2188 | { |
| 2189 | 2189 | emit_mov_r32_imm(DRCTOP, REG_P1, address & ~7); // mov p1,address & ~7 |
| 2190 | if (mask != 0) | |
| 2190 | if (mask != U64(0xffffffffffffffff)) | |
| 2191 | 2191 | { |
| 2192 | 2192 | emit_mov_r64_imm(DRCTOP, REG_P2, mask); // mov p2,mask |
| 2193 | 2193 | emit_call(DRCTOP, mips3.drcdata->general.read_double_masked); // call read_double_masked |
| r2454 | r2455 | |
| 2351 | 2351 | emit_mov_r64_imm(DRCTOP, REG_P2, CONSTVAL(srcreg)); // mov p2,constval |
| 2352 | 2352 | else if (X86REG(srcreg) != REG_P2) |
| 2353 | 2353 | emit_mov_r64_r64(DRCTOP, REG_P2, X86REG(srcreg)); // mov p2,srcreg |
| 2354 | if (mask == 0) | |
| 2354 | if (mask == 0xffffffff) | |
| 2355 | 2355 | emit_call(DRCTOP, mips3.drcdata->general.write_word); // call write_word |
| 2356 | 2356 | else |
| 2357 | 2357 | { |
| r2454 | r2455 | |
| 2370 | 2370 | int raxrel = ((INT32)fastdisp != fastdisp); |
| 2371 | 2371 | |
| 2372 | 2372 | /* non-masked case */ |
| 2373 | if (mask == 0) | |
| 2373 | if (mask == 0xffffffff) | |
| 2374 | 2374 | { |
| 2375 | 2375 | /* if we can't fit the delta to fastram within an INT32, load RAX with the full address here */ |
| 2376 | 2376 | if (raxrel) |
| r2454 | r2455 | |
| 2404 | 2404 | if (ISCONST(srcreg)) |
| 2405 | 2405 | { |
| 2406 | 2406 | emit_mov_r32_m32(DRCTOP, REG_P2, MBD(REG_RAX, 0)); // mov p2,[rax] |
| 2407 | emit_and_r32_imm(DRCTOP, REG_P2, mask); // and p2,mask | |
| 2408 | emit_or_r32_imm(DRCTOP, REG_P2, CONSTVAL(srcreg) & ~mask); // or p2,constval & ~mask | |
| 2407 | emit_and_r32_imm(DRCTOP, REG_P2, ~mask); // and p2,~mask | |
| 2408 | emit_or_r32_imm(DRCTOP, REG_P2, CONSTVAL(srcreg) & mask); // or p2,constval & mask | |
| 2409 | 2409 | emit_mov_m32_r32(DRCTOP, MBD(REG_RAX, 0), REG_P2); // mov [rax],p2 |
| 2410 | 2410 | } |
| 2411 | 2411 | else |
| r2454 | r2455 | |
| 2413 | 2413 | emit_mov_r32_m32(DRCTOP, REG_P3, MBD(REG_RAX, 0)); // mov p3,[rax] |
| 2414 | 2414 | if (X86REG(srcreg) != REG_P2) |
| 2415 | 2415 | emit_mov_r32_r32(DRCTOP, REG_P2, X86REG(srcreg)); // mov p2,srcreg |
| 2416 | emit_and_r32_imm(DRCTOP, REG_P3, mask); // and p3,mask | |
| 2417 | emit_and_r32_imm(DRCTOP, REG_P2, ~mask); // and p2,~mask | |
| 2416 | emit_and_r32_imm(DRCTOP, REG_P3, ~mask); // and p3,~mask | |
| 2417 | emit_and_r32_imm(DRCTOP, REG_P2, mask); // and p2,mask | |
| 2418 | 2418 | emit_or_r32_r32(DRCTOP, REG_P3, REG_P2); // or p3,p2 |
| 2419 | 2419 | emit_mov_m32_r32(DRCTOP, MBD(REG_RAX, 0), REG_P3); // mov [rax],p3 |
| 2420 | 2420 | } |
| r2454 | r2455 | |
| 2444 | 2444 | emit_mov_r64_imm(DRCTOP, REG_P2, CONSTVAL(srcreg)); // mov p2,constval |
| 2445 | 2445 | else if (X86REG(srcreg) != REG_P2) |
| 2446 | 2446 | emit_mov_r64_r64(DRCTOP, REG_P2, X86REG(srcreg)); // mov p2,srcreg |
| 2447 | if (mask == 0) | |
| 2447 | if (mask == U64(0xffffffffffffffff)) | |
| 2448 | 2448 | emit_call(DRCTOP, mips3.drcdata->general.write_double); // call write_double |
| 2449 | 2449 | else |
| 2450 | 2450 | { |
| r2454 | r2455 | |
| 2478 | 2478 | } |
| 2479 | 2479 | |
| 2480 | 2480 | /* non-masked case */ |
| 2481 | if (mask == 0) | |
| 2481 | if (mask == U64(0xffffffffffffffff)) | |
| 2482 | 2482 | { |
| 2483 | 2483 | /* if we can't fit the delta to fastram within an INT32, load RAX with the full address here */ |
| 2484 | 2484 | if (raxrel) |
| r2454 | r2455 | |
| 2507 | 2507 | emit_mov_r64_imm(DRCTOP, REG_RAX, (UINT64)fastram); // mov rax,fastram |
| 2508 | 2508 | else |
| 2509 | 2509 | emit_lea_r64_m64(DRCTOP, REG_RAX, MDRC(fastram)); // lea rax,[fastram] |
| 2510 | emit_mov_r64_imm(DRCTOP, REG_P4, mask); | |
| 2510 | emit_mov_r64_imm(DRCTOP, REG_P4, ~mask); | |
| 2511 | 2511 | |
| 2512 | 2512 | /* always write rax-relative */ |
| 2513 | 2513 | if (ISCONST(srcreg)) |
| 2514 | 2514 | { |
| 2515 | 2515 | emit_and_r64_m64(DRCTOP, REG_P4, MBD(REG_RAX, 0)); // and p4,[rax] |
| 2516 | emit_mov_r64_imm(DRCTOP, REG_P3, constval & | |
| 2516 | emit_mov_r64_imm(DRCTOP, REG_P3, constval & | |
| 2517 | 2517 | emit_or_r64_r64(DRCTOP, REG_P4, REG_P3); // or p4,p3 |
| 2518 | 2518 | emit_mov_m64_r64(DRCTOP, MBD(REG_RAX, 0), REG_P4); // mov [rax],p4 |
| 2519 | 2519 | } |
| r2454 | r2455 | |
| 5013 | 5013 | else if (size == 2) |
| 5014 | 5014 | was_fixed = emit_fixed_half_read(drc, compiler, desc, destreg, is_unsigned, CONSTVAL(rs) + SIMMVAL); |
| 5015 | 5015 | else if (size == 4) |
| 5016 | was_fixed = emit_fixed_word_read(drc, compiler, desc, destreg, is_unsigned, CONSTVAL(rs) + SIMMVAL, 0); | |
| 5016 | was_fixed = emit_fixed_word_read(drc, compiler, desc, destreg, is_unsigned, CONSTVAL(rs) + SIMMVAL, 0xffffffff); | |
| 5017 | 5017 | else |
| 5018 | was_fixed = emit_fixed_double_read(drc, compiler, desc, destreg, CONSTVAL(rs) + SIMMVAL, 0); | |
| 5018 | was_fixed = emit_fixed_double_read(drc, compiler, desc, destreg, CONSTVAL(rs) + SIMMVAL, U64(0xffffffffffffffff)); | |
| 5019 | 5019 | } |
| 5020 | 5020 | |
| 5021 | 5021 | /* otherwise, we just need to call the appropriate subroutine */ |
| r2454 | r2455 | |
| 5078 | 5078 | { |
| 5079 | 5079 | /* perform a fixed read if we can */ |
| 5080 | 5080 | if (size == 4) |
| 5081 | was_fixed = emit_fixed_word_read(drc, compiler, desc, REG_RAX, FALSE, CONSTVAL(rs) + SIMMVAL, 0); | |
| 5081 | was_fixed = emit_fixed_word_read(drc, compiler, desc, REG_RAX, FALSE, CONSTVAL(rs) + SIMMVAL, 0xffffffff); | |
| 5082 | 5082 | else |
| 5083 | was_fixed = emit_fixed_double_read(drc, compiler, desc, REG_RAX, CONSTVAL(rs) + SIMMVAL, 0); | |
| 5083 | was_fixed = emit_fixed_double_read(drc, compiler, desc, REG_RAX, CONSTVAL(rs) + SIMMVAL, U64(0xffffffffffffffff)); | |
| 5084 | 5084 | } |
| 5085 | 5085 | |
| 5086 | 5086 | /* otherwise, we just need to call the appropriate subroutine */ |
| r2454 | r2455 | |
| 5133 | 5133 | { |
| 5134 | 5134 | /* perform a fixed read if we can */ |
| 5135 | 5135 | if (size == 4) |
| 5136 | was_fixed = emit_fixed_word_read(drc, compiler, desc, REG_RAX, FALSE, CONSTVAL(rs) + CONSTVAL(rt), 0); | |
| 5136 | was_fixed = emit_fixed_word_read(drc, compiler, desc, REG_RAX, FALSE, CONSTVAL(rs) + CONSTVAL(rt), 0xffffffff); | |
| 5137 | 5137 | else |
| 5138 | was_fixed = emit_fixed_double_read(drc, compiler, desc, REG_RAX, CONSTVAL(rs) + CONSTVAL(rt), 0); | |
| 5138 | was_fixed = emit_fixed_double_read(drc, compiler, desc, REG_RAX, CONSTVAL(rs) + CONSTVAL(rt), U64(0xffffffffffffffff)); | |
| 5139 | 5139 | } |
| 5140 | 5140 | |
| 5141 | 5141 | /* otherwise, we just need to call the appropriate subroutine */ |
| r2454 | r2455 | |
| 5198 | 5198 | shift ^= 0x18; |
| 5199 | 5199 | |
| 5200 | 5200 | /* read the double value into rax, handling exceptions */ |
| 5201 | was_fixed = emit_fixed_word_read(drc, compiler, desc, REG_RAX, FALSE, addr, is_right ? ( | |
| 5201 | was_fixed = emit_fixed_word_read(drc, compiler, desc, REG_RAX, FALSE, addr, is_right ? ( | |
| 5202 | 5202 | |
| 5203 | 5203 | /* handle writing back the register */ |
| 5204 | 5204 | if (RTREG != 0) |
| r2454 | r2455 | |
| 5236 | 5236 | else |
| 5237 | 5237 | emit_shl_r32_cl(DRCTOP, REG_P2); // shl p2,cl |
| 5238 | 5238 | emit_mov_m8_r8(DRCTOP, MBD(REG_RSP, SPOFFS_SAVECL), REG_CL); // mov [sp+savecl],cl |
| 5239 | emit_not_r32(DRCTOP, REG_P2); // not p2 | |
| 5240 | 5239 | emit_mov_r32_r32(DRCTOP, REG_P1, REG_EAX); // mov p1,eax |
| 5241 | 5240 | emit_call(DRCTOP, mips3.drcdata->general.read_word_masked); // call general.read_word_masked |
| 5242 | 5241 | oob_request_callback(drc, COND_NO_JUMP, oob_exception_cleanup, compiler, desc, mips3.drcdata->generate_tlbload_exception); |
| r2454 | r2455 | |
| 5300 | 5299 | shift ^= 0x38; |
| 5301 | 5300 | |
| 5302 | 5301 | /* read the double value into rax, handling exceptions */ |
| 5303 | was_fixed = emit_fixed_double_read(drc, compiler, desc, REG_RAX, addr, is_right ? ( | |
| 5302 | was_fixed = emit_fixed_double_read(drc, compiler, desc, REG_RAX, addr, is_right ? ( | |
| 5304 | 5303 | |
| 5305 | 5304 | /* handle writing back the register */ |
| 5306 | 5305 | if (RTREG != 0) |
| r2454 | r2455 | |
| 5343 | 5342 | else |
| 5344 | 5343 | emit_shl_r64_cl(DRCTOP, REG_P2); // shl p2,cl |
| 5345 | 5344 | emit_mov_m8_r8(DRCTOP, MBD(REG_RSP, SPOFFS_SAVECL), REG_CL); // mov [sp+savecl],cl |
| 5346 | emit_not_r64(DRCTOP, REG_P2); // not p2 | |
| 5347 | 5345 | emit_mov_r32_r32(DRCTOP, REG_P1, REG_EAX); // mov p1,eax |
| 5348 | 5346 | emit_call(DRCTOP, mips3.drcdata->general.read_double_masked); // call general.read_double_masked |
| 5349 | 5347 | oob_request_callback(drc, COND_NO_JUMP, oob_exception_cleanup, compiler, desc, mips3.drcdata->generate_tlbload_exception); |
| r2454 | r2455 | |
| 5406 | 5404 | else if (size == 2) |
| 5407 | 5405 | was_fixed = emit_fixed_half_write(drc, compiler, desc, rt, CONSTVAL(rs) + SIMMVAL); |
| 5408 | 5406 | else if (size == 4) |
| 5409 | was_fixed = emit_fixed_word_write(drc, compiler, desc, rt, CONSTVAL(rs) + SIMMVAL, 0); | |
| 5407 | was_fixed = emit_fixed_word_write(drc, compiler, desc, rt, CONSTVAL(rs) + SIMMVAL, 0xffffffff); | |
| 5410 | 5408 | else |
| 5411 | was_fixed = emit_fixed_double_write(drc, compiler, desc, rt, CONSTVAL(rs) + SIMMVAL, 0); | |
| 5409 | was_fixed = emit_fixed_double_write(drc, compiler, desc, rt, CONSTVAL(rs) + SIMMVAL, U64(0xffffffffffffffff)); | |
| 5412 | 5410 | } |
| 5413 | 5411 | |
| 5414 | 5412 | /* otherwise, we just need to call the appropriate subroutine */ |
| r2454 | r2455 | |
| 5467 | 5465 | { |
| 5468 | 5466 | /* perform a fixed write if we can */ |
| 5469 | 5467 | if (size == 4) |
| 5470 | was_fixed = emit_fixed_word_write(drc, compiler, desc, REG_P2, CONSTVAL(rs) + SIMMVAL, 0); | |
| 5468 | was_fixed = emit_fixed_word_write(drc, compiler, desc, REG_P2, CONSTVAL(rs) + SIMMVAL, 0xffffffff); | |
| 5471 | 5469 | else |
| 5472 | was_fixed = emit_fixed_double_write(drc, compiler, desc, REG_P2, CONSTVAL(rs) + SIMMVAL, 0); | |
| 5470 | was_fixed = emit_fixed_double_write(drc, compiler, desc, REG_P2, CONSTVAL(rs) + SIMMVAL, U64(0xffffffffffffffff)); | |
| 5473 | 5471 | } |
| 5474 | 5472 | |
| 5475 | 5473 | /* otherwise, we just need to call the appropriate subroutine */ |
| r2454 | r2455 | |
| 5522 | 5520 | { |
| 5523 | 5521 | /* perform a fixed write if we can */ |
| 5524 | 5522 | if (size == 4) |
| 5525 | was_fixed = emit_fixed_word_write(drc, compiler, desc, REG_P2, CONSTVAL(rs) + CONSTVAL(rt), 0); | |
| 5523 | was_fixed = emit_fixed_word_write(drc, compiler, desc, REG_P2, CONSTVAL(rs) + CONSTVAL(rt), 0xffffffff); | |
| 5526 | 5524 | else |
| 5527 | was_fixed = emit_fixed_double_write(drc, compiler, desc, REG_P2, CONSTVAL(rs) + CONSTVAL(rt), 0); | |
| 5525 | was_fixed = emit_fixed_double_write(drc, compiler, desc, REG_P2, CONSTVAL(rs) + CONSTVAL(rt), U64(0xffffffffffffffff)); | |
| 5528 | 5526 | } |
| 5529 | 5527 | |
| 5530 | 5528 | /* otherwise, we just need to call the appropriate subroutine */ |
| r2454 | r2455 | |
| 5594 | 5592 | { |
| 5595 | 5593 | if (ISCONST(rt)) |
| 5596 | 5594 | rt = MAKE_CONST((UINT32)CONSTVAL(rt) >> shift); |
| 5597 | mask = | |
| 5595 | mask = | |
| 5598 | 5596 | } |
| 5599 | 5597 | else |
| 5600 | 5598 | { |
| 5601 | 5599 | if (ISCONST(rt)) |
| 5602 | 5600 | rt = MAKE_CONST((UINT32)CONSTVAL(rt) << shift); |
| 5603 | mask = | |
| 5601 | mask = | |
| 5604 | 5602 | } |
| 5605 | 5603 | |
| 5606 | 5604 | /* perform a fixed write */ |
| r2454 | r2455 | |
| 5629 | 5627 | emit_shl_r32_cl(DRCTOP, REG_P2); // shl p2,cl |
| 5630 | 5628 | } |
| 5631 | 5629 | emit_mov_r32_r32(DRCTOP, REG_P1, REG_EAX); // mov p1,eax |
| 5632 | emit_not_r32(DRCTOP, REG_P3); // not p3 | |
| 5633 | 5630 | |
| 5634 | 5631 | /* perform the write */ |
| 5635 | 5632 | emit_call(DRCTOP, mips3.drcdata->general.write_word_masked); // call general.write_word_masked |
| r2454 | r2455 | |
| 5685 | 5682 | { |
| 5686 | 5683 | if (ISCONST(rt)) |
| 5687 | 5684 | rt = MAKE_CONST((UINT64)CONSTVAL(rt) >> shift); |
| 5688 | mask = | |
| 5685 | mask = | |
| 5689 | 5686 | } |
| 5690 | 5687 | else |
| 5691 | 5688 | { |
| 5692 | 5689 | if (ISCONST(rt)) |
| 5693 | 5690 | rt = MAKE_CONST((UINT64)CONSTVAL(rt) << shift); |
| 5694 | mask = | |
| 5691 | mask = | |
| 5695 | 5692 | } |
| 5696 | 5693 | |
| 5697 | 5694 | /* perform a fixed write */ |
| r2454 | r2455 | |
| 5720 | 5717 | emit_shl_r64_cl(DRCTOP, REG_P2); // shl p2,cl |
| 5721 | 5718 | } |
| 5722 | 5719 | emit_mov_r32_r32(DRCTOP, REG_P1, REG_EAX); // mov p1,eax |
| 5723 | emit_not_r64(DRCTOP, REG_P3); // not p3 | |
| 5724 | 5720 | |
| 5725 | 5721 | /* perform the write */ |
| 5726 | 5722 | emit_call(DRCTOP, mips3.drcdata->general.write_double_masked); // call general.write_double_masked |
| r2454 | r2455 | |
|---|---|---|
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "debugger.h" |
| 10 | #include "deprecat.h" | |
| 11 | 10 | #include "r3000.h" |
| 12 | 11 | |
| 13 | 12 |
| r2454 | r2455 | |
|---|---|---|
| 2405 | 2405 | switch( load_type ) |
| 2406 | 2406 | { |
| 2407 | 2407 | case 0: |
| 2408 | data = ( data & 0x00ffffff ) | ( mipscpu.readword_masked( address, 0x | |
| 2408 | data = ( data & 0x00ffffff ) | ( mipscpu.readword_masked( address, 0x | |
| 2409 | 2409 | break; |
| 2410 | 2410 | |
| 2411 | 2411 | case 1: |
| 2412 | data = ( data & 0x0000ffff ) | ( mipscpu.readword_masked( address, 0x | |
| 2412 | data = ( data & 0x0000ffff ) | ( mipscpu.readword_masked( address, 0x | |
| 2413 | 2413 | break; |
| 2414 | 2414 | |
| 2415 | 2415 | case 2: |
| 2416 | data = ( data & 0x000000ff ) | ( mipscpu.readword_masked( address, 0xffffff | |
| 2416 | data = ( data & 0x000000ff ) | ( mipscpu.readword_masked( address, 0x00ffffff | |
| 2417 | 2417 | break; |
| 2418 | 2418 | |
| 2419 | 2419 | case 3: |
| r2454 | r2455 | |
| 2548 | 2548 | break; |
| 2549 | 2549 | |
| 2550 | 2550 | case 2: |
| 2551 | data = ( data & 0xffff0000 ) | ( mipscpu.readword_masked( address, 0x | |
| 2551 | data = ( data & 0xffff0000 ) | ( mipscpu.readword_masked( address, 0x | |
| 2552 | 2552 | break; |
| 2553 | 2553 | |
| 2554 | 2554 | case 3: |
| 2555 | data = ( data & 0xffffff00 ) | ( mipscpu.readword_masked( address, 0x000000 | |
| 2555 | data = ( data & 0xffffff00 ) | ( mipscpu.readword_masked( address, 0xff000000 | |
| 2556 | 2556 | break; |
| 2557 | 2557 | } |
| 2558 | 2558 | |
| r2454 | r2455 | |
| 2580 | 2580 | else |
| 2581 | 2581 | { |
| 2582 | 2582 | int shift = 8 * ( address & 3 ); |
| 2583 | mipscpu.writeword_masked( address, mipscpu.r[ INS_RT( mipscpu.op ) ] << shift, | |
| 2583 | mipscpu.writeword_masked( address, mipscpu.r[ INS_RT( mipscpu.op ) ] << shift, | |
| 2584 | 2584 | |
| 2585 | 2585 | if( breakpoint ) |
| 2586 | 2586 | { |
| r2454 | r2455 | |
| 2610 | 2610 | else |
| 2611 | 2611 | { |
| 2612 | 2612 | int shift = 8 * ( address & 2 ); |
| 2613 | mipscpu.writeword_masked( address, mipscpu.r[ INS_RT( mipscpu.op ) ] << shift, | |
| 2613 | mipscpu.writeword_masked( address, mipscpu.r[ INS_RT( mipscpu.op ) ] << shift, | |
| 2614 | 2614 | |
| 2615 | 2615 | if( breakpoint ) |
| 2616 | 2616 | { |
| r2454 | r2455 | |
| 2646 | 2646 | switch( save_type ) |
| 2647 | 2647 | { |
| 2648 | 2648 | case 0: |
| 2649 | mipscpu.writeword_masked( address, mipscpu.r[ INS_RT( mipscpu.op ) ] >> 24, 0x | |
| 2649 | mipscpu.writeword_masked( address, mipscpu.r[ INS_RT( mipscpu.op ) ] >> 24, 0x | |
| 2650 | 2650 | break; |
| 2651 | 2651 | |
| 2652 | 2652 | case 1: |
| 2653 | mipscpu.writeword_masked( address, mipscpu.r[ INS_RT( mipscpu.op ) ] >> 16, 0x | |
| 2653 | mipscpu.writeword_masked( address, mipscpu.r[ INS_RT( mipscpu.op ) ] >> 16, 0x | |
| 2654 | 2654 | break; |
| 2655 | 2655 | |
| 2656 | 2656 | case 2: |
| 2657 | mipscpu.writeword_masked( address, mipscpu.r[ INS_RT( mipscpu.op ) ] >> 8, 0x | |
| 2657 | mipscpu.writeword_masked( address, mipscpu.r[ INS_RT( mipscpu.op ) ] >> 8, 0x | |
| 2658 | 2658 | break; |
| 2659 | 2659 | |
| 2660 | 2660 | case 3: |
| r2454 | r2455 | |
| 2725 | 2725 | break; |
| 2726 | 2726 | |
| 2727 | 2727 | case 1: |
| 2728 | mipscpu.writeword_masked( address, mipscpu.r[ INS_RT( mipscpu.op ) ] << 8, 0x | |
| 2728 | mipscpu.writeword_masked( address, mipscpu.r[ INS_RT( mipscpu.op ) ] << 8, 0x | |
| 2729 | 2729 | break; |
| 2730 | 2730 | |
| 2731 | 2731 | case 2: |
| 2732 | mipscpu.writeword_masked( address, mipscpu.r[ INS_RT( mipscpu.op ) ] << 16, 0x | |
| 2732 | mipscpu.writeword_masked( address, mipscpu.r[ INS_RT( mipscpu.op ) ] << 16, 0x | |
| 2733 | 2733 | break; |
| 2734 | 2734 | |
| 2735 | 2735 | case 3: |
| 2736 | mipscpu.writeword_masked( address, mipscpu.r[ INS_RT( mipscpu.op ) ] << 24, 0x | |
| 2736 | mipscpu.writeword_masked( address, mipscpu.r[ INS_RT( mipscpu.op ) ] << 24, 0x | |
| 2737 | 2737 | break; |
| 2738 | 2738 | } |
| 2739 | 2739 |
| r2454 | r2455 | |
|---|---|---|
| 725 | 725 | { |
| 726 | 726 | emit_mov_r32_m32(DRCTOP, REG_ECX, MBD(REG_ESP, 12)); // mov ecx,[esp+12] |
| 727 | 727 | emit_mov_r32_r32(DRCTOP, REG_EAX, REG_ECX); // mov eax,ecx |
| 728 | emit_and_r32_m32(DRCTOP, REG_ECX, MBD(REG_EBX, fastbase)); // and ecx,[ebx+fastbase] | |
| 729 | emit_not_r32(DRCTOP, REG_EAX); // not eax | |
| 728 | emit_not_r32(DRCTOP, REG_ECX); // not ecx | |
| 730 | 729 | emit_and_r32_m32(DRCTOP, REG_EAX, MBD(REG_ESP, 8)); // and eax,[esp+8] |
| 730 | emit_and_r32_m32(DRCTOP, REG_ECX, MBD(REG_EBX, fastbase)); // and ecx,[ebx+fastbase] | |
| 731 | 731 | emit_or_r32_r32(DRCTOP, REG_EAX, REG_ECX); // or eax,ecx |
| 732 | 732 | emit_mov_m32_r32(DRCTOP, MBD(REG_EBX, fastbase), REG_EAX); // mov [ebx+fastbase],eax |
| 733 | 733 | } |
| r2454 | r2455 | |
| 757 | 757 | { |
| 758 | 758 | emit_mov_r32_m32(DRCTOP, REG_ECX, MBD(REG_ESP, 16)); // mov ecx,[esp+16] |
| 759 | 759 | emit_mov_r32_r32(DRCTOP, REG_EAX, REG_ECX); // mov eax,ecx |
| 760 | emit_and_r32_m32(DRCTOP, REG_ECX, MBD(REG_EBX, fastbase+4)); // and ecx,[ebx+fastbase+4] | |
| 761 | emit_not_r32(DRCTOP, REG_EAX); // not eax | |
| 760 | emit_not_r32(DRCTOP, REG_ECX); // not ecx | |
| 762 | 761 | emit_and_r32_m32(DRCTOP, REG_EAX, MBD(REG_ESP, 8)); // and eax,[esp+8] |
| 762 | emit_and_r32_m32(DRCTOP, REG_ECX, MBD(REG_EBX, fastbase+4)); // and ecx,[ebx+fastbase+4] | |
| 763 | 763 | emit_or_r32_r32(DRCTOP, REG_EAX, REG_ECX); // or eax,ecx |
| 764 | 764 | emit_mov_m32_r32(DRCTOP, MBD(REG_EBX, fastbase+4), REG_EAX); // mov [ebx+fastbase+4],eax |
| 765 | 765 | emit_mov_r32_m32(DRCTOP, REG_ECX, MBD(REG_ESP, 20)); // mov ecx,[esp+20] |
| 766 | 766 | emit_mov_r32_r32(DRCTOP, REG_EAX, REG_ECX); // mov eax,ecx |
| 767 | emit_and_r32_m32(DRCTOP, REG_ECX, MBD(REG_EBX, fastbase)); // and ecx,[ebx+fastbase] | |
| 768 | emit_not_r32(DRCTOP, REG_EAX); // not eax | |
| 767 | emit_not_r32(DRCTOP, REG_ECX); // not ecx | |
| 769 | 768 | emit_and_r32_m32(DRCTOP, REG_EAX, MBD(REG_ESP, 12)); // and eax,[esp+12] |
| 769 | emit_and_r32_m32(DRCTOP, REG_ECX, MBD(REG_EBX, fastbase)); // and ecx,[ebx+fastbase] | |
| 770 | 770 | emit_or_r32_r32(DRCTOP, REG_EAX, REG_ECX); // or eax,ecx |
| 771 | 771 | emit_mov_m32_r32(DRCTOP, MBD(REG_EBX, fastbase), REG_EAX); // mov [ebx+fastbase],eax |
| 772 | 772 | } |
| r2454 | r2455 | |
| 774 | 774 | { |
| 775 | 775 | emit_mov_r32_m32(DRCTOP, REG_ECX, MBD(REG_ESP, 16)); // mov ecx,[esp+16] |
| 776 | 776 | emit_mov_r32_r32(DRCTOP, REG_EAX, REG_ECX); // mov eax,ecx |
| 777 | emit_and_r32_m32(DRCTOP, REG_ECX, MBD(REG_EBX, fastbase)); // and ecx,[ebx+fastbase] | |
| 778 | emit_not_r32(DRCTOP, REG_EAX); // not eax | |
| 777 | emit_not_r32(DRCTOP, REG_ECX); // not ecx | |
| 779 | 778 | emit_and_r32_m32(DRCTOP, REG_EAX, MBD(REG_ESP, 8)); // and eax,[esp+8] |
| 779 | emit_and_r32_m32(DRCTOP, REG_ECX, MBD(REG_EBX, fastbase)); // and ecx,[ebx+fastbase] | |
| 780 | 780 | emit_or_r32_r32(DRCTOP, REG_EAX, REG_ECX); // or eax,ecx |
| 781 | 781 | emit_mov_m32_r32(DRCTOP, MBD(REG_EBX, fastbase), REG_EAX); // mov [ebx+fastbase],eax |
| 782 | 782 | emit_mov_r32_m32(DRCTOP, REG_ECX, MBD(REG_ESP, 20)); // mov ecx,[esp+20] |
| 783 | 783 | emit_mov_r32_r32(DRCTOP, REG_EAX, REG_ECX); // mov eax,ecx |
| 784 | emit_and_r32_m32(DRCTOP, REG_ECX, MBD(REG_EBX, fastbase+4)); // and ecx,[ebx+fastbase+4] | |
| 785 | emit_not_r32(DRCTOP, REG_EAX); // not eax | |
| 784 | emit_not_r32(DRCTOP, REG_ECX); // not ecx | |
| 786 | 785 | emit_and_r32_m32(DRCTOP, REG_EAX, MBD(REG_ESP, 12)); // and eax,[esp+12] |
| 786 | emit_and_r32_m32(DRCTOP, REG_ECX, MBD(REG_EBX, fastbase+4)); // and ecx,[ebx+fastbase+4] | |
| 787 | 787 | emit_or_r32_r32(DRCTOP, REG_EAX, REG_ECX); // or eax,ecx |
| 788 | 788 | emit_mov_m32_r32(DRCTOP, MBD(REG_EBX, fastbase+4), REG_EAX); // mov [ebx+fastbase+4],eax |
| 789 | 789 | } |
| r2454 | r2455 | |
| 1474 | 1474 | emit_shr_r32_cl(DRCTOP, REG_EBP); // shr ebp,cl |
| 1475 | 1475 | emit_shrd_r32_r32_cl(DRCTOP, REG_EBX, REG_EBP); // shrd ebx,ebp,cl |
| 1476 | 1476 | emit_shr_r32_cl(DRCTOP, REG_EBP); // shr ebp,cl |
| 1477 | emit_not_r32(DRCTOP, REG_EBX); // not ebx | |
| 1478 | emit_not_r32(DRCTOP, REG_EBP); // not ebp | |
| 1479 | 1477 | emit_push_r32(DRCTOP, REG_ECX); // push ecx |
| 1480 | 1478 | emit_push_r32(DRCTOP, REG_EBP); // push ebp |
| 1481 | 1479 | emit_push_r32(DRCTOP, REG_EBX); // push ebx |
| r2454 | r2455 | |
| 1521 | 1519 | emit_shl_r32_cl(DRCTOP, REG_EBX); // shl ebx,cl |
| 1522 | 1520 | emit_shld_r32_r32_cl(DRCTOP, REG_EBP, REG_EBX); // shld ebp,ebx,cl |
| 1523 | 1521 | emit_shl_r32_cl(DRCTOP, REG_EBX); // shl ebx,cl |
| 1524 | emit_not_r32(DRCTOP, REG_EBX); // not ebx | |
| 1525 | emit_not_r32(DRCTOP, REG_EBP); // not ebp | |
| 1526 | 1522 | emit_push_r32(DRCTOP, REG_ECX); // push ecx |
| 1527 | 1523 | emit_push_r32(DRCTOP, REG_EBP); // push ebp |
| 1528 | 1524 | emit_push_r32(DRCTOP, REG_EBX); // push ebx |
| r2454 | r2455 | |
| 1668 | 1664 | if (!mips3.core->bigendian) |
| 1669 | 1665 | emit_xor_r32_imm(DRCTOP, REG_ECX, 0x18); // xor ecx,0x18 |
| 1670 | 1666 | emit_shr_r32_cl(DRCTOP, REG_EBX); // shr ebx,cl |
| 1671 | emit_not_r32(DRCTOP, REG_EBX); // not ebx | |
| 1672 | 1667 | emit_push_r32(DRCTOP, REG_ECX); // push ecx |
| 1673 | 1668 | emit_push_r32(DRCTOP, REG_EBX); // push ebx |
| 1674 | 1669 | emit_push_r32(DRCTOP, REG_EAX); // push eax |
| r2454 | r2455 | |
| 1776 | 1771 | if (mips3.core->bigendian) |
| 1777 | 1772 | emit_xor_r32_imm(DRCTOP, REG_ECX, 0x18); // xor ecx,0x18 |
| 1778 | 1773 | emit_shl_r32_cl(DRCTOP, REG_EBX); // shl ebx,cl |
| 1779 | emit_not_r32(DRCTOP, REG_EBX); // not ebx | |
| 1780 | 1774 | emit_push_r32(DRCTOP, REG_ECX); // push ecx |
| 1781 | 1775 | emit_push_r32(DRCTOP, REG_EBX); // push ebx |
| 1782 | 1776 | emit_push_r32(DRCTOP, REG_EAX); // push eax |
| r2454 | r2455 | |
| 1882 | 1876 | if (!mips3.core->bigendian) |
| 1883 | 1877 | emit_xor_r32_imm(DRCTOP, REG_ECX, 0x18); // xor ecx,0x18 |
| 1884 | 1878 | emit_shr_r32_cl(DRCTOP, REG_EBX); // shr ebx,cl |
| 1885 | emit_not_r32(DRCTOP, REG_EBX); // not ebx | |
| 1886 | 1879 | emit_push_r32(DRCTOP, REG_EBX); // push ebx |
| 1887 | 1880 | if (RTREG != 0) |
| 1888 | 1881 | { |
| r2454 | r2455 | |
| 1937 | 1930 | emit_shr_r32_cl(DRCTOP, REG_EBP); // shr ebp,cl |
| 1938 | 1931 | emit_shrd_r32_r32_cl(DRCTOP, REG_EBX, REG_EBP); // shrd ebx,ebp,cl |
| 1939 | 1932 | emit_shr_r32_cl(DRCTOP, REG_EBP); // shr ebp,cl |
| 1940 | emit_not_r32(DRCTOP, REG_EBP); // not ebp | |
| 1941 | emit_not_r32(DRCTOP, REG_EBX); // not ebx | |
| 1942 | 1933 | emit_push_r32(DRCTOP, REG_EBP); // push ebp |
| 1943 | 1934 | emit_push_r32(DRCTOP, REG_EBX); // push ebx |
| 1944 | 1935 | if (RTREG != 0) |
| r2454 | r2455 | |
| 1979 | 1970 | emit_shl_r32_cl(DRCTOP, REG_EBX); // shl ebx,cl |
| 1980 | 1971 | emit_shld_r32_r32_cl(DRCTOP, REG_EBP, REG_EBX); // shld ebp,ebx,cl |
| 1981 | 1972 | emit_shl_r32_cl(DRCTOP, REG_EBX); // shl ebx,cl |
| 1982 | emit_not_r32(DRCTOP, REG_EBP); // not ebp | |
| 1983 | emit_not_r32(DRCTOP, REG_EBX); // not ebx | |
| 1984 | 1973 | emit_push_r32(DRCTOP, REG_EBP); // push ebp |
| 1985 | 1974 | emit_push_r32(DRCTOP, REG_EBX); // push ebx |
| 1986 | 1975 | if (RTREG != 0) |
| r2454 | r2455 | |
| 2018 | 2007 | if (mips3.core->bigendian) |
| 2019 | 2008 | emit_xor_r32_imm(DRCTOP, REG_ECX, 0x18); // xor ecx,0x18 |
| 2020 | 2009 | emit_shl_r32_cl(DRCTOP, REG_EBX); // shl ebx,cl |
| 2021 | emit_not_r32(DRCTOP, REG_EBX); // not ebx | |
| 2022 | 2010 | emit_push_r32(DRCTOP, REG_EBX); // push ebx |
| 2023 | 2011 | if (RTREG != 0) |
| 2024 | 2012 | { |
| r2454 | r2455 | |
|---|---|---|
| 29 | 29 | static void tlb_write_common(mips3_state *mips, int index); |
| 30 | 30 | static void tlb_entry_log_half(mips3_tlb_entry *tlbent, int index, int which); |
| 31 | 31 | |
| 32 | static UINT64 program_read_qword_masked_32be(offs_t offset, UINT64 mem_mask); | |
| 33 | static void program_write_qword_masked_32be(offs_t offset, UINT64 data, UINT64 mem_mask); | |
| 34 | static UINT64 program_read_qword_masked_32le(offs_t offset, UINT64 mem_mask); | |
| 35 | static void program_write_qword_masked_32le(offs_t offset, UINT64 data, UINT64 mem_mask); | |
| 36 | 32 | |
| 37 | 33 | |
| 38 | ||
| 39 | 34 | /*************************************************************************** |
| 40 | 35 | PRIVATE GLOBAL VARIABLES |
| 41 | 36 | ***************************************************************************/ |
| r2454 | r2455 | |
| 860 | 855 | asid, r, c, (lo & 4) ? 'd' : '.', (lo & 2) ? 'v' : '.', (hi & 0x1000) ? 'g' : '.'); |
| 861 | 856 | #endif |
| 862 | 857 | } |
| 863 | ||
| 864 | ||
| 865 | ||
| 866 | /*************************************************************************** | |
| 867 | DOUBLEWORD READS/WRITES | |
| 868 | ***************************************************************************/ | |
| 869 | ||
| 870 | /*------------------------------------------------- | |
| 871 | program_read_qword_masked_32be - read a 64-bit | |
| 872 | big-endian value with explicit masking | |
| 873 | -------------------------------------------------*/ | |
| 874 | ||
| 875 | static UINT64 program_read_qword_masked_32be(offs_t offset, UINT64 mem_mask) | |
| 876 | { | |
| 877 | UINT64 result = 0; | |
| 878 | if (ACCESSING_BITS_32_63) | |
| 879 | result |= (UINT64)program_read_dword_masked_32be(offset, mem_mask >> 32) << 32; | |
| 880 | if (ACCESSING_BITS_0_31) | |
| 881 | result |= program_read_dword_masked_32be(offset + 4, mem_mask); | |
| 882 | return result; | |
| 883 | } | |
| 884 | ||
| 885 | ||
| 886 | /*------------------------------------------------- | |
| 887 | program_read_qword_masked_32le - read a 64-bit | |
| 888 | little-endian value with explicit masking | |
| 889 | -------------------------------------------------*/ | |
| 890 | ||
| 891 | static UINT64 program_read_qword_masked_32le(offs_t offset, UINT64 mem_mask) | |
| 892 | { | |
| 893 | UINT64 result = 0; | |
| 894 | if (ACCESSING_BITS_0_31) | |
| 895 | result |= program_read_dword_masked_32le(offset, mem_mask); | |
| 896 | if (ACCESSING_BITS_32_63) | |
| 897 | result |= (UINT64)program_read_dword_masked_32le(offset + 4, mem_mask >> 32) << 32; | |
| 898 | return result; | |
| 899 | } | |
| 900 | ||
| 901 | ||
| 902 | /*------------------------------------------------- | |
| 903 | program_write_qword_masked_32be - write a | |
| 904 | 64-bit big-endian value with explicit masking | |
| 905 | -------------------------------------------------*/ | |
| 906 | ||
| 907 | static void program_write_qword_masked_32be(offs_t offset, UINT64 data, UINT64 mem_mask) | |
| 908 | { | |
| 909 | if (ACCESSING_BITS_32_63) | |
| 910 | program_write_dword_masked_32be(offset, data >> 32, mem_mask >> 32); | |
| 911 | if (ACCESSING_BITS_0_31) | |
| 912 | program_write_dword_masked_32be(offset + 4, data, mem_mask); | |
| 913 | } | |
| 914 | ||
| 915 | ||
| 916 | /*------------------------------------------------- | |
| 917 | program_write_qword_masked_32le - write a | |
| 918 | 64-bit little-endian value with explicit masking | |
| 919 | -------------------------------------------------*/ | |
| 920 | ||
| 921 | static void program_write_qword_masked_32le(offs_t offset, UINT64 data, UINT64 mem_mask) | |
| 922 | { | |
| 923 | if (ACCESSING_BITS_0_31) | |
| 924 | program_write_dword_masked_32le(offset, data, mem_mask); | |
| 925 | if (ACCESSING_BITS_32_63) | |
| 926 | program_write_dword_masked_32le(offset + 4, data >> 32, mem_mask >> 32); | |
| 927 | } |
| r2454 | r2455 | |
|---|---|---|
| 10 | 10 | ***************************************************************************/ |
| 11 | 11 | |
| 12 | 12 | #include "debugger.h" |
| 13 | #include "deprecat.h" | |
| 14 | 13 | #include "mips3com.h" |
| 15 | 14 | |
| 16 | 15 | |
| r2454 | r2455 | |
| 1963 | 1962 | UINT32 mask = 0xffffffffUL << shift; |
| 1964 | 1963 | UINT32 temp; |
| 1965 | 1964 | |
| 1966 | if (RWORD_MASKED(offs & ~3, &temp, | |
| 1965 | if (RWORD_MASKED(offs & ~3, &temp, | |
| 1967 | 1966 | RTVAL64 = (INT32)((RTVAL32 & ~mask) | (temp << shift)); |
| 1968 | 1967 | } |
| 1969 | 1968 | |
| r2454 | r2455 | |
| 1974 | 1973 | UINT32 mask = 0xffffffffUL >> shift; |
| 1975 | 1974 | UINT32 temp; |
| 1976 | 1975 | |
| 1977 | if (RWORD_MASKED(offs & ~3, &temp, | |
| 1976 | if (RWORD_MASKED(offs & ~3, &temp, | |
| 1978 | 1977 | RTVAL64 = (INT32)((RTVAL32 & ~mask) | (temp >> shift)); |
| 1979 | 1978 | } |
| 1980 | 1979 | |
| r2454 | r2455 | |
| 1985 | 1984 | UINT64 mask = U64(0xffffffffffffffff) << shift; |
| 1986 | 1985 | UINT64 temp; |
| 1987 | 1986 | |
| 1988 | if (RDOUBLE_MASKED(offs & ~7, &temp, | |
| 1987 | if (RDOUBLE_MASKED(offs & ~7, &temp, | |
| 1989 | 1988 | RTVAL64 = (RTVAL64 & ~mask) | (temp << shift); |
| 1990 | 1989 | } |
| 1991 | 1990 | |
| r2454 | r2455 | |
| 1996 | 1995 | UINT64 mask = U64(0xffffffffffffffff) >> shift; |
| 1997 | 1996 | UINT64 temp; |
| 1998 | 1997 | |
| 1999 | if (RDOUBLE_MASKED(offs & ~7, &temp, | |
| 1998 | if (RDOUBLE_MASKED(offs & ~7, &temp, | |
| 2000 | 1999 | RTVAL64 = (RTVAL64 & ~mask) | (temp >> shift); |
| 2001 | 2000 | } |
| 2002 | 2001 | |
| r2454 | r2455 | |
| 2004 | 2003 | { |
| 2005 | 2004 | offs_t offs = SIMMVAL + RSVAL32; |
| 2006 | 2005 | int shift = 8 * (offs & 3); |
| 2007 | UINT32 mask = | |
| 2006 | UINT32 mask = | |
| 2008 | 2007 | WWORD_MASKED(offs & ~3, RTVAL32 >> shift, mask); |
| 2009 | 2008 | } |
| 2010 | 2009 | |
| r2454 | r2455 | |
| 2012 | 2011 | { |
| 2013 | 2012 | offs_t offs = SIMMVAL + RSVAL32; |
| 2014 | 2013 | int shift = 8 * (~offs & 3); |
| 2015 | UINT32 mask = | |
| 2014 | UINT32 mask = | |
| 2016 | 2015 | WWORD_MASKED(offs & ~3, RTVAL32 << shift, mask); |
| 2017 | 2016 | } |
| 2018 | 2017 | |
| r2454 | r2455 | |
| 2020 | 2019 | { |
| 2021 | 2020 | offs_t offs = SIMMVAL + RSVAL32; |
| 2022 | 2021 | int shift = 8 * (offs & 7); |
| 2023 | UINT64 mask = | |
| 2022 | UINT64 mask = | |
| 2024 | 2023 | WDOUBLE_MASKED(offs & ~7, RTVAL64 >> shift, mask); |
| 2025 | 2024 | } |
| 2026 | 2025 | |
| r2454 | r2455 | |
| 2028 | 2027 | { |
| 2029 | 2028 | offs_t offs = SIMMVAL + RSVAL32; |
| 2030 | 2029 | int shift = 8 * (~offs & 7); |
| 2031 | UINT64 mask = | |
| 2030 | UINT64 mask = | |
| 2032 | 2031 | WDOUBLE_MASKED(offs & ~7, RTVAL64 << shift, mask); |
| 2033 | 2032 | } |
| 2034 | 2033 | |
| r2454 | r2455 | |
| 2041 | 2040 | UINT32 mask = 0xffffffffUL << shift; |
| 2042 | 2041 | UINT32 temp; |
| 2043 | 2042 | |
| 2044 | if (RWORD_MASKED(offs & ~3, &temp, | |
| 2043 | if (RWORD_MASKED(offs & ~3, &temp, | |
| 2045 | 2044 | RTVAL64 = (INT32)((RTVAL32 & ~mask) | (temp << shift)); |
| 2046 | 2045 | } |
| 2047 | 2046 | |
| r2454 | r2455 | |
| 2052 | 2051 | UINT32 mask = 0xffffffffUL >> shift; |
| 2053 | 2052 | UINT32 temp; |
| 2054 | 2053 | |
| 2055 | if (RWORD_MASKED(offs & ~3, &temp, | |
| 2054 | if (RWORD_MASKED(offs & ~3, &temp, | |
| 2056 | 2055 | RTVAL64 = (INT32)((RTVAL32 & ~mask) | (temp >> shift)); |
| 2057 | 2056 | } |
| 2058 | 2057 | |
| r2454 | r2455 | |
| 2063 | 2062 | UINT64 mask = U64(0xffffffffffffffff) << shift; |
| 2064 | 2063 | UINT64 temp; |
| 2065 | 2064 | |
| 2066 | if (RDOUBLE_MASKED(offs & ~7, &temp, | |
| 2065 | if (RDOUBLE_MASKED(offs & ~7, &temp, | |
| 2067 | 2066 | RTVAL64 = (RTVAL64 & ~mask) | (temp << shift); |
| 2068 | 2067 | } |
| 2069 | 2068 | |
| r2454 | r2455 | |
| 2074 | 2073 | UINT64 mask = U64(0xffffffffffffffff) >> shift; |
| 2075 | 2074 | UINT64 temp; |
| 2076 | 2075 | |
| 2077 | if (RDOUBLE_MASKED(offs & ~7, &temp, | |
| 2076 | if (RDOUBLE_MASKED(offs & ~7, &temp, | |
| 2078 | 2077 | RTVAL64 = (RTVAL64 & ~mask) | (temp >> shift); |
| 2079 | 2078 | } |
| 2080 | 2079 | |
| r2454 | r2455 | |
| 2082 | 2081 | { |
| 2083 | 2082 | offs_t offs = SIMMVAL + RSVAL32; |
| 2084 | 2083 | int shift = 8 * (~offs & 3); |
| 2085 | UINT32 mask = | |
| 2084 | UINT32 mask = | |
| 2086 | 2085 | WWORD_MASKED(offs & ~3, RTVAL32 >> shift, mask); |
| 2087 | 2086 | } |
| 2088 | 2087 | |
| r2454 | r2455 | |
| 2090 | 2089 | { |
| 2091 | 2090 | offs_t offs = SIMMVAL + RSVAL32; |
| 2092 | 2091 | int shift = 8 * (offs & 3); |
| 2093 | UINT32 mask = | |
| 2092 | UINT32 mask = | |
| 2094 | 2093 | WWORD_MASKED(offs & ~3, RTVAL32 << shift, mask); |
| 2095 | 2094 | } |
| 2096 | 2095 | |
| r2454 | r2455 | |
| 2098 | 2097 | { |
| 2099 | 2098 | offs_t offs = SIMMVAL + RSVAL32; |
| 2100 | 2099 | int shift = 8 * (~offs & 7); |
| 2101 | UINT64 mask = | |
| 2100 | UINT64 mask = | |
| 2102 | 2101 | WDOUBLE_MASKED(offs & ~7, RTVAL64 >> shift, mask); |
| 2103 | 2102 | } |
| 2104 | 2103 | |
| r2454 | r2455 | |
| 2106 | 2105 | { |
| 2107 | 2106 | offs_t offs = SIMMVAL + RSVAL32; |
| 2108 | 2107 | int shift = 8 * (offs & 7); |
| 2109 | UINT64 mask = | |
| 2108 | UINT64 mask = | |
| 2110 | 2109 | WDOUBLE_MASKED(offs & ~7, RTVAL64 << shift, mask); |
| 2111 | 2110 | } |
| 2112 | 2111 |
| r2454 | r2455 | |
|---|---|---|
| 27 | 27 | */ |
| 28 | 28 | |
| 29 | 29 | #include "debugger.h" |
| 30 | #include "deprecat.h" | |
| 31 | 30 | #include "f8.h" |
| 32 | 31 | |
| 33 | 32 | #define S 0x01 |
| r2454 | r2455 | |
|---|---|---|
| 94 | 94 | *****************************************************************************/ |
| 95 | 95 | |
| 96 | 96 | #include "debugger.h" |
| 97 | #include "deprecat.h" | |
| 98 | 97 | #include "z80.h" |
| 99 | 98 | #include "z80daisy.h" |
| 100 | 99 |
| r2454 | r2455 | |
|---|---|---|
| 10 | 10 | ***************************************************************************/ |
| 11 | 11 | |
| 12 | 12 | #include "debugger.h" |
| 13 | #include "deprecat.h" | |
| 14 | 13 | #include "asap.h" |
| 15 | 14 | |
| 16 | 15 |
| r2454 | r2455 | |
|---|---|---|
| 1 | 1 | #include "debugger.h" |
| 2 | #include "deprecat.h" | |
| 3 | 2 | #include "i960.h" |
| 4 | 3 | #include "i960dis.h" |
| 5 | 4 | #include <math.h> |
| r2454 | r2455 | |
|---|---|---|
| 17 | 17 | ********************************************/ |
| 18 | 18 | |
| 19 | 19 | #include "debugger.h" |
| 20 | #include "deprecat.h" | |
| 21 | 20 | #include "v810.h" |
| 22 | 21 | |
| 23 | 22 | #define clkIF 3 |
| r2454 | r2455 | |
|---|---|---|
| 119 | 119 | |
| 120 | 120 | |
| 121 | 121 | #include "debugger.h" |
| 122 | #include "deprecat.h" | |
| 123 | 122 | #include "tms32025.h" |
| 124 | 123 | |
| 125 | 124 |
| r2454 | r2455 | |
|---|---|---|
| 54 | 54 | |
| 55 | 55 | |
| 56 | 56 | #include "debugger.h" |
| 57 | #include "deprecat.h" | |
| 58 | 57 | #include "pic16c5x.h" |
| 59 | 58 | |
| 60 | 59 |
| r2454 | r2455 | |
|---|---|---|
| 336 | 336 | |
| 337 | 337 | |
| 338 | 338 | #include "debugger.h" |
| 339 | #include "deprecat.h" | |
| 340 | 339 | #include "pdp1.h" |
| 341 | 340 | |
| 342 | 341 | #define LOG 0 |
| r2454 | r2455 | |
|---|---|---|
| 11 | 11 | #include "cpuintrf.h" |
| 12 | 12 | #include "debugger.h" |
| 13 | 13 | #include "tx0.h" |
| 14 | #include "deprecat.h" | |
| 15 | 14 | |
| 16 | 15 | #define LOG 0 |
| 17 | 16 | #define LOG_EXTRA 0 |
| r2454 | r2455 | |
|---|---|---|
| 14 | 14 | ***************************************************************************/ |
| 15 | 15 | |
| 16 | 16 | #include "mb86233.h" |
| 17 | #include "deprecat.h" | |
| 18 | 17 | #include "debugger.h" |
| 19 | 18 | |
| 20 | 19 | /*************************************************************************** |
| r2454 | r2455 | |
|---|---|---|
| 12 | 12 | *****************************************************************************/ |
| 13 | 13 | |
| 14 | 14 | #include "debugger.h" |
| 15 | #include "deprecat.h" | |
| 16 | 15 | #include "t11.h" |
| 17 | 16 | |
| 18 | 17 |
| r2454 | r2455 | |
|---|---|---|
| 255 | 255 | { |
| 256 | 256 | switch (t11.op & 0x3f) |
| 257 | 257 | { |
| 258 | case 0x00: /* HALT */ t | |
| 258 | case 0x00: /* HALT */ halt() | |
| 259 | 259 | case 0x01: /* WAIT */ t11_ICount = 0; t11.wait_state = 1; break; |
| 260 | 260 | case 0x02: /* RTI */ t11_ICount -= 24; PC = POP(); PSW = POP(); change_pc(PC); t11_check_irqs(); break; |
| 261 | 261 | case 0x03: /* BPT */ t11_ICount -= 48; PUSH(PSW); PUSH(PC); PC = RWORD(0x0c); PSW = RWORD(0x0e); change_pc(PC); t11_check_irqs(); break; |
| r2454 | r2455 | |
| 266 | 266 | } |
| 267 | 267 | } |
| 268 | 268 | |
| 269 | static void halt(void) | |
| 270 | { | |
| 271 | t11_ICount -= 48; | |
| 272 | PUSH(PSW); | |
| 273 | PUSH(PC); | |
| 274 | PC = RWORD(0x04); | |
| 275 | PSW = RWORD(0x06); | |
| 276 | change_pc(PC); | |
| 277 | t11_check_irqs(); | |
| 278 | } | |
| 279 | ||
| 269 | 280 | static void illegal(void) |
| 270 | 281 | { |
| 271 | 282 | t11_ICount -= 48; |
| r2454 | r2455 | |
| 275 | 286 | PSW = RWORD(0x0a); |
| 276 | 287 | change_pc(PC); |
| 277 | 288 | t11_check_irqs(); |
| 278 | PC = 0; | |
| 279 | 289 | } |
| 280 | 290 | |
| 291 | static void mark(void) | |
| 292 | { | |
| 293 | t11_ICount -= 36; | |
| 294 | ||
| 295 | SP = SP + 2 * (t11.op & 0x3f); | |
| 296 | PC = REGW(5); | |
| 297 | REGW(5) = POP(); | |
| 298 | ||
| 299 | change_pc(PC); | |
| 300 | } | |
| 301 | ||
| 281 | 302 | static void jmp_rgd(void) { t11_ICount -= 15; { JMP(RGD); } } |
| 282 | 303 | static void jmp_in(void) { t11_ICount -= 18; { JMP(IN); } } |
| 283 | 304 | static void jmp_ind(void) { t11_ICount -= 18; { JMP(IND); } } |
| r2454 | r2455 | |
|---|---|---|
| 21 | 21 | */ |
| 22 | 22 | |
| 23 | 23 | static void op_0000(void); |
| 24 | static void halt(void); | |
| 24 | 25 | static void illegal(void); |
| 25 | 26 | |
| 26 | 27 | static void jmp_rgd(void); |
| r2454 | r2455 | |
| 168 | 169 | static void asl_ix(void); |
| 169 | 170 | static void asl_ixd(void); |
| 170 | 171 | |
| 171 | ||
| 172 | ||
| 172 | 173 | |
| 173 | 174 | static void sxt_rg(void); |
| 174 | 175 | static void sxt_rgd(void); |
| r2454 | r2455 | |
| 1112 | 1113 | static void (*const opcode_table[65536 >> 3])(void) = |
| 1113 | 1114 | { |
| 1114 | 1115 | /* 0x0000 */ |
| 1115 | op_0000, | |
| 1116 | op_0000, h | |
| 1116 | 1117 | illegal, jmp_rgd, jmp_in, jmp_ind, jmp_de, jmp_ded, jmp_ix, jmp_ixd, |
| 1117 | 1118 | rts, illegal, illegal, illegal, ccc, ccc, scc, scc, |
| 1118 | 1119 | swab_rg, swab_rgd, swab_in, swab_ind, swab_de, swab_ded, swab_ix, swab_ixd, |
| r2454 | r2455 | |
| 1177 | 1178 | asr_rg, asr_rgd, asr_in, asr_ind, asr_de, asr_ded, asr_ix, asr_ixd, |
| 1178 | 1179 | asl_rg, asl_rgd, asl_in, asl_ind, asl_de, asl_ded, asl_ix, asl_ixd, |
| 1179 | 1180 | /* 0x0d00 */ |
| 1181 | mark, mark, mark, mark, mark, mark, mark, mark, | |
| 1180 | 1182 | illegal, illegal, illegal, illegal, illegal, illegal, illegal, illegal, |
| 1181 | 1183 | illegal, illegal, illegal, illegal, illegal, illegal, illegal, illegal, |
| 1182 | illegal, illegal, illegal, illegal, illegal, illegal, illegal, illegal, | |
| 1183 | 1184 | sxt_rg, sxt_rgd, sxt_in, sxt_ind, sxt_de, sxt_ded, sxt_ix, sxt_ixd, |
| 1184 | 1185 | /* 0x0e00 */ |
| 1185 | 1186 | illegal, illegal, illegal, illegal, illegal, illegal, illegal, illegal, |
| r2454 | r2455 | |
|---|---|---|
| 35 | 35 | ** |
| 36 | 36 | *****************************************************************************/ |
| 37 | 37 | #include "arm7.h" |
| 38 | #include "deprecat.h" | |
| 39 | 38 | #include "debugger.h" |
| 40 | 39 | #include "arm7core.h" //include arm7 core |
| 41 | 40 |
| r2454 | r2455 | |
|---|---|---|
| 108 | 108 | |
| 109 | 109 | ******************************************************************************/ |
| 110 | 110 | #include "debugger.h" |
| 111 | #include "deprecat.h" | |
| 112 | 111 | #include "h6280.h" |
| 113 | 112 | |
| 114 | 113 | static int h6280_ICount = 0; |
| r2454 | r2455 | |
|---|---|---|
| 74 | 74 | */ |
| 75 | 75 | |
| 76 | 76 | #include "debugger.h" |
| 77 | #include "deprecat.h" | |
| 78 | 77 | #include "m6800.h" |
| 79 | 78 | |
| 80 | 79 | #define VERBOSE 0 |
| r2454 | r2455 | |
| 1965 | 1964 | |
| 1966 | 1965 | READ8_HANDLER( hd63701_internal_registers_r ) |
| 1967 | 1966 | { |
| 1968 | return m6803_internal_registers_r( | |
| 1967 | return m6803_internal_registers_r(machine, offset); | |
| 1969 | 1968 | } |
| 1970 | 1969 | |
| 1971 | 1970 | WRITE8_HANDLER( hd63701_internal_registers_w ) |
| 1972 | 1971 | { |
| 1973 | m6803_internal_registers_w( | |
| 1972 | m6803_internal_registers_w(machine, offset,data); | |
| 1974 | 1973 | } |
| 1975 | 1974 | #endif |
| 1976 | 1975 |
| r2454 | r2455 | |
|---|---|---|
| 20 | 20 | * |
| 21 | 21 | *****************************************************************************/ |
| 22 | 22 | #include "debugger.h" |
| 23 | #include "deprecat.h" | |
| 24 | 23 | |
| 25 | 24 | #include "saturn.h" |
| 26 | 25 | #include "sat.h" |
| r2454 | r2455 | |
|---|---|---|
| 87 | 87 | *****************************************************************************/ |
| 88 | 88 | |
| 89 | 89 | #include "debugger.h" |
| 90 | #include "deprecat.h" | |
| 91 | 90 | #include "i8x41.h" |
| 92 | 91 | |
| 93 | 92 | typedef struct { |
| r2454 | r2455 | |
|---|---|---|
| 35 | 35 | *****************************************************************************/ |
| 36 | 36 | |
| 37 | 37 | #include "debugger.h" |
| 38 | #include "deprecat.h" | |
| 39 | 38 | #include "konami.h" |
| 40 | 39 | |
| 41 | 40 | #define VERBOSE 0 |
| r2454 | r2455 | |
|---|---|---|
| 2014 | 2014 | |
| 2015 | 2015 | /* loop over words */ |
| 2016 | 2016 | for (i = 0; i < count; i++) |
| 2017 | cycles += lfb_w(v, target++, *src++, 0, FALSE); | |
| 2017 | cycles += lfb_w(v, target++, *src++, 0xffffffff, FALSE); | |
| 2018 | 2018 | } |
| 2019 | 2019 | else if ((command >> 30) == 3) |
| 2020 | 2020 | { |
| r2454 | r2455 | |
| 3535 | 3535 | cycles = texture_w(v, address, data); |
| 3536 | 3536 | else |
| 3537 | 3537 | { |
| 3538 | UINT32 mem_mask = 0; | |
| 3538 | UINT32 mem_mask = 0xffffffff; | |
| 3539 | 3539 | |
| 3540 | 3540 | /* compute mem_mask */ |
| 3541 | 3541 | if (address & 0x80000000) |
| 3542 | mem_mask | |
| 3542 | mem_mask &= 0x | |
| 3543 | 3543 | if (address & 0x40000000) |
| 3544 | mem_mask | |
| 3544 | mem_mask &= 0x | |
| 3545 | 3545 | address &= 0xffffff; |
| 3546 | 3546 | |
| 3547 | 3547 | cycles = lfb_w(v, address, data, mem_mask, FALSE); |
| r2454 | r2455 | |
| 4384 | 4384 | } |
| 4385 | 4385 | |
| 4386 | 4386 | if (LOG_REGISTERS) |
| 4387 | logerror("%08X:banshee_w(AGP:%s) = %08X & %08X\n", activecpu_get_pc(), banshee_agp_reg_name[offset], data, | |
| 4387 | logerror("%08X:banshee_w(AGP:%s) = %08X & %08X\n", activecpu_get_pc(), banshee_agp_reg_name[offset], data, | |
| 4388 | 4388 | } |
| 4389 | 4389 | |
| 4390 | 4390 | |
| r2454 | r2455 | |
| 4399 | 4399 | else if (offset < 0x100000/4) |
| 4400 | 4400 | banshee_agp_w(v, offset, data, mem_mask); |
| 4401 | 4401 | else if (offset < 0x200000/4) |
| 4402 | logerror("%08X:banshee_w(2D:%X) = %08X & %08X\n", activecpu_get_pc(), (offset*4) & 0xfffff, data, | |
| 4402 | logerror("%08X:banshee_w(2D:%X) = %08X & %08X\n", activecpu_get_pc(), (offset*4) & 0xfffff, data, | |
| 4403 | 4403 | else if (offset < 0x600000/4) |
| 4404 | 4404 | register_w(v, offset & 0x1fffff/4, data); |
| 4405 | 4405 | else if (offset < 0x800000/4) |
| 4406 | logerror("%08X:banshee_w(TEX:%X) = %08X & %08X\n", activecpu_get_pc(), (offset*4) & 0x1fffff, data, | |
| 4406 | logerror("%08X:banshee_w(TEX:%X) = %08X & %08X\n", activecpu_get_pc(), (offset*4) & 0x1fffff, data, | |
| 4407 | 4407 | else if (offset < 0xc00000/4) |
| 4408 | logerror("%08X:banshee_w(RES:%X) = %08X & %08X\n", activecpu_get_pc(), (offset*4) & 0x3fffff, data, | |
| 4408 | logerror("%08X:banshee_w(RES:%X) = %08X & %08X\n", activecpu_get_pc(), (offset*4) & 0x3fffff, data, | |
| 4409 | 4409 | else if (offset < 0x1000000/4) |
| 4410 | logerror("%08X:banshee_w(YUV:%X) = %08X & %08X\n", activecpu_get_pc(), (offset*4) & 0x3fffff, data, | |
| 4410 | logerror("%08X:banshee_w(YUV:%X) = %08X & %08X\n", activecpu_get_pc(), (offset*4) & 0x3fffff, data, | |
| 4411 | 4411 | else if (offset < 0x2000000/4) |
| 4412 | 4412 | { |
| 4413 | 4413 | UINT8 temp = v->fbi.lfb_stride; |
| r2454 | r2455 | |
| 4436 | 4436 | { |
| 4437 | 4437 | if (offset*4 <= v->fbi.mask) |
| 4438 | 4438 | COMBINE_DATA(&((UINT32 *)v->fbi.ram)[offset]); |
| 4439 | logerror("%08X:banshee_fb_w(%X) = %08X & %08X\n", activecpu_get_pc(), offset*4, data, | |
| 4439 | logerror("%08X:banshee_fb_w(%X) = %08X & %08X\n", activecpu_get_pc(), offset*4, data, | |
| 4440 | 4440 | } |
| 4441 | 4441 | } |
| 4442 | 4442 | else |
| r2454 | r2455 | |
| 4518 | 4518 | if ((v->banshee.io[offset] ^ old) & 0x2800) |
| 4519 | 4519 | v->fbi.clut_dirty = TRUE; |
| 4520 | 4520 | if (LOG_REGISTERS) |
| 4521 | logerror("%08X:banshee_io_w(%s) = %08X & %08X\n", activecpu_get_pc(), banshee_io_reg_name[offset], data, | |
| 4521 | logerror("%08X:banshee_io_w(%s) = %08X & %08X\n", activecpu_get_pc(), banshee_io_reg_name[offset], data, | |
| 4522 | 4522 | break; |
| 4523 | 4523 | |
| 4524 | 4524 | case io_dacData: |
| r2454 | r2455 | |
| 4529 | 4529 | v->fbi.clut_dirty = TRUE; |
| 4530 | 4530 | } |
| 4531 | 4531 | if (LOG_REGISTERS) |
| 4532 | logerror("%08X:banshee_dac_w(%X) = %08X & %08X\n", activecpu_get_pc(), v->banshee.io[io_dacAddr] & 0x1ff, data, | |
| 4532 | logerror("%08X:banshee_dac_w(%X) = %08X & %08X\n", activecpu_get_pc(), v->banshee.io[io_dacAddr] & 0x1ff, data, | |
| 4533 | 4533 | break; |
| 4534 | 4534 | |
| 4535 | 4535 | case io_miscInit0: |
| 4536 | 4536 | COMBINE_DATA(&v->banshee.io[offset]); |
| 4537 | 4537 | v->fbi.yorigin = (data >> 18) & 0xfff; |
| 4538 | 4538 | if (LOG_REGISTERS) |
| 4539 | logerror("%08X:banshee_io_w(%s) = %08X & %08X\n", activecpu_get_pc(), banshee_io_reg_name[offset], data, | |
| 4539 | logerror("%08X:banshee_io_w(%s) = %08X & %08X\n", activecpu_get_pc(), banshee_io_reg_name[offset], data, | |
| 4540 | 4540 | break; |
| 4541 | 4541 | |
| 4542 | 4542 | case io_vidScreenSize: |
| r2454 | r2455 | |
| 4550 | 4550 | video_screen_set_visarea(v->screen, 0, v->fbi.width - 1, 0, v->fbi.height - 1); |
| 4551 | 4551 | adjust_vblank_timer(v); |
| 4552 | 4552 | if (LOG_REGISTERS) |
| 4553 | logerror("%08X:banshee_io_w(%s) = %08X & %08X\n", activecpu_get_pc(), banshee_io_reg_name[offset], data, | |
| 4553 | logerror("%08X:banshee_io_w(%s) = %08X & %08X\n", activecpu_get_pc(), banshee_io_reg_name[offset], data, | |
| 4554 | 4554 | break; |
| 4555 | 4555 | |
| 4556 | 4556 | case io_lfbMemoryConfig: |
| 4557 | 4557 | v->fbi.lfb_base = (data & 0x1fff) << 10; |
| 4558 | 4558 | v->fbi.lfb_stride = ((data >> 13) & 7) + 9; |
| 4559 | 4559 | if (LOG_REGISTERS) |
| 4560 | logerror("%08X:banshee_io_w(%s) = %08X & %08X\n", activecpu_get_pc(), banshee_io_reg_name[offset], data, | |
| 4560 | logerror("%08X:banshee_io_w(%s) = %08X & %08X\n", activecpu_get_pc(), banshee_io_reg_name[offset], data, | |
| 4561 | 4561 | break; |
| 4562 | 4562 | |
| 4563 | 4563 | case io_vgab0: case io_vgab4: case io_vgab8: case io_vgabc: |
| r2454 | r2455 | |
| 4576 | 4576 | default: |
| 4577 | 4577 | COMBINE_DATA(&v->banshee.io[offset]); |
| 4578 | 4578 | if (LOG_REGISTERS) |
| 4579 | logerror("%08X:banshee_io_w(%s) = %08X & %08X\n", activecpu_get_pc(), banshee_io_reg_name[offset], data, | |
| 4579 | logerror("%08X:banshee_io_w(%s) = %08X & %08X\n", activecpu_get_pc(), banshee_io_reg_name[offset], data, | |
| 4580 | 4580 | break; |
| 4581 | 4581 | } |
| 4582 | 4582 | } |
| r2454 | r2455 | |
|---|---|---|
| 677 | 677 | WRITE8_HANDLER( paletteram_RRRGGGBB_w ) |
| 678 | 678 | { |
| 679 | 679 | paletteram[offset] = data; |
| 680 | palette_set_color_rgb( | |
| 680 | palette_set_color_rgb(machine, offset, pal3bit(data >> 5), pal3bit(data >> 2), pal2bit(data >> 0)); | |
| 681 | 681 | } |
| 682 | 682 | |
| 683 | 683 | |
| r2454 | r2455 | |
| 688 | 688 | WRITE8_HANDLER( paletteram_BBGGGRRR_w ) |
| 689 | 689 | { |
| 690 | 690 | paletteram[offset] = data; |
| 691 | palette_set_color_rgb( | |
| 691 | palette_set_color_rgb(machine, offset, pal3bit(data >> 0), pal3bit(data >> 3), pal2bit(data >> 6)); | |
| 692 | 692 | } |
| 693 | 693 | |
| 694 | 694 | |
| r2454 | r2455 | |
| 701 | 701 | int i = (data >> 0) & 3; |
| 702 | 702 | |
| 703 | 703 | paletteram[offset] = data; |
| 704 | palette_set_color_rgb( | |
| 704 | palette_set_color_rgb(machine, offset, pal4bit(((data >> 0) & 0x0c) | i), | |
| 705 | 705 | pal4bit(((data >> 2) & 0x0c) | i), |
| 706 | 706 | pal4bit(((data >> 4) & 0x0c) | i)); |
| 707 | 707 | } |
| r2454 | r2455 | |
| 966 | 966 | { |
| 967 | 967 | COMBINE_DATA(&paletteram16[offset]); |
| 968 | 968 | data = paletteram16[offset]; |
| 969 | palette_set_color_rgb( | |
| 969 | palette_set_color_rgb(machine, offset, pal5bit(((data >> 11) & 0x1e) | ((data >> 3) & 0x01)), | |
| 970 | 970 | pal5bit(((data >> 7) & 0x1e) | ((data >> 2) & 0x01)), |
| 971 | 971 | pal5bit(((data >> 3) & 0x1e) | ((data >> 1) & 0x01))); |
| 972 | 972 | } |
| r2454 | r2455 | |
|---|---|---|
| 154 | 154 | |
| 155 | 155 | /* misc options */ |
| 156 | 156 | { NULL, NULL, OPTION_HEADER, "CORE MISC OPTIONS" }, |
| 157 | { "bios", | |
| 157 | { "bios", NULL | |
| 158 | 158 | { "cheat;c", "0", OPTION_BOOLEAN, "enable cheat subsystem" }, |
| 159 | 159 | { "skip_gameinfo", "0", OPTION_BOOLEAN, "skip displaying the information screen at startup" }, |
| 160 | 160 |
| r2454 | r2455 | |
|---|---|---|
| 1063 | 1063 | |
| 1064 | 1064 | /* a lot of modules want to the period of the primary screen, so |
| 1065 | 1065 | if we are screenless, return something reasonable so that we don't fall over */ |
| 1066 | if (video_screen_count(screen->machine->config) == 0) | |
| 1067 | { | |
| 1068 | assert(screen == NULL); | |
| 1069 | ret = DEFAULT_FRAME_PERIOD; | |
| 1066 | if (screen == NULL || video_screen_count(screen->machine->config) == 0) | |
| 1067 | { | |
| 1068 | ret = DEFAULT_FRAME_PERIOD; | |
| 1070 | 1069 | } |
| 1071 | else | |
| 1072 | { | |
| 1070 | else | |
| 1071 | { | |
| 1073 | 1072 | screen_state *state = get_safe_token(screen); |
| 1074 | 1073 | ret = attotime_make(0, state->frame_period); |
| 1075 | 1074 | } |
| r2454 | r2455 | |
| 1990 | 1989 | UINT32 target_speed; |
| 1991 | 1990 | |
| 1992 | 1991 | /* find the screen with the shortest frame period (max refresh rate) */ |
| 1992 | /* note that we first check the token since this can get called before all screens are created */ | |
| 1993 | 1993 | for (screen = video_screen_first(machine->config); screen != NULL; screen = video_screen_next(screen)) |
| 1994 | { | |
| 1995 | screen_state *state = get_safe_token(screen); | |
| 1996 | min_frame_period = MIN(min_frame_period, state->frame_period); | |
| 1997 | } | |
| 1994 | if (screen->token != NULL) | |
| 1995 | { | |
| 1996 | screen_state *state = get_safe_token(screen); | |
| 1997 | min_frame_period = MIN(min_frame_period, state->frame_period); | |
| 1998 | } | |
| 1998 | 1999 | |
| 1999 | 2000 | /* compute a target speed as an integral percentage */ |
| 2000 | 2001 | target_speed = floor(minrefresh * 100.0 / ATTOSECONDS_TO_HZ(min_frame_period)); |
| r2454 | r2455 | |
|---|---|---|
| 342 | 342 | static debug_hook_write_func debug_hook_write; /* pointer to debugger callback for memory writes */ |
| 343 | 343 | #endif |
| 344 | 344 | |
| 345 | #define ACCESSOR_GROUP(type, width) \ | |
| 346 | { \ | |
| 347 | memory_set_opbase, \ | |
| 348 | type##_read_byte_##width, \ | |
| 349 | type##_read_word_##width, \ | |
| 350 | type##_read_word_masked_##width, \ | |
| 351 | type##_read_dword_##width, \ | |
| 352 | type##_read_dword_masked_##width, \ | |
| 353 | type##_read_qword_##width, \ | |
| 354 | type##_read_qword_masked_##width, \ | |
| 355 | type##_write_byte_##width, \ | |
| 356 | type##_write_word_##width, \ | |
| 357 | type##_write_word_masked_##width, \ | |
| 358 | type##_write_dword_##width, \ | |
| 359 | type##_write_dword_masked_##width, \ | |
| 360 | type##_write_qword_##width, \ | |
| 361 | type##_write_qword_masked_##width \ | |
| 362 | } | |
| 363 | ||
| 345 | 364 | static const data_accessors memory_accessors[ADDRESS_SPACES][4][2] = |
| 346 | 365 | { |
| 347 | 366 | /* program accessors */ |
| 348 | 367 | { |
| 349 | { | |
| 350 | { memory_set_opbase, program_read_byte_8le, program_read_word_8le, program_read_dword_8le, NULL, program_read_qword_8le, NULL, program_write_byte_8le, program_write_word_8le, program_write_dword_8le, NULL, program_write_qword_8le, NULL }, | |
| 351 | { memory_set_opbase, program_read_byte_8be, program_read_word_8be, program_read_dword_8be, NULL, program_read_qword_8be, NULL, program_write_byte_8be, program_write_word_8be, program_write_dword_8be, NULL, program_write_qword_8be, NULL } | |
| 352 | }, | |
| 353 | { | |
| 354 | { memory_set_opbase, program_read_byte_16le, program_read_word_16le, program_read_dword_16le, NULL, program_read_qword_16le, NULL, program_write_byte_16le, program_write_word_16le, program_write_dword_16le, NULL, program_write_qword_16le, NULL }, | |
| 355 | { memory_set_opbase, program_read_byte_16be, program_read_word_16be, program_read_dword_16be, NULL, program_read_qword_16be, NULL, program_write_byte_16be, program_write_word_16be, program_write_dword_16be, NULL, program_write_qword_16be, NULL } | |
| 356 | }, | |
| 357 | { | |
| 358 | { memory_set_opbase, program_read_byte_32le, program_read_word_32le, program_read_dword_32le, program_read_dword_masked_32le, program_read_qword_32le, NULL, program_write_byte_32le, program_write_word_32le, program_write_dword_32le, program_write_dword_masked_32le, program_write_qword_32le, NULL }, | |
| 359 | { memory_set_opbase, program_read_byte_32be, program_read_word_32be, program_read_dword_32be, program_read_dword_masked_32be, program_read_qword_32be, NULL, program_write_byte_32be, program_write_word_32be, program_write_dword_32be, program_write_dword_masked_32be, program_write_qword_32be, NULL } | |
| 360 | }, | |
| 361 | { | |
| 362 | { memory_set_opbase, program_read_byte_64le, program_read_word_64le, program_read_dword_64le, NULL, program_read_qword_64le, program_read_qword_masked_64le, program_write_byte_64le, program_write_word_64le, program_write_dword_64le, NULL, program_write_qword_64le, program_write_qword_masked_64le }, | |
| 363 | { memory_set_opbase, program_read_byte_64be, program_read_word_64be, program_read_dword_64be, NULL, program_read_qword_64be, program_read_qword_masked_64be, program_write_byte_64be, program_write_word_64be, program_write_dword_64be, NULL, program_write_qword_64be, program_write_qword_masked_64be } | |
| 364 | } | |
| 368 | { ACCESSOR_GROUP(program, 8le), ACCESSOR_GROUP(program, 8be) }, | |
| 369 | { ACCESSOR_GROUP(program, 16le), ACCESSOR_GROUP(program, 16be) }, | |
| 370 | { ACCESSOR_GROUP(program, 32le), ACCESSOR_GROUP(program, 32be) }, | |
| 371 | { ACCESSOR_GROUP(program, 64le), ACCESSOR_GROUP(program, 64be) } | |
| 365 | 372 | }, |
| 366 | 373 | |
| 367 | 374 | /* data accessors */ |
| 368 | 375 | { |
| 369 | { | |
| 370 | { memory_set_opbase, data_read_byte_8le, data_read_word_8le, data_read_dword_8le, NULL, data_read_qword_8le, NULL, data_write_byte_8le, data_write_word_8le, data_write_dword_8le, NULL, data_write_qword_8le, NULL }, | |
| 371 | { memory_set_opbase, data_read_byte_8be, data_read_word_8be, data_read_dword_8be, NULL, data_read_qword_8be, NULL, data_write_byte_8be, data_write_word_8be, data_write_dword_8be, NULL, data_write_qword_8be, NULL } | |
| 372 | }, | |
| 373 | { | |
| 374 | { memory_set_opbase, data_read_byte_16le, data_read_word_16le, data_read_dword_16le, NULL, data_read_qword_16le, NULL, data_write_byte_16le, data_write_word_16le, data_write_dword_16le, NULL, data_write_qword_16le, NULL }, | |
| 375 | { memory_set_opbase, data_read_byte_16be, data_read_word_16be, data_read_dword_16be, NULL, data_read_qword_16be, NULL, data_write_byte_16be, data_write_word_16be, data_write_dword_16be, NULL, data_write_qword_16be, NULL } | |
| 376 | }, | |
| 377 | { | |
| 378 | { memory_set_opbase, data_read_byte_32le, data_read_word_32le, data_read_dword_32le, data_read_dword_masked_32le, data_read_qword_32le, NULL, data_write_byte_32le, data_write_word_32le, data_write_dword_32le, data_write_dword_masked_32le, data_write_qword_32le, NULL }, | |
| 379 | { memory_set_opbase, data_read_byte_32be, data_read_word_32be, data_read_dword_32be, data_read_dword_masked_32be, data_read_qword_32be, NULL, data_write_byte_32be, data_write_word_32be, data_write_dword_32be, data_write_dword_masked_32be, data_write_qword_32be, NULL } | |
| 380 | }, | |
| 381 | { | |
| 382 | { memory_set_opbase, data_read_byte_64le, data_read_word_64le, data_read_dword_64le, NULL, data_read_qword_64le, data_read_qword_masked_64le, data_write_byte_64le, data_write_word_64le, data_write_dword_64le, NULL, data_write_qword_64le, data_write_qword_masked_64le }, | |
| 383 | { memory_set_opbase, data_read_byte_64be, data_read_word_64be, data_read_dword_64be, NULL, data_read_qword_64be, data_read_qword_masked_64be, data_write_byte_64be, data_write_word_64be, data_write_dword_64be, NULL, data_write_qword_64be, data_write_qword_masked_64be } | |
| 384 | } | |
| 376 | { ACCESSOR_GROUP(data, 8le), ACCESSOR_GROUP(data, 8be) }, | |
| 377 | { ACCESSOR_GROUP(data, 16le), ACCESSOR_GROUP(data, 16be) }, | |
| 378 | { ACCESSOR_GROUP(data, 32le), ACCESSOR_GROUP(data, 32be) }, | |
| 379 | { ACCESSOR_GROUP(data, 64le), ACCESSOR_GROUP(data, 64be) } | |
| 385 | 380 | }, |
| 386 | 381 | |
| 387 | 382 | /* I/O accessors */ |
| 388 | 383 | { |
| 389 | { | |
| 390 | { memory_set_opbase, io_read_byte_8le, io_read_word_8le, io_read_dword_8le, NULL, io_read_qword_8le, NULL, io_write_byte_8le, io_write_word_8le, io_write_dword_8le, NULL, io_write_qword_8le, NULL }, | |
| 391 | { memory_set_opbase, io_read_byte_8be, io_read_word_8be, io_read_dword_8be, NULL, io_read_qword_8be, NULL, io_write_byte_8be, io_write_word_8be, io_write_dword_8be, NULL, io_write_qword_8be, NULL } | |
| 392 | }, | |
| 393 | { | |
| 394 | { memory_set_opbase, io_read_byte_16le, io_read_word_16le, io_read_dword_16le, NULL, io_read_qword_16le, NULL, io_write_byte_16le, io_write_word_16le, io_write_dword_16le, NULL, io_write_qword_16le, NULL }, | |
| 395 | { memory_set_opbase, io_read_byte_16be, io_read_word_16be, io_read_dword_16be, NULL, io_read_qword_16be, NULL, io_write_byte_16be, io_write_word_16be, io_write_dword_16be, NULL, io_write_qword_16be, NULL } | |
| 396 | }, | |
| 397 | { | |
| 398 | { memory_set_opbase, io_read_byte_32le, io_read_word_32le, io_read_dword_32le, io_read_dword_masked_32le, io_read_qword_32le, NULL, io_write_byte_32le, io_write_word_32le, io_write_dword_32le, io_write_dword_masked_32le, io_write_qword_32le, NULL }, | |
| 399 | { memory_set_opbase, io_read_byte_32be, io_read_word_32be, io_read_dword_32be, io_read_dword_masked_32be, io_read_qword_32be, NULL, io_write_byte_32be, io_write_word_32be, io_write_dword_32be, io_write_dword_masked_32be, io_write_qword_32be, NULL } | |
| 400 | }, | |
| 401 | { | |
| 402 | { memory_set_opbase, io_read_byte_64le, io_read_word_64le, io_read_dword_64le, NULL, io_read_qword_64le, io_read_qword_masked_64le, io_write_byte_64le, io_write_word_64le, io_write_dword_64le, NULL, io_write_qword_64le, io_write_qword_masked_64le }, | |
| 403 | { memory_set_opbase, io_read_byte_64be, io_read_word_64be, io_read_dword_64be, NULL, io_read_qword_64be, io_read_qword_masked_64be, io_write_byte_64be, io_write_word_64be, io_write_dword_64be, NULL, io_write_qword_64be, io_write_qword_masked_64be } | |
| 404 | } | |
| 384 | { ACCESSOR_GROUP(io, 8le), ACCESSOR_GROUP(io, 8be) }, | |
| 385 | { ACCESSOR_GROUP(io, 16le), ACCESSOR_GROUP(io, 16be) }, | |
| 386 | { ACCESSOR_GROUP(io, 32le), ACCESSOR_GROUP(io, 32be) }, | |
| 387 | { ACCESSOR_GROUP(io, 64le), ACCESSOR_GROUP(io, 64be) } | |
| 405 | 388 | }, |
| 406 | 389 | }; |
| 407 | 390 | |
| r2454 | r2455 | |
| 2627 | 2610 | } |
| 2628 | 2611 | static READ16_HANDLER( mrh16_unmap_program ) |
| 2629 | 2612 | { |
| 2630 | if (log_unmap[ADDRESS_SPACE_PROGRAM] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped program memory word read from %08X & %04X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_PROGRAM], offset*2), mem_mask | |
| 2613 | if (log_unmap[ADDRESS_SPACE_PROGRAM] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped program memory word read from %08X & %04X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_PROGRAM], offset*2), mem_mask | |
| 2631 | 2614 | return cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_PROGRAM].unmap; |
| 2632 | 2615 | } |
| 2633 | 2616 | static READ32_HANDLER( mrh32_unmap_program ) |
| 2634 | 2617 | { |
| 2635 | if (log_unmap[ADDRESS_SPACE_PROGRAM] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped program memory dword read from %08X & %08X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_PROGRAM], offset*4), mem_mask | |
| 2618 | if (log_unmap[ADDRESS_SPACE_PROGRAM] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped program memory dword read from %08X & %08X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_PROGRAM], offset*4), mem_mask | |
| 2636 | 2619 | return cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_PROGRAM].unmap; |
| 2637 | 2620 | } |
| 2638 | 2621 | static READ64_HANDLER( mrh64_unmap_program ) |
| 2639 | 2622 | { |
| 2640 | if (log_unmap[ADDRESS_SPACE_PROGRAM] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped program memory qword read from %08X & %08X%08X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_PROGRAM], offset*8), (int)(mem_mask >> 32) | |
| 2623 | if (log_unmap[ADDRESS_SPACE_PROGRAM] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped program memory qword read from %08X & %08X%08X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_PROGRAM], offset*8), (int)(mem_mask >> 32) | |
| 2641 | 2624 | return cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_PROGRAM].unmap; |
| 2642 | 2625 | } |
| 2643 | 2626 | |
| r2454 | r2455 | |
| 2647 | 2630 | } |
| 2648 | 2631 | static WRITE16_HANDLER( mwh16_unmap_program ) |
| 2649 | 2632 | { |
| 2650 | if (log_unmap[ADDRESS_SPACE_PROGRAM] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped program memory word write to %08X = %04X & %04X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_PROGRAM], offset*2), data, mem_mask | |
| 2633 | if (log_unmap[ADDRESS_SPACE_PROGRAM] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped program memory word write to %08X = %04X & %04X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_PROGRAM], offset*2), data, mem_mask | |
| 2651 | 2634 | } |
| 2652 | 2635 | static WRITE32_HANDLER( mwh32_unmap_program ) |
| 2653 | 2636 | { |
| 2654 | if (log_unmap[ADDRESS_SPACE_PROGRAM] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped program memory dword write to %08X = %08X & %08X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_PROGRAM], offset*4), data, mem_mask | |
| 2637 | if (log_unmap[ADDRESS_SPACE_PROGRAM] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped program memory dword write to %08X = %08X & %08X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_PROGRAM], offset*4), data, mem_mask | |
| 2655 | 2638 | } |
| 2656 | 2639 | static WRITE64_HANDLER( mwh64_unmap_program ) |
| 2657 | 2640 | { |
| 2658 | if (log_unmap[ADDRESS_SPACE_PROGRAM] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped program memory qword write to %08X = %08X%08X & %08X%08X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_PROGRAM], offset*8), (int)(data >> 32), (int)(data & 0xffffffff), (int)(mem_mask >> 32) | |
| 2641 | if (log_unmap[ADDRESS_SPACE_PROGRAM] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped program memory qword write to %08X = %08X%08X & %08X%08X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_PROGRAM], offset*8), (int)(data >> 32), (int)(data & 0xffffffff), (int)(mem_mask >> 32) | |
| 2659 | 2642 | } |
| 2660 | 2643 | |
| 2661 | 2644 | static READ8_HANDLER( mrh8_unmap_data ) |
| r2454 | r2455 | |
| 2665 | 2648 | } |
| 2666 | 2649 | static READ16_HANDLER( mrh16_unmap_data ) |
| 2667 | 2650 | { |
| 2668 | if (log_unmap[ADDRESS_SPACE_DATA] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped data memory word read from %08X & %04X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_DATA], offset*2), mem_mask | |
| 2651 | if (log_unmap[ADDRESS_SPACE_DATA] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped data memory word read from %08X & %04X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_DATA], offset*2), mem_mask | |
| 2669 | 2652 | return cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_DATA].unmap; |
| 2670 | 2653 | } |
| 2671 | 2654 | static READ32_HANDLER( mrh32_unmap_data ) |
| 2672 | 2655 | { |
| 2673 | if (log_unmap[ADDRESS_SPACE_DATA] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped data memory dword read from %08X & %08X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_DATA], offset*4), mem_mask | |
| 2656 | if (log_unmap[ADDRESS_SPACE_DATA] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped data memory dword read from %08X & %08X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_DATA], offset*4), mem_mask | |
| 2674 | 2657 | return cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_DATA].unmap; |
| 2675 | 2658 | } |
| 2676 | 2659 | static READ64_HANDLER( mrh64_unmap_data ) |
| 2677 | 2660 | { |
| 2678 | if (log_unmap[ADDRESS_SPACE_DATA] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped data memory qword read from %08X & %08X%08X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_DATA], offset*8), (int)(mem_mask >> 32) | |
| 2661 | if (log_unmap[ADDRESS_SPACE_DATA] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped data memory qword read from %08X & %08X%08X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_DATA], offset*8), (int)(mem_mask >> 32) | |
| 2679 | 2662 | return cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_DATA].unmap; |
| 2680 | 2663 | } |
| 2681 | 2664 | |
| r2454 | r2455 | |
| 2685 | 2668 | } |
| 2686 | 2669 | static WRITE16_HANDLER( mwh16_unmap_data ) |
| 2687 | 2670 | { |
| 2688 | if (log_unmap[ADDRESS_SPACE_DATA] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped data memory word write to %08X = %04X & %04X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_DATA], offset*2), data, mem_mask | |
| 2671 | if (log_unmap[ADDRESS_SPACE_DATA] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped data memory word write to %08X = %04X & %04X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_DATA], offset*2), data, mem_mask | |
| 2689 | 2672 | } |
| 2690 | 2673 | static WRITE32_HANDLER( mwh32_unmap_data ) |
| 2691 | 2674 | { |
| 2692 | if (log_unmap[ADDRESS_SPACE_DATA] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped data memory dword write to %08X = %08X & %08X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_DATA], offset*4), data, mem_mask | |
| 2675 | if (log_unmap[ADDRESS_SPACE_DATA] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped data memory dword write to %08X = %08X & %08X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_DATA], offset*4), data, mem_mask | |
| 2693 | 2676 | } |
| 2694 | 2677 | static WRITE64_HANDLER( mwh64_unmap_data ) |
| 2695 | 2678 | { |
| 2696 | if (log_unmap[ADDRESS_SPACE_DATA] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped data memory qword write to %08X = %08X%08X & %08X%08X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_DATA], offset*8), (int)(data >> 32), (int)(data & 0xffffffff), (int)(mem_mask >> 32) | |
| 2679 | if (log_unmap[ADDRESS_SPACE_DATA] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped data memory qword write to %08X = %08X%08X & %08X%08X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_DATA], offset*8), (int)(data >> 32), (int)(data & 0xffffffff), (int)(mem_mask >> 32) | |
| 2697 | 2680 | } |
| 2698 | 2681 | |
| 2699 | 2682 | static READ8_HANDLER( mrh8_unmap_io ) |
| r2454 | r2455 | |
| 2703 | 2686 | } |
| 2704 | 2687 | static READ16_HANDLER( mrh16_unmap_io ) |
| 2705 | 2688 | { |
| 2706 | if (log_unmap[ADDRESS_SPACE_IO] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped I/O word read from %08X & %04X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_IO], offset*2), mem_mask | |
| 2689 | if (log_unmap[ADDRESS_SPACE_IO] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped I/O word read from %08X & %04X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_IO], offset*2), mem_mask | |
| 2707 | 2690 | return cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_IO].unmap; |
| 2708 | 2691 | } |
| 2709 | 2692 | static READ32_HANDLER( mrh32_unmap_io ) |
| 2710 | 2693 | { |
| 2711 | if (log_unmap[ADDRESS_SPACE_IO] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped I/O dword read from %08X & %08X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_IO], offset*4), mem_mask | |
| 2694 | if (log_unmap[ADDRESS_SPACE_IO] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped I/O dword read from %08X & %08X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_IO], offset*4), mem_mask | |
| 2712 | 2695 | return cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_IO].unmap; |
| 2713 | 2696 | } |
| 2714 | 2697 | static READ64_HANDLER( mrh64_unmap_io ) |
| 2715 | 2698 | { |
| 2716 | if (log_unmap[ADDRESS_SPACE_IO] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped I/O qword read from %08X & %08X%08X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_IO], offset*8), (int)(mem_mask >> 32) | |
| 2699 | if (log_unmap[ADDRESS_SPACE_IO] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped I/O qword read from %08X & %08X%08X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_IO], offset*8), (int)(mem_mask >> 32) | |
| 2717 | 2700 | return cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_IO].unmap; |
| 2718 | 2701 | } |
| 2719 | 2702 | |
| r2454 | r2455 | |
| 2723 | 2706 | } |
| 2724 | 2707 | static WRITE16_HANDLER( mwh16_unmap_io ) |
| 2725 | 2708 | { |
| 2726 | if (log_unmap[ADDRESS_SPACE_IO] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped I/O word write to %08X = %04X & %04X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_IO], offset*2), data, mem_mask | |
| 2709 | if (log_unmap[ADDRESS_SPACE_IO] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped I/O word write to %08X = %04X & %04X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_IO], offset*2), data, mem_mask | |
| 2727 | 2710 | } |
| 2728 | 2711 | static WRITE32_HANDLER( mwh32_unmap_io ) |
| 2729 | 2712 | { |
| 2730 | if (log_unmap[ADDRESS_SPACE_IO] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped I/O dword write to %08X = %08X & %08X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_IO], offset*4), data, mem_mask | |
| 2713 | if (log_unmap[ADDRESS_SPACE_IO] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped I/O dword write to %08X = %08X & %08X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_IO], offset*4), data, mem_mask | |
| 2731 | 2714 | } |
| 2732 | 2715 | static WRITE64_HANDLER( mwh64_unmap_io ) |
| 2733 | 2716 | { |
| 2734 | if (log_unmap[ADDRESS_SPACE_IO] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped I/O qword write to %08X = %08X%08X & %08X%08X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_IO], offset*8), (int)(data >> 32), (int)(data & 0xffffffff), (int)(mem_mask >> 32) | |
| 2717 | if (log_unmap[ADDRESS_SPACE_IO] && !debugger_access) logerror("cpu #%d (PC=%08X): unmapped I/O qword write to %08X = %08X%08X & %08X%08X\n", cpu_getactivecpu(), activecpu_get_pc(), BYTE2ADDR(&cpudata[cpu_getactivecpu()].space[ADDRESS_SPACE_IO], offset*8), (int)(data >> 32), (int)(data & 0xffffffff), (int)(mem_mask >> 32) | |
| 2735 | 2718 | } |
| 2736 | 2719 | |
| 2737 | 2720 | |
| r2454 | r2455 | |
| 3032 | 3015 | while (subunits-- != 0) |
| 3033 | 3016 | { |
| 3034 | 3017 | int shift = *subshift++; |
| 3035 | if ((UINT8)(mem_mask >> shift) != 0 | |
| 3018 | if ((UINT8)(mem_mask >> shift) != 0 | |
| 3036 | 3019 | result |= (*handler->subhandler.read.mhandler8)(handler->subobject, offset) << shift; |
| 3037 | 3020 | offset++; |
| 3038 | 3021 | } |
| r2454 | r2455 | |
| 3056 | 3039 | while (subunits-- != 0) |
| 3057 | 3040 | { |
| 3058 | 3041 | int shift = *subshift++; |
| 3059 | if ((UINT8)(mem_mask >> shift) != 0 | |
| 3042 | if ((UINT8)(mem_mask >> shift) != 0 | |
| 3060 | 3043 | result |= (*handler->subhandler.read.mhandler8)(handler->subobject, offset) << shift; |
| 3061 | 3044 | offset++; |
| 3062 | 3045 | } |
| r2454 | r2455 | |
| 3080 | 3063 | while (subunits-- != 0) |
| 3081 | 3064 | { |
| 3082 | 3065 | int shift = *subshift++; |
| 3083 | if ((UINT8)(mem_mask >> shift) != 0 | |
| 3066 | if ((UINT8)(mem_mask >> shift) != 0 | |
| 3084 | 3067 | result |= (UINT64)(*handler->subhandler.read.mhandler8)(handler->subobject, offset) << shift; |
| 3085 | 3068 | offset++; |
| 3086 | 3069 | } |
| r2454 | r2455 | |
| 3104 | 3087 | while (subunits-- != 0) |
| 3105 | 3088 | { |
| 3106 | 3089 | int shift = *subshift++; |
| 3107 | if ((UINT16)(mem_mask >> shift) != 0 | |
| 3090 | if ((UINT16)(mem_mask >> shift) != 0 | |
| 3108 | 3091 | result |= (*handler->subhandler.read.mhandler16)(handler->subobject, offset, mem_mask >> shift) << shift; |
| 3109 | 3092 | offset++; |
| 3110 | 3093 | } |
| r2454 | r2455 | |
| 3128 | 3111 | while (subunits-- != 0) |
| 3129 | 3112 | { |
| 3130 | 3113 | int shift = *subshift++; |
| 3131 | if ((UINT16)(mem_mask >> shift) != 0 | |
| 3114 | if ((UINT16)(mem_mask >> shift) != 0 | |
| 3132 | 3115 | result |= (UINT64)(*handler->subhandler.read.mhandler16)(handler->subobject, offset, mem_mask >> shift) << shift; |
| 3133 | 3116 | offset++; |
| 3134 | 3117 | } |
| r2454 | r2455 | |
| 3152 | 3135 | while (subunits-- != 0) |
| 3153 | 3136 | { |
| 3154 | 3137 | int shift = *subshift++; |
| 3155 | if ((UINT32)(mem_mask >> shift) != 0 | |
| 3138 | if ((UINT32)(mem_mask >> shift) != 0 | |
| 3156 | 3139 | result |= (UINT64)(*handler->subhandler.read.mhandler32)(handler->subobject, offset, mem_mask >> shift) << shift; |
| 3157 | 3140 | offset++; |
| 3158 | 3141 | } |
| r2454 | r2455 | |
| 3180 | 3163 | while (subunits-- != 0) |
| 3181 | 3164 | { |
| 3182 | 3165 | int shift = *subshift++; |
| 3183 | if ((UINT8)(mem_mask >> shift) != 0 | |
| 3166 | if ((UINT8)(mem_mask >> shift) != 0 | |
| 3184 | 3167 | (*handler->subhandler.write.mhandler8)(handler->subobject, offset, data >> shift); |
| 3185 | 3168 | offset++; |
| 3186 | 3169 | } |
| r2454 | r2455 | |
| 3224 | 3207 | while (subunits-- != 0) |
| 3225 | 3208 | { |
| 3226 | 3209 | int shift = *subshift++; |
| 3227 | if ((UINT8)(mem_mask >> shift) != 0 | |
| 3210 | if ((UINT8)(mem_mask >> shift) != 0 | |
| 3228 | 3211 | (*handler->subhandler.write.mhandler8)(handler->subobject, offset, data >> shift); |
| 3229 | 3212 | offset++; |
| 3230 | 3213 | } |
| r2454 | r2455 | |
| 3246 | 3229 | while (subunits-- != 0) |
| 3247 | 3230 | { |
| 3248 | 3231 | int shift = *subshift++; |
| 3249 | if ((UINT16)(mem_mask >> shift) != 0 | |
| 3232 | if ((UINT16)(mem_mask >> shift) != 0 | |
| 3250 | 3233 | (*handler->subhandler.write.mhandler16)(handler->subobject, offset, data >> shift, mem_mask >> shift); |
| 3251 | 3234 | offset++; |
| 3252 | 3235 | } |
| r2454 | r2455 | |
| 3268 | 3251 | while (subunits-- != 0) |
| 3269 | 3252 | { |
| 3270 | 3253 | int shift = *subshift++; |
| 3271 | if ((UINT16)(mem_mask >> shift) != 0 | |
| 3254 | if ((UINT16)(mem_mask >> shift) != 0 | |
| 3272 | 3255 | (*handler->subhandler.write.mhandler16)(handler->subobject, offset, data >> shift, mem_mask >> shift); |
| 3273 | 3256 | offset++; |
| 3274 | 3257 | } |
| r2454 | r2455 | |
| 3290 | 3273 | while (subunits-- != 0) |
| 3291 | 3274 | { |
| 3292 | 3275 | int shift = *subshift++; |
| 3293 | if ((UINT32)(mem_mask >> shift) != 0 | |
| 3276 | if ((UINT32)(mem_mask >> shift) != 0 | |
| 3294 | 3277 | (*handler->subhandler.write.mhandler32)(handler->subobject, offset, data >> shift, mem_mask >> shift); |
| 3295 | 3278 | offset++; |
| 3296 | 3279 | } |
| r2454 | r2455 | |
| 3463 | 3446 | return result | (program_read_byte_8le(address + 1) << 8); |
| 3464 | 3447 | } |
| 3465 | 3448 | |
| 3449 | UINT16 program_read_word_masked_8le(offs_t address, UINT16 mask) | |
| 3450 | { | |
| 3451 | UINT16 result = 0; | |
| 3452 | if (mask & 0x00ff) result |= program_read_byte_8le(address + 0) << 0; | |
| 3453 | if (mask & 0xff00) result |= program_read_byte_8le(address + 1) << 8; | |
| 3454 | return result; | |
| 3455 | } | |
| 3456 | ||
| 3466 | 3457 | UINT16 program_read_word_8be(offs_t address) |
| 3467 | 3458 | { |
| 3468 | 3459 | UINT16 result = program_read_byte_8be(address + 0) << 8; |
| 3469 | 3460 | return result | (program_read_byte_8be(address + 1) << 0); |
| 3470 | 3461 | } |
| 3471 | 3462 | |
| 3463 | UINT16 program_read_word_masked_8be(offs_t address, UINT16 mask) | |
| 3464 | { | |
| 3465 | UINT16 result = 0; | |
| 3466 | if (mask & 0xff00) result |= program_read_byte_8be(address + 0) << 8; | |
| 3467 | if (mask & 0x00ff) result |= program_read_byte_8be(address + 1) << 0; | |
| 3468 | return result; | |
| 3469 | } | |
| 3470 | ||
| 3472 | 3471 | UINT32 program_read_dword_8le(offs_t address) |
| 3473 | 3472 | { |
| 3474 | 3473 | UINT32 result = program_read_word_8le(address + 0) << 0; |
| 3475 | 3474 | return result | (program_read_word_8le(address + 2) << 16); |
| 3476 | 3475 | } |
| 3477 | 3476 | |
| 3477 | UINT32 program_read_dword_masked_8le(offs_t address, UINT32 mask) | |
| 3478 | { | |
| 3479 | UINT32 result = 0; | |
| 3480 | if (mask & 0x0000ffff) result |= program_read_word_masked_8le(address + 0, mask >> 0) << 0; | |
| 3481 | if (mask & 0xffff0000) result |= program_read_word_masked_8le(address + 2, mask >> 16) << 16; | |
| 3482 | return result; | |
| 3483 | } | |
| 3484 | ||
| 3478 | 3485 | UINT32 program_read_dword_8be(offs_t address) |
| 3479 | 3486 | { |
| 3480 | 3487 | UINT32 result = program_read_word_8be(address + 0) << 16; |
| 3481 | 3488 | return result | (program_read_word_8be(address + 2) << 0); |
| 3482 | 3489 | } |
| 3483 | 3490 | |
| 3491 | UINT32 program_read_dword_masked_8be(offs_t address, UINT32 mask) | |
| 3492 | { | |
| 3493 | UINT32 result = 0; | |
| 3494 | if (mask & 0xffff0000) result |= program_read_word_masked_8be(address + 0, mask >> 16) << 16; | |
| 3495 | if (mask & 0x0000ffff) result |= program_read_word_masked_8be(address + 2, mask >> 0) << 0; | |
| 3496 | return result; | |
| 3497 | } | |
| 3498 | ||
| 3484 | 3499 | UINT64 program_read_qword_8le(offs_t address) |
| 3485 | 3500 | { |
| 3486 | 3501 | UINT64 result = (UINT64)program_read_dword_8le(address + 0) << 0; |
| 3487 | 3502 | return result | ((UINT64)program_read_dword_8le(address + 4) << 32); |
| 3488 | 3503 | } |
| 3489 | 3504 | |
| 3505 | UINT64 program_read_qword_masked_8le(offs_t address, UINT64 mask) | |
| 3506 | { | |
| 3507 | UINT64 result = 0; | |
| 3508 | if (mask & U64(0x00000000ffffffff)) result |= (UINT64)program_read_dword_masked_8le(address + 0, mask >> 0) << 0; | |
| 3509 | if (mask & U64(0xffffffff00000000)) result |= (UINT64)program_read_dword_masked_8le(address + 4, mask >> 32) << 32; | |
| 3510 | return result; | |
| 3511 | } | |
| 3512 | ||
| 3490 | 3513 | UINT64 program_read_qword_8be(offs_t address) |
| 3491 | 3514 | { |
| 3492 | 3515 | UINT64 result = (UINT64)program_read_dword_8le(address + 0) << 32; |
| 3493 | 3516 | return result | ((UINT64)program_read_dword_8le(address + 4) << 0); |
| 3494 | 3517 | } |
| 3495 | 3518 | |
| 3519 | UINT64 program_read_qword_masked_8be(offs_t address, UINT64 mask) | |
| 3520 | { | |
| 3521 | UINT64 result = 0; | |
| 3522 | if (mask & U64(0xffffffff00000000)) result |= (UINT64)program_read_dword_masked_8be(address + 0, mask >> 32) << 32; | |
| 3523 | if (mask & U64(0x00000000ffffffff)) result |= (UINT64)program_read_dword_masked_8be(address + 4, mask >> 0) << 0; | |
| 3524 | return result; | |
| 3525 | } | |
| 3496 | 3526 | |
| 3527 | ||
| 3497 | 3528 | /*------------------------------------------------- |
| 3498 | 3529 | ADDRESS_SPACE_DATA |
| 3499 | 3530 | -------------------------------------------------*/ |
| r2454 | r2455 | |
| 3514 | 3545 | return result | (data_read_byte_8le(address + 1) << 8); |
| 3515 | 3546 | } |
| 3516 | 3547 | |
| 3548 | UINT16 data_read_word_masked_8le(offs_t address, UINT16 mask) | |
| 3549 | { | |
| 3550 | UINT16 result = 0; | |
| 3551 | if (mask & 0x00ff) result |= data_read_byte_8le(address + 0) << 0; | |
| 3552 | if (mask & 0xff00) result |= data_read_byte_8le(address + 1) << 8; | |
| 3553 | return result; | |
| 3554 | } | |
| 3555 | ||
| 3517 | 3556 | UINT16 data_read_word_8be(offs_t address) |
| 3518 | 3557 | { |
| 3519 | 3558 | UINT16 result = data_read_byte_8be(address + 0) << 8; |
| 3520 | 3559 | return result | (data_read_byte_8be(address + 1) << 0); |
| 3521 | 3560 | } |
| 3522 | 3561 | |
| 3562 | UINT16 data_read_word_masked_8be(offs_t address, UINT16 mask) | |
| 3563 | { | |
| 3564 | UINT16 result = 0; | |
| 3565 | if (mask & 0xff00) result |= data_read_byte_8be(address + 0) << 8; | |
| 3566 | if (mask & 0x00ff) result |= data_read_byte_8be(address + 1) << 0; | |
| 3567 | return result; | |
| 3568 | } | |
| 3569 | ||
| 3523 | 3570 | UINT32 data_read_dword_8le(offs_t address) |
| 3524 | 3571 | { |
| 3525 | 3572 | UINT32 result = data_read_word_8le(address + 0) << 0; |
| 3526 | 3573 | return result | (data_read_word_8le(address + 2) << 16); |
| 3527 | 3574 | } |
| 3528 | 3575 | |
| 3576 | UINT32 data_read_dword_masked_8le(offs_t address, UINT32 mask) | |
| 3577 | { | |
| 3578 | UINT32 result = 0; | |
| 3579 | if (mask & 0x0000ffff) result |= data_read_word_masked_8le(address + 0, mask >> 0) << 0; | |
| 3580 | if (mask & 0xffff0000) result |= data_read_word_masked_8le(address + 2, mask >> 16) << 16; | |
| 3581 | return result; | |
| 3582 | } | |
| 3583 | ||
| 3529 | 3584 | UINT32 data_read_dword_8be(offs_t address) |
| 3530 | 3585 | { |
| 3531 | 3586 | UINT32 result = data_read_word_8be(address + 0) << 16; |
| 3532 | 3587 | return result | (data_read_word_8be(address + 2) << 0); |
| 3533 | 3588 | } |
| 3534 | 3589 | |
| 3590 | UINT32 data_read_dword_masked_8be(offs_t address, UINT32 mask) | |
| 3591 | { | |
| 3592 | UINT32 result = 0; | |
| 3593 | if (mask & 0xffff0000) result |= data_read_word_masked_8be(address + 0, mask >> 16) << 16; | |
| 3594 | if (mask & 0x0000ffff) result |= data_read_word_masked_8be(address + 2, mask >> 0) << 0; | |
| 3595 | return result; | |
| 3596 | } | |
| 3597 | ||
| 3535 | 3598 | UINT64 data_read_qword_8le(offs_t address) |
| 3536 | 3599 | { |
| 3537 | 3600 | UINT64 result = (UINT64)data_read_dword_8le(address + 0) << 0; |
| 3538 | 3601 | return result | ((UINT64)data_read_dword_8le(address + 4) << 32); |
| 3539 | 3602 | } |
| 3540 | 3603 | |
| 3604 | UINT64 data_read_qword_masked_8le(offs_t address, UINT64 mask) | |
| 3605 | { | |
| 3606 | UINT64 result = 0; | |
| 3607 | if (mask & U64(0x00000000ffffffff)) result |= (UINT64)data_read_dword_masked_8le(address + 0, mask >> 0) << 0; | |
| 3608 | if (mask & U64(0xffffffff00000000)) result |= (UINT64)data_read_dword_masked_8le(address + 4, mask >> 32) << 32; | |
| 3609 | return result; | |
| 3610 | } | |
| 3611 | ||
| 3541 | 3612 | UINT64 data_read_qword_8be(offs_t address) |
| 3542 | 3613 | { |
| 3543 | 3614 | UINT64 result = (UINT64)data_read_dword_8le(address + 0) << 32; |
| 3544 | 3615 | return result | ((UINT64)data_read_dword_8le(address + 4) << 0); |
| 3545 | 3616 | } |
| 3546 | 3617 | |
| 3618 | UINT64 data_read_qword_masked_8be(offs_t address, UINT64 mask) | |
| 3619 | { | |
| 3620 | UINT64 result = 0; | |
| 3621 | if (mask & U64(0xffffffff00000000)) result |= (UINT64)data_read_dword_masked_8be(address + 0, mask >> 32) << 32; | |
| 3622 | if (mask & U64(0x00000000ffffffff)) result |= (UINT64)data_read_dword_masked_8be(address + 4, mask >> 0) << 0; | |
| 3623 | return result; | |
| 3624 | } | |
| 3547 | 3625 | |
| 3626 | ||
| 3548 | 3627 | /*------------------------------------------------- |
| 3549 | 3628 | ADDRESS_SPACE_IO |
| 3550 | 3629 | -------------------------------------------------*/ |
| r2454 | r2455 | |
| 3565 | 3644 | return result | (io_read_byte_8le(address + 1) << 8); |
| 3566 | 3645 | } |
| 3567 | 3646 | |
| 3647 | UINT16 io_read_word_masked_8le(offs_t address, UINT16 mask) | |
| 3648 | { | |
| 3649 | UINT16 result = 0; | |
| 3650 | if (mask & 0x00ff) result |= io_read_byte_8le(address + 0) << 0; | |
| 3651 | if (mask & 0xff00) result |= io_read_byte_8le(address + 1) << 8; | |
| 3652 | return result; | |
| 3653 | } | |
| 3654 | ||
| 3568 | 3655 | UINT16 io_read_word_8be(offs_t address) |
| 3569 | 3656 | { |
| 3570 | 3657 | UINT16 result = io_read_byte_8be(address + 0) << 8; |
| 3571 | 3658 | return result | (io_read_byte_8be(address + 1) << 0); |
| 3572 | 3659 | } |
| 3573 | 3660 | |
| 3661 | UINT16 io_read_word_masked_8be(offs_t address, UINT16 mask) | |
| 3662 | { | |
| 3663 | UINT16 result = 0; | |
| 3664 | if (mask & 0xff00) result |= io_read_byte_8be(address + 0) << 8; | |
| 3665 | if (mask & 0x00ff) result |= io_read_byte_8be(address + 1) << 0; | |
| 3666 | return result; | |
| 3667 | } | |
| 3668 | ||
| 3574 | 3669 | UINT32 io_read_dword_8le(offs_t address) |
| 3575 | 3670 | { |
| 3576 | 3671 | UINT32 result = io_read_word_8le(address + 0) << 0; |
| 3577 | 3672 | return result | (io_read_word_8le(address + 2) << 16); |
| 3578 | 3673 | } |
| 3579 | 3674 | |
| 3675 | UINT32 io_read_dword_masked_8le(offs_t address, UINT32 mask) | |
| 3676 | { | |
| 3677 | UINT32 result = 0; | |
| 3678 | if (mask & 0x0000ffff) result |= io_read_word_masked_8le(address + 0, mask >> 0) << 0; | |
| 3679 | if (mask & 0xffff0000) result |= io_read_word_masked_8le(address + 2, mask >> 16) << 16; | |
| 3680 | return result; | |
| 3681 | } | |
| 3682 | ||
| 3580 | 3683 | UINT32 io_read_dword_8be(offs_t address) |
| 3581 | 3684 | { |
| 3582 | 3685 | UINT32 result = io_read_word_8be(address + 0) << 16; |
| 3583 | 3686 | return result | (io_read_word_8be(address + 2) << 0); |
| 3584 | 3687 | } |
| 3585 | 3688 | |
| 3689 | UINT32 io_read_dword_masked_8be(offs_t address, UINT32 mask) | |
| 3690 | { | |
| 3691 | UINT32 result = 0; | |
| 3692 | if (mask & 0xffff0000) result |= io_read_word_masked_8be(address + 0, mask >> 16) << 16; | |
| 3693 | if (mask & 0x0000ffff) result |= io_read_word_masked_8be(address + 2, mask >> 0) << 0; | |
| 3694 | return result; | |
| 3695 | } | |
| 3696 | ||
| 3586 | 3697 | UINT64 io_read_qword_8le(offs_t address) |
| 3587 | 3698 | { |
| 3588 | 3699 | UINT64 result = (UINT64)io_read_dword_8le(address + 0) << 0; |
| 3589 | 3700 | return result | ((UINT64)io_read_dword_8le(address + 4) << 32); |
| 3590 | 3701 | } |
| 3591 | 3702 | |
| 3703 | UINT64 io_read_qword_masked_8le(offs_t address, UINT64 mask) | |
| 3704 | { | |
| 3705 | UINT64 result = 0; | |
| 3706 | if (mask & U64(0x00000000ffffffff)) result |= (UINT64)io_read_dword_masked_8le(address + 0, mask >> 0) << 0; | |
| 3707 | if (mask & U64(0xffffffff00000000)) result |= (UINT64)io_read_dword_masked_8le(address + 4, mask >> 32) << 32; | |
| 3708 | return result; | |
| 3709 | } | |
| 3710 | ||
| 3592 | 3711 | UINT64 io_read_qword_8be(offs_t address) |
| 3593 | 3712 | { |
| 3594 | 3713 | UINT64 result = (UINT64)io_read_dword_8le(address + 0) << 32; |
| 3595 | 3714 | return result | ((UINT64)io_read_dword_8le(address + 4) << 0); |
| 3596 | 3715 | } |
| 3597 | 3716 | |
| 3717 | UINT64 io_read_qword_masked_8be(offs_t address, UINT64 mask) | |
| 3718 | { | |
| 3719 | UINT64 result = 0; | |
| 3720 | if (mask & U64(0xffffffff00000000)) result |= (UINT64)io_read_dword_masked_8be(address + 0, mask >> 32) << 32; | |
| 3721 | if (mask & U64(0x00000000ffffffff)) result |= (UINT64)io_read_dword_masked_8be(address + 4, mask >> 0) << 0; | |
| 3722 | return result; | |
| 3723 | } | |
| 3598 | 3724 | |
| 3599 | 3725 | |
| 3726 | ||
| 3600 | 3727 | /*************************************************************************** |
| 3601 | 3728 | 8-BIT WRITE HANDLERS |
| 3602 | 3729 | ***************************************************************************/ |
| r2454 | r2455 | |
| 3651 | 3778 | program_write_byte_8le(address + 1, data >> 8); |
| 3652 | 3779 | } |
| 3653 | 3780 | |
| 3781 | void program_write_word_masked_8le(offs_t address, UINT16 data, UINT16 mask) | |
| 3782 | { | |
| 3783 | if (mask & 0x00ff) program_write_byte_8le(address + 0, data >> 0); | |
| 3784 | if (mask & 0xff00) program_write_byte_8le(address + 1, data >> 8); | |
| 3785 | } | |
| 3786 | ||
| 3654 | 3787 | void program_write_word_8be(offs_t address, UINT16 data) |
| 3655 | 3788 | { |
| 3656 | 3789 | program_write_byte_8be(address + 0, data >> 8); |
| 3657 | 3790 | program_write_byte_8be(address + 1, data >> 0); |
| 3658 | 3791 | } |
| 3659 | 3792 | |
| 3793 | void program_write_word_masked_8be(offs_t address, UINT16 data, UINT16 mask) | |
| 3794 | { | |
| 3795 | if (mask & 0xff00) program_write_byte_8be(address + 0, data >> 8); | |
| 3796 | if (mask & 0x00ff) program_write_byte_8be(address + 1, data >> 0); | |
| 3797 | } | |
| 3798 | ||
| 3660 | 3799 | void program_write_dword_8le(offs_t address, UINT32 data) |
| 3661 | 3800 | { |
| 3662 | 3801 | program_write_word_8le(address + 0, data >> 0); |
| 3663 | 3802 | program_write_word_8le(address + 2, data >> 16); |
| 3664 | 3803 | } |
| 3665 | 3804 | |
| 3805 | void program_write_dword_masked_8le(offs_t address, UINT32 data, UINT32 mask) | |
| 3806 | { | |
| 3807 | if (mask & 0x0000ffff) program_write_word_masked_8le(address + 0, data >> 0, mask >> 0); | |
| 3808 | if (mask & 0xffff0000) program_write_word_masked_8le(address + 2, data >> 16, mask >> 16); | |
| 3809 | } | |
| 3810 | ||
| 3666 | 3811 | void program_write_dword_8be(offs_t address, UINT32 data) |
| 3667 | 3812 | { |
| 3668 | 3813 | program_write_word_8be(address + 0, data >> 16); |
| 3669 | 3814 | program_write_word_8be(address + 2, data >> 0); |
| 3670 | 3815 | } |
| 3671 | 3816 | |
| 3817 | void program_write_dword_masked_8be(offs_t address, UINT32 data, UINT32 mask) | |
| 3818 | { | |
| 3819 | if (mask & 0xffff0000) program_write_word_masked_8be(address + 0, data >> 16, mask >> 16); | |
| 3820 | if (mask & 0x0000ffff) program_write_word_masked_8be(address + 2, data >> 0, mask >> 0); | |
| 3821 | } | |
| 3822 | ||
| 3672 | 3823 | void program_write_qword_8le(offs_t address, UINT64 data) |
| 3673 | 3824 | { |
| 3674 | 3825 | program_write_dword_8le(address + 0, data >> 0); |
| 3675 | 3826 | program_write_dword_8le(address + 4, data >> 32); |
| 3676 | 3827 | } |
| 3677 | 3828 | |
| 3829 | void program_write_qword_masked_8le(offs_t address, UINT64 data, UINT64 mask) | |
| 3830 | { | |
| 3831 | if (mask & U64(0x00000000ffffffff)) program_write_dword_masked_8le(address + 0, data >> 0, mask >> 0); | |
| 3832 | if (mask & U64(0xffffffff00000000)) program_write_dword_masked_8le(address + 4, data >> 32, mask >> 32); | |
| 3833 | } | |
| 3834 | ||
| 3678 | 3835 | void program_write_qword_8be(offs_t address, UINT64 data) |
| 3679 | 3836 | { |
| 3680 | 3837 | program_write_dword_8be(address + 0, data >> 32); |
| 3681 | 3838 | program_write_dword_8be(address + 4, data >> 0); |
| 3682 | 3839 | } |
| 3683 | 3840 | |
| 3841 | void program_write_qword_masked_8be(offs_t address, UINT64 data, UINT64 mask) | |
| 3842 | { | |
| 3843 | if (mask & U64(0xffffffff00000000)) program_write_dword_masked_8be(address + 0, data >> 32, mask >> 32); | |
| 3844 | if (mask & U64(0x00000000ffffffff)) program_write_dword_masked_8be(address + 4, data >> 0, mask >> 0); | |
| 3845 | } | |
| 3684 | 3846 | |
| 3847 | ||
| 3685 | 3848 | /*------------------------------------------------- |
| 3686 | 3849 | ADDRESS_SPACE_DATA |
| 3687 | 3850 | -------------------------------------------------*/ |
| r2454 | r2455 | |
| 3702 | 3865 | data_write_byte_8le(address + 1, data >> 8); |
| 3703 | 3866 | } |
| 3704 | 3867 | |
| 3868 | void data_write_word_masked_8le(offs_t address, UINT16 data, UINT16 mask) | |
| 3869 | { | |
| 3870 | if (mask & 0x00ff) data_write_byte_8le(address + 0, data >> 0); | |
| 3871 | if (mask & 0xff00) data_write_byte_8le(address + 1, data >> 8); | |
| 3872 | } | |
| 3873 | ||
| 3705 | 3874 | void data_write_word_8be(offs_t address, UINT16 data) |
| 3706 | 3875 | { |
| 3707 | 3876 | data_write_byte_8be(address + 0, data >> 8); |
| 3708 | 3877 | data_write_byte_8be(address + 1, data >> 0); |
| 3709 | 3878 | } |
| 3710 | 3879 | |
| 3880 | void data_write_word_masked_8be(offs_t address, UINT16 data, UINT16 mask) | |
| 3881 | { | |
| 3882 | if (mask & 0xff00) data_write_byte_8be(address + 0, data >> 8); | |
| 3883 | if (mask & 0x00ff) data_write_byte_8be(address + 1, data >> 0); | |
| 3884 | } | |
| 3885 | ||
| 3711 | 3886 | void data_write_dword_8le(offs_t address, UINT32 data) |
| 3712 | 3887 | { |
| 3713 | 3888 | data_write_word_8le(address + 0, data >> 0); |
| 3714 | 3889 | data_write_word_8le(address + 2, data >> 16); |
| 3715 | 3890 | } |
| 3716 | 3891 | |
| 3892 | void data_write_dword_masked_8le(offs_t address, UINT32 data, UINT32 mask) | |
| 3893 | { | |
| 3894 | if (mask & 0x0000ffff) data_write_word_masked_8le(address + 0, data >> 0, mask >> 0); | |
| 3895 | if (mask & 0xffff0000) data_write_word_masked_8le(address + 2, data >> 16, mask >> 16); | |
| 3896 | } | |
| 3897 | ||
| 3717 | 3898 | void data_write_dword_8be(offs_t address, UINT32 data) |
| 3718 | 3899 | { |
| 3719 | 3900 | data_write_word_8be(address + 0, data >> 16); |
| 3720 | 3901 | data_write_word_8be(address + 2, data >> 0); |
| 3721 | 3902 | } |
| 3722 | 3903 | |
| 3904 | void data_write_dword_masked_8be(offs_t address, UINT32 data, UINT32 mask) | |
| 3905 | { | |
| 3906 | if (mask & 0xffff0000) data_write_word_masked_8be(address + 0, data >> 16, mask >> 16); | |
| 3907 | if (mask & 0x0000ffff) data_write_word_masked_8be(address + 2, data >> 0, mask >> 0); | |
| 3908 | } | |
| 3909 | ||
| 3723 | 3910 | void data_write_qword_8le(offs_t address, UINT64 data) |
| 3724 | 3911 | { |
| 3725 | 3912 | data_write_dword_8le(address + 0, data >> 0); |
| 3726 | 3913 | data_write_dword_8le(address + 4, data >> 32); |
| 3727 | 3914 | } |
| 3728 | 3915 | |
| 3916 | void data_write_qword_masked_8le(offs_t address, UINT64 data, UINT64 mask) | |
| 3917 | { | |
| 3918 | if (mask & U64(0x00000000ffffffff)) data_write_dword_masked_8le(address + 0, data >> 0, mask >> 0); | |
| 3919 | if (mask & U64(0xffffffff00000000)) data_write_dword_masked_8le(address + 4, data >> 32, mask >> 32); | |
| 3920 | } | |
| 3921 | ||
| 3729 | 3922 | void data_write_qword_8be(offs_t address, UINT64 data) |
| 3730 | 3923 | { |
| 3731 | 3924 | data_write_dword_8be(address + 0, data >> 32); |
| 3732 | 3925 | data_write_dword_8be(address + 4, data >> 0); |
| 3733 | 3926 | } |
| 3734 | 3927 | |
| 3928 | void data_write_qword_masked_8be(offs_t address, UINT64 data, UINT64 mask) | |
| 3929 | { | |
| 3930 | if (mask & U64(0xffffffff00000000)) data_write_dword_masked_8be(address + 0, data >> 32, mask >> 32); | |
| 3931 | if (mask & U64(0x00000000ffffffff)) data_write_dword_masked_8be(address + 4, data >> 0, mask >> 0); | |
| 3932 | } | |
| 3735 | 3933 | |
| 3934 | ||
| 3736 | 3935 | /*------------------------------------------------- |
| 3737 | 3936 | ADDRESS_SPACE_IO |
| 3738 | 3937 | -------------------------------------------------*/ |
| r2454 | r2455 | |
| 3753 | 3952 | io_write_byte_8le(address + 1, data >> 8); |
| 3754 | 3953 | } |
| 3755 | 3954 | |
| 3955 | void io_write_word_masked_8le(offs_t address, UINT16 data, UINT16 mask) | |
| 3956 | { | |
| 3957 | if (mask & 0x00ff) io_write_byte_8le(address + 0, data >> 0); | |
| 3958 | if (mask & 0xff00) io_write_byte_8le(address + 1, data >> 8); | |
| 3959 | } | |
| 3960 | ||
| 3756 | 3961 | void io_write_word_8be(offs_t address, UINT16 data) |
| 3757 | 3962 | { |
| 3758 | 3963 | io_write_byte_8be(address + 0, data >> 8); |
| 3759 | 3964 | io_write_byte_8be(address + 1, data >> 0); |
| 3760 | 3965 | } |
| 3761 | 3966 | |
| 3967 | void io_write_word_masked_8be(offs_t address, UINT16 data, UINT16 mask) | |
| 3968 | { | |
| 3969 | if (mask & 0xff00) io_write_byte_8be(address + 0, data >> 8); | |
| 3970 | if (mask & 0x00ff) io_write_byte_8be(address + 1, data >> 0); | |
| 3971 | } | |
| 3972 | ||
| 3762 | 3973 | void io_write_dword_8le(offs_t address, UINT32 data) |
| 3763 | 3974 | { |
| 3764 | 3975 | io_write_word_8le(address + 0, data >> 0); |
| 3765 | 3976 | io_write_word_8le(address + 2, data >> 16); |
| 3766 | 3977 | } |
| 3767 | 3978 | |
| 3979 | void io_write_dword_masked_8le(offs_t address, UINT32 data, UINT32 mask) | |
| 3980 | { | |
| 3981 | if (mask & 0x0000ffff) io_write_word_masked_8le(address + 0, data >> 0, mask >> 0); | |
| 3982 | if (mask & 0xffff0000) io_write_word_masked_8le(address + 2, data >> 16, mask >> 16); | |
| 3983 | } | |
| 3984 | ||
| 3768 | 3985 | void io_write_dword_8be(offs_t address, UINT32 data) |
| 3769 | 3986 | { |
| 3770 | 3987 | io_write_word_8be(address + 0, data >> 16); |
| 3771 | 3988 | io_write_word_8be(address + 2, data >> 0); |
| 3772 | 3989 | } |
| 3773 | 3990 | |
| 3991 | void io_write_dword_masked_8be(offs_t address, UINT32 data, UINT32 mask) | |
| 3992 | { | |
| 3993 | if (mask & 0xffff0000) io_write_word_masked_8be(address + 0, data >> 16, mask >> 16); | |
| 3994 | if (mask & 0x0000ffff) io_write_word_masked_8be(address + 2, data >> 0, mask >> 0); | |
| 3995 | } | |
| 3996 | ||
| 3774 | 3997 | void io_write_qword_8le(offs_t address, UINT64 data) |
| 3775 | 3998 | { |
| 3776 | 3999 | io_write_dword_8le(address + 0, data >> 0); |
| 3777 | 4000 | io_write_dword_8le(address + 4, data >> 32); |
| 3778 | 4001 | } |
| 3779 | 4002 | |
| 4003 | void io_write_qword_masked_8le(offs_t address, UINT64 data, UINT64 mask) | |
| 4004 | { | |
| 4005 | if (mask & U64(0x00000000ffffffff)) io_write_dword_masked_8le(address + 0, data >> 0, mask >> 0); | |
| 4006 | if (mask & U64(0xffffffff00000000)) io_write_dword_masked_8le(address + 4, data >> 32, mask >> 32); | |
| 4007 | } | |
| 4008 | ||
| 3780 | 4009 | void io_write_qword_8be(offs_t address, UINT64 data) |
| 3781 | 4010 | { |
| 3782 | 4011 | io_write_dword_8be(address + 0, data >> 32); |
| 3783 | 4012 | io_write_dword_8be(address + 4, data >> 0); |
| 3784 | 4013 | } |
| 3785 | 4014 | |
| 4015 | void io_write_qword_masked_8be(offs_t address, UINT64 data, UINT64 mask) | |
| 4016 | { | |
| 4017 | if (mask & U64(0xffffffff00000000)) io_write_dword_masked_8be(address + 0, data >> 32, mask >> 32); | |
| 4018 | if (mask & U64(0x00000000ffffffff)) io_write_dword_masked_8be(address + 4, data >> 0, mask >> 0); | |
| 4019 | } | |
| 3786 | 4020 | |
| 3787 | 4021 | |
| 4022 | ||
| 3788 | 4023 | /*************************************************************************** |
| 3789 | 4024 | 16-BIT READ HANDLERS |
| 3790 | 4025 | ***************************************************************************/ |
| r2454 | r2455 | |
| 3808 | 4043 | entry = lookup_read_entry(space, address); |
| 3809 | 4044 | handler = &space->readhandlers[entry]; |
| 3810 | 4045 | |
| 3811 | DEBUG_HOOK_READ(spacenum, address & ~1, | |
| 4046 | DEBUG_HOOK_READ(spacenum, address & ~1, | |
| 3812 | 4047 | |
| 3813 | 4048 | offset = (address - handler->bytestart) & handler->bytemask; |
| 3814 | 4049 | if (entry < STATIC_RAM) |
| r2454 | r2455 | |
| 3829 | 4064 | UINT8 program_read_byte_16le(offs_t address) |
| 3830 | 4065 | { |
| 3831 | 4066 | UINT32 shift = (address & 1) * 8; |
| 3832 | return read_word_masked_generic(ADDRESS_SPACE_PROGRAM, address, | |
| 4067 | return read_word_masked_generic(ADDRESS_SPACE_PROGRAM, address, | |
| 3833 | 4068 | } |
| 3834 | 4069 | |
| 3835 | 4070 | UINT8 program_read_byte_16be(offs_t address) |
| 3836 | 4071 | { |
| 3837 | 4072 | UINT32 shift = (~address & 1) * 8; |
| 3838 | return read_word_masked_generic(ADDRESS_SPACE_PROGRAM, address, | |
| 4073 | return read_word_masked_generic(ADDRESS_SPACE_PROGRAM, address, | |
| 3839 | 4074 | } |
| 3840 | 4075 | |
| 3841 | 4076 | UINT16 program_read_word_16le(offs_t address) |
| 3842 | 4077 | { |
| 3843 | return read_word_masked_generic(ADDRESS_SPACE_PROGRAM, address, 0); | |
| 4078 | return read_word_masked_generic(ADDRESS_SPACE_PROGRAM, address, 0xffff); | |
| 3844 | 4079 | } |
| 3845 | 4080 | |
| 4081 | UINT16 program_read_word_masked_16le(offs_t address, UINT16 mask) | |
| 4082 | { | |
| 4083 | return read_word_masked_generic(ADDRESS_SPACE_PROGRAM, address, mask); | |
| 4084 | } | |
| 4085 | ||
| 3846 | 4086 | UINT16 program_read_word_16be(offs_t address) |
| 3847 | 4087 | { |
| 3848 | return read_word_masked_generic(ADDRESS_SPACE_PROGRAM, address, 0); | |
| 4088 | return read_word_masked_generic(ADDRESS_SPACE_PROGRAM, address, 0xffff); | |
| 3849 | 4089 | } |
| 3850 | 4090 | |
| 4091 | UINT16 program_read_word_masked_16be(offs_t address, UINT16 mask) | |
| 4092 | { | |
| 4093 | return read_word_masked_generic(ADDRESS_SPACE_PROGRAM, address, mask); | |
| 4094 | } | |
| 4095 | ||
| 3851 | 4096 | UINT32 program_read_dword_16le(offs_t address) |
| 3852 | 4097 | { |
| 3853 | 4098 | UINT32 result = program_read_word_16le(address + 0) << 0; |
| 3854 | 4099 | return result | (program_read_word_16le(address + 2) << 16); |
| 3855 | 4100 | } |
| 3856 | 4101 | |
| 4102 | UINT32 program_read_dword_masked_16le(offs_t address, UINT32 mask) | |
| 4103 | { | |
| 4104 | UINT32 result = 0; | |
| 4105 | if (mask & 0x0000ffff) result |= program_read_word_masked_16le(address + 0, mask >> 0) << 0; | |
| 4106 | if (mask & 0xffff0000) result |= program_read_word_masked_16le(address + 2, mask >> 16) << 16; | |
| 4107 | return result; | |
| 4108 | } | |
| 4109 | ||
| 3857 | 4110 | UINT32 program_read_dword_16be(offs_t address) |
| 3858 | 4111 | { |
| 3859 | 4112 | UINT32 result = program_read_word_16be(address + 0) << 16; |
| 3860 | 4113 | return result | (program_read_word_16be(address + 2) << 0); |
| 3861 | 4114 | } |
| 3862 | 4115 | |
| 4116 | UINT32 program_read_dword_masked_16be(offs_t address, UINT32 mask) | |
| 4117 | { | |
| 4118 | UINT32 result = 0; | |
| 4119 | if (mask & 0xffff0000) result |= program_read_word_masked_16be(address + 0, mask >> 16) << 16; | |
| 4120 | if (mask & 0x0000ffff) result |= program_read_word_masked_16be(address + 2, mask >> 0) << 0; | |
| 4121 | return result; | |
| 4122 | } | |
| 4123 | ||
| 3863 | 4124 | UINT64 program_read_qword_16le(offs_t address) |
| 3864 | 4125 | { |
| 3865 | 4126 | UINT64 result = (UINT64)program_read_dword_16le(address + 0) << 0; |
| 3866 | 4127 | return result | ((UINT64)program_read_dword_16le(address + 4) << 32); |
| 3867 | 4128 | } |
| 3868 | 4129 | |
| 4130 | UINT64 program_read_qword_masked_16le(offs_t address, UINT64 mask) | |
| 4131 | { | |
| 4132 | UINT64 result = 0; | |
| 4133 | if (mask & U64(0x00000000ffffffff)) result |= (UINT64)program_read_dword_masked_16le(address + 0, mask >> 0) << 0; | |
| 4134 | if (mask & U64(0xffffffff00000000)) result |= (UINT64)program_read_dword_masked_16le(address + 4, mask >> 32) << 32; | |
| 4135 | return result; | |
| 4136 | } | |
| 4137 | ||
| 3869 | 4138 | UINT64 program_read_qword_16be(offs_t address) |
| 3870 | 4139 | { |
| 3871 | 4140 | UINT64 result = (UINT64)program_read_dword_16le(address + 0) << 32; |
| 3872 | 4141 | return result | ((UINT64)program_read_dword_16le(address + 4) << 0); |
| 3873 | 4142 | } |
| 3874 | 4143 | |
| 4144 | UINT64 program_read_qword_masked_16be(offs_t address, UINT64 mask) | |
| 4145 | { | |
| 4146 | UINT64 result = 0; | |
| 4147 | if (mask & U64(0xffffffff00000000)) result |= (UINT64)program_read_dword_masked_16be(address + 0, mask >> 32) << 32; | |
| 4148 | if (mask & U64(0x00000000ffffffff)) result |= (UINT64)program_read_dword_masked_16be(address + 4, mask >> 0) << 0; | |
| 4149 | return result; | |
| 4150 | } | |
| 3875 | 4151 | |
| 4152 | ||
| 3876 | 4153 | /*------------------------------------------------- |
| 3877 | 4154 | ADDRESS_SPACE_DATA |
| 3878 | 4155 | -------------------------------------------------*/ |
| r2454 | r2455 | |
| 3880 | 4157 | UINT8 data_read_byte_16le(offs_t address) |
| 3881 | 4158 | { |
| 3882 | 4159 | UINT32 shift = (address & 1) * 8; |
| 3883 | return read_word_masked_generic(ADDRESS_SPACE_DATA, address, | |
| 4160 | return read_word_masked_generic(ADDRESS_SPACE_DATA, address, | |
| 3884 | 4161 | } |
| 3885 | 4162 | |
| 3886 | 4163 | UINT8 data_read_byte_16be(offs_t address) |
| 3887 | 4164 | { |
| 3888 | 4165 | UINT32 shift = (~address & 1) * 8; |
| 3889 | return read_word_masked_generic(ADDRESS_SPACE_DATA, address, | |
| 4166 | return read_word_masked_generic(ADDRESS_SPACE_DATA, address, | |
| 3890 | 4167 | } |
| 3891 | 4168 | |
| 3892 | 4169 | UINT16 data_read_word_16le(offs_t address) |
| 3893 | 4170 | { |
| 3894 | return read_word_masked_generic(ADDRESS_SPACE_DATA, address, 0); | |
| 4171 | return read_word_masked_generic(ADDRESS_SPACE_DATA, address, 0xffff); | |
| 3895 | 4172 | } |
| 3896 | 4173 | |
| 4174 | UINT16 data_read_word_masked_16le(offs_t address, UINT16 mask) | |
| 4175 | { | |
| 4176 | return read_word_masked_generic(ADDRESS_SPACE_DATA, address, mask); | |
| 4177 | } | |
| 4178 | ||
| 3897 | 4179 | UINT16 data_read_word_16be(offs_t address) |
| 3898 | 4180 | { |
| 3899 | return read_word_masked_generic(ADDRESS_SPACE_DATA, address, 0); | |
| 4181 | return read_word_masked_generic(ADDRESS_SPACE_DATA, address, 0xffff); | |
| 3900 | 4182 | } |
| 3901 | 4183 | |
| 4184 | UINT16 data_read_word_masked_16be(offs_t address, UINT16 mask) | |
| 4185 | { | |
| 4186 | return read_word_masked_generic(ADDRESS_SPACE_DATA, address, mask); | |
| 4187 | } | |
| 4188 | ||
| 3902 | 4189 | UINT32 data_read_dword_16le(offs_t address) |
| 3903 | 4190 | { |
| 3904 | 4191 | UINT32 result = data_read_word_16le(address + 0) << 0; |
| 3905 | 4192 | return result | (data_read_word_16le(address + 2) << 16); |
| 3906 | 4193 | } |
| 3907 | 4194 | |
| 4195 | UINT32 data_read_dword_masked_16le(offs_t address, UINT32 mask) | |
| 4196 | { | |
| 4197 | UINT32 result = 0; | |
| 4198 | if (mask & 0x0000ffff) result |= data_read_word_masked_16le(address + 0, mask >> 0) << 0; | |
| 4199 | if (mask & 0xffff0000) result |= data_read_word_masked_16le(address + 2, mask >> 16) << 16; | |
| 4200 | return result; | |
| 4201 | } | |
| 4202 | ||
| 3908 | 4203 | UINT32 data_read_dword_16be(offs_t address) |
| 3909 | 4204 | { |
| 3910 | 4205 | UINT32 result = data_read_word_16be(address + 0) << 16; |
| 3911 | 4206 | return result | (data_read_word_16be(address + 2) << 0); |
| 3912 | 4207 | } |
| 3913 | 4208 | |
| 4209 | UINT32 data_read_dword_masked_16be(offs_t address, UINT32 mask) | |
| 4210 | { | |
| 4211 | UINT32 result = 0; | |
| 4212 | if (mask & 0xffff0000) result |= data_read_word_masked_16be(address + 0, mask >> 16) << 16; | |
| 4213 | if (mask & 0x0000ffff) result |= data_read_word_masked_16be(address + 2, mask >> 0) << 0; | |
| 4214 | return result; | |
| 4215 | } | |
| 4216 | ||
| 3914 | 4217 | UINT64 data_read_qword_16le(offs_t address) |
| 3915 | 4218 | { |
| 3916 | 4219 | UINT64 result = (UINT64)data_read_dword_16le(address + 0) << 0; |
| 3917 | 4220 | return result | ((UINT64)data_read_dword_16le(address + 4) << 32); |
| 3918 | 4221 | } |
| 3919 | 4222 | |
| 4223 | UINT64 data_read_qword_masked_16le(offs_t address, UINT64 mask) | |
| 4224 | { | |
| 4225 | UINT64 result = 0; | |
| 4226 | if (mask & U64(0x00000000ffffffff)) result |= (UINT64)data_read_dword_masked_16le(address + 0, mask >> 0) << 0; | |
| 4227 | if (mask & U64(0xffffffff00000000)) result |= (UINT64)data_read_dword_masked_16le(address + 4, mask >> 32) << 32; | |
| 4228 | return result; | |
| 4229 | } | |
| 4230 | ||
| 3920 | 4231 | UINT64 data_read_qword_16be(offs_t address) |
| 3921 | 4232 | { |
| 3922 | 4233 | UINT64 result = (UINT64)data_read_dword_16le(address + 0) << 32; |
| 3923 | 4234 | return result | ((UINT64)data_read_dword_16le(address + 4) << 0); |
| 3924 | 4235 | } |
| 3925 | 4236 | |
| 4237 | UINT64 data_read_qword_masked_16be(offs_t address, UINT64 mask) | |
| 4238 | { | |
| 4239 | UINT64 result = 0; | |
| 4240 | if (mask & U64(0xffffffff00000000)) result |= (UINT64)data_read_dword_masked_16be(address + 0, mask >> 32) << 32; | |
| 4241 | if (mask & U64(0x00000000ffffffff)) result |= (UINT64)data_read_dword_masked_16be(address + 4, mask >> 0) << 0; | |
| 4242 | return result; | |
| 4243 | } | |
| 3926 | 4244 | |
| 4245 | ||
| 3927 | 4246 | /*------------------------------------------------- |
| 3928 | 4247 | ADDRESS_SPACE_IO |
| 3929 | 4248 | -------------------------------------------------*/ |
| r2454 | r2455 | |
| 3931 | 4250 | UINT8 io_read_byte_16le(offs_t address) |
| 3932 | 4251 | { |
| 3933 | 4252 | UINT32 shift = (address & 1) * 8; |
| 3934 | return read_word_masked_generic(ADDRESS_SPACE_IO, address, | |
| 4253 | return read_word_masked_generic(ADDRESS_SPACE_IO, address, | |
| 3935 | 4254 | } |
| 3936 | 4255 | |
| 3937 | 4256 | UINT8 io_read_byte_16be(offs_t address) |
| 3938 | 4257 | { |
| 3939 | 4258 | UINT32 shift = (~address & 1) * 8; |
| 3940 | return read_word_masked_generic(ADDRESS_SPACE_IO, address, | |
| 4259 | return read_word_masked_generic(ADDRESS_SPACE_IO, address, | |
| 3941 | 4260 | } |
| 3942 | 4261 | |
| 3943 | 4262 | UINT16 io_read_word_16le(offs_t address) |
| 3944 | 4263 | { |
| 3945 | return read_word_masked_generic(ADDRESS_SPACE_IO, address, 0); | |
| 4264 | return read_word_masked_generic(ADDRESS_SPACE_IO, address, 0xffff); | |
| 3946 | 4265 | } |
| 3947 | 4266 | |
| 4267 | UINT16 io_read_word_masked_16le(offs_t address, UINT16 mask) | |
| 4268 | { | |
| 4269 | return read_word_masked_generic(ADDRESS_SPACE_IO, address, mask); | |
| 4270 | } | |
| 4271 | ||
| 3948 | 4272 | UINT16 io_read_word_16be(offs_t address) |
| 3949 | 4273 | { |
| 3950 | return read_word_masked_generic(ADDRESS_SPACE_IO, address, 0); | |
| 4274 | return read_word_masked_generic(ADDRESS_SPACE_IO, address, 0xffff); | |
| 3951 | 4275 | } |
| 3952 | 4276 | |
| 4277 | UINT16 io_read_word_masked_16be(offs_t address, UINT16 mask) | |
| 4278 | { | |
| 4279 | return read_word_masked_generic(ADDRESS_SPACE_IO, address, mask); | |
| 4280 | } | |
| 4281 | ||
| 3953 | 4282 | UINT32 io_read_dword_16le(offs_t address) |
| 3954 | 4283 | { |
| 3955 | 4284 | UINT32 result = io_read_word_16le(address + 0) << 0; |
| 3956 | 4285 | return result | (io_read_word_16le(address + 2) << 16); |
| 3957 | 4286 | } |
| 3958 | 4287 | |
| 4288 | UINT32 io_read_dword_masked_16le(offs_t address, UINT32 mask) | |
| 4289 | { | |
| 4290 | UINT32 result = 0; | |
| 4291 | if (mask & 0x0000ffff) result |= io_read_word_masked_16le(address + 0, mask >> 0) << 0; | |
| 4292 | if (mask & 0xffff0000) result |= io_read_word_masked_16le(address + 2, mask >> 16) << 16; | |
| 4293 | return result; | |
| 4294 | } | |
| 4295 | ||
| 3959 | 4296 | UINT32 io_read_dword_16be(offs_t address) |
| 3960 | 4297 | { |
| 3961 | 4298 | UINT32 result = io_read_word_16be(address + 0) << 16; |
| 3962 | 4299 | return result | (io_read_word_16be(address + 2) << 0); |
| 3963 | 4300 | } |
| 3964 | 4301 | |
| 4302 | UINT32 io_read_dword_masked_16be(offs_t address, UINT32 mask) | |
| 4303 | { | |
| 4304 | UINT32 result = 0; | |
| 4305 | if (mask & 0xffff0000) result |= io_read_word_masked_16be(address + 0, mask >> 16) << 16; | |
| 4306 | if (mask & 0x0000ffff) result |= io_read_word_masked_16be(address + 2, mask >> 0) << 0; | |
| 4307 | return result; | |
| 4308 | } | |
| 4309 | ||
| 3965 | 4310 | UINT64 io_read_qword_16le(offs_t address) |
| 3966 | 4311 | { |
| 3967 | 4312 | UINT64 result = (UINT64)io_read_dword_16le(address + 0) << 0; |
| 3968 | 4313 | return result | ((UINT64)io_read_dword_16le(address + 4) << 32); |
| 3969 | 4314 | } |
| 3970 | 4315 | |
| 4316 | UINT64 io_read_qword_masked_16le(offs_t address, UINT64 mask) | |
| 4317 | { | |
| 4318 | UINT64 result = 0; | |
| 4319 | if (mask & U64(0x00000000ffffffff)) result |= (UINT64)io_read_dword_masked_16le(address + 0, mask >> 0) << 0; | |
| 4320 | if (mask & U64(0xffffffff00000000)) result |= (UINT64)io_read_dword_masked_16le(address + 4, mask >> 32) << 32; | |
| 4321 | return result; | |
| 4322 | } | |
| 4323 | ||
| 3971 | 4324 | UINT64 io_read_qword_16be(offs_t address) |
| 3972 | 4325 | { |
| 3973 | 4326 | UINT64 result = (UINT64)io_read_dword_16le(address + 0) << 32; |
| 3974 | 4327 | return result | ((UINT64)io_read_dword_16le(address + 4) << 0); |
| 3975 | 4328 | } |
| 3976 | 4329 | |
| 4330 | UINT64 io_read_qword_masked_16be(offs_t address, UINT64 mask) | |
| 4331 | { | |
| 4332 | UINT64 result = 0; | |
| 4333 | if (mask & U64(0xffffffff00000000)) result |= (UINT64)io_read_dword_masked_16be(address + 0, mask >> 32) << 32; | |
| 4334 | if (mask & U64(0x00000000ffffffff)) result |= (UINT64)io_read_dword_masked_16be(address + 4, mask >> 0) << 0; | |
| 4335 | return result; | |
| 4336 | } | |
| 3977 | 4337 | |
| 3978 | 4338 | |
| 4339 | ||
| 3979 | 4340 | /*************************************************************************** |
| 3980 | 4341 | 16-BIT WRITE HANDLERS |
| 3981 | 4342 | ***************************************************************************/ |
| r2454 | r2455 | |
| 3998 | 4359 | entry = lookup_write_entry(space, address); |
| 3999 | 4360 | handler = &space->writehandlers[entry]; |
| 4000 | 4361 | |
| 4001 | DEBUG_HOOK_WRITE(spacenum, address & ~1, data, | |
| 4362 | DEBUG_HOOK_WRITE(spacenum, address & ~1, data, | |
| 4002 | 4363 | |
| 4003 | 4364 | offset = (address - handler->bytestart) & handler->bytemask; |
| 4004 | 4365 | if (entry < STATIC_RAM) |
| 4005 | 4366 | { |
| 4006 | 4367 | UINT16 *dest = (UINT16 *)&bank_ptr[entry][offset & ~1]; |
| 4007 | *dest = (*dest & mem_mask) | (data & | |
| 4368 | *dest = (*dest & ~mem_mask) | (data & | |
| 4008 | 4369 | } |
| 4009 | 4370 | else |
| 4010 | 4371 | (*handler->handler.write.mhandler16)(handler->object, offset >> 1, data, mem_mask); |
| r2454 | r2455 | |
| 4020 | 4381 | void program_write_byte_16le(offs_t address, UINT8 data) |
| 4021 | 4382 | { |
| 4022 | 4383 | UINT32 shift = (address & 1) * 8; |
| 4023 | write_word_masked_generic(ADDRESS_SPACE_PROGRAM, address, data << shift, | |
| 4384 | write_word_masked_generic(ADDRESS_SPACE_PROGRAM, address, data << shift, | |
| 4024 | 4385 | } |
| 4025 | 4386 | |
| 4026 | 4387 | void program_write_byte_16be(offs_t address, UINT8 data) |
| 4027 | 4388 | { |
| 4028 | 4389 | UINT32 shift = (~address & 1) * 8; |
| 4029 | write_word_masked_generic(ADDRESS_SPACE_PROGRAM, address, data << shift, | |
| 4390 | write_word_masked_generic(ADDRESS_SPACE_PROGRAM, address, data << shift, | |
| 4030 | 4391 | } |
| 4031 | 4392 | |
| 4032 | 4393 | void program_write_word_16le(offs_t address, UINT16 data) |
| 4033 | 4394 | { |
| 4034 | write_word_masked_generic(ADDRESS_SPACE_PROGRAM, address, data, 0); | |
| 4395 | write_word_masked_generic(ADDRESS_SPACE_PROGRAM, address, data, 0xffff); | |
| 4035 | 4396 | } |
| 4036 | 4397 | |
| 4398 | void program_write_word_masked_16le(offs_t address, UINT16 data, UINT16 mask) | |
| 4399 | { | |
| 4400 | write_word_masked_generic(ADDRESS_SPACE_PROGRAM, address, data, mask); | |
| 4401 | } | |
| 4402 | ||
| 4037 | 4403 | void program_write_word_16be(offs_t address, UINT16 data) |
| 4038 | 4404 | { |
| 4039 | write_word_masked_generic(ADDRESS_SPACE_PROGRAM, address, data, 0); | |
| 4405 | write_word_masked_generic(ADDRESS_SPACE_PROGRAM, address, data, 0xffff); | |
| 4040 | 4406 | } |
| 4041 | 4407 | |
| 4408 | void program_write_word_masked_16be(offs_t address, UINT16 data, UINT16 mask) | |
| 4409 | { | |
| 4410 | write_word_masked_generic(ADDRESS_SPACE_PROGRAM, address, data, mask); | |
| 4411 | } | |
| 4412 | ||
| 4042 | 4413 | void program_write_dword_16le(offs_t address, UINT32 data) |
| 4043 | 4414 | { |
| 4044 | 4415 | program_write_word_16le(address + 0, data >> 0); |
| 4045 | 4416 | program_write_word_16le(address + 2, data >> 16); |
| 4046 | 4417 | } |
| 4047 | 4418 | |
| 4419 | void program_write_dword_masked_16le(offs_t address, UINT32 data, UINT32 mask) | |
| 4420 | { | |
| 4421 | if (mask & 0x0000ffff) program_write_word_masked_16le(address + 0, data >> 0, mask >> 0); | |
| 4422 | if (mask & 0xffff0000) program_write_word_masked_16le(address + 2, data >> 16, mask >> 16); | |
| 4423 | } | |
| 4424 | ||
| 4048 | 4425 | void program_write_dword_16be(offs_t address, UINT32 data) |
| 4049 | 4426 | { |
| 4050 | 4427 | program_write_word_16be(address + 0, data >> 16); |
| 4051 | 4428 | program_write_word_16be(address + 2, data >> 0); |
| 4052 | 4429 | } |
| 4053 | 4430 | |
| 4431 | void program_write_dword_masked_16be(offs_t address, UINT32 data, UINT32 mask) | |
| 4432 | { | |
| 4433 | if (mask & 0xffff0000) program_write_word_masked_16be(address + 0, data >> 16, mask >> 16); | |
| 4434 | if (mask & 0x0000ffff) program_write_word_masked_16be(address + 2, data >> 0, mask >> 0); | |
| 4435 | } | |
| 4436 | ||
| 4054 | 4437 | void program_write_qword_16le(offs_t address, UINT64 data) |
| 4055 | 4438 | { |
| 4056 | 4439 | program_write_dword_16le(address + 0, data >> 0); |
| 4057 | 4440 | program_write_dword_16le(address + 4, data >> 32); |
| 4058 | 4441 | } |
| 4059 | 4442 | |
| 4443 | void program_write_qword_masked_16le(offs_t address, UINT64 data, UINT64 mask) | |
| 4444 | { | |
| 4445 | if (mask & U64(0x00000000ffffffff)) program_write_dword_masked_16le(address + 0, data >> 0, mask >> 0); | |
| 4446 | if (mask & U64(0xffffffff00000000)) program_write_dword_masked_16le(address + 4, data >> 32, mask >> 32); | |
| 4447 | } | |
| 4448 | ||
| 4060 | 4449 | void program_write_qword_16be(offs_t address, UINT64 data) |
| 4061 | 4450 | { |
| 4062 | 4451 | program_write_dword_16be(address + 0, data >> 32); |
| 4063 | 4452 | program_write_dword_16be(address + 4, data >> 0); |
| 4064 | 4453 | } |
| 4065 | 4454 | |
| 4455 | void program_write_qword_masked_16be(offs_t address, UINT64 data, UINT64 mask) | |
| 4456 | { | |
| 4457 | if (mask & U64(0xffffffff00000000)) program_write_dword_masked_16be(address + 0, data >> 32, mask >> 32); | |
| 4458 | if (mask & U64(0x00000000ffffffff)) program_write_dword_masked_16be(address + 4, data >> 0, mask >> 0); | |
| 4459 | } | |
| 4066 | 4460 | |
| 4461 | ||
| 4067 | 4462 | /*------------------------------------------------- |
| 4068 | 4463 | ADDRESS_SPACE_DATA |
| 4069 | 4464 | -------------------------------------------------*/ |
| r2454 | r2455 | |
| 4071 | 4466 | void data_write_byte_16le(offs_t address, UINT8 data) |
| 4072 | 4467 | { |
| 4073 | 4468 | UINT32 shift = (address & 1) * 8; |
| 4074 | write_word_masked_generic(ADDRESS_SPACE_DATA, address, data << shift, | |
| 4469 | write_word_masked_generic(ADDRESS_SPACE_DATA, address, data << shift, | |
| 4075 | 4470 | } |
| 4076 | 4471 | |
| 4077 | 4472 | void data_write_byte_16be(offs_t address, UINT8 data) |
| 4078 | 4473 | { |
| 4079 | 4474 | UINT32 shift = (~address & 1) * 8; |
| 4080 | write_word_masked_generic(ADDRESS_SPACE_DATA, address, data << shift, | |
| 4475 | write_word_masked_generic(ADDRESS_SPACE_DATA, address, data << shift, | |
| 4081 | 4476 | } |
| 4082 | 4477 | |
| 4083 | 4478 | void data_write_word_16le(offs_t address, UINT16 data) |
| 4084 | 4479 | { |
| 4085 | write_word_masked_generic(ADDRESS_SPACE_DATA, address, data, 0); | |
| 4480 | write_word_masked_generic(ADDRESS_SPACE_DATA, address, data, 0xffff); | |
| 4086 | 4481 | } |
| 4087 | 4482 | |
| 4483 | void data_write_word_masked_16le(offs_t address, UINT16 data, UINT16 mask) | |
| 4484 | { | |
| 4485 | write_word_masked_generic(ADDRESS_SPACE_DATA, address, data, mask); | |
| 4486 | } | |
| 4487 | ||
| 4088 | 4488 | void data_write_word_16be(offs_t address, UINT16 data) |
| 4089 | 4489 | { |
| 4090 | write_word_masked_generic(ADDRESS_SPACE_DATA, address, data, 0); | |
| 4490 | write_word_masked_generic(ADDRESS_SPACE_DATA, address, data, 0xffff); | |
| 4091 | 4491 | } |
| 4092 | 4492 | |
| 4493 | void data_write_word_masked_16be(offs_t address, UINT16 data, UINT16 mask) | |
| 4494 | { | |
| 4495 | write_word_masked_generic(ADDRESS_SPACE_DATA, address, data, mask); | |
| 4496 | } | |
| 4497 | ||
| 4093 | 4498 | void data_write_dword_16le(offs_t address, UINT32 data) |
| 4094 | 4499 | { |
| 4095 | 4500 | data_write_word_16le(address + 0, data >> 0); |
| 4096 | 4501 | data_write_word_16le(address + 2, data >> 16); |
| 4097 | 4502 | } |
| 4098 | 4503 | |
| 4504 | void data_write_dword_masked_16le(offs_t address, UINT32 data, UINT32 mask) | |
| 4505 | { | |
| 4506 | if (mask & 0x0000ffff) data_write_word_masked_16le(address + 0, data >> 0, mask >> 0); | |
| 4507 | if (mask & 0xffff0000) data_write_word_masked_16le(address + 2, data >> 16, mask >> 16); | |
| 4508 | } | |
| 4509 | ||
| 4099 | 4510 | void data_write_dword_16be(offs_t address, UINT32 data) |
| 4100 | 4511 | { |
| 4101 | 4512 | data_write_word_16be(address + 0, data >> 16); |
| 4102 | 4513 | data_write_word_16be(address + 2, data >> 0); |
| 4103 | 4514 | } |
| 4104 | 4515 | |
| 4516 | void data_write_dword_masked_16be(offs_t address, UINT32 data, UINT32 mask) | |
| 4517 | { | |
| 4518 | if (mask & 0xffff0000) data_write_word_masked_16be(address + 0, data >> 16, mask >> 16); | |
| 4519 | if (mask & 0x0000ffff) data_write_word_masked_16be(address + 2, data >> 0, mask >> 0); | |
| 4520 | } | |
| 4521 | ||
| 4105 | 4522 | void data_write_qword_16le(offs_t address, UINT64 data) |
| 4106 | 4523 | { |
| 4107 | 4524 | data_write_dword_16le(address + 0, data >> 0); |
| 4108 | 4525 | data_write_dword_16le(address + 4, data >> 32); |
| 4109 | 4526 | } |
| 4110 | 4527 | |
| 4528 | void data_write_qword_masked_16le(offs_t address, UINT64 data, UINT64 mask) | |
| 4529 | { | |
| 4530 | if (mask & U64(0x00000000ffffffff)) data_write_dword_masked_16le(address + 0, data >> 0, mask >> 0); | |
| 4531 | if (mask & U64(0xffffffff00000000)) data_write_dword_masked_16le(address + 4, data >> 32, mask >> 32); | |
| 4532 | } | |
| 4533 | ||
| 4111 | 4534 | void data_write_qword_16be(offs_t address, UINT64 data) |
| 4112 | 4535 | { |
| 4113 | 4536 | data_write_dword_16be(address + 0, data >> 32); |
| 4114 | 4537 | data_write_dword_16be(address + 4, data >> 0); |
| 4115 | 4538 | } |
| 4116 | 4539 | |
| 4540 | void data_write_qword_masked_16be(offs_t address, UINT64 data, UINT64 mask) | |
| 4541 | { | |
| 4542 | if (mask & U64(0xffffffff00000000)) data_write_dword_masked_16be(address + 0, data >> 32, mask >> 32); | |
| 4543 | if (mask & U64(0x00000000ffffffff)) data_write_dword_masked_16be(address + 4, data >> 0, mask >> 0); | |
| 4544 | } | |
| 4117 | 4545 | |
| 4546 | ||
| 4118 | 4547 | /*------------------------------------------------- |
| 4119 | 4548 | ADDRESS_SPACE_IO |
| 4120 | 4549 | -------------------------------------------------*/ |
| r2454 | r2455 | |
| 4122 | 4551 | void io_write_byte_16le(offs_t address, UINT8 data) |
| 4123 | 4552 | { |
| 4124 | 4553 | UINT32 shift = (address & 1) * 8; |
| 4125 | write_word_masked_generic(ADDRESS_SPACE_IO, address, data << shift, | |
| 4554 | write_word_masked_generic(ADDRESS_SPACE_IO, address, data << shift, | |
| 4126 | 4555 | } |
| 4127 | 4556 | |
| 4128 | 4557 | void io_write_byte_16be(offs_t address, UINT8 data) |
| 4129 | 4558 | { |
| 4130 | 4559 | UINT32 shift = (~address & 1) * 8; |
| 4131 | write_word_masked_generic(ADDRESS_SPACE_IO, address, data << shift, | |
| 4560 | write_word_masked_generic(ADDRESS_SPACE_IO, address, data << shift, | |
| 4132 | 4561 | } |
| 4133 | 4562 | |
| 4134 | 4563 | void io_write_word_16le(offs_t address, UINT16 data) |
| 4135 | 4564 | { |
| 4136 | write_word_masked_generic(ADDRESS_SPACE_IO, address, data, 0); | |
| 4565 | write_word_masked_generic(ADDRESS_SPACE_IO, address, data, 0xffff); | |
| 4137 | 4566 | } |
| 4138 | 4567 | |
| 4568 | void io_write_word_masked_16le(offs_t address, UINT16 data, UINT16 mask) | |
| 4569 | { | |
| 4570 | write_word_masked_generic(ADDRESS_SPACE_IO, address, data, mask); | |
| 4571 | } | |
| 4572 | ||
| 4139 | 4573 | void io_write_word_16be(offs_t address, UINT16 data) |
| 4140 | 4574 | { |
| 4141 | write_word_masked_generic(ADDRESS_SPACE_IO, address, data, 0); | |
| 4575 | write_word_masked_generic(ADDRESS_SPACE_IO, address, data, 0xffff); | |
| 4142 | 4576 | } |
| 4143 | 4577 | |
| 4578 | void io_write_word_masked_16be(offs_t address, UINT16 data, UINT16 mask) | |
| 4579 | { | |
| 4580 | write_word_masked_generic(ADDRESS_SPACE_IO, address, data, mask); | |
| 4581 | } | |
| 4582 | ||
| 4144 | 4583 | void io_write_dword_16le(offs_t address, UINT32 data) |
| 4145 | 4584 | { |
| 4146 | 4585 | io_write_word_16le(address + 0, data >> 0); |
| 4147 | 4586 | io_write_word_16le(address + 2, data >> 16); |
| 4148 | 4587 | } |
| 4149 | 4588 | |
| 4589 | void io_write_dword_masked_16le(offs_t address, UINT32 data, UINT32 mask) | |
| 4590 | { | |
| 4591 | if (mask & 0x0000ffff) io_write_word_masked_16le(address + 0, data >> 0, mask >> 0); | |
| 4592 | if (mask & 0xffff0000) io_write_word_masked_16le(address + 2, data >> 16, mask >> 16); | |
| 4593 | } | |
| 4594 | ||
| 4150 | 4595 | void io_write_dword_16be(offs_t address, UINT32 data) |
| 4151 | 4596 | { |
| 4152 | 4597 | io_write_word_16be(address + 0, data >> 16); |
| 4153 | 4598 | io_write_word_16be(address + 2, data >> 0); |
| 4154 | 4599 | } |
| 4155 | 4600 | |
| 4601 | void io_write_dword_masked_16be(offs_t address, UINT32 data, UINT32 mask) | |
| 4602 | { | |
| 4603 | if (mask & 0xffff0000) io_write_word_masked_16be(address + 0, data >> 16, mask >> 16); | |
| 4604 | if (mask & 0x0000ffff) io_write_word_masked_16be(address + 2, data >> 0, mask >> 0); | |
| 4605 | } | |
| 4606 | ||
| 4156 | 4607 | void io_write_qword_16le(offs_t address, UINT64 data) |
| 4157 | 4608 | { |
| 4158 | 4609 | io_write_dword_16le(address + 0, data >> 0); |
| 4159 | 4610 | io_write_dword_16le(address + 4, data >> 32); |
| 4160 | 4611 | } |
| 4161 | 4612 | |
| 4613 | void io_write_qword_masked_16le(offs_t address, UINT64 data, UINT64 mask) | |
| 4614 | { | |
| 4615 | if (mask & U64(0x00000000ffffffff)) io_write_dword_masked_16le(address + 0, data >> 0, mask >> 0); | |
| 4616 | if (mask & U64(0xffffffff00000000)) io_write_dword_masked_16le(address + 4, data >> 32, mask >> 32); | |
| 4617 | } | |
| 4618 | ||
| 4162 | 4619 | void io_write_qword_16be(offs_t address, UINT64 data) |
| 4163 | 4620 | { |
| 4164 | 4621 | io_write_dword_16be(address + 0, data >> 32); |
| 4165 | 4622 | io_write_dword_16be(address + 4, data >> 0); |
| 4166 | 4623 | } |
| 4167 | 4624 | |
| 4625 | void io_write_qword_masked_16be(offs_t address, UINT64 data, UINT64 mask) | |
| 4626 | { | |
| 4627 | if (mask & U64(0xffffffff00000000)) io_write_dword_masked_16be(address + 0, data >> 32, mask >> 32); | |
| 4628 | if (mask & U64(0x00000000ffffffff)) io_write_dword_masked_16be(address + 4, data >> 0, mask >> 0); | |
| 4629 | } | |
| 4168 | 4630 | |
| 4169 | 4631 | |
| 4632 | ||
| 4170 | 4633 | /*************************************************************************** |
| 4171 | 4634 | 32-BIT READ HANDLERS |
| 4172 | 4635 | ***************************************************************************/ |
| r2454 | r2455 | |
| 4190 | 4653 | entry = lookup_read_entry(space, address); |
| 4191 | 4654 | handler = &space->readhandlers[entry]; |
| 4192 | 4655 | |
| 4193 | DEBUG_HOOK_READ(spacenum, address & ~3, | |
| 4656 | DEBUG_HOOK_READ(spacenum, address & ~3, | |
| 4194 | 4657 | |
| 4195 | 4658 | offset = (address - handler->bytestart) & handler->bytemask; |
| 4196 | 4659 | if (entry < STATIC_RAM) |
| r2454 | r2455 | |
| 4211 | 4674 | UINT8 program_read_byte_32le(offs_t address) |
| 4212 | 4675 | { |
| 4213 | 4676 | UINT32 shift = (address & 3) * 8; |
| 4214 | return read_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, | |
| 4677 | return read_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, | |
| 4215 | 4678 | } |
| 4216 | 4679 | |
| 4217 | 4680 | UINT8 program_read_byte_32be(offs_t address) |
| 4218 | 4681 | { |
| 4219 | 4682 | UINT32 shift = (~address & 3) * 8; |
| 4220 | return read_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, | |
| 4683 | return read_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, | |
| 4221 | 4684 | } |
| 4222 | 4685 | |
| 4223 | 4686 | UINT16 program_read_word_32le(offs_t address) |
| 4224 | 4687 | { |
| 4225 | 4688 | UINT32 shift = (address & 2) * 8; |
| 4226 | return read_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, | |
| 4689 | return read_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, | |
| 4227 | 4690 | } |
| 4228 | 4691 | |
| 4692 | UINT16 program_read_word_masked_32le(offs_t address, UINT16 mask) | |
| 4693 | { | |
| 4694 | UINT32 shift = (address & 2) * 8; | |
| 4695 | return read_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, mask << shift) >> shift; | |
| 4696 | } | |
| 4697 | ||
| 4229 | 4698 | UINT16 program_read_word_32be(offs_t address) |
| 4230 | 4699 | { |
| 4231 | 4700 | UINT32 shift = (~address & 2) * 8; |
| 4232 | return read_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, | |
| 4701 | return read_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, | |
| 4233 | 4702 | } |
| 4234 | 4703 | |
| 4704 | UINT16 program_read_word_masked_32be(offs_t address, UINT16 mask) | |
| 4705 | { | |
| 4706 | UINT32 shift = (~address & 2) * 8; | |
| 4707 | return read_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, mask << shift) >> shift; | |
| 4708 | } | |
| 4709 | ||
| 4235 | 4710 | UINT32 program_read_dword_32le(offs_t address) |
| 4236 | 4711 | { |
| 4237 | return read_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, 0); | |
| 4712 | return read_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, 0xffffffff); | |
| 4238 | 4713 | } |
| 4239 | 4714 | |
| 4240 | UINT32 program_read_dword_32 | |
| 4715 | UINT32 program_read_dword_masked_32le(offs_t address, UINT32 mask) | |
| 4241 | 4716 | { |
| 4242 | return read_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, | |
| 4717 | return read_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, mask); | |
| 4243 | 4718 | } |
| 4244 | 4719 | |
| 4245 | UINT32 program_read_dword_ | |
| 4720 | UINT32 program_read_dword_ | |
| 4246 | 4721 | { |
| 4247 | return read_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, | |
| 4722 | return read_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, 0xffffffff); | |
| 4248 | 4723 | } |
| 4249 | 4724 | |
| 4250 | UINT32 program_read_dword_masked_32be(offs_t address, UINT32 m | |
| 4725 | UINT32 program_read_dword_masked_32be(offs_t address, UINT32 m | |
| 4251 | 4726 | { |
| 4252 | return read_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, m | |
| 4727 | return read_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, m | |
| 4253 | 4728 | } |
| 4254 | 4729 | |
| 4255 | 4730 | UINT64 program_read_qword_32le(offs_t address) |
| r2454 | r2455 | |
| 4258 | 4733 | return result | ((UINT64)program_read_dword_32le(address + 4) << 32); |
| 4259 | 4734 | } |
| 4260 | 4735 | |
| 4736 | UINT64 program_read_qword_masked_32le(offs_t address, UINT64 mask) | |
| 4737 | { | |
| 4738 | UINT64 result = 0; | |
| 4739 | if (mask & U64(0x00000000ffffffff)) result |= (UINT64)program_read_dword_masked_32le(address + 0, mask >> 0) << 0; | |
| 4740 | if (mask & U64(0xffffffff00000000)) result |= (UINT64)program_read_dword_masked_32le(address + 4, mask >> 32) << 32; | |
| 4741 | return result; | |
| 4742 | } | |
| 4743 | ||
| 4261 | 4744 | UINT64 program_read_qword_32be(offs_t address) |
| 4262 | 4745 | { |
| 4263 | 4746 | UINT64 result = (UINT64)program_read_dword_32le(address + 0) << 32; |
| 4264 | 4747 | return result | ((UINT64)program_read_dword_32le(address + 4) << 0); |
| 4265 | 4748 | } |
| 4266 | 4749 | |
| 4750 | UINT64 program_read_qword_masked_32be(offs_t address, UINT64 mask) | |
| 4751 | { | |
| 4752 | UINT64 result = 0; | |
| 4753 | if (mask & U64(0xffffffff00000000)) result |= (UINT64)program_read_dword_masked_32be(address + 0, mask >> 32) << 32; | |
| 4754 | if (mask & U64(0x00000000ffffffff)) result |= (UINT64)program_read_dword_masked_32be(address + 4, mask >> 0) << 0; | |
| 4755 | return result; | |
| 4756 | } | |
| 4267 | 4757 | |
| 4758 | ||
| 4268 | 4759 | /*------------------------------------------------- |
| 4269 | 4760 | ADDRESS_SPACE_DATA |
| 4270 | 4761 | -------------------------------------------------*/ |
| r2454 | r2455 | |
| 4272 | 4763 | UINT8 data_read_byte_32le(offs_t address) |
| 4273 | 4764 | { |
| 4274 | 4765 | UINT32 shift = (address & 3) * 8; |
| 4275 | return read_dword_masked_generic(ADDRESS_SPACE_DATA, address, | |
| 4766 | return read_dword_masked_generic(ADDRESS_SPACE_DATA, address, | |
| 4276 | 4767 | } |
| 4277 | 4768 | |
| 4278 | 4769 | UINT8 data_read_byte_32be(offs_t address) |
| 4279 | 4770 | { |
| 4280 | 4771 | UINT32 shift = (~address & 3) * 8; |
| 4281 | return read_dword_masked_generic(ADDRESS_SPACE_DATA, address, | |
| 4772 | return read_dword_masked_generic(ADDRESS_SPACE_DATA, address, | |
| 4282 | 4773 | } |
| 4283 | 4774 | |
| 4284 | 4775 | UINT16 data_read_word_32le(offs_t address) |
| 4285 | 4776 | { |
| 4286 | 4777 | UINT32 shift = (address & 2) * 8; |
| 4287 | return read_dword_masked_generic(ADDRESS_SPACE_DATA, address, | |
| 4778 | return read_dword_masked_generic(ADDRESS_SPACE_DATA, address, | |
| 4288 | 4779 | } |
| 4289 | 4780 | |
| 4781 | UINT16 data_read_word_masked_32le(offs_t address, UINT16 mask) | |
| 4782 | { | |
| 4783 | UINT32 shift = (address & 2) * 8; | |
| 4784 | return read_dword_masked_generic(ADDRESS_SPACE_DATA, address, mask << shift) >> shift; | |
| 4785 | } | |
| 4786 | ||
| 4290 | 4787 | UINT16 data_read_word_32be(offs_t address) |
| 4291 | 4788 | { |
| 4292 | 4789 | UINT32 shift = (~address & 2) * 8; |
| 4293 | return read_dword_masked_generic(ADDRESS_SPACE_DATA, address, | |
| 4790 | return read_dword_masked_generic(ADDRESS_SPACE_DATA, address, | |
| 4294 | 4791 | } |
| 4295 | 4792 | |
| 4793 | UINT16 data_read_word_masked_32be(offs_t address, UINT16 mask) | |
| 4794 | { | |
| 4795 | UINT32 shift = (~address & 2) * 8; | |
| 4796 | return read_dword_masked_generic(ADDRESS_SPACE_DATA, address, mask << shift) >> shift; | |
| 4797 | } | |
| 4798 | ||
| 4296 | 4799 | UINT32 data_read_dword_32le(offs_t address) |
| 4297 | 4800 | { |
| 4298 | return read_dword_masked_generic(ADDRESS_SPACE_DATA, address, 0); | |
| 4801 | return read_dword_masked_generic(ADDRESS_SPACE_DATA, address, 0xffffffff); | |
| 4299 | 4802 | } |
| 4300 | 4803 | |
| 4301 | UINT32 data_read_dword_32 | |
| 4804 | UINT32 data_read_dword_masked_32le(offs_t address, UINT32 mask) | |
| 4302 | 4805 | { |
| 4303 | return read_dword_masked_generic(ADDRESS_SPACE_DATA, address, | |
| 4806 | return read_dword_masked_generic(ADDRESS_SPACE_DATA, address, mask); | |
| 4304 | 4807 | } |
| 4305 | 4808 | |
| 4306 | UINT32 data_read_dword_ | |
| 4809 | UINT32 data_read_dword_ | |
| 4307 | 4810 | { |
| 4308 | return read_dword_masked_generic(ADDRESS_SPACE_DATA, address, | |
| 4811 | return read_dword_masked_generic(ADDRESS_SPACE_DATA, address, 0xffffffff); | |
| 4309 | 4812 | } |
| 4310 | 4813 | |
| 4311 | UINT32 data_read_dword_masked_32be(offs_t address, UINT32 m | |
| 4814 | UINT32 data_read_dword_masked_32be(offs_t address, UINT32 m | |
| 4312 | 4815 | { |
| 4313 | return read_dword_masked_generic(ADDRESS_SPACE_DATA, address, m | |
| 4816 | return read_dword_masked_generic(ADDRESS_SPACE_DATA, address, m | |
| 4314 | 4817 | } |
| 4315 | 4818 | |
| 4316 | 4819 | UINT64 data_read_qword_32le(offs_t address) |
| r2454 | r2455 | |
| 4319 | 4822 | return result | ((UINT64)data_read_dword_32le(address + 4) << 32); |
| 4320 | 4823 | } |
| 4321 | 4824 | |
| 4825 | UINT64 data_read_qword_masked_32le(offs_t address, UINT64 mask) | |
| 4826 | { | |
| 4827 | UINT64 result = 0; | |
| 4828 | if (mask & U64(0x00000000ffffffff)) result |= (UINT64)data_read_dword_masked_32le(address + 0, mask >> 0) << 0; | |
| 4829 | if (mask & U64(0xffffffff00000000)) result |= (UINT64)data_read_dword_masked_32le(address + 4, mask >> 32) << 32; | |
| 4830 | return result; | |
| 4831 | } | |
| 4832 | ||
| 4322 | 4833 | UINT64 data_read_qword_32be(offs_t address) |
| 4323 | 4834 | { |
| 4324 | 4835 | UINT64 result = (UINT64)data_read_dword_32le(address + 0) << 32; |
| 4325 | 4836 | return result | ((UINT64)data_read_dword_32le(address + 4) << 0); |
| 4326 | 4837 | } |
| 4327 | 4838 | |
| 4839 | UINT64 data_read_qword_masked_32be(offs_t address, UINT64 mask) | |
| 4840 | { | |
| 4841 | UINT64 result = 0; | |
| 4842 | if (mask & U64(0xffffffff00000000)) result |= (UINT64)data_read_dword_masked_32be(address + 0, mask >> 32) << 32; | |
| 4843 | if (mask & U64(0x00000000ffffffff)) result |= (UINT64)data_read_dword_masked_32be(address + 4, mask >> 0) << 0; | |
| 4844 | return result; | |
| 4845 | } | |
| 4328 | 4846 | |
| 4847 | ||
| 4329 | 4848 | /*------------------------------------------------- |
| 4330 | 4849 | ADDRESS_SPACE_IO |
| 4331 | 4850 | -------------------------------------------------*/ |
| r2454 | r2455 | |
| 4333 | 4852 | UINT8 io_read_byte_32le(offs_t address) |
| 4334 | 4853 | { |
| 4335 | 4854 | UINT32 shift = (address & 3) * 8; |
| 4336 | return read_dword_masked_generic(ADDRESS_SPACE_IO, address, | |
| 4855 | return read_dword_masked_generic(ADDRESS_SPACE_IO, address, | |
| 4337 | 4856 | } |
| 4338 | 4857 | |
| 4339 | 4858 | UINT8 io_read_byte_32be(offs_t address) |
| 4340 | 4859 | { |
| 4341 | 4860 | UINT32 shift = (~address & 3) * 8; |
| 4342 | return read_dword_masked_generic(ADDRESS_SPACE_IO, address, | |
| 4861 | return read_dword_masked_generic(ADDRESS_SPACE_IO, address, | |
| 4343 | 4862 | } |
| 4344 | 4863 | |
| 4345 | 4864 | UINT16 io_read_word_32le(offs_t address) |
| 4346 | 4865 | { |
| 4347 | 4866 | UINT32 shift = (address & 2) * 8; |
| 4348 | return read_dword_masked_generic(ADDRESS_SPACE_IO, address, | |
| 4867 | return read_dword_masked_generic(ADDRESS_SPACE_IO, address, | |
| 4349 | 4868 | } |
| 4350 | 4869 | |
| 4870 | UINT16 io_read_word_masked_32le(offs_t address, UINT16 mask) | |
| 4871 | { | |
| 4872 | UINT32 shift = (address & 2) * 8; | |
| 4873 | return read_dword_masked_generic(ADDRESS_SPACE_IO, address, mask << shift) >> shift; | |
| 4874 | } | |
| 4875 | ||
| 4351 | 4876 | UINT16 io_read_word_32be(offs_t address) |
| 4352 | 4877 | { |
| 4353 | 4878 | UINT32 shift = (~address & 2) * 8; |
| 4354 | return read_dword_masked_generic(ADDRESS_SPACE_IO, address, | |
| 4879 | return read_dword_masked_generic(ADDRESS_SPACE_IO, address, | |
| 4355 | 4880 | } |
| 4356 | 4881 | |
| 4882 | UINT16 io_read_word_masked_32be(offs_t address, UINT16 mask) | |
| 4883 | { | |
| 4884 | UINT32 shift = (~address & 2) * 8; | |
| 4885 | return read_dword_masked_generic(ADDRESS_SPACE_IO, address, mask << shift) >> shift; | |
| 4886 | } | |
| 4887 | ||
| 4357 | 4888 | UINT32 io_read_dword_32le(offs_t address) |
| 4358 | 4889 | { |
| 4359 | return read_dword_masked_generic(ADDRESS_SPACE_IO, address, 0); | |
| 4890 | return read_dword_masked_generic(ADDRESS_SPACE_IO, address, 0xffffffff); | |
| 4360 | 4891 | } |
| 4361 | 4892 | |
| 4362 | UINT32 io_read_dword_32 | |
| 4893 | UINT32 io_read_dword_masked_32le(offs_t address, UINT32 mask) | |
| 4363 | 4894 | { |
| 4364 | return read_dword_masked_generic(ADDRESS_SPACE_IO, address, | |
| 4895 | return read_dword_masked_generic(ADDRESS_SPACE_IO, address, mask); | |
| 4365 | 4896 | } |
| 4366 | 4897 | |
| 4367 | UINT32 io_read_dword_ | |
| 4898 | UINT32 io_read_dword_ | |
| 4368 | 4899 | { |
| 4369 | return read_dword_masked_generic(ADDRESS_SPACE_IO, address, | |
| 4900 | return read_dword_masked_generic(ADDRESS_SPACE_IO, address, 0xffffffff); | |
| 4370 | 4901 | } |
| 4371 | 4902 | |
| 4372 | UINT32 io_read_dword_masked_32be(offs_t address, UINT32 m | |
| 4903 | UINT32 io_read_dword_masked_32be(offs_t address, UINT32 m | |
| 4373 | 4904 | { |
| 4374 | return read_dword_masked_generic(ADDRESS_SPACE_IO, address, m | |
| 4905 | return read_dword_masked_generic(ADDRESS_SPACE_IO, address, m | |
| 4375 | 4906 | } |
| 4376 | 4907 | |
| 4377 | 4908 | UINT64 io_read_qword_32le(offs_t address) |
| r2454 | r2455 | |
| 4380 | 4911 | return result | ((UINT64)io_read_dword_32le(address + 4) << 32); |
| 4381 | 4912 | } |
| 4382 | 4913 | |
| 4914 | UINT64 io_read_qword_masked_32le(offs_t address, UINT64 mask) | |
| 4915 | { | |
| 4916 | UINT64 result = 0; | |
| 4917 | if (mask & U64(0x00000000ffffffff)) result |= (UINT64)io_read_dword_masked_32le(address + 0, mask >> 0) << 0; | |
| 4918 | if (mask & U64(0xffffffff00000000)) result |= (UINT64)io_read_dword_masked_32le(address + 4, mask >> 32) << 32; | |
| 4919 | return result; | |
| 4920 | } | |
| 4921 | ||
| 4383 | 4922 | UINT64 io_read_qword_32be(offs_t address) |
| 4384 | 4923 | { |
| 4385 | 4924 | UINT64 result = (UINT64)io_read_dword_32le(address + 0) << 32; |
| 4386 | 4925 | return result | ((UINT64)io_read_dword_32le(address + 4) << 0); |
| 4387 | 4926 | } |
| 4388 | 4927 | |
| 4928 | UINT64 io_read_qword_masked_32be(offs_t address, UINT64 mask) | |
| 4929 | { | |
| 4930 | UINT64 result = 0; | |
| 4931 | if (mask & U64(0xffffffff00000000)) result |= (UINT64)io_read_dword_masked_32be(address + 0, mask >> 32) << 32; | |
| 4932 | if (mask & U64(0x00000000ffffffff)) result |= (UINT64)io_read_dword_masked_32be(address + 4, mask >> 0) << 0; | |
| 4933 | return result; | |
| 4934 | } | |
| 4389 | 4935 | |
| 4390 | 4936 | |
| 4937 | ||
| 4391 | 4938 | /*************************************************************************** |
| 4392 | 4939 | 32-BIT WRITE HANDLERS |
| 4393 | 4940 | ***************************************************************************/ |
| r2454 | r2455 | |
| 4410 | 4957 | entry = lookup_write_entry(space, address); |
| 4411 | 4958 | handler = &space->writehandlers[entry]; |
| 4412 | 4959 | |
| 4413 | DEBUG_HOOK_WRITE(spacenum, address & ~3, data, | |
| 4960 | DEBUG_HOOK_WRITE(spacenum, address & ~3, data, | |
| 4414 | 4961 | |
| 4415 | 4962 | offset = (address - handler->bytestart) & handler->bytemask; |
| 4416 | 4963 | if (entry < STATIC_RAM) |
| 4417 | 4964 | { |
| 4418 | 4965 | UINT32 *dest = (UINT32 *)&bank_ptr[entry][offset & ~3]; |
| 4419 | *dest = (*dest & mem_mask) | (data & | |
| 4966 | *dest = (*dest & ~mem_mask) | (data & | |
| 4420 | 4967 | } |
| 4421 | 4968 | else |
| 4422 | 4969 | (*handler->handler.write.mhandler32)(handler->object, offset >> 2, data, mem_mask); |
| r2454 | r2455 | |
| 4432 | 4979 | void program_write_byte_32le(offs_t address, UINT8 data) |
| 4433 | 4980 | { |
| 4434 | 4981 | UINT32 shift = (address & 3) * 8; |
| 4435 | write_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, data << shift, | |
| 4982 | write_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, data << shift, | |
| 4436 | 4983 | } |
| 4437 | 4984 | |
| 4438 | 4985 | void program_write_byte_32be(offs_t address, UINT8 data) |
| 4439 | 4986 | { |
| 4440 | 4987 | UINT32 shift = (~address & 3) * 8; |
| 4441 | write_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, data << shift, | |
| 4988 | write_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, data << shift, | |
| 4442 | 4989 | } |
| 4443 | 4990 | |
| 4444 | 4991 | void program_write_word_32le(offs_t address, UINT16 data) |
| 4445 | 4992 | { |
| 4446 | 4993 | UINT32 shift = (address & 2) * 8; |
| 4447 | write_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, data << shift, | |
| 4994 | write_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, data << shift, | |
| 4448 | 4995 | } |
| 4449 | 4996 | |
| 4997 | void program_write_word_masked_32le(offs_t address, UINT16 data, UINT16 mask) | |
| 4998 | { | |
| 4999 | UINT32 shift = (address & 2) * 8; | |
| 5000 | write_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, data << shift, mask << shift); | |
| 5001 | } | |
| 5002 | ||
| 4450 | 5003 | void program_write_word_32be(offs_t address, UINT16 data) |
| 4451 | 5004 | { |
| 4452 | 5005 | UINT32 shift = (~address & 2) * 8; |
| 4453 | write_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, data << shift, | |
| 5006 | write_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, data << shift, | |
| 4454 | 5007 | } |
| 4455 | 5008 | |
| 5009 | void program_write_word_masked_32be(offs_t address, UINT16 data, UINT16 mask) | |
| 5010 | { | |
| 5011 | UINT32 shift = (~address & 2) * 8; | |
| 5012 | write_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, data << shift, mask << shift); | |
| 5013 | } | |
| 5014 | ||
| 4456 | 5015 | void program_write_dword_32le(offs_t address, UINT32 data) |
| 4457 | 5016 | { |
| 4458 | write_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, data, 0); | |
| 5017 | write_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, data, 0xffffffff); | |
| 4459 | 5018 | } |
| 4460 | 5019 | |
| 4461 | void program_write_dword_32 | |
| 5020 | void program_write_dword_masked_32le(offs_t address, UINT32 data, UINT32 mask) | |
| 4462 | 5021 | { |
| 4463 | write_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, data, | |
| 5022 | write_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, data, mask); | |
| 4464 | 5023 | } |
| 4465 | 5024 | |
| 4466 | void program_write_dword_ | |
| 5025 | void program_write_dword_ | |
| 4467 | 5026 | { |
| 4468 | write_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, data, | |
| 5027 | write_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, data, 0xffffffff); | |
| 4469 | 5028 | } |
| 4470 | 5029 | |
| 4471 | void program_write_dword_masked_32be(offs_t address, UINT32 data, UINT32 m | |
| 5030 | void program_write_dword_masked_32be(offs_t address, UINT32 data, UINT32 m | |
| 4472 | 5031 | { |
| 4473 | write_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, data, m | |
| 5032 | write_dword_masked_generic(ADDRESS_SPACE_PROGRAM, address, data, m | |
| 4474 | 5033 | } |
| 4475 | 5034 | |
| 4476 | 5035 | void program_write_qword_32le(offs_t address, UINT64 data) |
| r2454 | r2455 | |
| 4479 | 5038 | program_write_dword_32le(address + 4, data >> 32); |
| 4480 | 5039 | } |
| 4481 | 5040 | |
| 5041 | void program_write_qword_masked_32le(offs_t address, UINT64 data, UINT64 mask) | |
| 5042 | { | |
| 5043 | if (mask & U64(0x00000000ffffffff)) program_write_dword_masked_32le(address + 0, data >> 0, mask >> 0); | |
| 5044 | if (mask & U64(0xffffffff00000000)) program_write_dword_masked_32le(address + 4, data >> 32, mask >> 32); | |
| 5045 | } | |
| 5046 | ||
| 4482 | 5047 | void program_write_qword_32be(offs_t address, UINT64 data) |
| 4483 | 5048 | { |
| 4484 | 5049 | program_write_dword_32be(address + 0, data >> 32); |
| 4485 | 5050 | program_write_dword_32be(address + 4, data >> 0); |
| 4486 | 5051 | } |
| 4487 | 5052 | |
| 5053 | void program_write_qword_masked_32be(offs_t address, UINT64 data, UINT64 mask) | |
| 5054 | { | |
| 5055 | if (mask & U64(0xffffffff00000000)) program_write_dword_masked_32be(address + 0, data >> 32, mask >> 32); | |
| 5056 | if (mask & U64(0x00000000ffffffff)) program_write_dword_masked_32be(address + 4, data >> 0, mask >> 0); | |
| 5057 | } | |
| 4488 | 5058 | |
| 5059 | ||
| 4489 | 5060 | /*------------------------------------------------- |
| 4490 | 5061 | ADDRESS_SPACE_DATA |
| 4491 | 5062 | -------------------------------------------------*/ |
| r2454 | r2455 | |
| 4493 | 5064 | void data_write_byte_32le(offs_t address, UINT8 data) |
| 4494 | 5065 | { |
| 4495 | 5066 | UINT32 shift = (address & 3) * 8; |
| 4496 | write_dword_masked_generic(ADDRESS_SPACE_DATA, address, data << shift, | |
| 5067 | write_dword_masked_generic(ADDRESS_SPACE_DATA, address, data << shift, | |
| 4497 | 5068 | } |
| 4498 | 5069 | |
| 4499 | 5070 | void data_write_byte_32be(offs_t address, UINT8 data) |
| 4500 | 5071 | { |
| 4501 | 5072 | UINT32 shift = (~address & 3) * 8; |
| 4502 | write_dword_masked_generic(ADDRESS_SPACE_DATA, address, data << shift, | |
| 5073 | write_dword_masked_generic(ADDRESS_SPACE_DATA, address, data << shift, | |
| 4503 | 5074 | } |
| 4504 | 5075 | |
| 4505 | 5076 | void data_write_word_32le(offs_t address, UINT16 data) |
| 4506 | 5077 | { |
| 4507 | 5078 | UINT32 shift = (address & 2) * 8; |
| 4508 | write_dword_masked_generic(ADDRESS_SPACE_DATA, address, data << shift, | |
| 5079 | write_dword_masked_generic(ADDRESS_SPACE_DATA, address, data << shift, | |
| 4509 | 5080 | } |
| 4510 | 5081 | |
| 5082 | void data_write_word_masked_32le(offs_t address, UINT16 data, UINT16 mask) | |
| 5083 | { | |
| 5084 | UINT32 shift = (address & 2) * 8; | |
| 5085 | write_dword_masked_generic(ADDRESS_SPACE_DATA, address, data << shift, mask << shift); | |
| 5086 | } | |
| 5087 | ||
| 4511 | 5088 | void data_write_word_32be(offs_t address, UINT16 data) |
| 4512 | 5089 | { |
| 4513 | 5090 | UINT32 shift = (~address & 2) * 8; |
| 4514 | write_dword_masked_generic(ADDRESS_SPACE_DATA, address, data << shift, | |
| 5091 | write_dword_masked_generic(ADDRESS_SPACE_DATA, address, data << shift, | |
| 4515 | 5092 | } |
| 4516 | 5093 | |
| 5094 | void data_write_word_masked_32be(offs_t address, UINT16 data, UINT16 mask) | |
| 5095 | { | |
| 5096 | UINT32 shift = (~address & 2) * 8; | |
| 5097 | write_dword_masked_generic(ADDRESS_SPACE_DATA, address, data << shift, mask << shift); | |
| 5098 | } | |
| 5099 | ||
| 4517 | 5100 | void data_write_dword_32le(offs_t address, UINT32 data) |
| 4518 | 5101 | { |
| 4519 | write_dword_masked_generic(ADDRESS_SPACE_DATA, address, data, 0); | |
| 5102 | write_dword_masked_generic(ADDRESS_SPACE_DATA, address, data, 0xffffffff); | |
| 4520 | 5103 | } |
| 4521 | 5104 | |
| 4522 | void data_write_dword_32 | |
| 5105 | void data_write_dword_masked_32le(offs_t address, UINT32 data, UINT32 mask) | |
| 4523 | 5106 | { |
| 4524 | write_dword_masked_generic(ADDRESS_SPACE_DATA, address, data, | |
| 5107 | write_dword_masked_generic(ADDRESS_SPACE_DATA, address, data, mask); | |
| 4525 | 5108 | } |
| 4526 | 5109 | |
| 4527 | void data_write_dword_ | |
| 5110 | void data_write_dword_ | |
| 4528 | 5111 | { |
| 4529 | write_dword_masked_generic(ADDRESS_SPACE_DATA, address, data, | |
| 5112 | write_dword_masked_generic(ADDRESS_SPACE_DATA, address, data, 0xffffffff); | |
| 4530 | 5113 | } |
| 4531 | 5114 | |
| 4532 | void data_write_dword_masked_32be(offs_t address, UINT32 data, UINT32 m | |
| 5115 | void data_write_dword_masked_32be(offs_t address, UINT32 data, UINT32 m | |
| 4533 | 5116 | { |
| 4534 | write_dword_masked_generic(ADDRESS_SPACE_DATA, address, data, m | |
| 5117 | write_dword_masked_generic(ADDRESS_SPACE_DATA, address, data, m | |
| 4535 | 5118 | } |
| 4536 | 5119 | |
| 4537 | 5120 | void data_write_qword_32le(offs_t address, UINT64 data) |
| r2454 | r2455 | |
| 4540 | 5123 | data_write_dword_32le(address + 4, data >> 32); |
| 4541 | 5124 | } |
| 4542 | 5125 | |
| 5126 | void data_write_qword_masked_32le(offs_t address, UINT64 data, UINT64 mask) | |
| 5127 | { | |
| 5128 | if (mask & U64(0x00000000ffffffff)) data_write_dword_masked_32le(address + 0, data >> 0, mask >> 0); | |
| 5129 | if (mask & U64(0xffffffff00000000)) data_write_dword_masked_32le(address + 4, data >> 32, mask >> 32); | |
| 5130 | } | |
| 5131 | ||
| 4543 | 5132 | void data_write_qword_32be(offs_t address, UINT64 data) |
| 4544 | 5133 | { |
| 4545 | 5134 | data_write_dword_32be(address + 0, data >> 32); |
| 4546 | 5135 | data_write_dword_32be(address + 4, data >> 0); |
| 4547 | 5136 | } |
| 4548 | 5137 | |
| 5138 | void data_write_qword_masked_32be(offs_t address, UINT64 data, UINT64 mask) | |
| 5139 | { | |
| 5140 | if (mask & U64(0xffffffff00000000)) data_write_dword_masked_32be(address + 0, data >> 32, mask >> 32); | |
| 5141 | if (mask & U64(0x00000000ffffffff)) data_write_dword_masked_32be(address + 4, data >> 0, mask >> 0); | |
| 5142 | } | |
| 4549 | 5143 | |
| 5144 | ||
| 4550 | 5145 | /*------------------------------------------------- |
| 4551 | 5146 | ADDRESS_SPACE_IO |
| 4552 | 5147 | -------------------------------------------------*/ |
| r2454 | r2455 | |
| 4554 | 5149 | void io_write_byte_32le(offs_t address, UINT8 data) |
| 4555 | 5150 | { |
| 4556 | 5151 | UINT32 shift = (address & 3) * 8; |
| 4557 | write_dword_masked_generic(ADDRESS_SPACE_IO, address, data << shift, | |
| 5152 | write_dword_masked_generic(ADDRESS_SPACE_IO, address, data << shift, | |
| 4558 | 5153 | } |
| 4559 | 5154 | |
| 4560 | 5155 | void io_write_byte_32be(offs_t address, UINT8 data) |
| 4561 | 5156 | { |
| 4562 | 5157 | UINT32 shift = (~address & 3) * 8; |
| 4563 | write_dword_masked_generic(ADDRESS_SPACE_IO, address, data << shift, | |
| 5158 | write_dword_masked_generic(ADDRESS_SPACE_IO, address, data << shift, | |
| 4564 | 5159 | } |
| 4565 | 5160 | |
| 4566 | 5161 | void io_write_word_32le(offs_t address, UINT16 data) |
| 4567 | 5162 | { |
| 4568 | 5163 | UINT32 shift = (address & 2) * 8; |
| 4569 | write_dword_masked_generic(ADDRESS_SPACE_IO, address, data << shift, | |
| 5164 | write_dword_masked_generic(ADDRESS_SPACE_IO, address, data << shift, | |
| 4570 | 5165 | } |
| 4571 | 5166 | |
| 5167 | void io_write_word_masked_32le(offs_t address, UINT16 data, UINT16 mask) | |
| 5168 | { | |
| 5169 | UINT32 shift = (address & 2) * 8; | |
| 5170 | write_dword_masked_generic(ADDRESS_SPACE_IO, address, data << shift, mask << shift); | |
| 5171 | } | |
| 5172 | ||
| 4572 | 5173 | void io_write_word_32be(offs_t address, UINT16 data) |
| 4573 | 5174 | { |
| 4574 | 5175 | UINT32 shift = (~address & 2) * 8; |
| 4575 | write_dword_masked_generic(ADDRESS_SPACE_IO, address, data << shift, | |
| 5176 | write_dword_masked_generic(ADDRESS_SPACE_IO, address, data << shift, | |
| 4576 | 5177 | } |
| 4577 | 5178 | |
| 5179 | void io_write_word_masked_32be(offs_t address, UINT16 data, UINT16 mask) | |
| 5180 | { | |
| 5181 | UINT32 shift = (~address & 2) * 8; | |
| 5182 | write_dword_masked_generic(ADDRESS_SPACE_IO, address, data << shift, mask << shift); | |
| 5183 | } | |
| 5184 | ||
| 4578 | 5185 | void io_write_dword_32le(offs_t address, UINT32 data) |
| 4579 | 5186 | { |
| 4580 | write_dword_masked_generic(ADDRESS_SPACE_IO, address, data, 0); | |
| 5187 | write_dword_masked_generic(ADDRESS_SPACE_IO, address, data, 0xffffffff); | |
| 4581 | 5188 | } |
| 4582 | 5189 | |
| 4583 | void io_write_dword_32 | |
| 5190 | void io_write_dword_masked_32le(offs_t address, UINT32 data, UINT32 mask) | |
| 4584 | 5191 | { |
| 4585 | write_dword_masked_generic(ADDRESS_SPACE_IO, address, data, | |
| 5192 | write_dword_masked_generic(ADDRESS_SPACE_IO, address, data, mask); | |
| 4586 | 5193 | } |
| 4587 | 5194 | |
| 4588 | void io_write_dword_ | |
| 5195 | void io_write_dword_ | |
| 4589 | 5196 | { |
| 4590 | write_dword_masked_generic(ADDRESS_SPACE_IO, address, data, | |
| 5197 | write_dword_masked_generic(ADDRESS_SPACE_IO, address, data, 0xffffffff); | |
| 4591 | 5198 | } |
| 4592 | 5199 | |
| 4593 | void io_write_dword_masked_32be(offs_t address, UINT32 data, UINT32 m | |
| 5200 | void io_write_dword_masked_32be(offs_t address, UINT32 data, UINT32 m | |
| 4594 | 5201 | { |
| 4595 | write_dword_masked_generic(ADDRESS_SPACE_IO, address, data, m | |
| 5202 | write_dword_masked_generic(ADDRESS_SPACE_IO, address, data, m | |
| 4596 | 5203 | } |
| 4597 | 5204 | |
| 4598 | 5205 | void io_write_qword_32le(offs_t address, UINT64 data) |
| r2454 | r2455 | |
| 4601 | 5208 | io_write_dword_32le(address + 4, data >> 32); |
| 4602 | 5209 | } |
| 4603 | 5210 | |
| 5211 | void io_write_qword_masked_32le(offs_t address, UINT64 data, UINT64 mask) | |
| 5212 | { | |
| 5213 | if (mask & U64(0x00000000ffffffff)) io_write_dword_masked_32le(address + 0, data >> 0, mask >> 0); | |
| 5214 | if (mask & U64(0xffffffff00000000)) io_write_dword_masked_32le(address + 4, data >> 32, mask >> 32); | |
| 5215 | } | |
| 5216 | ||
| 4604 | 5217 | void io_write_qword_32be(offs_t address, UINT64 data) |
| 4605 | 5218 | { |
| 4606 | 5219 | io_write_dword_32be(address + 0, data >> 32); |
| 4607 | 5220 | io_write_dword_32be(address + 4, data >> 0); |
| 4608 | 5221 | } |
| 4609 | 5222 | |
| 5223 | void io_write_qword_masked_32be(offs_t address, UINT64 data, UINT64 mask) | |
| 5224 | { | |
| 5225 | if (mask & U64(0xffffffff00000000)) io_write_dword_masked_32be(address + 0, data >> 32, mask >> 32); | |
| 5226 | if (mask & U64(0x00000000ffffffff)) io_write_dword_masked_32be(address + 4, data >> 0, mask >> 0); | |
| 5227 | } | |
| 4610 | 5228 | |
| 4611 | 5229 | |
| 5230 | ||
| 4612 | 5231 | /*************************************************************************** |
| 4613 | 5232 | 64-BIT READ HANDLERS |
| 4614 | 5233 | ***************************************************************************/ |
| r2454 | r2455 | |
| 4632 | 5251 | entry = lookup_read_entry(space, address); |
| 4633 | 5252 | handler = &space->readhandlers[entry]; |
| 4634 | 5253 | |
| 4635 | DEBUG_HOOK_READ(spacenum, address & ~7, | |
| 5254 | DEBUG_HOOK_READ(spacenum, address & ~7, | |
| 4636 | 5255 | |
| 4637 | 5256 | offset = (address - handler->bytestart) & handler->bytemask; |
| 4638 | 5257 | if (entry < STATIC_RAM) |
| r2454 | r2455 | |
| 4653 | 5272 | UINT8 program_read_byte_64le(offs_t address) |
| 4654 | 5273 | { |
| 4655 | 5274 | UINT32 shift = (address & 7) * 8; |
| 4656 | return read_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, | |
| 5275 | return read_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, | |
| 4657 | 5276 | } |
| 4658 | 5277 | |
| 4659 | 5278 | UINT8 program_read_byte_64be(offs_t address) |
| 4660 | 5279 | { |
| 4661 | 5280 | UINT32 shift = (~address & 7) * 8; |
| 4662 | return read_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, | |
| 5281 | return read_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, | |
| 4663 | 5282 | } |
| 4664 | 5283 | |
| 4665 | 5284 | UINT16 program_read_word_64le(offs_t address) |
| 4666 | 5285 | { |
| 4667 | 5286 | UINT32 shift = (address & 6) * 8; |
| 4668 | return read_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, | |
| 5287 | return read_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, | |
| 4669 | 5288 | } |
| 4670 | 5289 | |
| 5290 | UINT16 program_read_word_masked_64le(offs_t address, UINT16 mask) | |
| 5291 | { | |
| 5292 | UINT32 shift = (address & 6) * 8; | |
| 5293 | return read_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, (UINT64)mask << shift) >> shift; | |
| 5294 | } | |
| 5295 | ||
| 4671 | 5296 | UINT16 program_read_word_64be(offs_t address) |
| 4672 | 5297 | { |
| 4673 | 5298 | UINT32 shift = (~address & 6) * 8; |
| 4674 | return read_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, | |
| 5299 | return read_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, | |
| 4675 | 5300 | } |
| 4676 | 5301 | |
| 5302 | UINT16 program_read_word_masked_64be(offs_t address, UINT16 mask) | |
| 5303 | { | |
| 5304 | UINT32 shift = (~address & 6) * 8; | |
| 5305 | return read_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, (UINT64)mask << shift) >> shift; | |
| 5306 | } | |
| 5307 | ||
| 4677 | 5308 | UINT32 program_read_dword_64le(offs_t address) |
| 4678 | 5309 | { |
| 4679 | 5310 | UINT32 shift = (address & 4) * 8; |
| 4680 | return read_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, | |
| 5311 | return read_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, | |
| 4681 | 5312 | } |
| 4682 | 5313 | |
| 5314 | UINT32 program_read_dword_masked_64le(offs_t address, UINT32 mask) | |
| 5315 | { | |
| 5316 | UINT32 shift = (address & 4) * 8; | |
| 5317 | return read_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, (UINT64)mask << shift) >> shift; | |
| 5318 | } | |
| 5319 | ||
| 4683 | 5320 | UINT32 program_read_dword_64be(offs_t address) |
| 4684 | 5321 | { |
| 4685 | 5322 | UINT32 shift = (~address & 4) * 8; |
| 4686 | return read_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, | |
| 5323 | return read_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, | |
| 4687 | 5324 | } |
| 4688 | 5325 | |
| 5326 | UINT32 program_read_dword_masked_64be(offs_t address, UINT32 mask) | |
| 5327 | { | |
| 5328 | UINT32 shift = (~address & 4) * 8; | |
| 5329 | return read_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, (UINT64)mask << shift) >> shift; | |
| 5330 | } | |
| 5331 | ||
| 4689 | 5332 | UINT64 program_read_qword_64le(offs_t address) |
| 4690 | 5333 | { |
| 4691 | return read_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, 0); | |
| 5334 | return read_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, U64(0xffffffffffffffff)); | |
| 4692 | 5335 | } |
| 4693 | 5336 | |
| 4694 | UINT64 program_read_qword_64 | |
| 5337 | UINT64 program_read_qword_masked_64le(offs_t address, UINT64 mask) | |
| 4695 | 5338 | { |
| 4696 | return read_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, | |
| 5339 | return read_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, mask); | |
| 4697 | 5340 | } |
| 4698 | 5341 | |
| 4699 | UINT64 program_read_qword_ | |
| 5342 | UINT64 program_read_qword_ | |
| 4700 | 5343 | { |
| 4701 | return read_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, | |
| 5344 | return read_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, U64(0xffffffffffffffff)); | |
| 4702 | 5345 | } |
| 4703 | 5346 | |
| 4704 | UINT64 program_read_qword_masked_64be(offs_t address, UINT64 m | |
| 5347 | UINT64 program_read_qword_masked_64be(offs_t address, UINT64 m | |
| 4705 | 5348 | { |
| 4706 | return read_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, m | |
| 5349 | return read_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, m | |
| 4707 | 5350 | } |
| 4708 | 5351 | |
| 4709 | 5352 | |
| r2454 | r2455 | |
| 4714 | 5357 | UINT8 data_read_byte_64le(offs_t address) |
| 4715 | 5358 | { |
| 4716 | 5359 | UINT32 shift = (address & 7) * 8; |
| 4717 | return read_qword_masked_generic(ADDRESS_SPACE_DATA, address, | |
| 5360 | return read_qword_masked_generic(ADDRESS_SPACE_DATA, address, | |
| 4718 | 5361 | } |
| 4719 | 5362 | |
| 4720 | 5363 | UINT8 data_read_byte_64be(offs_t address) |
| 4721 | 5364 | { |
| 4722 | 5365 | UINT32 shift = (~address & 7) * 8; |
| 4723 | return read_qword_masked_generic(ADDRESS_SPACE_DATA, address, | |
| 5366 | return read_qword_masked_generic(ADDRESS_SPACE_DATA, address, | |
| 4724 | 5367 | } |
| 4725 | 5368 | |
| 4726 | 5369 | UINT16 data_read_word_64le(offs_t address) |
| 4727 | 5370 | { |
| 4728 | 5371 | UINT32 shift = (address & 6) * 8; |
| 4729 | return read_qword_masked_generic(ADDRESS_SPACE_DATA, address, | |
| 5372 | return read_qword_masked_generic(ADDRESS_SPACE_DATA, address, | |
| 4730 | 5373 | } |
| 4731 | 5374 | |
| 5375 | UINT16 data_read_word_masked_64le(offs_t address, UINT16 mask) | |
| 5376 | { | |
| 5377 | UINT32 shift = (address & 6) * 8; | |
| 5378 | return read_qword_masked_generic(ADDRESS_SPACE_DATA, address, (UINT64)mask << shift) >> shift; | |
| 5379 | } | |
| 5380 | ||
| 4732 | 5381 | UINT16 data_read_word_64be(offs_t address) |
| 4733 | 5382 | { |
| 4734 | 5383 | UINT32 shift = (~address & 6) * 8; |
| 4735 | return read_qword_masked_generic(ADDRESS_SPACE_DATA, address, | |
| 5384 | return read_qword_masked_generic(ADDRESS_SPACE_DATA, address, | |
| 4736 | 5385 | } |
| 4737 | 5386 | |
| 5387 | UINT16 data_read_word_masked_64be(offs_t address, UINT16 mask) | |
| 5388 | { | |
| 5389 | UINT32 shift = (~address & 6) * 8; | |
| 5390 | return read_qword_masked_generic(ADDRESS_SPACE_DATA, address, (UINT64)mask << shift) >> shift; | |
| 5391 | } | |
| 5392 | ||
| 4738 | 5393 | UINT32 data_read_dword_64le(offs_t address) |
| 4739 | 5394 | { |
| 4740 | 5395 | UINT32 shift = (address & 4) * 8; |
| 4741 | return read_qword_masked_generic(ADDRESS_SPACE_DATA, address, | |
| 5396 | return read_qword_masked_generic(ADDRESS_SPACE_DATA, address, | |
| 4742 | 5397 | } |
| 4743 | 5398 | |
| 5399 | UINT32 data_read_dword_masked_64le(offs_t address, UINT32 mask) | |
| 5400 | { | |
| 5401 | UINT32 shift = (address & 4) * 8; | |
| 5402 | return read_qword_masked_generic(ADDRESS_SPACE_DATA, address, (UINT64)mask << shift) >> shift; | |
| 5403 | } | |
| 5404 | ||
| 4744 | 5405 | UINT32 data_read_dword_64be(offs_t address) |
| 4745 | 5406 | { |
| 4746 | 5407 | UINT32 shift = (~address & 4) * 8; |
| 4747 | return read_qword_masked_generic(ADDRESS_SPACE_DATA, address, | |
| 5408 | return read_qword_masked_generic(ADDRESS_SPACE_DATA, address, | |
| 4748 | 5409 | } |
| 4749 | 5410 | |
| 5411 | UINT32 data_read_dword_masked_64be(offs_t address, UINT32 mask) | |
| 5412 | { | |
| 5413 | UINT32 shift = (~address & 4) * 8; | |
| 5414 | return read_qword_masked_generic(ADDRESS_SPACE_DATA, address, (UINT64)mask << shift) >> shift; | |
| 5415 | } | |
| 5416 | ||
| 4750 | 5417 | UINT64 data_read_qword_64le(offs_t address) |
| 4751 | 5418 | { |
| 4752 | return read_qword_masked_generic(ADDRESS_SPACE_DATA, address, 0); | |
| 5419 | return read_qword_masked_generic(ADDRESS_SPACE_DATA, address, U64(0xffffffffffffffff)); | |
| 4753 | 5420 | } |
| 4754 | 5421 | |
| 4755 | UINT64 data_read_qword_64 | |
| 5422 | UINT64 data_read_qword_masked_64le(offs_t address, UINT64 mask) | |
| 4756 | 5423 | { |
| 4757 | return read_qword_masked_generic(ADDRESS_SPACE_DATA, address, | |
| 5424 | return read_qword_masked_generic(ADDRESS_SPACE_DATA, address, mask); | |
| 4758 | 5425 | } |
| 4759 | 5426 | |
| 4760 | UINT64 data_read_qword_ | |
| 5427 | UINT64 data_read_qword_ | |
| 4761 | 5428 | { |
| 4762 | return read_qword_masked_generic(ADDRESS_SPACE_DATA, address, | |
| 5429 | return read_qword_masked_generic(ADDRESS_SPACE_DATA, address, U64(0xffffffffffffffff)); | |
| 4763 | 5430 | } |
| 4764 | 5431 | |
| 4765 | UINT64 data_read_qword_masked_64be(offs_t address, UINT64 m | |
| 5432 | UINT64 data_read_qword_masked_64be(offs_t address, UINT64 m | |
| 4766 | 5433 | { |
| 4767 | return read_qword_masked_generic(ADDRESS_SPACE_DATA, address, m | |
| 5434 | return read_qword_masked_generic(ADDRESS_SPACE_DATA, address, m | |
| 4768 | 5435 | } |
| 4769 | 5436 | |
| 4770 | 5437 | |
| r2454 | r2455 | |
| 4775 | 5442 | UINT8 io_read_byte_64le(offs_t address) |
| 4776 | 5443 | { |
| 4777 | 5444 | UINT32 shift = (address & 7) * 8; |
| 4778 | return read_qword_masked_generic(ADDRESS_SPACE_IO, address, | |
| 5445 | return read_qword_masked_generic(ADDRESS_SPACE_IO, address, | |
| 4779 | 5446 | } |
| 4780 | 5447 | |
| 4781 | 5448 | UINT8 io_read_byte_64be(offs_t address) |
| 4782 | 5449 | { |
| 4783 | 5450 | UINT32 shift = (~address & 7) * 8; |
| 4784 | return read_qword_masked_generic(ADDRESS_SPACE_IO, address, | |
| 5451 | return read_qword_masked_generic(ADDRESS_SPACE_IO, address, | |
| 4785 | 5452 | } |
| 4786 | 5453 | |
| 4787 | 5454 | UINT16 io_read_word_64le(offs_t address) |
| 4788 | 5455 | { |
| 4789 | 5456 | UINT32 shift = (address & 6) * 8; |
| 4790 | return read_qword_masked_generic(ADDRESS_SPACE_IO, address, | |
| 5457 | return read_qword_masked_generic(ADDRESS_SPACE_IO, address, | |
| 4791 | 5458 | } |
| 4792 | 5459 | |
| 5460 | UINT16 io_read_word_masked_64le(offs_t address, UINT16 mask) | |
| 5461 | { | |
| 5462 | UINT32 shift = (address & 6) * 8; | |
| 5463 | return read_qword_masked_generic(ADDRESS_SPACE_IO, address, (UINT64)mask << shift) >> shift; | |
| 5464 | } | |
| 5465 | ||
| 4793 | 5466 | UINT16 io_read_word_64be(offs_t address) |
| 4794 | 5467 | { |
| 4795 | 5468 | UINT32 shift = (~address & 6) * 8; |
| 4796 | return read_qword_masked_generic(ADDRESS_SPACE_IO, address, | |
| 5469 | return read_qword_masked_generic(ADDRESS_SPACE_IO, address, | |
| 4797 | 5470 | } |
| 4798 | 5471 | |
| 5472 | UINT16 io_read_word_masked_64be(offs_t address, UINT16 mask) | |
| 5473 | { | |
| 5474 | UINT32 shift = (~address & 6) * 8; | |
| 5475 | return read_qword_masked_generic(ADDRESS_SPACE_IO, address, (UINT64)mask << shift) >> shift; | |
| 5476 | } | |
| 5477 | ||
| 4799 | 5478 | UINT32 io_read_dword_64le(offs_t address) |
| 4800 | 5479 | { |
| 4801 | 5480 | UINT32 shift = (address & 4) * 8; |
| 4802 | return read_qword_masked_generic(ADDRESS_SPACE_IO, address, | |
| 5481 | return read_qword_masked_generic(ADDRESS_SPACE_IO, address, | |
| 4803 | 5482 | } |
| 4804 | 5483 | |
| 5484 | UINT32 io_read_dword_masked_64le(offs_t address, UINT32 mask) | |
| 5485 | { | |
| 5486 | UINT32 shift = (address & 4) * 8; | |
| 5487 | return read_qword_masked_generic(ADDRESS_SPACE_IO, address, (UINT64)mask << shift) >> shift; | |
| 5488 | } | |
| 5489 | ||
| 4805 | 5490 | UINT32 io_read_dword_64be(offs_t address) |
| 4806 | 5491 | { |
| 4807 | 5492 | UINT32 shift = (~address & 4) * 8; |
| 4808 | return read_qword_masked_generic(ADDRESS_SPACE_IO, address, | |
| 5493 | return read_qword_masked_generic(ADDRESS_SPACE_IO, address, | |
| 4809 | 5494 | } |
| 4810 | 5495 | |
| 5496 | UINT32 io_read_dword_masked_64be(offs_t address, UINT32 mask) | |
| 5497 | { | |
| 5498 | UINT32 shift = (~address & 4) * 8; | |
| 5499 | return read_qword_masked_generic(ADDRESS_SPACE_IO, address, (UINT64)mask << shift) >> shift; | |
| 5500 | } | |
| 5501 | ||
| 4811 | 5502 | UINT64 io_read_qword_64le(offs_t address) |
| 4812 | 5503 | { |
| 4813 | return read_qword_masked_generic(ADDRESS_SPACE_IO, address, 0); | |
| 5504 | return read_qword_masked_generic(ADDRESS_SPACE_IO, address, U64(0xffffffffffffffff)); | |
| 4814 | 5505 | } |
| 4815 | 5506 | |
| 4816 | UINT64 io_read_qword_64 | |
| 5507 | UINT64 io_read_qword_masked_64le(offs_t address, UINT64 mask) | |
| 4817 | 5508 | { |
| 4818 | return read_qword_masked_generic(ADDRESS_SPACE_IO, address, | |
| 5509 | return read_qword_masked_generic(ADDRESS_SPACE_IO, address, mask); | |
| 4819 | 5510 | } |
| 4820 | 5511 | |
| 4821 | UINT64 io_read_qword_ | |
| 5512 | UINT64 io_read_qword_ | |
| 4822 | 5513 | { |
| 4823 | return read_qword_masked_generic(ADDRESS_SPACE_IO, address, | |
| 5514 | return read_qword_masked_generic(ADDRESS_SPACE_IO, address, U64(0xffffffffffffffff)); | |
| 4824 | 5515 | } |
| 4825 | 5516 | |
| 4826 | UINT64 io_read_qword_masked_64be(offs_t address, UINT64 m | |
| 5517 | UINT64 io_read_qword_masked_64be(offs_t address, UINT64 m | |
| 4827 | 5518 | { |
| 4828 | return read_qword_masked_generic(ADDRESS_SPACE_IO, address, m | |
| 5519 | return read_qword_masked_generic(ADDRESS_SPACE_IO, address, m | |
| 4829 | 5520 | } |
| 4830 | 5521 | |
| 4831 | 5522 | |
| r2454 | r2455 | |
| 4852 | 5543 | entry = lookup_write_entry(space, address); |
| 4853 | 5544 | handler = &space->writehandlers[entry]; |
| 4854 | 5545 | |
| 4855 | DEBUG_HOOK_WRITE(spacenum, address & ~7, data, | |
| 5546 | DEBUG_HOOK_WRITE(spacenum, address & ~7, data, | |
| 4856 | 5547 | |
| 4857 | 5548 | offset = (address - handler->bytestart) & handler->bytemask; |
| 4858 | 5549 | if (entry < STATIC_RAM) |
| 4859 | 5550 | { |
| 4860 | 5551 | UINT64 *dest = (UINT64 *)&bank_ptr[entry][offset & ~7]; |
| 4861 | *dest = (*dest & mem_mask) | (data & | |
| 5552 | *dest = (*dest & ~mem_mask) | (data & | |
| 4862 | 5553 | } |
| 4863 | 5554 | else |
| 4864 | 5555 | (*handler->handler.write.mhandler64)(handler->object, offset >> 3, data, mem_mask); |
| r2454 | r2455 | |
| 4874 | 5565 | void program_write_byte_64le(offs_t address, UINT8 data) |
| 4875 | 5566 | { |
| 4876 | 5567 | UINT32 shift = (address & 7) * 8; |
| 4877 | write_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, (UINT64)data << shift, | |
| 5568 | write_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, (UINT64)data << shift, | |
| 4878 | 5569 | } |
| 4879 | 5570 | |
| 4880 | 5571 | void program_write_byte_64be(offs_t address, UINT8 data) |
| 4881 | 5572 | { |
| 4882 | 5573 | UINT32 shift = (~address & 7) * 8; |
| 4883 | write_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, (UINT64)data << shift, | |
| 5574 | write_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, (UINT64)data << shift, | |
| 4884 | 5575 | } |
| 4885 | 5576 | |
| 4886 | 5577 | void program_write_word_64le(offs_t address, UINT16 data) |
| 4887 | 5578 | { |
| 4888 | 5579 | UINT32 shift = (address & 6) * 8; |
| 4889 | write_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, (UINT64)data << shift, | |
| 5580 | write_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, (UINT64)data << shift, | |
| 4890 | 5581 | } |
| 4891 | 5582 | |
| 5583 | void program_write_word_masked_64le(offs_t address, UINT16 data, UINT16 mask) | |
| 5584 | { | |
| 5585 | UINT32 shift = (address & 6) * 8; | |
| 5586 | write_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, (UINT64)data << shift, (UINT64)mask << shift); | |
| 5587 | } | |
| 5588 | ||
| 4892 | 5589 | void program_write_word_64be(offs_t address, UINT16 data) |
| 4893 | 5590 | { |
| 4894 | 5591 | UINT32 shift = (~address & 6) * 8; |
| 4895 | write_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, (UINT64)data << shift, | |
| 5592 | write_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, (UINT64)data << shift, | |
| 4896 | 5593 | } |
| 4897 | 5594 | |
| 5595 | void program_write_word_masked_64be(offs_t address, UINT16 data, UINT16 mask) | |
| 5596 | { | |
| 5597 | UINT32 shift = (~address & 6) * 8; | |
| 5598 | write_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, (UINT64)data << shift, (UINT64)mask << shift); | |
| 5599 | } | |
| 5600 | ||
| 4898 | 5601 | void program_write_dword_64le(offs_t address, UINT32 data) |
| 4899 | 5602 | { |
| 4900 | 5603 | UINT32 shift = (address & 4) * 8; |
| 4901 | write_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, (UINT64)data << shift, | |
| 5604 | write_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, (UINT64)data << shift, | |
| 4902 | 5605 | } |
| 4903 | 5606 | |
| 5607 | void program_write_dword_masked_64le(offs_t address, UINT32 data, UINT32 mask) | |
| 5608 | { | |
| 5609 | UINT32 shift = (address & 4) * 8; | |
| 5610 | write_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, (UINT64)data << shift, (UINT64)mask << shift); | |
| 5611 | } | |
| 5612 | ||
| 4904 | 5613 | void program_write_dword_64be(offs_t address, UINT32 data) |
| 4905 | 5614 | { |
| 4906 | 5615 | UINT32 shift = (~address & 4) * 8; |
| 4907 | write_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, (UINT64)data << shift, | |
| 5616 | write_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, (UINT64)data << shift, | |
| 4908 | 5617 | } |
| 4909 | 5618 | |
| 5619 | void program_write_dword_masked_64be(offs_t address, UINT32 data, UINT32 mask) | |
| 5620 | { | |
| 5621 | UINT32 shift = (~address & 4) * 8; | |
| 5622 | write_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, (UINT64)data << shift, (UINT64)mask << shift); | |
| 5623 | } | |
| 5624 | ||
| 4910 | 5625 | void program_write_qword_64le(offs_t address, UINT64 data) |
| 4911 | 5626 | { |
| 4912 | write_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, data, 0); | |
| 5627 | write_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, data, U64(0xffffffffffffffff)); | |
| 4913 | 5628 | } |
| 4914 | 5629 | |
| 4915 | void program_write_qword_64 | |
| 5630 | void program_write_qword_masked_64le(offs_t address, UINT64 data, UINT64 mask) | |
| 4916 | 5631 | { |
| 4917 | write_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, data, | |
| 5632 | write_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, data, mask); | |
| 4918 | 5633 | } |
| 4919 | 5634 | |
| 4920 | void program_write_qword_ | |
| 5635 | void program_write_qword_ | |
| 4921 | 5636 | { |
| 4922 | write_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, data, | |
| 5637 | write_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, data, U64(0xffffffffffffffff)); | |
| 4923 | 5638 | } |
| 4924 | 5639 | |
| 4925 | void program_write_qword_masked_64be(offs_t address, UINT64 data, UINT64 m | |
| 5640 | void program_write_qword_masked_64be(offs_t address, UINT64 data, UINT64 m | |
| 4926 | 5641 | { |
| 4927 | write_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, data, m | |
| 5642 | write_qword_masked_generic(ADDRESS_SPACE_PROGRAM, address, data, m | |
| 4928 | 5643 | } |
| 4929 | 5644 | |
| 4930 | 5645 | |
| r2454 | r2455 | |
| 4935 | 5650 | void data_write_byte_64le(offs_t address, UINT8 data) |
| 4936 | 5651 | { |
| 4937 | 5652 | UINT32 shift = (address & 7) * 8; |
| 4938 | write_qword_masked_generic(ADDRESS_SPACE_DATA, address, (UINT64)data << shift, | |
| 5653 | write_qword_masked_generic(ADDRESS_SPACE_DATA, address, (UINT64)data << shift, | |
| 4939 | 5654 | } |
| 4940 | 5655 | |
| 4941 | 5656 | void data_write_byte_64be(offs_t address, UINT8 data) |
| 4942 | 5657 | { |
| 4943 | 5658 | UINT32 shift = (~address & 7) * 8; |
| 4944 | write_qword_masked_generic(ADDRESS_SPACE_DATA, address, (UINT64)data << shift, | |
| 5659 | write_qword_masked_generic(ADDRESS_SPACE_DATA, address, (UINT64)data << shift, | |
| 4945 | 5660 | } |
| 4946 | 5661 | |
| 4947 | 5662 | void data_write_word_64le(offs_t address, UINT16 data) |
| 4948 | 5663 | { |
| 4949 | 5664 | UINT32 shift = (address & 6) * 8; |
| 4950 | write_qword_masked_generic(ADDRESS_SPACE_DATA, address, (UINT64)data << shift, | |
| 5665 | write_qword_masked_generic(ADDRESS_SPACE_DATA, address, (UINT64)data << shift, | |
| 4951 | 5666 | } |
| 4952 | 5667 | |
| 5668 | void data_write_word_masked_64le(offs_t address, UINT16 data, UINT16 mask) | |
| 5669 | { | |
| 5670 | UINT32 shift = (address & 6) * 8; | |
| 5671 | write_qword_masked_generic(ADDRESS_SPACE_DATA, address, (UINT64)data << shift, (UINT64)mask << shift); | |
| 5672 | } | |
| 5673 | ||
| 4953 | 5674 | void data_write_word_64be(offs_t address, UINT16 data) |
| 4954 | 5675 | { |
| 4955 | 5676 | UINT32 shift = (~address & 6) * 8; |
| 4956 | write_qword_masked_generic(ADDRESS_SPACE_DATA, address, (UINT64)data << shift, | |
| 5677 | write_qword_masked_generic(ADDRESS_SPACE_DATA, address, (UINT64)data << shift, | |
| 4957 | 5678 | } |
| 4958 | 5679 | |
| 5680 | void data_write_word_masked_64be(offs_t address, UINT16 data, UINT16 mask) | |
| 5681 | { | |
| 5682 | UINT32 shift = (~address & 6) * 8; | |
| 5683 | write_qword_masked_generic(ADDRESS_SPACE_DATA, address, (UINT64)data << shift, (UINT64)mask << shift); | |
| 5684 | } | |
| 5685 | ||
| 4959 | 5686 | void data_write_dword_64le(offs_t address, UINT32 data) |
| 4960 | 5687 | { |
| 4961 | 5688 | UINT32 shift = (address & 4) * 8; |
| 4962 | write_qword_masked_generic(ADDRESS_SPACE_DATA, address, (UINT64)data << shift, | |
| 5689 | write_qword_masked_generic(ADDRESS_SPACE_DATA, address, (UINT64)data << shift, | |
| 4963 | 5690 | } |
| 4964 | 5691 | |
| 5692 | void data_write_dword_masked_64le(offs_t address, UINT32 data, UINT32 mask) | |
| 5693 | { | |
| 5694 | UINT32 shift = (address & 4) * 8; | |
| 5695 | write_qword_masked_generic(ADDRESS_SPACE_DATA, address, (UINT64)data << shift, (UINT64)mask << shift); | |
| 5696 | } | |
| 5697 | ||
| 4965 | 5698 | void data_write_dword_64be(offs_t address, UINT32 data) |
| 4966 | 5699 | { |
| 4967 | 5700 | UINT32 shift = (~address & 4) * 8; |
| 4968 | write_qword_masked_generic(ADDRESS_SPACE_DATA, address, (UINT64)data << shift, | |
| 5701 | write_qword_masked_generic(ADDRESS_SPACE_DATA, address, (UINT64)data << shift, | |
| 4969 | 5702 | } |
| 4970 | 5703 | |
| 5704 | void data_write_dword_masked_64be(offs_t address, UINT32 data, UINT32 mask) | |
| 5705 | { | |
| 5706 | UINT32 shift = (~address & 4) * 8; | |
| 5707 | write_qword_masked_generic(ADDRESS_SPACE_DATA, address, (UINT64)data << shift, (UINT64)mask << shift); | |
| 5708 | } | |
| 5709 | ||
| 4971 | 5710 | void data_write_qword_64le(offs_t address, UINT64 data) |
| 4972 | 5711 | { |
| 4973 | write_qword_masked_generic(ADDRESS_SPACE_DATA, address, data, 0); | |
| 5712 | write_qword_masked_generic(ADDRESS_SPACE_DATA, address, data, U64(0xffffffffffffffff)); | |
| 4974 | 5713 | } |
| 4975 | 5714 | |
| 4976 | void data_write_qword_64 | |
| 5715 | void data_write_qword_masked_64le(offs_t address, UINT64 data, UINT64 mask) | |
| 4977 | 5716 | { |
| 4978 | write_qword_masked_generic(ADDRESS_SPACE_DATA, address, data, | |
| 5717 | write_qword_masked_generic(ADDRESS_SPACE_DATA, address, data, mask); | |
| 4979 | 5718 | } |
| 4980 | 5719 | |
| 4981 | void data_write_qword_ | |
| 5720 | void data_write_qword_ | |
| 4982 | 5721 | { |
| 4983 | write_qword_masked_generic(ADDRESS_SPACE_DATA, address, data, | |
| 5722 | write_qword_masked_generic(ADDRESS_SPACE_DATA, address, data, U64(0xffffffffffffffff)); | |
| 4984 | 5723 | } |
| 4985 | 5724 | |
| 4986 | void data_write_qword_masked_64be(offs_t address, UINT64 data, UINT64 m | |
| 5725 | void data_write_qword_masked_64be(offs_t address, UINT64 data, UINT64 m | |
| 4987 | 5726 | { |
| 4988 | write_qword_masked_generic(ADDRESS_SPACE_DATA, address, data, m | |
| 5727 | write_qword_masked_generic(ADDRESS_SPACE_DATA, address, data, m | |
| 4989 | 5728 | } |
| 4990 | 5729 | |
| 4991 | 5730 | |
| r2454 | r2455 | |
| 4996 | 5735 | void io_write_byte_64le(offs_t address, UINT8 data) |
| 4997 | 5736 | { |
| 4998 | 5737 | UINT32 shift = (address & 7) * 8; |
| 4999 | write_qword_masked_generic(ADDRESS_SPACE_IO, address, (UINT64)data << shift, | |
| 5738 | write_qword_masked_generic(ADDRESS_SPACE_IO, address, (UINT64)data << shift, | |
| 5000 | 5739 | } |
| 5001 | 5740 | |
| 5002 | 5741 | void io_write_byte_64be(offs_t address, UINT8 data) |
| 5003 | 5742 | { |
| 5004 | 5743 | UINT32 shift = (~address & 7) * 8; |
| 5005 | write_qword_masked_generic(ADDRESS_SPACE_IO, address, (UINT64)data << shift, | |
| 5744 | write_qword_masked_generic(ADDRESS_SPACE_IO, address, (UINT64)data << shift, | |
| 5006 | 5745 | } |
| 5007 | 5746 | |
| 5008 | 5747 | void io_write_word_64le(offs_t address, UINT16 data) |
| 5009 | 5748 | { |
| 5010 | 5749 | UINT32 shift = (address & 6) * 8; |
| 5011 | write_qword_masked_generic(ADDRESS_SPACE_IO, address, (UINT64)data << shift, | |
| 5750 | write_qword_masked_generic(ADDRESS_SPACE_IO, address, (UINT64)data << shift, | |
| 5012 | 5751 | } |
| 5013 | 5752 | |
| 5753 | void io_write_word_masked_64le(offs_t address, UINT16 data, UINT16 mask) | |
| 5754 | { | |
| 5755 | UINT32 shift = (address & 6) * 8; | |
| 5756 | write_qword_masked_generic(ADDRESS_SPACE_IO, address, (UINT64)data << shift, (UINT64)mask << shift); | |
| 5757 | } | |
| 5758 | ||
| 5014 | 5759 | void io_write_word_64be(offs_t address, UINT16 data) |
| 5015 | 5760 | { |
| 5016 | 5761 | UINT32 shift = (~address & 6) * 8; |
| 5017 | write_qword_masked_generic(ADDRESS_SPACE_IO, address, (UINT64)data << shift, | |
| 5762 | write_qword_masked_generic(ADDRESS_SPACE_IO, address, (UINT64)data << shift, | |
| 5018 | 5763 | } |
| 5019 | 5764 | |
| 5765 | void io_write_word_masked_64be(offs_t address, UINT16 data, UINT16 mask) | |
| 5766 | { | |
| 5767 | UINT32 shift = (~address & 6) * 8; | |
| 5768 | write_qword_masked_generic(ADDRESS_SPACE_IO, address, (UINT64)data << shift, (UINT64)mask << shift); | |
| 5769 | } | |
| 5770 | ||
| 5020 | 5771 | void io_write_dword_64le(offs_t address, UINT32 data) |
| 5021 | 5772 | { |
| 5022 | 5773 | UINT32 shift = (address & 4) * 8; |
| 5023 | write_qword_masked_generic(ADDRESS_SPACE_IO, address, (UINT64)data << shift, | |
| 5774 | write_qword_masked_generic(ADDRESS_SPACE_IO, address, (UINT64)data << shift, | |
| 5024 | 5775 | } |
| 5025 | 5776 | |
| 5777 | void io_write_dword_masked_64le(offs_t address, UINT32 data, UINT32 mask) | |
| 5778 | { | |
| 5779 | UINT32 shift = (address & 4) * 8; | |
| 5780 | write_qword_masked_generic(ADDRESS_SPACE_IO, address, (UINT64)data << shift, (UINT64)mask << shift); | |
| 5781 | } | |
| 5782 | ||
| 5026 | 5783 | void io_write_dword_64be(offs_t address, UINT32 data) |
| 5027 | 5784 | { |
| 5028 | 5785 | UINT32 shift = (~address & 4) * 8; |
| 5029 | write_qword_masked_generic(ADDRESS_SPACE_IO, address, (UINT64)data << shift, | |
| 5786 | write_qword_masked_generic(ADDRESS_SPACE_IO, address, (UINT64)data << shift, | |
| 5030 | 5787 | } |
| 5031 | 5788 | |
| 5789 | void io_write_dword_masked_64be(offs_t address, UINT32 data, UINT32 mask) | |
| 5790 | { | |
| 5791 | UINT32 shift = (~address & 4) * 8; | |
| 5792 | write_qword_masked_generic(ADDRESS_SPACE_IO, address, (UINT64)data << shift, (UINT64)mask << shift); | |
| 5793 | } | |
| 5794 | ||
| 5032 | 5795 | void io_write_qword_64le(offs_t address, UINT64 data) |
| 5033 | 5796 | { |
| 5034 | write_qword_masked_generic(ADDRESS_SPACE_IO, address, data, 0); | |
| 5797 | write_qword_masked_generic(ADDRESS_SPACE_IO, address, data, U64(0xffffffffffffffff)); | |
| 5035 | 5798 | } |
| 5036 | 5799 | |
| 5037 | void io_write_qword_64 | |
| 5800 | void io_write_qword_masked_64le(offs_t address, UINT64 data, UINT64 mask) | |
| 5038 | 5801 | { |
| 5039 | write_qword_masked_generic(ADDRESS_SPACE_IO, address, data, | |
| 5802 | write_qword_masked_generic(ADDRESS_SPACE_IO, address, data, mask); | |
| 5040 | 5803 | } |
| 5041 | 5804 | |
| 5042 | void io_write_qword_ | |
| 5805 | void io_write_qword_ | |
| 5043 | 5806 | { |
| 5044 | write_qword_masked_generic(ADDRESS_SPACE_IO, address, data, | |
| 5807 | write_qword_masked_generic(ADDRESS_SPACE_IO, address, data, U64(0xffffffffffffffff)); | |
| 5045 | 5808 | } |
| 5046 | 5809 | |
| 5047 | void io_write_qword_masked_64be(offs_t address, UINT64 data, UINT64 m | |
| 5810 | void io_write_qword_masked_64be(offs_t address, UINT64 data, UINT64 m | |
| 5048 | 5811 | { |
| 5049 | write_qword_masked_generic(ADDRESS_SPACE_IO, address, data, m | |
| 5812 | write_qword_masked_generic(ADDRESS_SPACE_IO, address, data, m | |
| 5050 | 5813 | } |
| r2454 | r2455 | |
|---|---|---|
| 117 | 117 | $(EMUMACHINE)/6821pia.o \ |
| 118 | 118 | $(EMUMACHINE)/6840ptm.o \ |
| 119 | 119 | $(EMUMACHINE)/6850acia.o \ |
| 120 | $(EMUMACHINE)/68681.o \ | |
| 120 | 121 | $(EMUMACHINE)/7474.o \ |
| 121 | 122 | $(EMUMACHINE)/74123.o \ |
| 122 | 123 | $(EMUMACHINE)/74148.o \ |
| r2454 | r2455 | |
| 142 | 143 | $(EMUMACHINE)/mb3773.o \ |
| 143 | 144 | $(EMUMACHINE)/mb87078.o \ |
| 144 | 145 | $(EMUMACHINE)/mc146818.o \ |
| 146 | $(EMUMACHINE)/microtch.o \ | |
| 145 | 147 | $(EMUMACHINE)/msm6242.o \ |
| 146 | 148 | $(EMUMACHINE)/pc16552d.o \ |
| 147 | 149 | $(EMUMACHINE)/pci.o \ |
| r2454 | r2455 | |
|---|---|---|
| 125 | 125 | |
| 126 | 126 | UINT8 (*read_byte)(offs_t byteaddress); |
| 127 | 127 | UINT16 (*read_word)(offs_t byteaddress); |
| 128 | UINT16 (*read_word_masked)(offs_t byteaddress, UINT16 mask); | |
| 128 | 129 | UINT32 (*read_dword)(offs_t byteaddress); |
| 129 | 130 | UINT32 (*read_dword_masked)(offs_t byteaddress, UINT32 mask); |
| 130 | 131 | UINT64 (*read_qword)(offs_t byteaddress); |
| r2454 | r2455 | |
| 132 | 133 | |
| 133 | 134 | void (*write_byte)(offs_t byteaddress, UINT8 data); |
| 134 | 135 | void (*write_word)(offs_t byteaddress, UINT16 data); |
| 136 | void (*write_word_masked)(offs_t byteaddress, UINT16 data, UINT16 mask); | |
| 135 | 137 | void (*write_dword)(offs_t byteaddress, UINT32 data); |
| 136 | 138 | void (*write_dword_masked)(offs_t byteaddress, UINT32 data, UINT32 mask); |
| 137 | 139 | void (*write_qword)(offs_t byteaddress, UINT64 data); |
| r2454 | r2455 | |
| 426 | 428 | |
| 427 | 429 | |
| 428 | 430 | /* helper macro for merging data with the memory mask */ |
| 429 | #define COMBINE_DATA(varptr) (*(varptr) = (*(varptr) & mem_mask) | (data & | |
| 431 | #define COMBINE_DATA(varptr) (*(varptr) = (*(varptr) & ~mem_mask) | (data & | |
| 430 | 432 | |
| 431 | #define ACCESSING_BITS_0_7 ((~mem_mask & 0x000000ff) != 0) | |
| 432 | #define ACCESSING_BITS_8_15 ((~mem_mask & 0x0000ff00) != 0) | |
| 433 | #define ACCESSING_BITS_16_23 ((~mem_mask & 0x00ff0000) != 0) | |
| 434 | #define ACCESSING_BITS_24_31 ((~mem_mask & 0xff000000) != 0) | |
| 435 | #define ACCESSING_BITS_32_39 ((~mem_mask & U64(0x000000ff00000000)) != 0) | |
| 436 | #define ACCESSING_BITS_40_47 ((~mem_mask & U64(0x0000ff0000000000)) != 0) | |
| 437 | #define ACCESSING_BITS_48_55 ((~mem_mask & U64(0x00ff000000000000)) != 0) | |
| 438 | #define ACCESSING_BITS_56_63 ((~mem_mask & U64(0xff00000000000000)) != 0) | |
| 433 | #define ACCESSING_BITS_0_7 ((mem_mask & 0x000000ff) != 0) | |
| 434 | #define ACCESSING_BITS_8_15 ((mem_mask & 0x0000ff00) != 0) | |
| 435 | #define ACCESSING_BITS_16_23 ((mem_mask & 0x00ff0000) != 0) | |
| 436 | #define ACCESSING_BITS_24_31 ((mem_mask & 0xff000000) != 0) | |
| 437 | #define ACCESSING_BITS_32_39 ((mem_mask & U64(0x000000ff00000000)) != 0) | |
| 438 | #define ACCESSING_BITS_40_47 ((mem_mask & U64(0x0000ff0000000000)) != 0) | |
| 439 | #define ACCESSING_BITS_48_55 ((mem_mask & U64(0x00ff000000000000)) != 0) | |
| 440 | #define ACCESSING_BITS_56_63 ((mem_mask & U64(0xff00000000000000)) != 0) | |
| 439 | 441 | |
| 440 | #define ACCESSING_BITS_0_15 ((~mem_mask & 0x0000ffff) != 0) | |
| 441 | #define ACCESSING_BITS_16_31 ((~mem_mask & 0xffff0000) != 0) | |
| 442 | #define ACCESSING_BITS_32_47 ((~mem_mask & U64(0x0000ffff00000000)) != 0) | |
| 443 | #define ACCESSING_BITS_48_63 ((~mem_mask & U64(0xffff000000000000)) != 0) | |
| 442 | #define ACCESSING_BITS_0_15 ((mem_mask & 0x0000ffff) != 0) | |
| 443 | #define ACCESSING_BITS_16_31 ((mem_mask & 0xffff0000) != 0) | |
| 444 | #define ACCESSING_BITS_32_47 ((mem_mask & U64(0x0000ffff00000000)) != 0) | |
| 445 | #define ACCESSING_BITS_48_63 ((mem_mask & U64(0xffff000000000000)) != 0) | |
| 444 | 446 | |
| 445 | #define ACCESSING_BITS_0_31 ((~mem_mask & 0xffffffff) != 0) | |
| 446 | #define ACCESSING_BITS_32_63 ((~mem_mask & U64(0xffffffff00000000)) != 0) | |
| 447 | #define ACCESSING_BITS_0_31 ((mem_mask & 0xffffffff) != 0) | |
| 448 | #define ACCESSING_BITS_32_63 ((mem_mask & U64(0xffffffff00000000)) != 0) | |
| 447 | 449 | |
| 448 | 450 | |
| 449 | 451 | /* bank switching for CPU cores */ |
| r2454 | r2455 | |
| 957 | 959 | /* declare program address space handlers */ |
| 958 | 960 | UINT8 program_read_byte_8le(offs_t address); |
| 959 | 961 | UINT16 program_read_word_8le(offs_t address); |
| 962 | UINT16 program_read_word_masked_8le(offs_t address, UINT16 mask); | |
| 960 | 963 | UINT32 program_read_dword_8le(offs_t address); |
| 964 | UINT32 program_read_dword_masked_8le(offs_t address, UINT32 mask); | |
| 961 | 965 | UINT64 program_read_qword_8le(offs_t address); |
| 966 | UINT64 program_read_qword_masked_8le(offs_t address, UINT64 mask); | |
| 962 | 967 | void program_write_byte_8le(offs_t address, UINT8 data); |
| 963 | 968 | void program_write_word_8le(offs_t address, UINT16 data); |
| 969 | void program_write_word_masked_8le(offs_t address, UINT16 data, UINT16 mask); | |
| 964 | 970 | void program_write_dword_8le(offs_t address, UINT32 data); |
| 971 | void program_write_dword_masked_8le(offs_t address, UINT32 data, UINT32 mask); | |
| 965 | 972 | void program_write_qword_8le(offs_t address, UINT64 data); |
| 973 | void program_write_qword_masked_8le(offs_t address, UINT64 data, UINT64 mask); | |
| 966 | 974 | |
| 967 | 975 | UINT8 program_read_byte_8be(offs_t address); |
| 968 | 976 | UINT16 program_read_word_8be(offs_t address); |
| 977 | UINT16 program_read_word_masked_8be(offs_t address, UINT16 mask); | |
| 969 | 978 | UINT32 program_read_dword_8be(offs_t address); |
| 979 | UINT32 program_read_dword_masked_8be(offs_t address, UINT32 mask); | |
| 970 | 980 | UINT64 program_read_qword_8be(offs_t address); |
| 981 | UINT64 program_read_qword_masked_8be(offs_t address, UINT64 mask); | |
| 971 | 982 | void program_write_byte_8be(offs_t address, UINT8 data); |
| 972 | 983 | void program_write_word_8be(offs_t address, UINT16 data); |
| 984 | void program_write_word_masked_8be(offs_t address, UINT16 data, UINT16 mask); | |
| 973 | 985 | void program_write_dword_8be(offs_t address, UINT32 data); |
| 986 | void program_write_dword_masked_8be(offs_t address, UINT32 data, UINT32 mask); | |
| 974 | 987 | void program_write_qword_8be(offs_t address, UINT64 data); |
| 988 | void program_write_qword_masked_8be(offs_t address, UINT64 data, UINT64 mask); | |
| 975 | 989 | |
| 976 | 990 | UINT8 program_read_byte_16le(offs_t address); |
| 977 | 991 | UINT16 program_read_word_16le(offs_t address); |
| 992 | UINT16 program_read_word_masked_16le(offs_t address, UINT16 mask); | |
| 978 | 993 | UINT32 program_read_dword_16le(offs_t address); |
| 994 | UINT32 program_read_dword_masked_16le(offs_t address, UINT32 mask); | |
| 979 | 995 | UINT64 program_read_qword_16le(offs_t address); |
| 996 | UINT64 program_read_qword_masked_16le(offs_t address, UINT64 mask); | |
| 980 | 997 | void program_write_byte_16le(offs_t address, UINT8 data); |
| 981 | 998 | void program_write_word_16le(offs_t address, UINT16 data); |
| 999 | void program_write_word_masked_16le(offs_t address, UINT16 data, UINT16 mask); | |
| 982 | 1000 | void program_write_dword_16le(offs_t address, UINT32 data); |
| 1001 | void program_write_dword_masked_16le(offs_t address, UINT32 data, UINT32 mask); | |
| 983 | 1002 | void program_write_qword_16le(offs_t address, UINT64 data); |
| 1003 | void program_write_qword_masked_16le(offs_t address, UINT64 data, UINT64 mask); | |
| 984 | 1004 | |
| 985 | 1005 | UINT8 program_read_byte_16be(offs_t address); |
| 986 | 1006 | UINT16 program_read_word_16be(offs_t address); |
| 1007 | UINT16 program_read_word_masked_16be(offs_t address, UINT16 mask); | |
| 987 | 1008 | UINT32 program_read_dword_16be(offs_t address); |
| 1009 | UINT32 program_read_dword_masked_16be(offs_t address, UINT32 mask); | |
| 988 | 1010 | UINT64 program_read_qword_16be(offs_t address); |
| 1011 | UINT64 program_read_qword_masked_16be(offs_t address, UINT64 mask); | |
| 989 | 1012 | void program_write_byte_16be(offs_t address, UINT8 data); |
| 990 | 1013 | void program_write_word_16be(offs_t address, UINT16 data); |
| 1014 | void program_write_word_masked_16be(offs_t address, UINT16 data, UINT16 mask); | |
| 991 | 1015 | void program_write_dword_16be(offs_t address, UINT32 data); |
| 1016 | void program_write_dword_masked_16be(offs_t address, UINT32 data, UINT32 mask); | |
| 992 | 1017 | void program_write_qword_16be(offs_t address, UINT64 data); |
| 1018 | void program_write_qword_masked_16be(offs_t address, UINT64 data, UINT64 mask); | |
| 993 | 1019 | |
| 994 | 1020 | UINT8 program_read_byte_32le(offs_t address); |
| 995 | 1021 | UINT16 program_read_word_32le(offs_t address); |
| 1022 | UINT16 program_read_word_masked_32le(offs_t address, UINT16 mask); | |
| 996 | 1023 | UINT32 program_read_dword_32le(offs_t address); |
| 997 | UINT32 program_read_dword_masked_32le(offs_t address, UINT32 m | |
| 1024 | UINT32 program_read_dword_masked_32le(offs_t address, UINT32 m | |
| 998 | 1025 | UINT64 program_read_qword_32le(offs_t address); |
| 1026 | UINT64 program_read_qword_masked_32le(offs_t address, UINT64 mask); | |
| 999 | 1027 | void program_write_byte_32le(offs_t address, UINT8 data); |
| 1000 | 1028 | void program_write_word_32le(offs_t address, UINT16 data); |
| 1029 | void program_write_word_masked_32le(offs_t address, UINT16 data, UINT16 mask); | |
| 1001 | 1030 | void program_write_dword_32le(offs_t address, UINT32 data); |
| 1002 | void program_write_dword_masked_32le(offs_t address, UINT32 data, UINT32 m | |
| 1031 | void program_write_dword_masked_32le(offs_t address, UINT32 data, UINT32 m | |
| 1003 | 1032 | void program_write_qword_32le(offs_t address, UINT64 data); |
| 1033 | void program_write_qword_masked_32le(offs_t address, UINT64 data, UINT64 mask); | |
| 1004 | 1034 | |
| 1005 | 1035 | UINT8 program_read_byte_32be(offs_t address); |
| 1006 | 1036 | UINT16 program_read_word_32be(offs_t address); |
| 1037 | UINT16 program_read_word_masked_32be(offs_t address, UINT16 mask); | |
| 1007 | 1038 | UINT32 program_read_dword_32be(offs_t address); |
| 1008 | UINT32 program_read_dword_masked_32be(offs_t address, UINT32 m | |
| 1039 | UINT32 program_read_dword_masked_32be(offs_t address, UINT32 m | |
| 1009 | 1040 | UINT64 program_read_qword_32be(offs_t address); |
| 1041 | UINT64 program_read_qword_masked_32be(offs_t address, UINT64 mask); | |
| 1010 | 1042 | void program_write_byte_32be(offs_t address, UINT8 data); |
| 1011 | 1043 | void program_write_word_32be(offs_t address, UINT16 data); |
| 1044 | void program_write_word_masked_32be(offs_t address, UINT16 data, UINT16 mask); | |
| 1012 | 1045 | void program_write_dword_32be(offs_t address, UINT32 data); |
| 1013 | void program_write_dword_masked_32be(offs_t address, UINT32 data, UINT32 m | |
| 1046 | void program_write_dword_masked_32be(offs_t address, UINT32 data, UINT32 m | |
| 1014 | 1047 | void program_write_qword_32be(offs_t address, UINT64 data); |
| 1048 | void program_write_qword_masked_32be(offs_t address, UINT64 data, UINT64 mask); | |
| 1015 | 1049 | |
| 1016 | 1050 | UINT8 program_read_byte_64le(offs_t address); |
| 1017 | 1051 | UINT16 program_read_word_64le(offs_t address); |
| 1052 | UINT16 program_read_word_masked_64le(offs_t address, UINT16 mask); | |
| 1018 | 1053 | UINT32 program_read_dword_64le(offs_t address); |
| 1054 | UINT32 program_read_dword_masked_64le(offs_t address, UINT32 mask); | |
| 1019 | 1055 | UINT64 program_read_qword_64le(offs_t address); |
| 1020 | UINT64 program_read_qword_masked_64le(offs_t address, UINT64 m | |
| 1056 | UINT64 program_read_qword_masked_64le(offs_t address, UINT64 m | |
| 1021 | 1057 | void program_write_byte_64le(offs_t address, UINT8 data); |
| 1022 | 1058 | void program_write_word_64le(offs_t address, UINT16 data); |
| 1059 | void program_write_word_masked_64le(offs_t address, UINT16 data, UINT16 mask); | |
| 1023 | 1060 | void program_write_dword_64le(offs_t address, UINT32 data); |
| 1061 | void program_write_dword_masked_64le(offs_t address, UINT32 data, UINT32 mask); | |
| 1024 | 1062 | void program_write_qword_64le(offs_t address, UINT64 data); |
| 1025 | void program_write_qword_masked_64le(offs_t address, UINT64 data, UINT64 m | |
| 1063 | void program_write_qword_masked_64le(offs_t address, UINT64 data, UINT64 m | |
| 1026 | 1064 | |
| 1027 | 1065 | UINT8 program_read_byte_64be(offs_t address); |
| 1028 | 1066 | UINT16 program_read_word_64be(offs_t address); |
| 1067 | UINT16 program_read_word_masked_64be(offs_t address, UINT16 mask); | |
| 1029 | 1068 | UINT32 program_read_dword_64be(offs_t address); |
| 1069 | UINT32 program_read_dword_masked_64be(offs_t address, UINT32 mask); | |
| 1030 | 1070 | UINT64 program_read_qword_64be(offs_t address); |
| 1031 | UINT64 program_read_qword_masked_64be(offs_t address, UINT64 m | |
| 1071 | UINT64 program_read_qword_masked_64be(offs_t address, UINT64 m | |
| 1032 | 1072 | void program_write_byte_64be(offs_t address, UINT8 data); |
| 1033 | 1073 | void program_write_word_64be(offs_t address, UINT16 data); |
| 1074 | void program_write_word_masked_64be(offs_t address, UINT16 data, UINT16 mask); | |
| 1034 | 1075 | void program_write_dword_64be(offs_t address, UINT32 data); |
| 1076 | void program_write_dword_masked_64be(offs_t address, UINT32 data, UINT32 mask); | |
| 1035 | 1077 | void program_write_qword_64be(offs_t address, UINT64 data); |
| 1036 | void program_write_qword_masked_64be(offs_t address, UINT64 data, UINT64 m | |
| 1078 | void program_write_qword_masked_64be(offs_t address, UINT64 data, UINT64 m | |
| 1037 | 1079 | |
| 1038 | 1080 | |
| 1039 | 1081 | /* declare data address space handlers */ |
| 1040 | 1082 | UINT8 data_read_byte_8le(offs_t address); |
| 1041 | 1083 | UINT16 data_read_word_8le(offs_t address); |
| 1084 | UINT16 data_read_word_masked_8le(offs_t address, UINT16 mask); | |
| 1042 | 1085 | UINT32 data_read_dword_8le(offs_t address); |
| 1086 | UINT32 data_read_dword_masked_8le(offs_t address, UINT32 mask); | |
| 1043 | 1087 | UINT64 data_read_qword_8le(offs_t address); |
| 1088 | UINT64 data_read_qword_masked_8le(offs_t address, UINT64 mask); | |
| 1044 | 1089 | void data_write_byte_8le(offs_t address, UINT8 data); |
| 1045 | 1090 | void data_write_word_8le(offs_t address, UINT16 data); |
| 1091 | void data_write_word_masked_8le(offs_t address, UINT16 data, UINT16 mask); | |
| 1046 | 1092 | void data_write_dword_8le(offs_t address, UINT32 data); |
| 1093 | void data_write_dword_masked_8le(offs_t address, UINT32 data, UINT32 mask); | |
| 1047 | 1094 | void data_write_qword_8le(offs_t address, UINT64 data); |
| 1095 | void data_write_qword_masked_8le(offs_t address, UINT64 data, UINT64 mask); | |
| 1048 | 1096 | |
| 1049 | 1097 | UINT8 data_read_byte_8be(offs_t address); |
| 1050 | 1098 | UINT16 data_read_word_8be(offs_t address); |
| 1099 | UINT16 data_read_word_masked_8be(offs_t address, UINT16 mask); | |
| 1051 | 1100 | UINT32 data_read_dword_8be(offs_t address); |
| 1101 | UINT32 data_read_dword_masked_8be(offs_t address, UINT32 mask); | |
| 1052 | 1102 | UINT64 data_read_qword_8be(offs_t address); |
| 1103 | UINT64 data_read_qword_masked_8be(offs_t address, UINT64 mask); | |
| 1053 | 1104 | void data_write_byte_8be(offs_t address, UINT8 data); |
| 1054 | 1105 | void data_write_word_8be(offs_t address, UINT16 data); |
| 1106 | void data_write_word_masked_8be(offs_t address, UINT16 data, UINT16 mask); | |
| 1055 | 1107 | void data_write_dword_8be(offs_t address, UINT32 data); |
| 1108 | void data_write_dword_masked_8be(offs_t address, UINT32 data, UINT32 mask); | |
| 1056 | 1109 | void data_write_qword_8be(offs_t address, UINT64 data); |
| 1110 | void data_write_qword_masked_8be(offs_t address, UINT64 data, UINT64 mask); | |
| 1057 | 1111 | |
| 1058 | 1112 | UINT8 data_read_byte_16le(offs_t address); |
| 1059 | 1113 | UINT16 data_read_word_16le(offs_t address); |
| 1114 | UINT16 data_read_word_masked_16le(offs_t address, UINT16 mask); | |
| 1060 | 1115 | UINT32 data_read_dword_16le(offs_t address); |
| 1116 | UINT32 data_read_dword_masked_16le(offs_t address, UINT32 mask); | |
| 1061 | 1117 | UINT64 data_read_qword_16le(offs_t address); |
| 1118 | UINT64 data_read_qword_masked_16le(offs_t address, UINT64 mask); | |
| 1062 | 1119 | void data_write_byte_16le(offs_t address, UINT8 data); |
| 1063 | 1120 | void data_write_word_16le(offs_t address, UINT16 data); |
| 1121 | void data_write_word_masked_16le(offs_t address, UINT16 data, UINT16 mask); | |
| 1064 | 1122 | void data_write_dword_16le(offs_t address, UINT32 data); |
| 1123 | void data_write_dword_masked_16le(offs_t address, UINT32 data, UINT32 mask); | |
| 1065 | 1124 | void data_write_qword_16le(offs_t address, UINT64 data); |
| 1125 | void data_write_qword_masked_16le(offs_t address, UINT64 data, UINT64 mask); | |
| 1066 | 1126 | |
| 1067 | 1127 | UINT8 data_read_byte_16be(offs_t address); |
| 1068 | 1128 | UINT16 data_read_word_16be(offs_t address); |
| 1129 | UINT16 data_read_word_masked_16be(offs_t address, UINT16 mask); | |
| 1069 | 1130 | UINT32 data_read_dword_16be(offs_t address); |
| 1131 | UINT32 data_read_dword_masked_16be(offs_t address, UINT32 mask); | |
| 1070 | 1132 | UINT64 data_read_qword_16be(offs_t address); |
| 1133 | UINT64 data_read_qword_masked_16be(offs_t address, UINT64 mask); | |
| 1071 | 1134 | void data_write_byte_16be(offs_t address, UINT8 data); |
| 1072 | 1135 | void data_write_word_16be(offs_t address, UINT16 data); |
| 1136 | void data_write_word_masked_16be(offs_t address, UINT16 data, UINT16 mask); | |
| 1073 | 1137 | void data_write_dword_16be(offs_t address, UINT32 data); |
| 1138 | void data_write_dword_masked_16be(offs_t address, UINT32 data, UINT32 mask); | |
| 1074 | 1139 | void data_write_qword_16be(offs_t address, UINT64 data); |
| 1140 | void data_write_qword_masked_16be(offs_t address, UINT64 data, UINT64 mask); | |
| 1075 | 1141 | |
| 1076 | 1142 | UINT8 data_read_byte_32le(offs_t address); |
| 1077 | 1143 | UINT16 data_read_word_32le(offs_t address); |
| 1144 | UINT16 data_read_word_masked_32le(offs_t address, UINT16 mask); | |
| 1078 | 1145 | UINT32 data_read_dword_32le(offs_t address); |
| 1079 | UINT32 data_read_dword_masked_32le(offs_t address, UINT32 m | |
| 1146 | UINT32 data_read_dword_masked_32le(offs_t address, UINT32 m | |
| 1080 | 1147 | UINT64 data_read_qword_32le(offs_t address); |
| 1148 | UINT64 data_read_qword_masked_32le(offs_t address, UINT64 mask); | |
| 1081 | 1149 | void data_write_byte_32le(offs_t address, UINT8 data); |
| 1082 | 1150 | void data_write_word_32le(offs_t address, UINT16 data); |
| 1151 | void data_write_word_masked_32le(offs_t address, UINT16 data, UINT16 mask); | |
| 1083 | 1152 | void data_write_dword_32le(offs_t address, UINT32 data); |
| 1084 | void data_write_dword_masked_32le(offs_t address, UINT32 data, UINT32 m | |
| 1153 | void data_write_dword_masked_32le(offs_t address, UINT32 data, UINT32 m | |
| 1085 | 1154 | void data_write_qword_32le(offs_t address, UINT64 data); |
| 1155 | void data_write_qword_masked_32le(offs_t address, UINT64 data, UINT64 mask); | |
| 1086 | 1156 | |
| 1087 | 1157 | UINT8 data_read_byte_32be(offs_t address); |
| 1088 | 1158 | UINT16 data_read_word_32be(offs_t address); |
| 1159 | UINT16 data_read_word_masked_32be(offs_t address, UINT16 mask); | |
| 1089 | 1160 | UINT32 data_read_dword_32be(offs_t address); |
| 1090 | UINT32 data_read_dword_masked_32be(offs_t address, UINT32 m | |
| 1161 | UINT32 data_read_dword_masked_32be(offs_t address, UINT32 m | |
| 1091 | 1162 | UINT64 data_read_qword_32be(offs_t address); |
| 1163 | UINT64 data_read_qword_masked_32be(offs_t address, UINT64 mask); | |
| 1092 | 1164 | void data_write_byte_32be(offs_t address, UINT8 data); |
| 1093 | 1165 | void data_write_word_32be(offs_t address, UINT16 data); |
| 1166 | void data_write_word_masked_32be(offs_t address, UINT16 data, UINT16 mask); | |
| 1094 | 1167 | void data_write_dword_32be(offs_t address, UINT32 data); |
| 1095 | void data_write_dword_masked_32be(offs_t address, UINT32 data, UINT32 m | |
| 1168 | void data_write_dword_masked_32be(offs_t address, UINT32 data, UINT32 m | |
| 1096 | 1169 | void data_write_qword_32be(offs_t address, UINT64 data); |
| 1170 | void data_write_qword_masked_32be(offs_t address, UINT64 data, UINT64 mask); | |
| 1097 | 1171 | |
| 1098 | 1172 | UINT8 data_read_byte_64le(offs_t address); |
| 1099 | 1173 | UINT16 data_read_word_64le(offs_t address); |
| 1174 | UINT16 data_read_word_masked_64le(offs_t address, UINT16 mask); | |
| 1100 | 1175 | UINT32 data_read_dword_64le(offs_t address); |
| 1176 | UINT32 data_read_dword_masked_64le(offs_t address, UINT32 mask); | |
| 1101 | 1177 | UINT64 data_read_qword_64le(offs_t address); |
| 1102 | UINT64 data_read_qword_masked_64le(offs_t address, UINT64 m | |
| 1178 | UINT64 data_read_qword_masked_64le(offs_t address, UINT64 m | |
| 1103 | 1179 | void data_write_byte_64le(offs_t address, UINT8 data); |
| 1104 | 1180 | void data_write_word_64le(offs_t address, UINT16 data); |
| 1181 | void data_write_word_masked_64le(offs_t address, UINT16 data, UINT16 mask); | |
| 1105 | 1182 | void data_write_dword_64le(offs_t address, UINT32 data); |
| 1183 | void data_write_dword_masked_64le(offs_t address, UINT32 data, UINT32 mask); | |
| 1106 | 1184 | void data_write_qword_64le(offs_t address, UINT64 data); |
| 1107 | void data_write_qword_masked_64le(offs_t address, UINT64 data, UINT64 m | |
| 1185 | void data_write_qword_masked_64le(offs_t address, UINT64 data, UINT64 m | |
| 1108 | 1186 | |
| 1109 | 1187 | UINT8 data_read_byte_64be(offs_t address); |
| 1110 | 1188 | UINT16 data_read_word_64be(offs_t address); |
| 1189 | UINT16 data_read_word_masked_64be(offs_t address, UINT16 mask); | |
| 1111 | 1190 | UINT32 data_read_dword_64be(offs_t address); |
| 1191 | UINT32 data_read_dword_masked_64be(offs_t address, UINT32 mask); | |
| 1112 | 1192 | UINT64 data_read_qword_64be(offs_t address); |
| 1113 | UINT64 data_read_qword_masked_64be(offs_t address, UINT64 m | |
| 1193 | UINT64 data_read_qword_masked_64be(offs_t address, UINT64 m | |
| 1114 | 1194 | void data_write_byte_64be(offs_t address, UINT8 data); |
| 1115 | 1195 | void data_write_word_64be(offs_t address, UINT16 data); |
| 1196 | void data_write_word_masked_64be(offs_t address, UINT16 data, UINT16 mask); | |
| 1116 | 1197 | void data_write_dword_64be(offs_t address, UINT32 data); |
| 1198 | void data_write_dword_masked_64be(offs_t address, UINT32 data, UINT32 mask); | |
| 1117 | 1199 | void data_write_qword_64be(offs_t address, UINT64 data); |
| 1118 | void data_write_qword_masked_64be(offs_t address, UINT64 data, UINT64 m | |
| 1200 | void data_write_qword_masked_64be(offs_t address, UINT64 data, UINT64 m | |
| 1119 | 1201 | |
| 1120 | 1202 | |
| 1121 | 1203 | /* declare io address space handlers */ |
| 1122 | 1204 | UINT8 io_read_byte_8le(offs_t address); |
| 1123 | 1205 | UINT16 io_read_word_8le(offs_t address); |
| 1206 | UINT16 io_read_word_masked_8le(offs_t address, UINT16 mask); | |
| 1124 | 1207 | UINT32 io_read_dword_8le(offs_t address); |
| 1208 | UINT32 io_read_dword_masked_8le(offs_t address, UINT32 mask); | |
| 1125 | 1209 | UINT64 io_read_qword_8le(offs_t address); |
| 1210 | UINT64 io_read_qword_masked_8le(offs_t address, UINT64 mask); | |
| 1126 | 1211 | void io_write_byte_8le(offs_t address, UINT8 data); |
| 1127 | 1212 | void io_write_word_8le(offs_t address, UINT16 data); |
| 1213 | void io_write_word_masked_8le(offs_t address, UINT16 data, UINT16 mask); | |
| 1128 | 1214 | void io_write_dword_8le(offs_t address, UINT32 data); |
| 1215 | void io_write_dword_masked_8le(offs_t address, UINT32 data, UINT32 mask); | |
| 1129 | 1216 | void io_write_qword_8le(offs_t address, UINT64 data); |
| 1217 | void io_write_qword_masked_8le(offs_t address, UINT64 data, UINT64 mask); | |
| 1130 | 1218 | |
| 1131 | 1219 | UINT8 io_read_byte_8be(offs_t address); |
| 1132 | 1220 | UINT16 io_read_word_8be(offs_t address); |
| 1221 | UINT16 io_read_word_masked_8be(offs_t address, UINT16 mask); | |
| 1133 | 1222 | UINT32 io_read_dword_8be(offs_t address); |
| 1223 | UINT32 io_read_dword_masked_8be(offs_t address, UINT32 mask); | |
| 1134 | 1224 | UINT64 io_read_qword_8be(offs_t address); |
| 1225 | UINT64 io_read_qword_masked_8be(offs_t address, UINT64 mask); | |
| 1135 | 1226 | void io_write_byte_8be(offs_t address, UINT8 data); |
| 1136 | 1227 | void io_write_word_8be(offs_t address, UINT16 data); |
| 1228 | void io_write_word_masked_8be(offs_t address, UINT16 data, UINT16 mask); | |
| 1137 | 1229 | void io_write_dword_8be(offs_t address, UINT32 data); |
| 1230 | void io_write_dword_masked_8be(offs_t address, UINT32 data, UINT32 mask); | |
| 1138 | 1231 | void io_write_qword_8be(offs_t address, UINT64 data); |
| 1232 | void io_write_qword_masked_8be(offs_t address, UINT64 data, UINT64 mask); | |
| 1139 | 1233 | |
| 1140 | 1234 | UINT8 io_read_byte_16le(offs_t address); |
| 1141 | 1235 | UINT16 io_read_word_16le(offs_t address); |
| 1236 | UINT16 io_read_word_masked_16le(offs_t address, UINT16 mask); | |
| 1142 | 1237 | UINT32 io_read_dword_16le(offs_t address); |
| 1238 | UINT32 io_read_dword_masked_16le(offs_t address, UINT32 mask); | |
| 1143 | 1239 | UINT64 io_read_qword_16le(offs_t address); |
| 1240 | UINT64 io_read_qword_masked_16le(offs_t address, UINT64 mask); | |
| 1144 | 1241 | void io_write_byte_16le(offs_t address, UINT8 data); |
| 1145 | 1242 | void io_write_word_16le(offs_t address, UINT16 data); |
| 1243 | void io_write_word_masked_16le(offs_t address, UINT16 data, UINT16 mask); | |
| 1146 | 1244 | void io_write_dword_16le(offs_t address, UINT32 data); |
| 1245 | void io_write_dword_masked_16le(offs_t address, UINT32 data, UINT32 mask); | |
| 1147 | 1246 | void io_write_qword_16le(offs_t address, UINT64 data); |
| 1247 | void io_write_qword_masked_16le(offs_t address, UINT64 data, UINT64 mask); | |
| 1148 | 1248 | |
| 1149 | 1249 | UINT8 io_read_byte_16be(offs_t address); |
| 1150 | 1250 | UINT16 io_read_word_16be(offs_t address); |
| 1251 | UINT16 io_read_word_masked_16be(offs_t address, UINT16 mask); | |
| 1151 | 1252 | UINT32 io_read_dword_16be(offs_t address); |
| 1253 | UINT32 io_read_dword_masked_16be(offs_t address, UINT32 mask); | |
| 1152 | 1254 | UINT64 io_read_qword_16be(offs_t address); |
| 1255 | UINT64 io_read_qword_masked_16be(offs_t address, UINT64 mask); | |
| 1153 | 1256 | void io_write_byte_16be(offs_t address, UINT8 data); |
| 1154 | 1257 | void io_write_word_16be(offs_t address, UINT16 data); |
| 1258 | void io_write_word_masked_16be(offs_t address, UINT16 data, UINT16 mask); | |
| 1155 | 1259 | void io_write_dword_16be(offs_t address, UINT32 data); |
| 1260 | void io_write_dword_masked_16be(offs_t address, UINT32 data, UINT32 mask); | |
| 1156 | 1261 | void io_write_qword_16be(offs_t address, UINT64 data); |
| 1262 | void io_write_qword_masked_16be(offs_t address, UINT64 data, UINT64 mask); | |
| 1157 | 1263 | |
| 1158 | 1264 | UINT8 io_read_byte_32le(offs_t address); |
| 1159 | 1265 | UINT16 io_read_word_32le(offs_t address); |
| 1266 | UINT16 io_read_word_masked_32le(offs_t address, UINT16 mask); | |
| 1160 | 1267 | UINT32 io_read_dword_32le(offs_t address); |
| 1161 | UINT32 io_read_dword_masked_32le(offs_t address, UINT32 m | |
| 1268 | UINT32 io_read_dword_masked_32le(offs_t address, UINT32 m | |
| 1162 | 1269 | UINT64 io_read_qword_32le(offs_t address); |
| 1270 | UINT64 io_read_qword_masked_32le(offs_t address, UINT64 mask); | |
| 1163 | 1271 | void io_write_byte_32le(offs_t address, UINT8 data); |
| 1164 | 1272 | void io_write_word_32le(offs_t address, UINT16 data); |
| 1273 | void io_write_word_masked_32le(offs_t address, UINT16 data, UINT16 mask); | |
| 1165 | 1274 | void io_write_dword_32le(offs_t address, UINT32 data); |
| 1166 | void io_write_dword_masked_32le(offs_t address, UINT32 data, UINT32 m | |
| 1275 | void io_write_dword_masked_32le(offs_t address, UINT32 data, UINT32 m | |
| 1167 | 1276 | void io_write_qword_32le(offs_t address, UINT64 data); |
| 1277 | void io_write_qword_masked_32le(offs_t address, UINT64 data, UINT64 mask); | |
| 1168 | 1278 | |
| 1169 | 1279 | UINT8 io_read_byte_32be(offs_t address); |
| 1170 | 1280 | UINT16 io_read_word_32be(offs_t address); |
| 1281 | UINT16 io_read_word_masked_32be(offs_t address, UINT16 mask); | |
| 1171 | 1282 | UINT32 io_read_dword_32be(offs_t address); |
| 1172 | UINT32 io_read_dword_masked_32be(offs_t address, UINT32 m | |
| 1283 | UINT32 io_read_dword_masked_32be(offs_t address, UINT32 m | |
| 1173 | 1284 | UINT64 io_read_qword_32be(offs_t address); |
| 1285 | UINT64 io_read_qword_masked_32be(offs_t address, UINT64 mask); | |
| 1174 | 1286 | void io_write_byte_32be(offs_t address, UINT8 data); |
| 1175 | 1287 | void io_write_word_32be(offs_t address, UINT16 data); |
| 1288 | void io_write_word_masked_32be(offs_t address, UINT16 data, UINT16 mask); | |
| 1176 | 1289 | void io_write_dword_32be(offs_t address, UINT32 data); |
| 1177 | void io_write_dword_masked_32be(offs_t address, UINT32 data, UINT32 m | |
| 1290 | void io_write_dword_masked_32be(offs_t address, UINT32 data, UINT32 m | |
| 1178 | 1291 | void io_write_qword_32be(offs_t address, UINT64 data); |
| 1292 | void io_write_qword_masked_32be(offs_t address, UINT64 data, UINT64 mask); | |
| 1179 | 1293 | |
| 1180 | 1294 | UINT8 io_read_byte_64le(offs_t address); |
| 1181 | 1295 | UINT16 io_read_word_64le(offs_t address); |
| 1296 | UINT16 io_read_word_masked_64le(offs_t address, UINT16 mask); | |
| 1182 | 1297 | UINT32 io_read_dword_64le(offs_t address); |
| 1298 | UINT32 io_read_dword_masked_64le(offs_t address, UINT32 mask); | |
| 1183 | 1299 | UINT64 io_read_qword_64le(offs_t address); |
| 1184 | UINT64 io_read_qword_masked_64le(offs_t address, UINT64 m | |
| 1300 | UINT64 io_read_qword_masked_64le(offs_t address, UINT64 m | |
| 1185 | 1301 | void io_write_byte_64le(offs_t address, UINT8 data); |
| 1186 | 1302 | void io_write_word_64le(offs_t address, UINT16 data); |
| 1303 | void io_write_word_masked_64le(offs_t address, UINT16 data, UINT16 mask); | |
| 1187 | 1304 | void io_write_dword_64le(offs_t address, UINT32 data); |
| 1305 | void io_write_dword_masked_64le(offs_t address, UINT32 data, UINT32 mask); | |
| 1188 | 1306 | void io_write_qword_64le(offs_t address, UINT64 data); |
| 1189 | void io_write_qword_masked_64le(offs_t address, UINT64 data, UINT64 m | |
| 1307 | void io_write_qword_masked_64le(offs_t address, UINT64 data, UINT64 m | |
| 1190 | 1308 | |
| 1191 | 1309 | UINT8 io_read_byte_64be(offs_t address); |
| 1192 | 1310 | UINT16 io_read_word_64be(offs_t address); |
| 1311 | UINT16 io_read_word_masked_64be(offs_t address, UINT16 mask); | |
| 1193 | 1312 | UINT32 io_read_dword_64be(offs_t address); |
| 1313 | UINT32 io_read_dword_masked_64be(offs_t address, UINT32 mask); | |
| 1194 | 1314 | UINT64 io_read_qword_64be(offs_t address); |
| 1195 | UINT64 io_read_qword_masked_64be(offs_t address, UINT64 m | |
| 1315 | UINT64 io_read_qword_masked_64be(offs_t address, UINT64 m | |
| 1196 | 1316 | void io_write_byte_64be(offs_t address, UINT8 data); |
| 1197 | 1317 | void io_write_word_64be(offs_t address, UINT16 data); |
| 1318 | void io_write_word_masked_64be(offs_t address, UINT16 data, UINT16 mask); | |
| 1198 | 1319 | void io_write_dword_64be(offs_t address, UINT32 data); |
| 1320 | void io_write_dword_masked_64be(offs_t address, UINT32 data, UINT32 mask); | |
| 1199 | 1321 | void io_write_qword_64be(offs_t address, UINT64 data); |
| 1200 | void io_write_qword_masked_64be(offs_t address, UINT64 data, UINT64 m | |
| 1322 | void io_write_qword_masked_64be(offs_t address, UINT64 data, UINT64 m | |
| 1201 | 1323 | |
| 1202 | 1324 | |
| 1203 | 1325 | #endif /* __MEMORY_H__ */ |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | ***************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "driver.h" |
| 8 | #include "deprecat.h" | |
| 9 | 8 | #include "machine/msm6242.h" |
| 10 | 9 | |
| 11 | 10 | static UINT8 msm6264_reg[3] = { 0, 0, 0 }; |
| r2454 | r2455 | |
| 41 | 40 | } |
| 42 | 41 | else /* otherwise, use the current time */ |
| 43 | 42 | { |
| 44 | mame_get_current_datetime( | |
| 43 | mame_get_current_datetime(machine, &curtime); | |
| 45 | 44 | } |
| 46 | 45 | |
| 47 | 46 | switch(offset) |
| r2454 | r2455 | |
| 53 | 52 | case MSM6264_REG_H1: |
| 54 | 53 | case MSM6264_REG_H10: |
| 55 | 54 | { |
| 55 | int hour = systime->local_time.hour; | |
| 56 | ||
| 56 | 57 | /* check for 12/24 hour mode */ |
| 57 | 58 | if ( (msm6264_reg[2] & 0x04) == 0 ) /* 12 hour mode? */ |
| 58 | 59 | { |
| 59 | int hour = systime->local_time.hour; | |
| 60 | int pm = (hour >= 12) ? 1 : 0; | |
| 60 | hour %= 12; | |
| 61 | 61 | |
| 62 | if ( pm ) hour -= 12; | |
| 63 | if ( hour == 0 ) hour = 12; | |
| 64 | ||
| 65 | if ( offset == MSM6264_REG_H1 ) | |
| 66 | return hour % 10; | |
| 67 | ||
| 68 | return (hour / 10) | (pm << 2); | |
| 62 | if ( hour == 0 ) | |
| 63 | hour = 12; | |
| 69 | 64 | } |
| 70 | 65 | |
| 71 | 66 | if ( offset == MSM6264_REG_H1 ) |
| 72 | return | |
| 67 | return | |
| 73 | 68 | |
| 74 | return | |
| 69 | return | |
| 75 | 70 | } |
| 76 | 71 | |
| 77 | 72 | case MSM6264_REG_D1: return systime->local_time.mday % 10; |
| 78 | 73 | case MSM6264_REG_D10: return systime->local_time.mday / 10; |
| 79 | 74 | case MSM6264_REG_MO1: return (systime->local_time.month+1) % 10; |
| 80 | 75 | case MSM6264_REG_MO10: return (systime->local_time.month+1) / 10; |
| 81 | case MSM6264_REG_Y1: return (systime->local_time.year - 1900) % 10; | |
| 82 | case MSM6264_REG_Y10: return (systime->local_time.year - 1900) / 10; | |
| 76 | case MSM6264_REG_Y1: return systime->local_time.year % 10; | |
| 77 | case MSM6264_REG_Y10: return (systime->local_time.year % 100) / 10; | |
| 83 | 78 | case MSM6264_REG_W: return systime->local_time.weekday; |
| 84 | 79 | case MSM6264_REG_CD: return msm6264_reg[0]; |
| 85 | 80 | case MSM6264_REG_CE: return msm6264_reg[1]; |
| r2454 | r2455 | |
| 100 | 95 | |
| 101 | 96 | if ( data & 1 ) /* was Hold set? */ |
| 102 | 97 | { |
| 103 | mame_get_current_datetime( | |
| 98 | mame_get_current_datetime(machine, &msm6264_hold_time); | |
| 104 | 99 | } |
| 105 | 100 | |
| 106 | 101 | return; |
| r2454 | r2455 | |
|---|---|---|
| 7 | 7 | #include "driver.h" |
| 8 | 8 | #include "idectrl.h" |
| 9 | 9 | #include "debugger.h" |
| 10 | #include "deprecat.h" | |
| 11 | 10 | |
| 12 | 11 | |
| 13 | 12 | /*************************************************************************** |
| r0 | r2455 | |
|---|---|---|
| 1 | /* | |
| 2 | 68681 DUART | |
| 3 | ||
| 4 | Written by Mariusz Wojcieszek | |
| 5 | ||
| 6 | Emulation is preliminary, only features required by Touch Master games are implemented | |
| 7 | ||
| 8 | ToDo: | |
| 9 | - interrupts other than RXRDY | |
| 10 | - timer/counter | |
| 11 | - input port | |
| 12 | - input port change | |
| 13 | - output port | |
| 14 | - output port when used as control signals | |
| 15 | - MAME device interface | |
| 16 | - multiple instances | |
| 17 | */ | |
| 18 | ||
| 19 | #include "driver.h" | |
| 20 | ||
| 21 | #define INT_INPUT_PORT_CHANGE 0x80 | |
| 22 | #define INT_DELTA_BREAK_B 0x40 | |
| 23 | #define INT_RXRDY_FFULLB 0x20 | |
| 24 | #define INT_TXRDYB 0x10 | |
| 25 | #define INT_COUNTER_READY 0x08 | |
| 26 | #define INT_DELTA_BREAK_A 0x04 | |
| 27 | #define INT_RXRDY_FFULLA 0x02 | |
| 28 | #define INT_TXRDYA 0x01 | |
| 29 | ||
| 30 | #define STATUS_RECEIVED_BREAK 0x80 | |
| 31 | #define STATUS_FRAMING_ERROR 0x40 | |
| 32 | #define STATUS_PARITY_ERROR 0x20 | |
| 33 | #define STATUS_OVERRUN_ERROR 0x10 | |
| 34 | #define STATUS_TRANSMITTER_EMPTY 0x08 | |
| 35 | #define STATUS_TRANSMITTER_READY 0x04 | |
| 36 | #define STATUS_FIFO_FULL 0x02 | |
| 37 | #define STATUS_RECEIVER_READY 0x01 | |
| 38 | ||
| 39 | #define MODE_RX_INT_SELECT_BIT 6 | |
| 40 | ||
| 41 | #define RX_FIFO_SIZE 3 | |
| 42 | ||
| 43 | typedef struct | |
| 44 | { | |
| 45 | /* Registers */ | |
| 46 | UINT8 CR; /* Command register */ | |
| 47 | UINT8 CSR; /* Clock select register */ | |
| 48 | UINT8 MR1; /* Mode register 1 */ | |
| 49 | UINT8 MR2; /* Mode register 2 */ | |
| 50 | UINT8 MR_ptr; /* Mode register pointer */ | |
| 51 | UINT8 SR; /* Status register */ | |
| 52 | ||
| 53 | /* State */ | |
| 54 | int baud_rate; | |
| 55 | ||
| 56 | /* Receiver */ | |
| 57 | UINT8 rx_enabled; | |
| 58 | UINT8 rx_fifo[RX_FIFO_SIZE]; | |
| 59 | int rx_fifo_read_ptr; | |
| 60 | int rx_fifo_write_ptr; | |
| 61 | int rx_fifo_num; | |
| 62 | ||
| 63 | /* Transmitter */ | |
| 64 | UINT8 tx_enabled; | |
| 65 | UINT8 tx_data; | |
| 66 | UINT8 tx_ready; | |
| 67 | emu_timer *tx_timer; | |
| 68 | ||
| 69 | } DUART_68681_CHANNEL; | |
| 70 | ||
| 71 | typedef struct | |
| 72 | { | |
| 73 | int frequency; | |
| 74 | ||
| 75 | // registers | |
| 76 | UINT8 ACR; /* Auxiliary Control Register */ | |
| 77 | UINT8 IMR; /* Interrupt Mask Register */ | |
| 78 | UINT8 ISR; /* Interrupt Status Register */ | |
| 79 | UINT8 IVR; /* Interrupt Vector Register */ | |
| 80 | UINT8 OPCR; /* Output Port Conf. Register */ | |
| 81 | ||
| 82 | // state | |
| 83 | UINT8 IP_last_state; /* last state of IP bits */ | |
| 84 | ||
| 85 | // callbacks | |
| 86 | UINT8 (*input_port_read)(void); | |
| 87 | void (*tx_callback)(int channel, UINT8 data); | |
| 88 | void (*irq_handler)(UINT8 vector); | |
| 89 | ||
| 90 | DUART_68681_CHANNEL channel[2]; | |
| 91 | } DUART_68681; | |
| 92 | ||
| 93 | static DUART_68681 duart_68681; | |
| 94 | ||
| 95 | static void duart_68681_update_interrupts( void ) | |
| 96 | { | |
| 97 | if ( (duart_68681.ISR & duart_68681.IMR) != 0 ) | |
| 98 | { | |
| 99 | if ( duart_68681.irq_handler ) | |
| 100 | { | |
| 101 | duart_68681.irq_handler( duart_68681.IVR ); | |
| 102 | } | |
| 103 | } | |
| 104 | }; | |
| 105 | ||
| 106 | static void duart_68681_write_MR( int ch, UINT8 data ) | |
| 107 | { | |
| 108 | if ( duart_68681.channel[ch].MR_ptr == 0 ) | |
| 109 | { | |
| 110 | duart_68681.channel[ch].MR1 = data; | |
| 111 | // TODO: | |
| 112 | duart_68681.channel[ch].MR_ptr = 1; | |
| 113 | } | |
| 114 | else | |
| 115 | { | |
| 116 | duart_68681.channel[ch].MR2 = data; | |
| 117 | // TODO: | |
| 118 | } | |
| 119 | }; | |
| 120 | ||
| 121 | static void duart_68681_write_CSR(int ch, UINT8 data, UINT8 ACR) | |
| 122 | { | |
| 123 | const int baud_rate_ACR_0[] = { 50, 110, 134, 200, 300, 600, 1200, 1050, 2400, 4800, 7200, 9600, 38400, 0, 0, 0 }; | |
| 124 | const int baud_rate_ACR_1[] = { 75, 110, 134, 150, 300, 600, 1200, 2000, 2400, 4800, 1800, 9600, 19200, 0, 0, 0 }; | |
| 125 | ||
| 126 | duart_68681.channel[ch].CSR = data; | |
| 127 | ||
| 128 | if ( BIT(ACR,7) == 0 ) | |
| 129 | { | |
| 130 | duart_68681.channel[ch].baud_rate = baud_rate_ACR_0[data & 0x0f]; | |
| 131 | } | |
| 132 | else | |
| 133 | { | |
| 134 | duart_68681.channel[ch].baud_rate = baud_rate_ACR_1[data & 0x0f]; | |
| 135 | } | |
| 136 | if ( duart_68681.channel[ch].baud_rate == 0 ) | |
| 137 | { | |
| 138 | logerror( "Unsupported transmitter clock: channel %d, clock select = %02x\n", ch, data ); | |
| 139 | } | |
| 140 | }; | |
| 141 | ||
| 142 | static void duart_68681_write_CR(int ch, UINT8 data) | |
| 143 | { | |
| 144 | duart_68681.channel[ch].CR = data; | |
| 145 | if ( BIT(data,0) ) | |
| 146 | { | |
| 147 | duart_68681.channel[ch].rx_enabled = 1; | |
| 148 | } | |
| 149 | if ( BIT(data,1) ) | |
| 150 | { | |
| 151 | duart_68681.channel[ch].rx_enabled = 0; | |
| 152 | duart_68681.channel[ch].SR &= ~STATUS_RECEIVER_READY; | |
| 153 | } | |
| 154 | ||
| 155 | if ( BIT(data,2) ) | |
| 156 | { | |
| 157 | duart_68681.channel[ch].tx_enabled = 1; | |
| 158 | duart_68681.channel[ch].tx_ready = 1; | |
| 159 | duart_68681.channel[ch].SR |= STATUS_TRANSMITTER_READY; | |
| 160 | } | |
| 161 | if ( BIT(data,3) ) | |
| 162 | { | |
| 163 | duart_68681.channel[ch].tx_enabled = 0; | |
| 164 | duart_68681.channel[ch].tx_ready = 0; | |
| 165 | duart_68681.channel[ch].SR &= ~STATUS_TRANSMITTER_READY; | |
| 166 | } | |
| 167 | ||
| 168 | switch( (data >> 4) & 0x07 ) | |
| 169 | { | |
| 170 | case 0: /* No command */ | |
| 171 | break; | |
| 172 | case 1: /* Reset MR pointer. Causes the Channel A MR pointer to point to MR1 */ | |
| 173 | duart_68681.channel[ch].MR_ptr = 0; | |
| 174 | break; | |
| 175 | case 2: /* Reset channel A receiver (disable receiver and flush fifo) */ | |
| 176 | duart_68681.channel[ch].rx_enabled = 0; | |
| 177 | duart_68681.channel[ch].SR &= ~STATUS_RECEIVER_READY; | |
| 178 | duart_68681.channel[ch].rx_fifo_read_ptr = 0; | |
| 179 | duart_68681.channel[ch].rx_fifo_write_ptr = 0; | |
| 180 | duart_68681.channel[ch].rx_fifo_num = 0; | |
| 181 | break; | |
| 182 | case 3: /* Reset channel A transmitter */ | |
| 183 | //TODO: | |
| 184 | break; | |
| 185 | case 4: /* Reset Error Status */ | |
| 186 | // TODO: | |
| 187 | duart_68681.channel[ch].SR &= ~(STATUS_RECEIVED_BREAK | STATUS_FRAMING_ERROR | STATUS_PARITY_ERROR | STATUS_OVERRUN_ERROR); | |
| 188 | break; | |
| 189 | default: | |
| 190 | logerror( "68681: Unhandled command (%x) in CR%d\n", ch, (data >> 4) & 0x07 ); | |
| 191 | break; | |
| 192 | } | |
| 193 | }; | |
| 194 | ||
| 195 | static UINT8 duart_68681_read_rx_fifo( int ch ) | |
| 196 | { | |
| 197 | UINT8 r; | |
| 198 | ||
| 199 | if ( duart_68681.channel[ch].rx_fifo_num == 0 ) | |
| 200 | { | |
| 201 | logerror( "68681: rx fifo underflow\n" ); | |
| 202 | return 0; | |
| 203 | } | |
| 204 | ||
| 205 | r = duart_68681.channel[ch].rx_fifo[duart_68681.channel[ch].rx_fifo_read_ptr++]; | |
| 206 | if ( duart_68681.channel[ch].rx_fifo_read_ptr == RX_FIFO_SIZE ) | |
| 207 | { | |
| 208 | duart_68681.channel[ch].rx_fifo_read_ptr = 0; | |
| 209 | } | |
| 210 | ||
| 211 | duart_68681.channel[ch].rx_fifo_num--; | |
| 212 | ||
| 213 | if ( duart_68681.channel[ch].rx_fifo_num > 0 ) | |
| 214 | { | |
| 215 | duart_68681.channel[ch].SR |= STATUS_RECEIVER_READY; | |
| 216 | if ( ch == 0 ) | |
| 217 | { | |
| 218 | duart_68681.ISR |= INT_RXRDY_FFULLA; | |
| 219 | } | |
| 220 | else | |
| 221 | { | |
| 222 | duart_68681.ISR |= INT_RXRDY_FFULLB; | |
| 223 | } | |
| 224 | } | |
| 225 | else | |
| 226 | { | |
| 227 | duart_68681.channel[ch].SR &= ~STATUS_RECEIVER_READY; | |
| 228 | if ( ch == 0 ) | |
| 229 | { | |
| 230 | duart_68681.ISR &= ~INT_RXRDY_FFULLA; | |
| 231 | } | |
| 232 | else | |
| 233 | { | |
| 234 | duart_68681.ISR &= ~INT_RXRDY_FFULLB; | |
| 235 | } | |
| 236 | } | |
| 237 | duart_68681_update_interrupts(); | |
| 238 | return r; | |
| 239 | }; | |
| 240 | ||
| 241 | static TIMER_CALLBACK( tx_timer_callback ) | |
| 242 | { | |
| 243 | int ch = param & 1; | |
| 244 | ||
| 245 | if (duart_68681.tx_callback) | |
| 246 | duart_68681.tx_callback(ch, duart_68681.channel[ch].tx_data); | |
| 247 | ||
| 248 | duart_68681.channel[ch].tx_ready = 1; | |
| 249 | duart_68681.channel[ch].SR |= STATUS_TRANSMITTER_READY; | |
| 250 | ||
| 251 | if (ch == 0) | |
| 252 | duart_68681.ISR |= INT_TXRDYA; | |
| 253 | else | |
| 254 | duart_68681.ISR |= INT_TXRDYB; | |
| 255 | ||
| 256 | duart_68681_update_interrupts(); | |
| 257 | timer_adjust_oneshot(duart_68681.channel[ch].tx_timer, attotime_never, ch); | |
| 258 | }; | |
| 259 | ||
| 260 | static void duart_68681_write_TX(int ch, UINT8 data) | |
| 261 | { | |
| 262 | attotime period; | |
| 263 | ||
| 264 | duart_68681.channel[ch].tx_data = data; | |
| 265 | ||
| 266 | duart_68681.channel[ch].tx_ready = 0; | |
| 267 | duart_68681.channel[ch].SR &= ~STATUS_TRANSMITTER_READY; | |
| 268 | ||
| 269 | if (ch == 0) | |
| 270 | duart_68681.ISR &= ~INT_TXRDYA; | |
| 271 | else | |
| 272 | duart_68681.ISR &= ~INT_TXRDYB; | |
| 273 | ||
| 274 | duart_68681_update_interrupts(); | |
| 275 | ||
| 276 | period = ATTOTIME_IN_HZ(duart_68681.channel[ch].baud_rate / 10 ); | |
| 277 | timer_adjust_oneshot(duart_68681.channel[ch].tx_timer, period, ch); | |
| 278 | }; | |
| 279 | ||
| 280 | READ16_HANDLER(duart_68681_r) | |
| 281 | { | |
| 282 | UINT16 r = 0x0; | |
| 283 | ||
| 284 | //logerror( "Reading 68681 reg %x\n", offset ); | |
| 285 | switch (offset) | |
| 286 | { | |
| 287 | case 0x01: /* SRA */ | |
| 288 | r = duart_68681.channel[0].SR; | |
| 289 | break; | |
| 290 | case 0x03: /* Rx Holding Register A */ | |
| 291 | r = duart_68681_read_rx_fifo(0); | |
| 292 | break; | |
| 293 | case 0x04: /* IPCR */ | |
| 294 | { | |
| 295 | UINT8 IP; | |
| 296 | if ( duart_68681.input_port_read != NULL ) | |
| 297 | IP = duart_68681.input_port_read(); | |
| 298 | else | |
| 299 | IP = 0x0; | |
| 300 | ||
| 301 | r = (((duart_68681.IP_last_state ^ IP) & 0x0f) << 4) | (IP & 0x0f); | |
| 302 | duart_68681.IP_last_state = IP; | |
| 303 | duart_68681.ISR &= ~INT_INPUT_PORT_CHANGE; | |
| 304 | duart_68681_update_interrupts(); | |
| 305 | } | |
| 306 | break; | |
| 307 | case 0x09: /* SRB */ | |
| 308 | r = duart_68681.channel[1].SR; | |
| 309 | break; | |
| 310 | case 0x0b: /* RHRB */ | |
| 311 | r = duart_68681_read_rx_fifo(1); | |
| 312 | break; | |
| 313 | default: | |
| 314 | logerror( "Reading unhandled 68681 reg %x\n", offset ); | |
| 315 | break; | |
| 316 | } | |
| 317 | return r; | |
| 318 | } | |
| 319 | ||
| 320 | WRITE16_HANDLER(duart_68681_w) | |
| 321 | { | |
| 322 | //logerror( "Writing 68681 reg %x with %04x\n", offset, data ); | |
| 323 | switch(offset) | |
| 324 | { | |
| 325 | case 0x00: /* MRA */ | |
| 326 | duart_68681_write_MR(0, data); | |
| 327 | break; | |
| 328 | case 0x01: /* CSRA */ | |
| 329 | duart_68681_write_CSR(0, data, duart_68681.ACR); | |
| 330 | break; | |
| 331 | case 0x02: /* CRA */ | |
| 332 | duart_68681_write_CR(0, data); | |
| 333 | break; | |
| 334 | case 0x03: /* THRA */ | |
| 335 | duart_68681_write_TX(0, data); | |
| 336 | break; | |
| 337 | case 0x04: /* ACR */ | |
| 338 | duart_68681.ACR = data; | |
| 339 | // TODO: | |
| 340 | // bits 6-4: Counter/Timer Mode And Clock Source Select | |
| 341 | // bits 3-0: IP3-0 Change-Of-State Interrupt Enable | |
| 342 | duart_68681_write_CSR(0, duart_68681.channel[0].CSR, data); | |
| 343 | duart_68681_write_CSR(1, duart_68681.channel[1].CSR, data); | |
| 344 | break; | |
| 345 | case 0x05: /* IMR */ | |
| 346 | duart_68681.IMR = data; | |
| 347 | // TODO: handle update interrupts? | |
| 348 | break; | |
| 349 | case 0x08: /* MRB */ | |
| 350 | duart_68681_write_MR(1, data); | |
| 351 | break; | |
| 352 | case 0x09: /* CSRB */ | |
| 353 | duart_68681_write_CSR(1, data, duart_68681.ACR); | |
| 354 | break; | |
| 355 | case 0x0a: /* CRB */ | |
| 356 | duart_68681_write_CR(1, data); | |
| 357 | break; | |
| 358 | case 0x0b: /* THRB */ | |
| 359 | duart_68681_write_TX(1, data); | |
| 360 | break; | |
| 361 | case 0x0c: /* IVR */ | |
| 362 | duart_68681.IVR = data; | |
| 363 | break; | |
| 364 | case 0x0d: /* OPCR */ | |
| 365 | duart_68681.OPCR = data; | |
| 366 | break; | |
| 367 | case 0x0e: /* Set Output Port Bits */ | |
| 368 | // TODO: bits set to 1 causes corresponding output port bit to be set to 0 | |
| 369 | break; | |
| 370 | case 0x0f: /* Reset Output Port Bits */ | |
| 371 | // TODO: bits set to 1 causes corresponding output port bit to be set to 1 | |
| 372 | break; | |
| 373 | default: | |
| 374 | logerror( "Writing 68681 reg %x with %04x\n", offset, data ); | |
| 375 | break; | |
| 376 | } | |
| 377 | } | |
| 378 | ||
| 379 | void duart_68681_rx_data( int ch, UINT8 data ) | |
| 380 | { | |
| 381 | if ( duart_68681.channel[ch].rx_enabled ) | |
| 382 | { | |
| 383 | if ( duart_68681.channel[ch].rx_fifo_num >= RX_FIFO_SIZE ) | |
| 384 | { | |
| 385 | logerror( "68681: FIFO overflow\n" ); | |
| 386 | return; | |
| 387 | } | |
| 388 | duart_68681.channel[ch].rx_fifo[duart_68681.channel[ch].rx_fifo_write_ptr++] = data; | |
| 389 | if ( duart_68681.channel[ch].rx_fifo_write_ptr == RX_FIFO_SIZE ) | |
| 390 | { | |
| 391 | duart_68681.channel[ch].rx_fifo_write_ptr = 0; | |
| 392 | } | |
| 393 | duart_68681.channel[ch].rx_fifo_num++; | |
| 394 | ||
| 395 | duart_68681.channel[ch].SR |= STATUS_RECEIVER_READY; | |
| 396 | if ( BIT(duart_68681.channel[ch].MR1,MODE_RX_INT_SELECT_BIT) == 0 ) | |
| 397 | { | |
| 398 | duart_68681.ISR |= (ch == 0) ? INT_RXRDY_FFULLA : INT_RXRDY_FFULLB; | |
| 399 | } | |
| 400 | if ( duart_68681.channel[ch].rx_fifo_num == RX_FIFO_SIZE ) | |
| 401 | { | |
| 402 | duart_68681.channel[ch].SR |= STATUS_FIFO_FULL; | |
| 403 | if ( BIT(duart_68681.channel[ch].MR1,MODE_RX_INT_SELECT_BIT) == 1 ) | |
| 404 | { | |
| 405 | duart_68681.ISR |= (ch == 0) ? INT_RXRDY_FFULLA : INT_RXRDY_FFULLB; | |
| 406 | } | |
| 407 | } | |
| 408 | duart_68681_update_interrupts(); | |
| 409 | } | |
| 410 | }; | |
| 411 | ||
| 412 | void duart_68681_init(int frequency, void (*irq_handler)(UINT8 vector), void (*tx_callback)(int channel, UINT8 data)) | |
| 413 | { | |
| 414 | memset(&duart_68681, 0, sizeof(duart_68681)); | |
| 415 | ||
| 416 | duart_68681.frequency = frequency; | |
| 417 | duart_68681.tx_callback = tx_callback; | |
| 418 | duart_68681.irq_handler = irq_handler; | |
| 419 | ||
| 420 | // allocate timers | |
| 421 | duart_68681.channel[0].tx_timer = timer_alloc(tx_timer_callback, NULL); | |
| 422 | timer_adjust_oneshot(duart_68681.channel[0].tx_timer, attotime_never, 0); | |
| 423 | ||
| 424 | duart_68681.channel[1].tx_timer = timer_alloc(tx_timer_callback, NULL); | |
| 425 | timer_adjust_oneshot(duart_68681.channel[1].tx_timer, attotime_never, 1); | |
| 426 | }; |
| r2454 | r2455 | |
|---|---|---|
| 337 | 337 | UINT8 write_data = (v->out_b & v->ddr_b) | (v->ddr_b ^ 0xff); |
| 338 | 338 | |
| 339 | 339 | if (v->intf->out_b_func) |
| 340 | v->intf->out_b_func( | |
| 340 | v->intf->out_b_func(machine, 0, write_data); | |
| 341 | 341 | else |
| 342 | 342 | logerror("6522VIA chip %d: Port B is being written to but has no handler. PC: %08X - %02X\n", which, safe_activecpu_get_pc(), write_data); |
| 343 | 343 | } |
| r0 | r2455 | |
|---|---|---|
| 1 | #ifndef _68681_H | |
| 2 | #define _68681_H | |
| 3 | ||
| 4 | void duart_68681_init(int frequency, void (*irq_handler)(UINT8 vector), void (*tx_callback)(int channel, UINT8 data)); | |
| 5 | void duart_68681_rx_data( int ch, UINT8 data ); | |
| 6 | ||
| 7 | READ16_HANDLER(duart_68681_r); | |
| 8 | WRITE16_HANDLER(duart_68681_w); | |
| 9 | ||
| 10 | #endif //_68681_H |
| r2454 | r2455 | |
|---|---|---|
| 45 | 45 | static const int states[] = { 0, 0, 1, 1, 2, 3, 4, 5, 6, 7, 0 }; |
| 46 | 46 | |
| 47 | 47 | reg = offset * 2; |
| 48 | if (mem_mask == 0x | |
| 48 | if (mem_mask == 0x | |
| 49 | 49 | { |
| 50 | 50 | shift = 0; |
| 51 | 51 | } |
| r2454 | r2455 | |
| 96 | 96 | |
| 97 | 97 | reg = offset * 2; |
| 98 | 98 | val = data; |
| 99 | if (mem_mask == 0x | |
| 99 | if (mem_mask == 0x | |
| 100 | 100 | { |
| 101 | 101 | } |
| 102 | 102 | else |
| r2454 | r2455 | |
|---|---|---|
| 489 | 489 | |
| 490 | 490 | READ8_HANDLER( z80dma_0_r ) |
| 491 | 491 | { |
| 492 | z80dma_t *z80dma = devtag_get_token( | |
| 492 | z80dma_t *z80dma = devtag_get_token(machine, Z80DMA, Z80DMA_DEV_0_TAG); | |
| 493 | 493 | |
| 494 | 494 | return z80dma_read(z80dma); |
| 495 | 495 | } |
| 496 | 496 | |
| 497 | 497 | READ8_HANDLER( z80dma_1_r ) |
| 498 | 498 | { |
| 499 | z80dma_t *z80dma = devtag_get_token( | |
| 499 | z80dma_t *z80dma = devtag_get_token(machine, Z80DMA, Z80DMA_DEV_1_TAG); | |
| 500 | 500 | |
| 501 | 501 | return z80dma_read(z80dma); |
| 502 | 502 | } |
| 503 | 503 | |
| 504 | 504 | WRITE8_HANDLER( z80dma_0_w ) |
| 505 | 505 | { |
| 506 | z80dma_t *z80dma = devtag_get_token( | |
| 506 | z80dma_t *z80dma = devtag_get_token(machine, Z80DMA, Z80DMA_DEV_0_TAG); | |
| 507 | 507 | |
| 508 | 508 | z80dma_write(z80dma, data); |
| 509 | 509 | } |
| 510 | 510 | |
| 511 | 511 | WRITE8_HANDLER( z80dma_1_w ) |
| 512 | 512 | { |
| 513 | z80dma_t *z80dma = devtag_get_token( | |
| 513 | z80dma_t *z80dma = devtag_get_token(machine, Z80DMA, Z80DMA_DEV_1_TAG); | |
| 514 | 514 | |
| 515 | 515 | z80dma_write(z80dma, data); |
| 516 | 516 | } |
| 517 | 517 | |
| 518 | 518 | WRITE8_HANDLER( z80dma_0_rdy_w ) |
| 519 | 519 | { |
| 520 | z80dma_t *z80dma = devtag_get_token( | |
| 520 | z80dma_t *z80dma = devtag_get_token(machine, Z80DMA, Z80DMA_DEV_0_TAG); | |
| 521 | 521 | |
| 522 | 522 | z80dma_rdy_write(z80dma, data); |
| 523 | 523 | } |
| 524 | 524 | |
| 525 | 525 | WRITE8_HANDLER( z80dma_1_rdy_w ) |
| 526 | 526 | { |
| 527 | z80dma_t *z80dma = devtag_get_token( | |
| 527 | z80dma_t *z80dma = devtag_get_token(machine, Z80DMA, Z80DMA_DEV_1_TAG); | |
| 528 | 528 | |
| 529 | 529 | z80dma_rdy_write(z80dma, data); |
| 530 | 530 | } |
| r2454 | r2455 | |
|---|---|---|
| 440 | 440 | } |
| 441 | 441 | |
| 442 | 442 | if (LOG_ETHERNET && offset != EREG_BANK) |
| 443 | logerror("%08X:ethernet_r(%s) = %04X & %04X\n", activecpu_get_pc(), ethernet_regname[offset], result, mem_mask | |
| 443 | logerror("%08X:ethernet_r(%s) = %04X & %04X\n", activecpu_get_pc(), ethernet_regname[offset], result, mem_mask | |
| 444 | 444 | return result; |
| 445 | 445 | } |
| 446 | 446 | |
| r2454 | r2455 | |
| 463 | 463 | |
| 464 | 464 | /* update the data generically */ |
| 465 | 465 | olddata = ethernet.reg[offset]; |
| 466 | mem_mask | |
| 466 | mem_mask &= | |
| 467 | 467 | COMBINE_DATA(ðernet.reg[offset]); |
| 468 | 468 | |
| 469 | 469 | if (LOG_ETHERNET && offset != 7) |
| 470 | logerror("%08X:ethernet_w(%s) = %04X & %04X\n", activecpu_get_pc(), ethernet_regname[offset], data, mem_mask | |
| 470 | logerror("%08X:ethernet_w(%s) = %04X & %04X\n", activecpu_get_pc(), ethernet_regname[offset], data, mem_mask | |
| 471 | 471 | |
| 472 | 472 | /* handle it */ |
| 473 | 473 | switch (offset) |
| r2454 | r2455 | |
|---|---|---|
| 175 | 175 | |
| 176 | 176 | #include "driver.h" |
| 177 | 177 | #include "memconv.h" |
| 178 | #include "deprecat.h" | |
| 179 | 178 | |
| 180 | 179 | #include "machine/pckeybrd.h" |
| 181 | 180 | #include "machine/8042kbdc.h" |
| r2454 | r2455 | |
| 601 | 600 | * the bits low set in the command byte. The only pulse that has |
| 602 | 601 | * an effect currently is bit 0, which pulses the CPU's reset line |
| 603 | 602 | */ |
| 604 | cpunum_set_input_line( | |
| 603 | cpunum_set_input_line(machine, 0, INPUT_LINE_RESET, PULSE_LINE); | |
| 605 | 604 | at_8042_set_outport(kbdc8042.outport | 0x02, 0); |
| 606 | 605 | break; |
| 607 | 606 | } |
| r0 | r2455 | |
|---|---|---|
| 1 | /* | |
| 2 | Microtouch touch screen controller | |
| 3 | ||
| 4 | Written by Mariusz Wojcieszek | |
| 5 | ||
| 6 | Notes/ToDo: | |
| 7 | - calibration mode (command CX) | |
| 8 | - only tablet format is supported for returning touch screen state | |
| 9 | ||
| 10 | */ | |
| 11 | ||
| 12 | #include "driver.h" | |
| 13 | #include "microtch.h" | |
| 14 | ||
| 15 | static struct | |
| 16 | { | |
| 17 | UINT8 rx_buffer[16]; | |
| 18 | int rx_buffer_ptr; | |
| 19 | emu_timer* timer; | |
| 20 | UINT8 tx_buffer[16]; | |
| 21 | UINT8 tx_buffer_num; | |
| 22 | UINT8 tx_buffer_ptr; | |
| 23 | int reset_done; | |
| 24 | int format_tablet; | |
| 25 | int mode_inactive; | |
| 26 | int mode_stream; | |
| 27 | int last_touch_state; | |
| 28 | int last_x; | |
| 29 | int last_y; | |
| 30 | void (*tx_callback)(UINT8 data); | |
| 31 | int (*touch_callback)(int *touch_x, int *touch_y); | |
| 32 | } microtouch; | |
| 33 | ||
| 34 | ||
| 35 | static int microtouch_check_command( const char* commandtocheck, int command_len, UINT8* command_data ) | |
| 36 | { | |
| 37 | if ( (command_len == (strlen(commandtocheck) + 2)) && | |
| 38 | (command_data[0] == 0x01) && | |
| 39 | (strncmp(commandtocheck, (const char*)command_data + 1, strlen(commandtocheck)) == 0) && | |
| 40 | (command_data[command_len-1] == 0x0d) ) | |
| 41 | { | |
| 42 | return 1; | |
| 43 | } | |
| 44 | else | |
| 45 | { | |
| 46 | return 0; | |
| 47 | } | |
| 48 | } | |
| 49 | ||
| 50 | static void microtouch_send_format_table_packet(UINT8 flag, int x, int y) | |
| 51 | { | |
| 52 | microtouch.tx_buffer[microtouch.tx_buffer_num++] = flag; | |
| 53 | // lower byte (7bits) of x coordinate | |
| 54 | microtouch.tx_buffer[microtouch.tx_buffer_num++] = x & 0x7f; | |
| 55 | // higher byte (7bits) of x coordinate | |
| 56 | microtouch.tx_buffer[microtouch.tx_buffer_num++] = (x >> 7) & 0x7f; | |
| 57 | // lower byte (7bits) of y coordinate | |
| 58 | microtouch.tx_buffer[microtouch.tx_buffer_num++] = y & 0x7f; | |
| 59 | // higher byte (7bits) of y coordinate | |
| 60 | microtouch.tx_buffer[microtouch.tx_buffer_num++] = (y >> 7) & 0x7f; | |
| 61 | }; | |
| 62 | ||
| 63 | static TIMER_CALLBACK(microtouch_timer_callback) | |
| 64 | { | |
| 65 | if ( microtouch.tx_buffer_ptr < microtouch.tx_buffer_num ) | |
| 66 | { | |
| 67 | microtouch.tx_callback( microtouch.tx_buffer[microtouch.tx_buffer_ptr++] ); | |
| 68 | if ( microtouch.tx_buffer_ptr == microtouch.tx_buffer_num ) | |
| 69 | { | |
| 70 | microtouch.tx_buffer_ptr = microtouch.tx_buffer_num = 0; | |
| 71 | } | |
| 72 | return; | |
| 73 | } | |
| 74 | ||
| 75 | if ( (microtouch.reset_done == 0) || | |
| 76 | (microtouch.format_tablet == 0) || | |
| 77 | (microtouch.mode_inactive == 1) || | |
| 78 | (microtouch.mode_stream == 0) ) | |
| 79 | { | |
| 80 | return; | |
| 81 | } | |
| 82 | ||
| 83 | // send format tablet packet | |
| 84 | if ( input_port_read(machine, "TOUCH") & 0x01 ) | |
| 85 | { | |
| 86 | int tx = input_port_read(machine, "TOUCH_X"); | |
| 87 | int ty = input_port_read(machine, "TOUCH_Y"); | |
| 88 | ||
| 89 | if ( microtouch.touch_callback == NULL || | |
| 90 | microtouch.touch_callback( &tx, &ty ) != 0 ) | |
| 91 | { | |
| 92 | ty = 0x4000 - ty; | |
| 93 | ||
| 94 | microtouch_send_format_table_packet(0xc0, tx, ty); | |
| 95 | microtouch.last_touch_state = 1; | |
| 96 | microtouch.last_x = tx; | |
| 97 | microtouch.last_y = ty; | |
| 98 | } | |
| 99 | } | |
| 100 | else | |
| 101 | { | |
| 102 | if ( microtouch.last_touch_state == 1 ) | |
| 103 | { | |
| 104 | microtouch.last_touch_state = 0; | |
| 105 | microtouch_send_format_table_packet(0x80, microtouch.last_x, microtouch.last_y); | |
| 106 | } | |
| 107 | } | |
| 108 | }; | |
| 109 | ||
| 110 | void microtouch_init(void (*tx_cb)(UINT8 data), | |
| 111 | int (*touch_cb)(int *touch_x, int *touch_y)) | |
| 112 | { | |
| 113 | memset(µtouch, 0, sizeof(microtouch)); | |
| 114 | ||
| 115 | microtouch.last_touch_state = -1; | |
| 116 | microtouch.tx_callback = tx_cb; | |
| 117 | microtouch.touch_callback = touch_cb; | |
| 118 | ||
| 119 | microtouch.timer = timer_alloc(microtouch_timer_callback, NULL); | |
| 120 | timer_adjust_periodic(microtouch.timer, ATTOTIME_IN_HZ(167*5), 0, ATTOTIME_IN_HZ(167*5)); | |
| 121 | ||
| 122 | state_save_register_item("microtouch", 0, microtouch.reset_done); | |
| 123 | state_save_register_item("microtouch", 0, microtouch.format_tablet); | |
| 124 | state_save_register_item("microtouch", 0, microtouch.mode_inactive); | |
| 125 | state_save_register_item("microtouch", 0, microtouch.mode_stream); | |
| 126 | state_save_register_item("microtouch", 0, microtouch.last_touch_state); | |
| 127 | state_save_register_item("microtouch", 0, microtouch.last_x); | |
| 128 | state_save_register_item("microtouch", 0, microtouch.last_y); | |
| 129 | state_save_register_item_array("microtouch", 0, microtouch.rx_buffer); | |
| 130 | state_save_register_item("microtouch", 0, microtouch.rx_buffer_ptr); | |
| 131 | state_save_register_item_array("microtouch", 0, microtouch.tx_buffer); | |
| 132 | state_save_register_item("microtouch", 0, microtouch.tx_buffer_num); | |
| 133 | state_save_register_item("microtouch", 0, microtouch.tx_buffer_ptr); | |
| 134 | ||
| 135 | }; | |
| 136 | ||
| 137 | ||
| 138 | void microtouch_rx(int count, UINT8* data) | |
| 139 | { | |
| 140 | int i; | |
| 141 | ||
| 142 | for ( i = 0; (i < count) && ((microtouch.rx_buffer_ptr + i) < 16); i++ ) | |
| 143 | { | |
| 144 | microtouch.rx_buffer[i+microtouch.rx_buffer_ptr] = data[i]; | |
| 145 | microtouch.rx_buffer_ptr++; | |
| 146 | } | |
| 147 | ||
| 148 | if (microtouch.rx_buffer_ptr > 0 && (microtouch.rx_buffer[microtouch.rx_buffer_ptr-1] == 0x0d)) | |
| 149 | { | |
| 150 | // check command | |
| 151 | if ( microtouch_check_command( "MS", microtouch.rx_buffer_ptr, microtouch.rx_buffer ) ) | |
| 152 | { | |
| 153 | microtouch.mode_stream = 1; | |
| 154 | microtouch.mode_inactive = 0; | |
| 155 | } | |
| 156 | else if ( microtouch_check_command( "MI", microtouch.rx_buffer_ptr, microtouch.rx_buffer ) ) | |
| 157 | { | |
| 158 | microtouch.mode_inactive = 1; | |
| 159 | } | |
| 160 | else if ( microtouch_check_command( "R", microtouch.rx_buffer_ptr, microtouch.rx_buffer ) ) | |
| 161 | { | |
| 162 | microtouch.tx_buffer_num = 0; | |
| 163 | microtouch.reset_done = 1; | |
| 164 | } | |
| 165 | else if ( microtouch_check_command( "FT", microtouch.rx_buffer_ptr, microtouch.rx_buffer ) ) | |
| 166 | { | |
| 167 | microtouch.format_tablet = 1; | |
| 168 | } | |
| 169 | // send response | |
| 170 | microtouch.tx_buffer[microtouch.tx_buffer_num++] = 0x01; | |
| 171 | microtouch.tx_buffer[microtouch.tx_buffer_num++] = 0x30; | |
| 172 | microtouch.tx_buffer[microtouch.tx_buffer_num++] = 0x0d; | |
| 173 | microtouch.rx_buffer_ptr = 0; | |
| 174 | } | |
| 175 | }; | |
| 176 | ||
| 177 | INPUT_PORTS_START(microtouch) | |
| 178 | PORT_START_TAG("TOUCH") | |
| 179 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_IMPULSE(10) PORT_NAME( "Touch screen" ) | |
| 180 | PORT_START_TAG("TOUCH_X") | |
| 181 | PORT_BIT( 0x3fff, 0x2000, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(45) PORT_KEYDELTA(15) | |
| 182 | PORT_START_TAG("TOUCH_Y") | |
| 183 | PORT_BIT( 0x3fff, 0x2000, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(45) PORT_KEYDELTA(15) | |
| 184 | INPUT_PORTS_END | |
| 185 |
| r0 | r2455 | |
|---|---|---|
| 1 | #ifndef _MICROTOUCH_H | |
| 2 | #define _MICROTOUCH_H | |
| 3 | ||
| 4 | INPUT_PORTS_EXTERN(microtouch); | |
| 5 | ||
| 6 | void microtouch_init(void (*tx_cb)(UINT8 data), int (*touch_cb)(int *touch_x, int *touch_y)); | |
| 7 | void microtouch_rx(int count, UINT8* data); | |
| 8 | ||
| 9 | #endif //_MICROTOUCH_H |
| r2454 | r2455 | |
|---|---|---|
| 572 | 572 | |
| 573 | 573 | WRITE16_HANDLER( c352_0_w ) |
| 574 | 574 | { |
| 575 | if (mem_mask == 0) | |
| 575 | if (mem_mask == 0xffff) | |
| 576 | 576 | { |
| 577 | 577 | c352_write_reg16(sndti_token(SOUND_C352, 0), offset*2, data); |
| 578 | 578 | } |
| r2454 | r2455 | |
|---|---|---|
| 8 | 8 | Based on various code snippets by Ville Hallik, Michael Cuddy, |
| 9 | 9 | Tatsuyuki Satoh, Fabrice Frances, Nicola Salmoria. |
| 10 | 10 | |
| 11 | Mostly rewritten by couriersud in 2008 | |
| 12 | ||
| 13 | TODO: | |
| 14 | * The AY8930 has an extended mode which is currently | |
| 15 | not emulated. | |
| 16 | * The YMZ284 only has one 1 output channel (mixed chan A,B,C). | |
| 17 | This should be forced. | |
| 18 | * YM2610 & YM2608 will need a separate flag in their config structures | |
| 19 | to distinguish between legacy and discrete mode. | |
| 20 | ||
| 21 | The rewrite also introduces a generic model for the DAC. This model is | |
| 22 | not perfect, but allows channel mixing based on a parametrized approach. | |
| 23 | This model also allows to factor in different loads on individual channels. | |
| 24 | If a better model is developped in the future or better measurements are | |
| 25 | available, the driver should be easy to change. The model is described | |
| 26 | later. | |
| 27 | ||
| 28 | In order to not break hundreds of existing drivers by default the flag | |
| 29 | AY8910_LEGACY_OUTPUT is used by drivers not changed to take into account the | |
| 30 | new model. All outputs are normalized to the old output range (i.e. 0 .. 7ffff). | |
| 31 | In the case of channel mixing, output range is 0...3 * 7fff. | |
| 32 | ||
| 33 | The main difference between the AY-3-8910 and the YM2149 is, that the | |
| 34 | AY-3-8910 datasheet mentions, that fixed volume level 0, which is set by | |
| 35 | registers 8 to 10 is "channel off". The YM2149 mentions, that the generated | |
| 36 | signal has a 2V DC component. This is confirmed by measurements. The approach | |
| 37 | taken here is to assume the 2V DC offset for all outputs for the YM2149. | |
| 38 | For the AY-3-8910, an offset is used if envelope is active for a channel. | |
| 39 | This is backed by oscilloscope pictures from the datasheet. If a fixed volume | |
| 40 | is set, i.e. enveloppe is disabled, the output voltage is set to 0V. Recordings | |
| 41 | I found on the web for gyruss indicate, that the AY-3-8910 offset should | |
| 42 | be around 1.5V. This will also make sound levels more compatible with | |
| 43 | user descriptions. | |
| 44 | ||
| 45 | The Model: | |
| 46 | 5V 5V | |
| 47 | | | | |
| 48 | / | | |
| 49 | Volume Level x >---| Z | |
| 50 | > Z Pullup Resistor RU | |
| 51 | | Z | |
| 52 | Z | | |
| 53 | Rx Z | | |
| 54 | Z | | |
| 55 | | | | |
| 56 | '-----+--------> >---+----> Output signal | |
| 57 | | | | |
| 58 | Z Z | |
| 59 | Pulldown RD Z Z Load RL | |
| 60 | Z Z | |
| 61 | | | | |
| 62 | GND GND | |
| 63 | ||
| 64 | Each Volume level x will select a different resistor Rx. Measurements from fpgaarcade.com | |
| 65 | where used to calibrate channel mixing for the YM2149. This was done using | |
| 66 | a least square approach using a fixed RL of 1K Ohm. | |
| 67 | ||
| 68 | For the AY measurements cited in e.g. openmsx as "Hacker Kay" for a single | |
| 69 | channel were taken. These were normalized to 0 ... 65535 and adapted to on | |
| 70 | offset of 1.5V and a VPP of 1.3V. | |
| 71 | ||
| 11 | 72 | ***************************************************************************/ |
| 12 | 73 | |
| 13 | 74 | #include "sndintrf.h" |
| r2454 | r2455 | |
| 17 | 78 | #include "ay8910.h" |
| 18 | 79 | |
| 19 | 80 | #define MAX_OUTPUT 0x7fff |
| 81 | #define NUM_CHANNELS 3 | |
| 20 | 82 | |
| 21 | #define STEP 2 | |
| 83 | typedef struct _ay_ym_param ay_ym_param; | |
| 84 | struct _ay_ym_param | |
| 85 | { | |
| 86 | double r_up; | |
| 87 | double r_down; | |
| 88 | int N; | |
| 89 | double res[32]; | |
| 90 | }; | |
| 22 | 91 | |
| 23 | ||
| 24 | 92 | struct AY8910 |
| 25 | 93 | { |
| 26 | 94 | int index; |
| 27 | 95 | int streams; |
| 28 | 96 | int ready; |
| 29 | 97 | sound_stream *Channel; |
| 30 | read8_machine_func PortAread; | |
| 31 | read8_machine_func PortBread; | |
| 32 | write8_machine_func PortAwrite; | |
| 33 | write8_machine_func PortBwrite; | |
| 98 | const struct AY8910interface *intf; | |
| 34 | 99 | INT32 register_latch; |
| 35 | UINT8 | |
| 100 | UINT8 regs[16]; | |
| 36 | 101 | INT32 lastEnable; |
| 37 | INT32 PeriodA,PeriodB,PeriodC,PeriodN,PeriodE; | |
| 38 | INT32 CountA,CountB,CountC,CountN,CountE; | |
| 39 | UINT32 VolA,VolB,VolC,VolE; | |
| 40 | UINT8 EnvelopeA,EnvelopeB,EnvelopeC; | |
| 41 | UINT8 OutputA,OutputB,OutputC,OutputN; | |
| 102 | INT32 Count[NUM_CHANNELS]; | |
| 103 | UINT8 Output[NUM_CHANNELS]; | |
| 104 | UINT8 OutputN; | |
| 105 | INT32 CountN; | |
| 106 | INT32 CountE; | |
| 42 | 107 | INT8 CountEnv; |
| 108 | UINT32 VolE; | |
| 43 | 109 | UINT8 Hold,Alternate,Attack,Holding; |
| 44 | 110 | INT32 RNG; |
| 45 | unsigned int VolTable[32]; | |
| 111 | UINT8 EnvP; | |
| 112 | /* init parameters ... */ | |
| 113 | int step; | |
| 114 | int zero_is_off; | |
| 115 | UINT8 vol_enabled[NUM_CHANNELS]; | |
| 116 | ay_ym_param *par; | |
| 117 | ay_ym_param *parE; | |
| 118 | INT32 VolTable[NUM_CHANNELS][16]; | |
| 119 | INT32 VolTableE[NUM_CHANNELS][32]; | |
| 120 | INT32 vol3d_tab[8*32*32*32]; | |
| 46 | 121 | }; |
| 47 | 122 | |
| 48 | 123 | /* register id's */ |
| r2454 | r2455 | |
| 64 | 139 | #define AY_PORTA (14) |
| 65 | 140 | #define AY_PORTB (15) |
| 66 | 141 | |
| 142 | #define NOISE_ENABLEQ(_psg, _chan) (((_psg)->regs[AY_ENABLE] >> (3 + _chan)) & 1) | |
| 143 | #define TONE_ENABLEQ(_psg, _chan) (((_psg)->regs[AY_ENABLE] >> (_chan)) & 1) | |
| 144 | #define TONE_PERIOD(_psg, _chan) ( (_psg)->regs[(_chan) << 1] | (((_psg)->regs[((_chan) << 1) | 1] & 0x0f) << 8) ) | |
| 145 | #define NOISE_PERIOD(_psg) ((_psg)->regs[AY_NOISEPER] & 0x1f) | |
| 146 | #define TONE_VOLUME(_psg, _chan) ((_psg)->regs[AY_AVOL + (_chan)] & 0x0f) | |
| 147 | #define TONE_ENVELOPE(_psg, _chan) (((_psg)->regs[AY_AVOL + (_chan)] >> 4) & 1) | |
| 148 | #define ENVELOPE_PERIOD(_psg) (((_psg)->regs[AY_EFINE] | ((_psg)->regs[AY_ECOARSE]<<8))) | |
| 67 | 149 | |
| 68 | static void _AYWriteReg(struct AY8910 *PSG, int r, int v) | |
| 150 | ||
| 151 | static ay_ym_param ym2149_param = | |
| 69 | 152 | { |
| 70 | int old; | |
| 153 | 630, 801, | |
| 154 | 16, | |
| 155 | { 73770, 37586, 27458, 21451, 15864, 12371, 8922, 6796, | |
| 156 | 4763, 3521, 2403, 1737, 1123, 762, 438, 251 }, | |
| 157 | }; | |
| 71 | 158 | |
| 159 | static ay_ym_param ym2149_paramE = | |
| 160 | { | |
| 161 | 630, 801, | |
| 162 | 32, | |
| 163 | { 103350, 73770, 52657, 37586, 32125, 27458, 24269, 21451, | |
| 164 | 18447, 15864, 14009, 12371, 10506, 8922, 7787, 6796, | |
| 165 | 5689, 4763, 4095, 3521, 2909, 2403, 2043, 1737, | |
| 166 | 1397, 1123, 925, 762, 578, 438, 332, 251 }, | |
| 167 | }; | |
| 72 | 168 | |
| 73 | PSG->Regs[r] = v; | |
| 169 | #if 0 | |
| 170 | /* RL = 1000, Hacker Kay normalized, 2.1V to 3.2V */ | |
| 171 | static ay_ym_param ay8910_param = | |
| 172 | { | |
| 173 | 664, 913, | |
| 174 | 16, | |
| 175 | { 85785, 34227, 26986, 20398, 14886, 10588, 7810, 4856, | |
| 176 | 4120, 2512, 1737, 1335, 1005, 747, 586, 451 }, | |
| 177 | }; | |
| 74 | 178 | |
| 179 | /* | |
| 180 | * RL = 3000, Hacker Kay normalized pattern, 1.5V to 2.8V | |
| 181 | * These values correspond with guesses based on Gyruss schematics | |
| 182 | * They work well with scramble as well. | |
| 183 | */ | |
| 184 | static ay_ym_param ay8910_param = | |
| 185 | { | |
| 186 | 930, 454, | |
| 187 | 16, | |
| 188 | { 85066, 34179, 27027, 20603, 15046, 10724, 7922, 4935, | |
| 189 | 4189, 2557, 1772, 1363, 1028, 766, 602, 464 }, | |
| 190 | }; | |
| 191 | ||
| 192 | /* | |
| 193 | * RL = 1000, Hacker Kay normalized pattern, 0.75V to 2.05V | |
| 194 | * These values correspond with guesses based on Gyruss schematics | |
| 195 | * They work well with scramble as well. | |
| 196 | */ | |
| 197 | static ay_ym_param ay8910_param = | |
| 198 | { | |
| 199 | 1371, 313, | |
| 200 | 16, | |
| 201 | { 93399, 33289, 25808, 19285, 13940, 9846, 7237, 4493, | |
| 202 | 3814, 2337, 1629, 1263, 962, 727, 580, 458 }, | |
| 203 | }; | |
| 204 | #endif | |
| 205 | ||
| 206 | /* | |
| 207 | * RL = 1000, Hacker Kay normalized pattern, 0.2V to 1.5V | |
| 208 | */ | |
| 209 | static ay_ym_param ay8910_param = | |
| 210 | { | |
| 211 | 5806, 300, | |
| 212 | 16, | |
| 213 | { 118996, 42698, 33105, 24770, 17925, 12678, 9331, 5807, | |
| 214 | 4936, 3038, 2129, 1658, 1271, 969, 781, 623 } | |
| 215 | }; | |
| 216 | ||
| 217 | ||
| 218 | static void AY8910_write_reg(struct AY8910 *PSG, int r, int v) | |
| 219 | { | |
| 220 | ||
| 221 | //if (r != 4 && r !=5) printf("%d %x %02x\n", PSG->index, r, v); | |
| 222 | PSG->regs[r] = v; | |
| 223 | ||
| 75 | 224 | /* A note about the period of tones, noise and envelope: for speed reasons,*/ |
| 76 | 225 | /* we count down from the period to 0, but careful studies of the chip */ |
| 77 | 226 | /* output prove that it instead counts up from 0 until the counter becomes */ |
| r2454 | r2455 | |
| 84 | 233 | /* period. In that case, period = 0 is half as period = 1. */ |
| 85 | 234 | switch( r ) |
| 86 | 235 | { |
| 87 | case AY_AFINE: | |
| 88 | case AY_ACOARSE: | |
| 89 | PSG->Regs[AY_ACOARSE] &= 0x0f; | |
| 90 | old = PSG->PeriodA; | |
| 91 | PSG->PeriodA = (PSG->Regs[AY_AFINE] + 256 * PSG->Regs[AY_ACOARSE]) * STEP; | |
| 92 | if (PSG->PeriodA == 0) PSG->PeriodA = STEP; | |
| 93 | PSG->CountA += PSG->PeriodA - old; | |
| 94 | if (PSG->CountA <= 0) PSG->CountA = 1; | |
| 95 | break; | |
| 96 | case AY_BFINE: | |
| 97 | case AY_BCOARSE: | |
| 98 | PSG->Regs[AY_BCOARSE] &= 0x0f; | |
| 99 | old = PSG->PeriodB; | |
| 100 | PSG->PeriodB = (PSG->Regs[AY_BFINE] + 256 * PSG->Regs[AY_BCOARSE]) * STEP; | |
| 101 | if (PSG->PeriodB == 0) PSG->PeriodB = STEP; | |
| 102 | PSG->CountB += PSG->PeriodB - old; | |
| 103 | if (PSG->CountB <= 0) PSG->CountB = 1; | |
| 104 | break; | |
| 105 | case AY_CFINE: | |
| 106 | case AY_CCOARSE: | |
| 107 | PSG->Regs[AY_CCOARSE] &= 0x0f; | |
| 108 | old = PSG->PeriodC; | |
| 109 | PSG->PeriodC = (PSG->Regs[AY_CFINE] + 256 * PSG->Regs[AY_CCOARSE]) * STEP; | |
| 110 | if (PSG->PeriodC == 0) PSG->PeriodC = STEP; | |
| 111 | PSG->CountC += PSG->PeriodC - old; | |
| 112 | if (PSG->CountC <= 0) PSG->CountC = 1; | |
| 113 | break; | |
| 114 | case AY_NOISEPER: | |
| 115 | PSG->Regs[AY_NOISEPER] &= 0x1f; | |
| 116 | old = PSG->PeriodN; | |
| 117 | PSG->PeriodN = PSG->Regs[AY_NOISEPER] * STEP; | |
| 118 | if (PSG->PeriodN == 0) PSG->PeriodN = STEP; | |
| 119 | PSG->CountN += PSG->PeriodN - old; | |
| 120 | if (PSG->CountN <= 0) PSG->CountN = 1; | |
| 121 | break; | |
| 122 | case AY_ENABLE: | |
| 123 | if ((PSG->lastEnable == -1) || | |
| 124 | ((PSG->lastEnable & 0x40) != (PSG->Regs[AY_ENABLE] & 0x40))) | |
| 125 | { | |
| 126 | /* write out 0xff if port set to input */ | |
| 127 | if (PSG->PortAwrite) | |
| 128 | (*PSG->PortAwrite)(Machine, 0, (PSG->Regs[AY_ENABLE] & 0x40) ? PSG->Regs[AY_PORTA] : 0xff); | |
| 129 | } | |
| 236 | case AY_AFINE: | |
| 237 | case AY_ACOARSE: | |
| 238 | case AY_BFINE: | |
| 239 | case AY_BCOARSE: | |
| 240 | case AY_CFINE: | |
| 241 | case AY_CCOARSE: | |
| 242 | /* No action required */ | |
| 243 | break; | |
| 244 | case AY_NOISEPER: | |
| 245 | /* No action required */ | |
| 246 | break; | |
| 247 | case AY_ENABLE: | |
| 248 | if ((PSG->lastEnable == -1) || | |
| 249 | ((PSG->lastEnable & 0x40) != (PSG->regs[AY_ENABLE] & 0x40))) | |
| 250 | { | |
| 251 | /* write out 0xff if port set to input */ | |
| 252 | if (PSG->intf->portAwrite) | |
| 253 | (*PSG->intf->portAwrite)(Machine, 0, (PSG->regs[AY_ENABLE] & 0x40) ? PSG->regs[AY_PORTA] : 0xff); | |
| 254 | } | |
| 130 | 255 | |
| 131 | if ((PSG->lastEnable == -1) || | |
| 132 | ((PSG->lastEnable & 0x80) != (PSG->Regs[AY_ENABLE] & 0x80))) | |
| 133 | { | |
| 134 | /* write out 0xff if port set to input */ | |
| 135 | if (PSG->PortBwrite) | |
| 136 | (*PSG->PortBwrite)(Machine, 0, (PSG->Regs[AY_ENABLE] & 0x80) ? PSG->Regs[AY_PORTB] : 0xff); | |
| 137 | } | |
| 256 | if ((PSG->lastEnable == -1) || | |
| 257 | ((PSG->lastEnable & 0x80) != (PSG->regs[AY_ENABLE] & 0x80))) | |
| 258 | { | |
| 259 | /* write out 0xff if port set to input */ | |
| 260 | if (PSG->intf->portBwrite) | |
| 261 | (*PSG->intf->portBwrite)(Machine, 0, (PSG->regs[AY_ENABLE] & 0x80) ? PSG->regs[AY_PORTB] : 0xff); | |
| 262 | } | |
| 138 | 263 | |
| 139 | PSG->lastEnable = PSG->Regs[AY_ENABLE]; | |
| 140 | break; | |
| 141 | case AY_AVOL: | |
| 142 | PSG->Regs[AY_AVOL] &= 0x1f; | |
| 143 | PSG->EnvelopeA = PSG->Regs[AY_AVOL] & 0x10; | |
| 144 | PSG->VolA = PSG->EnvelopeA ? PSG->VolE : PSG->VolTable[PSG->Regs[AY_AVOL] ? PSG->Regs[AY_AVOL]*2+1 : 0]; | |
| 145 | break; | |
| 146 | case AY_BVOL: | |
| 147 | PSG->Regs[AY_BVOL] &= 0x1f; | |
| 148 | PSG->EnvelopeB = PSG->Regs[AY_BVOL] & 0x10; | |
| 149 | PSG->VolB = PSG->EnvelopeB ? PSG->VolE : PSG->VolTable[PSG->Regs[AY_BVOL] ? PSG->Regs[AY_BVOL]*2+1 : 0]; | |
| 150 | break; | |
| 151 | case AY_CVOL: | |
| 152 | PSG->Regs[AY_CVOL] &= 0x1f; | |
| 153 | PSG->EnvelopeC = PSG->Regs[AY_CVOL] & 0x10; | |
| 154 | PSG->VolC = PSG->EnvelopeC ? PSG->VolE : PSG->VolTable[PSG->Regs[AY_CVOL] ? PSG->Regs[AY_CVOL]*2+1 : 0]; | |
| 155 | break; | |
| 156 | case AY_EFINE: | |
| 157 | case AY_ECOARSE: | |
| 158 | old = PSG->PeriodE; | |
| 159 | PSG->PeriodE = ((PSG->Regs[AY_EFINE] + 256 * PSG->Regs[AY_ECOARSE])) * STEP; | |
| 160 | if (PSG->PeriodE == 0) PSG->PeriodE = STEP / 2; | |
| 161 | PSG->CountE += PSG->PeriodE - old; | |
| 162 | if (PSG->CountE <= 0) PSG->CountE = 1; | |
| 163 | break; | |
| 164 | case AY_ESHAPE: | |
| 165 | /* envelope shapes: | |
| 166 | C AtAlH | |
| 167 | 0 0 x x \___ | |
| 264 | PSG->lastEnable = PSG->regs[AY_ENABLE]; | |
| 265 | break; | |
| 266 | case AY_AVOL: | |
| 267 | case AY_BVOL: | |
| 268 | case AY_CVOL: | |
| 269 | /* No action required */ | |
| 270 | break; | |
| 271 | case AY_EFINE: | |
| 272 | case AY_ECOARSE: | |
| 273 | /* No action required */ | |
| 274 | break; | |
| 275 | case AY_ESHAPE: | |
| 276 | /* envelope shapes: | |
| 277 | C AtAlH | |
| 278 | 0 0 x x \___ | |
| 279 | 0 1 x x /___ | |
| 280 | 1 0 0 0 \\\\ | |
| 281 | 1 0 0 1 \___ | |
| 282 | 1 0 1 0 \/\/ | |
| 283 | 1 0 1 1 \?????? | |
| 284 | 1 1 0 0 //// | |
| 285 | 1 1 0 1 /?????? | |
| 286 | 1 1 1 0 /\/\ | |
| 287 | 1 1 1 1 /___ | |
| 288 | The envelope counter on the AY-3-8910 has 16 steps. On the YM2149 it | |
| 289 | has twice the steps, happening twice as fast. | |
| 290 | */ | |
| 291 | PSG->Attack = (PSG->regs[AY_ESHAPE] & 0x04) ? PSG->EnvP : 0x00; | |
| 292 | if ((PSG->regs[AY_ESHAPE] & 0x08) == 0) | |
| 293 | { | |
| 294 | /* if Continue = 0, map the shape to the equivalent one which has Continue = 1 */ | |
| 295 | PSG->Hold = 1; | |
| 296 | PSG->Alternate = PSG->Attack; | |
| 297 | } | |
| 298 | else | |
| 299 | { | |
| 300 | PSG->Hold = PSG->regs[AY_ESHAPE] & 0x01; | |
| 301 | PSG->Alternate = PSG->regs[AY_ESHAPE] & 0x02; | |
| 302 | } | |
| 303 | PSG->CountEnv = PSG->EnvP; | |
| 304 | PSG->Holding = 0; | |
| 305 | PSG->VolE = (PSG->CountEnv ^ PSG->Attack); | |
| 306 | break; | |
| 307 | case AY_PORTA: | |
| 308 | if (PSG->regs[AY_ENABLE] & 0x40) | |
| 309 | { | |
| 310 | if (PSG->intf->portAwrite) | |
| 311 | (*PSG->intf->portAwrite)(Machine, 0, PSG->regs[AY_PORTA]); | |
| 312 | else | |
| 313 | logerror("warning - write %02x to 8910 #%d Port A\n",PSG->regs[AY_PORTA],PSG->index); | |
| 314 | } | |
| 315 | else | |
| 316 | { | |
| 317 | logerror("warning: write to 8910 #%d Port A set as input - ignored\n",PSG->index); | |
| 318 | } | |
| 319 | break; | |
| 320 | case AY_PORTB: | |
| 321 | if (PSG->regs[AY_ENABLE] & 0x80) | |
| 322 | { | |
| 323 | if (PSG->intf->portBwrite) | |
| 324 | (*PSG->intf->portBwrite)(Machine, 0, PSG->regs[AY_PORTB]); | |
| 325 | else | |
| 326 | logerror("warning - write %02x to 8910 #%d Port B\n",PSG->regs[AY_PORTB],PSG->index); | |
| 327 | } | |
| 328 | else | |
| 329 | { | |
| 330 | logerror("warning: write to 8910 #%d Port B set as input - ignored\n",PSG->index); | |
| 331 | } | |
| 332 | break; | |
| 333 | } | |
| 334 | } | |
| 168 | 335 | |
| 169 | 0 1 x x /___ | |
| 170 | 336 | |
| 171 | 1 0 0 0 \\\\ | |
| 337 | INLINE UINT16 mix_3D(struct AY8910 *PSG) | |
| 338 | { | |
| 339 | int indx = 0, chan; | |
| 172 | 340 | |
| 173 | 1 0 0 1 \___ | |
| 174 | ||
| 175 | 1 0 1 0 \/\/ | |
| 176 | ___ | |
| 177 | 1 0 1 1 \ | |
| 178 | ||
| 179 | 1 1 0 0 //// | |
| 180 | ___ | |
| 181 | 1 1 0 1 / | |
| 182 | ||
| 183 | 1 1 1 0 /\/\ | |
| 184 | ||
| 185 | 1 1 1 1 /___ | |
| 186 | ||
| 187 | The envelope counter on the AY-3-8910 has 16 steps. On the YM2149 it | |
| 188 | has twice the steps, happening twice as fast. Since the end result is | |
| 189 | just a smoother curve, we always use the YM2149 behaviour. | |
| 190 | */ | |
| 191 | PSG->Regs[AY_ESHAPE] &= 0x0f; | |
| 192 | PSG->Attack = (PSG->Regs[AY_ESHAPE] & 0x04) ? 0x1f : 0x00; | |
| 193 | if ((PSG->Regs[AY_ESHAPE] & 0x08) == 0) | |
| 341 | for (chan = 0; chan < NUM_CHANNELS; chan++) | |
| 342 | if (TONE_ENVELOPE(PSG, chan)) | |
| 194 | 343 | { |
| 195 | /* if Continue = 0, map the shape to the equivalent one which has Continue = 1 */ | |
| 196 | PSG->Hold = 1; | |
| 197 | PSG->Alternate = PSG->Attack; | |
| 344 | indx |= (1 << (chan+15)) | ( PSG->vol_enabled[chan] ? PSG->VolE << (chan*5) : 0); | |
| 198 | 345 | } |
| 199 | 346 | else |
| 200 | 347 | { |
| 201 | PSG->Hold = PSG->Regs[AY_ESHAPE] & 0x01; | |
| 202 | PSG->Alternate = PSG->Regs[AY_ESHAPE] & 0x02; | |
| 348 | indx |= (PSG->vol_enabled[chan] ? TONE_VOLUME(PSG, chan) << (chan*5) : 0); | |
| 203 | 349 | } |
| 204 | PSG->CountE = PSG->PeriodE; | |
| 205 | PSG->CountEnv = 0x1f; | |
| 206 | PSG->Holding = 0; | |
| 207 | PSG->VolE = PSG->VolTable[PSG->CountEnv ^ PSG->Attack]; | |
| 208 | if (PSG->EnvelopeA) PSG->VolA = PSG->VolE; | |
| 209 | if (PSG->EnvelopeB) PSG->VolB = PSG->VolE; | |
| 210 | if (PSG->EnvelopeC) PSG->VolC = PSG->VolE; | |
| 211 | break; | |
| 212 | case AY_PORTA: | |
| 213 | if (PSG->Regs[AY_ENABLE] & 0x40) | |
| 214 | { | |
| 215 | if (PSG->PortAwrite) | |
| 216 | (*PSG->PortAwrite)(Machine, 0, PSG->Regs[AY_PORTA]); | |
| 217 | else | |
| 218 | logerror("warning - write %02x to 8910 #%d Port A\n",PSG->Regs[AY_PORTA],PSG->index); | |
| 219 | } | |
| 220 | else | |
| 221 | { | |
| 222 | logerror("warning: write to 8910 #%d Port A set as input - ignored\n",PSG->index); | |
| 223 | } | |
| 224 | break; | |
| 225 | case AY_PORTB: | |
| 226 | if (PSG->Regs[AY_ENABLE] & 0x80) | |
| 227 | { | |
| 228 | if (PSG->PortBwrite) | |
| 229 | (*PSG->PortBwrite)(Machine, 0, PSG->Regs[AY_PORTB]); | |
| 230 | else | |
| 231 | logerror("warning - write %02x to 8910 #%d Port B\n",PSG->Regs[AY_PORTB],PSG->index); | |
| 232 | } | |
| 233 | else | |
| 234 | { | |
| 235 | logerror("warning: write to 8910 #%d Port B set as input - ignored\n",PSG->index); | |
| 236 | } | |
| 237 | break; | |
| 238 | } | |
| 350 | return PSG->vol3d_tab[indx]; | |
| 239 | 351 | } |
| 240 | 352 | |
| 241 | ||
| 242 | ||
| 243 | /* AY8910 interface */ | |
| 244 | READ8_HANDLER( AY8910_read_port_0_r ) { return ay8910_read_ym(sndti_token(SOUND_AY8910, 0)); } | |
| 245 | READ8_HANDLER( AY8910_read_port_1_r ) { return ay8910_read_ym(sndti_token(SOUND_AY8910, 1)); } | |
| 246 | READ8_HANDLER( AY8910_read_port_2_r ) { return ay8910_read_ym(sndti_token(SOUND_AY8910, 2)); } | |
| 247 | READ8_HANDLER( AY8910_read_port_3_r ) { return ay8910_read_ym(sndti_token(SOUND_AY8910, 3)); } | |
| 248 | READ8_HANDLER( AY8910_read_port_4_r ) { return ay8910_read_ym(sndti_token(SOUND_AY8910, 4)); } | |
| 249 | READ16_HANDLER( AY8910_read_port_0_lsb_r ) { return ay8910_read_ym(sndti_token(SOUND_AY8910, 0)); } | |
| 250 | READ16_HANDLER( AY8910_read_port_1_lsb_r ) { return ay8910_read_ym(sndti_token(SOUND_AY8910, 1)); } | |
| 251 | READ16_HANDLER( AY8910_read_port_2_lsb_r ) { return ay8910_read_ym(sndti_token(SOUND_AY8910, 2)); } | |
| 252 | READ16_HANDLER( AY8910_read_port_3_lsb_r ) { return ay8910_read_ym(sndti_token(SOUND_AY8910, 3)); } | |
| 253 | READ16_HANDLER( AY8910_read_port_4_lsb_r ) { return ay8910_read_ym(sndti_token(SOUND_AY8910, 4)); } | |
| 254 | READ16_HANDLER( AY8910_read_port_0_msb_r ) { return ay8910_read_ym(sndti_token(SOUND_AY8910, 0)) << 8; } | |
| 255 | READ16_HANDLER( AY8910_read_port_1_msb_r ) { return ay8910_read_ym(sndti_token(SOUND_AY8910, 1)) << 8; } | |
| 256 | READ16_HANDLER( AY8910_read_port_2_msb_r ) { return ay8910_read_ym(sndti_token(SOUND_AY8910, 2)) << 8; } | |
| 257 | READ16_HANDLER( AY8910_read_port_3_msb_r ) { return ay8910_read_ym(sndti_token(SOUND_AY8910, 3)) << 8; } | |
| 258 | READ16_HANDLER( AY8910_read_port_4_msb_r ) { return ay8910_read_ym(sndti_token(SOUND_AY8910, 4)) << 8; } | |
| 259 | ||
| 260 | WRITE8_HANDLER( AY8910_control_port_0_w ) { ay8910_write_ym(sndti_token(SOUND_AY8910, 0),0,data); } | |
| 261 | WRITE8_HANDLER( AY8910_control_port_1_w ) { ay8910_write_ym(sndti_token(SOUND_AY8910, 1),0,data); } | |
| 262 | WRITE8_HANDLER( AY8910_control_port_2_w ) { ay8910_write_ym(sndti_token(SOUND_AY8910, 2),0,data); } | |
| 263 | WRITE8_HANDLER( AY8910_control_port_3_w ) { ay8910_write_ym(sndti_token(SOUND_AY8910, 3),0,data); } | |
| 264 | WRITE8_HANDLER( AY8910_control_port_4_w ) { ay8910_write_ym(sndti_token(SOUND_AY8910, 4),0,data); } | |
| 265 | WRITE16_HANDLER( AY8910_control_port_0_lsb_w ) { if (ACCESSING_BITS_0_7) ay8910_write_ym(sndti_token(SOUND_AY8910, 0),0,data & 0xff); } | |
| 266 | WRITE16_HANDLER( AY8910_control_port_1_lsb_w ) { if (ACCESSING_BITS_0_7) ay8910_write_ym(sndti_token(SOUND_AY8910, 1),0,data & 0xff); } | |
| 267 | WRITE16_HANDLER( AY8910_control_port_2_lsb_w ) { if (ACCESSING_BITS_0_7) ay8910_write_ym(sndti_token(SOUND_AY8910, 2),0,data & 0xff); } | |
| 268 | WRITE16_HANDLER( AY8910_control_port_3_lsb_w ) { if (ACCESSING_BITS_0_7) ay8910_write_ym(sndti_token(SOUND_AY8910, 3),0,data & 0xff); } | |
| 269 | WRITE16_HANDLER( AY8910_control_port_4_lsb_w ) { if (ACCESSING_BITS_0_7) ay8910_write_ym(sndti_token(SOUND_AY8910, 4),0,data & 0xff); } | |
| 270 | WRITE16_HANDLER( AY8910_control_port_0_msb_w ) { if (ACCESSING_BITS_8_15) ay8910_write_ym(sndti_token(SOUND_AY8910, 0),0,data >> 8); } | |
| 271 | WRITE16_HANDLER( AY8910_control_port_1_msb_w ) { if (ACCESSING_BITS_8_15) ay8910_write_ym(sndti_token(SOUND_AY8910, 1),0,data >> 8); } | |
| 272 | WRITE16_HANDLER( AY8910_control_port_2_msb_w ) { if (ACCESSING_BITS_8_15) ay8910_write_ym(sndti_token(SOUND_AY8910, 2),0,data >> 8); } | |
| 273 | WRITE16_HANDLER( AY8910_control_port_3_msb_w ) { if (ACCESSING_BITS_8_15) ay8910_write_ym(sndti_token(SOUND_AY8910, 3),0,data >> 8); } | |
| 274 | WRITE16_HANDLER( AY8910_control_port_4_msb_w ) { if (ACCESSING_BITS_8_15) ay8910_write_ym(sndti_token(SOUND_AY8910, 4),0,data >> 8); } | |
| 275 | ||
| 276 | WRITE8_HANDLER( AY8910_write_port_0_w ) { ay8910_write_ym(sndti_token(SOUND_AY8910, 0),1,data); } | |
| 277 | WRITE8_HANDLER( AY8910_write_port_1_w ) { ay8910_write_ym(sndti_token(SOUND_AY8910, 1),1,data); } | |
| 278 | WRITE8_HANDLER( AY8910_write_port_2_w ) { ay8910_write_ym(sndti_token(SOUND_AY8910, 2),1,data); } | |
| 279 | WRITE8_HANDLER( AY8910_write_port_3_w ) { ay8910_write_ym(sndti_token(SOUND_AY8910, 3),1,data); } | |
| 280 | WRITE8_HANDLER( AY8910_write_port_4_w ) { ay8910_write_ym(sndti_token(SOUND_AY8910, 4),1,data); } | |
| 281 | WRITE16_HANDLER( AY8910_write_port_0_lsb_w ) { if (ACCESSING_BITS_0_7) ay8910_write_ym(sndti_token(SOUND_AY8910, 0),1,data & 0xff); } | |
| 282 | WRITE16_HANDLER( AY8910_write_port_1_lsb_w ) { if (ACCESSING_BITS_0_7) ay8910_write_ym(sndti_token(SOUND_AY8910, 1),1,data & 0xff); } | |
| 283 | WRITE16_HANDLER( AY8910_write_port_2_lsb_w ) { if (ACCESSING_BITS_0_7) ay8910_write_ym(sndti_token(SOUND_AY8910, 2),1,data & 0xff); } | |
| 284 | WRITE16_HANDLER( AY8910_write_port_3_lsb_w ) { if (ACCESSING_BITS_0_7) ay8910_write_ym(sndti_token(SOUND_AY8910, 3),1,data & 0xff); } | |
| 285 | WRITE16_HANDLER( AY8910_write_port_4_lsb_w ) { if (ACCESSING_BITS_0_7) ay8910_write_ym(sndti_token(SOUND_AY8910, 4),1,data & 0xff); } | |
| 286 | WRITE16_HANDLER( AY8910_write_port_0_msb_w ) { if (ACCESSING_BITS_8_15) ay8910_write_ym(sndti_token(SOUND_AY8910, 0),1,data >> 8); } | |
| 287 | WRITE16_HANDLER( AY8910_write_port_1_msb_w ) { if (ACCESSING_BITS_8_15) ay8910_write_ym(sndti_token(SOUND_AY8910, 1),1,data >> 8); } | |
| 288 | WRITE16_HANDLER( AY8910_write_port_2_msb_w ) { if (ACCESSING_BITS_8_15) ay8910_write_ym(sndti_token(SOUND_AY8910, 2),1,data >> 8); } | |
| 289 | WRITE16_HANDLER( AY8910_write_port_3_msb_w ) { if (ACCESSING_BITS_8_15) ay8910_write_ym(sndti_token(SOUND_AY8910, 3),1,data >> 8); } | |
| 290 | WRITE16_HANDLER( AY8910_write_port_4_msb_w ) { if (ACCESSING_BITS_8_15) ay8910_write_ym(sndti_token(SOUND_AY8910, 4),1,data >> 8); } | |
| 291 | ||
| 292 | ||
| 293 | ||
| 294 | static void AY8910Update(void *param,stream_sample_t **inputs, stream_sample_t **buffer,int length) | |
| 353 | static void AY8910_update(void *param,stream_sample_t **inputs, stream_sample_t **buffer,int length) | |
| 295 | 354 | { |
| 296 | 355 | struct AY8910 *PSG = param; |
| 297 | stream_sample_t *buf1,*buf2,*buf3; | |
| 298 | int outn; | |
| 356 | stream_sample_t *buf[NUM_CHANNELS]; | |
| 357 | int chan; | |
| 299 | 358 | |
| 300 | buf1 = buffer[0]; | |
| 301 | buf2 = NULL; | |
| 302 | buf3 = NULL; | |
| 303 | if (PSG->streams == 3) | |
| 359 | buf[0] = buffer[0]; | |
| 360 | buf[1] = NULL; | |
| 361 | buf[2] = NULL; | |
| 362 | if (PSG->streams == NUM_CHANNELS) | |
| 304 | 363 | { |
| 305 | buf2 = buffer[1]; | |
| 306 | buf3 = buffer[2]; | |
| 364 | buf[1] = buffer[1]; | |
| 365 | buf[2] = buffer[2]; | |
| 307 | 366 | } |
| 308 | 367 | |
| 309 | 368 | /* hack to prevent us from hanging when starting filtered outputs */ |
| 310 | 369 | if (!PSG->ready) |
| 311 | 370 | { |
| 312 | memset(buf1, 0, length * sizeof(*buf1)); | |
| 313 | if (buf2) | |
| 314 | memset(buf2, 0, length * sizeof(*buf2)); | |
| 315 | if (buf3) | |
| 316 | memset(buf3, 0, length * sizeof(*buf3)); | |
| 317 | return; | |
| 371 | for (chan = 0; chan < NUM_CHANNELS; chan++) | |
| 372 | if (buf[chan] != NULL) | |
| 373 | memset(buf[chan], 0, length * sizeof(*buf[chan])); | |
| 318 | 374 | } |
| 319 | 375 | |
| 320 | ||
| 321 | 376 | /* The 8910 has three outputs, each output is the mix of one of the three */ |
| 322 | 377 | /* tone generators and of the (single) noise generator. The two are mixed */ |
| 323 | 378 | /* BEFORE going into the DAC. The formula to mix each channel is: */ |
| r2454 | r2455 | |
| 325 | 380 | /* Note that this means that if both tone and noise are disabled, the output */ |
| 326 | 381 | /* is 1, not 0, and can be modulated changing the volume. */ |
| 327 | 382 | |
| 328 | ||
| 329 | /* If the channels are disabled, set their output to 1, and increase the */ | |
| 330 | /* counter, if necessary, so they will not be inverted during this update. */ | |
| 331 | /* Setting the output to 1 is necessary because a disabled channel is locked */ | |
| 332 | /* into the ON state (see above); and it has no effect if the volume is 0. */ | |
| 333 | /* If the volume is 0, increase the counter, but don't touch the output. */ | |
| 334 | if (PSG->Regs[AY_ENABLE] & 0x01) | |
| 335 | { | |
| 336 | if (PSG->CountA <= length*STEP) PSG->CountA += length*STEP; | |
| 337 | PSG->OutputA = 1; | |
| 338 | } | |
| 339 | else if (PSG->Regs[AY_AVOL] == 0) | |
| 340 | { | |
| 341 | /* note that I do count += length, NOT count = length + 1. You might think */ | |
| 342 | /* it's the same since the volume is 0, but doing the latter could cause */ | |
| 343 | /* interferencies when the program is rapidly modulating the volume. */ | |
| 344 | if (PSG->CountA <= length*STEP) PSG->CountA += length*STEP; | |
| 345 | } | |
| 346 | if (PSG->Regs[AY_ENABLE] & 0x02) | |
| 347 | { | |
| 348 | if (PSG->CountB <= length*STEP) PSG->CountB += length*STEP; | |
| 349 | PSG->OutputB = 1; | |
| 350 | } | |
| 351 | else if (PSG->Regs[AY_BVOL] == 0) | |
| 352 | { | |
| 353 | if (PSG->CountB <= length*STEP) PSG->CountB += length*STEP; | |
| 354 | } | |
| 355 | if (PSG->Regs[AY_ENABLE] & 0x04) | |
| 356 | { | |
| 357 | if (PSG->CountC <= length*STEP) PSG->CountC += length*STEP; | |
| 358 | PSG->OutputC = 1; | |
| 359 | } | |
| 360 | else if (PSG->Regs[AY_CVOL] == 0) | |
| 361 | { | |
| 362 | if (PSG->CountC <= length*STEP) PSG->CountC += length*STEP; | |
| 363 | } | |
| 364 | ||
| 365 | /* for the noise channel we must not touch OutputN - it's also not necessary */ | |
| 366 | /* since we use outn. */ | |
| 367 | if ((PSG->Regs[AY_ENABLE] & 0x38) == 0x38) /* all off */ | |
| 368 | if (PSG->CountN <= length*STEP) PSG->CountN += length*STEP; | |
| 369 | ||
| 370 | outn = (PSG->OutputN | PSG->Regs[AY_ENABLE]); | |
| 371 | ||
| 372 | ||
| 373 | 383 | /* buffering loop */ |
| 374 | 384 | while (length) |
| 375 | 385 | { |
| 376 | int vola,volb,volc; | |
| 377 | int left; | |
| 378 | ||
| 379 | ||
| 380 | /* vola, volb and volc keep track of how long each square wave stays */ | |
| 381 | /* in the 1 position during the sample period. */ | |
| 382 | vola = volb = volc = 0; | |
| 383 | ||
| 384 | left = STEP; | |
| 385 | do | |
| 386 | for (chan = 0; chan < NUM_CHANNELS; chan++) | |
| 386 | 387 | { |
| 387 | int nextevent; | |
| 388 | ||
| 389 | ||
| 390 | if (PSG->CountN < left) nextevent = PSG->CountN; | |
| 391 | else nextevent = left; | |
| 392 | ||
| 393 | if (outn & 0x08) | |
| 388 | PSG->Count[chan]++; | |
| 389 | if (PSG->Count[chan] >= TONE_PERIOD(PSG, chan) * PSG->step) | |
| 394 | 390 | { |
| 395 | if (PSG->OutputA) vola += PSG->CountA; | |
| 396 | PSG->CountA -= nextevent; | |
| 397 | /* PeriodA is the half period of the square wave. Here, in each */ | |
| 398 | /* loop I add PeriodA twice, so that at the end of the loop the */ | |
| 399 | /* square wave is in the same status (0 or 1) it was at the start. */ | |
| 400 | /* vola is also incremented by PeriodA, since the wave has been 1 */ | |
| 401 | /* exactly half of the time, regardless of the initial position. */ | |
| 402 | /* If we exit the loop in the middle, OutputA has to be inverted */ | |
| 403 | /* and vola incremented only if the exit status of the square */ | |
| 404 | /* wave is 1. */ | |
| 405 | while (PSG->CountA <= 0) | |
| 406 | { | |
| 407 | PSG->CountA += PSG->PeriodA; | |
| 408 | if (PSG->CountA > 0) | |
| 409 | { | |
| 410 | PSG->OutputA ^= 1; | |
| 411 | if (PSG->OutputA) vola += PSG->PeriodA; | |
| 412 | break; | |
| 413 | } | |
| 414 | PSG->CountA += PSG->PeriodA; | |
| 415 | vola += PSG->PeriodA; | |
| 416 | } | |
| 417 | if (PSG->OutputA) vola -= PSG->CountA; | |
| 391 | PSG->Output[chan] ^= 1; | |
| 392 | PSG->Count[chan] = 0;; | |
| 418 | 393 | } |
| 419 | else | |
| 420 | { | |
| 421 | PSG->CountA -= nextevent; | |
| 422 | while (PSG->CountA <= 0) | |
| 423 | { | |
| 424 | PSG->CountA += PSG->PeriodA; | |
| 425 | if (PSG->CountA > 0) | |
| 426 | { | |
| 427 | PSG->OutputA ^= 1; | |
| 428 | break; | |
| 429 | } | |
| 430 | PSG->CountA += PSG->PeriodA; | |
| 431 | } | |
| 432 | } | |
| 394 | } | |
| 433 | 395 | |
| 434 | if (outn & 0x10) | |
| 396 | PSG->CountN++; | |
| 397 | if (PSG->CountN >= NOISE_PERIOD(PSG) * PSG->step) | |
| 398 | { | |
| 399 | /* Is noise output going to change? */ | |
| 400 | if ((PSG->RNG + 1) & 2) /* (bit0^bit1)? */ | |
| 435 | 401 | { |
| 436 | if (PSG->OutputB) volb += PSG->CountB; | |
| 437 | PSG->CountB -= nextevent; | |
| 438 | while (PSG->CountB <= 0) | |
| 439 | { | |
| 440 | PSG->CountB += PSG->PeriodB; | |
| 441 | if (PSG->CountB > 0) | |
| 442 | { | |
| 443 | PSG->OutputB ^= 1; | |
| 444 | if (PSG->OutputB) volb += PSG->PeriodB; | |
| 445 | break; | |
| 446 | } | |
| 447 | PSG->CountB += PSG->PeriodB; | |
| 448 | volb += PSG->PeriodB; | |
| 449 | } | |
| 450 | if (PSG->OutputB) volb -= PSG->CountB; | |
| 402 | PSG->OutputN ^= 1; | |
| 451 | 403 | } |
| 452 | else | |
| 453 | { | |
| 454 | PSG->CountB -= nextevent; | |
| 455 | while (PSG->CountB <= 0) | |
| 456 | { | |
| 457 | PSG->CountB += PSG->PeriodB; | |
| 458 | if (PSG->CountB > 0) | |
| 459 | { | |
| 460 | PSG->OutputB ^= 1; | |
| 461 | break; | |
| 462 | } | |
| 463 | PSG->CountB += PSG->PeriodB; | |
| 464 | } | |
| 465 | } | |
| 466 | 404 | |
| 467 | if (outn & 0x20) | |
| 468 | { | |
| 469 | if (PSG->OutputC) volc += PSG->CountC; | |
| 470 | PSG->CountC -= nextevent; | |
| 471 | while (PSG->CountC <= 0) | |
| 472 | { | |
| 473 | PSG->CountC += PSG->PeriodC; | |
| 474 | if (PSG->CountC > 0) | |
| 475 | { | |
| 476 | PSG->OutputC ^= 1; | |
| 477 | if (PSG->OutputC) volc += PSG->PeriodC; | |
| 478 | break; | |
| 479 | } | |
| 480 | PSG->CountC += PSG->PeriodC; | |
| 481 | volc += PSG->PeriodC; | |
| 482 | } | |
| 483 | if (PSG->OutputC) volc -= PSG->CountC; | |
| 484 | } | |
| 485 | else | |
| 486 | { | |
| 487 | PSG->CountC -= nextevent; | |
| 488 | while (PSG->CountC <= 0) | |
| 489 | { | |
| 490 | PSG->CountC += PSG->PeriodC; | |
| 491 | if (PSG->CountC > 0) | |
| 492 | { | |
| 493 | PSG->OutputC ^= 1; | |
| 494 | break; | |
| 495 | } | |
| 496 | PSG->CountC += PSG->PeriodC; | |
| 497 | } | |
| 498 | } | |
| 405 | /* The Random Number Generator of the 8910 is a 17-bit shift */ | |
| 406 | /* register. The input to the shift register is bit0 XOR bit3 */ | |
| 407 | /* (bit0 is the output). This was verified on AY-3-8910 and YM2149 chips. */ | |
| 499 | 408 | |
| 500 | PSG->CountN -= nextevent; | |
| 501 | if (PSG->CountN <= 0) | |
| 502 | { | |
| 503 | /* Is noise output going to change? */ | |
| 504 | if ((PSG->RNG + 1) & 2) /* (bit0^bit1)? */ | |
| 505 | { | |
| 506 | PSG->OutputN = ~PSG->OutputN; | |
| 507 | outn = (PSG->OutputN | PSG->Regs[AY_ENABLE]); | |
| 508 | } | |
| 409 | /* The following is a fast way to compute bit17 = bit0^bit3. */ | |
| 410 | /* Instead of doing all the logic operations, we only check */ | |
| 411 | /* bit0, relying on the fact that after three shifts of the */ | |
| 412 | /* register, what now is bit3 will become bit0, and will */ | |
| 413 | /* invert, if necessary, bit14, which previously was bit17. */ | |
| 414 | if (PSG->RNG & 1) | |
| 415 | PSG->RNG ^= 0x24000; /* This version is called the "Galois configuration". */ | |
| 416 | PSG->RNG >>= 1; | |
| 417 | PSG->CountN = 0; | |
| 418 | } | |
| 509 | 419 | |
| 510 | /* The Random Number Generator of the 8910 is a 17-bit shift */ | |
| 511 | /* register. The input to the shift register is bit0 XOR bit3 */ | |
| 512 | /* (bit0 is the output). This was verified on AY-3-8910 and YM2149 chips. */ | |
| 420 | for (chan = 0; chan < NUM_CHANNELS; chan++) | |
| 421 | { | |
| 422 | PSG->vol_enabled[chan] = (PSG->Output[chan] | TONE_ENABLEQ(PSG, chan)) & (PSG->OutputN | NOISE_ENABLEQ(PSG, chan)); | |
| 423 | } | |
| 513 | 424 | |
| 514 | /* The following is a fast way to compute bit17 = bit0^bit3. */ | |
| 515 | /* Instead of doing all the logic operations, we only check */ | |
| 516 | /* bit0, relying on the fact that after three shifts of the */ | |
| 517 | /* register, what now is bit3 will become bit0, and will */ | |
| 518 | /* invert, if necessary, bit14, which previously was bit17. */ | |
| 519 | if (PSG->RNG & 1) PSG->RNG ^= 0x24000; /* This version is called the "Galois configuration". */ | |
| 520 | PSG->RNG >>= 1; | |
| 521 | PSG->CountN += PSG->PeriodN; | |
| 522 | } | |
| 523 | ||
| 524 | left -= nextevent; | |
| 525 | } while (left > 0); | |
| 526 | ||
| 527 | 425 | /* update envelope */ |
| 528 | 426 | if (PSG->Holding == 0) |
| 529 | 427 | { |
| 530 | PSG->CountE -= STEP; | |
| 531 | if (PSG->CountE <= 0) | |
| 428 | PSG->CountE++; | |
| 429 | if (PSG->CountE >= ENVELOPE_PERIOD(PSG)) | |
| 532 | 430 | { |
| 533 | do | |
| 534 | { | |
| 535 | PSG->CountEnv--; | |
| 536 | PSG->CountE += PSG->PeriodE; | |
| 537 | } while (PSG->CountE <= 0); | |
| 431 | PSG->CountE = 0; | |
| 432 | PSG->CountEnv--; | |
| 538 | 433 | |
| 539 | 434 | /* check envelope current position */ |
| 540 | 435 | if (PSG->CountEnv < 0) |
| r2454 | r2455 | |
| 542 | 437 | if (PSG->Hold) |
| 543 | 438 | { |
| 544 | 439 | if (PSG->Alternate) |
| 545 | PSG->Attack ^= | |
| 440 | PSG->Attack ^= PSG->EnvP; | |
| 546 | 441 | PSG->Holding = 1; |
| 547 | 442 | PSG->CountEnv = 0; |
| 548 | 443 | } |
| r2454 | r2455 | |
| 550 | 445 | { |
| 551 | 446 | /* if CountEnv has looped an odd number of times (usually 1), */ |
| 552 | 447 | /* invert the output. */ |
| 553 | if (PSG->Alternate && (PSG->CountEnv & 0x20)) | |
| 554 | PSG->Attack ^= 0x1f; | |
| 448 | if (PSG->Alternate && (PSG->CountEnv & (PSG->EnvP + 1))) | |
| 449 | PSG->Attack ^= PSG->EnvP; | |
| 555 | 450 | |
| 556 | PSG->CountEnv &= | |
| 451 | PSG->CountEnv &= PSG->EnvP; | |
| 557 | 452 | } |
| 558 | 453 | } |
| 559 | 454 | |
| 560 | PSG->VolE = PSG->VolTable[PSG->CountEnv ^ PSG->Attack]; | |
| 561 | /* reload volume */ | |
| 562 | if (PSG->EnvelopeA) PSG->VolA = PSG->VolE; | |
| 563 | if (PSG->EnvelopeB) PSG->VolB = PSG->VolE; | |
| 564 | if (PSG->EnvelopeC) PSG->VolC = PSG->VolE; | |
| 565 | 455 | } |
| 566 | 456 | } |
| 457 | PSG->VolE = (PSG->CountEnv ^ PSG->Attack); | |
| 567 | 458 | |
| 568 | 459 | if (PSG->streams == 3) |
| 569 | 460 | { |
| 570 | *(buf1++) = (vola * PSG->VolA) / STEP; | |
| 571 | *(buf2++) = (volb * PSG->VolB) / STEP; | |
| 572 | *(buf3++) = (volc * PSG->VolC) / STEP; | |
| 461 | for (chan = 0; chan < NUM_CHANNELS; chan++) | |
| 462 | if (TONE_ENVELOPE(PSG,chan)) | |
| 463 | { | |
| 464 | /* Envolope has no "off" state */ | |
| 465 | *(buf[chan]++) = PSG->VolTableE[chan][PSG->vol_enabled[chan] ? PSG->VolE : 0]; | |
| 466 | } | |
| 467 | else | |
| 468 | { | |
| 469 | *(buf[chan]++) = PSG->VolTable[chan][PSG->vol_enabled[chan] ? TONE_VOLUME(PSG, chan) : 0]; | |
| 470 | } | |
| 573 | 471 | } |
| 574 | 472 | else |
| 575 | *(buf1++) = (vola * PSG->VolA + volb * PSG->VolB + volc * PSG->VolC) / STEP; | |
| 576 | ||
| 473 | { | |
| 474 | *(buf[0]++) = mix_3D(PSG); | |
| 475 | #if 0 | |
| 476 | *(buf[0]) = ( vol_enabled[0] * PSG->VolTable[PSG->Vol[0]] | |
| 477 | + vol_enabled[1] * PSG->VolTable[PSG->Vol[1]] | |
| 478 | + vol_enabled[2] * PSG->VolTable[PSG->Vol[2]]) / PSG->step; | |
| 479 | #endif | |
| 480 | } | |
| 577 | 481 | length--; |
| 578 | 482 | } |
| 579 | 483 | } |
| r2454 | r2455 | |
| 589 | 493 | stream_set_output_gain(PSG->Channel, ch, volume / 100.0); |
| 590 | 494 | } |
| 591 | 495 | |
| 496 | INLINE void build_single_table(double rl, ay_ym_param *par, int normalize, INT32 *tab, int zero_is_off) | |
| 497 | { | |
| 498 | int j; | |
| 499 | double rt, rw = 0; | |
| 500 | double temp[32], min=10.0, max=0.0; | |
| 592 | 501 | |
| 593 | static void build_mixer_table(struct AY8910 *PSG) | |
| 502 | for (j=0; j < par->N; j++) | |
| 503 | { | |
| 504 | rt = 1.0 / par->r_down + 1.0 / rl; | |
| 505 | ||
| 506 | rw = 1.0 / par->res[j]; | |
| 507 | rt += 1.0 / par->res[j]; | |
| 508 | ||
| 509 | if (!(zero_is_off && j == 0)) | |
| 510 | { | |
| 511 | rw += 1.0 / par->r_up; | |
| 512 | rt += 1.0 / par->r_up; | |
| 513 | } | |
| 514 | ||
| 515 | temp[j] = rw / rt; | |
| 516 | if (temp[j] < min) | |
| 517 | min = temp[j]; | |
| 518 | if (temp[j] > max) | |
| 519 | max = temp[j]; | |
| 520 | } | |
| 521 | if (normalize) | |
| 522 | { | |
| 523 | for (j=0; j < par->N; j++) | |
| 524 | tab[j] = MAX_OUTPUT * (((temp[j] - min)/(max-min)) - 0.25) * 0.5; | |
| 525 | } | |
| 526 | else | |
| 527 | { | |
| 528 | for (j=0; j < par->N; j++) | |
| 529 | tab[j] = MAX_OUTPUT * temp[j]; | |
| 530 | } | |
| 531 | ||
| 532 | } | |
| 533 | ||
| 534 | INLINE void build_3D_table(double rl, ay_ym_param *par, ay_ym_param *parE, int normalize, double factor, int zero_is_off, INT32 *tab) | |
| 594 | 535 | { |
| 595 | int i; | |
| 596 | double out; | |
| 536 | int j, j1, j2, j3, e, indx; | |
| 537 | double rt, rw, n; | |
| 538 | double min = 10.0, max = 0.0; | |
| 539 | double *temp; | |
| 597 | 540 | |
| 541 | temp = malloc(8*32*32*32*sizeof(*temp)); | |
| 598 | 542 | |
| 599 | /* calculate the volume->voltage conversion table */ | |
| 600 | /* The AY-3-8910 has 16 levels, in a logarithmic scale (3dB per step) */ | |
| 601 | /* The YM2149 still has 16 levels for the tone generators, but 32 for */ | |
| 602 | /* the envelope generator (1.5dB per step). */ | |
| 603 | out = MAX_OUTPUT; | |
| 604 | for (i = 31;i > 0;i--) | |
| 543 | for (e=0; e < 8; e++) | |
| 544 | for (j1=0; j1 < 32; j1++) | |
| 545 | for (j2=0; j2 < 32; j2++) | |
| 546 | for (j3=0; j3 < 32; j3++) | |
| 547 | { | |
| 548 | if (zero_is_off) | |
| 549 | { | |
| 550 | n = (j1 != 0 || (e & 0x01)) ? 1 : 0; | |
| 551 | n += (j2 != 0 || (e & 0x02)) ? 1 : 0; | |
| 552 | n += (j3 != 0 || (e & 0x04)) ? 1 : 0; | |
| 553 | } | |
| 554 | else | |
| 555 | n = 3.0; | |
| 556 | ||
| 557 | rt = n / par->r_up + 3.0 / par->r_down + 1.0 / rl; | |
| 558 | rw = n / par->r_up; | |
| 559 | ||
| 560 | rw += 1.0 / ( (e & 0x01) ? parE->res[j1] : par->res[j1]); | |
| 561 | rt += 1.0 / ( (e & 0x01) ? parE->res[j1] : par->res[j1]); | |
| 562 | rw += 1.0 / ( (e & 0x02) ? parE->res[j2] : par->res[j2]); | |
| 563 | rt += 1.0 / ( (e & 0x02) ? parE->res[j2] : par->res[j2]); | |
| 564 | rw += 1.0 / ( (e & 0x04) ? parE->res[j3] : par->res[j3]); | |
| 565 | rt += 1.0 / ( (e & 0x04) ? parE->res[j3] : par->res[j3]); | |
| 566 | ||
| 567 | indx = (e << 15) | (j3<<10) | (j2<<5) | j1; | |
| 568 | temp[indx] = rw / rt; | |
| 569 | if (temp[indx] < min) | |
| 570 | min = temp[indx]; | |
| 571 | if (temp[indx] > max) | |
| 572 | max = temp[indx]; | |
| 573 | } | |
| 574 | ||
| 575 | if (normalize) | |
| 605 | 576 | { |
| 606 | PSG->VolTable[i] = out + 0.5; /* round to nearest */ | |
| 577 | for (j=0; j < 32*32*32*8; j++) | |
| 578 | tab[j] = MAX_OUTPUT * (((temp[j] - min)/(max-min)) - 0.25) * factor; | |
| 579 | } | |
| 580 | else | |
| 581 | { | |
| 582 | for (j=0; j < 32*32*32*8; j++) | |
| 583 | tab[j] = MAX_OUTPUT * temp[j]; | |
| 584 | } | |
| 607 | 585 | |
| 608 | out /= 1.188502227; /* = 10 ^ (1.5/20) = 1.5dB */ | |
| 609 | } | |
| 610 | PSG->VolTable[0] = 0; | |
| 586 | /* for (e=0;e<16;e++) printf("%d %d\n",e<<10, tab[e<<10]); */ | |
| 587 | ||
| 588 | free(temp); | |
| 611 | 589 | } |
| 612 | 590 | |
| 613 | 591 | |
| 614 | ||
| 615 | static void AY8910_init(struct AY8910 *PSG, int streams, | |
| 616 | int clock,int sample_rate, | |
| 617 | read8_machine_func portAread,read8_machine_func portBread, | |
| 618 | write8_machine_func portAwrite,write8_machine_func portBwrite) | |
| 592 | static void build_mixer_table(struct AY8910 *PSG) | |
| 619 | 593 | { |
| 620 | PSG->PortAread = portAread; | |
| 621 | PSG->PortBread = portBread; | |
| 622 | PSG->PortAwrite = portAwrite; | |
| 623 | PSG->PortBwrite = portBwrite; | |
| 594 | int normalize = 0; | |
| 595 | int chan; | |
| 624 | 596 | |
| 625 | /* the step clock for the tone and noise generators is the chip clock */ | |
| 626 | /* divided by 8; for the envelope generator of the AY-3-8910, it is half */ | |
| 627 | /* that much (clock/16), but the envelope of the YM2149 goes twice as */ | |
| 628 | /* fast, therefore again clock/8. */ | |
| 629 | PSG->Channel = stream_create(0,streams,clock/8,PSG,AY8910Update); | |
| 597 | if ((PSG->intf->flags & AY8910_LEGACY_OUTPUT) != 0) | |
| 598 | { | |
| 599 | logerror("AY-3-8910/YM2149 using legacy output levels!\n"); | |
| 600 | normalize = 1; | |
| 601 | } | |
| 630 | 602 | |
| 631 | ay8910_set_clock_ym(PSG,clock); | |
| 603 | for (chan=0; chan < NUM_CHANNELS; chan++) | |
| 604 | { | |
| 605 | build_single_table(PSG->intf->res_load[chan], PSG->par, normalize, PSG->VolTable[chan], PSG->zero_is_off); | |
| 606 | build_single_table(PSG->intf->res_load[chan], PSG->parE, normalize, PSG->VolTableE[chan], 0); | |
| 607 | } | |
| 608 | build_3D_table(PSG->intf->res_load[0], PSG->par, PSG->parE, normalize, 3, PSG->zero_is_off, PSG->vol3d_tab); | |
| 632 | 609 | } |
| 633 | 610 | |
| 634 | 611 | |
| 635 | 612 | static void AY8910_statesave(struct AY8910 *PSG, int sndindex) |
| 636 | 613 | { |
| 637 | 614 | state_save_register_item("AY8910", sndindex, PSG->register_latch); |
| 638 | state_save_register_item_array("AY8910", sndindex, PSG-> | |
| 615 | state_save_register_item_array("AY8910", sndindex, PSG->regs); | |
| 639 | 616 | state_save_register_item("AY8910", sndindex, PSG->lastEnable); |
| 640 | 617 | |
| 641 | state_save_register_item("AY8910", sndindex, PSG->PeriodA); | |
| 642 | state_save_register_item("AY8910", sndindex, PSG->PeriodB); | |
| 643 | state_save_register_item("AY8910", sndindex, PSG->PeriodC); | |
| 644 | state_save_register_item("AY8910", sndindex, PSG->PeriodN); | |
| 645 | state_save_register_item("AY8910", sndindex, PSG->PeriodE); | |
| 646 | ||
| 647 | state_save_register_item("AY8910", sndindex, PSG->CountA); | |
| 648 | state_save_register_item("AY8910", sndindex, PSG->CountB); | |
| 649 | state_save_register_item("AY8910", sndindex, PSG->CountC); | |
| 618 | state_save_register_item_array("AY8910", sndindex, PSG->Count); | |
| 650 | 619 | state_save_register_item("AY8910", sndindex, PSG->CountN); |
| 651 | 620 | state_save_register_item("AY8910", sndindex, PSG->CountE); |
| 652 | 621 | |
| 653 | state_save_register_item("AY8910", sndindex, PSG->VolA); | |
| 654 | state_save_register_item("AY8910", sndindex, PSG->VolB); | |
| 655 | state_save_register_item("AY8910", sndindex, PSG->VolC); | |
| 656 | 622 | state_save_register_item("AY8910", sndindex, PSG->VolE); |
| 657 | 623 | |
| 658 | state_save_register_item("AY8910", sndindex, PSG->EnvelopeA); | |
| 659 | state_save_register_item("AY8910", sndindex, PSG->EnvelopeB); | |
| 660 | state_save_register_item("AY8910", sndindex, PSG->EnvelopeC); | |
| 661 | ||
| 662 | state_save_register_item("AY8910", sndindex, PSG->OutputA); | |
| 663 | state_save_register_item("AY8910", sndindex, PSG->OutputB); | |
| 664 | state_save_register_item("AY8910", sndindex, PSG->OutputC); | |
| 624 | state_save_register_item_array("AY8910", sndindex, PSG->Output); | |
| 665 | 625 | state_save_register_item("AY8910", sndindex, PSG->OutputN); |
| 666 | 626 | |
| 667 | 627 | state_save_register_item("AY8910", sndindex, PSG->CountEnv); |
| r2454 | r2455 | |
| 673 | 633 | } |
| 674 | 634 | |
| 675 | 635 | |
| 676 | void *ay8910_start_ym(sound_type chip_type, int sndindex, int clock, int streams, | |
| 677 | read8_machine_func portAread, read8_machine_func portBread, | |
| 678 | write8_machine_func portAwrite, write8_machine_func portBwrite) | |
| 636 | void *ay8910_start_ym(sound_type chip_type, int sndindex, int clock, const struct AY8910interface *intf) | |
| 679 | 637 | { |
| 680 | 638 | struct AY8910 *info; |
| 681 | 639 | |
| 682 | 640 | info = auto_malloc(sizeof(*info)); |
| 683 | 641 | memset(info, 0, sizeof(*info)); |
| 684 | 642 | info->index = sndindex; |
| 685 | info->streams = streams; | |
| 643 | info->intf = intf; | |
| 644 | if ((info->intf->flags & AY8910_SINGLE_OUTPUT) != 0) | |
| 645 | { | |
| 646 | logerror("AY-3-8910/YM2149 using single output!\n"); | |
| 647 | info->streams = 1; | |
| 648 | } | |
| 649 | else | |
| 650 | info->streams = 3; | |
| 686 | 651 | |
| 687 | AY8910_init(info, streams, clock, | |
| 688 | clock/8, | |
| 689 | portAread,portBread, | |
| 690 | portAwrite,portBwrite); | |
| 652 | switch (chip_type) | |
| 653 | { | |
| 654 | case SOUND_AY8910: | |
| 655 | case SOUND_AY8930: | |
| 656 | info->step = 1; | |
| 657 | info->par = &ay8910_param; | |
| 658 | info->parE = &ay8910_param; | |
| 659 | info->zero_is_off = 1; | |
| 660 | break; | |
| 661 | case SOUND_YM2149: | |
| 662 | case SOUND_YM2203: | |
| 663 | case SOUND_YM2610: | |
| 664 | case SOUND_YM2610B: | |
| 665 | case SOUND_YM2608: | |
| 666 | case SOUND_YMZ284: | |
| 667 | case SOUND_YMZ294: | |
| 668 | case SOUND_YM3439: | |
| 669 | default: | |
| 670 | info->step = 2; | |
| 671 | info->par = &ym2149_param; | |
| 672 | info->parE = &ym2149_paramE; | |
| 673 | info->zero_is_off = 0; | |
| 674 | break; | |
| 675 | } | |
| 676 | info->EnvP = info->step * 16 - 1; | |
| 691 | 677 | |
| 692 | 678 | build_mixer_table(info); |
| 679 | ||
| 680 | /* the step clock for the tone and noise generators is the chip clock */ | |
| 681 | /* divided by 8 for the YM2149 and 16 for the AY-3-8910, To emulate a */ | |
| 682 | /* full cycle, we have to use a divisor of 4 resp. 8 */ | |
| 683 | info->Channel = stream_create(0,info->streams,clock / (8 / info->step),info,AY8910_update); | |
| 684 | ||
| 685 | ay8910_set_clock_ym(info,clock); | |
| 693 | 686 | AY8910_statesave(info, sndindex); |
| 694 | 687 | |
| 695 | 688 | return info; |
| r2454 | r2455 | |
| 706 | 699 | |
| 707 | 700 | PSG->register_latch = 0; |
| 708 | 701 | PSG->RNG = 1; |
| 709 | PSG->OutputA = 0; | |
| 710 | PSG->OutputB = 0; | |
| 711 | PSG->OutputC = 0; | |
| 712 | PSG->OutputN = 0xff; | |
| 702 | PSG->Output[0] = 0; | |
| 703 | PSG->Output[1] = 0; | |
| 704 | PSG->Output[2] = 0; | |
| 705 | PSG->Count[0] = 0; | |
| 706 | PSG->Count[1] = 0; | |
| 707 | PSG->Count[2] = 0; | |
| 708 | PSG->CountN = 0; | |
| 709 | PSG->CountE = 0; | |
| 710 | PSG->OutputN = 0x01; | |
| 713 | 711 | PSG->lastEnable = -1; /* force a write */ |
| 714 | 712 | for (i = 0;i < AY_PORTA;i++) |
| 715 | _AYWriteReg(PSG,i,0); /* AYWriteReg() uses the timer system; we cannot */ | |
| 716 | /* call it at this time because the timer system */ | |
| 717 | /* has not been initialized. */ | |
| 713 | AY8910_write_reg(PSG,i,0); | |
| 718 | 714 | PSG->ready = 1; |
| 719 | 715 | } |
| 720 | 716 | |
| 721 | 717 | void ay8910_set_clock_ym(void *chip, int clock) |
| 722 | 718 | { |
| 723 | 719 | struct AY8910 *PSG = chip; |
| 724 | stream_set_sample_rate(PSG->Channel, clock/8); | |
| 720 | stream_set_sample_rate(PSG->Channel, clock / (8 / PSG->step)); | |
| 725 | 721 | } |
| 726 | 722 | |
| 727 | 723 | void ay8910_write_ym(void *chip, int addr, int data) |
| r2454 | r2455 | |
| 733 | 729 | int r = PSG->register_latch; |
| 734 | 730 | |
| 735 | 731 | if (r > 15) return; |
| 736 | if (r | |
| 732 | if (r == AY_ESHAPE || PSG->regs[r] != data) | |
| 737 | 733 | { |
| 738 | if (r == AY_ESHAPE || PSG->Regs[r] != data) | |
| 739 | { | |
| 740 | /* update the output buffer before changing the register */ | |
| 741 | stream_update(PSG->Channel); | |
| 742 | } | |
| 734 | /* update the output buffer before changing the register */ | |
| 735 | stream_update(PSG->Channel); | |
| 743 | 736 | } |
| 744 | 737 | |
| 745 | | |
| 738 | | |
| 746 | 739 | } |
| 747 | 740 | else |
| 748 | 741 | { /* Register port */ |
| r2454 | r2455 | |
| 760 | 753 | switch (r) |
| 761 | 754 | { |
| 762 | 755 | case AY_PORTA: |
| 763 | if ((PSG-> | |
| 756 | if ((PSG->regs[AY_ENABLE] & 0x40) != 0) | |
| 764 | 757 | logerror("warning: read from 8910 #%d Port A set as output\n",PSG->index); |
| 765 | 758 | /* |
| 766 | 759 | even if the port is set as output, we still need to return the external |
| 767 | 760 | data. Some games, like kidniki, need this to work. |
| 768 | 761 | */ |
| 769 | if (PSG->PortAread) PSG->Regs[AY_PORTA] = (*PSG->PortAread)(Machine, 0); | |
| 770 | else logerror("PC %04x: warning - read 8910 #%d Port A\n",activecpu_get_pc(),PSG->index); | |
| 762 | if (PSG->intf->portAread) | |
| 763 | PSG->regs[AY_PORTA] = (*PSG->intf->portAread)(Machine, 0); | |
| 764 | else | |
| 765 | logerror("PC %04x: warning - read 8910 #%d Port A\n",activecpu_get_pc(),PSG->index); | |
| 771 | 766 | break; |
| 772 | 767 | case AY_PORTB: |
| 773 | if ((PSG-> | |
| 768 | if ((PSG->regs[AY_ENABLE] & 0x80) != 0) | |
| 774 | 769 | logerror("warning: read from 8910 #%d Port B set as output\n",PSG->index); |
| 775 | if (PSG->PortBread) PSG->Regs[AY_PORTB] = (*PSG->PortBread)(Machine, 0); | |
| 776 | else logerror("PC %04x: warning - read 8910 #%d Port B\n",activecpu_get_pc(),PSG->index); | |
| 770 | if (PSG->intf->portBread) | |
| 771 | PSG->regs[AY_PORTB] = (*PSG->intf->portBread)(Machine, 0); | |
| 772 | else | |
| 773 | logerror("PC %04x: warning - read 8910 #%d Port B\n",activecpu_get_pc(),PSG->index); | |
| 777 | 774 | break; |
| 778 | 775 | } |
| 779 | return PSG-> | |
| 776 | return PSG->regs[r]; | |
| 780 | 777 | } |
| 781 | 778 | |
| 782 | 779 | |
| 783 | ||
| 784 | 780 | static void *ay8910_start(int sndindex, int clock, const void *config) |
| 785 | 781 | { |
| 786 | static const struct AY8910interface generic_ay8910 = { 0 }; | |
| 787 | const struct AY8910interface *intf = config ? config : &generic_ay8910; | |
| 788 | return ay8910_start_ym(SOUND_AY8910, sndindex+16, clock, 3, intf->portAread, intf->portBread, intf->portAwrite, intf->portBwrite); | |
| 782 | static const struct AY8910interface generic_ay8910 = | |
| 783 | { | |
| 784 | AY8910_LEGACY_OUTPUT, | |
| 785 | AY8910_DEFAULT_LOADS, | |
| 786 | NULL, NULL, NULL, NULL | |
| 787 | }; | |
| 788 | const struct AY8910interface *intf = (config ? config : &generic_ay8910); | |
| 789 | return ay8910_start_ym(SOUND_AY8910, sndindex+16, clock, intf); | |
| 789 | 790 | } |
| 790 | 791 | |
| 792 | static void *ym2149_start(int sndindex, int clock, const void *config) | |
| 793 | { | |
| 794 | static const struct AY8910interface generic_ay8910 = | |
| 795 | { | |
| 796 | AY8910_LEGACY_OUTPUT, | |
| 797 | AY8910_DEFAULT_LOADS, | |
| 798 | NULL, NULL, NULL, NULL | |
| 799 | }; | |
| 800 | const struct AY8910interface *intf = (config ? config : &generic_ay8910); | |
| 801 | return ay8910_start_ym(SOUND_YM2149, sndindex+16, clock, intf); | |
| 802 | } | |
| 803 | ||
| 791 | 804 | static void ay8910_stop(void *chip) |
| 792 | 805 | { |
| 793 | 806 | ay8910_stop_ym(chip); |
| r2454 | r2455 | |
| 863 | 876 | { |
| 864 | 877 | switch (state) |
| 865 | 878 | { |
| 866 | case SNDINFO_PTR_START: info->start = | |
| 879 | case SNDINFO_PTR_START: info->start = | |
| 867 | 880 | case SNDINFO_STR_NAME: info->s = "YM2149"; break; |
| 868 | 881 | default: ay8910_get_info(token, state, info); break; |
| 869 | 882 | } |
| r2454 | r2455 | |
| 873 | 886 | { |
| 874 | 887 | switch (state) |
| 875 | 888 | { |
| 876 | case SNDINFO_PTR_START: info->start = | |
| 889 | case SNDINFO_PTR_START: info->start = | |
| 877 | 890 | case SNDINFO_STR_NAME: info->s = "YM3439"; break; |
| 878 | 891 | default: ay8910_get_info(token, state, info); break; |
| 879 | 892 | } |
| r2454 | r2455 | |
| 883 | 896 | { |
| 884 | 897 | switch (state) |
| 885 | 898 | { |
| 886 | case SNDINFO_PTR_START: info->start = | |
| 899 | case SNDINFO_PTR_START: info->start = | |
| 887 | 900 | case SNDINFO_STR_NAME: info->s = "YMZ284"; break; |
| 888 | 901 | default: ay8910_get_info(token, state, info); break; |
| 889 | 902 | } |
| r2454 | r2455 | |
| 893 | 906 | { |
| 894 | 907 | switch (state) |
| 895 | 908 | { |
| 896 | case SNDINFO_PTR_START: info->start = | |
| 909 | case SNDINFO_PTR_START: info->start = | |
| 897 | 910 | case SNDINFO_STR_NAME: info->s = "YMZ294"; break; |
| 898 | 911 | default: ay8910_get_info(token, state, info); break; |
| 899 | 912 | } |
| 900 | 913 | } |
| 914 | ||
| 915 | /* AY8910 interface */ | |
| 916 | READ8_HANDLER( AY8910_read_port_0_r ) { return ay8910_read_ym(sndti_token(SOUND_AY8910, 0)); } | |
| 917 | READ8_HANDLER( AY8910_read_port_1_r ) { return ay8910_read_ym(sndti_token(SOUND_AY8910, 1)); } | |
| 918 | READ8_HANDLER( AY8910_read_port_2_r ) { return ay8910_read_ym(sndti_token(SOUND_AY8910, 2)); } | |
| 919 | READ8_HANDLER( AY8910_read_port_3_r ) { return ay8910_read_ym(sndti_token(SOUND_AY8910, 3)); } | |
| 920 | READ8_HANDLER( AY8910_read_port_4_r ) { return ay8910_read_ym(sndti_token(SOUND_AY8910, 4)); } | |
| 921 | READ16_HANDLER( AY8910_read_port_0_lsb_r ) { return ay8910_read_ym(sndti_token(SOUND_AY8910, 0)); } | |
| 922 | READ16_HANDLER( AY8910_read_port_1_lsb_r ) { return ay8910_read_ym(sndti_token(SOUND_AY8910, 1)); } | |
| 923 | READ16_HANDLER( AY8910_read_port_2_lsb_r ) { return ay8910_read_ym(sndti_token(SOUND_AY8910, 2)); } | |
| 924 | READ16_HANDLER( AY8910_read_port_3_lsb_r ) { return ay8910_read_ym(sndti_token(SOUND_AY8910, 3)); } | |
| 925 | READ16_HANDLER( AY8910_read_port_4_lsb_r ) { return ay8910_read_ym(sndti_token(SOUND_AY8910, 4)); } | |
| 926 | READ16_HANDLER( AY8910_read_port_0_msb_r ) { return ay8910_read_ym(sndti_token(SOUND_AY8910, 0)) << 8; } | |
| 927 | READ16_HANDLER( AY8910_read_port_1_msb_r ) { return ay8910_read_ym(sndti_token(SOUND_AY8910, 1)) << 8; } | |
| 928 | READ16_HANDLER( AY8910_read_port_2_msb_r ) { return ay8910_read_ym(sndti_token(SOUND_AY8910, 2)) << 8; } | |
| 929 | READ16_HANDLER( AY8910_read_port_3_msb_r ) { return ay8910_read_ym(sndti_token(SOUND_AY8910, 3)) << 8; } | |
| 930 | READ16_HANDLER( AY8910_read_port_4_msb_r ) { return ay8910_read_ym(sndti_token(SOUND_AY8910, 4)) << 8; } | |
| 931 | ||
| 932 | WRITE8_HANDLER( AY8910_control_port_0_w ) { ay8910_write_ym(sndti_token(SOUND_AY8910, 0),0,data); } | |
| 933 | WRITE8_HANDLER( AY8910_control_port_1_w ) { ay8910_write_ym(sndti_token(SOUND_AY8910, 1),0,data); } | |
| 934 | WRITE8_HANDLER( AY8910_control_port_2_w ) { ay8910_write_ym(sndti_token(SOUND_AY8910, 2),0,data); } | |
| 935 | WRITE8_HANDLER( AY8910_control_port_3_w ) { ay8910_write_ym(sndti_token(SOUND_AY8910, 3),0,data); } | |
| 936 | WRITE8_HANDLER( AY8910_control_port_4_w ) { ay8910_write_ym(sndti_token(SOUND_AY8910, 4),0,data); } | |
| 937 | WRITE16_HANDLER( AY8910_control_port_0_lsb_w ) { if (ACCESSING_BITS_0_7) ay8910_write_ym(sndti_token(SOUND_AY8910, 0),0,data & 0xff); } | |
| 938 | WRITE16_HANDLER( AY8910_control_port_1_lsb_w ) { if (ACCESSING_BITS_0_7) ay8910_write_ym(sndti_token(SOUND_AY8910, 1),0,data & 0xff); } | |
| 939 | WRITE16_HANDLER( AY8910_control_port_2_lsb_w ) { if (ACCESSING_BITS_0_7) ay8910_write_ym(sndti_token(SOUND_AY8910, 2),0,data & 0xff); } | |
| 940 | WRITE16_HANDLER( AY8910_control_port_3_lsb_w ) { if (ACCESSING_BITS_0_7) ay8910_write_ym(sndti_token(SOUND_AY8910, 3),0,data & 0xff); } | |
| 941 | WRITE16_HANDLER( AY8910_control_port_4_lsb_w ) { if (ACCESSING_BITS_0_7) ay8910_write_ym(sndti_token(SOUND_AY8910, 4),0,data & 0xff); } | |
| 942 | WRITE16_HANDLER( AY8910_control_port_0_msb_w ) { if (ACCESSING_BITS_8_15) ay8910_write_ym(sndti_token(SOUND_AY8910, 0),0,data >> 8); } | |
| 943 | WRITE16_HANDLER( AY8910_control_port_1_msb_w ) { if (ACCESSING_BITS_8_15) ay8910_write_ym(sndti_token(SOUND_AY8910, 1),0,data >> 8); } | |
| 944 | WRITE16_HANDLER( AY8910_control_port_2_msb_w ) { if (ACCESSING_BITS_8_15) ay8910_write_ym(sndti_token(SOUND_AY8910, 2),0,data >> 8); } | |
| 945 | WRITE16_HANDLER( AY8910_control_port_3_msb_w ) { if (ACCESSING_BITS_8_15) ay8910_write_ym(sndti_token(SOUND_AY8910, 3),0,data >> 8); } | |
| 946 | WRITE16_HANDLER( AY8910_control_port_4_msb_w ) { if (ACCESSING_BITS_8_15) ay8910_write_ym(sndti_token(SOUND_AY8910, 4),0,data >> 8); } | |
| 947 | ||
| 948 | WRITE8_HANDLER( AY8910_write_port_0_w ) { ay8910_write_ym(sndti_token(SOUND_AY8910, 0),1,data); } | |
| 949 | WRITE8_HANDLER( AY8910_write_port_1_w ) { ay8910_write_ym(sndti_token(SOUND_AY8910, 1),1,data); } | |
| 950 | WRITE8_HANDLER( AY8910_write_port_2_w ) { ay8910_write_ym(sndti_token(SOUND_AY8910, 2),1,data); } | |
| 951 | WRITE8_HANDLER( AY8910_write_port_3_w ) { ay8910_write_ym(sndti_token(SOUND_AY8910, 3),1,data); } | |
| 952 | WRITE8_HANDLER( AY8910_write_port_4_w ) { ay8910_write_ym(sndti_token(SOUND_AY8910, 4),1,data); } | |
| 953 | WRITE16_HANDLER( AY8910_write_port_0_lsb_w ) { if (ACCESSING_BITS_0_7) ay8910_write_ym(sndti_token(SOUND_AY8910, 0),1,data & 0xff); } | |
| 954 | WRITE16_HANDLER( AY8910_write_port_1_lsb_w ) { if (ACCESSING_BITS_0_7) ay8910_write_ym(sndti_token(SOUND_AY8910, 1),1,data & 0xff); } | |
| 955 | WRITE16_HANDLER( AY8910_write_port_2_lsb_w ) { if (ACCESSING_BITS_0_7) ay8910_write_ym(sndti_token(SOUND_AY8910, 2),1,data & 0xff); } | |
| 956 | WRITE16_HANDLER( AY8910_write_port_3_lsb_w ) { if (ACCESSING_BITS_0_7) ay8910_write_ym(sndti_token(SOUND_AY8910, 3),1,data & 0xff); } | |
| 957 | WRITE16_HANDLER( AY8910_write_port_4_lsb_w ) { if (ACCESSING_BITS_0_7) ay8910_write_ym(sndti_token(SOUND_AY8910, 4),1,data & 0xff); } | |
| 958 | WRITE16_HANDLER( AY8910_write_port_0_msb_w ) { if (ACCESSING_BITS_8_15) ay8910_write_ym(sndti_token(SOUND_AY8910, 0),1,data >> 8); } | |
| 959 | WRITE16_HANDLER( AY8910_write_port_1_msb_w ) { if (ACCESSING_BITS_8_15) ay8910_write_ym(sndti_token(SOUND_AY8910, 1),1,data >> 8); } | |
| 960 | WRITE16_HANDLER( AY8910_write_port_2_msb_w ) { if (ACCESSING_BITS_8_15) ay8910_write_ym(sndti_token(SOUND_AY8910, 2),1,data >> 8); } | |
| 961 | WRITE16_HANDLER( AY8910_write_port_3_msb_w ) { if (ACCESSING_BITS_8_15) ay8910_write_ym(sndti_token(SOUND_AY8910, 3),1,data >> 8); } | |
| 962 | WRITE16_HANDLER( AY8910_write_port_4_msb_w ) { if (ACCESSING_BITS_8_15) ay8910_write_ym(sndti_token(SOUND_AY8910, 4),1,data >> 8); } |
| r2454 | r2455 | |
|---|---|---|
| 16 | 16 | |
| 17 | 17 | #define ALL_8910_CHANNELS -1 |
| 18 | 18 | |
| 19 | ||
| 20 | /* Internal resistance at Volume level 7 */ | |
| 21 | ||
| 22 | #define AY8910_INTERNAL_RESISTANCE (356) | |
| 23 | #define YM2149_INTERNAL_RESISTANCE (353) | |
| 24 | #define AY8910_DEFAULT_LOADS {1000, 1000, 1000} | |
| 25 | ||
| 26 | ||
| 27 | #define AY8910_LEGACY_OUTPUT (1) | |
| 28 | #define AY8910_SINGLE_OUTPUT (2) | |
| 29 | #define AY8910_DISCRETE_OUTPUT (4) | |
| 30 | ||
| 19 | 31 | struct AY8910interface |
| 20 | 32 | { |
| 21 | read8_machine_func portAread; | |
| 22 | read8_machine_func portBread; | |
| 23 | write8_machine_func portAwrite; | |
| 24 | write8_machine_func portBwrite; | |
| 33 | int flags; /* Flags */ | |
| 34 | int res_load[3]; /* Load on channel in ohms */ | |
| 35 | read8_machine_func portAread; | |
| 36 | read8_machine_func portBread; | |
| 37 | write8_machine_func portAwrite; | |
| 38 | write8_machine_func portBwrite; | |
| 25 | 39 | }; |
| 26 | 40 | |
| 27 | 41 | void AY8910_set_volume(int chip,int channel,int volume); |
| r2454 | r2455 | |
| 77 | 91 | |
| 78 | 92 | /*********** An interface for SSG of YM2203 ***********/ |
| 79 | 93 | |
| 80 | void *ay8910_start_ym(sound_type chip_type, int sndindex, int clock, int streams, | |
| 81 | read8_machine_func portAread, read8_machine_func portBread, | |
| 82 | write8_machine_func portAwrite, write8_machine_func portBwrite); | |
| 94 | void *ay8910_start_ym(sound_type chip_type, int sndindex, int clock, const struct AY8910interface *intf); | |
| 83 | 95 | |
| 84 | 96 | void ay8910_stop_ym(void *chip); |
| 85 | 97 | void ay8910_reset_ym(void *chip); |
| r2454 | r2455 | |
|---|---|---|
| 1310 | 1310 | case 0x42a: |
| 1311 | 1311 | if(stv_scu && !(stv_scu[40] & 0x40) /*&& scsp_regs[0x42c/2] & 0x20*/)/*Main CPU allow sound irq*/ |
| 1312 | 1312 | { |
| 1313 | cpunum_set_input_line_and_vector( | |
| 1313 | cpunum_set_input_line_and_vector(machine, 0, 9, HOLD_LINE , 0x46); | |
| 1314 | 1314 | logerror("SCSP: Main CPU interrupt\n"); |
| 1315 | 1315 | } |
| 1316 | 1316 | break; |
| r2454 | r2455 | |
|---|---|---|
| 123 | 123 | static void *ym2610_start(int sndindex, int clock, const void *config) |
| 124 | 124 | { |
| 125 | 125 | static const struct YM2610interface generic_2610 = { 0 }; |
| 126 | static const struct AY8910interface generic_ay8910 = | |
| 127 | { | |
| 128 | AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT, | |
| 129 | AY8910_DEFAULT_LOADS, | |
| 130 | NULL, NULL, NULL, NULL | |
| 131 | }; | |
| 126 | 132 | const struct YM2610interface *intf = config ? config : &generic_2610; |
| 127 | 133 | int rate = clock/72; |
| 128 | 134 | void *pcmbufa,*pcmbufb; |
| r2454 | r2455 | |
| 135 | 141 | memset(info, 0, sizeof(*info)); |
| 136 | 142 | |
| 137 | 143 | info->intf = intf; |
| 138 | info->psg = ay8910_start_ym(SOUND_YM2610, sndindex, clock, 1 | |
| 144 | info->psg = ay8910_start_ym(SOUND_YM2610, sndindex, clock, &generic_ay8910 | |
| 139 | 145 | if (!info->psg) return NULL; |
| 140 | 146 | |
| 141 | 147 | /* Timer Handler set */ |
| r2454 | r2455 | |
| 175 | 181 | static void *ym2610b_start(int sndindex, int clock, const void *config) |
| 176 | 182 | { |
| 177 | 183 | static const struct YM2610interface generic_2610 = { 0 }; |
| 184 | static const struct AY8910interface generic_ay8910 = | |
| 185 | { | |
| 186 | AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT, | |
| 187 | AY8910_DEFAULT_LOADS, | |
| 188 | NULL, NULL, NULL, NULL | |
| 189 | }; | |
| 178 | 190 | const struct YM2610interface *intf = config ? config : &generic_2610; |
| 179 | 191 | int rate = clock/72; |
| 180 | 192 | void *pcmbufa,*pcmbufb; |
| r2454 | r2455 | |
| 187 | 199 | memset(info, 0, sizeof(*info)); |
| 188 | 200 | |
| 189 | 201 | info->intf = intf; |
| 190 | info->psg = ay8910_start_ym(SOUND_YM2610B, sndindex, clock, 1 | |
| 202 | info->psg = ay8910_start_ym(SOUND_YM2610B, sndindex, clock, &generic_ay8910 | |
| 191 | 203 | if (!info->psg) return NULL; |
| 192 | 204 | |
| 193 | 205 | /* Timer Handler set */ |
| r2454 | r2455 | |
|---|---|---|
| 115 | 115 | #include "support.h" /* use RAINE */ |
| 116 | 116 | #endif |
| 117 | 117 | |
| 118 | #include "ay8910.h" | |
| 118 | //#include "ay8910.h" | |
| 119 | 119 | #include "fm.h" |
| 120 | 120 | |
| 121 | 121 |
| r2454 | r2455 | |
|---|---|---|
| 120 | 120 | |
| 121 | 121 | static void *ym2608_start(int sndindex, int clock, const void *config) |
| 122 | 122 | { |
| 123 | static const struct YM2608interface generic_2608 = { 0 }; | |
| 123 | static const struct YM2608interface generic_2608 = | |
| 124 | { | |
| 125 | { | |
| 126 | AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT, | |
| 127 | AY8910_DEFAULT_LOADS, | |
| 128 | NULL, NULL, NULL, NULL | |
| 129 | }, | |
| 130 | NULL, | |
| 131 | 0, | |
| 132 | }; | |
| 124 | 133 | const struct YM2608interface *intf = config ? config : &generic_2608; |
| 125 | 134 | int rate = clock/72; |
| 126 | 135 | void *pcmbufa; |
| r2454 | r2455 | |
| 132 | 141 | memset(info, 0, sizeof(*info)); |
| 133 | 142 | |
| 134 | 143 | info->intf = intf; |
| 135 | info->psg = ay8910_start_ym(SOUND_YM2608, sndindex, clock, 1, intf->portAread, intf->portBread, intf->portAwrite, intf->portBwrite); | |
| 144 | /* FIXME: Force to use simgle output */ | |
| 145 | info->psg = ay8910_start_ym(SOUND_YM2608, sndindex, clock, &intf->ay8910_intf); | |
| 136 | 146 | if (!info->psg) return NULL; |
| 137 | 147 | |
| 138 | 148 | /* Timer Handler set */ |
| r2454 | r2455 | |
|---|---|---|
| 2 | 2 | #define __2608INTF_H__ |
| 3 | 3 | |
| 4 | 4 | #include "fm.h" |
| 5 | #include "ay8910.h" | |
| 5 | 6 | |
| 6 | 7 | struct YM2608interface |
| 7 | 8 | { |
| 8 | read8_machine_func portAread; | |
| 9 | read8_machine_func portBread; | |
| 10 | write8_machine_func portAwrite; | |
| 11 | write8_machine_func portBwrite; | |
| 9 | const struct AY8910interface ay8910_intf; | |
| 12 | 10 | void ( *handler )( int irq ); /* IRQ handler for the YM2608 */ |
| 13 | 11 | int pcmrom; /* Delta-T memory region ram/rom */ |
| 14 | 12 | }; |
| r2454 | r2455 | |
|---|---|---|
| 1711 | 1711 | ((data << 2) & (CONTROL_CA0 | CONTROL_CA1)); |
| 1712 | 1712 | } |
| 1713 | 1713 | if (LOG_COMMANDS && eslog) |
| 1714 | fprintf(eslog, "%06x:voice %d, control=%04x (raw=%04x & %04x)\n", activecpu_get_previouspc(), chip->current_page & 0x1f, voice->control, data, mem_mask | |
| 1714 | fprintf(eslog, "%06x:voice %d, control=%04x (raw=%04x & %04x)\n", activecpu_get_previouspc(), chip->current_page & 0x1f, voice->control, data, mem_mask | |
| 1715 | 1715 | break; |
| 1716 | 1716 | |
| 1717 | 1717 | case 0x01: /* O4(n-1) */ |
| r2454 | r2455 | |
| 1847 | 1847 | { |
| 1848 | 1848 | struct ES5506Voice *voice = &chip->voice[chip->current_page & 0x1f]; |
| 1849 | 1849 | |
| 1850 | // logerror("%04x:ES5505 write %02x/%02x = %04x & %04x\n", activecpu_get_previouspc(), chip->current_page, offset, data, mem_mask | |
| 1850 | // logerror("%04x:ES5505 write %02x/%02x = %04x & %04x\n", activecpu_get_previouspc(), chip->current_page, offset, data, mem_mask | |
| 1851 | 1851 | |
| 1852 | 1852 | /* force an update */ |
| 1853 | 1853 | stream_update(chip->stream); |
| r2454 | r2455 | |
|---|---|---|
| 1104 | 1104 | struct dst_rcfilter_sw_context *context = node->context; |
| 1105 | 1105 | int i; |
| 1106 | 1106 | double rcexp; |
| 1107 | int bits = (int)DST_RCFILTER_SW__SWITCH; | |
| 1107 | 1108 | double us=0, rs=0; |
| 1108 | 1109 | |
| 1109 | if(DST_RCFILTER_SW__ENABLE) | |
| 1110 | if (DST_RCFILTER_SW__ENABLE) | |
| 1110 | 1111 | { |
| 1111 | 1112 | for (i=0;i<4;i++) |
| 1112 | 1113 | { |
| 1113 | if ( ( | |
| 1114 | if ( ( bi | |
| 1114 | 1115 | { |
| 1115 | 1116 | us += context->vCap[i]; |
| 1116 | 1117 | rs += DST_RCFILTER_SW__R; |
| r2454 | r2455 | |
| 1119 | 1120 | node->output[0] = CD4066_ON_RES / ( CD4066_ON_RES + rs) * DST_RCFILTER_SW__VIN + DST_RCFILTER_SW__R / (CD4066_ON_RES + rs) * us; |
| 1120 | 1121 | for (i=0;i<4;i++) |
| 1121 | 1122 | { |
| 1122 | if ( ( | |
| 1123 | if ( ( bi | |
| 1123 | 1124 | { |
| 1124 | 1125 | rcexp = 1.0 - exp(-1.0 / ( CD4066_ON_RES * DST_RCFILTER_SW__C(i)) * discrete_current_context->sample_rate); |
| 1125 | 1126 | context->vCap[i] += ((node->output[0] - context->vCap[i]) * rcexp); |
| r2454 | r2455 | |
|---|---|---|
| 107 | 107 | |
| 108 | 108 | static void *ym2203_start(int sndindex, int clock, const void *config) |
| 109 | 109 | { |
| 110 | static const struct YM2203interface generic_2203 = { 0 }; | |
| 110 | static const struct YM2203interface generic_2203 = | |
| 111 | { | |
| 112 | { | |
| 113 | AY8910_LEGACY_OUTPUT, | |
| 114 | AY8910_DEFAULT_LOADS, | |
| 115 | NULL, NULL, NULL, NULL | |
| 116 | }, | |
| 117 | NULL | |
| 118 | }; | |
| 111 | 119 | const struct YM2203interface *intf = config ? config : &generic_2203; |
| 112 | 120 | struct ym2203_info *info; |
| 113 | 121 | int rate = clock/72; /* ??? */ |
| r2454 | r2455 | |
| 116 | 124 | memset(info, 0, sizeof(*info)); |
| 117 | 125 | |
| 118 | 126 | info->intf = intf; |
| 119 | info->psg = ay8910_start_ym(SOUND_YM2203, sndindex, clock, | |
| 127 | info->psg = ay8910_start_ym(SOUND_YM2203, sndindex, clock, & | |
| 120 | 128 | if (!info->psg) return NULL; |
| 121 | 129 | |
| 122 | 130 | /* Timer Handler set */ |
| r2454 | r2455 | |
|---|---|---|
| 5 | 5 | |
| 6 | 6 | struct YM2203interface |
| 7 | 7 | { |
| 8 | read8_machine_func portAread; | |
| 9 | read8_machine_func portBread; | |
| 10 | write8_machine_func portAwrite; | |
| 11 | write8_machine_func portBwrite; | |
| 8 | const struct AY8910interface ay8910_intf; | |
| 12 | 9 | void (*handler)(int irq); |
| 13 | 10 | }; |
| 14 | 11 |
| r2454 | r2455 | |
|---|---|---|
| 35 | 35 | |
| 36 | 36 | #include <math.h> |
| 37 | 37 | #include "sndintrf.h" |
| 38 | #include "deprecat.h" | |
| 39 | 38 | #include "cpuintrf.h" |
| 40 | 39 | #include "es5503.h" |
| 41 | 40 | #include "streams.h" |
| r2454 | r2455 | |
| 377 | 376 | case 0xe2: // A/D converter |
| 378 | 377 | if (chip->adc_read) |
| 379 | 378 | { |
| 380 | return chip->adc_read( | |
| 379 | return chip->adc_read(machine, 0); | |
| 381 | 380 | } |
| 382 | 381 | break; |
| 383 | 382 | } |
| r2454 | r2455 | |
|---|---|---|
| 88 | 88 | INLINE UINT16 read16be_with_read8_device_handler(read8_device_func handler, const device_config *device, offs_t offset, UINT16 mem_mask) |
| 89 | 89 | { |
| 90 | 90 | UINT16 result = 0; |
| 91 | if ( | |
| 91 | if (ACCESSING_BITS_8_15 | |
| 92 | 92 | result |= ((UINT16)(*handler)(device, offset * 2 + 0)) << 8; |
| 93 | if ( | |
| 93 | if (ACCESSING_BITS_ | |
| 94 | 94 | result |= ((UINT16)(*handler)(device, offset * 2 + 1)) << 0; |
| 95 | 95 | return result; |
| 96 | 96 | } |
| r2454 | r2455 | |
| 98 | 98 | |
| 99 | 99 | INLINE void write16be_with_write8_device_handler(write8_device_func handler, const device_config *device, offs_t offset, UINT16 data, UINT16 mem_mask) |
| 100 | 100 | { |
| 101 | if ( | |
| 101 | if (ACCESSING_BITS_8_15 | |
| 102 | 102 | (*handler)(device, offset * 2 + 0, data >> 8); |
| 103 | if ( | |
| 103 | if (ACCESSING_BITS_ | |
| 104 | 104 | (*handler)(device, offset * 2 + 1, data >> 0); |
| 105 | 105 | } |
| 106 | 106 | |
| r2454 | r2455 | |
| 114 | 114 | INLINE UINT16 read16le_with_read8_device_handler(read8_device_func handler, const device_config *device, offs_t offset, UINT16 mem_mask) |
| 115 | 115 | { |
| 116 | 116 | UINT16 result = 0; |
| 117 | if ( | |
| 117 | if (ACCESSING_BITS_ | |
| 118 | 118 | result |= ((UINT16) (*handler)(device, offset * 2 + 0)) << 0; |
| 119 | if ( | |
| 119 | if (ACCESSING_BITS_8_15 | |
| 120 | 120 | result |= ((UINT16) (*handler)(device, offset * 2 + 1)) << 8; |
| 121 | 121 | return result; |
| 122 | 122 | } |
| r2454 | r2455 | |
| 124 | 124 | |
| 125 | 125 | INLINE void write16le_with_write8_device_handler(write8_device_func handler, const device_config *device, offs_t offset, UINT16 data, UINT16 mem_mask) |
| 126 | 126 | { |
| 127 | if ( | |
| 127 | if (ACCESSING_BITS_ | |
| 128 | 128 | (*handler)(device, offset * 2 + 0, data >> 0); |
| 129 | if ( | |
| 129 | if (ACCESSING_BITS_8_15 | |
| 130 | 130 | (*handler)(device, offset * 2 + 1, data >> 8); |
| 131 | 131 | } |
| 132 | 132 | |
| r2454 | r2455 | |
| 140 | 140 | INLINE UINT32 read32be_with_read8_device_handler(read8_device_func handler, const device_config *device, offs_t offset, UINT32 mem_mask) |
| 141 | 141 | { |
| 142 | 142 | UINT32 result = 0; |
| 143 | if ( | |
| 143 | if (ACCESSING_BITS_16_31 | |
| 144 | 144 | result |= read16be_with_read8_device_handler(handler, device, offset * 2 + 0, mem_mask >> 16) << 16; |
| 145 | if ( | |
| 145 | if (ACCESSING_BITS_ | |
| 146 | 146 | result |= read16be_with_read8_device_handler(handler, device, offset * 2 + 1, mem_mask) << 0; |
| 147 | 147 | return result; |
| 148 | 148 | } |
| r2454 | r2455 | |
| 150 | 150 | |
| 151 | 151 | INLINE void write32be_with_write8_device_handler(write8_device_func handler, const device_config *device, offs_t offset, UINT32 data, UINT32 mem_mask) |
| 152 | 152 | { |
| 153 | if ( | |
| 153 | if (ACCESSING_BITS_16_31 | |
| 154 | 154 | write16be_with_write8_device_handler(handler, device, offset * 2 + 0, data >> 16, mem_mask >> 16); |
| 155 | if ( | |
| 155 | if (ACCESSING_BITS_ | |
| 156 | 156 | write16be_with_write8_device_handler(handler, device, offset * 2 + 1, data, mem_mask); |
| 157 | 157 | } |
| 158 | 158 | |
| r2454 | r2455 | |
| 166 | 166 | INLINE UINT32 read32le_with_read8_device_handler(read8_device_func handler, const device_config *device, offs_t offset, UINT32 mem_mask) |
| 167 | 167 | { |
| 168 | 168 | UINT32 result = 0; |
| 169 | if ( | |
| 169 | if (ACCESSING_BITS_ | |
| 170 | 170 | result |= read16le_with_read8_device_handler(handler, device, offset * 2 + 0, mem_mask) << 0; |
| 171 | if ( | |
| 171 | if (ACCESSING_BITS_16_31 | |
| 172 | 172 | result |= read16le_with_read8_device_handler(handler, device, offset * 2 + 1, mem_mask >> 16) << 16; |
| 173 | 173 | return result; |
| 174 | 174 | } |
| r2454 | r2455 | |
| 176 | 176 | |
| 177 | 177 | INLINE void write32le_with_write8_device_handler(write8_device_func handler, const device_config *device, offs_t offset, UINT32 data, UINT32 mem_mask) |
| 178 | 178 | { |
| 179 | if ( | |
| 179 | if (ACCESSING_BITS_ | |
| 180 | 180 | write16le_with_write8_device_handler(handler, device, offset * 2 + 0, data, mem_mask); |
| 181 | if ( | |
| 181 | if (ACCESSING_BITS_16_31 | |
| 182 | 182 | write16le_with_write8_device_handler(handler, device, offset * 2 + 1, data >> 16, mem_mask >> 16); |
| 183 | 183 | } |
| 184 | 184 | |
| r2454 | r2455 | |
| 192 | 192 | INLINE UINT32 read32be_with_16be_device_handler(read16_device_func handler, const device_config *device, offs_t offset, UINT32 mem_mask) |
| 193 | 193 | { |
| 194 | 194 | UINT32 result = 0; |
| 195 | if ( | |
| 195 | if (ACCESSING_BITS_16_31 | |
| 196 | 196 | result |= (*handler)(device, offset * 2 + 0, mem_mask >> 16) << 16; |
| 197 | if ( | |
| 197 | if (ACCESSING_BITS_ | |
| 198 | 198 | result |= (*handler)(device, offset * 2 + 1, mem_mask) << 0; |
| 199 | 199 | return result; |
| 200 | 200 | } |
| r2454 | r2455 | |
| 202 | 202 | |
| 203 | 203 | INLINE void write32be_with_16be_device_handler(write16_device_func handler, const device_config *device, offs_t offset, UINT32 data, UINT32 mem_mask) |
| 204 | 204 | { |
| 205 | if ( | |
| 205 | if (ACCESSING_BITS_16_31 | |
| 206 | 206 | (*handler)(device, offset * 2 + 0, data >> 16, mem_mask >> 16); |
| 207 | if ( | |
| 207 | if (ACCESSING_BITS_ | |
| 208 | 208 | (*handler)(device, offset * 2 + 1, data, mem_mask); |
| 209 | 209 | } |
| 210 | 210 | |
| r2454 | r2455 | |
| 218 | 218 | INLINE UINT32 read32le_with_16le_device_handler(read16_device_func handler, const device_config *device, offs_t offset, UINT32 mem_mask) |
| 219 | 219 | { |
| 220 | 220 | UINT32 result = 0; |
| 221 | if ( | |
| 221 | if (ACCESSING_BITS_ | |
| 222 | 222 | result |= (*handler)(device, offset * 2 + 0, mem_mask) << 0; |
| 223 | if ( | |
| 223 | if (ACCESSING_BITS_16_31 | |
| 224 | 224 | result |= (*handler)(device, offset * 2 + 1, mem_mask >> 16) << 16; |
| 225 | 225 | return result; |
| 226 | 226 | } |
| r2454 | r2455 | |
| 228 | 228 | |
| 229 | 229 | INLINE void write32le_with_16le_device_handler(write16_device_func handler, const device_config *device, offs_t offset, UINT32 data, UINT32 mem_mask) |
| 230 | 230 | { |
| 231 | if ( | |
| 231 | if (ACCESSING_BITS_ | |
| 232 | 232 | (*handler)(device, offset * 2 + 0, data, mem_mask); |
| 233 | if ( | |
| 233 | if (ACCESSING_BITS_16_31 | |
| 234 | 234 | (*handler)(device, offset * 2 + 1, data >> 16, mem_mask >> 16); |
| 235 | 235 | } |
| 236 | 236 | |
| r2454 | r2455 | |
| 290 | 290 | INLINE UINT64 read64be_with_read8_device_handler(read8_device_func handler, const device_config *device, offs_t offset, UINT64 mem_mask) |
| 291 | 291 | { |
| 292 | 292 | UINT64 result = 0; |
| 293 | if ( | |
| 293 | if (ACCESSING_BITS_32_63 | |
| 294 | 294 | result |= (UINT64)read32be_with_read8_device_handler(handler, device, offset * 2 + 0, mem_mask >> 32) << 32; |
| 295 | if ( | |
| 295 | if (ACCESSING_BITS_ | |
| 296 | 296 | result |= (UINT64)read32be_with_read8_device_handler(handler, device, offset * 2 + 1, mem_mask) << 0; |
| 297 | 297 | return result; |
| 298 | 298 | } |
| r2454 | r2455 | |
| 300 | 300 | |
| 301 | 301 | INLINE void write64be_with_write8_device_handler(write8_device_func handler, const device_config *device, offs_t offset, UINT64 data, UINT64 mem_mask) |
| 302 | 302 | { |
| 303 | if ( | |
| 303 | if (ACCESSING_BITS_32_63 | |
| 304 | 304 | write32be_with_write8_device_handler(handler, device, offset * 2 + 0, data >> 32, mem_mask >> 32); |
| 305 | if ( | |
| 305 | if (ACCESSING_BITS_ | |
| 306 | 306 | write32be_with_write8_device_handler(handler, device, offset * 2 + 1, data, mem_mask); |
| 307 | 307 | } |
| 308 | 308 | |
| r2454 | r2455 | |
| 316 | 316 | INLINE UINT64 read64le_with_read8_device_handler(read8_device_func handler, const device_config *device, offs_t offset, UINT64 mem_mask) |
| 317 | 317 | { |
| 318 | 318 | UINT64 result = 0; |
| 319 | if ( | |
| 319 | if (ACCESSING_BITS_ | |
| 320 | 320 | result |= (UINT64)read32le_with_read8_device_handler(handler, device, offset * 2 + 0, mem_mask >> 0) << 0; |
| 321 | if ( | |
| 321 | if (ACCESSING_BITS_32_63 | |
| 322 | 322 | result |= (UINT64)read32le_with_read8_device_handler(handler, device, offset * 2 + 1, mem_mask >> 32) << 32; |
| 323 | 323 | return result; |
| 324 | 324 | } |
| r2454 | r2455 | |
| 326 | 326 | |
| 327 | 327 | INLINE void write64le_with_write8_device_handler(write8_device_func handler, const device_config *device, offs_t offset, UINT64 data, UINT64 mem_mask) |
| 328 | 328 | { |
| 329 | if ( | |
| 329 | if (ACCESSING_BITS_ | |
| 330 | 330 | write32le_with_write8_device_handler(handler, device, offset * 2 + 0, data >> 0, mem_mask >> 0); |
| 331 | if ( | |
| 331 | if (ACCESSING_BITS_32_63 | |
| 332 | 332 | write32le_with_write8_device_handler(handler, device, offset * 2 + 1, data >> 32, mem_mask >> 32); |
| 333 | 333 | } |
| 334 | 334 | |
| r2454 | r2455 | |
| 342 | 342 | INLINE UINT32 read64be_with_16be_device_handler(read16_device_func handler, const device_config *device, offs_t offset, UINT64 mem_mask) |
| 343 | 343 | { |
| 344 | 344 | UINT64 result = 0; |
| 345 | if ( | |
| 345 | if (ACCESSING_BITS_32_63 | |
| 346 | 346 | result |= (UINT64)read32be_with_16be_device_handler(handler, device, offset * 2 + 0, mem_mask >> 32) << 32; |
| 347 | if ( | |
| 347 | if (ACCESSING_BITS_ | |
| 348 | 348 | result |= (UINT64)read32be_with_16be_device_handler(handler, device, offset * 2 + 1, mem_mask >> 0) << 0; |
| 349 | 349 | return result; |
| 350 | 350 | } |
| r2454 | r2455 | |
| 352 | 352 | |
| 353 | 353 | INLINE void write64be_with_16be_device_handler(write16_device_func handler, const device_config *device, offs_t offset, UINT64 data, UINT64 mem_mask) |
| 354 | 354 | { |
| 355 | if ( | |
| 355 | if (ACCESSING_BITS_32_63 | |
| 356 | 356 | write32be_with_16be_device_handler(handler, device, offset * 2 + 0, data >> 32, mem_mask >> 32); |
| 357 | if ( | |
| 357 | if (ACCESSING_BITS_ | |
| 358 | 358 | write32be_with_16be_device_handler(handler, device, offset * 2 + 1, data >> 0, mem_mask >> 0); |
| 359 | 359 | } |
| 360 | 360 | |
| r2454 | r2455 | |
| 368 | 368 | INLINE UINT32 read64le_with_16le_device_handler(read16_device_func handler, const device_config *device, offs_t offset, UINT64 mem_mask) |
| 369 | 369 | { |
| 370 | 370 | UINT64 result = 0; |
| 371 | if ( | |
| 371 | if (ACCESSING_BITS_ | |
| 372 | 372 | result |= (UINT64)read32le_with_16le_device_handler(handler, device, offset * 2 + 0, mem_mask >> 0) << 0; |
| 373 | if ( | |
| 373 | if (ACCESSING_BITS_32_63 | |
| 374 | 374 | result |= (UINT64)read32le_with_16le_device_handler(handler, device, offset * 2 + 1, mem_mask >> 32) << 32; |
| 375 | 375 | return result; |
| 376 | 376 | } |
| r2454 | r2455 | |
| 378 | 378 | |
| 379 | 379 | INLINE void write64le_with_16le_device_handler(write16_device_func handler, const device_config *device, offs_t offset, UINT64 data, UINT64 mem_mask) |
| 380 | 380 | { |
| 381 | if ( | |
| 381 | if (ACCESSING_BITS_ | |
| 382 | 382 | write32le_with_16le_device_handler(handler, device, offset * 2 + 0, data >> 0, mem_mask >> 0); |
| 383 | if ( | |
| 383 | if (ACCESSING_BITS_32_63 | |
| 384 | 384 | write32le_with_16le_device_handler(handler, device, offset * 2 + 1, data >> 32, mem_mask >> 32); |
| 385 | 385 | } |
| 386 | 386 | |
| r2454 | r2455 | |
| 394 | 394 | INLINE UINT32 read64be_with_16le_device_handler(read16_device_func handler, const device_config *device, offs_t offset, UINT64 mem_mask) |
| 395 | 395 | { |
| 396 | 396 | UINT64 result = 0; |
| 397 | if ( | |
| 397 | if (ACCESSING_BITS_32_63 | |
| 398 | 398 | result |= (UINT64)read32be_with_16le_device_handler(handler, device, offset * 2 + 0, mem_mask >> 32) << 32; |
| 399 | if ( | |
| 399 | if (ACCESSING_BITS_ | |
| 400 | 400 | result |= (UINT64)read32be_with_16le_device_handler(handler, device, offset * 2 + 1, mem_mask >> 0) << 0; |
| 401 | 401 | return result; |
| 402 | 402 | } |
| r2454 | r2455 | |
| 404 | 404 | |
| 405 | 405 | INLINE void write64be_with_16le_device_handler(write16_device_func handler, const device_config *device, offs_t offset, UINT64 data, UINT64 mem_mask) |
| 406 | 406 | { |
| 407 | if ( | |
| 407 | if (ACCESSING_BITS_32_63 | |
| 408 | 408 | write32be_with_16le_device_handler(handler, device, offset * 2 + 0, data >> 32, mem_mask >> 32); |
| 409 | if ( | |
| 409 | if (ACCESSING_BITS_ | |
| 410 | 410 | write32be_with_16le_device_handler(handler, device, offset * 2 + 1, data >> 0, mem_mask >> 0); |
| 411 | 411 | } |
| 412 | 412 | |
| r2454 | r2455 | |
| 420 | 420 | INLINE UINT32 read64le_with_16be_device_handler(read16_device_func handler, const device_config *device, offs_t offset, UINT64 mem_mask) |
| 421 | 421 | { |
| 422 | 422 | UINT64 result = 0; |
| 423 | if ( | |
| 423 | if (ACCESSING_BITS_ | |
| 424 | 424 | result |= (UINT64)read32le_with_16be_device_handler(handler, device, offset * 2 + 0, mem_mask >> 0) << 0; |
| 425 | if ( | |
| 425 | if (ACCESSING_BITS_32_63 | |
| 426 | 426 | result |= (UINT64)read32le_with_16be_device_handler(handler, device, offset * 2 + 1, mem_mask >> 32) << 32; |
| 427 | 427 | return result; |
| 428 | 428 | } |
| r2454 | r2455 | |
| 430 | 430 | |
| 431 | 431 | INLINE void write64le_with_16be_device_handler(write16_device_func handler, const device_config *device, offs_t offset, UINT64 data, UINT64 mem_mask) |
| 432 | 432 | { |
| 433 | if ( | |
| 433 | if (ACCESSING_BITS_ | |
| 434 | 434 | write32le_with_16be_device_handler(handler, device, offset * 2 + 0, data >> 0, mem_mask >> 0); |
| 435 | if ( | |
| 435 | if (ACCESSING_BITS_32_63 | |
| 436 | 436 | write32le_with_16be_device_handler(handler, device, offset * 2 + 1, data >> 32, mem_mask >> 32); |
| 437 | 437 | } |
| 438 | 438 | |
| r2454 | r2455 | |
| 446 | 446 | INLINE UINT64 read64be_with_32be_device_handler(read32_device_func handler, const device_config *device, offs_t offset, UINT64 mem_mask) |
| 447 | 447 | { |
| 448 | 448 | UINT64 result = 0; |
| 449 | if ( | |
| 449 | if (ACCESSING_BITS_32_63 | |
| 450 | 450 | result |= (UINT64)(*handler)(device, offset * 2 + 0, mem_mask >> 32) << 32; |
| 451 | if ( | |
| 451 | if (ACCESSING_BITS_ | |
| 452 | 452 | result |= (UINT64)(*handler)(device, offset * 2 + 1, mem_mask >> 0) << 0; |
| 453 | 453 | return result; |
| 454 | 454 | } |
| r2454 | r2455 | |
| 456 | 456 | |
| 457 | 457 | INLINE void write64be_with_32be_device_handler(write32_device_func handler, const device_config *device, offs_t offset, UINT64 data, UINT64 mem_mask) |
| 458 | 458 | { |
| 459 | if ( | |
| 459 | if (ACCESSING_BITS_32_63 | |
| 460 | 460 | (*handler)(device, offset * 2 + 0, data >> 32, mem_mask >> 32); |
| 461 | if ( | |
| 461 | if (ACCESSING_BITS_ | |
| 462 | 462 | (*handler)(device, offset * 2 + 1, data >> 0, mem_mask >> 0); |
| 463 | 463 | } |
| 464 | 464 | |
| r2454 | r2455 | |
| 472 | 472 | INLINE UINT64 read64le_with_32le_device_handler(read32_device_func handler, const device_config *device, offs_t offset, UINT64 mem_mask) |
| 473 | 473 | { |
| 474 | 474 | UINT64 result = 0; |
| 475 | if ( | |
| 475 | if (ACCESSING_BITS_ | |
| 476 | 476 | result |= (UINT64)(*handler)(device, offset * 2 + 0, mem_mask >> 0) << 0; |
| 477 | if ( | |
| 477 | if (ACCESSING_BITS_32_63 | |
| 478 | 478 | result |= (UINT64)(*handler)(device, offset * 2 + 1, mem_mask >> 32) << 32; |
| 479 | 479 | return result; |
| 480 | 480 | } |
| r2454 | r2455 | |
| 482 | 482 | |
| 483 | 483 | INLINE void write64le_with_32le_device_handler(write32_device_func handler, const device_config *device, offs_t offset, UINT64 data, UINT64 mem_mask) |
| 484 | 484 | { |
| 485 | if ( | |
| 485 | if (ACCESSING_BITS_ | |
| 486 | 486 | (*handler)(device, offset * 2 + 0, data >> 0, mem_mask >> 0); |
| 487 | if ( | |
| 487 | if (ACCESSING_BITS_32_63 | |
| 488 | 488 | (*handler)(device, offset * 2 + 1, data >> 32, mem_mask >> 32); |
| 489 | 489 | } |
| 490 | 490 |
| r2454 | r2455 | |
|---|---|---|
| 1547 | 1547 | /* add per-channel volume */ |
| 1548 | 1548 | numitems = sound_get_user_gain_count(); |
| 1549 | 1549 | for (item = 0; item < numitems; item++) |
| 1550 | slider_config(&slider_list[slider_count++], 0, sound_get_default_gain(item) * 1000.0f + 0.5f, 2000, 20, slider_mixervol, item); | |
| 1550 | { | |
| 1551 | INT32 maxval = 2000; | |
| 1552 | INT32 defval = sound_get_default_gain(item) * 1000.0f + 0.5f; | |
| 1551 | 1553 | |
| 1554 | if (defval > 1000) | |
| 1555 | maxval = 2 * defval; | |
| 1556 | ||
| 1557 | slider_config(&slider_list[slider_count++], 0, defval, maxval, 20, slider_mixervol, item); | |
| 1558 | } | |
| 1559 | ||
| 1552 | 1560 | /* add analog adjusters */ |
| 1553 | 1561 | for (in = machine->input_ports; in && in->type != IPT_END; in++) |
| 1554 | 1562 | if ((in->type & 0xff) == IPT_ADJUSTER) |
| r2454 | r2455 | |
|---|---|---|
| 661 | 661 | profiler_mark(PROFILER_SOUND); |
| 662 | 662 | |
| 663 | 663 | /* force all the speaker streams to generate the proper number of samples */ |
| 664 | for (curspeak = speaker_output_first( | |
| 664 | for (curspeak = speaker_output_first(machine->config); curspeak != NULL; curspeak = speaker_output_next(curspeak)) | |
| 665 | 665 | { |
| 666 | 666 | speaker_info *spk = curspeak->token; |
| 667 | 667 | const stream_sample_t *stream_buf; |
| r2454 | r2455 | |
|---|---|---|
| 10 | 10 | ******************************************************************************/ |
| 11 | 11 | |
| 12 | 12 | #include "driver.h" |
| 13 | #include "deprecat.h" | |
| 14 | 13 | |
| 15 | 14 | #define VERBOSE 0 |
| 16 | 15 |
| r2454 | r2455 | |
|---|---|---|
| 228 | 228 | INT64 resulti64, expectedi64; |
| 229 | 229 | UINT64 resultu64, expectedu64; |
| 230 | 230 | INT32 remainder, expremainder; |
| 231 | UINT32 uremainder, expuremainder; | |
| 231 | UINT32 uremainder, expuremainder, bigu32 = 0xffffffff; | |
| 232 | 232 | int error = FALSE; |
| 233 | 233 | |
| 234 | 234 | /* use only non-zero, positive numbers */ |
| r2454 | r2455 | |
| 278 | 278 | |
| 279 | 279 | while ((INT64)testi32a * (INT64)0x7fffffff < testi64a) |
| 280 | 280 | testi64a /= 2; |
| 281 | while ((UINT64)testu32a * (UINT64) | |
| 281 | while ((UINT64)testu32a * (UINT64)bigu32 | |
| 282 | 282 | testu64a /= 2; |
| 283 | 283 | |
| 284 | 284 | resulti32 = div_64x32(testi64a, testi32a); |
| r2454 | r2455 | |
|---|---|---|
| 48 | 48 | static open_chd **chd_list_tailptr; |
| 49 | 49 | |
| 50 | 50 | /* system BIOS */ |
| 51 | int system_bios; | |
| 51 | static int system_bios; | |
| 52 | 52 | |
| 53 | 53 | static int total_rom_load_warnings; |
| 54 | 54 | |
| r2454 | r2455 | |
| 190 | 190 | const char *specbios = options_get_string(mame_options(), OPTION_BIOS); |
| 191 | 191 | const rom_entry *rom; |
| 192 | 192 | int bios_count = 0; |
| 193 | int bios_no = 0; | |
| 193 | 194 | |
| 194 | /* set to default */ | |
| 195 | int bios_no = 1; | |
| 196 | ||
| 197 | 195 | for (rom = romp;!ROMENTRY_ISEND(rom);rom++) |
| 198 | 196 | if (ROMENTRY_ISSYSTEM_BIOS(rom)) |
| 199 | 197 | { |
| r2454 | r2455 | |
| 208 | 206 | bios_count++; |
| 209 | 207 | } |
| 210 | 208 | |
| 211 | if (bios_count == 0) | |
| 212 | bios_no = 0; | |
| 209 | if (bios_no == 0 && bios_count > 0) | |
| 210 | { | |
| 211 | if (specbios[0] != 0) | |
| 212 | fatalerror("%s: no such bios\n", specbios); | |
| 213 | /* set to default */ | |
| 214 | bios_no = 1; | |
| 215 | } | |
| 213 | 216 | |
| 214 | 217 | debugload("Using System BIOS: %d\n", bios_no); |
| 215 | 218 |
| r2454 | r2455 | |
|---|---|---|
| 292 | 292 | buffer += SHA1_DATA_SIZE; |
| 293 | 293 | length -= SHA1_DATA_SIZE; |
| 294 | 294 | } |
| 295 | if ((ctx->index = length)) /* This assignment is intended */ | |
| 295 | ctx->index = length; | |
| 296 | if (length) | |
| 296 | 297 | /* Buffer leftovers */ |
| 297 | 298 | memcpy(ctx->block, buffer, length); |
| 298 | 299 | } |
| r2454 | r2455 | |
|---|---|---|
| 31 | 31 | void slammast_decode(void) { } |
| 32 | 32 | #endif |
| 33 | 33 | |
| 34 | void forogttn_dummy_function(running_machine *machine) | |
| 35 | { | |
| 36 | /* Forgotten Worlds has extra inputs on the B-board CN-MOWS connector for the dial controls. */ | |
| 37 | memory_install_write16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x800040, 0x800041, 0, 0, forgottn_dial_0_reset_w); | |
| 38 | memory_install_write16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x800048, 0x800049, 0, 0, forgottn_dial_1_reset_w); | |
| 39 | memory_install_read16_handler (machine, 0, ADDRESS_SPACE_PROGRAM, 0x800052, 0x800055, 0, 0, forgottn_dial_0_r); | |
| 40 | memory_install_read16_handler (machine, 0, ADDRESS_SPACE_PROGRAM, 0x80005a, 0x80005d, 0, 0, forgottn_dial_1_r); | |
| 41 | } | |
| 42 | ||
| 34 | 43 | /*************************************************************************** |
| 35 | 44 | |
| 36 | 45 | Game driver(s) |
| 37 | 46 | |
| 38 | 47 | ***************************************************************************/ |
| 39 | 48 | |
| 40 | #define CODE_SIZE 0x | |
| 49 | #define CODE_SIZE 0x400000 | |
| 41 | 50 | |
| 42 | 51 | static INPUT_PORTS_START( sfzch ) |
| 43 | 52 | PORT_START_TAG("IN0") /* IN0 */ |
| r2454 | r2455 | |
|---|---|---|
| 618 | 618 | /* AY-8912 for Dragon Alpha, the AY-8912 simply an AY-8910 with only one io port. */ |
| 619 | 619 | static const struct AY8910interface ay8912_interface = |
| 620 | 620 | { |
| 621 | AY8910_LEGACY_OUTPUT, | |
| 622 | AY8910_DEFAULT_LOADS, | |
| 621 | 623 | dgnalpha_psg_porta_read, /* portA read */ |
| 622 | 624 | NULL, /* portB read */ |
| 623 | 625 | dgnalpha_psg_porta_write, /* portA write */ |
| r2454 | r2455 | |
|---|---|---|
| 704 | 704 | |
| 705 | 705 | static const struct AY8910interface ay8910_interface = |
| 706 | 706 | { |
| 707 | AY8910_LEGACY_OUTPUT, | |
| 708 | AY8910_DEFAULT_LOADS, | |
| 707 | 709 | msx_psg_port_a_r, |
| 708 | 710 | msx_psg_port_b_r, |
| 709 | 711 | msx_psg_port_a_w, |
| r2454 | r2455 | |
|---|---|---|
| 84 | 84 | |
| 85 | 85 | static const struct AY8910interface ay8910_interface = |
| 86 | 86 | { |
| 87 | AY8910_LEGACY_OUTPUT, | |
| 88 | AY8910_DEFAULT_LOADS, | |
| 87 | 89 | input_port_4_r, |
| 88 | 90 | 0, |
| 89 | 91 | vectrex_psg_port_w, |
| r2454 | r2455 | |
|---|---|---|
| 369 | 369 | |
| 370 | 370 | static const struct AY8910interface ay8910_interface = |
| 371 | 371 | { |
| 372 | AY8910_LEGACY_OUTPUT, | |
| 373 | AY8910_DEFAULT_LOADS, | |
| 372 | 374 | cgenie_psg_port_a_r, |
| 373 | 375 | cgenie_psg_port_b_r, |
| 374 | 376 | cgenie_psg_port_a_w, |
| r2454 | r2455 | |
|---|---|---|
| 161 | 161 | |
| 162 | 162 | static const struct AY8910interface spectrum_ay_interface = |
| 163 | 163 | { |
| 164 | AY8910_LEGACY_OUTPUT, | |
| 165 | AY8910_DEFAULT_LOADS, | |
| 164 | 166 | NULL |
| 165 | 167 | }; |
| 166 | 168 |
| r2454 | r2455 | |
|---|---|---|
| 1295 | 1295 | |
| 1296 | 1296 | static const struct AY8910interface ym2149_interface = |
| 1297 | 1297 | { |
| 1298 | AY8910_LEGACY_OUTPUT, | |
| 1299 | AY8910_DEFAULT_LOADS, | |
| 1298 | 1300 | 0, |
| 1299 | 1301 | 0, |
| 1300 | 1302 | ym2149_port_a_w, |
| r2454 | r2455 | |
| 1633 | 1635 | |
| 1634 | 1636 | static const struct AY8910interface stbook_ym2149_interface = |
| 1635 | 1637 | { |
| 1638 | AY8910_LEGACY_OUTPUT, | |
| 1639 | AY8910_DEFAULT_LOADS, | |
| 1636 | 1640 | 0, |
| 1637 | 1641 | 0, |
| 1638 | 1642 | stbook_ym2149_port_a_w, |
| r2454 | r2455 | |
|---|---|---|
| 492 | 492 | |
| 493 | 493 | static const struct YM2203interface ym2203_interface = |
| 494 | 494 | { |
| 495 | opn_dummy_input, | |
| 496 | opn_dummy_input, | |
| 497 | 0, | |
| 498 | 0, | |
| 495 | { | |
| 496 | AY8910_LEGACY_OUTPUT, | |
| 497 | AY8910_DEFAULT_LOADS, | |
| 498 | opn_dummy_input, | |
| 499 | opn_dummy_input, | |
| 500 | 0, | |
| 501 | 0 | |
| 502 | }, | |
| 499 | 503 | pc88sr_sound_interupt |
| 500 | 504 | }; |
| 501 | 505 |
| r2454 | r2455 | |
|---|---|---|
| 432 | 432 | |
| 433 | 433 | static const struct AY8910interface oric_ay_interface = |
| 434 | 434 | { |
| 435 | AY8910_LEGACY_OUTPUT, | |
| 436 | AY8910_DEFAULT_LOADS, | |
| 435 | 437 | 0, |
| 436 | 438 | 0, |
| 437 | 439 | oric_psg_porta_write, |
| r2454 | r2455 | |
|---|---|---|
| 308 | 308 | |
| 309 | 309 | static const struct AY8910interface orionz80_ay_interface = |
| 310 | 310 | { |
| 311 | AY8910_LEGACY_OUTPUT, | |
| 312 | AY8910_DEFAULT_LOADS, | |
| 311 | 313 | NULL |
| 312 | 314 | }; |
| 313 | 315 |
| r2454 | r2455 | |
|---|---|---|
| 203 | 203 | |
| 204 | 204 | static const struct AY8910interface ay8910_interface = |
| 205 | 205 | { |
| 206 | AY8910_LEGACY_OUTPUT, | |
| 207 | AY8910_DEFAULT_LOADS, | |
| 206 | 208 | 0, |
| 207 | 209 | 0, |
| 208 | 210 | 0, |
| r2454 | r2455 | |
|---|---|---|
| 1610 | 1610 | |
| 1611 | 1611 | static const struct AY8910interface einstein_ay_interface = |
| 1612 | 1612 | { |
| 1613 | AY8910_LEGACY_OUTPUT, | |
| 1614 | AY8910_DEFAULT_LOADS, | |
| 1613 | 1615 | NULL, |
| 1614 | 1616 | einstein_port_b_read, |
| 1615 | 1617 | einstein_port_a_write, |
| r2454 | r2455 | |
|---|---|---|
| 90 | 90 | |
| 91 | 91 | static const struct AY8910interface ay8910_interface = |
| 92 | 92 | { |
| 93 | AY8910_LEGACY_OUTPUT, | |
| 94 | AY8910_DEFAULT_LOADS, | |
| 93 | 95 | intv_right_control_r, |
| 94 | 96 | intv_left_control_r, |
| 95 | 97 | 0, |
| r2454 | r2455 | |
|---|---|---|
| 2855 | 2855 | --------------------*/ |
| 2856 | 2856 | static const struct AY8910interface ay8912_interface = |
| 2857 | 2857 | { |
| 2858 | AY8910_LEGACY_OUTPUT, | |
| 2859 | AY8910_DEFAULT_LOADS, | |
| 2858 | 2860 | amstrad_psg_porta_read, /* portA read */ |
| 2859 | 2861 | amstrad_psg_porta_read, /* portB read */ |
| 2860 | 2862 | NULL, /* portA write */ |
| r2454 | r2455 | |
|---|---|---|
| 535 | 535 | |
| 536 | 536 | static const struct AY8910interface ay8910_interface = |
| 537 | 537 | { |
| 538 | AY8910_LEGACY_OUTPUT, | |
| 539 | AY8910_DEFAULT_LOADS, | |
| 538 | 540 | NULL |
| 539 | 541 | }; |
| 540 | 542 |
| r2454 | r2455 | |
|---|---|---|
| 289 | 289 | |
| 290 | 290 | static const struct AY8910interface ay8910_interface = |
| 291 | 291 | { |
| 292 | AY8910_LEGACY_OUTPUT, | |
| 293 | AY8910_DEFAULT_LOADS, | |
| 292 | 294 | svi318_psg_port_a_r, |
| 293 | 295 | NULL, |
| 294 | 296 | NULL, |
| r2454 | r2455 | |
|---|---|---|
| 81 | 81 | |
| 82 | 82 | Source Changes: |
| 83 | 83 | ---------------- |
| 84 | - The core is based on MAME 0.124u | |
| 84 | - The core is based on MAME 0.124u4. This incorporates all features of the | |
| 85 | 85 | update to this core. [MAME team] |
| 86 | 86 | |
| 87 | 87 | - Major changes to transition MESS's device system onto MAME's device system. |
| Previous | 15994 Revisions | Next |